Access::AccessEngine Class Referenceabstract

#include <access.h>

+ Inheritance diagram for Access::AccessEngine:
+ Collaboration diagram for Access::AccessEngine:

Public Member Functions

 AccessEngine (OSystem *syst, const AccessGameDescription *gameDesc)
 ~AccessEngine () override
virtual void dead (int deathId)=0
uint32 getFeatures () const
bool isCD () const
bool isDemo () const
Common::Language getLanguage () const
Common::Platform getPlatform () const
uint16 getVersion () const
uint32 getGameID () const
uint32 getGameFeatures () const
bool shouldQuitOrRestart ()
int getRandomNumber (int maxNumber)
void loadCells (Common::Array< CellIdent > &cells)
void freeCells ()
 Free the sprites list. More...
virtual void establish (int esatabIndex, int sub)=0
void plotList ()
void plotList1 ()
void copyBlocks ()
void copyRects ()
void copyBF1BF2 ()
void copyBF2Vid ()
void freeChar ()
void printText (BaseSurface *s, const Common::String &msg)
 Draw a string on a given surface and update text positioning. More...
void speakText (BaseSurface *s, const Common::String &msg)
Common::Error loadGameState (int slot) override
 Load a savegame. More...
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 Save the game. More...
bool canLoadGameStateCurrently () override
 Returns true if a savegame can currently be loaded. More...
bool canSaveGameStateCurrently () override
 Returns true if the game can currently be saved. More...
void writeSavegameHeader (Common::OutSaveFile *out, AccessSavegameHeader &header)
 Write out a savegame header. More...
void SPRINTCHR (char c, int fontNum)
void PRINTCHR (Common::String msg, int fontNum)
bool playMovie (const Common::String &filename, const Common::Point &pos)
- 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 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)

Static Public Member Functions

static WARN_UNUSED_RESULT bool readSavegameHeader (Common::InSaveFile *in, AccessSavegameHeader &header, bool skipThumbnail=true)
 Read in a savegame header. 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

ASurface _buffer1
ASurface _buffer2
ASurface _vidBuf
int _vidX
int _vidY
Common::Array< CharEntry * > _charTable
SpriteResource_objectsTable [100]
bool _establishTable [100]
bool _establishFlag
int _establishMode
int _establishGroup
int _establishCtrlTblOfs
int _numAnimTimers
TimerList _timers
DeathList _deaths
FontManager _fonts
Common::Array< Common::Rect_newRects
Common::Array< Common::Rect_oldRects
Common::Array< ExtraCell_extraCells
ImageEntryList _images
int _mouseMode
int _playerDataCount
int _currentManOld
int _converseMode
bool _currentCharFlag
bool _boxSelect
int _scale
int _scaleH1
int _scaleH2
int _scaleN1
int _scaleT1
int _scaleMaxY
int _scaleI
int _scrollX
int _scrollY
int _scrollCol
int _scrollRow
bool _imgUnscaled
bool _canSaveLoad
int _printEnd
int _txtPages
int _narateFile
int _sndSubFile
int _countTbl [6]
int _conversation
int _currentMan
uint32 _newTime
uint32 _newDate
int _flags [256]
int _travel [60]
int _ask [40]
int _startTravelItem
int _startTravelBox
int _startAboutItem
int _startAboutBox
int _boxDataStart
bool _boxDataEnd
int _boxSelectY
int _boxSelectYOld
int _numLines
byte _byte26CB5
int _bcnt
int _pictureTaken
bool _vidEnd
bool _clearSummaryFlag
bool _cheatFl
bool _restartFl
int & _useItem
int & _startup
int & _manScaleOff
- Public Attributes inherited from Engine

Protected Member Functions

void doRoom ()
 Main handler for showing game rooms. More...
void playVideo (int videoNum, const Common::Point &pt)
 Play back an entire video. More...
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 playGame ()=0
 Play the game. More...
virtual void synchronize (Common::Serializer &s)
 Synchronize savegame data. More...
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...

Protected Attributes

const AccessGameDescription_gameDescription
Common::RandomSource _randomSource
int _loadSaveSlot
- Protected Attributes inherited from Engine
const Common::String _targetName

Private Member Functions

void initialize ()
 Handles basic initialization. More...
void setVGA ()
 Set VGA mode. More...

Private Attributes

uint32 _lastTime
uint32 _curTime

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

Detailed Description

Definition at line 89 of file access.h.

Constructor & Destructor Documentation

◆ AccessEngine()

Access::AccessEngine::AccessEngine ( OSystem syst,
const AccessGameDescription gameDesc 

Definition at line 35 of file access.cpp.

◆ ~AccessEngine()

Access::AccessEngine::~AccessEngine ( )

Definition at line 130 of file access.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Access::AccessEngine::canLoadGameStateCurrently ( )

Returns true if a savegame can currently be loaded.

Reimplemented from Engine.

Definition at line 502 of file access.cpp.

◆ canSaveGameStateCurrently()

bool Access::AccessEngine::canSaveGameStateCurrently ( )

Returns true if the game can currently be saved.

Reimplemented from Engine.

Definition at line 506 of file access.cpp.

◆ copyBF1BF2()

void Access::AccessEngine::copyBF1BF2 ( )

Definition at line 430 of file access.cpp.

◆ copyBF2Vid()

void Access::AccessEngine::copyBF2Vid ( )

Definition at line 437 of file access.cpp.

◆ copyBlocks()

void Access::AccessEngine::copyBlocks ( )

Definition at line 413 of file access.cpp.

◆ copyRects()

void Access::AccessEngine::copyRects ( )

Definition at line 422 of file access.cpp.

◆ dead()

virtual void Access::AccessEngine::dead ( int  deathId)
pure virtual

◆ doRoom()

void Access::AccessEngine::doRoom ( )

Main handler for showing game rooms.

◆ establish()

virtual void Access::AccessEngine::establish ( int  esatabIndex,
int  sub 
pure virtual

◆ freeCells()

void Access::AccessEngine::freeCells ( )

Free the sprites list.

Definition at line 239 of file access.cpp.

◆ freeChar()

void Access::AccessEngine::freeChar ( )

Definition at line 452 of file access.cpp.

◆ getFeatures()

uint32 Access::AccessEngine::getFeatures ( ) const

Definition at line 55 of file detection.cpp.

◆ getGameFeatures()

uint32 Access::AccessEngine::getGameFeatures ( ) const

Definition at line 51 of file detection.cpp.

◆ getGameID()

uint32 Access::AccessEngine::getGameID ( ) const

Definition at line 47 of file detection.cpp.

◆ getLanguage()

Common::Language Access::AccessEngine::getLanguage ( ) const

Definition at line 67 of file detection.cpp.

◆ getPlatform()

Common::Platform Access::AccessEngine::getPlatform ( ) const

Definition at line 71 of file detection.cpp.

◆ getRandomNumber()

int Access::AccessEngine::getRandomNumber ( int  maxNumber)

Definition at line 227 of file access.cpp.

◆ getVersion()

uint16 Access::AccessEngine::getVersion ( ) const

◆ hasFeature()

bool Access::AccessEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 121 of file detection.cpp.

◆ initialize()

void Access::AccessEngine::initialize ( )

Handles basic initialization.

Definition at line 158 of file access.cpp.

◆ isCD()

bool Access::AccessEngine::isCD ( ) const

Definition at line 59 of file detection.cpp.

◆ isDemo()

bool Access::AccessEngine::isDemo ( ) const

Definition at line 63 of file detection.cpp.

◆ loadCells()

void Access::AccessEngine::loadCells ( Common::Array< CellIdent > &  cells)

Definition at line 231 of file access.cpp.

◆ loadGameState()

Common::Error Access::AccessEngine::loadGameState ( int  slot)

Load a savegame.

Reimplemented from Engine.

Definition at line 477 of file access.cpp.

◆ playGame()

virtual void Access::AccessEngine::playGame ( )
protectedpure virtual

Play the game.

Implemented in Access::Amazon::AmazonEngine, and Access::Martian::MartianEngine.

◆ playMovie()

bool Access::AccessEngine::playMovie ( const Common::String filename,
const Common::Point pos 

Definition at line 696 of file movie_decoder.cpp.

◆ playVideo()

void Access::AccessEngine::playVideo ( int  videoNum,
const Common::Point pt 

Play back an entire video.

Definition at line 443 of file access.cpp.

◆ plotList()

void Access::AccessEngine::plotList ( )

Definition at line 357 of file access.cpp.

◆ plotList1()

void Access::AccessEngine::plotList1 ( )

Definition at line 362 of file access.cpp.


void Access::AccessEngine::PRINTCHR ( Common::String  msg,
int  fontNum 

Definition at line 599 of file access.cpp.

◆ printText()

void Access::AccessEngine::printText ( BaseSurface s,
const Common::String msg 

Draw a string on a given surface and update text positioning.

Definition at line 327 of file access.cpp.

◆ readSavegameHeader()

WARN_UNUSED_RESULT bool Access::AccessEngine::readSavegameHeader ( Common::InSaveFile in,
AccessSavegameHeader header,
bool  skipThumbnail = true 

Read in a savegame header.

Definition at line 530 of file access.cpp.

◆ run()

Common::Error Access::AccessEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 211 of file access.cpp.

◆ saveGameState()

Common::Error Access::AccessEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 

Save the game.

Reimplemented from Engine.

Definition at line 458 of file access.cpp.

◆ setVGA()

void Access::AccessEngine::setVGA ( )

Set VGA mode.

Definition at line 154 of file access.cpp.

◆ shouldQuitOrRestart()

bool Access::AccessEngine::shouldQuitOrRestart ( )

Definition at line 624 of file access.cpp.

◆ speakText()

void Access::AccessEngine::speakText ( BaseSurface s,
const Common::String msg 

Definition at line 246 of file access.cpp.


void Access::AccessEngine::SPRINTCHR ( char  c,
int  fontNum 

Definition at line 594 of file access.cpp.

◆ synchronize()

void Access::AccessEngine::synchronize ( Common::Serializer s)

Synchronize savegame data.

Reimplemented in Access::Amazon::AmazonEngine.

Definition at line 510 of file access.cpp.

◆ writeSavegameHeader()

void Access::AccessEngine::writeSavegameHeader ( Common::OutSaveFile out,
AccessSavegameHeader header 

Write out a savegame header.

Definition at line 564 of file access.cpp.

Member Data Documentation

◆ _aboutBox

BubbleBox* Access::AccessEngine::_aboutBox

Definition at line 137 of file access.h.

◆ _animation

AnimationManager* Access::AccessEngine::_animation

Definition at line 132 of file access.h.

◆ _ask

int Access::AccessEngine::_ask[40]

Definition at line 207 of file access.h.

◆ _bcnt

int Access::AccessEngine::_bcnt

Definition at line 218 of file access.h.

◆ _boxDataEnd

bool Access::AccessEngine::_boxDataEnd

Definition at line 213 of file access.h.

◆ _boxDataStart

int Access::AccessEngine::_boxDataStart

Definition at line 212 of file access.h.

◆ _boxSelect

bool Access::AccessEngine::_boxSelect

Definition at line 178 of file access.h.

◆ _boxSelectY

int Access::AccessEngine::_boxSelectY

Definition at line 214 of file access.h.

◆ _boxSelectYOld

int Access::AccessEngine::_boxSelectYOld

Definition at line 215 of file access.h.

◆ _bubbleBox

BubbleBox* Access::AccessEngine::_bubbleBox

Definition at line 133 of file access.h.

◆ _buffer1

ASurface Access::AccessEngine::_buffer1

Definition at line 153 of file access.h.

◆ _buffer2

ASurface Access::AccessEngine::_buffer2

Definition at line 154 of file access.h.

◆ _byte26CB5

byte Access::AccessEngine::_byte26CB5

Definition at line 217 of file access.h.

◆ _canSaveLoad

bool Access::AccessEngine::_canSaveLoad

Definition at line 188 of file access.h.

◆ _char

CharManager* Access::AccessEngine::_char

Definition at line 138 of file access.h.

◆ _charTable

Common::Array<CharEntry *> Access::AccessEngine::_charTable

Definition at line 157 of file access.h.

◆ _cheatFl

bool Access::AccessEngine::_cheatFl

Definition at line 225 of file access.h.

◆ _clearSummaryFlag

bool Access::AccessEngine::_clearSummaryFlag

Definition at line 224 of file access.h.

◆ _conversation

int Access::AccessEngine::_conversation

Definition at line 198 of file access.h.

◆ _converseMode

int Access::AccessEngine::_converseMode

Definition at line 176 of file access.h.

◆ _countTbl

int Access::AccessEngine::_countTbl[6]

Definition at line 195 of file access.h.

◆ _current

BaseSurface* Access::AccessEngine::_current

Definition at line 152 of file access.h.

◆ _currentCharFlag

bool Access::AccessEngine::_currentCharFlag

Definition at line 177 of file access.h.

◆ _currentMan

int Access::AccessEngine::_currentMan

Definition at line 199 of file access.h.

◆ _currentManOld

int Access::AccessEngine::_currentManOld

Definition at line 175 of file access.h.

◆ _curTime

uint32 Access::AccessEngine::_curTime

Definition at line 91 of file access.h.

◆ _deaths

DeathList Access::AccessEngine::_deaths

Definition at line 166 of file access.h.

◆ _destIn

BaseSurface* Access::AccessEngine::_destIn

Definition at line 151 of file access.h.

◆ _establish

Resource* Access::AccessEngine::_establish

Definition at line 190 of file access.h.

◆ _establishCtrlTblOfs

int Access::AccessEngine::_establishCtrlTblOfs

Definition at line 163 of file access.h.

◆ _establishFlag

bool Access::AccessEngine::_establishFlag

Definition at line 160 of file access.h.

◆ _establishGroup

int Access::AccessEngine::_establishGroup

Definition at line 162 of file access.h.

◆ _establishMode

int Access::AccessEngine::_establishMode

Definition at line 161 of file access.h.

◆ _establishTable

bool Access::AccessEngine::_establishTable[100]

Definition at line 159 of file access.h.

◆ _events

EventsManager* Access::AccessEngine::_events

Definition at line 139 of file access.h.

◆ _extraCells

Common::Array<ExtraCell> Access::AccessEngine::_extraCells

Definition at line 170 of file access.h.

◆ _files

FileManager* Access::AccessEngine::_files

Definition at line 140 of file access.h.

◆ _flags

int Access::AccessEngine::_flags[256]

Definition at line 202 of file access.h.

◆ _fonts

FontManager Access::AccessEngine::_fonts

Definition at line 167 of file access.h.

◆ _gameDescription

const AccessGameDescription* Access::AccessEngine::_gameDescription

Definition at line 104 of file access.h.

◆ _helpBox

BubbleBox* Access::AccessEngine::_helpBox

Definition at line 134 of file access.h.

◆ _images

ImageEntryList Access::AccessEngine::_images

Definition at line 171 of file access.h.

◆ _imgUnscaled

bool Access::AccessEngine::_imgUnscaled

Definition at line 187 of file access.h.

◆ _invBox

BubbleBox* Access::AccessEngine::_invBox

Definition at line 136 of file access.h.

◆ _inventory

InventoryManager* Access::AccessEngine::_inventory

Definition at line 141 of file access.h.

◆ _lastTime

uint32 Access::AccessEngine::_lastTime

Definition at line 91 of file access.h.

◆ _loadSaveSlot

int Access::AccessEngine::_loadSaveSlot

Definition at line 106 of file access.h.

◆ _manScaleOff

int& Access::AccessEngine::_manScaleOff

Definition at line 230 of file access.h.

◆ _midi

MusicManager* Access::AccessEngine::_midi

Definition at line 148 of file access.h.

◆ _mouseMode

int Access::AccessEngine::_mouseMode

Definition at line 172 of file access.h.

◆ _narateFile

int Access::AccessEngine::_narateFile

Definition at line 193 of file access.h.

◆ _newDate

uint32 Access::AccessEngine::_newDate

Definition at line 201 of file access.h.

◆ _newRects

Common::Array<Common::Rect> Access::AccessEngine::_newRects

Definition at line 168 of file access.h.

◆ _newTime

uint32 Access::AccessEngine::_newTime

Definition at line 200 of file access.h.

◆ _numAnimTimers

int Access::AccessEngine::_numAnimTimers

Definition at line 164 of file access.h.

◆ _numLines

int Access::AccessEngine::_numLines

Definition at line 216 of file access.h.

◆ _objectsTable

SpriteResource* Access::AccessEngine::_objectsTable[100]

Definition at line 158 of file access.h.

◆ _oldRects

Common::Array<Common::Rect> Access::AccessEngine::_oldRects

Definition at line 169 of file access.h.

◆ _pictureTaken

int Access::AccessEngine::_pictureTaken

Definition at line 220 of file access.h.

◆ _player

Player* Access::AccessEngine::_player

Definition at line 142 of file access.h.

◆ _playerDataCount

int Access::AccessEngine::_playerDataCount

Definition at line 174 of file access.h.

◆ _printEnd

int Access::AccessEngine::_printEnd

Definition at line 191 of file access.h.

◆ _randomSource

Common::RandomSource Access::AccessEngine::_randomSource

Definition at line 105 of file access.h.

◆ _res

Resources* Access::AccessEngine::_res

Definition at line 143 of file access.h.

◆ _restartFl

bool Access::AccessEngine::_restartFl

Definition at line 226 of file access.h.

◆ _room

Room* Access::AccessEngine::_room

Definition at line 144 of file access.h.

◆ _scale

int Access::AccessEngine::_scale

Definition at line 179 of file access.h.

◆ _scaleH1

int Access::AccessEngine::_scaleH1

Definition at line 180 of file access.h.

◆ _scaleH2

int Access::AccessEngine::_scaleH2

Definition at line 180 of file access.h.

◆ _scaleI

int Access::AccessEngine::_scaleI

Definition at line 184 of file access.h.

◆ _scaleMaxY

int Access::AccessEngine::_scaleMaxY

Definition at line 183 of file access.h.

◆ _scaleN1

int Access::AccessEngine::_scaleN1

Definition at line 181 of file access.h.

◆ _scaleT1

int Access::AccessEngine::_scaleT1

Definition at line 182 of file access.h.

◆ _screen

Screen* Access::AccessEngine::_screen

Definition at line 145 of file access.h.

◆ _scripts

Scripts* Access::AccessEngine::_scripts

Definition at line 146 of file access.h.

◆ _scrollCol

int Access::AccessEngine::_scrollCol

Definition at line 186 of file access.h.

◆ _scrollRow

int Access::AccessEngine::_scrollRow

Definition at line 186 of file access.h.

◆ _scrollX

int Access::AccessEngine::_scrollX

Definition at line 185 of file access.h.

◆ _scrollY

int Access::AccessEngine::_scrollY

Definition at line 185 of file access.h.

◆ _sndSubFile

int Access::AccessEngine::_sndSubFile

Definition at line 194 of file access.h.

◆ _sound

SoundManager* Access::AccessEngine::_sound

Definition at line 147 of file access.h.

◆ _startAboutBox

int Access::AccessEngine::_startAboutBox

Definition at line 211 of file access.h.

◆ _startAboutItem

int Access::AccessEngine::_startAboutItem

Definition at line 210 of file access.h.

◆ _startTravelBox

int Access::AccessEngine::_startTravelBox

Definition at line 209 of file access.h.

◆ _startTravelItem

int Access::AccessEngine::_startTravelItem

Definition at line 208 of file access.h.

◆ _startup

int& Access::AccessEngine::_startup

Definition at line 229 of file access.h.

◆ _tempList

byte* Access::AccessEngine::_tempList

Definition at line 219 of file access.h.

◆ _timers

TimerList Access::AccessEngine::_timers

Definition at line 165 of file access.h.

◆ _travel

int Access::AccessEngine::_travel[60]

Definition at line 206 of file access.h.

◆ _travelBox

BubbleBox* Access::AccessEngine::_travelBox

Definition at line 135 of file access.h.

◆ _txtPages

int Access::AccessEngine::_txtPages

Definition at line 192 of file access.h.

◆ _useItem

int& Access::AccessEngine::_useItem

Definition at line 228 of file access.h.

◆ _vidBuf

ASurface Access::AccessEngine::_vidBuf

Definition at line 155 of file access.h.

◆ _vidEnd

bool Access::AccessEngine::_vidEnd

Definition at line 223 of file access.h.

◆ _video

VideoPlayer* Access::AccessEngine::_video

Definition at line 149 of file access.h.

◆ _vidX

int Access::AccessEngine::_vidX

Definition at line 156 of file access.h.

◆ _vidY

int Access::AccessEngine::_vidY

Definition at line 156 of file access.h.

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