ScummVM API documentation
CGE2::CGE2Engine Class Reference
Inheritance diagram for CGE2::CGE2Engine:
Engine

Public Member Functions

 CGE2Engine (OSystem *syst, const ADGameDescription *gameDescription)
 
bool hasFeature (EngineFeature f) const override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Language getLanguage () const
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
Common::Error loadGameState (int slot) override
 
Common::Error run () override
 
bool showTitle (const char *name)
 
void cge2_main ()
 
char * mergeExt (char *buf, const char *name, const char *ext)
 
void inf (const char *text, ColorBank col=kCBInf)
 
void movie (const char *ext)
 
void runGame ()
 
void loadHeroes ()
 
void loadScript (const char *fname, bool onlyToolbar=false)
 
SpriteloadSprite (const char *fname, int ref, int scene, V3D &pos)
 
void badLab (const char *fn)
 
void sceneUp (int cav)
 
void sceneDown ()
 
void closePocket ()
 
void switchScene (int scene)
 
void storeHeroPos ()
 
void showBak (int ref)
 
void loadTab ()
 
int newRandom (int range)
 
void openPocket ()
 
void selectPocket (int n)
 
void busy (bool on)
 
void feedSnail (Sprite *spr, Action snq, Hero *hero)
 
int freePockets (int sx)
 
int findActivePocket (int ref)
 
void pocFul ()
 
void killText ()
 
void mainLoop ()
 
void handleFrame ()
 
Spritelocate (int ref)
 
bool isHero (Sprite *spr)
 
void loadUser ()
 
void loadPos ()
 
void releasePocket (Sprite *spr)
 
void switchHero (int sex)
 
void offUse ()
 
void setAutoColors ()
 
bool cross (const V2D &a, const V2D &b, const V2D &c, const V2D &d)
 
bool contain (const V2D &a, const V2D &b, const V2D &p)
 
long det (const V2D &a, const V2D &b, const V2D &c)
 
int sgn (long n)
 
int mapCross (const V2D &a, const V2D &b)
 
SpritespriteAt (V2D pos)
 
void keyClick ()
 
void swapInPocket (Sprite *spr, Sprite *xspr)
 
void busyStep ()
 
void optionTouch (int opt, uint16 mask)
 
void switchColorMode ()
 
void switchMusic ()
 
void quit ()
 
void setVolume (int idx, int cnt)
 
void checkVolumeSwitches ()
 
void switchCap ()
 
void switchVox ()
 
void switchSay ()
 
void initToolbar ()
 
void initVolumeSwitch (Sprite *volSwitch, int val)
 
void checkMute ()
 
void checkSounds ()
 
void setEye (const V3D &e)
 
void setEye (const V2D &e2, int z=- 320)
 
void setEye (const char *s)
 
int number (char *s)
 
char * token (char *s)
 
char * tail (char *s)
 
int takeEnum (const char *const *tab, const char *text)
 
ID ident (const char *s)
 
bool testBool (char *s)
 
void snKill (Sprite *spr)
 
void snHide (Sprite *spr, int val)
 
void snMidi (int val)
 
void snSeq (Sprite *spr, int val)
 
void snRSeq (Sprite *spr, int val)
 
void snSend (Sprite *spr, int val)
 
void snSwap (Sprite *spr, int val)
 
void snCover (Sprite *spr, int val)
 
void snUncover (Sprite *spr, Sprite *spr2)
 
void snKeep (Sprite *spr, int val)
 
void snGive (Sprite *spr, int val)
 
void snGoto (Sprite *spr, int val)
 
void snPort (Sprite *spr, int port)
 
void snMouse (bool on)
 
void snNNext (Sprite *spr, Action act, int val)
 
void snRNNext (Sprite *spr, int val)
 
void snRMTNext (Sprite *spr, int val)
 
void snRFTNext (Sprite *spr, int val)
 
void snRmNear (Sprite *spr)
 
void snRmMTake (Sprite *spr)
 
void snRmFTake (Sprite *spr)
 
void snSetRef (Sprite *spr, int val)
 
void snFlash (bool on)
 
void snCycle (int cnt)
 
void snWalk (Sprite *spr, int val)
 
void snReach (Sprite *spr, int val)
 
void snSound (Sprite *spr, int wav, Audio::Mixer::SoundType soundType=Audio::Mixer::kSFXSoundType)
 
void snRoom (Sprite *spr, bool on)
 
void snGhost (Bitmap *bmp)
 
void snSay (Sprite *spr, int val)
 
void hide1 (Sprite *spr)
 
SpriteexpandSprite (Sprite *spr)
 
void qGame ()
 
void xScene ()
 
- 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

const ADGameDescription_gameDescription
 
Common::RandomSource _randomSource
 
bool _quitFlag
 
Dac_bitmapPalette
 
GamePhase _gamePhase
 
int _now
 
int _sex
 
int _mouseTop
 
bool _dark
 
int _waitSeq
 
int _waitRef
 
struct {
   int *   _wait
 
   int   _ref [2]
 
_soundStat
 
bool _taken
 
bool _endGame
 
int _req
 
NotifyFunctionType _midiNotify
 
NotifyFunctionType _spriteNotify
 
int _startGameSlot
 
bool _sayCap
 
bool _sayVox
 
int _oldMusicVolume
 
int _oldSfxVolume
 
bool _music
 
bool _muteAll
 
ResourceManager_resman
 
Vga_vga
 
MusicPlayer_midiPlayer
 
Fx_fx
 
Sound_sound
 
Text_text
 
HeroTab_heroTab [2]
 
V3D_eye
 
V3D_eyeTab [100]
 
Spare_spare
 
CommandHandler_commandHandler
 
CommandHandler_commandHandlerTurbo
 
Font_font
 
InfoLine_infoLine
 
Mouse_mouse
 
Keyboard_keyboard
 
Talk_talk
 
V3D_point [4]
 
System_sys
 
Sprite_busyPtr
 
Sprite_vol [2]
 
EventManager_eventManager
 
Map_map
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

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)
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Member Function Documentation

◆ hasFeature()

bool CGE2::CGE2Engine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool CGE2::CGE2Engine::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.

◆ canLoadGameStateCurrently()

bool CGE2::CGE2Engine::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.

◆ saveGameState()

Common::Error CGE2::CGE2Engine::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.

◆ loadGameState()

Common::Error CGE2::CGE2Engine::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.

◆ run()

Common::Error CGE2::CGE2Engine::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: