ScummVM API documentation
CGE::CGEEngine Class Reference
Inheritance diagram for CGE::CGEEngine:
Engine

Public Member Functions

 CGEEngine (OSystem *syst, const ADGameDescription *gameDescription)
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
Common::Error run () override
 
void cge_main ()
 
void switchScene (int newScene)
 
void startCountDown ()
 
void quit ()
 
void resetQSwitch ()
 
void optionTouch (int opt, uint16 mask)
 
void resetGame ()
 
bool loadGame (int slotNumber, SavegameHeader *header=NULL, bool tiny=false)
 
void setMapBrick (int x, int z)
 
void switchMapping ()
 
void loadSprite (const char *fname, int ref, int scene, int col, int row, int pos)
 
void loadScript (const char *fname)
 
void loadUser ()
 
void runGame ()
 
bool showTitle (const char *name)
 
void movie (const char *ext)
 
void inf (const char *text, bool wideSpace=false)
 
void selectSound ()
 
void dummy ()
 
void NONE ()
 
void SB ()
 
void sceneDown ()
 
void sceneUp ()
 
void xScene ()
 
void qGame ()
 
void SBM ()
 
void GUS ()
 
void GUSM ()
 
void MIDI ()
 
void AUTO ()
 
void setPortD ()
 
void setPortM ()
 
void setIRQ ()
 
void setDMA ()
 
void mainLoop ()
 
void handleFrame ()
 
void saveGame (int slotNumber, const Common::String &desc)
 
void switchMusic ()
 
void selectPocket (int n)
 
void expandSprite (Sprite *spr)
 
void contractSprite (Sprite *spr)
 
int findPocket (Sprite *spr)
 
void feedSnail (Sprite *spr, SnList snq)
 
void pocFul ()
 
void hide1 (Sprite *spr)
 
void loadMapping ()
 
void heroCover (int cvr)
 
void trouble (int seq, int text)
 
void offUse ()
 
void tooFar ()
 
void loadHeroXY ()
 
void keyClick ()
 
void switchColorMode ()
 
void killSprite ()
 
void switchDebug ()
 
void miniStep (int stp)
 
void postMiniStep (int stp)
 
void showBak (int ref)
 
void initSceneValues ()
 
char * mergeExt (char *buf, const char *name, const char *ext)
 
int takeEnum (const char **tab, const char *text)
 
int newRandom (int range)
 
void sndSetVolume ()
 
Spritelocate (int ref)
 
SpritespriteAt (int x, int y)
 
Cluster XZ (int16 x, int16 y)
 
void killText ()
 
void snBackPt (Sprite *spr, int stp)
 
void snHBarrier (const int scene, const int barX)
 
void snVBarrier (const int scene, const int barY)
 
void snCover (Sprite *spr, int xref)
 
void snFlag (int indx, bool v)
 
void snFlash (bool on)
 
void snGame (Sprite *spr, int num)
 
void snGhost (Bitmap *bmp)
 
void snGive (Sprite *spr, int stp)
 
void snHide (Sprite *spr, int val)
 
void snKeep (Sprite *spr, int stp)
 
void snKill (Sprite *spr)
 
void snLevel (Sprite *spr, int lev)
 
void snLight (bool in)
 
void snMouse (bool on)
 
void snNNext (Sprite *spr, int p)
 
void snPort (Sprite *spr, int port)
 
void snReach (Sprite *spr, int mode)
 
void snRelZ (Sprite *spr, int z)
 
void snRNNext (Sprite *spr, int p)
 
void snRTNext (Sprite *spr, int p)
 
void snSend (Sprite *spr, int val)
 
void snRelX (Sprite *spr, int x)
 
void snRelY (Sprite *spr, int y)
 
void snRmNear (Sprite *spr)
 
void snRmTake (Sprite *spr)
 
void snRSeq (Sprite *spr, int val)
 
void snSeq (Sprite *spr, int val)
 
void snSetRef (Sprite *spr, int nr)
 
void snSetX (Sprite *spr, int x)
 
void snSetX0 (int scene, int x0)
 
void snSetXY (Sprite *spr, uint16 xy)
 
void snSetY (Sprite *spr, int y)
 
void snSetY0 (int scene, int y0)
 
void snSetZ (Sprite *spr, int z)
 
void snSlave (Sprite *spr, int ref)
 
void snSound (Sprite *spr, int wav)
 
void snSwap (Sprite *spr, int xref)
 
void snTNext (Sprite *spr, int p)
 
void snTrans (Sprite *spr, int trans)
 
void snUncover (Sprite *spr, Sprite *xspr)
 
void snWalk (Sprite *spr, int x, int y)
 
void snZTrim (Sprite *spr)
 
- Public Member Functions inherited from Engine
MetaEnginegetMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
bool existExtractedCDAudioFiles (uint track=1)
 
bool isDataAndCDAudioReadFromSameCD ()
 
void warnMissingExtractedCDAudio ()
 
void handleAutoSave ()
 
void saveAutosaveIfEnabled ()
 
virtual bool canSaveAutosaveCurrently ()
 
virtual int getAutosaveSlot () const
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 
virtual GUI::DebuggergetDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::DebuggergetOrCreateDebugger ()
 
bool enhancementEnabled (int32 cls)
 
virtual void syncSoundSettings ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Static Public Member Functions

static WARN_UNUSED_RESULT bool readSavegameHeader (Common::InSaveFile *in, SavegameHeader &header, bool skipThumbnail=true)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Public Attributes

bool _quitFlag
 
bool _showBoundariesFl
 
const ADGameDescription_gameDescription
 
int _startupMode
 
int _oldLev
 
int _pocPtr
 
bool _music
 
int _pocref [8]
 
uint8 _volume [2]
 
int _maxScene
 
bool _flag [4]
 
bool _dark
 
bool _game
 
bool _endGame
 
int _now
 
int _lev
 
int _mode
 
int _gameCase2Cpt
 
int _offUseCount
 
Dac_bitmapPalette
 
uint8 _clusterMap [20][40]
 
Sprite_sprTv
 
Sprite_sprK1
 
Sprite_sprK2
 
Sprite_sprK3
 
Common::Point _heroXY [8 *3]
 
Bar _barriers [8 *3+1]
 
Font_font
 
Vga_vga
 
System_sys
 
Sprite_pocLight
 
Keyboard_keyboard
 
Mouse_mouse
 
Sprite_sprite
 
Sprite_miniScene
 
Sprite_shadow
 
HorizLine_horzLine
 
InfoLine_infoLine
 
InfoLine_debugLine
 
SceneLight_sceneLight
 
CommandHandler_commandHandler
 
CommandHandler_commandHandlerTurbo
 
EventManager_eventManager
 
Fx_fx
 
Sound_sound
 
ResourceManager_resman
 
Sprite_pocket [8]
 
Walk_hero
 
Text_text
 
Talk_talk
 
Common::RandomSource _randomSource
 
MusicPlayer_midiPlayer
 
BitmapPtr_miniShp
 
BitmapPtr_miniShpList
 
int _startGameSlot
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Static Public Attributes

static const int _maxSceneArr [5]
 

Protected Attributes

int _recentStep
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Member Function Documentation

◆ hasFeature()

bool CGE::CGEEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool CGE::CGEEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool CGE::CGEEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ loadGameState()

Common::Error CGE::CGEEngine::loadGameState ( int  slot)
overridevirtual

Load a game state.

Parameters
slotThe slot from which a save state should be loaded.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ saveGameState()

Common::Error CGE::CGEEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
slotThe slot into which the save state should be stored.
descDescription for the save state, entered by the user.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ run()

Common::Error CGE::CGEEngine::run ( )
overridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.


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