mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 21:40:11 +00:00
removed world exit methods
This commit is contained in:
parent
f72956b918
commit
44ff31b50a
@ -116,7 +116,7 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
|||||||
std::cerr << "Error in framelistener: " << e.what() << std::endl;
|
std::cerr << "Error in framelistener: " << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return !MWBase::Environment::get().getWorld()->getExitNow();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
||||||
|
@ -248,9 +248,6 @@ namespace MWBase
|
|||||||
|
|
||||||
virtual bool isSwimming(const MWWorld::Ptr &object) = 0;
|
virtual bool isSwimming(const MWWorld::Ptr &object) = 0;
|
||||||
virtual bool isUnderwater(const ESM::Cell &cell, const Ogre::Vector3 &pos) = 0;
|
virtual bool isUnderwater(const ESM::Cell &cell, const Ogre::Vector3 &pos) = 0;
|
||||||
|
|
||||||
virtual void exitNow() = 0; ///< exit after this frame has ended
|
|
||||||
virtual bool getExitNow() = 0; ///< @return true if the application should exit
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include "mainmenu.hpp"
|
#include "mainmenu.hpp"
|
||||||
|
|
||||||
|
#include <OgreRoot.h>
|
||||||
|
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
|
||||||
@ -69,7 +72,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void MainMenu::exitGame(MyGUI::Widget* sender)
|
void MainMenu::exitGame(MyGUI::Widget* sender)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWorld ()->exitNow();
|
Ogre::Root::getSingleton ().queueEndRendering ();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "inputmanager.hpp"
|
#include "inputmanager.hpp"
|
||||||
|
|
||||||
|
#include <OgreRoot.h>
|
||||||
|
|
||||||
#include <openengine/input/dispatcher.hpp>
|
#include <openengine/input/dispatcher.hpp>
|
||||||
#include <openengine/input/poller.hpp>
|
#include <openengine/input/poller.hpp>
|
||||||
|
|
||||||
@ -222,7 +224,7 @@ private:
|
|||||||
void exitNow()
|
void exitNow()
|
||||||
{
|
{
|
||||||
if(!windows.isGuiMode())
|
if(!windows.isGuiMode())
|
||||||
MWBase::Environment::get().getWorld()->exitNow();
|
Ogre::Root::getSingleton().queueEndRendering ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -170,7 +170,7 @@ namespace MWWorld
|
|||||||
const std::string& encoding, std::map<std::string,std::string> fallbackMap)
|
const std::string& encoding, std::map<std::string,std::string> fallbackMap)
|
||||||
: mPlayer (0), mLocalScripts (mStore), mGlobalVariables (0),
|
: mPlayer (0), mLocalScripts (mStore), mGlobalVariables (0),
|
||||||
mSky (true), mNextDynamicRecord (0), mCells (mStore, mEsm),
|
mSky (true), mNextDynamicRecord (0), mCells (mStore, mEsm),
|
||||||
mNumFacing(0), mExit(false)
|
mNumFacing(0)
|
||||||
{
|
{
|
||||||
mPhysics = new PhysicsSystem(renderer);
|
mPhysics = new PhysicsSystem(renderer);
|
||||||
mPhysEngine = mPhysics->getEngine();
|
mPhysEngine = mPhysics->getEngine();
|
||||||
@ -1148,14 +1148,4 @@ namespace MWWorld
|
|||||||
return pos.z < cell.water;
|
return pos.z < cell.water;
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::exitNow()
|
|
||||||
{
|
|
||||||
mExit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool World::getExitNow()
|
|
||||||
{
|
|
||||||
return mExit;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -277,9 +277,6 @@ namespace MWWorld
|
|||||||
virtual bool isSwimming(const MWWorld::Ptr &object);
|
virtual bool isSwimming(const MWWorld::Ptr &object);
|
||||||
virtual bool isUnderwater(const ESM::Cell &cell, const Ogre::Vector3 &pos);
|
virtual bool isUnderwater(const ESM::Cell &cell, const Ogre::Vector3 &pos);
|
||||||
|
|
||||||
virtual void exitNow(); ///< exit after this frame has ended
|
|
||||||
virtual bool getExitNow(); ///< @return true if the application should exit
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user