Fixes for building with unity build

openmw-37
Alexander "Ace" Olofsson 9 years ago
parent 12b8fcf0bf
commit 7d4125d97f

@ -65,7 +65,7 @@ add_openmw_dir (mwworld
containerstore actiontalk actiontake manualref player cellfunctors failedaction
cells localscripts customdata inventorystore ptr actionopen actionread
actionequip timestamp actionalchemy cellstore actionapply actioneat
esmstore store recordcmp fallback actionrepair actionsoulgem livecellref actiondoor
store esmstore recordcmp fallback actionrepair actionsoulgem livecellref actiondoor
contentloader esmloader actiontrap cellreflist cellref physicssystem weather projectilemanager
)
@ -179,4 +179,5 @@ if (MSVC)
if (CMAKE_CL_64)
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj")
endif (CMAKE_CL_64)
add_definitions("-D_USE_MATH_DEFINES")
endif (MSVC)

@ -31,7 +31,7 @@
namespace
{
MyGUI::Colour getTextColour (const std::string& type)
MyGUI::Colour getDialogueTextColour (const std::string& type)
{
return MyGUI::Colour::parse(MyGUI::LanguageManager::getInstance().replaceTags("#{fontcolour=" + type + "}"));
}
@ -115,7 +115,7 @@ namespace MWGui
void Response::write(BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map<std::string, Link*>& topicLinks) const
{
BookTypesetter::Style* title = typesetter->createStyle("", getTextColour("header"));
BookTypesetter::Style* title = typesetter->createStyle("", getDialogueTextColour("header"));
typesetter->sectionBreak(9);
if (mTitle != "")
typesetter->write(title, to_utf8_span(mTitle.c_str()));
@ -159,14 +159,14 @@ namespace MWGui
if (hyperLinks.size() && MWBase::Environment::get().getWindowManager()->getTranslationDataStorage().hasTranslation())
{
BookTypesetter::Style* style = typesetter->createStyle("", getTextColour("normal"));
BookTypesetter::Style* style = typesetter->createStyle("", getDialogueTextColour("normal"));
size_t formatted = 0; // points to the first character that is not laid out yet
for (std::map<Range, intptr_t>::iterator it = hyperLinks.begin(); it != hyperLinks.end(); ++it)
{
intptr_t topicId = it->second;
const MyGUI::Colour linkHot (getTextColour("link_over"));
const MyGUI::Colour linkNormal (getTextColour("link"));
const MyGUI::Colour linkActive (getTextColour("link_pressed"));
const MyGUI::Colour linkHot(getDialogueTextColour("link_over"));
const MyGUI::Colour linkNormal(getDialogueTextColour("link"));
const MyGUI::Colour linkActive(getDialogueTextColour("link_pressed"));
BookTypesetter::Style* hotStyle = typesetter->createHotStyle (style, linkNormal, linkHot, linkActive, topicId);
if (formatted < it->first.first)
typesetter->write(style, formatted, it->first.first);
@ -199,11 +199,11 @@ namespace MWGui
void Response::addTopicLink(BookTypesetter::Ptr typesetter, intptr_t topicId, size_t begin, size_t end) const
{
BookTypesetter::Style* style = typesetter->createStyle("", getTextColour("normal"));
BookTypesetter::Style* style = typesetter->createStyle("", getDialogueTextColour("normal"));
const MyGUI::Colour linkHot (getTextColour("link_over"));
const MyGUI::Colour linkNormal (getTextColour("link"));
const MyGUI::Colour linkActive (getTextColour("link_pressed"));
const MyGUI::Colour linkHot(getDialogueTextColour("link_over"));
const MyGUI::Colour linkNormal(getDialogueTextColour("link"));
const MyGUI::Colour linkActive(getDialogueTextColour("link_pressed"));
if (topicId)
style = typesetter->createHotStyle (style, linkNormal, linkHot, linkActive, topicId);
@ -217,7 +217,7 @@ namespace MWGui
void Message::write(BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map<std::string, Link*>& topicLinks) const
{
BookTypesetter::Style* title = typesetter->createStyle("", getTextColour("notify"));
BookTypesetter::Style* title = typesetter->createStyle("", getDialogueTextColour("notify"));
typesetter->sectionBreak(9);
typesetter->write(title, to_utf8_span(mText.c_str()));
}
@ -486,9 +486,9 @@ namespace MWGui
typesetter->sectionBreak(9);
// choices
const MyGUI::Colour linkHot (getTextColour("answer_over"));
const MyGUI::Colour linkNormal (getTextColour("answer"));
const MyGUI::Colour linkActive (getTextColour("answer_pressed"));
const MyGUI::Colour linkHot(getDialogueTextColour("answer_over"));
const MyGUI::Colour linkNormal(getDialogueTextColour("answer"));
const MyGUI::Colour linkActive(getDialogueTextColour("answer_pressed"));
for (std::vector<std::pair<std::string, int> >::iterator it = mChoices.begin(); it != mChoices.end(); ++it)
{
Choice* link = new Choice(it->second);

@ -1,4 +1,5 @@
#ifndef OPENMW_MECHANICS_STEERING_H
#define OPENMW_MECHANICS_STEERING_H
#include <osg/Math>

@ -14,10 +14,10 @@
namespace
{
class UpdateCameraCallback : public osg::NodeCallback
class UpdateRenderCameraCallback : public osg::NodeCallback
{
public:
UpdateCameraCallback(MWRender::Camera* cam)
UpdateRenderCameraCallback(MWRender::Camera* cam)
: mCamera(cam)
{
}
@ -67,7 +67,7 @@ namespace MWRender
mMainCam.yaw = 0.f;
mMainCam.offset = 400.f;
mUpdateCallback = new UpdateCameraCallback(this);
mUpdateCallback = new UpdateRenderCameraCallback(this);
mCamera->addUpdateCallback(mUpdateCallback);
}

@ -59,10 +59,10 @@ namespace
}
class CameraUpdateCallback : public osg::NodeCallback
class CameraUpdateGlobalCallback : public osg::NodeCallback
{
public:
CameraUpdateCallback(osg::Camera* cam, MWRender::GlobalMap* parent)
CameraUpdateGlobalCallback(osg::Camera* cam, MWRender::GlobalMap* parent)
: mRendered(false)
, mCamera(cam)
, mParent(parent)
@ -263,7 +263,7 @@ namespace MWRender
else
camera->setClearMask(GL_NONE);
camera->setUpdateCallback(new CameraUpdateCallback(camera, this));
camera->setUpdateCallback(new CameraUpdateGlobalCallback(camera, this));
camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT, osg::Camera::PIXEL_BUFFER_RTT);
camera->attach(osg::Camera::COLOR_BUFFER, mOverlayTexture);

@ -27,10 +27,10 @@
namespace
{
class CameraUpdateCallback : public osg::NodeCallback
class CameraLocalUpdateCallback : public osg::NodeCallback
{
public:
CameraUpdateCallback(osg::Camera* cam, MWRender::LocalMap* parent)
CameraLocalUpdateCallback(osg::Camera* cam, MWRender::LocalMap* parent)
: mRendered(false)
, mCamera(cam)
, mParent(parent)
@ -205,7 +205,7 @@ osg::ref_ptr<osg::Camera> LocalMap::createOrthographicCamera(float x, float y, f
camera->setStateSet(stateset);
camera->setGraphicsContext(mViewer->getCamera()->getGraphicsContext());
camera->setViewport(0, 0, mMapResolution, mMapResolution);
camera->setUpdateCallback(new CameraUpdateCallback(camera, this));
camera->setUpdateCallback(new CameraLocalUpdateCallback(camera, this));
return camera;
}

@ -1,6 +1,5 @@
#include "sky.hpp"
#define _USE_MATH_DEFINES
#include <cmath>
#include <osg/Transform>

@ -56,10 +56,10 @@ namespace MWScript
if (count == 0)
return;
if(Misc::StringUtils::ciEqual(item, "gold_005")
|| Misc::StringUtils::ciEqual(item, "gold_010")
|| Misc::StringUtils::ciEqual(item, "gold_025")
|| Misc::StringUtils::ciEqual(item, "gold_100"))
if(::Misc::StringUtils::ciEqual(item, "gold_005")
|| ::Misc::StringUtils::ciEqual(item, "gold_010")
|| ::Misc::StringUtils::ciEqual(item, "gold_025")
|| ::Misc::StringUtils::ciEqual(item, "gold_100"))
item = "gold_001";
MWWorld::Ptr itemPtr = *ptr.getClass().getContainerStore (ptr).add (item, count, ptr);
@ -97,10 +97,10 @@ namespace MWScript
std::string item = runtime.getStringLiteral (runtime[0].mInteger);
runtime.pop();
if(Misc::StringUtils::ciEqual(item, "gold_005")
|| Misc::StringUtils::ciEqual(item, "gold_010")
|| Misc::StringUtils::ciEqual(item, "gold_025")
|| Misc::StringUtils::ciEqual(item, "gold_100"))
if(::Misc::StringUtils::ciEqual(item, "gold_005")
|| ::Misc::StringUtils::ciEqual(item, "gold_010")
|| ::Misc::StringUtils::ciEqual(item, "gold_025")
|| ::Misc::StringUtils::ciEqual(item, "gold_100"))
item = "gold_001";
MWWorld::ContainerStore& store = ptr.getClass().getContainerStore (ptr);
@ -131,10 +131,10 @@ namespace MWScript
if (count == 0)
return;
if(Misc::StringUtils::ciEqual(item, "gold_005")
|| Misc::StringUtils::ciEqual(item, "gold_010")
|| Misc::StringUtils::ciEqual(item, "gold_025")
|| Misc::StringUtils::ciEqual(item, "gold_100"))
if(::Misc::StringUtils::ciEqual(item, "gold_005")
|| ::Misc::StringUtils::ciEqual(item, "gold_010")
|| ::Misc::StringUtils::ciEqual(item, "gold_025")
|| ::Misc::StringUtils::ciEqual(item, "gold_100"))
item = "gold_001";
MWWorld::ContainerStore& store = ptr.getClass().getContainerStore (ptr);

@ -228,7 +228,7 @@ namespace MWScript
// workaround broken endgame scripts that kill dagoth ur
if (!R::implicit &&
Misc::StringUtils::ciEqual(ptr.getCellRef().getRefId(), "dagoth_ur_1"))
::Misc::StringUtils::ciEqual(ptr.getCellRef().getRefId(), "dagoth_ur_1"))
{
runtime.push (peek);

@ -994,7 +994,7 @@ namespace MWWorld
template<>
inline void Store<ESM::Dialogue>::setUp()
void Store<ESM::Dialogue>::setUp()
{
// DialInfos marked as deleted are kept during the loading phase, so that the linked list
// structure is kept intact for inserting further INFOs. Delete them now that loading is done.
@ -1013,7 +1013,7 @@ namespace MWWorld
}
template <>
inline void Store<ESM::Dialogue>::load(ESM::ESMReader &esm, const std::string &id) {
void Store<ESM::Dialogue>::load(ESM::ESMReader &esm, const std::string &id) {
std::string idLower = Misc::StringUtils::lowerCase(id);
std::map<std::string, ESM::Dialogue>::iterator it = mStatic.find(idLower);
@ -1029,7 +1029,6 @@ namespace MWWorld
// Script
//=========================================================================
template <>
inline void Store<ESM::Script>::load(ESM::ESMReader &esm, const std::string &id) {
ESM::Script scpt;
scpt.load(esm);
@ -1046,7 +1045,6 @@ namespace MWWorld
// StartScript
//=========================================================================
template <>
inline void Store<ESM::StartScript>::load(ESM::ESMReader &esm, const std::string &id)
{
ESM::StartScript s;

@ -1,6 +1,3 @@
#define _USE_MATH_DEFINES
#include <cmath>
#include "weather.hpp"
#include <components/misc/rng.hpp>
@ -26,6 +23,8 @@
#include "fallback.hpp"
#include "cellstore.hpp"
#include <cmath>
using namespace MWWorld;
namespace

@ -47,7 +47,7 @@ add_component_dir (sceneutil
)
add_component_dir (nif
controlled effect niftypes record controller extra node record_ptr data niffile property nifkey data node base nifstream
controlled effect niftypes record controller extra node record_ptr data niffile property nifkey base nifstream
)
add_component_dir (nifosg

@ -4,9 +4,9 @@
#include <cstring>
#include <windows.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <WinReg.h>
#include <boost/locale.hpp>
namespace bconv = boost::locale::conv;

@ -1,3 +1,6 @@
#ifndef VFS_BSAARCHIVE_HPP_
#define VFS_BSAARCHIVE_HPP_
#include "archive.hpp"
#include <components/bsa/bsa_file.hpp>
@ -30,3 +33,5 @@ namespace VFS
};
}
#endif
Loading…
Cancel
Save