ScummVM
Adl::AdlEngine Class Referenceabstract

#include <adl.h>

+ Inheritance diagram for Adl::AdlEngine:
+ Collaboration diagram for Adl::AdlEngine:

Public Member Functions

 ~AdlEngine () override
 
bool pollEvent (Common::Event &event) const
 
void bell (uint count=1) const
 
- 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::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 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)
 

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
 Load a game state. More...
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 Save a game state. More...
 
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
 
virtual Common::String getSaveStateName (int slot) const override
 Generates the savegame filename. More...
 
Common::String getDiskImageName (byte volume) const
 
GameType getGameType () const
 
GameVersion getGameVersion () 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
 
Common::String readStringAt (Common::SeekableReadStream &stream, uint offset, byte until=0) const
 
void openFile (Common::File &file, const Common::String &name) 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 getInput (uint &verb, uint &noun)
 
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) 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)
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

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< 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
 
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
 

Private Member Functions

virtual void runIntro ()
 
virtual void init ()=0
 
virtual void initGameState ()=0
 
virtual void drawItems ()=0
 
virtual void drawItem (Item &item, const Common::Point &pos)=0
 
virtual void loadRoom (byte roomNr)=0
 
virtual void showRoom ()=0
 
virtual void switchRegion (byte region)
 
void runScript (const char *filename) const
 
void stopScript () const
 
void setScriptDelay (uint scriptDelay) const
 
Common::String getScriptLine () const
 
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...
 
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
 
byte convertKey (uint16 ascii) const
 
Common::String getWord (const Common::String &line, uint &index) const
 

Private Attributes

byte _saveVerb
 
byte _saveNoun
 
byte _restoreVerb
 
byte _restoreNoun
 

Friends

class Console
 

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...
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Detailed Description

Definition at line 240 of file adl.h.

Member Typedef Documentation

◆ Opcode

Definition at line 298 of file adl.h.

Constructor & Destructor Documentation

◆ ~AdlEngine()

Adl::AdlEngine::~AdlEngine ( )
override

Definition at line 74 of file adl.cpp.

◆ AdlEngine()

Adl::AdlEngine::AdlEngine ( OSystem syst,
const AdlGameDescription gd 
)
protected

Definition at line 82 of file adl.cpp.

Member Function Documentation

◆ advanceClock()

virtual void Adl::AdlEngine::advanceClock ( )
inlineprotectedvirtual

Reimplemented in Adl::AdlEngine_v2.

Definition at line 294 of file adl.h.

◆ applyRegionWorkarounds()

virtual void Adl::AdlEngine::applyRegionWorkarounds ( )
inlineprotectedvirtual

Reimplemented in Adl::HiRes5Engine.

Definition at line 288 of file adl.h.

◆ applyRoomWorkarounds()

virtual void Adl::AdlEngine::applyRoomWorkarounds ( byte  roomNr)
inlineprotectedvirtual

Reimplemented in Adl::HiRes5Engine.

Definition at line 287 of file adl.h.

◆ bell()

void Adl::AdlEngine::bell ( uint  count = 1) const

Definition at line 509 of file adl.cpp.

◆ canLoadGameStateCurrently()

bool Adl::AdlEngine::canLoadGameStateCurrently ( )
overrideprivatevirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 894 of file adl.cpp.

◆ canSaveGameStateCurrently()

bool Adl::AdlEngine::canSaveGameStateCurrently ( )
overrideprotectedvirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Reimplemented in Adl::HiRes6Engine, and Adl::AdlEngine_v2.

Definition at line 981 of file adl.cpp.

◆ checkInput()

void Adl::AdlEngine::checkInput ( byte  verb,
byte  noun 
)
protected

Definition at line 406 of file adl.cpp.

◆ convertKey()

byte Adl::AdlEngine::convertKey ( uint16  ascii) const
private

Definition at line 1005 of file adl.cpp.

◆ createScriptEnv()

ScriptEnv * Adl::AdlEngine::createScriptEnv ( const Command cmd,
byte  room,
byte  verb,
byte  noun 
)
protectedvirtual

Definition at line 1459 of file adl.cpp.

◆ delay()

void Adl::AdlEngine::delay ( uint32  ms) const
protected

Definition at line 166 of file adl.cpp.

◆ dirStr()

Common::String Adl::AdlEngine::dirStr ( Direction  dir) const
protected

Definition at line 1525 of file adl.cpp.

◆ doActions()

void Adl::AdlEngine::doActions ( ScriptEnv env)
protected

Definition at line 1396 of file adl.cpp.

◆ doAllCommands()

void Adl::AdlEngine::doAllCommands ( const Commands commands,
byte  verb,
byte  noun 
)
protected

Definition at line 1440 of file adl.cpp.

◆ doOneCommand()

bool Adl::AdlEngine::doOneCommand ( const Commands commands,
byte  verb,
byte  noun 
)
protected

Definition at line 1421 of file adl.cpp.

◆ drawItem()

virtual void Adl::AdlEngine::drawItem ( Item item,
const Common::Point pos 
)
privatepure virtual

Implemented in Adl::HiRes1Engine, and Adl::AdlEngine_v2.

◆ drawItems()

virtual void Adl::AdlEngine::drawItems ( )
privatepure virtual

Implemented in Adl::HiRes1Engine, and Adl::AdlEngine_v2.

◆ drawPic()

void Adl::AdlEngine::drawPic ( byte  pic,
Common::Point  pos = Common::Point() 
) const
protected

Definition at line 500 of file adl.cpp.

◆ dropItem()

void Adl::AdlEngine::dropItem ( byte  noun)
protectedvirtual

Definition at line 654 of file adl.cpp.

◆ formatNounError()

Common::String Adl::AdlEngine::formatNounError ( const Common::String verb,
const Common::String noun 
) const
protectedvirtual

Reimplemented in Adl::HiRes4Engine_Atari, and Adl::HiRes6Engine.

Definition at line 1075 of file adl.cpp.

◆ formatVerbError()

Common::String Adl::AdlEngine::formatVerbError ( const Common::String verb) const
protectedvirtual

Reimplemented in Adl::HiRes4Engine_Atari, and Adl::HiRes6Engine.

Definition at line 1068 of file adl.cpp.

◆ gameLoop()

void Adl::AdlEngine::gameLoop ( )
protectedvirtual

Reimplemented in Adl::AdlEngine_v4, and Adl::HiRes6Engine.

Definition at line 669 of file adl.cpp.

◆ getCommand()

Command & Adl::AdlEngine::getCommand ( Commands commands,
uint  idx 
)
protected

Definition at line 395 of file adl.cpp.

◆ getCurRegion() [1/2]

Region & Adl::AdlEngine::getCurRegion ( )
protected

Definition at line 579 of file adl.cpp.

◆ getCurRegion() [2/2]

const Region & Adl::AdlEngine::getCurRegion ( ) const
protected

Definition at line 575 of file adl.cpp.

◆ getCurRoom() [1/2]

Room & Adl::AdlEngine::getCurRoom ( )
protected

Definition at line 587 of file adl.cpp.

◆ getCurRoom() [2/2]

const Room & Adl::AdlEngine::getCurRoom ( ) const
protected

Definition at line 583 of file adl.cpp.

◆ getDiskImageName()

Common::String Adl::AdlEngine::getDiskImageName ( byte  volume) const
inlineprotected

Definition at line 257 of file adl.h.

◆ getGameType()

GameType Adl::AdlEngine::getGameType ( ) const
inlineprotected

Definition at line 258 of file adl.h.

◆ getGameVersion()

GameVersion Adl::AdlEngine::getGameVersion ( ) const
inlineprotected

Definition at line 259 of file adl.h.

◆ getInput()

void Adl::AdlEngine::getInput ( uint verb,
uint noun 
)
protected

Definition at line 1084 of file adl.cpp.

◆ getItem() [1/2]

Item & Adl::AdlEngine::getItem ( uint  i)
protected

Definition at line 601 of file adl.cpp.

◆ getItem() [2/2]

const Item & Adl::AdlEngine::getItem ( uint  i) const
protected

Definition at line 591 of file adl.cpp.

◆ getItemDescription()

Common::String Adl::AdlEngine::getItemDescription ( const Item item) const
protectedvirtual

Reimplemented in Adl::AdlEngine_v4, and Adl::AdlEngine_v3.

Definition at line 159 of file adl.cpp.

◆ getLine()

Common::String Adl::AdlEngine::getLine ( )
protectedvirtual

Reimplemented in Adl::HiRes5Engine.

Definition at line 1019 of file adl.cpp.

◆ getRegion() [1/2]

Region & Adl::AdlEngine::getRegion ( uint  i)
protected

Definition at line 554 of file adl.cpp.

◆ getRegion() [2/2]

const Region & Adl::AdlEngine::getRegion ( uint  i) const
protected

Definition at line 547 of file adl.cpp.

◆ getRoom() [1/2]

Room & Adl::AdlEngine::getRoom ( uint  i)
protected

Definition at line 568 of file adl.cpp.

◆ getRoom() [2/2]

const Room & Adl::AdlEngine::getRoom ( uint  i) const
protected

Definition at line 561 of file adl.cpp.

◆ getSaveStateName()

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

Generates the savegame filename.

Reimplemented from Engine.

Definition at line 927 of file adl.cpp.

◆ getScriptLine()

Common::String Adl::AdlEngine::getScriptLine ( ) const
private

Definition at line 768 of file adl.cpp.

◆ getVar()

byte Adl::AdlEngine::getVar ( uint  i) const
protected

Definition at line 611 of file adl.cpp.

◆ getWord()

Common::String Adl::AdlEngine::getWord ( const Common::String line,
uint index 
) const
private

Definition at line 1038 of file adl.cpp.

◆ goDirection()

int Adl::AdlEngine::goDirection ( ScriptEnv e,
Direction  D 
)
protectedvirtual

Reimplemented in Adl::HiRes6Engine.

Definition at line 1332 of file adl.cpp.

◆ hasFeature()

bool Adl::AdlEngine::hasFeature ( EngineFeature  f) const
overrideprivatevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 757 of file adl.cpp.

◆ init()

virtual void Adl::AdlEngine::init ( )
privatepure virtual

◆ initGameState()

virtual void Adl::AdlEngine::initGameState ( )
privatepure virtual

◆ initState()

void Adl::AdlEngine::initState ( )
protectedvirtual

Reimplemented in Adl::AdlEngine_v2.

Definition at line 476 of file adl.cpp.

◆ inputKey()

byte Adl::AdlEngine::inputKey ( bool  showCursor = true) const
protected

Definition at line 251 of file adl.cpp.

◆ inputString()

Common::String Adl::AdlEngine::inputString ( byte  prompt = 0) const
protected

Definition at line 181 of file adl.cpp.

◆ isInputValid() [1/2]

bool Adl::AdlEngine::isInputValid ( byte  verb,
byte  noun,
bool &  is_any 
)
protectedvirtual

Definition at line 416 of file adl.cpp.

◆ isInputValid() [2/2]

bool Adl::AdlEngine::isInputValid ( const Commands commands,
byte  verb,
byte  noun,
bool &  is_any 
)
protectedvirtual

Definition at line 422 of file adl.cpp.

◆ itemRoomStr()

Common::String Adl::AdlEngine::itemRoomStr ( uint  i) const
protected

Definition at line 1487 of file adl.cpp.

◆ itemStr()

Common::String Adl::AdlEngine::itemStr ( uint  i) const
protected

Definition at line 1471 of file adl.cpp.

◆ loadDroppedItemOffsets()

void Adl::AdlEngine::loadDroppedItemOffsets ( Common::ReadStream stream,
byte  count 
)
protected

Definition at line 491 of file adl.cpp.

◆ loadGameState()

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

Load a game state.

Parameters
slotthe slot from which a savestate should be loaded
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 849 of file adl.cpp.

◆ loadMessage()

virtual Common::String Adl::AdlEngine::loadMessage ( uint  idx) const
protectedpure virtual

◆ loadRoom()

virtual void Adl::AdlEngine::loadRoom ( byte  roomNr)
privatepure virtual

◆ loadState()

void Adl::AdlEngine::loadState ( Common::ReadStream stream)
protectedvirtual

Reimplemented in Adl::HiRes6Engine, and Adl::AdlEngine_v4.

Definition at line 806 of file adl.cpp.

◆ loadWords()

void Adl::AdlEngine::loadWords ( Common::ReadStream stream,
WordMap map,
Common::StringArray pri 
) const
protected

Definition at line 291 of file adl.cpp.

◆ matchCommand()

bool Adl::AdlEngine::matchCommand ( ScriptEnv env) const
protected

Definition at line 1367 of file adl.cpp.

◆ msgStr()

Common::String Adl::AdlEngine::msgStr ( uint  i) const
protected

Definition at line 1521 of file adl.cpp.

◆ nounStr()

Common::String Adl::AdlEngine::nounStr ( uint  i) const
protected

Definition at line 1514 of file adl.cpp.

◆ o_dropItem()

int Adl::AdlEngine::o_dropItem ( ScriptEnv e)
protectedvirtual

Definition at line 1353 of file adl.cpp.

◆ o_goDown()

int Adl::AdlEngine::o_goDown ( ScriptEnv e)
inlineprotected

Definition at line 339 of file adl.h.

◆ o_goEast()

int Adl::AdlEngine::o_goEast ( ScriptEnv e)
inlineprotected

Definition at line 336 of file adl.h.

◆ o_goNorth()

int Adl::AdlEngine::o_goNorth ( ScriptEnv e)
inlineprotected

Definition at line 334 of file adl.h.

◆ o_goSouth()

int Adl::AdlEngine::o_goSouth ( ScriptEnv e)
inlineprotected

Definition at line 335 of file adl.h.

◆ o_goUp()

int Adl::AdlEngine::o_goUp ( ScriptEnv e)
inlineprotected

Definition at line 338 of file adl.h.

◆ o_goWest()

int Adl::AdlEngine::o_goWest ( ScriptEnv e)
inlineprotected

Definition at line 337 of file adl.h.

◆ o_isCurPicEQ()

int Adl::AdlEngine::o_isCurPicEQ ( ScriptEnv e)
protectedvirtual

Definition at line 1159 of file adl.cpp.

◆ o_isItemInRoom()

int Adl::AdlEngine::o_isItemInRoom ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v4.

Definition at line 1132 of file adl.cpp.

◆ o_isItemPicEQ()

int Adl::AdlEngine::o_isItemPicEQ ( ScriptEnv e)
protectedvirtual

Definition at line 1168 of file adl.cpp.

◆ o_isMovesGT()

int Adl::AdlEngine::o_isMovesGT ( ScriptEnv e)
protectedvirtual

Definition at line 1141 of file adl.cpp.

◆ o_isVarEQ()

int Adl::AdlEngine::o_isVarEQ ( ScriptEnv e)
protectedvirtual

Definition at line 1150 of file adl.cpp.

◆ o_listInv()

int Adl::AdlEngine::o_listInv ( ScriptEnv e)
protectedvirtual

Definition at line 1198 of file adl.cpp.

◆ o_moveItem()

int Adl::AdlEngine::o_moveItem ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v4, and Adl::AdlEngine_v2.

Definition at line 1210 of file adl.cpp.

◆ o_placeItem()

int Adl::AdlEngine::o_placeItem ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v2.

Definition at line 1307 of file adl.cpp.

◆ o_printMsg()

int Adl::AdlEngine::o_printMsg ( ScriptEnv e)
protectedvirtual

Definition at line 1238 of file adl.cpp.

◆ o_quit()

int Adl::AdlEngine::o_quit ( ScriptEnv e)
protectedvirtual

Definition at line 1293 of file adl.cpp.

◆ o_resetPic()

int Adl::AdlEngine::o_resetPic ( ScriptEnv e)
protectedvirtual

Definition at line 1325 of file adl.cpp.

◆ o_restart()

int Adl::AdlEngine::o_restart ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v4.

Definition at line 1274 of file adl.cpp.

◆ o_restore()

int Adl::AdlEngine::o_restore ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v4, and Adl::AdlEngine_v2.

Definition at line 1266 of file adl.cpp.

◆ o_save()

int Adl::AdlEngine::o_save ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v4, and Adl::AdlEngine_v2.

Definition at line 1259 of file adl.cpp.

◆ o_setCurPic()

int Adl::AdlEngine::o_setCurPic ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v2.

Definition at line 1224 of file adl.cpp.

◆ o_setDark()

int Adl::AdlEngine::o_setDark ( ScriptEnv e)
protectedvirtual

Definition at line 1252 of file adl.cpp.

◆ o_setItemPic()

int Adl::AdlEngine::o_setItemPic ( ScriptEnv e)
protectedvirtual

Definition at line 1318 of file adl.cpp.

◆ o_setLight()

int Adl::AdlEngine::o_setLight ( ScriptEnv e)
protectedvirtual

Definition at line 1245 of file adl.cpp.

◆ o_setPic()

int Adl::AdlEngine::o_setPic ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v2.

Definition at line 1231 of file adl.cpp.

◆ o_setRoom()

int Adl::AdlEngine::o_setRoom ( ScriptEnv e)
protectedvirtual

Definition at line 1217 of file adl.cpp.

◆ o_setRoomPic()

int Adl::AdlEngine::o_setRoomPic ( ScriptEnv e)
protectedvirtual

Reimplemented in Adl::AdlEngine_v4, and Adl::AdlEngine_v5.

Definition at line 1360 of file adl.cpp.

◆ o_takeItem()

int Adl::AdlEngine::o_takeItem ( ScriptEnv e)
protectedvirtual

Definition at line 1346 of file adl.cpp.

◆ o_varAdd()

int Adl::AdlEngine::o_varAdd ( ScriptEnv e)
protectedvirtual

Definition at line 1177 of file adl.cpp.

◆ o_varSet()

int Adl::AdlEngine::o_varSet ( ScriptEnv e)
protectedvirtual

Definition at line 1191 of file adl.cpp.

◆ o_varSub()

int Adl::AdlEngine::o_varSub ( ScriptEnv e)
protectedvirtual

Definition at line 1184 of file adl.cpp.

◆ op_debug()

bool Adl::AdlEngine::op_debug ( const char *  fmt,
  ... 
) const
protected

Definition at line 1114 of file adl.cpp.

◆ opcode()

template<class T >
Opcode Adl::AdlEngine::opcode ( int(T::*)(ScriptEnv &)  f)
inlineprotected

Definition at line 301 of file adl.h.

◆ openFile()

void Adl::AdlEngine::openFile ( Common::File file,
const Common::String name 
) const
protected

Definition at line 150 of file adl.cpp.

◆ playTones()

bool Adl::AdlEngine::playTones ( const Tones tones,
bool  isMusic,
bool  allowSkip = false 
) const
protected

Definition at line 522 of file adl.cpp.

◆ pollEvent()

bool Adl::AdlEngine::pollEvent ( Common::Event event) const

Definition at line 109 of file adl.cpp.

◆ printMessage()

void Adl::AdlEngine::printMessage ( uint  idx)
protectedvirtual

Reimplemented in Adl::HiRes1Engine.

Definition at line 155 of file adl.cpp.

◆ printString()

virtual void Adl::AdlEngine::printString ( const Common::String str)
protectedpure virtual

◆ readCommands()

void Adl::AdlEngine::readCommands ( Common::ReadStream stream,
Commands commands 
)
protected

Definition at line 344 of file adl.cpp.

◆ readString()

Common::String Adl::AdlEngine::readString ( Common::ReadStream stream,
byte  until = 0 
) const
protected

Definition at line 127 of file adl.cpp.

◆ readStringAt()

Common::String Adl::AdlEngine::readStringAt ( Common::SeekableReadStream stream,
uint  offset,
byte  until = 0 
) const
protected

Definition at line 145 of file adl.cpp.

◆ removeCommand()

void Adl::AdlEngine::removeCommand ( Commands commands,
uint  idx 
)
protected

Definition at line 382 of file adl.cpp.

◆ roomArg()

byte Adl::AdlEngine::roomArg ( byte  room) const
protectedvirtual

Reimplemented in Adl::AdlEngine_v2.

Definition at line 487 of file adl.cpp.

◆ roomStr()

Common::String Adl::AdlEngine::roomStr ( uint  i) const
protected

Definition at line 1500 of file adl.cpp.

◆ run()

Common::Error Adl::AdlEngine::run ( )
overrideprivatevirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 725 of file adl.cpp.

◆ runIntro()

virtual void Adl::AdlEngine::runIntro ( )
inlineprivatevirtual

Reimplemented in Adl::HiRes2Engine, Adl::HiRes1Engine, Adl::HiRes4Engine, Adl::HiRes6Engine, and Adl::HiRes5Engine.

Definition at line 436 of file adl.h.

◆ runScript()

void Adl::AdlEngine::runScript ( const char *  filename) const
private

Definition at line 785 of file adl.cpp.

◆ 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 savestate should be stored
desca description for the savestate, entered by the user
isAutosaveExpected to be true if an autosave is being created
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 931 of file adl.cpp.

◆ saveState()

void Adl::AdlEngine::saveState ( Common::WriteStream stream)
protectedvirtual

Reimplemented in Adl::HiRes6Engine, and Adl::AdlEngine_v4.

Definition at line 898 of file adl.cpp.

◆ setScriptDelay()

void Adl::AdlEngine::setScriptDelay ( uint  scriptDelay) const
inlineprivate

Definition at line 446 of file adl.h.

◆ setupOpcodeTables()

void Adl::AdlEngine::setupOpcodeTables ( )
protectedvirtual

◆ setVar()

void Adl::AdlEngine::setVar ( uint  i,
byte  value 
)
protected

Definition at line 618 of file adl.cpp.

◆ showRoom()

virtual void Adl::AdlEngine::showRoom ( )
privatepure virtual

◆ stopScript()

void Adl::AdlEngine::stopScript ( ) const
private

Definition at line 801 of file adl.cpp.

◆ switchRegion()

virtual void Adl::AdlEngine::switchRegion ( byte  region)
inlineprivatevirtual

Reimplemented in Adl::AdlEngine_v4.

Definition at line 443 of file adl.h.

◆ switchRoom()

void Adl::AdlEngine::switchRoom ( byte  roomNr)
protectedvirtual

Reimplemented in Adl::AdlEngine_v4.

Definition at line 482 of file adl.cpp.

◆ takeItem()

void Adl::AdlEngine::takeItem ( byte  noun)
protectedvirtual

Reimplemented in Adl::AdlEngine_v2.

Definition at line 625 of file adl.cpp.

◆ toAscii()

Common::String Adl::AdlEngine::toAscii ( const Common::String str)
staticprotected

Definition at line 1463 of file adl.cpp.

◆ verbStr()

Common::String Adl::AdlEngine::verbStr ( uint  i) const
protected

Definition at line 1507 of file adl.cpp.

Friends And Related Function Documentation

◆ Console

friend class Console
friend

Definition at line 241 of file adl.h.

Member Data Documentation

◆ _abortScript

bool Adl::AdlEngine::_abortScript
protected

Definition at line 426 of file adl.h.

◆ _actOpcodes

Common::Array<Opcode> Adl::AdlEngine::_actOpcodes
protected

Definition at line 385 of file adl.h.

◆ _canRestoreNow

bool Adl::AdlEngine::_canRestoreNow
protected

Definition at line 425 of file adl.h.

◆ _canSaveNow

bool Adl::AdlEngine::_canSaveNow
protected

Definition at line 425 of file adl.h.

◆ _condOpcodes

Common::Array<Opcode> Adl::AdlEngine::_condOpcodes
protected

Definition at line 385 of file adl.h.

◆ _display

Display* Adl::AdlEngine::_display
protected

Definition at line 380 of file adl.h.

◆ _dumpFile

Common::DumpFile* Adl::AdlEngine::_dumpFile
protected

Definition at line 378 of file adl.h.

◆ _gameDescription

const AdlGameDescription* Adl::AdlEngine::_gameDescription
protected

Definition at line 429 of file adl.h.

◆ _globalCommands

Commands Adl::AdlEngine::_globalCommands
protected

Definition at line 394 of file adl.h.

◆ _graphics

GraphicsMan* Adl::AdlEngine::_graphics
protected

Definition at line 381 of file adl.h.

◆ _inputScript

Common::File* Adl::AdlEngine::_inputScript
mutableprotected

Definition at line 431 of file adl.h.

◆ _isQuitting

bool Adl::AdlEngine::_isQuitting
protected

Definition at line 424 of file adl.h.

◆ _isRestarting

bool Adl::AdlEngine::_isRestarting
protected

Definition at line 424 of file adl.h.

◆ _isRestoring

bool Adl::AdlEngine::_isRestoring
protected

Definition at line 424 of file adl.h.

◆ _itemOffsets

Common::Array<Common::Point> Adl::AdlEngine::_itemOffsets
protected

Definition at line 391 of file adl.h.

◆ _linesPrinted

uint Adl::AdlEngine::_linesPrinted
protected

Definition at line 423 of file adl.h.

◆ _messageIds

struct { ... } Adl::AdlEngine::_messageIds

◆ _messages

Common::Array<DataBlockPtr> Adl::AdlEngine::_messages
protected

Definition at line 387 of file adl.h.

◆ _nouns

WordMap Adl::AdlEngine::_nouns
protected

Definition at line 399 of file adl.h.

◆ _pictures

PictureMap Adl::AdlEngine::_pictures
protected

Definition at line 389 of file adl.h.

◆ _priNouns

Common::StringArray Adl::AdlEngine::_priNouns
protected

Definition at line 401 of file adl.h.

◆ _priVerbs

Common::StringArray Adl::AdlEngine::_priVerbs
protected

Definition at line 400 of file adl.h.

◆ _random

Common::RandomSource* Adl::AdlEngine::_random
protected

Definition at line 427 of file adl.h.

◆ _restoreNoun

byte Adl::AdlEngine::_restoreNoun
private

Definition at line 457 of file adl.h.

◆ _restoreVerb

byte Adl::AdlEngine::_restoreVerb
private

Definition at line 457 of file adl.h.

◆ _roomCommands

Commands Adl::AdlEngine::_roomCommands
protected

Definition at line 393 of file adl.h.

◆ _roomData

RoomData Adl::AdlEngine::_roomData
protected

Definition at line 396 of file adl.h.

◆ _saveNoun

byte Adl::AdlEngine::_saveNoun
private

Definition at line 457 of file adl.h.

◆ _saveVerb

byte Adl::AdlEngine::_saveVerb
private

Definition at line 457 of file adl.h.

◆ _scriptDelay

uint Adl::AdlEngine::_scriptDelay
mutableprotected

Definition at line 432 of file adl.h.

◆ _scriptPaused

bool Adl::AdlEngine::_scriptPaused
mutableprotected

Definition at line 433 of file adl.h.

◆ _state

State Adl::AdlEngine::_state
protected

Definition at line 421 of file adl.h.

◆ _strings

struct { ... } Adl::AdlEngine::_strings

◆ _textMode

bool Adl::AdlEngine::_textMode
protected

Definition at line 382 of file adl.h.

◆ _verbs

WordMap Adl::AdlEngine::_verbs
protected

Definition at line 398 of file adl.h.

◆ cantGoThere

uint Adl::AdlEngine::cantGoThere

Definition at line 413 of file adl.h.

◆ dontUnderstand

uint Adl::AdlEngine::dontUnderstand

Definition at line 414 of file adl.h.

◆ enterCommand

Common::String Adl::AdlEngine::enterCommand

Definition at line 404 of file adl.h.

◆ itemDoesntMove

uint Adl::AdlEngine::itemDoesntMove

Definition at line 415 of file adl.h.

◆ itemNotHere

uint Adl::AdlEngine::itemNotHere

Definition at line 416 of file adl.h.

◆ lineFeeds

Common::String Adl::AdlEngine::lineFeeds

Definition at line 409 of file adl.h.

◆ nounError

Common::String Adl::AdlEngine::nounError

Definition at line 406 of file adl.h.

◆ playAgain

Common::String Adl::AdlEngine::playAgain

Definition at line 407 of file adl.h.

◆ pressReturn

Common::String Adl::AdlEngine::pressReturn

Definition at line 408 of file adl.h.

◆ thanksForPlaying

uint Adl::AdlEngine::thanksForPlaying

Definition at line 417 of file adl.h.

◆ verbError

Common::String Adl::AdlEngine::verbError

Definition at line 405 of file adl.h.


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