ScummVM
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 ()
 
virtual Common::Error run ()
 Init the engine and start its main loop. More...
 
const char * getGameId () const
 
Common::Platform getPlatform () const
 
- 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 GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. 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 initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::Error loadGameState (int slot)
 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)
 Save a game state. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 

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
OSystem_system
 
Audio::Mixer_mixer
 

Private Types

enum  Action {
  Redraw, ShowScene, UpdateScene, ChangeScene,
  PlaySound
}
 

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
 
Console_console
 
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,
  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 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...
 
- 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 53 of file plumbers.h.

Member Enumeration Documentation

◆ Action

Enumerator
Redraw 
ShowScene 
UpdateScene 
ChangeScene 
PlaySound 

Definition at line 105 of file plumbers.h.

Constructor & Destructor Documentation

◆ PlumbersGame()

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

Definition at line 42 of file plumbers.cpp.

◆ ~PlumbersGame()

Plumbers::PlumbersGame::~PlumbersGame ( )

Definition at line 60 of file plumbers.cpp.

Member Function Documentation

◆ changeScene()

void Plumbers::PlumbersGame::changeScene ( )
private

Definition at line 276 of file plumbers.cpp.

◆ drawScreen()

void Plumbers::PlumbersGame::drawScreen ( )
private

Definition at line 189 of file plumbers.cpp.

◆ getGameId()

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

Definition at line 32 of file detection.cpp.

◆ getPlatform()

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

Definition at line 33 of file detection.cpp.

◆ getSceneNumb()

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

Definition at line 362 of file plumbers.cpp.

◆ initTables()

void Plumbers::PlumbersGame::initTables ( )
private

Definition at line 314 of file plumbers.cpp.

◆ loadImage()

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

Definition at line 179 of file plumbers.cpp.

◆ onTimer()

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

Definition at line 309 of file plumbers.cpp.

◆ playSound()

void Plumbers::PlumbersGame::playSound ( )
private

Definition at line 229 of file plumbers.cpp.

◆ processTimer()

void Plumbers::PlumbersGame::processTimer ( )
private

Definition at line 302 of file plumbers.cpp.

◆ readTables()

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

Definition at line 319 of file plumbers.cpp.

◆ run()

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

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 90 of file plumbers.cpp.

◆ showScene()

void Plumbers::PlumbersGame::showScene ( )
private

Definition at line 248 of file plumbers.cpp.

◆ stopSound()

void Plumbers::PlumbersGame::stopSound ( )
private

Definition at line 242 of file plumbers.cpp.

◆ updateScene()

void Plumbers::PlumbersGame::updateScene ( )
private

Definition at line 257 of file plumbers.cpp.

Member Data Documentation

◆ _actions

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

Definition at line 113 of file plumbers.h.

◆ _bitmapNum

int Plumbers::PlumbersGame::_bitmapNum

Definition at line 77 of file plumbers.h.

◆ _bitmaps

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

◆ _choices

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

◆ _console

Console* Plumbers::PlumbersGame::_console
private

Definition at line 92 of file plumbers.h.

◆ _curBitmapIdx

int Plumbers::PlumbersGame::_curBitmapIdx
private

Definition at line 100 of file plumbers.h.

◆ _curChoice

int Plumbers::PlumbersGame::_curChoice
private

Definition at line 101 of file plumbers.h.

◆ _curSceneIdx

int Plumbers::PlumbersGame::_curSceneIdx
private

Definition at line 99 of file plumbers.h.

◆ _decisionBitmap

Common::String Plumbers::PlumbersGame::_decisionBitmap

Definition at line 82 of file plumbers.h.

◆ _decisionChoices

int Plumbers::PlumbersGame::_decisionChoices

Definition at line 79 of file plumbers.h.

◆ _duration

int Plumbers::PlumbersGame::_duration

Definition at line 72 of file plumbers.h.

◆ _endGameFl

bool Plumbers::PlumbersGame::_endGameFl
private

Definition at line 97 of file plumbers.h.

◆ _filename

Common::String Plumbers::PlumbersGame::_filename

Definition at line 73 of file plumbers.h.

◆ _gameDescription

const ADGameDescription* Plumbers::PlumbersGame::_gameDescription

Definition at line 61 of file plumbers.h.

◆ _image

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

Definition at line 91 of file plumbers.h.

◆ _leftButtonDownFl

bool Plumbers::PlumbersGame::_leftButtonDownFl
private

Definition at line 96 of file plumbers.h.

◆ _points

long Plumbers::PlumbersGame::_points

Definition at line 84 of file plumbers.h.

◆ _prvSceneIdx

int Plumbers::PlumbersGame::_prvSceneIdx
private

Definition at line 99 of file plumbers.h.

◆ _region

Common::Rect Plumbers::PlumbersGame::_region

Definition at line 87 of file plumbers.h.

◆ _sceneIdx

int Plumbers::PlumbersGame::_sceneIdx

Definition at line 85 of file plumbers.h.

◆ _sceneName

Common::String Plumbers::PlumbersGame::_sceneName

Definition at line 80 of file plumbers.h.

◆ _scenes

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

◆ _setDurationFl

bool Plumbers::PlumbersGame::_setDurationFl
private

Definition at line 95 of file plumbers.h.

◆ _showScoreFl

bool Plumbers::PlumbersGame::_showScoreFl
private

Definition at line 94 of file plumbers.h.

◆ _skipScene

int Plumbers::PlumbersGame::_skipScene

Definition at line 86 of file plumbers.h.

◆ _soundHandle

Audio::SoundHandle Plumbers::PlumbersGame::_soundHandle
private

Definition at line 118 of file plumbers.h.

◆ _startBitmap

int Plumbers::PlumbersGame::_startBitmap

Definition at line 78 of file plumbers.h.

◆ _timerInstalled

bool Plumbers::PlumbersGame::_timerInstalled
private

Definition at line 98 of file plumbers.h.

◆ _totScene

int Plumbers::PlumbersGame::_totScene
private

Definition at line 102 of file plumbers.h.

◆ _totScore

long Plumbers::PlumbersGame::_totScore
private

Definition at line 103 of file plumbers.h.

◆ _waveFilename

Common::String Plumbers::PlumbersGame::_waveFilename

Definition at line 81 of file plumbers.h.

◆ kMaxBitmaps

const int Plumbers::PlumbersGame::kMaxBitmaps = 2000
staticprivate

Definition at line 67 of file plumbers.h.

◆ kMaxChoice

const int Plumbers::PlumbersGame::kMaxChoice = 3
staticprivate

Definition at line 68 of file plumbers.h.

◆ kMaxName

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

Definition at line 66 of file plumbers.h.

◆ kMaxScene

const int Plumbers::PlumbersGame::kMaxScene = 100
staticprivate

Definition at line 69 of file plumbers.h.


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