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 drawMovieSubtitle ()
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 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
uint32 _pauseStartTime
 The time when the pause was started.

Detailed Description

Definition at line 63 of file grim.h.


Member Enumeration Documentation

Enumerator:
PauseMode 
NormalMode 
SmushMode 
DrawMode 
OverworldMode 

Definition at line 70 of file grim.h.

Enumerator:
TextOnly 
VoiceOnly 
TextAndVoice 

Definition at line 77 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 1336 of file grim.cpp.

bool Grim::GrimEngine::areActorsTalking (  )  const

Definition at line 1340 of file grim.cpp.

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

Definition at line 1321 of file grim.cpp.

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

Definition at line 482 of file grim.cpp.

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

Definition at line 489 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 93 of file grim.h.

void Grim::GrimEngine::changeHardwareState (  ) 

Definition at line 916 of file grim.cpp.

void Grim::GrimEngine::clearEventQueue (  ) 

Definition at line 1373 of file grim.cpp.

void Grim::GrimEngine::clearPools (  ) 

Definition at line 218 of file grim.cpp.

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

Reimplemented in Grim::EMIEngine.

Definition at line 230 of file grim.cpp.

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

Definition at line 234 of file grim.cpp.

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

Definition at line 1431 of file grim.cpp.

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

Definition at line 126 of file grim.h.

void Grim::GrimEngine::doFlip (  ) 

Definition at line 718 of file grim.cpp.

void Grim::GrimEngine::drawMovieSubtitle (  ) 

Definition at line 1359 of file grim.cpp.

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

Reimplemented in Grim::EMIEngine.

Definition at line 650 of file grim.cpp.

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

Reimplemented in Grim::EMIEngine.

Definition at line 541 of file grim.cpp.

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

Definition at line 125 of file grim.h.

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

Definition at line 1203 of file grim.cpp.

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

Definition at line 139 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 154 of file grim.h.

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

Definition at line 1296 of file grim.cpp.

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

Definition at line 1304 of file grim.cpp.

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

Definition at line 136 of file grim.h.

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

Definition at line 140 of file grim.h.

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

Definition at line 109 of file grim.h.

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

Definition at line 114 of file grim.h.

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

Definition at line 115 of file grim.h.

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

Definition at line 88 of file grim.h.

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

Definition at line 90 of file grim.h.

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

Definition at line 91 of file grim.h.

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

Definition at line 89 of file grim.h.

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

Definition at line 97 of file grim.h.

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

Definition at line 1308 of file grim.cpp.

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

Definition at line 99 of file grim.h.

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

Definition at line 143 of file grim.h.

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

Definition at line 101 of file grim.h.

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

Definition at line 160 of file grim.h.

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

Definition at line 122 of file grim.h.

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

Reimplemented in Grim::EMIEngine.

Definition at line 278 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 501 of file grim.cpp.

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

Definition at line 470 of file grim.cpp.

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

Definition at line 322 of file grim_controls.cpp.

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

Definition at line 350 of file grim_controls.cpp.

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

Definition at line 464 of file grim.cpp.

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

Definition at line 476 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 1383 of file grim.cpp.

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

Definition at line 1316 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 1312 of file grim.cpp.

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

Reimplemented in Grim::EMIEngine.

Definition at line 150 of file grim.h.

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

Definition at line 925 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 449 of file grim.cpp.

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

Definition at line 1223 of file grim.cpp.

void Grim::GrimEngine::luaUpdate (  ) 

Definition at line 551 of file grim.cpp.

void Grim::GrimEngine::mainLoop (  ) 

Definition at line 741 of file grim.cpp.

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

Definition at line 1276 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 1390 of file grim.cpp.

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

Definition at line 403 of file grim.cpp.

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

Definition at line 547 of file grim.cpp.

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

Definition at line 1027 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 285 of file grim.cpp.

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

Definition at line 102 of file grim.h.

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

Definition at line 920 of file grim.cpp.

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

Definition at line 495 of file grim.cpp.

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

Definition at line 930 of file grim.cpp.

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

Definition at line 1088 of file grim.cpp.

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

Definition at line 1172 of file grim.cpp.

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

Definition at line 108 of file grim.h.

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

Definition at line 1368 of file grim.cpp.

void Grim::GrimEngine::setMovieSetup (  ) 

Definition at line 1364 of file grim.cpp.

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

Definition at line 1352 of file grim.cpp.

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

Definition at line 98 of file grim.h.

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

Definition at line 142 of file grim.h.

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

Definition at line 1248 of file grim.cpp.

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

Definition at line 1244 of file grim.cpp.

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

Definition at line 1212 of file grim.cpp.

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

Definition at line 1416 of file grim.cpp.

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

Definition at line 100 of file grim.h.

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

Definition at line 1288 of file grim.cpp.

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

Reimplemented in Grim::EMIEngine.

Definition at line 1063 of file grim.cpp.

void Grim::GrimEngine::updateDisplayScene (  ) 

Definition at line 598 of file grim.cpp.

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

Reimplemented in Grim::EMIEngine.

Definition at line 644 of file grim.cpp.

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

Definition at line 632 of file grim.cpp.


Member Data Documentation

Definition at line 252 of file grim.h.

Definition at line 251 of file grim.h.

Definition at line 245 of file grim.h.

Definition at line 244 of file grim.h.

Definition at line 240 of file grim.h.

Definition at line 241 of file grim.h.

Definition at line 219 of file grim.h.

bool Grim::GrimEngine::_doFlip [protected]

Definition at line 225 of file grim.h.

Definition at line 223 of file grim.h.

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

Definition at line 224 of file grim.h.

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

Definition at line 234 of file grim.h.

unsigned Grim::GrimEngine::_frameStart [protected]

Definition at line 232 of file grim.h.

unsigned Grim::GrimEngine::_frameTime [protected]

Definition at line 232 of file grim.h.

Definition at line 255 of file grim.h.

Definition at line 258 of file grim.h.

Definition at line 257 of file grim.h.

Definition at line 256 of file grim.h.

Definition at line 248 of file grim.h.

Definition at line 242 of file grim.h.

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

Definition at line 235 of file grim.h.

Definition at line 220 of file grim.h.

Definition at line 230 of file grim.h.

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

Definition at line 249 of file grim.h.

unsigned Grim::GrimEngine::_movieTime [protected]

Definition at line 232 of file grim.h.

The time when the pause was started.

Reimplemented from Engine.

Definition at line 259 of file grim.h.

Definition at line 220 of file grim.h.

Definition at line 233 of file grim.h.

Definition at line 226 of file grim.h.

Definition at line 217 of file grim.h.

Definition at line 216 of file grim.h.

Definition at line 214 of file grim.h.

Definition at line 215 of file grim.h.

Definition at line 247 of file grim.h.

Definition at line 228 of file grim.h.

Definition at line 227 of file grim.h.

bool Grim::GrimEngine::_showFps [protected]

Definition at line 237 of file grim.h.

Definition at line 238 of file grim.h.

Definition at line 221 of file grim.h.

unsigned Grim::GrimEngine::_speedLimitMs [protected]

Definition at line 236 of file grim.h.

Definition at line 253 of file grim.h.

Definition at line 222 of file grim.h.


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


Generated on Sat Aug 15 2020 05:06:12 for ResidualVM by doxygen 1.7.1
curved edge   curved edge