Plumbers::PlumbersGame Class Reference

#include <plumbers.h>

+ Inheritance diagram for Plumbers::PlumbersGame:
+ Collaboration diagram for Plumbers::PlumbersGame:

Public Member Functions

 PlumbersGame (OSystem *syst, const ADGameDescription *gameDesc)
 ~PlumbersGame () override
Common::Error run () override
 Init the engine and start its main loop. More...
const char * getGameId () const
Common::Platform getPlatform () const
- 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 bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. 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 ADGameDescription_gameDescription
int _duration
Common::String _filename
int _bitmapNum
int _startBitmap
int _decisionChoices
Common::String _sceneName
Common::String _waveFilename
Common::String _decisionBitmap
long _points
int _sceneIdx
int _skipScene
Common::Rect _region
struct {
   long   _points
   int   _sceneIdx
   int   _skipScene
   Common::Rect   _region
_choices [kMaxChoice]
- Public Attributes inherited from Engine

Private Types

enum  Action {
  Redraw, ShowScene, UpdateScene, ChangeScene,

Private Member Functions

void loadImage (const Common::String &dirname, const Common::String &filename)
void drawScreen ()
void playSound ()
void stopSound ()
void showScene ()
void updateScene ()
void changeScene ()
void processTimer ()
void initTables ()
void readTables (const Common::String &fileName)
int getSceneNumb (int sNo)

Static Private Member Functions

static void onTimer (void *arg)

Private Attributes

struct {
   int   _duration
   Common::String   _filename
_bitmaps [kMaxBitmaps]
struct {
   int   _bitmapNum
   int   _startBitmap
   int   _decisionChoices
   Common::String   _sceneName
   Common::String   _waveFilename
   Common::String   _decisionBitmap
   struct {
      long   _points
      int   _sceneIdx
      int   _skipScene
      Common::Rect   _region
   }   _choices [kMaxChoice]
_scenes [kMaxScene]
Image::ImageDecoder * _image
bool _showScoreFl
bool _setDurationFl
bool _leftButtonDownFl
bool _endGameFl
bool _timerInstalled
int _curSceneIdx
int _prvSceneIdx
int _curBitmapIdx
int _curChoice
int _totScene
long _totScore
Common::Queue< Action_actions
Audio::SoundHandle _soundHandle

Static Private Attributes

static const int kMaxName = 13 + 1
static const int kMaxBitmaps = 2000
static const int kMaxChoice = 3
static const int kMaxScene = 100

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 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 inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 49 of file plumbers.h.

Member Enumeration Documentation

◆ Action


Definition at line 101 of file plumbers.h.

Constructor & Destructor Documentation

◆ PlumbersGame()

Plumbers::PlumbersGame::PlumbersGame ( OSystem syst,
const ADGameDescription gameDesc 

Definition at line 49 of file plumbers.cpp.

◆ ~PlumbersGame()

Plumbers::PlumbersGame::~PlumbersGame ( )

Definition at line 66 of file plumbers.cpp.

Member Function Documentation

◆ changeScene()

void Plumbers::PlumbersGame::changeScene ( )

Definition at line 278 of file plumbers.cpp.

◆ drawScreen()

void Plumbers::PlumbersGame::drawScreen ( )

Definition at line 193 of file plumbers.cpp.

◆ getGameId()

const char * Plumbers::PlumbersGame::getGameId ( ) const

Definition at line 30 of file detection.cpp.

◆ getPlatform()

Common::Platform Plumbers::PlumbersGame::getPlatform ( ) const

Definition at line 31 of file detection.cpp.

◆ getSceneNumb()

int Plumbers::PlumbersGame::getSceneNumb ( int  sNo)

Definition at line 364 of file plumbers.cpp.

◆ initTables()

void Plumbers::PlumbersGame::initTables ( )

Definition at line 316 of file plumbers.cpp.

◆ loadImage()

void Plumbers::PlumbersGame::loadImage ( const Common::String dirname,
const Common::String filename 

Definition at line 183 of file plumbers.cpp.

◆ onTimer()

void Plumbers::PlumbersGame::onTimer ( void *  arg)

Definition at line 311 of file plumbers.cpp.

◆ playSound()

void Plumbers::PlumbersGame::playSound ( )

Definition at line 231 of file plumbers.cpp.

◆ processTimer()

void Plumbers::PlumbersGame::processTimer ( )

Definition at line 304 of file plumbers.cpp.

◆ readTables()

void Plumbers::PlumbersGame::readTables ( const Common::String fileName)

Definition at line 321 of file plumbers.cpp.

◆ run()

Common::Error Plumbers::PlumbersGame::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 96 of file plumbers.cpp.

◆ showScene()

void Plumbers::PlumbersGame::showScene ( )

Definition at line 250 of file plumbers.cpp.

◆ stopSound()

void Plumbers::PlumbersGame::stopSound ( )

Definition at line 244 of file plumbers.cpp.

◆ updateScene()

void Plumbers::PlumbersGame::updateScene ( )

Definition at line 259 of file plumbers.cpp.

Member Data Documentation

◆ _actions

Common::Queue<Action> Plumbers::PlumbersGame::_actions

Definition at line 109 of file plumbers.h.

◆ _bitmapNum

int Plumbers::PlumbersGame::_bitmapNum

Definition at line 73 of file plumbers.h.

◆ _bitmaps

struct { ... } Plumbers::PlumbersGame::_bitmaps[kMaxBitmaps]

◆ _choices

struct { ... } Plumbers::PlumbersGame::_choices[kMaxChoice]

◆ _console

Console* Plumbers::PlumbersGame::_console

Definition at line 88 of file plumbers.h.

◆ _curBitmapIdx

int Plumbers::PlumbersGame::_curBitmapIdx

Definition at line 96 of file plumbers.h.

◆ _curChoice

int Plumbers::PlumbersGame::_curChoice

Definition at line 97 of file plumbers.h.

◆ _curSceneIdx

int Plumbers::PlumbersGame::_curSceneIdx

Definition at line 95 of file plumbers.h.

◆ _decisionBitmap

Common::String Plumbers::PlumbersGame::_decisionBitmap

Definition at line 78 of file plumbers.h.

◆ _decisionChoices

int Plumbers::PlumbersGame::_decisionChoices

Definition at line 75 of file plumbers.h.

◆ _duration

int Plumbers::PlumbersGame::_duration

Definition at line 68 of file plumbers.h.

◆ _endGameFl

bool Plumbers::PlumbersGame::_endGameFl

Definition at line 93 of file plumbers.h.

◆ _filename

Common::String Plumbers::PlumbersGame::_filename

Definition at line 69 of file plumbers.h.

◆ _gameDescription

const ADGameDescription* Plumbers::PlumbersGame::_gameDescription

Definition at line 57 of file plumbers.h.

◆ _image

Image::ImageDecoder* Plumbers::PlumbersGame::_image

Definition at line 87 of file plumbers.h.

◆ _leftButtonDownFl

bool Plumbers::PlumbersGame::_leftButtonDownFl

Definition at line 92 of file plumbers.h.

◆ _points

long Plumbers::PlumbersGame::_points

Definition at line 80 of file plumbers.h.

◆ _prvSceneIdx

int Plumbers::PlumbersGame::_prvSceneIdx

Definition at line 95 of file plumbers.h.

◆ _region

Common::Rect Plumbers::PlumbersGame::_region

Definition at line 83 of file plumbers.h.

◆ _sceneIdx

int Plumbers::PlumbersGame::_sceneIdx

Definition at line 81 of file plumbers.h.

◆ _sceneName

Common::String Plumbers::PlumbersGame::_sceneName

Definition at line 76 of file plumbers.h.

◆ _scenes

struct { ... } Plumbers::PlumbersGame::_scenes[kMaxScene]

◆ _setDurationFl

bool Plumbers::PlumbersGame::_setDurationFl

Definition at line 91 of file plumbers.h.

◆ _showScoreFl

bool Plumbers::PlumbersGame::_showScoreFl

Definition at line 90 of file plumbers.h.

◆ _skipScene

int Plumbers::PlumbersGame::_skipScene

Definition at line 82 of file plumbers.h.

◆ _soundHandle

Audio::SoundHandle Plumbers::PlumbersGame::_soundHandle

Definition at line 114 of file plumbers.h.

◆ _startBitmap

int Plumbers::PlumbersGame::_startBitmap

Definition at line 74 of file plumbers.h.

◆ _timerInstalled

bool Plumbers::PlumbersGame::_timerInstalled

Definition at line 94 of file plumbers.h.

◆ _totScene

int Plumbers::PlumbersGame::_totScene

Definition at line 98 of file plumbers.h.

◆ _totScore

long Plumbers::PlumbersGame::_totScore

Definition at line 99 of file plumbers.h.

◆ _waveFilename

Common::String Plumbers::PlumbersGame::_waveFilename

Definition at line 77 of file plumbers.h.

◆ kMaxBitmaps

const int Plumbers::PlumbersGame::kMaxBitmaps = 2000

Definition at line 63 of file plumbers.h.

◆ kMaxChoice

const int Plumbers::PlumbersGame::kMaxChoice = 3

Definition at line 64 of file plumbers.h.

◆ kMaxName

const int Plumbers::PlumbersGame::kMaxName = 13 + 1

Definition at line 62 of file plumbers.h.

◆ kMaxScene

const int Plumbers::PlumbersGame::kMaxScene = 100

Definition at line 65 of file plumbers.h.

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