ScummVM API documentation
Ultima::Shared::Game Class Reference

#include <game.h>

Inheritance diagram for Ultima::Shared::Game:
Ultima::Shared::GameBase Ultima::Shared::TreeItem Ultima::Shared::EventTarget Ultima::Shared::MessageTarget Ultima::Shared::BaseObject Ultima::Ultima0::Ultima0Game Ultima::Ultima1::Ultima1Game

Public Member Functions

 Game ()
 
 ~Game () override
 
void playFX (uint effectId)
 
void setEGAPalette (const byte *palette)
 
void setCGAPalette ()
 
Maps::MapgetMap () const override
 
void synchronize (Common::Serializer &s) override
 
void endOfTurn ()
 
- Public Member Functions inherited from Ultima::Shared::GameBase
 GameBase ()
 
 ~GameBase () override
 
void onIdle () override
 
void mouseMove (const Point &mousePos) override
 
void leftButtonDown (const Point &mousePos) override
 
void leftButtonUp (const Point &mousePos) override
 
void middleButtonDown (const Point &mousePos) override
 
void middleButtonUp (const Point &mousePos) override
 
void rightButtonDown (const Point &mousePos) override
 
void rightButtonUp (const Point &mousePos) override
 
void mouseWheel (const Point &mousePos, bool wheelUp) override
 
void keyDown (Common::KeyState keyState) override
 
virtual void starting (bool isLoading)
 
virtual bool isVGA () const
 
void update ()
 
void mouseChanged ()
 
void setView (Gfx::VisualItem *view)
 
void setView (const Common::String &viewName)
 
void setPopup (Gfx::Popup *popup)
 
Gfx::VisualItemgetView () const
 
void setFont (Gfx::Font *font)
 
Gfx::FontgetFont () const
 
uint getRandomNumber (uint max)
 
uint getRandomNumber (uint min, uint max)
 
void sleep (uint time)
 
uint32 getMillis () const
 
virtual bool canLoadGameStateCurrently ()
 
virtual bool canSaveGameStateCurrently ()
 
- Public Member Functions inherited from Ultima::Shared::TreeItem
virtual const Common::String getName () const
 
virtual bool isEquals (const Common::String &name, int maxLen=0) const
 
virtual int compareTo (const Common::String &name, int maxLen=0) const
 
virtual void viewChange ()
 
TreeItemgetParent () const
 
GamegetGame ()
 
const GamegetGame () const
 
Gfx::VisualItemgetView ()
 
TreeItemgetNextSibling () const
 
TreeItemgetPriorSibling () const
 
TreeItemgetLastSibling ()
 
TreeItemgetFirstChild () const
 
TreeItemgetLastChild () const
 
TreeItemscan (TreeItem *item) const
 
TreeItemfindChildInstanceOf (const ClassDef &classDef) const
 
TreeItemfindNextInstanceOf (const ClassDef &classDef, TreeItem *startItem) const
 
void addUnder (TreeItem *newParent)
 
void addChild (TreeItem *child)
 
void setParent (TreeItem *newParent)
 
void addSibling (TreeItem *item)
 
void moveUnder (TreeItem *newParent)
 
void destroyAll ()
 
int destroyChildren ()
 
void detach ()
 
void attach (TreeItem *item)
 
NamedItemfindByName (const Common::String &name)
 
- Public Member Functions inherited from Ultima::Shared::BaseObject
virtual ::Ultima::Shared::ClassDef getType () const
 
bool isInstanceOf (const ClassDef &classDef) const
 
- Public Member Functions inherited from Ultima::Shared::EventTarget
virtual void keyUp (Common::KeyState keyState)
 

Public Attributes

byte _edgeColor
 
byte _borderColor
 
byte _highlightColor
 
byte _textColor
 
byte _color1
 
byte _bgColor
 
byte _whiteColor
 
Party_party
 
Maps::Map_map
 
uint32 _randomSeed
 
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::GameBase
Gfx::TextCursor_textCursor
 
uint _videoMode
 
- Public Attributes inherited from Ultima::Shared::TreeItem
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::MessageTarget
 CLASSDEF
 

Protected Member Functions

void setEGAPalette ()
 
void loadU6Palette ()
 
- Protected Member Functions inherited from Ultima::Shared::MessageTarget
virtual const Ultima::Shared::MSGMAPgetMessageMap () const
 

Protected Attributes

GameView * _gameView
 
FontResources_fontResources
 
- Protected Attributes inherited from Ultima::Shared::GameBase
uint32 _priorLeftDownTime
 
uint32 _priorMiddleDownTime
 
uint32 _priorRightDownTime
 
Gfx::VisualItem_currentView
 
Gfx::Popup_pendingPopup
 
InputHandler _inputHandler
 
InputTranslator _inputTranslator
 
Gfx::Font_font
 

Additional Inherited Members

- Static Public Member Functions inherited from Ultima::Shared::BaseObject
::Ultima::Shared::ClassDef type ()
 
- Static Protected Member Functions inherited from Ultima::Shared::MessageTarget
static const Ultima::Shared::MSGMAPgetThisMessageMap ()
 

Detailed Description

More specialized base class for earlier Ultima games

Constructor & Destructor Documentation

◆ Game()

Ultima::Shared::Game::Game ( )

Constructor

◆ ~Game()

Ultima::Shared::Game::~Game ( )
override

Destructor

Member Function Documentation

◆ setEGAPalette() [1/2]

void Ultima::Shared::Game::setEGAPalette ( )
protected

Sets up EGA palette

◆ loadU6Palette()

void Ultima::Shared::Game::loadU6Palette ( )
protected

Loads the Ultima 6 palette

◆ playFX()

void Ultima::Shared::Game::playFX ( uint  effectId)

Play a sound effect

◆ setEGAPalette() [2/2]

void Ultima::Shared::Game::setEGAPalette ( const byte *  palette)

Sets an EGA palette based on a 16-byte EGA RGB indexes

◆ setCGAPalette()

void Ultima::Shared::Game::setCGAPalette ( )

Sets up a CGA palette

◆ getMap()

Maps::Map* Ultima::Shared::Game::getMap ( ) const
inlineoverridevirtual

Returns the map

Reimplemented from Ultima::Shared::GameBase.

◆ synchronize()

void Ultima::Shared::Game::synchronize ( Common::Serializer s)
overridevirtual

Handles loading and saving games

Reimplemented from Ultima::Shared::GameBase.

Reimplemented in Ultima::Ultima1::Ultima1Game.

◆ endOfTurn()

void Ultima::Shared::Game::endOfTurn ( )

Signal an end of turn

Member Data Documentation

◆ _party

Party* Ultima::Shared::Game::_party

Player party. In the earlier Ultima games, this is a single character

◆ _map

Maps::Map* Ultima::Shared::Game::_map

Pointer to the map manager for the game

◆ _randomSeed

uint32 Ultima::Shared::Game::_randomSeed

Stores the base random seed used for generating deterministic dungeon levels


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