LastExpress::SaveLoad Class Reference

#include <savegame.h>

+ Collaboration diagram for LastExpress::SaveLoad:


struct  SavegameEntryHeader
struct  SavegameMainHeader

Public Member Functions

 SaveLoad (LastExpressEngine *engine)
 ~SaveLoad ()
void create (GameId id)
void clear (bool clearStream=false)
uint32 init (GameId id, bool resetHeaders)
void loadLastGame ()
void loadGame (uint32 index)
void saveGame (SavegameType type, EntityIndex entity, uint32 value)
void loadVolumeBrightness ()
void saveVolumeBrightness ()
bool isGameFinished (uint32 menuIndex, uint32 savegameIndex)
uint32 getTime (uint32 index)
ChapterIndex getChapter (uint32 index)
uint32 getValue (uint32 index)
uint32 getLastSavegameTicks () const

Static Public Member Functions

static bool isSavegamePresent (GameId id)
static bool isSavegameValid (GameId id)

Private Member Functions

void writeEntry (SavegameType type, EntityIndex entity, uint32 val)
void readEntry (SavegameType *type, EntityIndex *entity, uint32 *val, bool keepIndex)
uint32 writeValue (Common::Serializer &ser, const char *name, Common::Functor1< Common::Serializer &, void > *function, uint size)
uint32 readValue (Common::Serializer &ser, const char *name, Common::Functor1< Common::Serializer &, void > *function, uint size=0)
SavegameEntryHeadergetEntry (uint32 index)
void initStream ()
void loadStream (GameId id)
void flushStream (GameId id)
void syncEntity (Common::Serializer &ser)

Static Private Member Functions

static bool loadMainHeader (Common::InSaveFile *stream, SavegameMainHeader *header)
static Common::String getFilename (GameId id)
static Common::InSaveFileopenForLoading (GameId id)
static Common::OutSaveFileopenForSaving (GameId id)

Private Attributes

Common::Array< SavegameEntryHeader * > _gameHeaders
uint32 _gameTicksLastSavegame
EntityIndex _entity

Detailed Description

Definition at line 148 of file savegame.h.

Constructor & Destructor Documentation

◆ SaveLoad()

LastExpress::SaveLoad::SaveLoad ( LastExpressEngine engine)

Definition at line 349 of file savegame.cpp.

◆ ~SaveLoad()

LastExpress::SaveLoad::~SaveLoad ( )

Definition at line 352 of file savegame.cpp.

Member Function Documentation

◆ clear()

void LastExpress::SaveLoad::clear ( bool  clearStream = false)

Definition at line 469 of file savegame.cpp.

◆ create()

void LastExpress::SaveLoad::create ( GameId  id)

Definition at line 382 of file savegame.cpp.

◆ flushStream()

void LastExpress::SaveLoad::flushStream ( GameId  id)

Definition at line 365 of file savegame.cpp.

◆ getChapter()

ChapterIndex LastExpress::SaveLoad::getChapter ( uint32  index)

Definition at line 174 of file savegame.h.

◆ getEntry()

SaveLoad::SavegameEntryHeader * LastExpress::SaveLoad::getEntry ( uint32  index)

Definition at line 807 of file savegame.cpp.

◆ getFilename()

Common::String LastExpress::SaveLoad::getFilename ( GameId  id)

Definition at line 890 of file savegame.cpp.

◆ getLastSavegameTicks()

uint32 LastExpress::SaveLoad::getLastSavegameTicks ( ) const

Definition at line 176 of file savegame.h.

◆ getTime()

uint32 LastExpress::SaveLoad::getTime ( uint32  index)

Definition at line 173 of file savegame.h.

◆ getValue()

uint32 LastExpress::SaveLoad::getValue ( uint32  index)

Definition at line 175 of file savegame.h.

◆ init()

uint32 LastExpress::SaveLoad::init ( GameId  id,
bool  resetHeaders 

Definition at line 392 of file savegame.cpp.

◆ initStream()

void LastExpress::SaveLoad::initStream ( )

Definition at line 360 of file savegame.cpp.

◆ isGameFinished()

bool LastExpress::SaveLoad::isGameFinished ( uint32  menuIndex,
uint32  savegameIndex 

Definition at line 842 of file savegame.cpp.

◆ isSavegamePresent()

bool LastExpress::SaveLoad::isSavegamePresent ( GameId  id)

Definition at line 819 of file savegame.cpp.

◆ isSavegameValid()

bool LastExpress::SaveLoad::isSavegameValid ( GameId  id)

Definition at line 827 of file savegame.cpp.

◆ loadGame()

void LastExpress::SaveLoad::loadGame ( uint32  index)

Definition at line 520 of file savegame.cpp.

◆ loadLastGame()

void LastExpress::SaveLoad::loadLastGame ( )

Definition at line 484 of file savegame.cpp.

◆ loadMainHeader()

bool LastExpress::SaveLoad::loadMainHeader ( Common::InSaveFile stream,
SavegameMainHeader header 

Definition at line 626 of file savegame.cpp.

◆ loadStream()

void LastExpress::SaveLoad::loadStream ( GameId  id)

Definition at line 439 of file savegame.cpp.

◆ loadVolumeBrightness()

void LastExpress::SaveLoad::loadVolumeBrightness ( )

◆ openForLoading()

Common::InSaveFile * LastExpress::SaveLoad::openForLoading ( GameId  id)

Definition at line 897 of file savegame.cpp.

◆ openForSaving()

Common::OutSaveFile * LastExpress::SaveLoad::openForSaving ( GameId  id)

Definition at line 906 of file savegame.cpp.

◆ readEntry()

void LastExpress::SaveLoad::readEntry ( SavegameType type,
EntityIndex entity,
uint32 val,
bool  keepIndex 

Definition at line 758 of file savegame.cpp.

◆ readValue()

uint32 LastExpress::SaveLoad::readValue ( Common::Serializer ser,
const char *  name,
Common::Functor1< Common::Serializer &, void > *  function,
uint  size = 0 

Definition at line 675 of file savegame.cpp.

◆ saveGame()

void LastExpress::SaveLoad::saveGame ( SavegameType  type,
EntityIndex  entity,
uint32  value 

Definition at line 547 of file savegame.cpp.

◆ saveVolumeBrightness()

void LastExpress::SaveLoad::saveVolumeBrightness ( )

Definition at line 619 of file savegame.cpp.

◆ syncEntity()

void LastExpress::SaveLoad::syncEntity ( Common::Serializer ser)

Definition at line 695 of file savegame.cpp.

◆ writeEntry()

void LastExpress::SaveLoad::writeEntry ( SavegameType  type,
EntityIndex  entity,
uint32  val 

Definition at line 699 of file savegame.cpp.

◆ writeValue()

uint32 LastExpress::SaveLoad::writeValue ( Common::Serializer ser,
const char *  name,
Common::Functor1< Common::Serializer &, void > *  function,
uint  size 

Definition at line 654 of file savegame.cpp.

Member Data Documentation

◆ _engine

LastExpressEngine* LastExpress::SaveLoad::_engine

Definition at line 179 of file savegame.h.

◆ _entity

EntityIndex LastExpress::SaveLoad::_entity

Definition at line 323 of file savegame.h.

◆ _gameHeaders

Common::Array<SavegameEntryHeader *> LastExpress::SaveLoad::_gameHeaders

Definition at line 297 of file savegame.h.

◆ _gameTicksLastSavegame

uint32 LastExpress::SaveLoad::_gameTicksLastSavegame

Definition at line 298 of file savegame.h.

◆ _savegame

SavegameStream* LastExpress::SaveLoad::_savegame

Definition at line 296 of file savegame.h.

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