Cruise::CruiseEngine Class Reference

#include <cruise.h>

Inheritance diagram for Cruise::CruiseEngine:
Collaboration diagram for Cruise::CruiseEngine:


struct  MemInfo

Public Types

typedef Common::List< Common::RectRectList
- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
 A feature in this context means an ability of the engine which can be either available or not. More...

Public Member Functions

 CruiseEngine (OSystem *syst, const CRUISEGameDescription *gameDesc)
virtual ~ CruiseEngine ()
virtual bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
int getGameType () const
const char * getGameId () const
uint32 getFeatures () const
Common::Language getLanguage () const
Common::Platform getPlatform () const
PCSoundsound ()
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
virtual void pauseEngine (bool pause)
const char * langString (LangStringId langId)
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
virtual void syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
void initAllData ()
- Public Member Functions inherited from Engine
void pauseEngine (bool pause)
 Pause or resume the engine. More...
bool isPaused () const
 Return whether the engine is currently paused or not. More...
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
uint32 getTotalPlayTime () const
 Get the total play time. More...
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
Common::TimerManagergetTimerManager ()
Common::EventManagergetEventManager ()
Common::SaveFileManagergetSaveFileManager ()
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 Engine (OSystem *syst)
virtual ~Engine ()
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
virtual void initKeymap ()
virtual void deinitKeymap ()
virtual void flipMute ()
 Flip mute all sound option. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...

Static Public Member Functions

static const char * getSavegameFile (int saveGameIdx)
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...

Public Attributes

const CRUISEGameDescription_gameDescription
Common::RandomSource _rnd
Common::List< MemInfo * > _memList
RectList _dirtyRects
RectList _priorFrameRects
Common::File _currentVolumeFile
Common::Array< CtStruct_polyStructNorm
Common::Array< CtStruct_polyStructExp
Common::Array< CtStruct > * _polyStructs
Common::Array< CtStruct > * _polyStruct
Common::File _PAL_file
- Public Attributes inherited from Engine

Protected Member Functions

virtual Common::Error run ()
 Init the engine and start its main loop. More...
void shutdown ()
bool initGame ()
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...

Private Member Functions

void initialize ()
void deinitialize ()
bool loadLanguageStrings ()
void mainLoop ()
int processInput ()

Private Attributes

bool _preLoad
Common::StringArray _langStrings
CursorType _savedCursor
uint32 _lastTick
int _gameSpeed
bool _speedFlag

Additional Inherited Members

- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 56 of file cruise.h.

Member Typedef Documentation

◆ RectList

Constructor & Destructor Documentation

◆ CruiseEngine()

Cruise::CruiseEngine::CruiseEngine ( OSystem syst,
const CRUISEGameDescription gameDesc 

Definition at line 43 of file cruise.cpp.

◆ ~ CruiseEngine()

virtual Cruise::CruiseEngine::~ CruiseEngine ( )

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Cruise::CruiseEngine::canLoadGameStateCurrently ( )

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 205 of file cruise.cpp.

◆ canSaveGameStateCurrently()

bool Cruise::CruiseEngine::canSaveGameStateCurrently ( )

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 213 of file cruise.cpp.

◆ deinitialize()

void Cruise::CruiseEngine::deinitialize ( )

Definition at line 115 of file cruise.cpp.

◆ getDebugger()

virtual GUI::Debugger* Cruise::CruiseEngine::getDebugger ( )

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 91 of file cruise.h.

◆ getFeatures()

uint32 Cruise::CruiseEngine::getFeatures ( ) const

◆ getGameId()

const char * Cruise::CruiseEngine::getGameId ( ) const

Definition at line 37 of file detection.cpp.

◆ getGameType()

int Cruise::CruiseEngine::getGameType ( ) const

◆ getLanguage()

Common::Language Cruise::CruiseEngine::getLanguage ( ) const

Definition at line 41 of file detection.cpp.

◆ getPlatform()

Common::Platform Cruise::CruiseEngine::getPlatform ( ) const

Definition at line 44 of file detection.cpp.

◆ getSavegameFile()

const char * Cruise::CruiseEngine::getSavegameFile ( int  saveGameIdx)

Definition at line 217 of file cruise.cpp.

◆ hasFeature()

bool Cruise::CruiseEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 78 of file cruise.cpp.

◆ initAllData()

void Cruise::CruiseEngine::initAllData ( )

Definition at line 435 of file cruise_main.cpp.

◆ initGame()

bool Cruise::CruiseEngine::initGame ( )

◆ initialize()

void Cruise::CruiseEngine::initialize ( )

Definition at line 106 of file cruise.cpp.

◆ langString()

const char* Cruise::CruiseEngine::langString ( LangStringId  langId)

Definition at line 93 of file cruise.h.

◆ loadGameState()

Common::Error Cruise::CruiseEngine::loadGameState ( int  slot)

Load a game state.

slotthe slot from which a savestate should be loaded
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 201 of file cruise.cpp.

◆ loadLanguageStrings()

bool Cruise::CruiseEngine::loadLanguageStrings ( )

Definition at line 128 of file cruise.cpp.

◆ mainLoop()

void Cruise::CruiseEngine::mainLoop ( )

Definition at line 1762 of file cruise_main.cpp.

◆ pauseEngine()

void Cruise::CruiseEngine::pauseEngine ( bool  pause)

Definition at line 181 of file cruise.cpp.

◆ processInput()

int Cruise::CruiseEngine::processInput ( )

Definition at line 1391 of file cruise_main.cpp.

◆ run()

Common::Error Cruise::CruiseEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 85 of file cruise.cpp.

◆ saveGameState()

Common::Error Cruise::CruiseEngine::saveGameState ( int  slot,
const Common::String desc 

Save a game state.

slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 209 of file cruise.cpp.

◆ shutdown()

void Cruise::CruiseEngine::shutdown ( )

◆ sound()

PCSound& Cruise::CruiseEngine::sound ( )

Definition at line 90 of file cruise.h.

◆ syncSoundSettings()

void Cruise::CruiseEngine::syncSoundSettings ( )

Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc.

values accordingly. The default implementation sets the volume levels of all mixer sound types according to the config entries of the active domain. When overwriting, call the default implementation first, then adjust the volumes further (if required).

When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.
find a better name for this

Reimplemented from Engine.

Definition at line 223 of file cruise.cpp.

Member Data Documentation

◆ _currentVolumeFile

Common::File Cruise::CruiseEngine::_currentVolumeFile

Definition at line 122 of file cruise.h.

◆ _debugger

Debugger* Cruise::CruiseEngine::_debugger

Definition at line 59 of file cruise.h.

◆ _dirtyRects

RectList Cruise::CruiseEngine::_dirtyRects

Definition at line 119 of file cruise.h.

◆ _gameDescription

const CRUISEGameDescription* Cruise::CruiseEngine::_gameDescription

Definition at line 102 of file cruise.h.

◆ _gameSpeed

int Cruise::CruiseEngine::_gameSpeed

Definition at line 64 of file cruise.h.

◆ _langStrings

Common::StringArray Cruise::CruiseEngine::_langStrings

Definition at line 61 of file cruise.h.

◆ _lastTick

uint32 Cruise::CruiseEngine::_lastTick

Definition at line 63 of file cruise.h.

◆ _memList

Common::List<MemInfo *> Cruise::CruiseEngine::_memList

Definition at line 115 of file cruise.h.

◆ _PAL_file

Common::File Cruise::CruiseEngine::_PAL_file

Definition at line 129 of file cruise.h.

◆ _polyStruct

Common::Array<CtStruct>* Cruise::CruiseEngine::_polyStruct

Definition at line 127 of file cruise.h.

◆ _polyStructExp

Common::Array<CtStruct> Cruise::CruiseEngine::_polyStructExp

Definition at line 125 of file cruise.h.

◆ _polyStructNorm

Common::Array<CtStruct> Cruise::CruiseEngine::_polyStructNorm

Definition at line 124 of file cruise.h.

◆ _polyStructs

Common::Array<CtStruct>* Cruise::CruiseEngine::_polyStructs

Definition at line 126 of file cruise.h.

◆ _preLoad

bool Cruise::CruiseEngine::_preLoad

Definition at line 58 of file cruise.h.

◆ _priorFrameRects

RectList Cruise::CruiseEngine::_priorFrameRects

Definition at line 120 of file cruise.h.

◆ _rnd

Common::RandomSource Cruise::CruiseEngine::_rnd

Definition at line 105 of file cruise.h.

◆ _savedCursor

CursorType Cruise::CruiseEngine::_savedCursor

Definition at line 62 of file cruise.h.

◆ _sound

PCSound* Cruise::CruiseEngine::_sound

Definition at line 60 of file cruise.h.

◆ _speedFlag

bool Cruise::CruiseEngine::_speedFlag

Definition at line 65 of file cruise.h.

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