From 97e4f698a7826ac4347ac8e8310e9b7b0a1034f5 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Mon, 1 Aug 2011 04:11:50 +0200 Subject: [PATCH] World::World looks good for now, cutting down World::Scene; still the to_utf8 error --- apps/openmw/mwworld/world.cpp | 29 +---------------------------- apps/openmw/mwworld/world.hpp | 14 +------------- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/apps/openmw/mwworld/world.cpp b/apps/openmw/mwworld/world.cpp index 00d1cc6315..d7963439ae 100644 --- a/apps/openmw/mwworld/world.cpp +++ b/apps/openmw/mwworld/world.cpp @@ -264,28 +264,6 @@ namespace MWWorld } } - void World::unloadCell (CellRenderCollection::iterator iter) - { - return mWorldScene->unloadCell(iter); - } - - void World::loadCell (Ptr::CellStore *cell, MWRender::CellRender *render) - { - return mWorldScene->loadCell(cell, render); - } - - void World::playerCellChange (Ptr::CellStore *cell, const ESM::Position& position, - bool adjustPlayerPos) - { - if (adjustPlayerPos) - mPlayer->setPos (position.pos[0], position.pos[1], position.pos[2], false); - - mPlayer->setCell (cell); - // TODO orientation - mEnvironment.mMechanicsManager->addActor (mPlayer->getPlayer()); - mEnvironment.mMechanicsManager->watchActor (mPlayer->getPlayer()); - } - void World::adjustSky() { @@ -297,11 +275,6 @@ namespace MWWorld } } - void World::changeCell (int X, int Y, const ESM::Position& position, bool adjustPlayerPos) - { - mWorldScene->changeCell(X, Y, position, adjustPlayerPos); - } - World::World (OEngine::Render::OgreRenderer& renderer, OEngine::Physic::PhysicEngine* physEng, const Files::Collections& fileCollections, const std::string& master, const boost::filesystem::path& resDir, @@ -662,7 +635,7 @@ namespace MWWorld if (currentCell->cell->data.gridX!=cellX || currentCell->cell->data.gridY!=cellY) { - changeCell (cellX, cellY, mPlayer->getPlayer().getCellRef().pos, false); + mWorldScene->changeCell (cellX, cellY, mPlayer->getPlayer().getCellRef().pos, false); } } diff --git a/apps/openmw/mwworld/world.hpp b/apps/openmw/mwworld/world.hpp index d0ae535ca6..cb0ab87f50 100644 --- a/apps/openmw/mwworld/world.hpp +++ b/apps/openmw/mwworld/world.hpp @@ -71,8 +71,6 @@ namespace MWWorld MWWorld::Player *mPlayer; ESM::ESMReader mEsm; ESMS::ESMStore mStore; - std::map mInteriors; - std::map, Ptr::CellStore> mExteriors; ScriptList mLocalScripts; MWWorld::Globals *mGlobalVariables; bool mSky; @@ -94,17 +92,7 @@ namespace MWWorld int getDaysPerMonth (int month) const; void removeScripts (Ptr::CellStore *cell); - - void unloadCell (CellRenderCollection::iterator iter); - - void loadCell (Ptr::CellStore *cell, MWRender::CellRender *render); - - void playerCellChange (Ptr::CellStore *cell, const ESM::Position& position, - bool adjustPlayerPos = true); - - void changeCell (int X, int Y, const ESM::Position& position, bool adjustPlayerPos); - ///< Move from exterior to interior or from interior cell to a different - /// interior cell. + public: World (OEngine::Render::OgreRenderer& renderer, OEngine::Physic::PhysicEngine* physEng,