ScummVM API documentation
LastExpress::LastExpressEngine Class Reference
Inheritance diagram for LastExpress::LastExpressEngine:
Engine

Public Member Functions

 LastExpressEngine (OSystem *syst, const ADGameDescription *gd)
 
Common::RandomSourcegetRandom ()
 
ArchiveManagergetArchiveManager () const
 
GraphicsManagergetGraphicsManager () const
 
SubtitleManagergetSubtitleManager () const
 
MemoryManagergetMemoryManager () const
 
MessageManagergetMessageManager () const
 
NISManagergetNISManager () const
 
SoundManagergetSoundManager () const
 
LogicManagergetLogicManager () const
 
OtisManagergetOtisManager () const
 
SpriteManagergetSpriteManager () const
 
SaveManagergetSaveManager () const
 
VCRgetVCR () const
 
MenugetMenu () const
 
ClockgetClock () const
 
bool handleEvents ()
 
bool isDemo () const
 
bool isGoldEdition () const
 
bool isCompressed () const
 
Common::String getTargetName () const
 
void startUp ()
 
void shutDown ()
 
void waitForTimer (int millis)
 
void initGameData ()
 
void startNewGame ()
 
void engineEventHandler (Event *event)
 
int32 getSoundFrameCounter ()
 
bool getEventTickInternal ()
 
void setEventTickInternal (bool flag)
 
void mouseSetLeftClicked (bool hasClicked)
 
void mouseSetRightClicked (bool hasClicked)
 
bool mouseHasLeftClicked ()
 
bool mouseHasRightClicked ()
 
void doBeetle ()
 
void endBeetle ()
 
void positionSprite (Sprite *sprite, Common::Point coord)
 
void doCredits ()
 
void abortCredits ()
 
void creditsMouse (Event *event)
 
void creditsTimer (Event *event)
 
int32 readTGAIntoMemory (const char *filename, TGAHeader *tgaHeader)
 
void constructPalette (TGAHeader *tgaHeader, uint16 *palette)
 
bool demoEnding (bool wonGame)
 
void demoEndingMouse (Event *event)
 
void demoEndingTimer (Event *event)
 
void engineEventHandlerWrapper (Event *event)
 
void nodeStepMouseWrapper (Event *event)
 
void nodeStepTimerWrapper (Event *event)
 
void eggMouseWrapper (Event *event)
 
void eggTimerWrapper (Event *event)
 
void nisMouseWrapper (Event *event)
 
void nisTimerWrapper (Event *event)
 
void creditsMouseWrapper (Event *event)
 
void creditsTimerWrapper (Event *event)
 
void demoEndingMouseWrapper (Event *event)
 
void demoEndingTimerWrapper (Event *event)
 
void fightMouseWrapper (Event *event)
 
void fightTimerWrapper (Event *event)
 
void emptyHandler (Event *event)
 
int doFight (int fightId)
 
void abortFight ()
 
void showEngineInfo ()
 
- 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 ()
 
virtual int getAutosaveSlot () const
 
virtual bool gameTypeHasAddOns () const
 
virtual bool dirCanBeGameAddOn (const Common::FSDirectory &dir) const
 
virtual bool dirMustBeGameAddOn (const Common::FSDirectory &dir) const
 
Common::ErrorCode updateAddOns (const MetaEngine *metaEngine) const
 
 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::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameState (int slot)
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual bool canLoadGameStateCurrently (Common::U32String *msg=nullptr)
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
virtual bool canSaveGameStateCurrently (Common::U32String *msg=nullptr)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Static Public Member Functions

static void soundTimerHandler (void *refCon)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static bool warnUserAboutUnsupportedAddOn (Common::String addOnName)
 
static void errorAddingAddOnWithoutBaseGame (Common::String addOnName, Common::String gameId)
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Public Attributes

int32 _soundFrameCounter = 0
 
Common::Mutex_soundMutex
 
const char * _savegameFilename = nullptr
 
const char * _savegameTempNames [7]
 
const char * _savegameNames [6]
 
CVCRFile_savegame = nullptr
 
int32 _currentGameFileColorId = -1
 
int32 _gracePeriodTimer = 0
 
bool _eventTickInternal = false
 
bool _doShowCredits = false
 
int32 _currentSavePoint = 0
 
int32 _lastSavePointIdInFile = 0
 
int32 _gameTimeOfLastSavePointInFile = 0
 
int32 _gracePeriodIndex = 0
 
int32 _fightSkipCounter = 0
 
bool _navigationEngineIsRunning = false
 
bool _stopUpdatingCharacters = false
 
bool _charactersUpdateRecursionFlag = false
 
bool _mouseHasLeftClicked = false
 
bool _mouseHasRightClicked = false
 
bool _fastWalkJustDeactivated = false
 
int32 _cursorX = 320
 
int32 _cursorY = 240
 
int32 _cursorXOffscreenOffset = 0
 
int32 _cursorYOffscreenOffset = 0
 
int _cursorType = 0
 
bool _systemEventLeftMouseDown = false
 
bool _systemEventRightMouseDown = false
 
Common::Point _systemEventLastMouseCoords
 
bool _pendingExitEvent = false
 
bool _exitFromMenuButton = false
 
int32 _lastForcedScreenUpdateTicks = 0
 
Seq_doorSeqs [8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }
 
Seq_clockHandsSeqs [2] = { nullptr, nullptr }
 
int32 _clockHandsValues [2] = { 0, 0 }
 
int32 _fudgePosition [41]
 
byte * _globalMemoryPool = nullptr
 
byte * _soundMemoryPool = nullptr
 
byte * _cursorsMemoryPool = nullptr
 
Characters_characters = nullptr
 
SVCRSavePointHeader_savePointHeaders = nullptr
 
CBeetle_beetle = nullptr
 
int _savedFrameCounter = 0
 
int32 _savedFrameInterval = 0
 
int _doCredits = 0
 
void(LastExpressEngine::* _savedTimerEventHandle )(Event *) = nullptr
 
void(LastExpressEngine::* _savedMouseEventHandle )(Event *) = nullptr
 
CFight_fight = nullptr
 
bool _lockGracePeriod = false
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () override
 
bool hasFeature (EngineFeature f) const override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Member Function Documentation

◆ run()

Common::Error LastExpress::LastExpressEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool LastExpress::LastExpressEngine::hasFeature ( EngineFeature  f) const
overrideprotectedvirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Member Data Documentation

◆ _savegameTempNames

const char* LastExpress::LastExpressEngine::_savegameTempNames[7]
Initial value:
= {
"blue.tmp",
"red.tmp",
"green.tmp",
"purple.tmp",
"teal.tmp",
"gold.tmp",
"temp.tmp"
}

◆ _savegameNames

const char* LastExpress::LastExpressEngine::_savegameNames[6]
Initial value:
= {
"blue.egg",
"red.egg",
"green.egg",
"purple.egg",
"teal.egg",
"gold.egg"
}

◆ _fudgePosition

int32 LastExpress::LastExpressEngine::_fudgePosition[41]
Initial value:
= {
0, 851, 1430, 2110, 0, 2410, 2980, 3450,
3760, 4100, 4680, 5140, 5440, 5810, 6410, 6850,
7160, 7510, 8514, 0, 0, 0, 2086, 2690,
0, 3110, 3390, 3890, 4460, 4770, 5090, 5610,
6160, 6460, 6800, 7320, 7870, 8160, 8500, 9020,
9269
}

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