ScummVM
Groovie::GroovieEngine Class Reference

#include <groovie.h>

+ Inheritance diagram for Groovie::GroovieEngine:
+ Collaboration diagram for Groovie::GroovieEngine:

Public Member Functions

 GroovieEngine (OSystem *syst, const GroovieGameDescription *gd)
 
 ~GroovieEngine () override
 
Common::Platform getPlatform () const
 
void waitForInput ()
 
- Public Member Functions inherited from Engine
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
 
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. More...
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
 
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
 
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
 
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
 
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
 
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
 
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
 
bool shouldPerformAutoSave (int lastSaveTime)
 

Public Attributes

Graphics::PixelFormat _pixelFormat
 
bool _spookyMode
 
Script_script
 
ResMan_resMan
 
GrvCursorMan_grvCursorMan
 
VideoPlayer_videoPlayer
 
MusicPlayer_musicPlayer
 
GraphicsMan_graphicsMan
 
const Graphics::Font_font
 
Common::MacResManager_macResFork
 
GameSpeed _modeSpeed
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
 
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
 
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
 
Common::Error loadGameState (int slot) override
 Load a game state. More...
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 Save a game state. More...
 
void syncSoundSettings () override
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

Private Attributes

const GroovieGameDescription_gameDescription
 
bool _waitingForInput
 
T7GFont _sphinxFont
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature { kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime }
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static MetaEnginegetMetaEngine ()
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Definition at line 91 of file groovie.h.

Constructor & Destructor Documentation

◆ GroovieEngine()

Groovie::GroovieEngine::GroovieEngine ( OSystem syst,
const GroovieGameDescription gd 
)

Definition at line 50 of file groovie.cpp.

◆ ~GroovieEngine()

Groovie::GroovieEngine::~GroovieEngine ( )
override

Definition at line 80 of file groovie.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Groovie::GroovieEngine::canLoadGameStateCurrently ( )
overrideprotectedvirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 371 of file groovie.cpp.

◆ canSaveGameStateCurrently()

bool Groovie::GroovieEngine::canSaveGameStateCurrently ( )
overrideprotectedvirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 379 of file groovie.cpp.

◆ getPlatform()

Common::Platform Groovie::GroovieEngine::getPlatform ( ) const

Definition at line 343 of file groovie.cpp.

◆ hasFeature()

bool Groovie::GroovieEngine::hasFeature ( EngineFeature  f) const
overrideprotectedvirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 347 of file groovie.cpp.

◆ loadGameState()

Common::Error Groovie::GroovieEngine::loadGameState ( int  slot)
overrideprotectedvirtual

Load a game state.

Parameters
slotthe slot from which a savestate should be loaded
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 387 of file groovie.cpp.

◆ run()

Common::Error Groovie::GroovieEngine::run ( )
overrideprotectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 91 of file groovie.cpp.

◆ saveGameState()

Common::Error Groovie::GroovieEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overrideprotectedvirtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
isAutosaveExpected to be true if an autosave is being created
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 394 of file groovie.cpp.

◆ syncSoundSettings()

void Groovie::GroovieEngine::syncSoundSettings ( )
overrideprotectedvirtual

Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc.

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.
Todo:
find a better name for this

Reimplemented from Engine.

Definition at line 354 of file groovie.cpp.

◆ waitForInput()

void Groovie::GroovieEngine::waitForInput ( )

Definition at line 401 of file groovie.cpp.

Member Data Documentation

◆ _font

const Graphics::Font* Groovie::GroovieEngine::_font

Definition at line 122 of file groovie.h.

◆ _gameDescription

const GroovieGameDescription* Groovie::GroovieEngine::_gameDescription
private

Definition at line 129 of file groovie.h.

◆ _graphicsMan

GraphicsMan* Groovie::GroovieEngine::_graphicsMan

Definition at line 121 of file groovie.h.

◆ _grvCursorMan

GrvCursorMan* Groovie::GroovieEngine::_grvCursorMan

Definition at line 118 of file groovie.h.

◆ _macResFork

Common::MacResManager* Groovie::GroovieEngine::_macResFork

Definition at line 124 of file groovie.h.

◆ _modeSpeed

GameSpeed Groovie::GroovieEngine::_modeSpeed

Definition at line 126 of file groovie.h.

◆ _musicPlayer

MusicPlayer* Groovie::GroovieEngine::_musicPlayer

Definition at line 120 of file groovie.h.

◆ _pixelFormat

Graphics::PixelFormat Groovie::GroovieEngine::_pixelFormat

Definition at line 114 of file groovie.h.

◆ _resMan

ResMan* Groovie::GroovieEngine::_resMan

Definition at line 117 of file groovie.h.

◆ _script

Script* Groovie::GroovieEngine::_script

Definition at line 116 of file groovie.h.

◆ _sphinxFont

T7GFont Groovie::GroovieEngine::_sphinxFont
private

Definition at line 131 of file groovie.h.

◆ _spookyMode

bool Groovie::GroovieEngine::_spookyMode

Definition at line 115 of file groovie.h.

◆ _videoPlayer

VideoPlayer* Groovie::GroovieEngine::_videoPlayer

Definition at line 119 of file groovie.h.

◆ _waitingForInput

bool Groovie::GroovieEngine::_waitingForInput
private

Definition at line 130 of file groovie.h.


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