Cine::CineEngine Class Reference

#include <cine.h>

Inheritance diagram for Cine::CineEngine:
Collaboration diagram for Cine::CineEngine:

Public Member Functions

 CineEngine (OSystem *syst, const CINEGameDescription *gameDesc)
virtual ~CineEngine ()
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...
int getGameType () const
uint32 getFeatures () const
Common::Language getLanguage () const
Common::Platform getPlatform () const
bool loadSaveDirectory ()
void makeSystemMenu ()
int scummVMSaveLoadDialog (bool isSave)
int modifyGameSpeed (int speedChange)
 Modify game speed. More...
int getTimerDelay () const
Common::Error loadGameState (int slot)
 Load a game state. More...
Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
- 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...

Public Attributes

const CINEGameDescription_gameDescription
Common::File _partFileHandle
Common::RandomSource _rnd
Common::StringArray _volumeResourceFiles
StringPtrHashMap _volumeEntriesMap
TextHandler _textHandler
bool _restartRequested
Common::Array< AnimData_animDataTable
Common::List< BGIncrust_bgIncrustList
Common::StringArray _messageTable
Common::Array< ObjectStruct_objectTable
Common::List< overlay_overlayList
Common::Array< PalEntry_palArray
Common::Array< PartBuffer_partBuffer
ScriptList _globalScripts
ScriptList _objectScripts
RawObjectScriptArray _relTable
 Object script bytecode table. More...
ScriptVars _globalVars
 Global variables. More...
RawScriptArray _scriptTable
 Table of script bytecode. More...
Common::Array< uint16_zoneData
Common::Array< uint16_zoneQuery
 Only exists in Operation Stealth. More...
Common::List< SeqListElement_seqList
Common::String _commandBuffer
- Public Attributes inherited from Engine

Protected Member Functions

virtual Common::Error run ()
 Init the engine and start its main loop. More...
virtual bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. 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 showSplashScreen ()
void resetEngine ()
bool loadPlainSaveFW (Common::SeekableReadStream &in, CineSaveGameFormat saveGameFormat)
bool loadTempSaveOS (Common::SeekableReadStream &in)
bool makeLoad (const Common::String &saveName)
void makeSaveFW (Common::OutSaveFile &out)
void makeSaveOS (Common::OutSaveFile &out)
 Save an Operation Stealth type savegame. More...
void makeSave (const Common::String &saveFileName)
void mainLoop (int bootScriptIdx)
void readVolCnf ()

Private Attributes

bool _preLoad
int _timerDelayMultiplier

Additional Inherited Members

- 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...
- 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...
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 102 of file cine.h.

Constructor & Destructor Documentation

◆ CineEngine()

Cine::CineEngine::CineEngine ( OSystem syst,
const CINEGameDescription gameDesc 

Definition at line 48 of file cine.cpp.

◆ ~CineEngine()

Cine::CineEngine::~CineEngine ( )

Definition at line 73 of file cine.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Cine::CineEngine::canLoadGameStateCurrently ( )

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 256 of file detection.cpp.

◆ canSaveGameStateCurrently()

bool Cine::CineEngine::canSaveGameStateCurrently ( )

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 260 of file detection.cpp.

◆ getDebugger()

GUI::Debugger* Cine::CineEngine::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 143 of file cine.h.

◆ getFeatures()

uint32 Cine::CineEngine::getFeatures ( ) const

Definition at line 44 of file detection.cpp.

◆ getGameType()

int Cine::CineEngine::getGameType ( ) const

Definition at line 43 of file detection.cpp.

◆ getLanguage()

Common::Language Cine::CineEngine::getLanguage ( ) const

Definition at line 45 of file detection.cpp.

◆ getPlatform()

Common::Platform Cine::CineEngine::getPlatform ( ) const

Definition at line 46 of file detection.cpp.

◆ getTimerDelay()

int Cine::CineEngine::getTimerDelay ( ) const

Definition at line 139 of file cine.cpp.

◆ hasFeature()

bool Cine::CineEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 108 of file detection.cpp.

◆ initGame()

bool Cine::CineEngine::initGame ( )

◆ initialize()

void Cine::CineEngine::initialize ( )

Definition at line 154 of file cine.cpp.

◆ loadGameState()

Common::Error Cine::CineEngine::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 218 of file detection.cpp.

◆ loadPlainSaveFW()

bool Cine::CineEngine::loadPlainSaveFW ( Common::SeekableReadStream in,
CineSaveGameFormat  saveGameFormat 

Definition at line 654 of file saveload.cpp.

◆ loadSaveDirectory()

bool Cine::CineEngine::loadSaveDirectory ( )

Definition at line 461 of file saveload.cpp.

◆ loadTempSaveOS()

bool Cine::CineEngine::loadTempSaveOS ( Common::SeekableReadStream in)

Definition at line 484 of file saveload.cpp.

◆ mainLoop()

void Cine::CineEngine::mainLoop ( int  bootScriptIdx)

Definition at line 266 of file main_loop.cpp.

◆ makeLoad()

bool Cine::CineEngine::makeLoad ( const Common::String saveName)

Definition at line 782 of file saveload.cpp.

◆ makeSave()

void Cine::CineEngine::makeSave ( const Common::String saveFileName)

Definition at line 977 of file saveload.cpp.

◆ makeSaveFW()

void Cine::CineEngine::makeSaveFW ( Common::OutSaveFile out)

Definition at line 854 of file saveload.cpp.

◆ makeSaveOS()

void Cine::CineEngine::makeSaveOS ( Common::OutSaveFile out)

Save an Operation Stealth type savegame.


NOTE: This is going to be very much a work in progress so the Operation Stealth's savegame formats that are going to be tried are extremely probably not going to be supported at all after Operation Stealth becomes officially supported. This means that the savegame format will hopefully change to something nicer when official support for Operation Stealth begins.

Definition at line 903 of file saveload.cpp.

◆ makeSystemMenu()

void Cine::CineEngine::makeSystemMenu ( )

Definition at line 391 of file various.cpp.

◆ modifyGameSpeed()

int Cine::CineEngine::modifyGameSpeed ( int  speedChange)

Modify game speed.

speedChangeNegative values slow game down, positive values speed it up, zero does nothing
Timer delay multiplier's value after the game speed change

Definition at line 148 of file cine.cpp.

◆ readVolCnf()

void Cine::CineEngine::readVolCnf ( )

Definition at line 106 of file part.cpp.

◆ resetEngine()

void Cine::CineEngine::resetEngine ( )

Definition at line 291 of file various.cpp.

◆ run()

Common::Error Cine::CineEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 96 of file cine.cpp.

◆ saveGameState()

Common::Error Cine::CineEngine::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 226 of file detection.cpp.

◆ scummVMSaveLoadDialog()

int Cine::CineEngine::scummVMSaveLoadDialog ( bool  isSave)

Definition at line 342 of file various.cpp.

◆ showSplashScreen()

void Cine::CineEngine::showSplashScreen ( )

Definition at line 257 of file cine.cpp.

◆ shutdown()

void Cine::CineEngine::shutdown ( )

◆ syncSoundSettings()

void Cine::CineEngine::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 82 of file cine.cpp.

Member Data Documentation

◆ _animDataTable

Common::Array<AnimData> Cine::CineEngine::_animDataTable

Definition at line 167 of file cine.h.

◆ _bgIncrustList

Common::List<BGIncrust> Cine::CineEngine::_bgIncrustList

Definition at line 168 of file cine.h.

◆ _commandBuffer

Common::String Cine::CineEngine::_commandBuffer

Definition at line 192 of file cine.h.

◆ _console

CineConsole* Cine::CineEngine::_console

Definition at line 160 of file cine.h.

◆ _gameDescription

const CINEGameDescription* Cine::CineEngine::_gameDescription

Definition at line 134 of file cine.h.

◆ _globalScripts

ScriptList Cine::CineEngine::_globalScripts

Definition at line 174 of file cine.h.

◆ _globalVars

ScriptVars Cine::CineEngine::_globalVars

Global variables.

255 of these are saved, but there's one more that's used for bypassing the copy protection. In CineEngine::mainLoop(int bootScriptIdx) there's this code: globalVars[VAR_BYPASS_PROTECTION] = 0; And as VAR_BYPASS_PROTECTION is 255 that's why we're allocating one more than we otherwise would.

Definition at line 184 of file cine.h.

◆ _messageTable

Common::StringArray Cine::CineEngine::_messageTable

Definition at line 169 of file cine.h.

◆ _objectScripts

ScriptList Cine::CineEngine::_objectScripts

Definition at line 175 of file cine.h.

◆ _objectTable

Common::Array<ObjectStruct> Cine::CineEngine::_objectTable

Definition at line 170 of file cine.h.

◆ _overlayList

Common::List<overlay> Cine::CineEngine::_overlayList

Definition at line 171 of file cine.h.

◆ _palArray

Common::Array<PalEntry> Cine::CineEngine::_palArray

Definition at line 172 of file cine.h.

◆ _partBuffer

Common::Array<PartBuffer> Cine::CineEngine::_partBuffer

Definition at line 173 of file cine.h.

◆ _partFileHandle

Common::File Cine::CineEngine::_partFileHandle

Definition at line 135 of file cine.h.

◆ _preLoad

bool Cine::CineEngine::_preLoad

Definition at line 161 of file cine.h.

◆ _relTable

RawObjectScriptArray Cine::CineEngine::_relTable

Object script bytecode table.

Definition at line 176 of file cine.h.

◆ _restartRequested

bool Cine::CineEngine::_restartRequested

Definition at line 145 of file cine.h.

◆ _rnd

Common::RandomSource Cine::CineEngine::_rnd

Definition at line 137 of file cine.h.

◆ _scriptTable

RawScriptArray Cine::CineEngine::_scriptTable

Table of script bytecode.

Definition at line 185 of file cine.h.

◆ _seqList

Common::List<SeqListElement> Cine::CineEngine::_seqList

Definition at line 190 of file cine.h.

◆ _textHandler

TextHandler Cine::CineEngine::_textHandler

Definition at line 141 of file cine.h.

◆ _timerDelayMultiplier

int Cine::CineEngine::_timerDelayMultiplier

Definition at line 162 of file cine.h.

◆ _volumeEntriesMap

StringPtrHashMap Cine::CineEngine::_volumeEntriesMap

Definition at line 140 of file cine.h.

◆ _volumeResourceFiles

Common::StringArray Cine::CineEngine::_volumeResourceFiles

Definition at line 139 of file cine.h.

◆ _zoneData

Common::Array<uint16> Cine::CineEngine::_zoneData

Definition at line 187 of file cine.h.

◆ _zoneQuery

Common::Array<uint16> Cine::CineEngine::_zoneQuery

Only exists in Operation Stealth.

Definition at line 188 of file cine.h.

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