ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <state.h>

Collaboration diagram for Myst3::GameState:

List of all members.


struct  StateData
struct  VarDescription

Public Member Functions

 GameState (const Common::Platform platform, Database *database)
virtual ~GameState ()
void newGame ()
Common::Error load (Common::InSaveFile *saveFile)
Common::Error save (Common::OutSaveFile *saveFile, const Common::String &description, const Graphics::Surface *thumbnail, bool isAutosave)
int32 getVar (uint16 var)
void setVar (uint16 var, int32 value)
bool evaluate (int16 condition)
int32 valueOrVarValue (int16 value)
const Common::String describeVar (uint16 var)
const Common::String describeCondition (int16 condition)
void updateFrameCounters ()
uint getTickCount () const
void pauseEngine (bool pause)
 Ensture the counters are correct when the engine is paused or resumed.
ViewType getViewType ()
void setViewType (ViewType t)
float getLookAtFOV ()
void setLookAtFOV (float fov)
float getLookAtPitch ()
float getLookAtHeading ()
void lookAt (float pitch, float heading)
void limitCubeCamera (float minPitch, float maxPitch, float minHeading, float maxHeading)
void freeCubeCamera ()
bool isCameraLimited ()
float getMinPitch ()
float getMaxPitch ()
float getMinHeading ()
float getMaxHeading ()
void markNodeAsVisited (uint16 node, uint16 room, uint32 age)
bool isZipDestinationAvailable (uint16 node, uint16 room, uint32 age)
Common::String formatSaveTime ()
Common::Array< uint16getInventory ()
void updateInventory (const Common::Array< uint16 > &items)

Static Public Member Functions

static const Graphics::PixelFormat getThumbnailSavePixelFormat ()
static Graphics::SurfacereadThumbnail (Common::ReadStream *inStream)
static void writeThumbnail (Common::WriteStream *outStream, const Graphics::Surface *thumbnail)
static Graphics::SurfaceresizeThumbnail (Graphics::Surface *big, uint width, uint height)

Static Public Attributes

static const uint kThumbnailWidth = 240
static const uint kThumbnailHeight = 135

Private Types

typedef Common::HashMap
< Common::String,

Private Member Functions

void checkRange (uint16 var)
const VarDescription findDescription (uint16 var)
void shiftVariables (uint16 base, int32 value)
int32 engineGet (const Common::String &varName)
void engineSet (const Common::String &varName, int32 value)
void updateTickCounters ()

Static Private Member Functions

static void syncFloat (Common::Serializer &s, float &val, Common::Serializer::Version minVersion=0, Common::Serializer::Version maxVersion=Common::Serializer::kLastVersion)

Private Attributes

const Common::Platform _platform
StateData _data
uint32 _lastTickStartTime
VarMap _varDescriptions

Static Private Attributes

static const uint32 kSaveVersion = 150
static const uint32 kTickDuration = 1000 / 30

Detailed Description

Definition at line 49 of file state.h.

Member Typedef Documentation

Definition at line 416 of file state.h.

Constructor & Destructor Documentation

Myst3::GameState::GameState ( const Common::Platform  platform,
Database database 

Definition at line 84 of file state.cpp.

Myst3::GameState::~GameState (  )  [virtual]

Definition at line 394 of file state.cpp.

Member Function Documentation

void Myst3::GameState::checkRange ( uint16  var  )  [private]

Definition at line 609 of file state.cpp.

const Common::String Myst3::GameState::describeCondition ( int16  condition  ) 

Definition at line 706 of file state.cpp.

const Common::String Myst3::GameState::describeVar ( uint16  var  ) 

Definition at line 696 of file state.cpp.

int32 Myst3::GameState::engineGet ( const Common::String varName  )  [private]

Definition at line 678 of file state.cpp.

void Myst3::GameState::engineSet ( const Common::String varName,
int32  value 
) [private]

Definition at line 687 of file state.cpp.

bool Myst3::GameState::evaluate ( int16  condition  ) 

Definition at line 652 of file state.cpp.

const GameState::VarDescription Myst3::GameState::findDescription ( uint16  var  )  [private]

Definition at line 614 of file state.cpp.

Common::String Myst3::GameState::formatSaveTime (  ) 

Definition at line 580 of file state.cpp.

void Myst3::GameState::freeCubeCamera (  )  [inline]

Definition at line 327 of file state.h.

Common::Array< uint16 > Myst3::GameState::getInventory (  ) 

Definition at line 590 of file state.cpp.

float Myst3::GameState::getLookAtFOV (  )  [inline]

Definition at line 320 of file state.h.

float Myst3::GameState::getLookAtHeading (  )  [inline]

Definition at line 323 of file state.h.

float Myst3::GameState::getLookAtPitch (  )  [inline]

Definition at line 322 of file state.h.

float Myst3::GameState::getMaxHeading (  )  [inline]

Definition at line 332 of file state.h.

float Myst3::GameState::getMaxPitch (  )  [inline]

Definition at line 330 of file state.h.

float Myst3::GameState::getMinHeading (  )  [inline]

Definition at line 331 of file state.h.

float Myst3::GameState::getMinPitch (  )  [inline]

Definition at line 329 of file state.h.

const Graphics::PixelFormat Myst3::GameState::getThumbnailSavePixelFormat (  )  [static]

Definition at line 483 of file state.cpp.

uint Myst3::GameState::getTickCount (  )  const

Definition at line 784 of file state.cpp.

int32 Myst3::GameState::getVar ( uint16  var  ) 

Definition at line 632 of file state.cpp.

ViewType Myst3::GameState::getViewType (  )  [inline]

Definition at line 317 of file state.h.

bool Myst3::GameState::isCameraLimited (  )  [inline]

Definition at line 328 of file state.h.

bool Myst3::GameState::isZipDestinationAvailable ( uint16  node,
uint16  room,
uint32  age 

Definition at line 794 of file state.cpp.

void Myst3::GameState::limitCubeCamera ( float  minPitch,
float  maxPitch,
float  minHeading,
float  maxHeading 

Definition at line 717 of file state.cpp.

Common::Error Myst3::GameState::load ( Common::InSaveFile saveFile  ) 

Definition at line 539 of file state.cpp.

void Myst3::GameState::lookAt ( float  pitch,
float  heading 
) [inline]

Definition at line 324 of file state.h.

void Myst3::GameState::markNodeAsVisited ( uint16  node,
uint16  room,
uint32  age 

Definition at line 803 of file state.cpp.

void Myst3::GameState::newGame (  ) 

Definition at line 534 of file state.cpp.

void Myst3::GameState::pauseEngine ( bool  pause  ) 

Ensture the counters are correct when the engine is paused or resumed.

Definition at line 788 of file state.cpp.

Graphics::Surface * Myst3::GameState::readThumbnail ( Common::ReadStream inStream  )  [static]

Definition at line 491 of file state.cpp.

Graphics::Surface * Myst3::GameState::resizeThumbnail ( Graphics::Surface big,
uint  width,
uint  height 
) [static]

Definition at line 514 of file state.cpp.

Common::Error Myst3::GameState::save ( Common::OutSaveFile saveFile,
const Common::String description,
const Graphics::Surface thumbnail,
bool  isAutosave 

Definition at line 552 of file state.cpp.

void Myst3::GameState::setLookAtFOV ( float  fov  )  [inline]

Definition at line 321 of file state.h.

void Myst3::GameState::setVar ( uint16  var,
int32  value 

Definition at line 638 of file state.cpp.

void Myst3::GameState::setViewType ( ViewType  t  )  [inline]

Definition at line 318 of file state.h.

void Myst3::GameState::shiftVariables ( uint16  base,
int32  value 
) [private]

Definition at line 624 of file state.cpp.

void Myst3::GameState::syncFloat ( Common::Serializer s,
float &  val,
Common::Serializer::Version  minVersion = 0,
Common::Serializer::Version  maxVersion = Common::Serializer::kLastVersion 
) [static, private]

Definition at line 397 of file state.cpp.

void Myst3::GameState::updateFrameCounters (  ) 

Definition at line 725 of file state.cpp.

void Myst3::GameState::updateInventory ( const Common::Array< uint16 > &  items  ) 

Definition at line 599 of file state.cpp.

void Myst3::GameState::updateTickCounters (  )  [private]

Definition at line 757 of file state.cpp.

int32 Myst3::GameState::valueOrVarValue ( int16  value  ) 

Definition at line 671 of file state.cpp.

void Myst3::GameState::writeThumbnail ( Common::WriteStream outStream,
const Graphics::Surface thumbnail 
) [static]

Definition at line 502 of file state.cpp.

Member Data Documentation

Definition at line 402 of file state.h.

Definition at line 398 of file state.h.

Definition at line 405 of file state.h.

Definition at line 397 of file state.h.

Definition at line 418 of file state.h.

const uint32 Myst3::GameState::kSaveVersion = 150 [static, private]

Definition at line 400 of file state.h.

Definition at line 394 of file state.h.

Definition at line 393 of file state.h.

const uint32 Myst3::GameState::kTickDuration = 1000 / 30 [static, private]

Definition at line 404 of file state.h.

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

Generated on Sat Sep 12 2020 05:05:09 for ResidualVM by doxygen 1.7.1
curved edge   curved edge