ScummVM API documentation
Harvester::HarvesterEngine Class Reference
Inheritance diagram for Harvester::HarvesterEngine:
Engine

Public Member Functions

 HarvesterEngine (OSystem *syst, const ADGameDescription *gameDesc)
 
Common::Error run () override
 
bool hasFeature (EngineFeature f) const override
 
Common::String getGameId () const
 
bool isDemo () const
 
uint32 getRandomNumber (uint maxNum)
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error syncGame (Common::Serializer &s)
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
ResourceManagergetResources () const
 
MediaManagergetMedia () const
 
EntityManagergetRuntimeEntities () const
 
Graphics::ScreengetScreen () const
 
int getDisplayWidth () const
 
int getDisplayHeight () const
 
ScriptgetScript () const
 
ArtgetArt () const
 
TextgetText () const
 
void setDisplayMode (int width, int height)
 
bool isGoreEnabled () const
 
bool shouldShowCdChangePrompts () const
 
int getFxVolumeLevel () const
 
int getMusicVolumeLevel () const
 
int getGammaLevel () const
 
float getGammaBrightnessScale () const
 
void setFxVolumeLevel (int level)
 
void setMusicVolumeLevel (int level)
 
void setGammaLevel (int level)
 
const Common::StringgetMusicPath () const
 
bool isMusicPlaying () const
 
bool playMusic (const Common::String &path)
 
void pauseMusic (bool paused)
 
void stopMusic ()
 
bool executeAudioCommand (const AudioCommand &command)
 
bool playSound (const Common::String &path)
 
bool playSingleSound (const Common::String &path)
 
void stopSingleSound ()
 
bool isSingleSoundPlaying () const
 
bool playSpeech (const Common::String &path)
 
void stopSpeech ()
 
bool isSpeechPlaying () const
 
bool loadSound (int slot, const Common::String &path)
 
bool playLoadedSound (int slot)
 
bool deleteLoadedSound (int slot)
 
void stopSound ()
 
bool activateDisc (int discNumber)
 
bool isCombatDebugEnabled () const
 
bool toggleCombatDebugEnabled ()
 
bool isRoomDebugEnabled () const
 
bool toggleRoomDebugEnabled ()
 
bool isPathfindingDebugEnabled () const
 
bool togglePathfindingDebugEnabled ()
 
bool isTimerDebugEnabled () const
 
bool toggleTimerDebugEnabled ()
 
bool requestDebugCommand (const CommandRecord &command)
 
bool requestDebugRoomChange (const Common::String &roomName)
 
void captureCurrentSaveRoomState (const Common::String &entranceName, const Common::String &roomName, int playerX, int playerY, int playerZ, int playerFacing, int discNumber, const Common::String &musicPath)
 
void clearCurrentSaveRoomState ()
 
bool hasCurrentSaveRoomState () const
 
const SaveRoomStategetCurrentSaveRoomState () const
 
bool hasPendingLoadedSaveRoomState () const
 
const SaveRoomStategetPendingLoadedSaveRoomState () const
 
int getPendingLoadedDisc () const
 
void clearPendingLoadedSaveRoomState ()
 
bool hasPendingLoadedDialogueStateBlob () const
 
const Common::Array< byte > & getPendingLoadedDialogueStateBlob () const
 
uint32 getPendingLoadedDialogueStateBlobVersion () const
 
void clearPendingLoadedDialogueStateBlob ()
 
- Public Member Functions inherited from Engine
virtual void showHotspots (bool show)
 
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)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- 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 warnUserAboutTestingMode ()
 
static void errorAddingAddOnWithoutBaseGame (Common::String addOnName, Common::String gameId)
 
static void errorUnsupportedGame (Common::String extraMsg)
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 
virtual void getHotspotPositions (Common::Array< Graphics::HotspotInfo > &hotspots)
 
virtual void drawHotspots ()
 
virtual bool hotspotDirty () const
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 
bool _showHotspots
 
bool _hotspotForceRedraw
 
bool _hotspotPrevCursorVisible
 

Member Function Documentation

◆ run()

Common::Error Harvester::HarvesterEngine::run ( )
overridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool Harvester::HarvesterEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ getGameId()

Common::String Harvester::HarvesterEngine::getGameId ( ) const

Returns the game Id

◆ getRandomNumber()

uint32 Harvester::HarvesterEngine::getRandomNumber ( uint  maxNum)
inline

Gets a random number

◆ canLoadGameStateCurrently()

bool Harvester::HarvesterEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Harvester::HarvesterEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ syncGame()

Common::Error Harvester::HarvesterEngine::syncGame ( Common::Serializer s)

Uses a serializer to allow implementing savegame loading and saving using a single method

◆ saveGameStream()

Common::Error Harvester::HarvesterEngine::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.

◆ loadGameStream()

Common::Error Harvester::HarvesterEngine::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.


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