OpenMW
Public Member Functions | Private Member Functions | Private Attributes
OMW::Engine Class Reference

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

#include <engine.hpp>

List of all members.

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 &)
Engineoperator= (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::Utf8EncodermEncoder
Files::PathContainer mDataDirs
std::vector< std::string > mArchives
boost::filesystem::path mResDir
OEngine::Render::OgreRenderermOgre
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::ContextmScriptContext
Files::Collections mFileCollections
bool mFSStrict
Translation::Storage mTranslationDataStorage
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)
OMW::Engine::~Engine ( ) [virtual]

Member Function Documentation

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.

Parameters:
file- filename (extension is required)
void OMW::Engine::addResourcesDirectory ( const boost::filesystem::path &  path) [private]

add resources directory

Note:
This function works recursively.
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)

Attention:
The strict mode must be specified before any path-related settings are given to the engine.
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.

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

Prepare engine for game play.

Write screenshot to file.

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.


Member Data Documentation

std::vector<std::string> OMW::Engine::mArchives [private]
std::string OMW::Engine::mCellName [private]
bool OMW::Engine::mCompileAll [private]
std::vector<std::string> OMW::Engine::mContentFiles [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]
boost::filesystem::path OMW::Engine::mResDir [private]
std::string OMW::Engine::mStartupScript [private]
bool OMW::Engine::mUseSound [private]

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