xoreos  0.0.5
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Engines::KotOR::SavedGame Class Reference

#include <savedgame.h>

Collaboration diagram for Engines::KotOR::SavedGame:
Collaboration graph
[legend]

Public Member Functions

 SavedGame ()
 
const Common::UStringgetName () const
 
const Common::UStringgetModuleName () const
 
uint32 getTimePlayed () const
 
CreaturegetPC ()
 
bool isPCLoaded () const
 

Static Public Member Functions

static SavedGameload (const Common::UString &dir, bool loadSav=false)
 Load saved game from a specified directory. More...
 

Static Private Member Functions

static void fillFromNFO (const Aurora::GFF3File &gff, SavedGame *save)
 
static void fillFromSAV (const Aurora::ERFFile &erf, const Common::UString &moduleName, SavedGame *save)
 
static void fillFromModuleSAV (const Aurora::ERFFile &erf, SavedGame *save)
 
static void fillFromModuleIFO (const Aurora::GFF3File &gff, SavedGame *save)
 

Private Attributes

Common::UString _name
 
Common::UString _moduleName
 
uint32 _timePlayed
 
uint8 _pcGender
 
float _pcPosition [3]
 
bool _pcLoaded
 
Creature_pc
 

Detailed Description

Definition at line 40 of file savedgame.h.

Constructor & Destructor Documentation

◆ SavedGame()

Engines::KotOR::SavedGame::SavedGame ( )

Definition at line 117 of file savedgame.cpp.

Referenced by load().

Here is the caller graph for this function:

Member Function Documentation

◆ fillFromModuleIFO()

void Engines::KotOR::SavedGame::fillFromModuleIFO ( const Aurora::GFF3File gff,
SavedGame save 
)
staticprivate

Definition at line 104 of file savedgame.cpp.

References _pcGender, _pcLoaded, _pcPosition, Aurora::GFF3Struct::getDouble(), Aurora::GFF3Struct::getList(), Aurora::GFF3File::getTopLevel(), Aurora::GFF3Struct::getUint(), and warning().

Referenced by fillFromModuleSAV().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillFromModuleSAV()

void Engines::KotOR::SavedGame::fillFromModuleSAV ( const Aurora::ERFFile erf,
SavedGame save 
)
staticprivate

Definition at line 84 of file savedgame.cpp.

References fillFromModuleIFO(), Aurora::ERFFile::getResource(), Aurora::ERFFile::getResources(), Aurora::Archive::Resource::index, Aurora::kFileTypeIFO, Aurora::Archive::Resource::name, Aurora::Archive::Resource::type, and warning().

Referenced by fillFromSAV().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillFromNFO()

void Engines::KotOR::SavedGame::fillFromNFO ( const Aurora::GFF3File gff,
SavedGame save 
)
staticprivate

Definition at line 56 of file savedgame.cpp.

References _moduleName, _name, _timePlayed, Aurora::GFF3Struct::getString(), Aurora::GFF3File::getTopLevel(), and Aurora::GFF3Struct::getUint().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillFromSAV()

void Engines::KotOR::SavedGame::fillFromSAV ( const Aurora::ERFFile erf,
const Common::UString moduleName,
SavedGame save 
)
staticprivate

◆ getModuleName()

const Common::UString & Engines::KotOR::SavedGame::getModuleName ( ) const

Definition at line 127 of file savedgame.cpp.

References _moduleName.

Referenced by Engines::KotOR::Module::loadSavedGame().

Here is the caller graph for this function:

◆ getName()

const Common::UString & Engines::KotOR::SavedGame::getName ( ) const

Definition at line 123 of file savedgame.cpp.

References _name.

Referenced by Engines::KotOR::SaveLoadMenu::addSavedGameItems().

Here is the caller graph for this function:

◆ getPC()

Creature * Engines::KotOR::SavedGame::getPC ( )

◆ getTimePlayed()

uint32 Engines::KotOR::SavedGame::getTimePlayed ( ) const

Definition at line 131 of file savedgame.cpp.

References _timePlayed.

Referenced by Engines::KotOR::SaveLoadMenu::addSavedGameItems().

Here is the caller graph for this function:

◆ isPCLoaded()

bool Engines::KotOR::SavedGame::isPCLoaded ( ) const

Definition at line 158 of file savedgame.cpp.

References _pcLoaded.

Referenced by Engines::KotOR::Module::loadSavedGame().

Here is the caller graph for this function:

◆ load()

SavedGame * Engines::KotOR::SavedGame::load ( const Common::UString dir,
bool  loadSav = false 
)
static

Load saved game from a specified directory.

Parameters
loadSavif true load all saved state, otherwise load menu info only

Definition at line 38 of file savedgame.cpp.

References _moduleName, fillFromNFO(), fillFromSAV(), Common::FilePath::normalize(), and SavedGame().

Referenced by Engines::KotOR::SaveLoadMenu::addSavedGameItems(), and Engines::KotOR::SaveLoadMenu::tryLoadGame().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _moduleName

Common::UString Engines::KotOR::SavedGame::_moduleName
private

Definition at line 65 of file savedgame.h.

Referenced by fillFromNFO(), getModuleName(), and load().

◆ _name

Common::UString Engines::KotOR::SavedGame::_name
private

Definition at line 64 of file savedgame.h.

Referenced by fillFromNFO(), and getName().

◆ _pc

Creature* Engines::KotOR::SavedGame::_pc
private

Definition at line 70 of file savedgame.h.

Referenced by getPC().

◆ _pcGender

uint8 Engines::KotOR::SavedGame::_pcGender
private

Definition at line 67 of file savedgame.h.

Referenced by fillFromModuleIFO(), and getPC().

◆ _pcLoaded

bool Engines::KotOR::SavedGame::_pcLoaded
private

Definition at line 69 of file savedgame.h.

Referenced by fillFromModuleIFO(), getPC(), and isPCLoaded().

◆ _pcPosition

float Engines::KotOR::SavedGame::_pcPosition[3]
private

Definition at line 68 of file savedgame.h.

Referenced by fillFromModuleIFO(), and getPC().

◆ _timePlayed

uint32 Engines::KotOR::SavedGame::_timePlayed
private

Definition at line 66 of file savedgame.h.

Referenced by fillFromNFO(), and getTimePlayed().


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