ScummVM API documentation
Private::PrivateEngine Class Reference
Inheritance diagram for Private::PrivateEngine:
Engine

Public Member Functions

 PrivateEngine (OSystem *syst, const ADGameDescription *gd)
 
bool isDemo () const
 
Common::Error run () override
 
void restartGame ()
 
void clearAreas ()
 
void initializePath (const Common::FSNode &gamePath) override
 
Common::SeekableReadStreamloadAssets ()
 
Common::ArchiveloadMacInstaller ()
 
void initFuncs ()
 
void selectPauseGame (Common::Point)
 
void selectMask (Common::Point)
 
void selectExit (Common::Point)
 
void selectLoadGame (Common::Point)
 
void selectSaveGame (Common::Point)
 
void resumeGame ()
 
void updateCursor (Common::Point)
 
bool cursorPauseMovie (Common::Point)
 
bool cursorExit (Common::Point)
 
bool cursorSafeDigit (Common::Point)
 
bool cursorMask (Common::Point)
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveAutosaveCurrently () override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
void ignoreEvents ()
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
void playVideo (const Common::String &)
 
void skipVideo ()
 
void destroyVideo ()
 
void loadSubtitles (const Common::Path &path)
 
void adjustSubtitleSize ()
 
Graphics::SurfacedecodeImage (const Common::String &file, byte **palette, bool *isNewPalette)
 
void remapImage (uint16 ncolors, const Graphics::Surface *oldImage, const byte *oldPalette, Graphics::Surface *newImage, const byte *currentPalette)
 
void loadImage (const Common::String &file, int x, int y)
 
void drawScreenFrame (const byte *videoPalette)
 
void changeCursor (const Common::String &)
 
Common::String getInventoryCursor ()
 
Common::String getExitCursor ()
 
void loadCursors ()
 
Graphics::SurfaceloadMask (const Common::String &, int, int, bool)
 
void loadMaskAndInfo (MaskInfo *m, const Common::String &name, int x, int y, bool drawn)
 
void drawMask (Graphics::Surface *)
 
void fillRect (uint32, Common::Rect)
 
bool inMask (Graphics::Surface *, Common::Point)
 
void drawScreen ()
 
Common::String getPauseMovieSetting ()
 
Common::String getGoIntroSetting ()
 
Common::String getMainDesktopSetting ()
 
Common::String getDiaryTOCSetting ()
 
Common::String getDiaryMiddleSetting ()
 
Common::String getDiaryLastPageSetting ()
 
Common::String getPOGoBustMovieSetting ()
 
Common::String getPoliceBustFromMOSetting ()
 
Common::String getListenToPhoneSetting ()
 
Common::String getAlternateGameVariable ()
 
Common::String getPoliceIndexVariable ()
 
Common::String getWallSafeValueVariable ()
 
Common::String getPoliceArrivedVariable ()
 
Common::String getBeenDowntownVariable ()
 
Common::String getPoliceStationLocation ()
 
const char * getSymbolName (const char *name, const char *strippedName, const char *demoName=nullptr)
 
bool selectDossierPage (Common::Point)
 
bool selectDossierNextSuspect (Common::Point)
 
bool selectDossierPrevSuspect (Common::Point)
 
bool selectDossierNextSheet (Common::Point)
 
bool selectDossierPrevSheet (Common::Point)
 
void addDossier (Common::String &page1, Common::String &page2)
 
void loadDossier ()
 
void resetPoliceBust ()
 
void startPoliceBust ()
 
void stopPoliceBust ()
 
void wallSafeAlarm ()
 
void completePoliceBust ()
 
void checkPoliceBust ()
 
bool inInventory (const Common::String &bmp) const
 
void addInventory (const Common::String &bmp, Common::String &flag)
 
void removeInventory (const Common::String &bmp)
 
void removeRandomInventory ()
 
void loadLocations (const Common::Rect &)
 
void loadInventory (uint32, const Common::Rect &, const Common::Rect &)
 
bool selectDiaryNextPage (Common::Point mousePos)
 
bool selectDiaryPrevPage (Common::Point mousePos)
 
void addMemory (const Common::String &path)
 
void loadMemories (const Common::Rect &rect, uint rightPageOffset, uint verticalOffset)
 
bool selectLocation (const Common::Point &mousePos)
 
bool selectMemory (const Common::Point &mousePos)
 
void setLocationAsVisited (Symbol *location)
 
int getMaxLocationValue ()
 
void playSound (const Common::String &, uint, bool, bool)
 
void playPhoneCallSound ()
 
void stopSound (bool)
 
bool isSoundActive ()
 
void waitForSoundToStop ()
 
Common::String getPaperShuffleSound ()
 
Common::String getTakeSound ()
 
Common::String getTakeLeaveSound ()
 
Common::String getLeaveSound ()
 
void selectAMRadioArea (Common::Point)
 
void selectPoliceRadioArea (Common::Point)
 
void addPhone (const Common::String &name, bool once, int startIndex, int endIndex, const Common::String &flagName, int flagValue)
 
void initializePhoneOnDesktop ()
 
void checkPhoneCall ()
 
bool cursorPhoneArea (Common::Point mousePos)
 
void selectPhoneArea (Common::Point mousePos)
 
void initializeWallSafeValue ()
 
bool selectSafeDigit (Common::Point)
 
void addSafeDigit (uint32, Common::Rect *)
 
int getSafeDigit (uint32 d)
 
void incrementSafeDigit (uint32 d)
 
bool getRandomBool (uint)
 
void setTimer (uint32 duration, const Common::String &setting, const Common::String &skipSetting)
 
void clearTimer ()
 
void skipTimer ()
 
void checkTimer ()
 
- 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 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 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)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Static Public Member Functions

static Common::Path convertPath (const Common::String &name)
 
static Common::String getVideoViewScreen (Common::String video)
 
static uint32 findMaskTransparentColor (const byte *palette, uint32 defaultColor)
 
static void swapImageColors (Graphics::Surface *image, byte *palette, uint32 a, uint32 b)
 
- 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

bool _shouldHighlightMasks
 
bool _highlightMasks
 
const ADGameDescription_gameDescription
 
Common::Language _language
 
Common::Platform _platform
 
SymbolMaps maps
 
Audio::SoundHandle _fgSoundHandle
 
Audio::SoundHandle _bgSoundHandle
 
Audio::SoundHandle _phoneCallSoundHandle
 
Video::SmackerDecoder_videoDecoder
 
Video::SmackerDecoder_pausedVideo
 
NameToPtr _functions
 
Video::Subtitles_subtitles
 
bool _useSubtitles
 
bool _sfxSubtitles
 
Graphics::Cursor_defaultCursor
 
Common::Array< CursorInfo_cursors
 
Common::String _currentCursor
 
Graphics::ManagedSurface_compositeSurface
 
uint32 _transparentColor
 
Common::Rect _screenRect
 
Common::String _framePath
 
Graphics::Surface_frameImage
 
Graphics::Surface_mframeImage
 
byte * _framePalette
 
Common::String _nextVS
 
Common::String _currentVS
 
Common::Point _origin
 
bool _needToDrawScreenFrame
 
Common::String _nextSetting
 
Common::String _pausedSetting
 
Common::String _currentSetting
 
Common::String _nextMovie
 
Common::String _currentMovie
 
DossierArray _dossiers
 
uint _dossierSuspect
 
uint _dossierPage
 
MaskInfo _dossierPageMask
 
MaskInfo _dossierNextSuspectMask
 
MaskInfo _dossierPrevSuspectMask
 
MaskInfo _dossierNextSheetMask
 
MaskInfo _dossierPrevSheetMask
 
bool _policeBustEnabled
 
bool _policeSirenPlayed
 
int _numberOfClicks
 
int _numberClicksAfterSiren
 
int _policeBustMovieIndex
 
Common::String _policeBustMovie
 
Common::String _policeBustPreviousSetting
 
InvList inventory
 
Common::String _diaryLocPrefix
 
bool _toTake
 
bool _haveTakenItem
 
DiaryPages _diaryPages
 
int _currentDiaryPage
 
ExitInfo _diaryNextPageExit
 
ExitInfo _diaryPrevPageExit
 
Common::Array< MaskInfo_locationMasks
 
Common::Array< MaskInfo_memoryMasks
 
MaskInfo _saveGameMask
 
MaskInfo _loadGameMask
 
int _mode
 
bool _modified
 
PlayedMediaTable _playedMovies
 
Common::String _repeatedMovieExit
 
ExitList _exits
 
MaskList _masks
 
bool _noStopSounds
 
Common::String _globalAudioPath
 
Common::String _sirenSound
 
Common::String _infaceRadioPath
 
MaskInfo _AMRadioArea
 
MaskInfo _policeRadioArea
 
SoundList _AMRadio
 
SoundList _policeRadio
 
MaskInfo _phoneArea
 
Common::String _phonePrefix
 
Common::String _phoneCallSound
 
PhoneList _phones
 
Common::String _safeNumberPath
 
MaskInfo _safeDigitArea [3]
 
Common::Rect _safeDigitRect [3]
 
Common::String _timerSetting
 
Common::String _timerSkipSetting
 
uint32 _timerStartTime
 
uint32 _timerDelay
 
RectList _rects
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 
- 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 Private::PrivateEngine::run ( )
overridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ initializePath()

void Private::PrivateEngine::initializePath ( const Common::FSNode gamePath)
overridevirtual

Initialize SearchMan according to the game path.

By default, this adds the directory in non-flat mode with a depth of 4 as priority 0 to SearchMan.

Parameters
gamePathThe base directory of the game data.

Reimplemented from Engine.

◆ hasFeature()

bool Private::PrivateEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Private::PrivateEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveAutosaveCurrently()

bool Private::PrivateEngine::canSaveAutosaveCurrently ( )
inlineoverridevirtual

Indicate whether an autosave can currently be done.

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Private::PrivateEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ loadGameStream()

Common::Error Private::PrivateEngine::loadGameStream ( Common::SeekableReadStream stream)
overridevirtual

Load a game state.

Parameters
streamThe stream to load the save state from.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ saveGameStream()

Common::Error Private::PrivateEngine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
streamThe write stream to save the savegame data to.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.


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