FIFE
2008.0
|
#include <engine.h>
Public Member Functions | |
Engine () | |
virtual | ~Engine () |
EngineSettings & | getSettings () |
const DeviceCaps & | getDeviceCaps () const |
Image * | changeScreenMode (const ScreenMode &mode) |
void | init () |
void | destroy () |
void | initializePumping () |
void | finalizePumping () |
void | pump () |
SoundManager * | getSoundManager () const |
EventManager * | getEventManager () const |
TimeManager * | getTimeManager () const |
GUIManager * | getGuiManager () const |
ImagePool * | getImagePool () const |
AnimationPool * | getAnimationPool () const |
SoundClipPool * | getSoundClipPool () const |
RenderBackend * | getRenderBackend () const |
Model * | getModel () const |
LogManager * | getLogManager () const |
GuiFont * | getDefaultFont () const |
VFS * | getVFS () const |
Cursor * | getCursor () const |
void | addChangeListener (IEngineChangeListener *listener) |
void | removeChangeListener (IEngineChangeListener *listener) |
Engine acts as a controller to the whole system Responsibilities of the engine are:
FIFE::Engine::Engine | ( | ) |
Constructor
Definition at line 96 of file engine.cpp.
FIFE::Engine::~Engine | ( | ) | [virtual] |
void FIFE::Engine::addChangeListener | ( | IEngineChangeListener * | listener | ) |
Image * FIFE::Engine::changeScreenMode | ( | const ScreenMode & | mode | ) |
Changes the screen mode. This should be called instead of the renderer's setScreenMode() function. It takes care of any objects that need to be re-created after switching screen modes.
mode | A valid ScreenMode retrieved from FIFE::DeviceCaps::getNearestScreenMode() |
Definition at line 138 of file engine.cpp.
References FIFE::RenderBackend::setScreenMode().
void FIFE::Engine::destroy | ( | ) |
Explicit destruction of engine
Definition at line 317 of file engine.cpp.
References FIFE::RenderBackend::deinit().
Referenced by ~Engine().
void FIFE::Engine::finalizePumping | ( | ) |
Finalizes the continuous processing of the engine Call this only once in your program, after you have called initializePumping + (pump() * N times)
Definition at line 387 of file engine.cpp.
AnimationPool* FIFE::Engine::getAnimationPool | ( | ) | const [inline] |
Provides access point to the AnimationPool
Cursor* FIFE::Engine::getCursor | ( | ) | const [inline] |
GuiFont* FIFE::Engine::getDefaultFont | ( | ) | const [inline] |
const DeviceCaps & FIFE::Engine::getDeviceCaps | ( | ) | const |
Gets device capabilities
Definition at line 134 of file engine.cpp.
EventManager* FIFE::Engine::getEventManager | ( | ) | const [inline] |
Provides access point to the EventManager
GUIManager* FIFE::Engine::getGuiManager | ( | ) | const [inline] |
ImagePool* FIFE::Engine::getImagePool | ( | ) | const [inline] |
LogManager* FIFE::Engine::getLogManager | ( | ) | const [inline] |
Provides access point to the LogManager
Model* FIFE::Engine::getModel | ( | ) | const [inline] |
RenderBackend* FIFE::Engine::getRenderBackend | ( | ) | const [inline] |
Provides access point to the RenderBackend
EngineSettings & FIFE::Engine::getSettings | ( | ) |
Gets settings class for engine
Definition at line 130 of file engine.cpp.
SoundClipPool* FIFE::Engine::getSoundClipPool | ( | ) | const [inline] |
Provides access point to the SoundClipPool
SoundManager* FIFE::Engine::getSoundManager | ( | ) | const [inline] |
TimeManager* FIFE::Engine::getTimeManager | ( | ) | const [inline] |
Provides access point to the TimeManager
VFS* FIFE::Engine::getVFS | ( | ) | const [inline] |
void FIFE::Engine::init | ( | ) |
Initializes the engine
Definition at line 181 of file engine.cpp.
References FIFE::Pool::addResourceLoader(), FIFE::EventManager::addSdlEventListener(), FIFE::Model::adoptCellGrid(), FIFE::Model::adoptPather(), FIFE::RenderBackend::createMainScreen(), FIFE::EngineSettings::getBitsPerPixel(), FIFE::EngineSettings::getColorKey(), FIFE::EngineSettings::getDefaultFontGlyphs(), FIFE::EngineSettings::getDefaultFontPath(), FIFE::EngineSettings::getDefaultFontSize(), FIFE::EngineSettings::getInitialVolume(), FIFE::EngineSettings::getLightingModel(), FIFE::EngineSettings::getRenderBackend(), FIFE::EngineSettings::getScreenHeight(), FIFE::EngineSettings::getScreenWidth(), FIFE::EngineSettings::getWindowIcon(), FIFE::EngineSettings::getWindowTitle(), FIFE::RenderBackend::init(), FIFE::EngineSettings::isColorKeyEnabled(), FIFE::EngineSettings::isFullScreen(), FIFE::RenderBackend::setColorKeyEnabled(), FIFE::RenderBackend::setLightingModel(), and FIFE::EngineSettings::validate().
void FIFE::Engine::initializePumping | ( | ) |
Initializes the continuous processing of the engine Call this only once in your program
Definition at line 358 of file engine.cpp.
References FIFE::EventManager::processEvents().
void FIFE::Engine::pump | ( | ) |
Runs one cycle for the engine
Definition at line 362 of file engine.cpp.
References FIFE::RenderBackend::clearBackBuffer(), FIFE::RenderBackend::disableLighting(), FIFE::Cursor::draw(), FIFE::RenderBackend::enableLighting(), FIFE::RenderBackend::endFrame(), FIFE::EngineSettings::getLightingModel(), FIFE::Model::getNumMaps(), FIFE::EventManager::processEvents(), FIFE::RenderBackend::startFrame(), FIFE::TimeManager::update(), and FIFE::Model::update().
void FIFE::Engine::removeChangeListener | ( | IEngineChangeListener * | listener | ) |
Removes associated change listener
listener | to remove |
Definition at line 395 of file engine.cpp.