ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <grim.h>

Inheritance diagram for Grim::GrimEngine:
Collaboration diagram for Grim::GrimEngine:

List of all members.

Public Types

enum  EngineMode {
  PauseMode = 1, NormalMode = 2, SmushMode = 3, DrawMode = 4,
  OverworldMode = 5
}
enum  SpeechMode { TextOnly = 1, VoiceOnly = 2, TextAndVoice = 3 }

Public Member Functions

 GrimEngine (OSystem *syst, uint32 gameFlags, GrimGameType gameType, Common::Platform platform, Common::Language language)
virtual ~GrimEngine ()
void clearPools ()
int getGameFlags ()
GrimGameType getGameType ()
Common::Language getGameLanguage ()
Common::Platform getGamePlatform ()
virtual const char * getUpdateFilename ()
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded.
Common::Error loadGameState (int slot) override
 Load a game state.
void setMode (EngineMode mode)
EngineMode getMode ()
void setPreviousMode (EngineMode mode)
EngineMode getPreviousMode ()
void setSpeechMode (SpeechMode mode)
SpeechMode getSpeechMode ()
SaveGamesavedState ()
void handleDebugLoadResource ()
void luaUpdate ()
void updateDisplayScene ()
void doFlip ()
void setFlipEnable (bool state)
bool getFlipEnable ()
virtual void drawTextObjects ()
void playIrisAnimation (Iris::Direction dir, int x, int y, int time)
void mainLoop ()
unsigned getFrameStart () const
unsigned getFrameTime () const
float getPerSecond (float rate) const
int getTextSpeed ()
void setTextSpeed (int speed)
void enableControl (int num)
void disableControl (int num)
float getControlAxis (int num)
bool getControlState (int num)
void clearEventQueue ()
SetfindSet (const Common::String &name)
void setSetLock (const char *name, bool lockStatus)
SetloadSet (const Common::String &name)
void setSet (const char *name)
void setSet (Set *scene)
SetgetCurrSet ()
void makeCurrentSetup (int num)
void flagRefreshShadowMask (bool flag)
bool getFlagRefreshShadowMask ()
void setSelectedActor (Actor *a)
ActorgetSelectedActor ()
virtual void invalidateActiveActorsList ()
 Tell the engine that an actor has been moved into/outside a set, and so that it should rebuild the list of active ones.
virtual void invalidateTextObjectsSortOrder ()
const Common::List< Actor * > & getActiveActors () const
 Return a list of the currently active actors, i.
void addTalkingActor (Actor *actor)
 Add an actor to the list of actors that are talking.
const Common::List< Actor * > & getTalkingActors () const
bool areActorsTalking () const
void immediatelyRemoveActor (Actor *actor)
void setMovieSubtitle (TextObject *to)
void setMovieSetup ()
void saveGame (const Common::String &file)
void loadGame (const Common::String &file)
void changeHardwareState ()
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature.
void debugLua (const Common::String &str)
void setSideTextures (const Common::String &setup)

Public Attributes

Common::StringArray _listFiles
Common::StringArray::const_iterator _listFilesIter
TextObjectDefaults _sayLineDefaults
TextObjectDefaults _printLineDefaults
TextObjectDefaults _blastTextDefaults

Protected Member Functions

virtual Common::Error run () override
 Init the engine and start its main loop.
virtual GUI::DebuggergetDebugger () override
 Return the engine's debugger instance, if any.
virtual void pauseEngineIntern (bool pause) override
 Actual implementation of pauseEngine by subclasses.
void handleControls (Common::EventType type, const Common::KeyState &key)
void handleChars (Common::EventType type, const Common::KeyState &key)
void handleJoyAxis (byte axis, int16 position)
void handleJoyButton (Common::EventType type, byte button)
void handleExit ()
void handlePause ()
void handleUserPaint ()
void cameraChangeHandle (int prev, int next)
void cameraPostChangeHandle (int num)
void buildActiveActorsList ()
void savegameCallback ()
GfxBasecreateRenderer (int screenW, int screenH, bool fullscreen)
void playAspyrLogo ()
virtual LuaBasecreateLua ()
virtual void updateNormalMode ()
virtual void updateDrawMode ()
virtual void drawNormalMode ()
void savegameSave ()
void saveGRIM ()
void savegameRestore ()
void restoreGRIM ()
virtual void storeSaveGameImage (SaveGame *savedState)

Protected Attributes

bool _savegameLoadRequest
bool _savegameSaveRequest
Common::String _savegameFileName
SaveGame_savedState
Set_currSet
EngineMode _mode
EngineMode _previousMode
SpeechMode _speechMode
int _textSpeed
bool _flipEnable
char _fps [8]
bool _doFlip
bool _refreshShadowMask
bool _shortFrame
bool _setupChanged
Common::String _movieSetup
unsigned _frameStart
unsigned _frameTime
unsigned _movieTime
int _prevSmushFrame
unsigned int _frameCounter
unsigned int _lastFrameTime
unsigned _speedLimitMs
bool _showFps
bool _softRenderer
bool * _controlsEnabled
bool * _controlsState
float * _joyAxisPosition
bool _changeHardwareState
bool _changeFullscreenState
Actor_selectedActor
Iris_iris
TextObject::Ptr _movieSubtitle
bool _buildActiveActorsList
Common::List< Actor * > _activeActors
Common::List< Actor * > _talkingActors
uint32 _gameFlags
GrimGameType _gameType
Common::Platform _gamePlatform
Common::Language _gameLanguage
Debugger_debugger
uint32 _pauseStartTime
 The time when the pause was started.

Detailed Description

Definition at line 64 of file grim.h.


Member Enumeration Documentation

Enumerator:
PauseMode 
NormalMode 
SmushMode 
DrawMode 
OverworldMode 

Definition at line 72 of file grim.h.

Enumerator:
TextOnly 
VoiceOnly 
TextAndVoice 

Definition at line 79 of file grim.h.


Constructor & Destructor Documentation

Grim::GrimEngine::GrimEngine ( OSystem syst,
uint32  gameFlags,
GrimGameType  gameType,
Common::Platform  platform,
Common::Language  language 
)

Definition at line 86 of file grim.cpp.

Grim::GrimEngine::~GrimEngine (  )  [virtual]

Definition at line 183 of file grim.cpp.


Member Function Documentation

void Grim::GrimEngine::addTalkingActor ( Actor actor  ) 

Add an actor to the list of actors that are talking.

Definition at line 1339 of file grim.cpp.

bool Grim::GrimEngine::areActorsTalking (  )  const

Definition at line 1343 of file grim.cpp.

void Grim::GrimEngine::buildActiveActorsList (  )  [protected]

Definition at line 1324 of file grim.cpp.

void Grim::GrimEngine::cameraChangeHandle ( int  prev,
int  next 
) [protected]

Definition at line 483 of file grim.cpp.

void Grim::GrimEngine::cameraPostChangeHandle ( int  num  )  [protected]

Definition at line 490 of file grim.cpp.

bool Grim::GrimEngine::canLoadGameStateCurrently (  )  [inline, override, virtual]

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 95 of file grim.h.

void Grim::GrimEngine::changeHardwareState (  ) 

Definition at line 919 of file grim.cpp.

void Grim::GrimEngine::clearEventQueue (  ) 

Definition at line 1371 of file grim.cpp.

void Grim::GrimEngine::clearPools (  ) 

Definition at line 219 of file grim.cpp.

LuaBase * Grim::GrimEngine::createLua (  )  [protected, virtual]

Reimplemented in Grim::EMIEngine.

Definition at line 231 of file grim.cpp.

GfxBase * Grim::GrimEngine::createRenderer ( int  screenW,
int  screenH,
bool  fullscreen 
) [protected]

Definition at line 235 of file grim.cpp.

void Grim::GrimEngine::debugLua ( const Common::String str  ) 

Definition at line 1429 of file grim.cpp.

void Grim::GrimEngine::disableControl ( int  num  )  [inline]

Definition at line 128 of file grim.h.

void Grim::GrimEngine::doFlip (  ) 

Definition at line 719 of file grim.cpp.

void Grim::GrimEngine::drawNormalMode (  )  [protected, virtual]

Reimplemented in Grim::EMIEngine.

Definition at line 651 of file grim.cpp.

void Grim::GrimEngine::drawTextObjects (  )  [virtual]

Reimplemented in Grim::EMIEngine.

Definition at line 542 of file grim.cpp.

void Grim::GrimEngine::enableControl ( int  num  )  [inline]

Definition at line 127 of file grim.h.

Set * Grim::GrimEngine::findSet ( const Common::String name  ) 

Definition at line 1206 of file grim.cpp.

void Grim::GrimEngine::flagRefreshShadowMask ( bool  flag  )  [inline]

Definition at line 141 of file grim.h.

const Common::List<Actor *>& Grim::GrimEngine::getActiveActors (  )  const [inline]

Return a list of the currently active actors, i.

e. the actors in the current set.

Definition at line 156 of file grim.h.

float Grim::GrimEngine::getControlAxis ( int  num  ) 

Definition at line 1299 of file grim.cpp.

bool Grim::GrimEngine::getControlState ( int  num  ) 

Definition at line 1307 of file grim.cpp.

Set* Grim::GrimEngine::getCurrSet (  )  [inline]

Definition at line 138 of file grim.h.

virtual GUI::Debugger* Grim::GrimEngine::getDebugger (  )  [inline, override, protected, virtual]

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 69 of file grim.h.

bool Grim::GrimEngine::getFlagRefreshShadowMask (  )  [inline]

Definition at line 142 of file grim.h.

bool Grim::GrimEngine::getFlipEnable (  )  [inline]

Definition at line 111 of file grim.h.

unsigned Grim::GrimEngine::getFrameStart (  )  const [inline]

Definition at line 116 of file grim.h.

unsigned Grim::GrimEngine::getFrameTime (  )  const [inline]

Definition at line 117 of file grim.h.

int Grim::GrimEngine::getGameFlags (  )  [inline]

Definition at line 90 of file grim.h.

Common::Language Grim::GrimEngine::getGameLanguage (  )  [inline]

Definition at line 92 of file grim.h.

Common::Platform Grim::GrimEngine::getGamePlatform (  )  [inline]

Definition at line 93 of file grim.h.

GrimGameType Grim::GrimEngine::getGameType (  )  [inline]

Definition at line 91 of file grim.h.

EngineMode Grim::GrimEngine::getMode (  )  [inline]

Definition at line 99 of file grim.h.

float Grim::GrimEngine::getPerSecond ( float  rate  )  const

Definition at line 1311 of file grim.cpp.

EngineMode Grim::GrimEngine::getPreviousMode (  )  [inline]

Definition at line 101 of file grim.h.

Actor* Grim::GrimEngine::getSelectedActor (  )  [inline]

Definition at line 145 of file grim.h.

SpeechMode Grim::GrimEngine::getSpeechMode (  )  [inline]

Definition at line 103 of file grim.h.

const Common::List<Actor *>& Grim::GrimEngine::getTalkingActors (  )  const [inline]

Definition at line 162 of file grim.h.

int Grim::GrimEngine::getTextSpeed (  )  [inline]

Definition at line 124 of file grim.h.

const char * Grim::GrimEngine::getUpdateFilename (  )  [virtual]

Reimplemented in Grim::EMIEngine.

Definition at line 279 of file grim.cpp.

void Grim::GrimEngine::handleChars ( Common::EventType  type,
const Common::KeyState key 
) [protected]

Definition at line 275 of file grim_controls.cpp.

void Grim::GrimEngine::handleControls ( Common::EventType  type,
const Common::KeyState key 
) [protected]

Definition at line 291 of file grim_controls.cpp.

void Grim::GrimEngine::handleDebugLoadResource (  ) 

Definition at line 502 of file grim.cpp.

void Grim::GrimEngine::handleExit (  )  [protected]

Definition at line 471 of file grim.cpp.

void Grim::GrimEngine::handleJoyAxis ( byte  axis,
int16  position 
) [protected]

Definition at line 327 of file grim_controls.cpp.

void Grim::GrimEngine::handleJoyButton ( Common::EventType  type,
byte  button 
) [protected]

Definition at line 355 of file grim_controls.cpp.

void Grim::GrimEngine::handlePause (  )  [protected]

Definition at line 465 of file grim.cpp.

void Grim::GrimEngine::handleUserPaint (  )  [protected]

Definition at line 477 of file grim.cpp.

bool Grim::GrimEngine::hasFeature ( EngineFeature  f  )  const [override, virtual]

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 1381 of file grim.cpp.

void Grim::GrimEngine::immediatelyRemoveActor ( Actor actor  ) 

Definition at line 1319 of file grim.cpp.

void Grim::GrimEngine::invalidateActiveActorsList (  )  [virtual]

Tell the engine that an actor has been moved into/outside a set, and so that it should rebuild the list of active ones.

Reimplemented in Grim::EMIEngine.

Definition at line 1315 of file grim.cpp.

virtual void Grim::GrimEngine::invalidateTextObjectsSortOrder (  )  [inline, virtual]

Reimplemented in Grim::EMIEngine.

Definition at line 152 of file grim.h.

void Grim::GrimEngine::loadGame ( const Common::String file  ) 

Definition at line 928 of file grim.cpp.

Common::Error Grim::GrimEngine::loadGameState ( int  slot  )  [override, virtual]

Load a game state.

Parameters:
slot the slot from which a savestate should be loaded
Returns:
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 450 of file grim.cpp.

Set * Grim::GrimEngine::loadSet ( const Common::String name  ) 

Definition at line 1226 of file grim.cpp.

void Grim::GrimEngine::luaUpdate (  ) 

Definition at line 552 of file grim.cpp.

void Grim::GrimEngine::mainLoop (  ) 

Definition at line 742 of file grim.cpp.

void Grim::GrimEngine::makeCurrentSetup ( int  num  ) 

Definition at line 1279 of file grim.cpp.

void Grim::GrimEngine::pauseEngineIntern ( bool  pause  )  [override, protected, virtual]

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 1388 of file grim.cpp.

void Grim::GrimEngine::playAspyrLogo (  )  [protected]

Definition at line 404 of file grim.cpp.

void Grim::GrimEngine::playIrisAnimation ( Iris::Direction  dir,
int  x,
int  y,
int  time 
)

Definition at line 548 of file grim.cpp.

void Grim::GrimEngine::restoreGRIM (  )  [protected]

Definition at line 1030 of file grim.cpp.

Common::Error Grim::GrimEngine::run (  )  [override, protected, virtual]

Init the engine and start its main loop.

Returns:
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 286 of file grim.cpp.

SaveGame* Grim::GrimEngine::savedState (  )  [inline]

Definition at line 104 of file grim.h.

void Grim::GrimEngine::saveGame ( const Common::String file  ) 

Definition at line 923 of file grim.cpp.

void Grim::GrimEngine::savegameCallback (  )  [protected]

Definition at line 496 of file grim.cpp.

void Grim::GrimEngine::savegameRestore (  )  [protected]

Definition at line 933 of file grim.cpp.

void Grim::GrimEngine::savegameSave (  )  [protected]

Definition at line 1091 of file grim.cpp.

void Grim::GrimEngine::saveGRIM (  )  [protected]

Definition at line 1175 of file grim.cpp.

void Grim::GrimEngine::setFlipEnable ( bool  state  )  [inline]

Definition at line 110 of file grim.h.

void Grim::GrimEngine::setMode ( EngineMode  mode  ) 

Definition at line 1366 of file grim.cpp.

void Grim::GrimEngine::setMovieSetup (  ) 

Definition at line 1362 of file grim.cpp.

void Grim::GrimEngine::setMovieSubtitle ( TextObject to  ) 

Definition at line 1355 of file grim.cpp.

void Grim::GrimEngine::setPreviousMode ( EngineMode  mode  )  [inline]

Definition at line 100 of file grim.h.

void Grim::GrimEngine::setSelectedActor ( Actor a  )  [inline]

Definition at line 144 of file grim.h.

void Grim::GrimEngine::setSet ( const char *  name  ) 

Definition at line 1247 of file grim.cpp.

void Grim::GrimEngine::setSet ( Set scene  ) 

Definition at line 1251 of file grim.cpp.

void Grim::GrimEngine::setSetLock ( const char *  name,
bool  lockStatus 
)

Definition at line 1215 of file grim.cpp.

void Grim::GrimEngine::setSideTextures ( const Common::String setup  ) 

Definition at line 1414 of file grim.cpp.

void Grim::GrimEngine::setSpeechMode ( SpeechMode  mode  )  [inline]

Definition at line 102 of file grim.h.

void Grim::GrimEngine::setTextSpeed ( int  speed  ) 

Definition at line 1291 of file grim.cpp.

void Grim::GrimEngine::storeSaveGameImage ( SaveGame savedState  )  [protected, virtual]

Reimplemented in Grim::EMIEngine.

Definition at line 1066 of file grim.cpp.

void Grim::GrimEngine::updateDisplayScene (  ) 

Definition at line 599 of file grim.cpp.

void Grim::GrimEngine::updateDrawMode (  )  [protected, virtual]

Reimplemented in Grim::EMIEngine.

Definition at line 645 of file grim.cpp.

void Grim::GrimEngine::updateNormalMode (  )  [protected, virtual]

Definition at line 633 of file grim.cpp.


Member Data Documentation

Definition at line 253 of file grim.h.

Definition at line 252 of file grim.h.

Definition at line 246 of file grim.h.

Definition at line 245 of file grim.h.

Definition at line 241 of file grim.h.

Definition at line 242 of file grim.h.

Definition at line 220 of file grim.h.

Definition at line 260 of file grim.h.

bool Grim::GrimEngine::_doFlip [protected]

Definition at line 226 of file grim.h.

Definition at line 224 of file grim.h.

char Grim::GrimEngine::_fps[8] [protected]

Definition at line 225 of file grim.h.

unsigned int Grim::GrimEngine::_frameCounter [protected]

Definition at line 235 of file grim.h.

unsigned Grim::GrimEngine::_frameStart [protected]

Definition at line 233 of file grim.h.

unsigned Grim::GrimEngine::_frameTime [protected]

Definition at line 233 of file grim.h.

Definition at line 256 of file grim.h.

Definition at line 259 of file grim.h.

Definition at line 258 of file grim.h.

Definition at line 257 of file grim.h.

Definition at line 249 of file grim.h.

Definition at line 243 of file grim.h.

unsigned int Grim::GrimEngine::_lastFrameTime [protected]

Definition at line 236 of file grim.h.

Definition at line 221 of file grim.h.

Definition at line 231 of file grim.h.

TextObject::Ptr Grim::GrimEngine::_movieSubtitle [protected]

Definition at line 250 of file grim.h.

unsigned Grim::GrimEngine::_movieTime [protected]

Definition at line 233 of file grim.h.

The time when the pause was started.

Reimplemented from Engine.

Definition at line 261 of file grim.h.

Definition at line 221 of file grim.h.

Definition at line 234 of file grim.h.

Definition at line 227 of file grim.h.

Definition at line 218 of file grim.h.

Definition at line 217 of file grim.h.

Definition at line 215 of file grim.h.

Definition at line 216 of file grim.h.

Definition at line 248 of file grim.h.

Definition at line 229 of file grim.h.

Definition at line 228 of file grim.h.

bool Grim::GrimEngine::_showFps [protected]

Definition at line 238 of file grim.h.

Definition at line 239 of file grim.h.

Definition at line 222 of file grim.h.

unsigned Grim::GrimEngine::_speedLimitMs [protected]

Definition at line 237 of file grim.h.

Definition at line 254 of file grim.h.

Definition at line 223 of file grim.h.


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


Generated on Sat May 18 2019 05:06:23 for ResidualVM by doxygen 1.7.1
curved edge   curved edge