ScummVM API documentation
Adl::AdlEngine Class Referenceabstract
Inheritance diagram for Adl::AdlEngine:
Engine Adl::AdlEngine_v2 Adl::AdlEngine_v3 Adl::AdlEngine_v4 Adl::AdlEngine_v5

Public Member Functions

bool pollEvent (Common::Event &event) const
 
void bell (uint count=1) const
 
- 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 ()
 
 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::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Protected Types

typedef Common::SharedPtr< Common::Functor1< ScriptEnv &, int > > Opcode
 

Protected Member Functions

 AdlEngine (OSystem *syst, const AdlGameDescription *gd)
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::String getSaveStateName (int slot) const override
 
int getAutosaveSlot () const override
 
Common::Path getDiskImageName (byte volume) const
 
GameType getGameType () const
 
GameVersion getGameVersion () const
 
Common::Language getLanguage () const
 
virtual void gameLoop ()
 
virtual void loadState (Common::ReadStream &stream)
 
virtual void saveState (Common::WriteStream &stream)
 
Common::String readString (Common::ReadStream &stream, byte until=0, const char *key="") const
 
Common::String readStringAt (Common::SeekableReadStream &stream, uint offset, byte until=0) const
 
void extractExeStrings (Common::ReadStream &stream, uint16 printAddr, Common::StringArray &strings) const
 
virtual void printString (const Common::String &str)=0
 
virtual Common::String loadMessage (uint idx) const =0
 
virtual void printMessage (uint idx)
 
virtual Common::String getItemDescription (const Item &item) const
 
void delay (uint32 ms) const
 
virtual Common::String getLine ()
 
Common::String inputString (byte prompt=0) const
 
byte inputKey (bool showCursor=true) const
 
void waitKey (uint32 ms=0, Common::KeyCode keycode=Common::KEYCODE_INVALID) const
 
virtual void getInput (uint &verb, uint &noun)
 
Common::String getWord (const Common::String &line, uint &index) const
 
virtual Common::String formatVerbError (const Common::String &verb) const
 
virtual Common::String formatNounError (const Common::String &verb, const Common::String &noun) const
 
void loadWords (Common::ReadStream &stream, WordMap &map, Common::StringArray &pri, uint count=0) const
 
void readCommands (Common::ReadStream &stream, Commands &commands)
 
void removeCommand (Commands &commands, uint idx)
 
CommandgetCommand (Commands &commands, uint idx)
 
void checkInput (byte verb, byte noun)
 
virtual bool isInputValid (byte verb, byte noun, bool &is_any)
 
virtual bool isInputValid (const Commands &commands, byte verb, byte noun, bool &is_any)
 
virtual void applyRoomWorkarounds (byte roomNr)
 
virtual void applyRegionWorkarounds ()
 
virtual void setupOpcodeTables ()
 
virtual void initState ()
 
virtual void switchRoom (byte roomNr)
 
virtual byte roomArg (byte room) const
 
virtual void advanceClock ()
 
void loadDroppedItemOffsets (Common::ReadStream &stream, byte count)
 
template<class T >
Opcode opcode (int(T::*f)(ScriptEnv &))
 
virtual int o_isItemInRoom (ScriptEnv &e)
 
virtual int o_isMovesGT (ScriptEnv &e)
 
virtual int o_isVarEQ (ScriptEnv &e)
 
virtual int o_isCurPicEQ (ScriptEnv &e)
 
virtual int o_isItemPicEQ (ScriptEnv &e)
 
virtual int o_varAdd (ScriptEnv &e)
 
virtual int o_varSub (ScriptEnv &e)
 
virtual int o_varSet (ScriptEnv &e)
 
virtual int o_listInv (ScriptEnv &e)
 
virtual int o_moveItem (ScriptEnv &e)
 
virtual int o_setRoom (ScriptEnv &e)
 
virtual int o_setCurPic (ScriptEnv &e)
 
virtual int o_setPic (ScriptEnv &e)
 
virtual int o_printMsg (ScriptEnv &e)
 
virtual int o_setLight (ScriptEnv &e)
 
virtual int o_setDark (ScriptEnv &e)
 
virtual int o_save (ScriptEnv &e)
 
virtual int o_restore (ScriptEnv &e)
 
virtual int o_restart (ScriptEnv &e)
 
virtual int o_quit (ScriptEnv &e)
 
virtual int o_placeItem (ScriptEnv &e)
 
virtual int o_setItemPic (ScriptEnv &e)
 
virtual int o_resetPic (ScriptEnv &e)
 
virtual int o_takeItem (ScriptEnv &e)
 
virtual int o_dropItem (ScriptEnv &e)
 
virtual int o_setRoomPic (ScriptEnv &e)
 
virtual int goDirection (ScriptEnv &e, Direction D)
 
int o_goNorth (ScriptEnv &e)
 
int o_goSouth (ScriptEnv &e)
 
int o_goEast (ScriptEnv &e)
 
int o_goWest (ScriptEnv &e)
 
int o_goUp (ScriptEnv &e)
 
int o_goDown (ScriptEnv &e)
 
void drawPic (byte pic, Common::Point pos=Common::Point()) const
 
bool playTones (const Tones &tones, bool isMusic, bool allowSkip=false) const
 
const RegiongetRegion (uint i) const
 
RegiongetRegion (uint i)
 
const RoomgetRoom (uint i) const
 
RoomgetRoom (uint i)
 
const RegiongetCurRegion () const
 
RegiongetCurRegion ()
 
const RoomgetCurRoom () const
 
RoomgetCurRoom ()
 
const ItemgetItem (uint i) const
 
ItemgetItem (uint i)
 
byte getVar (uint i) const
 
void setVar (uint i, byte value)
 
virtual void takeItem (byte noun)
 
virtual void dropItem (byte noun)
 
bool matchCommand (ScriptEnv &env) const
 
void doActions (ScriptEnv &env)
 
bool doOneCommand (const Commands &commands, byte verb, byte noun)
 
void doAllCommands (const Commands &commands, byte verb, byte noun)
 
virtual ScriptEnvcreateScriptEnv (const Command &cmd, byte room, byte verb, byte noun)
 
Common::String itemStr (uint i) const
 
Common::String roomStr (uint i) const
 
Common::String itemRoomStr (uint i) const
 
Common::String verbStr (uint i) const
 
Common::String nounStr (uint i) const
 
Common::String msgStr (uint i) const
 
Common::String dirStr (Direction dir) const
 
bool op_debug (const char *fmt,...) const
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Static Protected Member Functions

static Common::String toAscii (const Common::String &str)
 

Protected Attributes

Common::DumpFile_dumpFile
 
Display_display
 
GraphicsMan_graphics
 
bool _textMode
 
Common::Array< Opcode_condOpcodes
 
Common::Array< Opcode_actOpcodes
 
Common::Array< Common::DataBlockPtr_messages
 
PictureMap _pictures
 
Common::Array< Common::Point_itemOffsets
 
Commands _roomCommands
 
Commands _globalCommands
 
RoomData _roomData
 
WordMap _verbs
 
WordMap _nouns
 
Common::StringArray _priVerbs
 
Common::StringArray _priNouns
 
struct {
   Common::String   enterCommand
 
   Common::String   verbError
 
   Common::String   nounError
 
   Common::String   playAgain
 
   Common::String   pressReturn
 
   Common::String   lineFeeds
 
_strings
 
uint32 _verbErrorPos
 
uint32 _nounErrorPos
 
struct {
   uint   cantGoThere
 
   uint   dontUnderstand
 
   uint   itemDoesntMove
 
   uint   itemNotHere
 
   uint   thanksForPlaying
 
_messageIds
 
State _state
 
uint _linesPrinted
 
bool _isRestarting
 
bool _isRestoring
 
bool _isQuitting
 
bool _canSaveNow
 
bool _canRestoreNow
 
bool _abortScript
 
Common::RandomSource_random
 
const AdlGameDescription_gameDescription
 
Common::File_inputScript
 
uint _scriptDelay
 
bool _scriptPaused
 
- 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
}
 
- 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 inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Member Function Documentation

◆ loadGameState()

Common::Error Adl::AdlEngine::loadGameState ( int  slot)
overrideprotectedvirtual

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 Adl::AdlEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overrideprotectedvirtual

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.

◆ canSaveGameStateCurrently()

bool Adl::AdlEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overrideprotectedvirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

Reimplemented in Adl::AdlEngine_v2.

◆ getSaveStateName()

Common::String Adl::AdlEngine::getSaveStateName ( int  slot) const
overrideprotectedvirtual

Generate the savegame filename.

Reimplemented from Engine.

◆ getAutosaveSlot()

int Adl::AdlEngine::getAutosaveSlot ( ) const
inlineoverrideprotectedvirtual

Return the slot that should be used for autosaves, or -1 for engines that don't support autosave.

Note
This should match the meta engine getAutosaveSlot() method.

Reimplemented from Engine.


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