OpenMW
|
Main engine class, that brings together all the components of OpenMW. More...
#include <engine.hpp>
Public Member Functions | |
Engine (Files::ConfigurationManager &configurationManager) | |
virtual | ~Engine () |
void | enableFSStrict (bool fsStrict) |
void | setDataDirs (const Files::PathContainer &dataDirs) |
Set data dirs. | |
void | addArchive (const std::string &archive) |
Add BSA archive. | |
void | setResourceDir (const boost::filesystem::path &parResDir) |
Set resource dir. | |
void | setCell (const std::string &cellName) |
Set start cell name (only interiors for now) | |
void | addContentFile (const std::string &file) |
addContentFile - Adds content file (ie. esm/esp, or omwgame/omwaddon) to the content files container. | |
void | showFPS (int level) |
Enable fps counter. | |
void | setScriptsVerbosity (bool scriptsVerbosity) |
Enable or disable verbose script output. | |
void | setSoundUsage (bool soundUsage) |
Disable or enable all sounds. | |
void | setNewGame (bool newGame) |
Start as a new game. | |
void | setGrabMouse (bool grab) |
void | go () |
Initialise and enter main loop. | |
void | activate () |
Activate the focussed object. | |
void | screenshot () |
Write screenshot to file. | |
void | setCompileAll (bool all) |
Compile all scripts (excludign dialogue scripts) at startup? | |
void | setEncoding (const ToUTF8::FromType &encoding) |
Font encoding. | |
void | setFallbackValues (std::map< std::string, std::string > map) |
void | setScriptConsoleMode (bool enabled) |
Enable console-only script functionality. | |
void | setStartupScript (const std::string &path) |
Set path for a script that is run on startup in the console. | |
void | setActivationDistanceOverride (int distance) |
Override the game setting specified activation distance. | |
Private Member Functions | |
Engine (const Engine &) | |
Engine & | operator= (const Engine &) |
void | addResourcesDirectory (const boost::filesystem::path &path) |
void | addZipResource (const boost::filesystem::path &path) |
add a .zip resource | |
void | loadBSA () |
Load BSA files. | |
void | executeLocalScripts () |
virtual bool | frameRenderingQueued (const Ogre::FrameEvent &evt) |
virtual bool | frameStarted (const Ogre::FrameEvent &evt) |
std::string | loadSettings (Settings::Manager &settings) |
Load settings from various files, returns the path to the user settings file. | |
void | prepareEngine (Settings::Manager &settings) |
Prepare engine for game play. | |
Private Attributes | |
MWBase::Environment | mEnvironment |
ToUTF8::FromType | mEncoding |
ToUTF8::Utf8Encoder * | mEncoder |
Files::PathContainer | mDataDirs |
std::vector< std::string > | mArchives |
boost::filesystem::path | mResDir |
OEngine::Render::OgreRenderer * | mOgre |
std::string | mCellName |
std::vector< std::string > | mContentFiles |
int | mFpsLevel |
bool | mVerboseScripts |
bool | mNewGame |
bool | mUseSound |
bool | mCompileAll |
std::string | mFocusName |
std::map< std::string, std::string > | mFallbackMap |
bool | mScriptConsoleMode |
std::string | mStartupScript |
int | mActivationDistanceOverride |
bool | mGrab |
Compiler::Extensions | mExtensions |
Compiler::Context * | mScriptContext |
Files::Collections | mFileCollections |
bool | mFSStrict |
Translation::Storage | mTranslationDataStorage |
Files::ConfigurationManager & | mCfgMgr |
Main engine class, that brings together all the components of OpenMW.
OMW::Engine::Engine | ( | const Engine & | ) | [private] |
OMW::Engine::Engine | ( | Files::ConfigurationManager & | configurationManager | ) |
OMW::Engine::~Engine | ( | ) | [virtual] |
void OMW::Engine::activate | ( | ) |
Activate the focussed object.
void OMW::Engine::addArchive | ( | const std::string & | archive | ) |
Add BSA archive.
void OMW::Engine::addContentFile | ( | const std::string & | file | ) |
addContentFile - Adds content file (ie. esm/esp, or omwgame/omwaddon) to the content files container.
file | - filename (extension is required) |
void OMW::Engine::addResourcesDirectory | ( | const boost::filesystem::path & | path | ) | [private] |
add resources directory
void OMW::Engine::addZipResource | ( | const boost::filesystem::path & | path | ) | [private] |
add a .zip resource
void OMW::Engine::enableFSStrict | ( | bool | fsStrict | ) |
Enable strict filesystem mode (do not fold case)
void OMW::Engine::executeLocalScripts | ( | ) | [private] |
bool OMW::Engine::frameRenderingQueued | ( | const Ogre::FrameEvent & | evt | ) | [private, virtual] |
bool OMW::Engine::frameStarted | ( | const Ogre::FrameEvent & | evt | ) | [private, virtual] |
void OMW::Engine::go | ( | ) |
Initialise and enter main loop.
void OMW::Engine::loadBSA | ( | ) | [private] |
Load BSA files.
std::string OMW::Engine::loadSettings | ( | Settings::Manager & | settings | ) | [private] |
Load settings from various files, returns the path to the user settings file.
void OMW::Engine::prepareEngine | ( | Settings::Manager & | settings | ) | [private] |
Prepare engine for game play.
void OMW::Engine::screenshot | ( | ) |
Write screenshot to file.
void OMW::Engine::setActivationDistanceOverride | ( | int | distance | ) |
Override the game setting specified activation distance.
void OMW::Engine::setCell | ( | const std::string & | cellName | ) |
Set start cell name (only interiors for now)
void OMW::Engine::setCompileAll | ( | bool | all | ) |
Compile all scripts (excludign dialogue scripts) at startup?
void OMW::Engine::setDataDirs | ( | const Files::PathContainer & | dataDirs | ) |
Set data dirs.
void OMW::Engine::setEncoding | ( | const ToUTF8::FromType & | encoding | ) |
Font encoding.
void OMW::Engine::setFallbackValues | ( | std::map< std::string, std::string > | map | ) |
void OMW::Engine::setGrabMouse | ( | bool | grab | ) | [inline] |
void OMW::Engine::setNewGame | ( | bool | newGame | ) |
Start as a new game.
void OMW::Engine::setResourceDir | ( | const boost::filesystem::path & | parResDir | ) |
Set resource dir.
void OMW::Engine::setScriptConsoleMode | ( | bool | enabled | ) |
Enable console-only script functionality.
void OMW::Engine::setScriptsVerbosity | ( | bool | scriptsVerbosity | ) |
Enable or disable verbose script output.
void OMW::Engine::setSoundUsage | ( | bool | soundUsage | ) |
Disable or enable all sounds.
void OMW::Engine::setStartupScript | ( | const std::string & | path | ) |
Set path for a script that is run on startup in the console.
void OMW::Engine::showFPS | ( | int | level | ) |
Enable fps counter.
int OMW::Engine::mActivationDistanceOverride [private] |
std::vector<std::string> OMW::Engine::mArchives [private] |
std::string OMW::Engine::mCellName [private] |
Files::ConfigurationManager& OMW::Engine::mCfgMgr [private] |
bool OMW::Engine::mCompileAll [private] |
std::vector<std::string> OMW::Engine::mContentFiles [private] |
Files::PathContainer OMW::Engine::mDataDirs [private] |
ToUTF8::Utf8Encoder* OMW::Engine::mEncoder [private] |
ToUTF8::FromType OMW::Engine::mEncoding [private] |
MWBase::Environment OMW::Engine::mEnvironment [private] |
Compiler::Extensions OMW::Engine::mExtensions [private] |
std::map<std::string,std::string> OMW::Engine::mFallbackMap [private] |
std::string OMW::Engine::mFocusName [private] |
int OMW::Engine::mFpsLevel [private] |
bool OMW::Engine::mFSStrict [private] |
bool OMW::Engine::mGrab [private] |
bool OMW::Engine::mNewGame [private] |
OEngine::Render::OgreRenderer* OMW::Engine::mOgre [private] |
boost::filesystem::path OMW::Engine::mResDir [private] |
bool OMW::Engine::mScriptConsoleMode [private] |
Compiler::Context* OMW::Engine::mScriptContext [private] |
std::string OMW::Engine::mStartupScript [private] |
bool OMW::Engine::mUseSound [private] |
bool OMW::Engine::mVerboseScripts [private] |