ScummVM API documentation
Asylum::Savegame Class Reference

Public Member Functions

 Savegame (AsylumEngine *engine)
 
bool hasSavegames () const
 
void loadList ()
 
void load ()
 
bool quickLoad ()
 
void save ()
 
bool quickSave ()
 
void remove ()
 
bool isCompatible ()
 
void setMovieViewed (uint32 index)
 
uint32 getMoviesViewed (int32 *movieList) const
 
void loadMoviesViewed ()
 
void setName (uint32 index, const Common::String &name)
 
Common::String getName (uint32 index) const
 
Common::StringgetName ()
 
void setIndex (uint32 index)
 
uint32 getIndex ()
 
bool hasSavegame (uint32 index) const
 
ResourcePackId getScenePack ()
 
void resetVersion ()
 
const char * getVersion ()
 
uint32 getBuild ()
 

Static Public Member Functions

static void seek (Common::InSaveFile *file, uint32 offset, const Common::String &description)
 
static uint32 read (Common::InSaveFile *file, const Common::String &description)
 
static Common::String read (Common::InSaveFile *file, uint32 strLength, const Common::String &description)
 
static void read (Common::InSaveFile *file, Common::Serializable *data, uint32 size, uint32 count, const Common::String &description)
 
static void write (Common::OutSaveFile *file, uint32 val, const Common::String &description)
 
static void write (Common::OutSaveFile *file, const Common::String &val, uint32 strLength, const Common::String &description)
 
static void write (Common::OutSaveFile *file, Common::Serializable *data, uint32 size, uint32 count, const Common::String &description)
 

Member Function Documentation

◆ hasSavegames()

bool Asylum::Savegame::hasSavegames ( ) const

Checks if saved games are present

Returns
true if it succeeds, false if it fails.

◆ loadList()

void Asylum::Savegame::loadList ( )

Loads the list of saved games.

◆ load()

void Asylum::Savegame::load ( )

Loads a game

◆ quickLoad()

bool Asylum::Savegame::quickLoad ( )

Quick loads a game

Returns
true if it succeeds, false if it fails.

◆ save()

void Asylum::Savegame::save ( )

Saves a game

Returns
true if it succeeds, false if it fails.

◆ quickSave()

bool Asylum::Savegame::quickSave ( )

Quick saves a game

Returns
true if it succeeds, false if it fails.

◆ remove()

void Asylum::Savegame::remove ( )

Removes a savegame

◆ isCompatible()

bool Asylum::Savegame::isCompatible ( )

Checks if a savegame is compatible

Returns
true if it is, false otherwise.

◆ seek()

static void Asylum::Savegame::seek ( Common::InSaveFile file,
uint32  offset,
const Common::String description 
)
static

Seeks to a specific place in the file

Parameters
[in,out]fileIf non-null, the file.
offsetOffset index of the info into the file
descriptionThe description.

◆ read() [1/3]

static uint32 Asylum::Savegame::read ( Common::InSaveFile file,
const Common::String description 
)
static

Reads data from a file.

Parameters
[in,out]fileIf non-null, the file.
descriptionThe description.
Returns
the value

◆ read() [2/3]

static Common::String Asylum::Savegame::read ( Common::InSaveFile file,
uint32  strLength,
const Common::String description 
)
static

Reads data from a file.

Parameters
[in,out]fileIf non-null, the file.
strLengthLength of the string.
descriptionThe description.
Returns
the string

◆ read() [3/3]

static void Asylum::Savegame::read ( Common::InSaveFile file,
Common::Serializable data,
uint32  size,
uint32  count,
const Common::String description 
)
static

Reads data from a file.

Parameters
[in,out]fileIf non-null, the file.
[in,out]dataIf non-null, the data.
sizeThe size.
countNumber of.
descriptionThe description.

◆ write() [1/3]

static void Asylum::Savegame::write ( Common::OutSaveFile file,
uint32  val,
const Common::String description 
)
static

Writes data to a file.

Parameters
[in,out]fileIf non-null, the file.
valThe value
descriptionThe description.

◆ write() [2/3]

static void Asylum::Savegame::write ( Common::OutSaveFile file,
const Common::String val,
uint32  strLength,
const Common::String description 
)
static

Writes data to a file.

Parameters
[in,out]fileIf non-null, the file.
valThe string
strLengthThe size of the string.
descriptionThe description.

◆ write() [3/3]

static void Asylum::Savegame::write ( Common::OutSaveFile file,
Common::Serializable data,
uint32  size,
uint32  count,
const Common::String description 
)
static

Writes data to a file.

Parameters
[in,out]fileIf non-null, the file.
[in,out]dataIf non-null, the data.
sizeThe size.
countNumber of.
descriptionThe description.

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