ScummVM
Agi::AgiBase Class Referenceabstract

#include <agi.h>

+ Inheritance diagram for Agi::AgiBase:
+ Collaboration diagram for Agi::AgiBase:

Public Member Functions

virtual bool promptIsEnabled ()
 
virtual int getKeypress ()=0
 
virtual bool isKeypress ()=0
 
virtual void clearKeyQueue ()=0
 
 AgiBase (OSystem *syst, const AGIGameDescription *gameDesc)
 
 ~AgiBase () override
 
virtual void clearImageStack ()=0
 
virtual void recordImageStackCall (uint8 type, int16 p1, int16 p2, int16 p3, int16 p4, int16 p5, int16 p6, int16 p7)=0
 
virtual void replayImageStackCall (uint8 type, int16 p1, int16 p2, int16 p3, int16 p4, int16 p5, int16 p6, int16 p7)=0
 
virtual void releaseImageStack ()=0
 
bool getFlag (int16 flagNr)
 
void setFlag (int16 flagNr, bool newState)
 
void flipFlag (int16 flagNr)
 
uint32 getGameID () const
 
uint32 getFeatures () const
 
uint16 getVersion () const
 
uint16 getGameType () const
 
Common::Language getLanguage () const
 
Common::Platform getPlatform () const
 
const char * getGameMD5 () const
 
void initFeatures ()
 
void setFeature (uint32 feature)
 
void initVersion ()
 
void setVersion (uint16 version)
 
const char * getDiskName (uint16 id)
 
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
 
const bytegetFontData ()
 
void cycleInnerLoopActive (int16 loopType)
 
void cycleInnerLoopInactive ()
 
bool cycleInnerLoopIsActive ()
 
- Public Member Functions inherited from Engine
 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 GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
 
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. 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...
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
 
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 Save a game state. More...
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
 
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
 
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
 
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...
 
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
 
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
 
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
 
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
 
bool shouldPerformAutoSave (int lastSaveTime)
 

Public Attributes

Words_words
 
GfxFont_font
 
GfxMgr_gfx
 
Common::RenderMode _renderMode
 
AgiDebug _debug
 
AgiGame _game
 
Common::RandomSource_rnd
 
SoundMgr_sound
 
Mouse _mouse
 
bool _noSaveLoadAllowed
 
int _soundemu
 
const AGIGameDescription_gameDescription
 
uint32 _gameFeatures
 
uint16 _gameVersion
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error init ()
 
virtual Common::Error go ()=0
 
Common::Error run () override
 Init the engine and start its main loop. More...
 
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
 
virtual void initialize ()=0
 
void initRenderMode ()
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

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 MetaEnginegetMetaEngine ()
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Definition at line 711 of file agi.h.

Constructor & Destructor Documentation

◆ AgiBase()

Agi::AgiBase::AgiBase ( OSystem syst,
const AGIGameDescription gameDesc 
)

Definition at line 264 of file agi.cpp.

◆ ~AgiBase()

Agi::AgiBase::~AgiBase ( )
override

Definition at line 274 of file agi.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Agi::AgiBase::canLoadGameStateCurrently ( )
overridevirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 608 of file detection.cpp.

◆ canSaveGameStateCurrently()

bool Agi::AgiBase::canSaveGameStateCurrently ( )
overridevirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 626 of file detection.cpp.

◆ clearImageStack()

virtual void Agi::AgiBase::clearImageStack ( )
pure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ clearKeyQueue()

virtual void Agi::AgiBase::clearKeyQueue ( )
pure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ cycleInnerLoopActive()

void Agi::AgiBase::cycleInnerLoopActive ( int16  loopType)
inline

Definition at line 794 of file agi.h.

◆ cycleInnerLoopInactive()

void Agi::AgiBase::cycleInnerLoopInactive ( )
inline

Definition at line 798 of file agi.h.

◆ cycleInnerLoopIsActive()

bool Agi::AgiBase::cycleInnerLoopIsActive ( )
inline

Definition at line 801 of file agi.h.

◆ flipFlag()

void Agi::AgiBase::flipFlag ( int16  flagNr)

Definition at line 48 of file global.cpp.

◆ getDiskName()

const char * Agi::AgiBase::getDiskName ( uint16  id)

Definition at line 99 of file detection.cpp.

◆ getFeatures()

uint32 Agi::AgiBase::getFeatures ( ) const

Definition at line 59 of file detection.cpp.

◆ getFlag()

bool Agi::AgiBase::getFlag ( int16  flagNr)

Definition at line 31 of file global.cpp.

◆ getFontData()

const byte * Agi::AgiBase::getFontData ( )

Definition at line 346 of file agi.cpp.

◆ getGameID()

uint32 Agi::AgiBase::getGameID ( ) const

Definition at line 55 of file detection.cpp.

◆ getGameMD5()

const char * Agi::AgiBase::getGameMD5 ( ) const

Definition at line 79 of file detection.cpp.

◆ getGameType()

uint16 Agi::AgiBase::getGameType ( ) const

Definition at line 75 of file detection.cpp.

◆ getKeypress()

virtual int Agi::AgiBase::getKeypress ( )
pure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ getLanguage()

Common::Language Agi::AgiBase::getLanguage ( ) const

Definition at line 67 of file detection.cpp.

◆ getPlatform()

Common::Platform Agi::AgiBase::getPlatform ( ) const

Definition at line 63 of file detection.cpp.

◆ getVersion()

uint16 Agi::AgiBase::getVersion ( ) const

Definition at line 71 of file detection.cpp.

◆ go()

virtual Common::Error Agi::AgiBase::go ( )
protectedpure virtual

◆ hasFeature()

bool AgiBase::hasFeature ( EngineFeature  f) const
overrideprotectedvirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 242 of file detection.cpp.

◆ init()

Common::Error Agi::AgiBase::init ( void  )
protected

Definition at line 530 of file agi.cpp.

◆ initFeatures()

void Agi::AgiBase::initFeatures ( )

Definition at line 83 of file detection.cpp.

◆ initialize()

virtual void Agi::AgiBase::initialize ( )
protectedpure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ initRenderMode()

void Agi::AgiBase::initRenderMode ( )
protected

Definition at line 280 of file agi.cpp.

◆ initVersion()

void Agi::AgiBase::initVersion ( )

Definition at line 95 of file detection.cpp.

◆ isKeypress()

virtual bool Agi::AgiBase::isKeypress ( )
pure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ promptIsEnabled()

virtual bool Agi::AgiBase::promptIsEnabled ( )
inlinevirtual

Reimplemented in Agi::AgiEngine.

Definition at line 746 of file agi.h.

◆ recordImageStackCall()

virtual void Agi::AgiBase::recordImageStackCall ( uint8  type,
int16  p1,
int16  p2,
int16  p3,
int16  p4,
int16  p5,
int16  p6,
int16  p7 
)
pure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ releaseImageStack()

virtual void Agi::AgiBase::releaseImageStack ( )
pure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ replayImageStackCall()

virtual void Agi::AgiBase::replayImageStackCall ( uint8  type,
int16  p1,
int16  p2,
int16  p3,
int16  p4,
int16  p5,
int16  p6,
int16  p7 
)
pure virtual

Implemented in Agi::AgiEngine, and Agi::PreAgiEngine.

◆ run()

Common::Error Agi::AgiBase::run ( )
inlineoverrideprotectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 716 of file agi.h.

◆ setFeature()

void Agi::AgiBase::setFeature ( uint32  feature)

Definition at line 87 of file detection.cpp.

◆ setFlag()

void Agi::AgiBase::setFlag ( int16  flagNr,
bool  newState 
)

Definition at line 38 of file global.cpp.

◆ setVersion()

void Agi::AgiBase::setVersion ( uint16  version)

Definition at line 91 of file detection.cpp.

Member Data Documentation

◆ _debug

AgiDebug Agi::AgiBase::_debug

Definition at line 736 of file agi.h.

◆ _font

GfxFont* Agi::AgiBase::_font

Definition at line 732 of file agi.h.

◆ _game

AgiGame Agi::AgiBase::_game

Definition at line 737 of file agi.h.

◆ _gameDescription

const AGIGameDescription* Agi::AgiBase::_gameDescription

Definition at line 770 of file agi.h.

◆ _gameFeatures

uint32 Agi::AgiBase::_gameFeatures

Definition at line 772 of file agi.h.

◆ _gameVersion

uint16 Agi::AgiBase::_gameVersion

Definition at line 773 of file agi.h.

◆ _gfx

GfxMgr* Agi::AgiBase::_gfx

Definition at line 733 of file agi.h.

◆ _mouse

Mouse Agi::AgiBase::_mouse

Definition at line 742 of file agi.h.

◆ _noSaveLoadAllowed

bool Agi::AgiBase::_noSaveLoadAllowed

Definition at line 744 of file agi.h.

◆ _renderMode

Common::RenderMode Agi::AgiBase::_renderMode

Definition at line 735 of file agi.h.

◆ _rnd

Common::RandomSource* Agi::AgiBase::_rnd

Definition at line 738 of file agi.h.

◆ _sound

SoundMgr* Agi::AgiBase::_sound

Definition at line 740 of file agi.h.

◆ _soundemu

int Agi::AgiBase::_soundemu

Definition at line 764 of file agi.h.

◆ _words

Words* Agi::AgiBase::_words

Definition at line 730 of file agi.h.


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