OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OMW::Engine Class Reference

Main engine class, that brings together all the components of OpenMW. More...

#include <engine.hpp>

Collaboration diagram for OMW::Engine:

Public Member Functions

 Engine (Files::ConfigurationManager &configurationManager)
 
virtual ~Engine ()
 
void enableFSStrict (bool fsStrict)
 
void setDataDirs (const Files::PathContainer &dataDirs)
 Set data dirs. More...
 
void addArchive (const std::string &archive)
 Add BSA archive. More...
 
void setResourceDir (const boost::filesystem::path &parResDir)
 Set resource dir. More...
 
void setCell (const std::string &cellName)
 Set start cell name (only interiors for now) More...
 
void addContentFile (const std::string &file)
 addContentFile - Adds content file (ie. esm/esp, or omwgame/omwaddon) to the content files container. More...
 
void setScriptsVerbosity (bool scriptsVerbosity)
 Enable or disable verbose script output. More...
 
void setSoundUsage (bool soundUsage)
 Disable or enable all sounds. More...
 
void setSkipMenu (bool skipMenu, bool newGame)
 
void setGrabMouse (bool grab)
 
void go ()
 Initialise and enter main loop. More...
 
void setCompileAll (bool all)
 Compile all scripts (excludign dialogue scripts) at startup? More...
 
void setCompileAllDialogue (bool all)
 Compile all dialogue scripts at startup? More...
 
void setEncoding (const ToUTF8::FromType &encoding)
 Font encoding. More...
 
void setFallbackValues (std::map< std::string, std::string > map)
 
void setScriptConsoleMode (bool enabled)
 Enable console-only script functionality. More...
 
void setStartupScript (const std::string &path)
 Set path for a script that is run on startup in the console. More...
 
void setActivationDistanceOverride (int distance)
 Override the game setting specified activation distance. More...
 
void setWarningsMode (int mode)
 
void setScriptBlacklist (const std::vector< std::string > &list)
 
void setScriptBlacklistUse (bool use)
 
void enableFontExport (bool exportFonts)
 
void setSaveGameFile (const std::string &savegame)
 Set the save game file to load after initialising the engine. More...
 

Private Member Functions

 Engine (const Engine &)
 
Engineoperator= (const Engine &)
 
void executeLocalScripts ()
 
void frame (float dt)
 
std::string loadSettings (Settings::Manager &settings)
 Load settings from various files, returns the path to the user settings file. More...
 
void prepareEngine (Settings::Manager &settings)
 Prepare engine for game play. More...
 
void createWindow (Settings::Manager &settings)
 
void setWindowIcon ()
 

Private Attributes

SDL_Window * mWindow
 
std::auto_ptr< VFS::ManagermVFS
 
std::auto_ptr
< Resource::ResourceSystem
mResourceSystem
 
MWBase::Environment mEnvironment
 
ToUTF8::FromType mEncoding
 
ToUTF8::Utf8EncodermEncoder
 
Files::PathContainer mDataDirs
 
std::vector< std::string > mArchives
 
boost::filesystem::path mResDir
 
osg::ref_ptr< osgViewer::Viewer > mViewer
 
osg::ref_ptr
< osgViewer::ScreenCaptureHandler > 
mScreenCaptureHandler
 
std::string mCellName
 
std::vector< std::string > mContentFiles
 
bool mVerboseScripts
 
bool mSkipMenu
 
bool mUseSound
 
bool mCompileAll
 
bool mCompileAllDialogue
 
int mWarningsMode
 
std::string mFocusName
 
std::map< std::string,
std::string > 
mFallbackMap
 
bool mScriptConsoleMode
 
std::string mStartupScript
 
int mActivationDistanceOverride
 
std::string mSaveGameFile
 
bool mGrab
 
bool mExportFonts
 
Compiler::Extensions mExtensions
 
Compiler::ContextmScriptContext
 
Files::Collections mFileCollections
 
bool mFSStrict
 
Translation::Storage mTranslationDataStorage
 
std::vector< std::string > mScriptBlacklist
 
bool mScriptBlacklistUse
 
bool mNewGame
 
osg::Timer_t mStartTick
 
Files::ConfigurationManagermCfgMgr
 

Detailed Description

Main engine class, that brings together all the components of OpenMW.

Constructor & Destructor Documentation

OMW::Engine::Engine ( const Engine )
private
OMW::Engine::Engine ( Files::ConfigurationManager configurationManager)

Here is the call graph for this function:

OMW::Engine::~Engine ( )
virtual

Member Function Documentation

void OMW::Engine::addArchive ( const std::string &  archive)

Add BSA archive.

Here is the caller graph for this function:

void OMW::Engine::addContentFile ( const std::string &  file)

addContentFile - Adds content file (ie. esm/esp, or omwgame/omwaddon) to the content files container.

Parameters
file- filename (extension is required)

Here is the caller graph for this function:

void OMW::Engine::createWindow ( Settings::Manager settings)
private

Here is the call graph for this function:

void OMW::Engine::enableFontExport ( bool  exportFonts)

Here is the caller graph for this function:

void OMW::Engine::enableFSStrict ( bool  fsStrict)

Enable strict filesystem mode (do not fold case)

Attention
The strict mode must be specified before any path-related settings are given to the engine.

Here is the caller graph for this function:

void OMW::Engine::executeLocalScripts ( )
private

Here is the call graph for this function:

void OMW::Engine::frame ( float  dt)
private

Here is the call graph for this function:

void OMW::Engine::go ( )

Initialise and enter main loop.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string OMW::Engine::loadSettings ( Settings::Manager settings)
private

Load settings from various files, returns the path to the user settings file.

Here is the call graph for this function:

Engine& OMW::Engine::operator= ( const Engine )
private
void OMW::Engine::prepareEngine ( Settings::Manager settings)
private

Prepare engine for game play.

Here is the call graph for this function:

void OMW::Engine::setActivationDistanceOverride ( int  distance)

Override the game setting specified activation distance.

Here is the call graph for this function:

Here is the caller graph for this function:

void OMW::Engine::setCell ( const std::string &  cellName)

Set start cell name (only interiors for now)

Here is the caller graph for this function:

void OMW::Engine::setCompileAll ( bool  all)

Compile all scripts (excludign dialogue scripts) at startup?

Here is the caller graph for this function:

void OMW::Engine::setCompileAllDialogue ( bool  all)

Compile all dialogue scripts at startup?

Here is the caller graph for this function:

void OMW::Engine::setDataDirs ( const Files::PathContainer dataDirs)

Set data dirs.

Here is the caller graph for this function:

void OMW::Engine::setEncoding ( const ToUTF8::FromType encoding)

Font encoding.

Here is the caller graph for this function:

void OMW::Engine::setFallbackValues ( std::map< std::string, std::string >  map)

Here is the caller graph for this function:

void OMW::Engine::setGrabMouse ( bool  grab)
inline

Here is the caller graph for this function:

void OMW::Engine::setResourceDir ( const boost::filesystem::path &  parResDir)

Set resource dir.

Here is the caller graph for this function:

void OMW::Engine::setSaveGameFile ( const std::string &  savegame)

Set the save game file to load after initialising the engine.

Here is the caller graph for this function:

void OMW::Engine::setScriptBlacklist ( const std::vector< std::string > &  list)

Here is the call graph for this function:

Here is the caller graph for this function:

void OMW::Engine::setScriptBlacklistUse ( bool  use)

Here is the caller graph for this function:

void OMW::Engine::setScriptConsoleMode ( bool  enabled)

Enable console-only script functionality.

Here is the caller graph for this function:

void OMW::Engine::setScriptsVerbosity ( bool  scriptsVerbosity)

Enable or disable verbose script output.

Here is the caller graph for this function:

void OMW::Engine::setSkipMenu ( bool  skipMenu,
bool  newGame 
)

Skip main menu and go directly into the game

Parameters
newGameStart a new game instead off dumping the player into the game (ignored if !skipMenu).

Here is the caller graph for this function:

void OMW::Engine::setSoundUsage ( bool  soundUsage)

Disable or enable all sounds.

Here is the caller graph for this function:

void OMW::Engine::setStartupScript ( const std::string &  path)

Set path for a script that is run on startup in the console.

Here is the caller graph for this function:

void OMW::Engine::setWarningsMode ( int  mode)

Here is the caller graph for this function:

void OMW::Engine::setWindowIcon ( )
private

Here is the call graph for this function:

Member Data Documentation

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
bool OMW::Engine::mCompileAllDialogue
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
bool OMW::Engine::mExportFonts
private
Compiler::Extensions OMW::Engine::mExtensions
private
std::map<std::string,std::string> OMW::Engine::mFallbackMap
private
Files::Collections OMW::Engine::mFileCollections
private
std::string OMW::Engine::mFocusName
private
bool OMW::Engine::mFSStrict
private
bool OMW::Engine::mGrab
private
bool OMW::Engine::mNewGame
private
boost::filesystem::path OMW::Engine::mResDir
private
std::auto_ptr<Resource::ResourceSystem> OMW::Engine::mResourceSystem
private
std::string OMW::Engine::mSaveGameFile
private
osg::ref_ptr<osgViewer::ScreenCaptureHandler> OMW::Engine::mScreenCaptureHandler
private
std::vector<std::string> OMW::Engine::mScriptBlacklist
private
bool OMW::Engine::mScriptBlacklistUse
private
bool OMW::Engine::mScriptConsoleMode
private
Compiler::Context* OMW::Engine::mScriptContext
private
bool OMW::Engine::mSkipMenu
private
osg::Timer_t OMW::Engine::mStartTick
private
std::string OMW::Engine::mStartupScript
private
Translation::Storage OMW::Engine::mTranslationDataStorage
private
bool OMW::Engine::mUseSound
private
bool OMW::Engine::mVerboseScripts
private
std::auto_ptr<VFS::Manager> OMW::Engine::mVFS
private
osg::ref_ptr<osgViewer::Viewer> OMW::Engine::mViewer
private
int OMW::Engine::mWarningsMode
private
SDL_Window* OMW::Engine::mWindow
private

The documentation for this class was generated from the following files: