GameInfo Struct Reference

GameInfo contains detailed information about the game. More...

#include <GameInfo.h>

List of all members.

Public Types

 GAME_UNKNOWN = 0
 GAME_U8
 GAME_REMORSE
 GAME_REGRET
 GAME_PENTAGRAM_MENU
 GAMELANG_UNKNOWN = 0
 GAMELANG_ENGLISH
 GAMELANG_FRENCH
 GAMELANG_GERMAN
 GAMELANG_SPANISH
 GAMELANG_JAPANESE
enum  GameType {
  GAME_UNKNOWN = 0, GAME_U8, GAME_REMORSE, GAME_REGRET,
  GAME_PENTAGRAM_MENU
}
enum  GameLanguage {
  GAMELANG_UNKNOWN = 0, GAMELANG_ENGLISH, GAMELANG_FRENCH, GAMELANG_GERMAN,
  GAMELANG_SPANISH, GAMELANG_JAPANESE
}

Public Member Functions

 GameInfo ()
char getLanguageFileLetter () const
char getLanguageUsecodeLetter () const
std::string getLanguage () const
std::string getGameTitle () const
std::string getPrintableVersion () const
std::string getPrintDetails () const
std::string getPrintableMD5 () const
bool match (GameInfo &other, bool ignoreMD5=false) const
void save (ODataSource *ods)
bool load (IDataSource *ids, uint32 version)

Public Attributes

Pentagram::istring name
enum GameInfo::GameType type
int version
enum GameInfo::GameLanguage language
uint8 md5 [16]


Detailed Description

GameInfo contains detailed information about the game.

Definition at line 26 of file GameInfo.h.


Member Enumeration Documentation

enum GameInfo::GameLanguage

Enumerator:
GAMELANG_UNKNOWN 
GAMELANG_ENGLISH 
GAMELANG_FRENCH 
GAMELANG_GERMAN 
GAMELANG_SPANISH 
GAMELANG_JAPANESE 

Definition at line 44 of file GameInfo.h.

enum GameInfo::GameType

Enumerator:
GAME_UNKNOWN 
GAME_U8 
GAME_REMORSE 
GAME_REGRET 
GAME_PENTAGRAM_MENU 

Definition at line 31 of file GameInfo.h.


Constructor & Destructor Documentation

GameInfo::GameInfo (  ) 

Definition at line 60 of file GameInfo.cpp.

References md5.


Member Function Documentation

std::string GameInfo::getGameTitle (  )  const

Definition at line 111 of file GameInfo.cpp.

References gametypes, and type.

Referenced by getPrintDetails(), GameWidget::InitGump(), and GUIApp::startupGame().

std::string GameInfo::getLanguage (  )  const

Definition at line 103 of file GameInfo.cpp.

References gamelangs, and language.

Referenced by getPrintDetails().

char GameInfo::getLanguageFileLetter (  )  const

Definition at line 67 of file GameInfo.cpp.

References GAME_REGRET, GAME_REMORSE, GAME_U8, gamelangs, language, and type.

Referenced by GameData::getSpeechFlex(), U8Game::playCredits(), and U8Game::playIntroMovie().

char GameInfo::getLanguageUsecodeLetter (  )  const

Definition at line 85 of file GameInfo.cpp.

References GAME_REGRET, GAME_REMORSE, GAME_U8, gamelangs, language, and type.

Referenced by GameData::loadRemorseData(), and GameData::loadU8Data().

std::string GameInfo::getPrintableMD5 (  )  const

Definition at line 153 of file GameInfo.cpp.

References md5.

Referenced by GameDetector::detect(), getPrintDetails(), and save().

std::string GameInfo::getPrintableVersion (  )  const

Definition at line 119 of file GameInfo.cpp.

References version.

Referenced by getPrintDetails(), and GameWidget::InitGump().

std::string GameInfo::getPrintDetails (  )  const

Definition at line 126 of file GameInfo.cpp.

References GAME_PENTAGRAM_MENU, getGameTitle(), getLanguage(), getPrintableMD5(), getPrintableVersion(), and type.

Referenced by GUIApp::ConCmd_listGames(), GUIApp::loadGame(), CoreApp::setupGame(), and CoreApp::setupGameList().

bool GameInfo::load ( IDataSource ids,
uint32  version 
)

Definition at line 197 of file GameInfo.cpp.

References gamelangs, gametypes, language, md5, name, IDataSource::readline(), Pentagram::SplitString(), type, and x.

Referenced by GUIApp::loadGame().

bool GameInfo::match ( GameInfo other,
bool  ignoreMD5 = false 
) const

Definition at line 167 of file GameInfo.cpp.

References language, md5, type, and version.

Referenced by GUIApp::loadGame().

void GameInfo::save ( ODataSource ods  ) 

Definition at line 178 of file GameInfo.cpp.

References gamelangs, gametypes, getPrintableMD5(), language, md5, type, version, and ODataSource::write().

Referenced by GUIApp::saveGame().


Member Data Documentation

enum GameInfo::GameLanguage GameInfo::language

Referenced by GameDetector::detect(), CoreApp::getGameInfo(), getLanguage(), getLanguageFileLetter(), getLanguageUsecodeLetter(), load(), GameData::loadTranslation(), match(), GameWidget::PaintThis(), save(), GameData::setupFontOverrides(), and U8Game::U8Game().

uint8 GameInfo::md5[16]

Definition at line 53 of file GameInfo.h.

Referenced by GameDetector::detect(), GameInfo(), getPrintableMD5(), load(), match(), and save().

Pentagram::istring GameInfo::name

Definition at line 29 of file GameInfo.h.

Referenced by GUIApp::ConCmd_changeGame(), CoreApp::getGameInfo(), GameWidget::getGameName(), GameWidget::InitGump(), load(), CoreApp::setupGame(), CoreApp::setupGamePaths(), and GUIApp::startupGame().

enum GameInfo::GameType GameInfo::type

Referenced by Game::createGame(), GameDetector::detect(), CoreApp::getGameInfo(), getGameTitle(), getLanguageFileLetter(), getLanguageUsecodeLetter(), getPrintDetails(), load(), GameData::loadTranslation(), match(), GameWidget::PaintThis(), and save().

int GameInfo::version

version number, encoded as 100*major + minor so, 2.12 becomes 212 0 = unknown

Definition at line 42 of file GameInfo.h.

Referenced by GameDetector::detect(), CoreApp::getGameInfo(), getPrintableVersion(), match(), and save().


The documentation for this struct was generated from the following files:
Generated on Fri Jul 27 22:29:17 2007 for pentagram by  doxygen 1.4.7