ScummVM API documentation
MADS::Game Class Referenceabstract
Inheritance diagram for MADS::Game:
MADS::Nebular::GameNebular

Public Member Functions

void run ()
 
uint32 getQuotesSize ()
 
const Common::StringgetQuote (uint32 index)
 
void splitQuote (const Common::String &source, Common::String &line1, Common::String &line2)
 
Common::StringArray getMessage (uint32 id)
 
virtual Globalsglobals ()=0
 
virtual void doObjectAction ()=0
 
virtual void unhandledAction ()=0
 
virtual void step ()=0
 
virtual void synchronize (Common::Serializer &s, bool phase1)
 
virtual void setNaughtyMode (bool naughtyMode)
 
virtual bool getNaughtyMode () const
 
void clearQuotes ()
 
void loadQuoteRange (int startNum, int endNum)
 
void loadQuoteSet (...)
 
void loadQuote (int quoteNum)
 
void handleKeypress (const Common::KeyState &kbd)
 
void handleAction (const Common::CustomEventType &action)
 
void loadGame (int slotNumber)
 
void saveGame (int slotNumber, const Common::String &saveName)
 
void writeSavegameHeader (Common::OutSaveFile *out, MADSSavegameHeader &header)
 
void createThumbnail ()
 
void syncTimers (SyncType slaveType, int slaveId, SyncType masterType, int masterId)
 
void camInitDefault ()
 
void camSetSpeed ()
 
void camUpdate ()
 

Static Public Member Functions

static Gameinit (MADSEngine *vm)
 
static WARN_UNUSED_RESULT bool readSavegameHeader (Common::InSaveFile *in, MADSSavegameHeader &header, bool skipThumbnail=true)
 

Public Attributes

Player _player
 
ScreenObjects _screenObjects
 
int _sectionNumber
 
int _priorSectionNumber
 
int _currentSectionNumber
 
InventoryObjects _objects
 
SectionHandler_sectionHandler
 
VisitedScenes _visitedScenes
 
Scene _scene
 
KernelMode _kernelMode
 
int _trigger
 
ScreenTransition _fx
 
TriggerMode _triggerMode
 
TriggerMode _triggerSetupMode
 
uint32 _priorFrameTimer
 
Common::Path _aaName
 
int _winStatus
 
int _widepipeCtr
 
int _loadGameSlot
 
int _panningSpeed
 
Camera _camX
 
Camera _camY
 

Protected Member Functions

 Game (MADSEngine *vm)
 
void initSection (int sectionNumber)
 
Virtual Method list
virtual void startGame ()=0
 
virtual void initializeGlobals ()=0
 
virtual void setSectionHandler ()=0
 
virtual void checkShowDialog ()=0
 

Protected Attributes

MADSEngine_vm
 
MSurface_surface
 
int _statusFlag
 
Common::StringArray _quotes
 
bool _quoteEmergency
 
bool _vocabEmergency
 
bool _anyEmergency
 
int _lastSave
 
Common::String _saveName
 
Common::InSaveFile_saveFile
 
Graphics::Surface_saveThumb
 

Constructor & Destructor Documentation

◆ Game()

MADS::Game::Game ( MADSEngine vm)
protected

Constructor

Member Function Documentation

◆ initSection()

void MADS::Game::initSection ( int  sectionNumber)
protected

Initializes the current section number of the game

◆ startGame()

virtual void MADS::Game::startGame ( )
protectedpure virtual

Perform any game-specifcic startup

Implemented in MADS::Nebular::GameNebular.

◆ initializeGlobals()

virtual void MADS::Game::initializeGlobals ( )
protectedpure virtual

Initializes global variables for a new game

Implemented in MADS::Nebular::GameNebular.

◆ setSectionHandler()

virtual void MADS::Game::setSectionHandler ( )
protectedpure virtual

Set up the section handler specific to each section

Implemented in MADS::Nebular::GameNebular.

◆ checkShowDialog()

virtual void MADS::Game::checkShowDialog ( )
protectedpure virtual

Checks for whether to show a dialog

Implemented in MADS::Nebular::GameNebular.

◆ run()

void MADS::Game::run ( )

Main outer loop for the game

◆ getQuotesSize()

uint32 MADS::Game::getQuotesSize ( )
inline

Return the number of quotes

◆ getQuote()

const Common::String& MADS::Game::getQuote ( uint32  index)
inline

Get a specific quote string

◆ splitQuote()

void MADS::Game::splitQuote ( const Common::String source,
Common::String line1,
Common::String line2 
)

Split a quote into two lines for display on-screen

◆ globals()

virtual Globals& MADS::Game::globals ( )
pure virtual

Returns the globals for the game

Implemented in MADS::Nebular::GameNebular.

◆ doObjectAction()

virtual void MADS::Game::doObjectAction ( )
pure virtual

Standard object handling across the game

Implemented in MADS::Nebular::GameNebular.

◆ unhandledAction()

virtual void MADS::Game::unhandledAction ( )
pure virtual

Fallback handler for any action that isn't explicitly handled

Implemented in MADS::Nebular::GameNebular.

◆ step()

virtual void MADS::Game::step ( )
pure virtual

Global game step

Implemented in MADS::Nebular::GameNebular.

◆ synchronize()

virtual void MADS::Game::synchronize ( Common::Serializer s,
bool  phase1 
)
virtual

Synchronize the game data

Parameters
sSerializer
phase1If true, it's synchronizing the basic scene information

Reimplemented in MADS::Nebular::GameNebular.

◆ handleKeypress()

void MADS::Game::handleKeypress ( const Common::KeyState kbd)

Handle a keyboard event

◆ handleAction()

void MADS::Game::handleAction ( const Common::CustomEventType action)

Handle an action

◆ loadGame()

void MADS::Game::loadGame ( int  slotNumber)

Starts a savegame loading.

Remarks
Due to the way the engine is implemented, loading is done in two parts, the second part after the specific scene has been loaded

◆ saveGame()

void MADS::Game::saveGame ( int  slotNumber,
const Common::String saveName 
)

Save the current game

◆ writeSavegameHeader()

void MADS::Game::writeSavegameHeader ( Common::OutSaveFile out,
MADSSavegameHeader header 
)

Write out a savegame header

◆ readSavegameHeader()

static WARN_UNUSED_RESULT bool MADS::Game::readSavegameHeader ( Common::InSaveFile in,
MADSSavegameHeader header,
bool  skipThumbnail = true 
)
static

Read in a savegame header

◆ createThumbnail()

void MADS::Game::createThumbnail ( )

Creates a temporary thumbnail for use in saving games


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