Chewy::ChewyEngine Class Reference

#include <chewy.h>

+ Inheritance diagram for Chewy::ChewyEngine:
+ Collaboration diagram for Chewy::ChewyEngine:

Public Member Functions

 ChewyEngine (OSystem *syst, const ChewyGameDescription *gameDesc)
 ~ChewyEngine () override
int getGameType () const
uint32 getFeatures () const
Common::Language getLanguage () const
Common::Platform getPlatform () const
void setPlayVideo (uint num)
- 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 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 void flipMute ()
 Flip mute all sound option. More...
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
virtual Common::Error loadGameState (int slot)
 Load a game state. 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 bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 Save a game state. More...
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. 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

const ChewyGameDescription_gameDescription
Common::RandomSource _rnd
- Public Attributes inherited from Engine

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...
void initialize ()
void shutdown ()
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...

Protected Attributes

uint _curCursor
uint _elapsedFrames
int _videoNum
- Protected Attributes inherited from Engine
const Common::String _targetName

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...

Detailed Description

Definition at line 48 of file chewy.h.

Constructor & Destructor Documentation

◆ ChewyEngine()

Chewy::ChewyEngine::ChewyEngine ( OSystem syst,
const ChewyGameDescription gameDesc 

Definition at line 44 of file chewy.cpp.

◆ ~ChewyEngine()

Chewy::ChewyEngine::~ChewyEngine ( )

Definition at line 60 of file chewy.cpp.

Member Function Documentation

◆ getFeatures()

uint32 Chewy::ChewyEngine::getFeatures ( ) const

Definition at line 38 of file detection.cpp.

◆ getGameType()

int Chewy::ChewyEngine::getGameType ( ) const

◆ getLanguage()

Common::Language Chewy::ChewyEngine::getLanguage ( ) const

Definition at line 42 of file detection.cpp.

◆ getPlatform()

Common::Platform Chewy::ChewyEngine::getPlatform ( ) const

◆ hasFeature()

bool Chewy::ChewyEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 151 of file detection.cpp.

◆ initialize()

void Chewy::ChewyEngine::initialize ( )

Definition at line 69 of file chewy.cpp.

◆ run()

Common::Error Chewy::ChewyEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 83 of file chewy.cpp.

◆ setPlayVideo()

void Chewy::ChewyEngine::setPlayVideo ( uint  num)

Definition at line 61 of file chewy.h.

◆ shutdown()

void Chewy::ChewyEngine::shutdown ( )

Member Data Documentation

◆ _curCursor

uint Chewy::ChewyEngine::_curCursor

Definition at line 79 of file chewy.h.

◆ _cursor

Cursor* Chewy::ChewyEngine::_cursor

Definition at line 64 of file chewy.h.

◆ _elapsedFrames

uint Chewy::ChewyEngine::_elapsedFrames

Definition at line 80 of file chewy.h.

◆ _events

Events* Chewy::ChewyEngine::_events

Definition at line 77 of file chewy.h.

◆ _gameDescription

const ChewyGameDescription* Chewy::ChewyEngine::_gameDescription

Definition at line 58 of file chewy.h.

◆ _graphics

Graphics* Chewy::ChewyEngine::_graphics

Definition at line 63 of file chewy.h.

◆ _rnd

Common::RandomSource Chewy::ChewyEngine::_rnd

Definition at line 59 of file chewy.h.

◆ _scene

Scene* Chewy::ChewyEngine::_scene

Definition at line 65 of file chewy.h.

◆ _sound

Sound* Chewy::ChewyEngine::_sound

Definition at line 66 of file chewy.h.

◆ _text

Text* Chewy::ChewyEngine::_text

Definition at line 67 of file chewy.h.

◆ _videoNum

int Chewy::ChewyEngine::_videoNum

Definition at line 81 of file chewy.h.

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