FIFE 2008.0
FIFE::Engine Class Reference

#include <engine.h>

Collaboration diagram for FIFE::Engine:

List of all members.

Public Member Functions

 Engine ()
virtual ~Engine ()
EngineSettingsgetSettings ()
const DeviceCaps & getDeviceCaps () const
ImagechangeScreenMode (const ScreenMode &mode)
void init ()
void destroy ()
void initializePumping ()
void finalizePumping ()
void pump ()
SoundManager * getSoundManager () const
EventManagergetEventManager () const
TimeManagergetTimeManager () const
GUIManager * getGuiManager () const
ImagePoolgetImagePool () const
AnimationPoolgetAnimationPool () const
SoundClipPoolgetSoundClipPool () const
RenderBackendgetRenderBackend () const
ModelgetModel () const
LogManagergetLogManager () const
GuiFont * getDefaultFont () const
VFSgetVFS () const
CursorgetCursor () const
void addChangeListener (IEngineChangeListener *listener)
void removeChangeListener (IEngineChangeListener *listener)

Detailed Description

Engine acts as a controller to the whole system Responsibilities of the engine are:

  • Construct and initialize engine internals
  • Clean-up when the program ends
  • Act as an entry point to the engine subsystems

Definition at line 84 of file engine.h.


Constructor & Destructor Documentation

FIFE::Engine::Engine ( )

Constructor

Definition at line 96 of file engine.cpp.

FIFE::Engine::~Engine ( ) [virtual]

Destructor

Definition at line 311 of file engine.cpp.

References destroy().


Member Function Documentation

void FIFE::Engine::addChangeListener ( IEngineChangeListener *  listener)

Adds new change listener

Parameters:
listenerto add

Definition at line 391 of file engine.cpp.

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.

Parameters:
modeA valid ScreenMode retrieved from FIFE::DeviceCaps::getNearestScreenMode()
Returns:
The new Screen Image

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().

Here is the caller graph for this function:

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

Definition at line 157 of file engine.h.

Cursor* FIFE::Engine::getCursor ( ) const [inline]

Returns cursor used in the engine

Definition at line 185 of file engine.h.

GuiFont* FIFE::Engine::getDefaultFont ( ) const [inline]

Returns default font used in the engine

Definition at line 177 of file engine.h.

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

Definition at line 141 of file engine.h.

GUIManager* FIFE::Engine::getGuiManager ( ) const [inline]

Provides access point to the GuiManager

Definition at line 149 of file engine.h.

ImagePool* FIFE::Engine::getImagePool ( ) const [inline]

Provides access point to the ImagePool

Definition at line 153 of file engine.h.

LogManager* FIFE::Engine::getLogManager ( ) const [inline]

Provides access point to the LogManager

Definition at line 173 of file engine.h.

Model* FIFE::Engine::getModel ( ) const [inline]

Provides access point to the Model

Definition at line 169 of file engine.h.

RenderBackend* FIFE::Engine::getRenderBackend ( ) const [inline]

Provides access point to the RenderBackend

Definition at line 165 of file engine.h.

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

Definition at line 161 of file engine.h.

SoundManager* FIFE::Engine::getSoundManager ( ) const [inline]

Provides access point to the SoundManager

Definition at line 137 of file engine.h.

TimeManager* FIFE::Engine::getTimeManager ( ) const [inline]

Provides access point to the TimeManager

Definition at line 145 of file engine.h.

VFS* FIFE::Engine::getVFS ( ) const [inline]

Provides access point to the VFS

Definition at line 181 of file engine.h.

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::removeChangeListener ( IEngineChangeListener *  listener)

Removes associated change listener

Parameters:
listenerto remove

Definition at line 395 of file engine.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator