Merge pull request #149 from OpenMW/master

Add OpenMW commits up to 14 Feb 2017
coverity_scan^2
David Cernat 8 years ago committed by GitHub
commit 2ed9ae5739

@ -129,7 +129,7 @@ void CSMTools::ListLandTexturesMergeStage::perform (int stage, CSMDoc::Messages&
// make sure record is loaded
land.loadData (ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML |
ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX | ESM::Land::DATA_WNAM);
ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX);
if (const ESM::Land::LandData *data = land.getLandData (ESM::Land::DATA_VTEX))
{
@ -221,7 +221,7 @@ void CSMTools::MergeLandStage::perform (int stage, CSMDoc::Messages& messages)
const CSMWorld::Land& land = record.get();
land.loadData (ESM::Land::DATA_VCLR | ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML |
ESM::Land::DATA_VTEX | ESM::Land::DATA_WNAM);
ESM::Land::DATA_VTEX);
CSMWorld::Land newLand (land);

@ -993,7 +993,7 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages)
if (index!=-1/* && !mBase*/)
mLand.getRecord (index).get().loadData (
ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR |
ESM::Land::DATA_VTEX | ESM::Land::DATA_WNAM);
ESM::Land::DATA_VTEX);
break;
}

@ -24,6 +24,8 @@
#include <components/compiler/extensions0.hpp>
#include <components/sceneutil/workqueue.hpp>
#include <components/files/configurationmanager.hpp>
#include <components/translation/translation.hpp>
@ -249,6 +251,8 @@ OMW::Engine::~Engine()
delete mScriptContext;
mScriptContext = NULL;
mWorkQueue = NULL;
mResourceSystem.reset();
mViewer = NULL;
@ -475,6 +479,11 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
Settings::Manager::getInt("anisotropy", "General")
);
int numThreads = Settings::Manager::getInt("preload num threads", "Cells");
if (numThreads <= 0)
throw std::runtime_error("Invalid setting: 'preload num threads' must be >0");
mWorkQueue = new SceneUtil::WorkQueue(numThreads);
// Create input and UI first to set up a bootstrapping environment for
// showing a loading screen and keeping the window responsive while doing so
@ -508,7 +517,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
guiRoot->setName("GUI Root");
guiRoot->setNodeMask(MWRender::Mask_GUI);
rootNode->addChild(guiRoot);
MWGui::WindowManager* window = new MWGui::WindowManager(mViewer, guiRoot, mResourceSystem.get(),
MWGui::WindowManager* window = new MWGui::WindowManager(mViewer, guiRoot, mResourceSystem.get(), mWorkQueue.get(),
mCfgMgr.getLogPath().string() + std::string("/"), myguiResources,
mScriptConsoleMode, mTranslationDataStorage, mEncoding, mExportFonts, mFallbackMap,
Version::getOpenmwVersionDescription(mResDir.string()));
@ -525,7 +534,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
}
// Create the world
mEnvironment.setWorld( new MWWorld::World (mViewer, rootNode, mResourceSystem.get(),
mEnvironment.setWorld( new MWWorld::World (mViewer, rootNode, mResourceSystem.get(), mWorkQueue.get(),
mFileCollections, mContentFiles, mEncoder, mFallbackMap,
mActivationDistanceOverride, mCellName, mStartupScript, mResDir.string(), mCfgMgr.getUserDataPath().string()));
mEnvironment.getWorld()->setupPlayer();

@ -18,6 +18,11 @@ namespace Resource
class ResourceSystem;
}
namespace SceneUtil
{
class WorkQueue;
}
namespace VFS
{
class Manager;
@ -68,6 +73,7 @@ namespace OMW
SDL_Window* mWindow;
std::auto_ptr<VFS::Manager> mVFS;
std::auto_ptr<Resource::ResourceSystem> mResourceSystem;
osg::ref_ptr<SceneUtil::WorkQueue> mWorkQueue;
MWBase::Environment mEnvironment;
ToUTF8::FromType mEncoding;
ToUTF8::Utf8Encoder* mEncoder;

@ -639,7 +639,7 @@ namespace MWGui
// ------------------------------------------------------------------------------------------
MapWindow::MapWindow(CustomMarkerCollection &customMarkers, DragAndDrop* drag, MWRender::LocalMap* localMapRender)
MapWindow::MapWindow(CustomMarkerCollection &customMarkers, DragAndDrop* drag, MWRender::LocalMap* localMapRender, SceneUtil::WorkQueue* workQueue)
: WindowPinnableBase("openmw_map_window.layout")
, LocalMapBase(customMarkers, localMapRender)
, NoDrop(drag, mMainWidget)
@ -649,7 +649,7 @@ namespace MWGui
, mGlobal(false)
, mEventBoxGlobal(NULL)
, mEventBoxLocal(NULL)
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot()))
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot(), workQueue))
, mEditNoteDialog()
{
static bool registered = false;
@ -791,19 +791,11 @@ namespace MWGui
mLastScrollWindowCoordinates = currentCoordinates;
}
void MapWindow::renderGlobalMap(Loading::Listener* loadingListener)
void MapWindow::renderGlobalMap()
{
mGlobalMapRender->render(loadingListener);
mGlobalMapRender->render();
mGlobalMap->setCanvasSize (mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
mGlobalMapImage->setSize(mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
mGlobalMapTexture.reset(new osgMyGUI::OSGTexture(mGlobalMapRender->getBaseTexture()));
mGlobalMapImage->setRenderItemTexture(mGlobalMapTexture.get());
mGlobalMapImage->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
mGlobalMapOverlayTexture.reset(new osgMyGUI::OSGTexture(mGlobalMapRender->getOverlayTexture()));
mGlobalMapOverlay->setRenderItemTexture(mGlobalMapOverlayTexture.get());
mGlobalMapOverlay->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
}
MapWindow::~MapWindow()
@ -957,6 +949,8 @@ namespace MWGui
void MapWindow::open()
{
ensureGlobalMapLoaded();
globalMapUpdatePlayer();
}
@ -1001,6 +995,20 @@ namespace MWGui
rotatingSubskin->setAngle(angle);
}
void MapWindow::ensureGlobalMapLoaded()
{
if (!mGlobalMapTexture.get())
{
mGlobalMapTexture.reset(new osgMyGUI::OSGTexture(mGlobalMapRender->getBaseTexture()));
mGlobalMapImage->setRenderItemTexture(mGlobalMapTexture.get());
mGlobalMapImage->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
mGlobalMapOverlayTexture.reset(new osgMyGUI::OSGTexture(mGlobalMapRender->getOverlayTexture()));
mGlobalMapOverlay->setRenderItemTexture(mGlobalMapOverlayTexture.get());
mGlobalMapOverlay->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
}
}
void MapWindow::clear()
{
mMarkers.clear();

@ -38,6 +38,11 @@ namespace Loading
class Listener;
}
namespace SceneUtil
{
class WorkQueue;
}
namespace MWGui
{
@ -202,14 +207,14 @@ namespace MWGui
{
friend class mwmp::GUIController;
public:
MapWindow(CustomMarkerCollection& customMarkers, DragAndDrop* drag, MWRender::LocalMap* localMapRender);
MapWindow(CustomMarkerCollection& customMarkers, DragAndDrop* drag, MWRender::LocalMap* localMapRender, SceneUtil::WorkQueue* workQueue);
virtual ~MapWindow();
void setCellName(const std::string& cellName);
virtual void setAlpha(float alpha);
void renderGlobalMap(Loading::Listener* loadingListener);
void renderGlobalMap();
/// adds the marker to the global map
/// @param name The ESM::Cell::mName
@ -221,6 +226,8 @@ namespace MWGui
void setGlobalMapPlayerPosition (float worldX, float worldY);
void setGlobalMapPlayerDir(const float x, const float y);
void ensureGlobalMapLoaded();
virtual void open();
void onFrame(float dt);

@ -30,6 +30,8 @@
#include <components/resource/resourcesystem.hpp>
#include <components/resource/imagemanager.hpp>
#include <components/sceneutil/workqueue.hpp>
#include <components/translation/translation.hpp>
#include <components/myguiplatform/myguiplatform.hpp>
@ -118,11 +120,12 @@ namespace MWGui
{
WindowManager::WindowManager(
osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ResourceSystem* resourceSystem
, const std::string& logpath, const std::string& resourcePath, bool consoleOnlyScripts,
osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ResourceSystem* resourceSystem, SceneUtil::WorkQueue* workQueue,
const std::string& logpath, const std::string& resourcePath, bool consoleOnlyScripts,
Translation::Storage& translationDataStorage, ToUTF8::FromType encoding, bool exportFonts, const std::map<std::string, std::string>& fallbackMap, const std::string& versionDescription)
: mStore(NULL)
, mResourceSystem(resourceSystem)
, mWorkQueue(workQueue)
, mViewer(viewer)
, mConsoleOnlyScripts(consoleOnlyScripts)
, mCurrentModals()
@ -288,7 +291,7 @@ namespace MWGui
mRecharge = new Recharge();
mMenu = new MainMenu(w, h, mResourceSystem->getVFS(), mVersionDescription);
mLocalMapRender = new MWRender::LocalMap(mViewer->getSceneData()->asGroup());
mMap = new MapWindow(mCustomMarkers, mDragAndDrop, mLocalMapRender);
mMap = new MapWindow(mCustomMarkers, mDragAndDrop, mLocalMapRender, mWorkQueue);
trackWindow(mMap, "map");
mStatsWindow = new StatsWindow(mDragAndDrop);
trackWindow(mStatsWindow, "stats");
@ -376,7 +379,7 @@ namespace MWGui
void WindowManager::renderWorldMap()
{
mMap->renderGlobalMap(mLoadingScreen);
mMap->renderGlobalMap();
}
void WindowManager::setNewGame(bool newgame)

@ -9,6 +9,8 @@
#include <stack>
#include <osg/ref_ptr>
#include "../mwbase/windowmanager.hpp"
#include <components/settings/settings.hpp>
@ -57,6 +59,11 @@ namespace Resource
class ResourceSystem;
}
namespace SceneUtil
{
class WorkQueue;
}
namespace SDLUtil
{
class SDLCursorManager;
@ -119,7 +126,7 @@ namespace MWGui
typedef std::pair<std::string, int> Faction;
typedef std::vector<Faction> FactionList;
WindowManager(osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ResourceSystem* resourceSystem,
WindowManager(osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ResourceSystem* resourceSystem, SceneUtil::WorkQueue* workQueue,
const std::string& logpath, const std::string& cacheDir, bool consoleOnlyScripts,
Translation::Storage& translationDataStorage, ToUTF8::FromType encoding, bool exportFonts, const std::map<std::string,std::string>& fallbackMap, const std::string& versionDescription);
virtual ~WindowManager();
@ -382,6 +389,7 @@ namespace MWGui
private:
const MWWorld::ESMStore* mStore;
Resource::ResourceSystem* mResourceSystem;
osg::ref_ptr<SceneUtil::WorkQueue> mWorkQueue;
osgMyGUI::Platform* mGuiPlatform;
osgViewer::Viewer* mViewer;

@ -767,7 +767,7 @@ namespace MWMechanics
bool hasSummonEffect = false;
for (MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it)
if (it->first.mId >= ESM::MagicEffect::SummonScamp && it->first.mId <= ESM::MagicEffect::SummonStormAtronach)
if (isSummoningEffect(it->first.mId))
hasSummonEffect = true;
if (!creatureStats.getSummonedCreatureMap().empty() || !creatureStats.getSummonedCreatureGraveyard().empty() || hasSummonEffect)

@ -15,6 +15,8 @@
#include <components/settings/settings.hpp>
#include <components/files/memorystream.hpp>
#include <components/sceneutil/workqueue.hpp>
#include <components/esm/globalmap.hpp>
#include "../mwbase/environment.hpp"
@ -95,52 +97,16 @@ namespace
namespace MWRender
{
GlobalMap::GlobalMap(osg::Group* root)
: mRoot(root)
, mWidth(0)
, mHeight(0)
, mMinX(0), mMaxX(0)
, mMinY(0), mMaxY(0)
class CreateMapWorkItem : public SceneUtil::WorkItem
{
mCellSize = Settings::Manager::getInt("global map cell size", "Map");
}
GlobalMap::~GlobalMap()
public:
CreateMapWorkItem(int width, int height, int minX, int minY, int maxX, int maxY, int cellSize, const MWWorld::Store<ESM::Land>& landStore)
: mWidth(width), mHeight(height), mMinX(minX), mMinY(minY), mMaxX(maxX), mMaxY(maxY), mCellSize(cellSize), mLandStore(landStore)
{
for (CameraVector::iterator it = mCamerasPendingRemoval.begin(); it != mCamerasPendingRemoval.end(); ++it)
removeCamera(*it);
for (CameraVector::iterator it = mActiveCameras.begin(); it != mActiveCameras.end(); ++it)
removeCamera(*it);
}
void GlobalMap::render (Loading::Listener* loadingListener)
virtual void doWork()
{
const MWWorld::ESMStore &esmStore =
MWBase::Environment::get().getWorld()->getStore();
// get the size of the world
MWWorld::Store<ESM::Cell>::iterator it = esmStore.get<ESM::Cell>().extBegin();
for (; it != esmStore.get<ESM::Cell>().extEnd(); ++it)
{
if (it->getGridX() < mMinX)
mMinX = it->getGridX();
if (it->getGridX() > mMaxX)
mMaxX = it->getGridX();
if (it->getGridY() < mMinY)
mMinY = it->getGridY();
if (it->getGridY() > mMaxY)
mMaxY = it->getGridY();
}
mWidth = mCellSize*(mMaxX-mMinX+1);
mHeight = mCellSize*(mMaxY-mMinY+1);
loadingListener->loadingOn();
loadingListener->setLabel("Creating map");
loadingListener->setProgressRange((mMaxX-mMinX+1) * (mMaxY-mMinY+1));
loadingListener->setProgress(0);
osg::ref_ptr<osg::Image> image = new osg::Image;
image->allocateImage(mWidth, mHeight, 1, GL_RGB, GL_UNSIGNED_BYTE);
unsigned char* data = image->data();
@ -153,17 +119,7 @@ namespace MWRender
{
for (int y = mMinY; y <= mMaxY; ++y)
{
ESM::Land* land = esmStore.get<ESM::Land>().search (x,y);
if (land)
{
int mask = ESM::Land::DATA_WNAM;
if (!land->isDataLoaded(mask))
land->loadData(mask);
}
const ESM::Land::LandData *landData =
land ? land->getLandData (ESM::Land::DATA_WNAM) : 0;
const ESM::Land* land = mLandStore.search (x,y);
for (int cellY=0; cellY<mCellSize; ++cellY)
{
@ -178,8 +134,8 @@ namespace MWRender
unsigned char r,g,b;
float y2 = 0;
if (landData)
y2 = (landData->mWnam[vertexY * 9 + vertexX] << 4) / 2048.f;
if (land && (land->mDataTypes & ESM::Land::DATA_WNAM))
y2 = (land->mWnam[vertexY * 9 + vertexX] << 4) / 2048.f;
else
y2 = (SCHAR_MIN << 4) / 2048.f;
if (y2 < 0)
@ -217,9 +173,6 @@ namespace MWRender
alphaData[texelY * mWidth+ texelX] = (y2 < 0) ? static_cast<unsigned char>(0) : static_cast<unsigned char>(255);
}
}
loadingListener->increaseProgress();
if (land)
land->unloadData();
}
}
@ -239,9 +192,78 @@ namespace MWRender
mAlphaTexture->setImage(alphaImage);
mAlphaTexture->setResizeNonPowerOfTwoHint(false);
clear();
mOverlayImage = new osg::Image;
mOverlayImage->allocateImage(mWidth, mHeight, 1, GL_RGBA, GL_UNSIGNED_BYTE);
assert(mOverlayImage->isDataContiguous());
memset(mOverlayImage->data(), 0, mOverlayImage->getTotalSizeInBytes());
mOverlayTexture = new osg::Texture2D;
mOverlayTexture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
mOverlayTexture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
mOverlayTexture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
mOverlayTexture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
mOverlayTexture->setResizeNonPowerOfTwoHint(false);
mOverlayTexture->setInternalFormat(GL_RGBA);
mOverlayTexture->setTextureSize(mWidth, mHeight);
}
int mWidth, mHeight;
int mMinX, mMinY, mMaxX, mMaxY;
int mCellSize;
const MWWorld::Store<ESM::Land>& mLandStore;
osg::ref_ptr<osg::Texture2D> mBaseTexture;
osg::ref_ptr<osg::Texture2D> mAlphaTexture;
osg::ref_ptr<osg::Image> mOverlayImage;
osg::ref_ptr<osg::Texture2D> mOverlayTexture;
};
GlobalMap::GlobalMap(osg::Group* root, SceneUtil::WorkQueue* workQueue)
: mRoot(root)
, mWorkQueue(workQueue)
, mWidth(0)
, mHeight(0)
, mMinX(0), mMaxX(0)
, mMinY(0), mMaxY(0)
{
mCellSize = Settings::Manager::getInt("global map cell size", "Map");
}
GlobalMap::~GlobalMap()
{
for (CameraVector::iterator it = mCamerasPendingRemoval.begin(); it != mCamerasPendingRemoval.end(); ++it)
removeCamera(*it);
for (CameraVector::iterator it = mActiveCameras.begin(); it != mActiveCameras.end(); ++it)
removeCamera(*it);
}
void GlobalMap::render ()
{
const MWWorld::ESMStore &esmStore =
MWBase::Environment::get().getWorld()->getStore();
// get the size of the world
MWWorld::Store<ESM::Cell>::iterator it = esmStore.get<ESM::Cell>().extBegin();
for (; it != esmStore.get<ESM::Cell>().extEnd(); ++it)
{
if (it->getGridX() < mMinX)
mMinX = it->getGridX();
if (it->getGridX() > mMaxX)
mMaxX = it->getGridX();
if (it->getGridY() < mMinY)
mMinY = it->getGridY();
if (it->getGridY() > mMaxY)
mMaxY = it->getGridY();
}
mWidth = mCellSize*(mMaxX-mMinX+1);
mHeight = mCellSize*(mMaxY-mMinY+1);
loadingListener->loadingOff();
mWorkItem = new CreateMapWorkItem(mWidth, mHeight, mMinX, mMinY, mMaxX, mMaxY, mCellSize, esmStore.get<ESM::Land>());
mWorkQueue->addWorkItem(mWorkItem);
}
void GlobalMap::worldPosToImageSpace(float x, float z, float& imageX, float& imageY)
@ -346,6 +368,8 @@ namespace MWRender
void GlobalMap::exploreCell(int cellX, int cellY, osg::ref_ptr<osg::Texture2D> localMapTexture)
{
ensureLoaded();
if (!localMapTexture)
return;
@ -360,25 +384,9 @@ namespace MWRender
void GlobalMap::clear()
{
if (!mOverlayImage)
{
mOverlayImage = new osg::Image;
mOverlayImage->allocateImage(mWidth, mHeight, 1, GL_RGBA, GL_UNSIGNED_BYTE);
assert(mOverlayImage->isDataContiguous());
}
memset(mOverlayImage->data(), 0, mOverlayImage->getTotalSizeInBytes());
ensureLoaded();
if (!mOverlayTexture)
{
mOverlayTexture = new osg::Texture2D;
mOverlayTexture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
mOverlayTexture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
mOverlayTexture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
mOverlayTexture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
mOverlayTexture->setResizeNonPowerOfTwoHint(false);
mOverlayTexture->setInternalFormat(GL_RGBA);
mOverlayTexture->setTextureSize(mWidth, mHeight);
}
memset(mOverlayImage->data(), 0, mOverlayImage->getTotalSizeInBytes());
mPendingImageDest.clear();
@ -389,6 +397,8 @@ namespace MWRender
void GlobalMap::write(ESM::GlobalMap& map)
{
ensureLoaded();
map.mBounds.mMinX = mMinX;
map.mBounds.mMaxX = mMaxX;
map.mBounds.mMinY = mMinY;
@ -429,6 +439,8 @@ namespace MWRender
void GlobalMap::read(ESM::GlobalMap& map)
{
ensureLoaded();
const ESM::GlobalMap::Bounds& bounds = map.mBounds;
if (bounds.mMaxX-bounds.mMinX < 0)
@ -525,14 +537,33 @@ namespace MWRender
osg::ref_ptr<osg::Texture2D> GlobalMap::getBaseTexture()
{
ensureLoaded();
return mBaseTexture;
}
osg::ref_ptr<osg::Texture2D> GlobalMap::getOverlayTexture()
{
ensureLoaded();
return mOverlayTexture;
}
void GlobalMap::ensureLoaded()
{
if (mWorkItem)
{
mWorkItem->waitTillDone();
mOverlayImage = mWorkItem->mOverlayImage;
mBaseTexture = mWorkItem->mBaseTexture;
mAlphaTexture = mWorkItem->mAlphaTexture;
mOverlayTexture = mWorkItem->mOverlayTexture;
requestOverlayTextureUpdate(0, 0, mWidth, mHeight, osg::ref_ptr<osg::Texture2D>(), true, false);
mWorkItem = NULL;
}
}
void GlobalMap::markForRemoval(osg::Camera *camera)
{
CameraVector::iterator found = std::find(mActiveCameras.begin(), mActiveCameras.end(), camera);
@ -561,6 +592,7 @@ namespace MWRender
continue;
}
ensureLoaded();
mOverlayImage->copySubImage(imageDest.mX, imageDest.mY, 0, imageDest.mImage);
it = mPendingImageDest.erase(it);

@ -14,26 +14,28 @@ namespace osg
class Camera;
}
namespace Loading
namespace ESM
{
class Listener;
struct GlobalMap;
}
namespace ESM
namespace SceneUtil
{
struct GlobalMap;
class WorkQueue;
}
namespace MWRender
{
class CreateMapWorkItem;
class GlobalMap
{
public:
GlobalMap(osg::Group* root);
GlobalMap(osg::Group* root, SceneUtil::WorkQueue* workQueue);
~GlobalMap();
void render(Loading::Listener* loadingListener);
void render();
int getWidth() const { return mWidth; }
int getHeight() const { return mHeight; }
@ -69,6 +71,8 @@ namespace MWRender
osg::ref_ptr<osg::Texture2D> getBaseTexture();
osg::ref_ptr<osg::Texture2D> getOverlayTexture();
void ensureLoaded();
private:
/**
* Request rendering a 2d quad onto mOverlayTexture.
@ -116,6 +120,9 @@ namespace MWRender
// CPU copy of overlay
osg::ref_ptr<osg::Image> mOverlayImage;
osg::ref_ptr<SceneUtil::WorkQueue> mWorkQueue;
osg::ref_ptr<CreateMapWorkItem> mWorkItem;
int mWidth;
int mHeight;

@ -164,11 +164,12 @@ namespace MWRender
Resource::ResourceSystem* mResourceSystem;
};
RenderingManager::RenderingManager(osgViewer::Viewer* viewer, osg::ref_ptr<osg::Group> rootNode, Resource::ResourceSystem* resourceSystem,
RenderingManager::RenderingManager(osgViewer::Viewer* viewer, osg::ref_ptr<osg::Group> rootNode, Resource::ResourceSystem* resourceSystem, SceneUtil::WorkQueue* workQueue,
const Fallback::Map* fallback, const std::string& resourcePath)
: mViewer(viewer)
, mRootNode(rootNode)
, mResourceSystem(resourceSystem)
, mWorkQueue(workQueue)
, mUnrefQueue(new SceneUtil::UnrefQueue)
, mFogDepth(0.f)
, mUnderwaterColor(fallback->getFallbackColour("Water_UnderwaterColor"))
@ -179,11 +180,6 @@ namespace MWRender
, mFieldOfViewOverride(0.f)
, mFieldOfViewOverridden(false)
{
int numThreads = Settings::Manager::getInt("preload num threads", "Cells");
if (numThreads <= 0)
throw std::runtime_error("Invalid setting: 'preload num threads' must be >0");
mWorkQueue = new SceneUtil::WorkQueue(numThreads);
resourceSystem->getSceneManager()->setParticleSystemMask(MWRender::Mask_ParticleSystem);
resourceSystem->getSceneManager()->setShaderPath(resourcePath + "/shaders");
resourceSystem->getSceneManager()->setForceShaders(Settings::Manager::getBool("force shaders", "Shaders"));

@ -63,7 +63,7 @@ namespace MWRender
class RenderingManager : public MWRender::RenderingInterface
{
public:
RenderingManager(osgViewer::Viewer* viewer, osg::ref_ptr<osg::Group> rootNode, Resource::ResourceSystem* resourceSystem,
RenderingManager(osgViewer::Viewer* viewer, osg::ref_ptr<osg::Group> rootNode, Resource::ResourceSystem* resourceSystem, SceneUtil::WorkQueue* workQueue,
const Fallback::Map* fallback, const std::string& resourcePath);
~RenderingManager();

@ -43,7 +43,8 @@ namespace MWRender
{
const MWWorld::ESMStore &esmStore =
MWBase::Environment::get().getWorld()->getStore();
ESM::Land* land = esmStore.get<ESM::Land>().search(cellX, cellY);
const ESM::Land* land = esmStore.get<ESM::Land>().search(cellX, cellY);
if (!land)
return NULL;

@ -231,7 +231,7 @@ namespace MWWorld
if ((*iter)->getCell()->isExterior())
{
ESM::Land* land =
const ESM::Land* land =
MWBase::Environment::get().getWorld()->getStore().get<ESM::Land>().search(
(*iter)->getCell()->getGridX(),
(*iter)->getCell()->getGridY()
@ -270,7 +270,7 @@ namespace MWWorld
// Load terrain physics first...
if (cell->getCell()->isExterior())
{
ESM::Land* land =
const ESM::Land* land =
MWBase::Environment::get().getWorld()->getStore().get<ESM::Land>().search(
cell->getCell()->getGridX(),
cell->getCell()->getGridY()

@ -38,6 +38,12 @@ namespace
}
return x->mX < y->mX;
}
bool operator()(const ESM::Land *x, const std::pair<int, int>& y) {
if (x->mX == y.first) {
return x->mY < y.second;
}
return x->mX < y.first;
}
};
}
@ -436,22 +442,21 @@ namespace MWWorld
{
return iterator(mStatic.end());
}
ESM::Land *Store<ESM::Land>::search(int x, int y) const
const ESM::Land *Store<ESM::Land>::search(int x, int y) const
{
ESM::Land land;
land.mX = x, land.mY = y;
std::pair<int, int> comp(x,y);
std::vector<ESM::Land *>::const_iterator it =
std::lower_bound(mStatic.begin(), mStatic.end(), &land, Compare());
std::lower_bound(mStatic.begin(), mStatic.end(), comp, Compare());
if (it != mStatic.end() && (*it)->mX == x && (*it)->mY == y) {
return const_cast<ESM::Land *>(*it);
return *it;
}
return 0;
}
ESM::Land *Store<ESM::Land>::find(int x, int y) const
const ESM::Land *Store<ESM::Land>::find(int x, int y) const
{
ESM::Land *ptr = search(x, y);
const ESM::Land *ptr = search(x, y);
if (ptr == 0) {
std::ostringstream msg;
msg << "Land at (" << x << ", " << y << ") not found";

@ -242,8 +242,8 @@ namespace MWWorld
// Must be threadsafe! Called from terrain background loading threads.
// Not a big deal here, since ESM::Land can never be modified or inserted/erased
ESM::Land *search(int x, int y) const;
ESM::Land *find(int x, int y) const;
const ESM::Land *search(int x, int y) const;
const ESM::Land *find(int x, int y) const;
RecordId load(ESM::ESMReader &esm);
void setUp();

@ -148,7 +148,7 @@ namespace MWWorld
World::World (
osgViewer::Viewer* viewer,
osg::ref_ptr<osg::Group> rootNode,
Resource::ResourceSystem* resourceSystem,
Resource::ResourceSystem* resourceSystem, SceneUtil::WorkQueue* workQueue,
const Files::Collections& fileCollections,
const std::vector<std::string>& contentFiles,
ToUTF8::Utf8Encoder* encoder, const std::map<std::string,std::string>& fallbackMap,
@ -162,7 +162,7 @@ namespace MWWorld
mLevitationEnabled(true), mGoToJail(false), mDaysInPrison(0)
{
mPhysics = new MWPhysics::PhysicsSystem(resourceSystem, rootNode);
mRendering = new MWRender::RenderingManager(viewer, rootNode, resourceSystem, &mFallback, resourcePath);
mRendering = new MWRender::RenderingManager(viewer, rootNode, resourceSystem, workQueue, &mFallback, resourcePath);
mProjectileManager.reset(new ProjectileManager(mRendering->getLightRoot(), resourceSystem, mRendering, mPhysics));
mRendering->preloadCommonAssets();

@ -34,6 +34,11 @@ namespace Resource
class ResourceSystem;
}
namespace SceneUtil
{
class WorkQueue;
}
namespace ESM
{
struct Position;
@ -180,7 +185,7 @@ namespace MWWorld
World (
osgViewer::Viewer* viewer,
osg::ref_ptr<osg::Group> rootNode,
Resource::ResourceSystem* resourceSystem,
Resource::ResourceSystem* resourceSystem, SceneUtil::WorkQueue* workQueue,
const Files::Collections& fileCollections,
const std::vector<std::string>& contentFiles,
ToUTF8::Utf8Encoder* encoder, const std::map<std::string,std::string>& fallbackMap,

@ -12,51 +12,6 @@ namespace ESM
{
unsigned int Land::sRecordId = REC_LAND;
void Land::LandData::save(ESMWriter &esm) const
{
if (mDataTypes & Land::DATA_VNML) {
esm.writeHNT("VNML", mNormals, sizeof(mNormals));
}
if (mDataTypes & Land::DATA_VHGT) {
VHGT offsets;
offsets.mHeightOffset = mHeights[0] / HEIGHT_SCALE;
offsets.mUnk1 = mUnk1;
offsets.mUnk2 = mUnk2;
float prevY = mHeights[0];
int number = 0; // avoid multiplication
for (int i = 0; i < LAND_SIZE; ++i) {
float diff = (mHeights[number] - prevY) / HEIGHT_SCALE;
offsets.mHeightData[number] =
(diff >= 0) ? (int8_t) (diff + 0.5) : (int8_t) (diff - 0.5);
float prevX = prevY = mHeights[number];
++number;
for (int j = 1; j < LAND_SIZE; ++j) {
diff = (mHeights[number] - prevX) / HEIGHT_SCALE;
offsets.mHeightData[number] =
(diff >= 0) ? (int8_t) (diff + 0.5) : (int8_t) (diff - 0.5);
prevX = mHeights[number];
++number;
}
}
esm.writeHNT("VHGT", offsets, sizeof(VHGT));
}
if (mDataTypes & Land::DATA_WNAM) {
esm.writeHNT("WNAM", mWnam, 81);
}
if (mDataTypes & Land::DATA_VCLR) {
esm.writeHNT("VCLR", mColours, 3*LAND_NUM_VERTS);
}
if (mDataTypes & Land::DATA_VTEX) {
uint16_t vtex[LAND_NUM_TEXTURES];
transposeTextureData(mTextures, vtex);
esm.writeHNT("VTEX", vtex, sizeof(vtex));
}
}
Land::Land()
: mFlags(0)
, mX(0)
@ -68,7 +23,7 @@ namespace ESM
{
}
void Land::LandData::transposeTextureData(const uint16_t *in, uint16_t *out)
void transposeTextureData(const uint16_t *in, uint16_t *out)
{
int readPos = 0; //bit ugly, but it works
for ( int y1 = 0; y1 < 4; y1++ )
@ -121,6 +76,9 @@ namespace ESM
mContext = esm.getContext();
mDataLoaded = 0;
mLandData = NULL;
// Skip the land data here. Load it when the cell is loaded.
while (esm.hasMoreSubs())
{
@ -136,7 +94,7 @@ namespace ESM
mDataTypes |= DATA_VHGT;
break;
case ESM::FourCC<'W','N','A','M'>::value:
esm.skipHSub();
esm.getHExact(mWnam, sizeof(mWnam));
mDataTypes |= DATA_WNAM;
break;
case ESM::FourCC<'V','C','L','R'>::value:
@ -152,9 +110,6 @@ namespace ESM
break;
}
}
mDataLoaded = 0;
mLandData = NULL;
}
void Land::save(ESMWriter &esm, bool isDeleted) const
@ -174,9 +129,55 @@ namespace ESM
if (mLandData)
{
mLandData->save(esm);
if (mDataTypes & Land::DATA_VNML) {
esm.writeHNT("VNML", mLandData->mNormals, sizeof(mLandData->mNormals));
}
if (mDataTypes & Land::DATA_VHGT) {
VHGT offsets;
offsets.mHeightOffset = mLandData->mHeights[0] / HEIGHT_SCALE;
offsets.mUnk1 = mLandData->mUnk1;
offsets.mUnk2 = mLandData->mUnk2;
float prevY = mLandData->mHeights[0];
int number = 0; // avoid multiplication
for (int i = 0; i < LAND_SIZE; ++i) {
float diff = (mLandData->mHeights[number] - prevY) / HEIGHT_SCALE;
offsets.mHeightData[number] =
(diff >= 0) ? (int8_t) (diff + 0.5) : (int8_t) (diff - 0.5);
float prevX = prevY = mLandData->mHeights[number];
++number;
for (int j = 1; j < LAND_SIZE; ++j) {
diff = (mLandData->mHeights[number] - prevX) / HEIGHT_SCALE;
offsets.mHeightData[number] =
(diff >= 0) ? (int8_t) (diff + 0.5) : (int8_t) (diff - 0.5);
prevX = mLandData->mHeights[number];
++number;
}
}
esm.writeHNT("VHGT", offsets, sizeof(VHGT));
}
}
if (mDataTypes & Land::DATA_WNAM) {
esm.writeHNT("WNAM", mWnam, 81);
}
if (mLandData)
{
if (mDataTypes & Land::DATA_VCLR) {
esm.writeHNT("VCLR", mLandData->mColours, 3*LAND_NUM_VERTS);
}
if (mDataTypes & Land::DATA_VTEX) {
uint16_t vtex[LAND_NUM_TEXTURES];
transposeTextureData(mLandData->mTextures, vtex);
esm.writeHNT("VTEX", vtex, sizeof(vtex));
}
}
}
void Land::loadData(int flags) const
{
@ -191,7 +192,6 @@ namespace ESM
// Create storage if nothing is loaded
if (mLandData == NULL) {
mLandData = new LandData;
mLandData->mDataTypes = mDataTypes;
}
ESM::ESMReader reader;
@ -221,20 +221,20 @@ namespace ESM
}
}
if (reader.isNextSub("WNAM")) {
condLoad(reader, flags, DATA_WNAM, mLandData->mWnam, 81);
}
if (reader.isNextSub("WNAM"))
reader.skipHSub();
if (reader.isNextSub("VCLR"))
condLoad(reader, flags, DATA_VCLR, mLandData->mColours, 3 * LAND_NUM_VERTS);
if (reader.isNextSub("VTEX")) {
uint16_t vtex[LAND_NUM_TEXTURES];
if (condLoad(reader, flags, DATA_VTEX, vtex, sizeof(vtex))) {
LandData::transposeTextureData(vtex, mLandData->mTextures);
transposeTextureData(vtex, mLandData->mTextures);
}
}
}
void Land::unloadData()
void Land::unloadData() const
{
if (mDataLoaded)
{

@ -96,20 +96,14 @@ struct Land
// 24-bit RGB color for each vertex
unsigned char mColours[3 * LAND_NUM_VERTS];
// DataTypes available in this LandData, accessing data that is not available is an undefined operation
int mDataTypes;
// low-LOD heightmap (used for rendering the global map)
signed char mWnam[81];
// ???
short mUnk1;
uint8_t mUnk2;
void save(ESMWriter &esm) const;
static void transposeTextureData(const uint16_t *in, uint16_t *out);
};
// low-LOD heightmap (used for rendering the global map)
signed char mWnam[81];
void load(ESMReader &esm, bool &isDeleted);
void save(ESMWriter &esm, bool isDeleted = false) const;
@ -123,7 +117,7 @@ struct Land
/**
* Frees memory allocated for land data
*/
void unloadData();
void unloadData() const;
/// Check if given data type is loaded
/// @note We only check data types that *can* be loaded (present in mDataTypes)

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Window_NoCaption" layer="Windows" position="0 0 588 444" name="_Main">
<Widget type="Window" skin="MW_Window_NoCaption" layer="Windows" align="Center" position="0 0 588 444" name="_Main">
<Property key="MinSize" value="425 360"/>
<!-- Name -->

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 527 378" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 527 378" align="Center" name="_Main">
<!-- Birthsign list -->
<Widget type="ListBox" skin="MW_List" position="8 8 232 137" name="BirthsignList"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 491 316" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 491 316" align="Center" name="_Main">
<!-- Class list -->
<Widget type="ListBox" skin="MW_List" position="8 8 194 138" name="ClassList"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 244 248" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 244 248" align="Center" name="_Main">
<!-- Edit box -->
<Widget type="Widget" skin="MW_Box" position="8 8 220 192" align="Stretch" name="Client"/>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 498 198" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 498 198" align="Center" name="_Main">
<!-- Class name -->
<Widget type="TextBox" skin="NormalText" position="8 8 52 23" name="LabelT" align="Left Top">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 289 256" name="_Main">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 289 256" align="Center" name="_Main">
<Property key="AutoResize" value="true"/>
<Property key="Padding" value="12"/>
<Property key="Spacing" value="8"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 588 433" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 588 433" align="Center" name="_Main">
<!-- Appearance -->
<Widget type="TextBox" skin="HeaderText" position="8 16 241 18" name="AppearanceT" align="Left Top">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 541 428" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 541 428" align="Center" name="_Main">
<!-- Player Name, Race, Class and Birthsign -->
<Widget type="Widget" skin="MW_Box" position="8 8 265 126">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 217 234" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 217 234" align="Center" name="_Main">
<Widget type="Widget" skin="" position="14 14 186 203" align="Stretch">
<!-- Label -->

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 477 270" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 477 270" align="Center" name="_Main">
<Widget type="Widget" skin="" position="17 14 447 239" align="Stretch">
<!-- Label -->

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<!-- correct size is 247 144, adjust when skin is changed to a dialog -->
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 247 144" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 247 144" align="Center" name="_Main">
<Widget type="Widget" skin="" position="14 14 216 113" align="Stretch">
<!-- Label -->

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 300 130" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 300 130" align="Center" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="EditBox" skin="MW_TextEditClient" position="16 8 268 130" name="Message" align="Center Top">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="Window" skin="MW_Dialog" position="0 0 600 128" layer="Windows" name="_Main">
<Widget type="Window" skin="MW_Dialog" position="0 0 600 128" align="Center" layer="Windows" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="4 4 592 24" align="Left Top HStretch" name="LabelText">
<Property key="TextAlign" value="Center"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 362 310" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 362 310" align="Center" name="_Main">
<Widget type="ImageBox" skin="ImageBox" position="8 12 16 16" name="EffectImage">
</Widget>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 336 242" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 336 242" align="Center" name="_Main">
<Widget type="AutoSizedTextBox" skin="SandText" position="13 13 200 16">
<Property key="Caption" value="#{sEditNote}"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 560 400" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 560 400" align="Center" name="_Main">
<Widget type="HBox" position="12 12 250 30">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 545 265" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 545 265" align="Center" name="_Main">
<!-- Edit box -->
<Widget type="Widget" skin="" position="14 14 516 70" name="TextBox" align="Top HCenter">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="MessageBox" position="0 0 500 400" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="MessageBox" position="0 0 500 400" align="Center" name="_Main">
<Widget type="EditBox" skin="MW_TextEditClient" position="10 10 490 20" align="Left Top Stretch" name="message">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Center"/>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" position="0 0 380 285" layer="Windows" name="_Main">
<Widget type="Window" skin="MW_Dialog" position="0 0 380 285" layer="Windows" align="Center" name="_Main">
<Widget type="TextBox" skin="SandText" position="8 8 300 18" name="Label"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Widget" skin="MW_Dialog" layer="LoadingScreen" position="0 0 300 48" name="_Main">
<Widget type="Widget" skin="MW_Dialog" layer="LoadingScreen" position="0 0 300 48" align="Center" name="_Main">
<Widget type="TextBox" skin="SandText" position="20 8 260 18" align="Stretch" name="LoadingText">
<Property key="TextAlign" value="Center"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 0 0" name="_Main">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 0 0" align="Center" name="_Main">
<Property key="Padding" value="12"/>
<Property key="Spacing" value="8"/>
<Property key="AutoResize" value="true"/>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" position="0 0 330 370" layer="Windows" name="_Main">
<Widget type="Window" skin="MW_Dialog" position="0 0 330 370" layer="Windows" align="Center" name="_Main">
<Widget type="TextBox" skin="SandText" position="8 8 292 24">
<Property key="Caption" value="#{sMagicSelectTitle}"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 418 248" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 418 248" align="Center" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="8 18 418 24" align="Right Top">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 220 192" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 220 192" align="Center" name="_Main">
<Widget type="TextBox" skin="NormalText" position="0 4 220 24">
<Property key="Caption" value="#{sPersuasionMenuTitle}"/>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" position="0 0 370 230" layer="Windows" name="_Main">
<Widget type="Window" skin="MW_Dialog" position="0 0 370 230" layer="Windows" align="Center" name="_Main">
<Widget type="TextBox" skin="SandText" position="8 8 354 18">
<Property key="Caption" value="#{sQuickMenuTitle}"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 329 253" name="_Main">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 329 253" align="Center" name="_Main">
<Property key="Padding" value="12"/>
<Property key="Spacing" value="8"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 329 253" name="_Main">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 329 253" align="Center" name="_Main">
<Property key="Padding" value="12"/>
<Property key="Spacing" value="8"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 600 400" name="_Main">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 600 400" align="Center" name="_Main">
<Property key="Padding" value="12"/>
<Property key="Spacing" value="8"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 306" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 306" align="Center" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="8 10 450 18" align="Right Top">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 560 394" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 560 394" align="Center" name="_Main">
<Widget type="HBox" position="12 12 250 30">
<Widget type="AutoSizedTextBox" skin="NormalText">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 320 97" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 320 97" align="Center" name="_Main">
<!-- Appearance -->
<Widget type="TextBox" skin="ProgressText" position="6 6 300 18" name="LabelT" align="Left Top">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 319 200" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 319 200" align="Center" name="_Main">
<Widget type="TextBox" skin="NormalText" position="0 5 319 24" name="Select" align="Right Top">
<Property key="TextAlign" value="Center"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 304" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 304" align="Center" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="8 10 24 24" name="Select" align="Right Top">

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 600 200" name="_Main">
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 600 200" align="Center" name="_Main">
<Property key="Padding" value="12"/>
<Property key="Spacing" value="8"/>
<Property key="AutoResize" value="true"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 219 40" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 219 40" align="Center" name="_Main">
<Widget type="ProgressBar" skin="MW_Progress_Blue" position="5 6 199 20" name="ProgressBar">
<Widget type="TextBox" skin="SandText" position="0 0 199 20" name="ProgressText">

Loading…
Cancel
Save