#include <GameState.h>
Inherits SubsystemInterface, and Snapshot.
Public Member Functions | |
| GameState (void) | |
| virtual | ~GameState (void) |
| virtual void | init (void) |
| virtual void | reset (void) |
| virtual void | update (void) |
| SaveCode | saveGame (AsciiString filename, UnicodeString desc, SaveFileType saveType, SnapshotType which=SNAPSHOT_SAVELOAD) |
| save a game | |
| SaveCode | missionSave (void) |
| do a in between mission save | |
| SaveCode | loadGame (AvailableGameInfo gameInfo) |
| load a save file | |
| SaveGameInfo * | getSaveGameInfo (void) |
| void | addPostProcessSnapshot (Snapshot *snapshot) |
| add snapshot to post process laod | |
| Bool | doesSaveGameExist (AsciiString filename) |
| does the save file exist | |
| void | populateSaveGameListbox (GameWindow *listbox, SaveLoadLayoutType layoutType) |
| populate listbox with available save games | |
| void | getSaveGameInfoFromFile (AsciiString filename, SaveGameInfo *saveGameInfo) |
| get save game info from file | |
| void | friend_xferSaveDataForCRC (Xfer *xfer, SnapshotType which) |
| This should only be called to DeepCRC sanity checking. | |
| Bool | isInLoadGame (void) |
| void | setPristineMapName (AsciiString name) |
| AsciiString | getPristineMapName (void) |
| AsciiString | getSaveDirectory () const |
| AsciiString | getFilePathInSaveDirectory (const AsciiString &leaf) const |
| Bool | isInSaveDirectory (const AsciiString &path) const |
| AsciiString | realMapPathToPortableMapPath (const AsciiString &in) const |
| AsciiString | portableMapPathToRealMapPath (const AsciiString &in) const |
| AsciiString | getMapLeafName (const AsciiString &in) const |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | postProcessLoad () |
| virtual void | draw (void) |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| run the "light" crc check on this data structure | |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Additional Inherited Members | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
Definition at line 151 of file GameState.h.
| GameState::GameState | ( | void | ) |
Definition at line 281 of file GameState.cpp.
|
virtual |
Definition at line 291 of file GameState.cpp.
| void GameState::addPostProcessSnapshot | ( | Snapshot * | snapshot | ) |
add snapshot to post process laod
Add a snapshot to the post process list for later
Definition at line 1487 of file GameState.cpp.
|
inlineprotectedvirtual |
run the "light" crc check on this data structure
Implements Snapshot.
Definition at line 201 of file GameState.h.
| Bool GameState::doesSaveGameExist | ( | AsciiString | filename | ) |
does the save file exist
Does the save game file exist
Definition at line 939 of file GameState.cpp.
| void GameState::friend_xferSaveDataForCRC | ( | Xfer * | xfer, |
| SnapshotType | which ) |
This should only be called to DeepCRC sanity checking.
Save game to xfer or load game using xfer
Definition at line 1322 of file GameState.cpp.
| AsciiString GameState::getFilePathInSaveDirectory | ( | const AsciiString & | leaf | ) | const |
Definition at line 776 of file GameState.cpp.
| AsciiString GameState::getMapLeafName | ( | const AsciiString & | in | ) | const |
Definition at line 790 of file GameState.cpp.
|
inline |
Definition at line 187 of file GameState.h.
| AsciiString GameState::getSaveDirectory | ( | ) | const |
Definition at line 768 of file GameState.cpp.
|
inline |
Definition at line 172 of file GameState.h.
| void GameState::getSaveGameInfoFromFile | ( | AsciiString | filename, |
| SaveGameInfo * | saveGameInfo ) |
get save game info from file
Get save game info from the filename specified
Definition at line 972 of file GameState.cpp.
|
virtual |
Init the game state subsystem
Implements SubsystemInterface.
Definition at line 309 of file GameState.cpp.
|
inline |
Definition at line 184 of file GameState.h.
| Bool GameState::isInSaveDirectory | ( | const AsciiString & | path | ) | const |
Definition at line 784 of file GameState.cpp.
| SaveCode GameState::loadGame | ( | AvailableGameInfo | gameInfo | ) |
load a save file
Load the save game pointed to by filename
Definition at line 652 of file GameState.cpp.
|
inlineprotectedvirtual |
post process phase for loading save games. All save systems have their xfer run using XferLoad mode, and then all systems each have their post process run
Implements Snapshot.
Definition at line 203 of file GameState.h.
| SaveCode GameState::missionSave | ( | void | ) |
| void GameState::populateSaveGameListbox | ( | GameWindow * | listbox, |
| SaveLoadLayoutType | layoutType ) |
populate listbox with available save games
Populate the listbox passed in with a list of the save games present on the hard drive
Definition at line 1151 of file GameState.cpp.
| AsciiString GameState::portableMapPathToRealMapPath | ( | const AsciiString & | in | ) | const |
Definition at line 902 of file GameState.cpp.
| AsciiString GameState::realMapPathToPortableMapPath | ( | const AsciiString & | in | ) | const |
Definition at line 872 of file GameState.cpp.
|
virtual |
| SaveCode GameState::saveGame | ( | AsciiString | filename, |
| UnicodeString | desc, | ||
| SaveFileType | saveType, | ||
| SnapshotType | which = SNAPSHOT_SAVELOAD ) |
save a game
Save the current state of the engine in a save file NOTE: filename is a filename only
Definition at line 542 of file GameState.cpp.
|
inline |
Definition at line 186 of file GameState.h.
|
inlinevirtual |
Implements SubsystemInterface.
Definition at line 163 of file GameState.h.
|
protectedvirtual |
Xfer method for the game state itself Version Info: 1: Initial version 2: Added save file type and mission map name (regular save vs automatic mission save)
Implements Snapshot.
Definition at line 1563 of file GameState.cpp.