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

#include <state.h>

Collaboration diagram for Myst3::GameState:

List of all members.

Classes

struct  StateData
struct  VarDescription

Public Member Functions

 GameState (const Common::Platform platform, Database *database)
virtual ~GameState ()
void newGame ()
bool load (Common::InSaveFile *saveFile)
bool save (Common::OutSaveFile *saveFile, const Common::String &description, const Graphics::Surface *thumbnail)
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,
VarDescription
VarMap

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
Database_db
StateData _data
uint32 _lastTickStartTime
VarMap _varDescriptions

Static Private Attributes

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

Detailed Description

Definition at line 49 of file state.h.


Member Typedef Documentation

Definition at line 414 of file state.h.


Constructor & Destructor Documentation

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

Definition at line 83 of file state.cpp.

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

Definition at line 393 of file state.cpp.


Member Function Documentation

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

Definition at line 594 of file state.cpp.

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

Definition at line 691 of file state.cpp.

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

Definition at line 681 of file state.cpp.

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

Definition at line 663 of file state.cpp.

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

Definition at line 672 of file state.cpp.

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

Definition at line 637 of file state.cpp.

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

Definition at line 599 of file state.cpp.

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

Definition at line 565 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 575 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 479 of file state.cpp.

uint Myst3::GameState::getTickCount (  )  const

Definition at line 769 of file state.cpp.

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

Definition at line 617 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 779 of file state.cpp.

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

Definition at line 702 of file state.cpp.

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

Definition at line 535 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 788 of file state.cpp.

void Myst3::GameState::newGame (  ) 

Definition at line 530 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 773 of file state.cpp.

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

Definition at line 487 of file state.cpp.

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

Definition at line 510 of file state.cpp.

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

Definition at line 544 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 623 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 609 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 396 of file state.cpp.

void Myst3::GameState::updateFrameCounters (  ) 

Definition at line 710 of file state.cpp.

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

Definition at line 584 of file state.cpp.

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

Definition at line 742 of file state.cpp.

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

Definition at line 656 of file state.cpp.

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

Definition at line 498 of file state.cpp.


Member Data Documentation

Definition at line 400 of file state.h.

Definition at line 396 of file state.h.

Definition at line 403 of file state.h.

Definition at line 395 of file state.h.

Definition at line 416 of file state.h.

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

Definition at line 398 of file state.h.

Definition at line 392 of file state.h.

Definition at line 391 of file state.h.

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

Definition at line 402 of file state.h.


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


Generated on Sat Jan 12 2019 05:04:56 for ResidualVM by doxygen 1.7.1
curved edge   curved edge