ScummVM API documentation
Neverhood::NeverhoodEngine Class Reference
Inheritance diagram for Neverhood::NeverhoodEngine:
Engine

Classes

struct  SaveHeader
 

Public Types

enum  kReadSaveHeaderError { kRSHENoError = 0, kRSHEInvalidType = 1, kRSHEInvalidVersion = 2, kRSHEIoError = 3 }
 
- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 

Public Member Functions

 NeverhoodEngine (OSystem *syst, const ADGameDescription *gameDesc)
 
const char * getGameId () const
 
Common::Platform getPlatform () const
 
Common::Language getLanguage () const
 
bool hasFeature (EngineFeature f) const override
 
bool isDemo () const
 
bool isBigDemo () const
 
bool applyResourceFixes () const
 
Common::String getTargetName ()
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &description, bool isAutosave=false) override
 
Common::Error removeGameState (int slot)
 
bool savegame (const char *filename, const char *description)
 
bool loadgame (const char *filename)
 
Common::String getSaveStateName (int slot) const override
 
GameStategameState ()
 
GameModulegameModule ()
 
int16 getMouseX () const
 
int16 getMouseY () const
 
NPoint getMousePos ()
 
void toggleSoundUpdate (bool state)
 
void toggleMusic (bool state)
 
bool musicIsEnabled ()
 
bool shouldOffsetFontNhc () const
 
const SubtitleGlyphgetSubfont () const
 
- 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
 
 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 ()
 
virtual void syncSoundSettings ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Static Public Member Functions

static Common::String getSavegameFilename (const Common::String &target, int num)
 
static WARN_UNUSED_RESULT kReadSaveHeaderError readSaveHeader (Common::SeekableReadStream *in, SaveHeader &header, bool skipThumbnail=true)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static MetaEngineDetectiongetMetaEngineDetection ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Public Attributes

const ADGameDescription_gameDescription
 
Common::RandomSource_rnd
 
int16 _mouseX
 
int16 _mouseY
 
uint16 _buttonState
 
GameState _gameState
 
GameVars_gameVars
 
Screen_screen
 
ResourceMan_res
 
GameModule_gameModule
 
StaticData_staticData
 
SoundMan_soundMan
 
AudioResourceMan_audioResourceMan
 
bool _isSaveAllowed
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Member Function Documentation

◆ run()

Common::Error Neverhood::NeverhoodEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool Neverhood::NeverhoodEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Neverhood::NeverhoodEngine::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.

◆ canSaveGameStateCurrently()

bool Neverhood::NeverhoodEngine::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.

◆ loadGameState()

Common::Error Neverhood::NeverhoodEngine::loadGameState ( int  slot)
overridevirtual

Load a game state.

Parameters
slotThe slot from which a save state should be loaded.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ saveGameState()

Common::Error Neverhood::NeverhoodEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
slotThe slot into which the save state should be stored.
descDescription for the save state, entered by the user.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ getSaveStateName()

Common::String Neverhood::NeverhoodEngine::getSaveStateName ( int  slot) const
overridevirtual

Generate the savegame filename.

Reimplemented from Engine.


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