ScummVM
Adl::AdlEngine Class Referenceabstract

#include <adl.h>

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

Public Member Functions

virtual ~AdlEngine ()
 
bool pollEvent (Common::Event &event) const
 
void bell (uint count=1) const
 
- Public Member Functions inherited from Engine
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...
 
 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 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 initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

Protected Types

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

Protected Member Functions

 AdlEngine (OSystem *syst, const AdlGameDescription *gd)
 
Common::Error loadGameState (int slot)
 Load a game state. More...
 
Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. 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)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
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 ()
 Init the engine and start its main loop. More...
 
bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
byte convertKey (uint16 ascii) const
 
Common::String getWord (const Common::String &line, uint &index) const
 
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 

Private Attributes

Console_console
 
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,
  kSupportsJoystick
}
 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 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 297 of file adl.h.

Constructor & Destructor Documentation

◆ ~AdlEngine()

Adl::AdlEngine::~AdlEngine ( )
virtual

Definition at line 74 of file adl.cpp.

◆ AdlEngine()

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

Definition at line 83 of file adl.cpp.

Member Function Documentation

◆ advanceClock()

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

Reimplemented in Adl::AdlEngine_v2.

Definition at line 293 of file adl.h.

◆ applyRegionWorkarounds()

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

Reimplemented in Adl::HiRes5Engine.

Definition at line 287 of file adl.h.

◆ applyRoomWorkarounds()

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

Reimplemented in Adl::HiRes5Engine.

Definition at line 286 of file adl.h.

◆ bell()

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

Definition at line 518 of file adl.cpp.

◆ canLoadGameStateCurrently()

bool Adl::AdlEngine::canLoadGameStateCurrently ( )
privatevirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 903 of file adl.cpp.

◆ canSaveGameStateCurrently()

bool Adl::AdlEngine::canSaveGameStateCurrently ( )
protectedvirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

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

Definition at line 986 of file adl.cpp.

◆ checkInput()

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

Definition at line 415 of file adl.cpp.

◆ convertKey()

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

Definition at line 1010 of file adl.cpp.

◆ createScriptEnv()

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

Definition at line 1464 of file adl.cpp.

◆ delay()

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

Definition at line 175 of file adl.cpp.

◆ dirStr()

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

Definition at line 1530 of file adl.cpp.

◆ doActions()

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

Definition at line 1401 of file adl.cpp.

◆ doAllCommands()

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

Definition at line 1445 of file adl.cpp.

◆ doOneCommand()

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

Definition at line 1426 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 509 of file adl.cpp.

◆ dropItem()

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

Definition at line 663 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 1080 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 1073 of file adl.cpp.

◆ gameLoop()

void Adl::AdlEngine::gameLoop ( )
protectedvirtual

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

Definition at line 678 of file adl.cpp.

◆ getCommand()

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

Definition at line 404 of file adl.cpp.

◆ getCurRegion() [1/2]

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

Definition at line 584 of file adl.cpp.

◆ getCurRegion() [2/2]

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

Definition at line 588 of file adl.cpp.

◆ getCurRoom() [1/2]

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

Definition at line 592 of file adl.cpp.

◆ getCurRoom() [2/2]

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

Definition at line 596 of file adl.cpp.

◆ getDebugger()

GUI::Debugger* Adl::AdlEngine::getDebugger ( )
inlineprivatevirtual

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 457 of file adl.h.

◆ getDiskImageName()

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

Definition at line 256 of file adl.h.

◆ getGameType()

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

Definition at line 257 of file adl.h.

◆ getGameVersion()

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

Definition at line 258 of file adl.h.

◆ getInput()

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

Definition at line 1089 of file adl.cpp.

◆ getItem() [1/2]

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

Definition at line 600 of file adl.cpp.

◆ getItem() [2/2]

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

Definition at line 610 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 168 of file adl.cpp.

◆ getLine()

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

Reimplemented in Adl::HiRes5Engine.

Definition at line 1024 of file adl.cpp.

◆ getRegion() [1/2]

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

Definition at line 556 of file adl.cpp.

◆ getRegion() [2/2]

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

Definition at line 563 of file adl.cpp.

◆ getRoom() [1/2]

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

Definition at line 570 of file adl.cpp.

◆ getRoom() [2/2]

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

Definition at line 577 of file adl.cpp.

◆ getScriptLine()

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

Definition at line 777 of file adl.cpp.

◆ getVar()

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

Definition at line 620 of file adl.cpp.

◆ getWord()

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

Definition at line 1043 of file adl.cpp.

◆ goDirection()

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

Reimplemented in Adl::HiRes6Engine.

Definition at line 1337 of file adl.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 766 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 485 of file adl.cpp.

◆ inputKey()

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

Definition at line 260 of file adl.cpp.

◆ inputString()

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

Definition at line 190 of file adl.cpp.

◆ isInputValid() [1/2]

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

Definition at line 425 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 431 of file adl.cpp.

◆ itemRoomStr()

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

Definition at line 1492 of file adl.cpp.

◆ itemStr()

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

Definition at line 1476 of file adl.cpp.

◆ loadDroppedItemOffsets()

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

Definition at line 500 of file adl.cpp.

◆ loadGameState()

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

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 858 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 815 of file adl.cpp.

◆ loadWords()

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

Definition at line 300 of file adl.cpp.

◆ matchCommand()

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

Definition at line 1372 of file adl.cpp.

◆ msgStr()

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

Definition at line 1526 of file adl.cpp.

◆ nounStr()

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

Definition at line 1519 of file adl.cpp.

◆ o_dropItem()

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

Definition at line 1358 of file adl.cpp.

◆ o_goDown()

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

Definition at line 338 of file adl.h.

◆ o_goEast()

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

Definition at line 335 of file adl.h.

◆ o_goNorth()

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

Definition at line 333 of file adl.h.

◆ o_goSouth()

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

Definition at line 334 of file adl.h.

◆ o_goUp()

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

Definition at line 337 of file adl.h.

◆ o_goWest()

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

Definition at line 336 of file adl.h.

◆ o_isCurPicEQ()

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

Definition at line 1164 of file adl.cpp.

◆ o_isItemInRoom()

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

Reimplemented in Adl::AdlEngine_v4.

Definition at line 1137 of file adl.cpp.

◆ o_isItemPicEQ()

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

Definition at line 1173 of file adl.cpp.

◆ o_isMovesGT()

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

Definition at line 1146 of file adl.cpp.

◆ o_isVarEQ()

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

Definition at line 1155 of file adl.cpp.

◆ o_listInv()

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

Definition at line 1203 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 1215 of file adl.cpp.

◆ o_placeItem()

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

Reimplemented in Adl::AdlEngine_v2.

Definition at line 1312 of file adl.cpp.

◆ o_printMsg()

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

Definition at line 1243 of file adl.cpp.

◆ o_quit()

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

Definition at line 1298 of file adl.cpp.

◆ o_resetPic()

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

Definition at line 1330 of file adl.cpp.

◆ o_restart()

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

Reimplemented in Adl::AdlEngine_v4.

Definition at line 1279 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 1271 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 1264 of file adl.cpp.

◆ o_setCurPic()

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

Reimplemented in Adl::AdlEngine_v2.

Definition at line 1229 of file adl.cpp.

◆ o_setDark()

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

Definition at line 1257 of file adl.cpp.

◆ o_setItemPic()

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

Definition at line 1323 of file adl.cpp.

◆ o_setLight()

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

Definition at line 1250 of file adl.cpp.

◆ o_setPic()

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

Reimplemented in Adl::AdlEngine_v2.

Definition at line 1236 of file adl.cpp.

◆ o_setRoom()

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

Definition at line 1222 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 1365 of file adl.cpp.

◆ o_takeItem()

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

Definition at line 1351 of file adl.cpp.

◆ o_varAdd()

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

Definition at line 1182 of file adl.cpp.

◆ o_varSet()

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

Definition at line 1196 of file adl.cpp.

◆ o_varSub()

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

Definition at line 1189 of file adl.cpp.

◆ op_debug()

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

Definition at line 1119 of file adl.cpp.

◆ opcode()

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

Definition at line 300 of file adl.h.

◆ openFile()

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

Definition at line 159 of file adl.cpp.

◆ playTones()

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

Definition at line 531 of file adl.cpp.

◆ pollEvent()

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

Definition at line 111 of file adl.cpp.

◆ printMessage()

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

Reimplemented in Adl::HiRes1Engine.

Definition at line 164 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 353 of file adl.cpp.

◆ readString()

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

Definition at line 136 of file adl.cpp.

◆ readStringAt()

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

Definition at line 154 of file adl.cpp.

◆ removeCommand()

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

Definition at line 391 of file adl.cpp.

◆ roomArg()

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

Reimplemented in Adl::AdlEngine_v2.

Definition at line 496 of file adl.cpp.

◆ roomStr()

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

Definition at line 1505 of file adl.cpp.

◆ run()

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

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 734 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 435 of file adl.h.

◆ runScript()

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

Definition at line 794 of file adl.cpp.

◆ saveGameState()

Common::Error Adl::AdlEngine::saveGameState ( int  slot,
const Common::String desc 
)
protectedvirtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 936 of file adl.cpp.

◆ saveState()

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

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

Definition at line 907 of file adl.cpp.

◆ setScriptDelay()

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

Definition at line 445 of file adl.h.

◆ setupOpcodeTables()

void Adl::AdlEngine::setupOpcodeTables ( )
protectedvirtual

◆ setVar()

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

Definition at line 627 of file adl.cpp.

◆ showRoom()

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

◆ stopScript()

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

Definition at line 810 of file adl.cpp.

◆ switchRegion()

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

Reimplemented in Adl::AdlEngine_v4.

Definition at line 442 of file adl.h.

◆ switchRoom()

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

Reimplemented in Adl::AdlEngine_v4.

Definition at line 491 of file adl.cpp.

◆ takeItem()

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

Reimplemented in Adl::AdlEngine_v2.

Definition at line 634 of file adl.cpp.

◆ toAscii()

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

Definition at line 1468 of file adl.cpp.

◆ verbStr()

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

Definition at line 1512 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 425 of file adl.h.

◆ _actOpcodes

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

Definition at line 384 of file adl.h.

◆ _canRestoreNow

bool Adl::AdlEngine::_canRestoreNow
protected

Definition at line 424 of file adl.h.

◆ _canSaveNow

bool Adl::AdlEngine::_canSaveNow
protected

Definition at line 424 of file adl.h.

◆ _condOpcodes

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

Definition at line 384 of file adl.h.

◆ _console

Console* Adl::AdlEngine::_console
private

Definition at line 456 of file adl.h.

◆ _display

Display* Adl::AdlEngine::_display
protected

Definition at line 379 of file adl.h.

◆ _dumpFile

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

Definition at line 377 of file adl.h.

◆ _gameDescription

const AdlGameDescription* Adl::AdlEngine::_gameDescription
protected

Definition at line 428 of file adl.h.

◆ _globalCommands

Commands Adl::AdlEngine::_globalCommands
protected

Definition at line 393 of file adl.h.

◆ _graphics

GraphicsMan* Adl::AdlEngine::_graphics
protected

Definition at line 380 of file adl.h.

◆ _inputScript

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

Definition at line 430 of file adl.h.

◆ _isQuitting

bool Adl::AdlEngine::_isQuitting
protected

Definition at line 423 of file adl.h.

◆ _isRestarting

bool Adl::AdlEngine::_isRestarting
protected

Definition at line 423 of file adl.h.

◆ _isRestoring

bool Adl::AdlEngine::_isRestoring
protected

Definition at line 423 of file adl.h.

◆ _itemOffsets

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

Definition at line 390 of file adl.h.

◆ _linesPrinted

uint Adl::AdlEngine::_linesPrinted
protected

Definition at line 422 of file adl.h.

◆ _messageIds

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

◆ _messages

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

Definition at line 386 of file adl.h.

◆ _nouns

WordMap Adl::AdlEngine::_nouns
protected

Definition at line 398 of file adl.h.

◆ _pictures

PictureMap Adl::AdlEngine::_pictures
protected

Definition at line 388 of file adl.h.

◆ _priNouns

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

Definition at line 400 of file adl.h.

◆ _priVerbs

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

Definition at line 399 of file adl.h.

◆ _random

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

Definition at line 426 of file adl.h.

◆ _restoreNoun

byte Adl::AdlEngine::_restoreNoun
private

Definition at line 458 of file adl.h.

◆ _restoreVerb

byte Adl::AdlEngine::_restoreVerb
private

Definition at line 458 of file adl.h.

◆ _roomCommands

Commands Adl::AdlEngine::_roomCommands
protected

Definition at line 392 of file adl.h.

◆ _roomData

RoomData Adl::AdlEngine::_roomData
protected

Definition at line 395 of file adl.h.

◆ _saveNoun

byte Adl::AdlEngine::_saveNoun
private

Definition at line 458 of file adl.h.

◆ _saveVerb

byte Adl::AdlEngine::_saveVerb
private

Definition at line 458 of file adl.h.

◆ _scriptDelay

uint Adl::AdlEngine::_scriptDelay
mutableprotected

Definition at line 431 of file adl.h.

◆ _scriptPaused

bool Adl::AdlEngine::_scriptPaused
mutableprotected

Definition at line 432 of file adl.h.

◆ _state

State Adl::AdlEngine::_state
protected

Definition at line 420 of file adl.h.

◆ _strings

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

◆ _textMode

bool Adl::AdlEngine::_textMode
protected

Definition at line 381 of file adl.h.

◆ _verbs

WordMap Adl::AdlEngine::_verbs
protected

Definition at line 397 of file adl.h.

◆ cantGoThere

uint Adl::AdlEngine::cantGoThere

Definition at line 412 of file adl.h.

◆ dontUnderstand

uint Adl::AdlEngine::dontUnderstand

Definition at line 413 of file adl.h.

◆ enterCommand

Common::String Adl::AdlEngine::enterCommand

Definition at line 403 of file adl.h.

◆ itemDoesntMove

uint Adl::AdlEngine::itemDoesntMove

Definition at line 414 of file adl.h.

◆ itemNotHere

uint Adl::AdlEngine::itemNotHere

Definition at line 415 of file adl.h.

◆ lineFeeds

Common::String Adl::AdlEngine::lineFeeds

Definition at line 408 of file adl.h.

◆ nounError

Common::String Adl::AdlEngine::nounError

Definition at line 405 of file adl.h.

◆ playAgain

Common::String Adl::AdlEngine::playAgain

Definition at line 406 of file adl.h.

◆ pressReturn

Common::String Adl::AdlEngine::pressReturn

Definition at line 407 of file adl.h.

◆ thanksForPlaying

uint Adl::AdlEngine::thanksForPlaying

Definition at line 416 of file adl.h.

◆ verbError

Common::String Adl::AdlEngine::verbError

Definition at line 404 of file adl.h.


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