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 ()
 
Common::Platform getPlatform () const
 
void waitForInput ()
 
- Public Member Functions inherited from Engine
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...
 
 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 void initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

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 ()
 Init the engine and start its main loop. More...
 
virtual bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
virtual void syncSoundSettings ()
 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...
 
virtual DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

Private Attributes

const GroovieGameDescription_gameDescription
 
Debugger_debugger
 
bool _waitingForInput
 
T7GFont _sphinxFont
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsJoystick
}
 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 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 ( )

Definition at line 80 of file groovie.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool Groovie::GroovieEngine::canLoadGameStateCurrently ( )
protectedvirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 378 of file groovie.cpp.

◆ canSaveGameStateCurrently()

bool Groovie::GroovieEngine::canSaveGameStateCurrently ( )
protectedvirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 386 of file groovie.cpp.

◆ getDebugger()

virtual Debugger* Groovie::GroovieEngine::getDebugger ( )
inlineprotectedvirtual

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 111 of file groovie.h.

◆ getPlatform()

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

Definition at line 350 of file groovie.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 354 of file groovie.cpp.

◆ loadGameState()

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

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 394 of file groovie.cpp.

◆ run()

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

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 92 of file groovie.cpp.

◆ saveGameState()

Common::Error Groovie::GroovieEngine::saveGameState ( int  slot,
const Common::String desc 
)
protectedvirtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 401 of file groovie.cpp.

◆ syncSoundSettings()

void Groovie::GroovieEngine::syncSoundSettings ( )
protectedvirtual

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 361 of file groovie.cpp.

◆ waitForInput()

void Groovie::GroovieEngine::waitForInput ( )

Definition at line 408 of file groovie.cpp.

Member Data Documentation

◆ _debugger

Debugger* Groovie::GroovieEngine::_debugger
private

Definition at line 132 of file groovie.h.

◆ _font

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

Definition at line 124 of file groovie.h.

◆ _gameDescription

const GroovieGameDescription* Groovie::GroovieEngine::_gameDescription
private

Definition at line 131 of file groovie.h.

◆ _graphicsMan

GraphicsMan* Groovie::GroovieEngine::_graphicsMan

Definition at line 123 of file groovie.h.

◆ _grvCursorMan

GrvCursorMan* Groovie::GroovieEngine::_grvCursorMan

Definition at line 120 of file groovie.h.

◆ _macResFork

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

Definition at line 126 of file groovie.h.

◆ _modeSpeed

GameSpeed Groovie::GroovieEngine::_modeSpeed

Definition at line 128 of file groovie.h.

◆ _musicPlayer

MusicPlayer* Groovie::GroovieEngine::_musicPlayer

Definition at line 122 of file groovie.h.

◆ _pixelFormat

Graphics::PixelFormat Groovie::GroovieEngine::_pixelFormat

Definition at line 116 of file groovie.h.

◆ _resMan

ResMan* Groovie::GroovieEngine::_resMan

Definition at line 119 of file groovie.h.

◆ _script

Script* Groovie::GroovieEngine::_script

Definition at line 118 of file groovie.h.

◆ _sphinxFont

T7GFont Groovie::GroovieEngine::_sphinxFont
private

Definition at line 134 of file groovie.h.

◆ _spookyMode

bool Groovie::GroovieEngine::_spookyMode

Definition at line 117 of file groovie.h.

◆ _videoPlayer

VideoPlayer* Groovie::GroovieEngine::_videoPlayer

Definition at line 121 of file groovie.h.

◆ _waitingForInput

bool Groovie::GroovieEngine::_waitingForInput
private

Definition at line 133 of file groovie.h.


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