ScummVM API documentation
Darkseed::DarkseedEngine Class Reference
Inheritance diagram for Darkseed::DarkseedEngine:
Engine

Public Member Functions

void zeroMouseButtons ()
 
void updateEvents ()
 
void gotoNextMorning ()
 
void playDayChangeCutscene ()
 
void removeFullscreenPic ()
 
void wait ()
 
void waitForSpeech ()
 
void waitForSpeechOrSfx ()
 
void syncSoundSettings () override
 
 DarkseedEngine (OSystem *syst, const ADGameDescription *gameDesc)
 
uint32 getFeatures () const
 
Common::String getGameId () const
 
uint32 getRandomNumber (uint maxNum)
 
bool isDosVersion () const
 
bool isCdVersion () const
 
bool isDosFloppy () const
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg) override
 
bool canSaveGameStateCurrently (Common::U32String *msg) override
 
Common::Error syncGame (Common::Serializer &s)
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
Common::Path getRoomFilePath (const Common::Path &filename) const
 
Common::Path getPictureFilePath (const Common::Path &filename) const
 
void fadeIn (const Pal &palette)
 
void fadeOut ()
 
bool fadeStep ()
 
void restartGame ()
 
void newGame ()
 
void updateDisplay ()
 
void debugTeleportToRoom (int newRoomNumber, int entranceNumber)
 
void showFullscreenPic (const Common::Path &filename)
 
void drawFullscreenPic ()
 
void lookCode (int objNum)
 
void handleObjCollision (int targetObjNum)
 
void playSound (uint8 sfxId, uint8 unk1, int16 unk2)
 
void nextFrame (int nspAminIdx)
 
void throwmikeinjail ()
 
void runObjects ()
 
void getPackageObj (int packageType)
 
void printTime ()
 
void changeToRoom (int newRoomNumber, bool placeDirectly=false)
 
void waitxticks (int ticks)
 
void doCircles ()
 
- 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 ()
 
bool enhancementEnabled (int32 cls)
 
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 ()
 

Public Attributes

Pic _frame
 
bool _ct_voice_status = false
 
bool _isRightMouseClicked = false
 
bool _isLeftMouseClicked = false
 
Common::KeyCode _lastKeyPressed = Common::KeyCode::KEYCODE_INVALID
 
Sound_sound = nullptr
 
Nsp _baseSprites
 
Cursor _cursor
 
Graphics::Screen_screen = nullptr
 
TosText_tosText = nullptr
 
Console_console = nullptr
 
Room_room = nullptr
 
int _actionMode = kPointerAction
 
Player_player = nullptr
 
Sprites _sprites
 
Objects _objectVar
 
Inventory _inventory
 
UseCode_useCode = nullptr
 
Cutscene _cutscene
 
Animation_animation = nullptr
 
uint8 _currentDay = 1
 
int _currentTimeInSeconds = 0x7e8e
 
int _fttime = 0
 
uint8 _previousRoomNumber = 0
 
uint16 _targetRoomNumber = 0
 
uint16 _headAcheMessageCounter = 0
 
uint8 _headacheMessageIdx = 0
 
int _sprite_y_scaling_threshold_maybe = 0xf0
 
int _scaledWalkSpeed_maybe = 0
 
uint16 _scaledSpriteWidth = 0
 
uint16 _scaledSpriteHeight = 0
 
int _frameBottom = 0
 
bool _doorEnabled = false
 
bool _useDoorTarget = false
 
int16 _counter_2c85_888b = 0
 
uint8 _targetPlayerDirection = 0
 
uint8 _systemTimerCounter = 0
 
bool _debugShowWalkPath = false
 
int _phoneStatus = 0
 
int16 _soundTimer = 0
 
bool _printedcomeheredawson = false
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () 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
}
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 
- 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 Darkseed::DarkseedEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ syncSoundSettings()

void Darkseed::DarkseedEngine::syncSoundSettings ( )
overridevirtual

Notify the engine that the sound settings in the config manager might have changed and that it should adjust any internal volume (and other) values accordingly.

The default implementation sets the volume levels of all mixer sound types according to the config entries of the active domain. When overwriting, call the default implementation first, then adjust the volumes further (if required).

Note
When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.

Reimplemented from Engine.

◆ getGameId()

Common::String Darkseed::DarkseedEngine::getGameId ( ) const

Returns the game Id

◆ getRandomNumber()

uint32 Darkseed::DarkseedEngine::getRandomNumber ( uint  maxNum)
inline

Gets a random number

◆ hasFeature()

bool Darkseed::DarkseedEngine::hasFeature ( EngineFeature  f) const
inlineoverridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Darkseed::DarkseedEngine::canLoadGameStateCurrently ( Common::U32String msg)
inlineoverridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Darkseed::DarkseedEngine::canSaveGameStateCurrently ( Common::U32String msg)
inlineoverridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ syncGame()

Common::Error Darkseed::DarkseedEngine::syncGame ( Common::Serializer s)

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

◆ saveGameStream()

Common::Error Darkseed::DarkseedEngine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave = false 
)
inlineoverridevirtual

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 Darkseed::DarkseedEngine::loadGameStream ( Common::SeekableReadStream stream)
inlineoverridevirtual

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: