ScummVM API documentation
Hollywood::HollywoodEngine Class Reference
Inheritance diagram for Hollywood::HollywoodEngine:
Engine

Public Types

enum  {
  kScreenWidth = 640 , kScreenHeight = 480 , kSceneBufferWidth = 1024 , kSceneBufferHeight = 480 ,
  kSceneItemCount = 21
}
 
- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions , kSupportsReturnToLauncher , kSupportsLoadingDuringRuntime , kSupportsSavingDuringRuntime ,
  kSupportsChangingOptionsDuringRuntime , kSupportsArbitraryResolutions , kSupportsHelp , kSupportsQuitDialogOverride
}
 

Public Member Functions

 HollywoodEngine (OSystem *syst, const ADGameDescription *gameDesc)
 
Common::Error run () override
 
void initializePath (const Common::FSNode &gamePath) override
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
void syncSoundSettings () override
 
void syncSoundSettingsFromGameState ()
 
const ADGameDescription * getGameDescription () const
 
const char * getGameId () const
 
Common::Language getLanguage () const
 
Common::Platform getPlatform () const
 
bool isDemo () const
 
bool isFirstEdition () const
 
bool hasSpeechData () const
 
const TextTranslation * textTranslation () const
 
const HollywoodGameStrings & gameStrings () const
 
bool setSubtitleLanguage (const Common::String &language)
 
void cycleSubtitleLanguage ()
 
Common::String nextSubtitleLanguageName () const
 
HollywoodFont * font () const
 
HollywoodCursor * cursor ()
 
MusicPlayer * introMusic ()
 
MusicPlayer * gameplayMusic ()
 
GameplayState & gameState ()
 
const GameplayState & gameState () const
 
bool subtitlesEnabled () const
 
bool restoredContentEnabled () const
 
void captureLastGameplayThumbnail ()
 
bool copyLastGameplayThumbnail (Graphics::Surface &thumbnail) const
 
bool isSceneRestartRequested () const
 
void requestSceneRestart ()
 
void clearSceneRestartRequest ()
 
void requestDebugSceneSolve (uint16 sceneNumber)
 
bool consumeDebugSceneSolveRequest (uint16 sceneNumber)
 
byte nextScene7100RescueFailureVariant ()
 
bool canSave () const
 
void setCanSave (bool canSave)
 
void drawSceneHotspots (const GameplayLoopDelegate *scene=nullptr)
 
- Public Member Functions inherited from Engine
virtual void showHotspots (bool show)
 
void suspendHotspots ()
 
bool isShowingHotspots () const
 
virtual HotspotKeyMode hotspotsKeyMode () const
 
HotspotKeyMode effectiveHotspotKeyMode () const
 
MetaEngine * getMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManager * getTimerManager ()
 
Common::EventManager * getEventManager ()
 
Common::SaveFileManager * getSaveFileManager ()
 
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 errorString (const char *buf_input, char *buf_output, int buf_output_size)
 
virtual GUI::Debugger * getDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::Debugger * getOrCreateDebugger ()
 
bool enhancementEnabled (int32 cls) const
 
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 ()
 

Protected Member Functions

void getHotspotPositions (Common::Array< Graphics::HotspotInfo > &hotspots) override
 
Graphics::HotspotRenderer * createHotspotRenderer () override
 
bool hideCursorForHotspots () const override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 
virtual void drawHotspots ()
 
virtual bool hotspotDirty () const
 

Additional Inherited Members

- 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 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
 
bool _hotspotCursorHidden = false
 
Graphics::HotspotRenderer * _hotspotRenderer = nullptr
 
Common::Array< Graphics::HotspotInfo > _hotspotScratch
 
bool _hotspotShowText = true
 
int _hotspotMarker = 0
 

Member Function Documentation

◆ run()

Common::Error Hollywood::HollywoodEngine::run ( )
overridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ initializePath()

void Hollywood::HollywoodEngine::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 Hollywood::HollywoodEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Hollywood::HollywoodEngine::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 Hollywood::HollywoodEngine::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.

◆ loadGameStream()

Common::Error Hollywood::HollywoodEngine::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 Hollywood::HollywoodEngine::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.

◆ syncSoundSettings()

void Hollywood::HollywoodEngine::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.

◆ getHotspotPositions()

void Hollywood::HollywoodEngine::getHotspotPositions ( Common::Array< Graphics::HotspotInfo > &  hotspots)
overrideprotectedvirtual

Get information about all hotspots that should be displayed.

Engines should override this method to populate the hotspots array with hotspot information in game screen coordinates.

Parameters
hotspotsArray to be filled with hotspot information

Reimplemented from Engine.

◆ createHotspotRenderer()

Graphics::HotspotRenderer * Hollywood::HollywoodEngine::createHotspotRenderer ( )
overrideprotectedvirtual

Reimplemented from Engine.

◆ hideCursorForHotspots()

bool Hollywood::HollywoodEngine::hideCursorForHotspots ( ) const
inlineoverrideprotectedvirtual

Reimplemented from Engine.


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