#include <savestate.h>
Public Member Functions | |
SaveStateDescriptor (const MetaEngine *metaEngine, int slot, const Common::U32String &d) | |
SaveStateDescriptor (const MetaEngine *metaEngine, int slot, const Common::String &d) | |
void | setSaveSlot (int slot) |
int | getSaveSlot () const |
void | setDescription (const Common::String &desc) |
void | setDescription (const Common::U32String &desc) |
const Common::U32String & | getDescription () const |
void | setDeletableFlag (bool state) |
bool | getDeletableFlag () const |
void | setWriteProtectedFlag (bool state) |
bool | getWriteProtectedFlag () const |
void | setLocked (bool state) |
bool | getLocked () const |
const Graphics::Surface * | getThumbnail () const |
void | setThumbnail (Graphics::Surface *t) |
void | setThumbnail (Common::SharedPtr< Graphics::Surface > t) |
void | setSaveDate (int year, int month, int day) |
const Common::String & | getSaveDate () const |
void | setSaveTime (int hour, int min) |
const Common::String & | getSaveTime () const |
void | setPlayTime (int hours, int minutes) |
void | setPlayTime (uint32 msecs) |
const Common::String & | getPlayTime () const |
uint32 | getPlayTimeMSecs () const |
void | setAutosave (bool autosave) |
bool | isAutosave () const |
bool | hasAutosaveName () const |
bool | isValid () const |
Object describing a save state.
This at least includes the save slot number and a human readable description of the save state.
Further possibilites are a thumbnail, play time, creation date, creation time, delete protected, write protection.
Saves are writable and deletable by default.
|
inline |
slot | The saveslot id, as it would be passed to the "-x" command line switch. |
|
inline |
|
inline |
desc | A human readable description of the save state. |
|
inline |
|
inline |
Optional entries only included when querying via MetaEngine::querySaveMetaInfo Defines whether the save state is allowed to be deleted.
|
inline |
Queries whether the save state is allowed to be deleted.
|
inline |
Defines whether the save state is write protected.
|
inline |
Queries whether the save state is write protected.
|
inline |
Defines whether the save state is "locked" because is being synced.
|
inline |
Queries whether the save state is "locked" because is being synced.
|
inline |
Return a thumbnail graphics surface representing the savestate visually. This is usually a scaled down version of the game graphics. The size should be either 160x100 or 160x120 pixels, depending on the aspect ratio of the game. If another ratio is required, contact the core team.
void SaveStateDescriptor::setThumbnail | ( | Graphics::Surface * | t | ) |
Set a thumbnail graphics surface representing the savestate visually. Ownership of the surface is transferred to the SaveStateDescriptor. Hence the caller must not delete the surface.
void SaveStateDescriptor::setSaveDate | ( | int | year, |
int | month, | ||
int | day | ||
) |
Sets the date the save state was created.
year | Year of creation. |
month | Month of creation. |
day | Day of creation. |
|
inline |
Queries a human readable description of the date the save state was created.
This will return an empty string in case the value is not set.
void SaveStateDescriptor::setSaveTime | ( | int | hour, |
int | min | ||
) |
Sets the time the save state was created.
hour | Hour of creation. |
min | Minute of creation. |
|
inline |
Queries a human readable description of the time the save state was created.
This will return an empty string in case the value is not set.
void SaveStateDescriptor::setPlayTime | ( | int | hours, |
int | minutes | ||
) |
Sets the time the game was played before the save state was created.
hours | How many hours the user played the game so far. |
minutes | How many minutes the user played the game so far. |
void SaveStateDescriptor::setPlayTime | ( | uint32 | msecs | ) |
Sets the time the game was played before the save state was created.
msecs | How many milliseconds the user played the game so far. |
|
inline |
Queries a human readable description of the time the game was played before the save state was created.
This will return an empty string in case the value is not set.
|
inline |
Returns the time the game was played before the save state was created in milliseconds.
It defaults to 0.
void SaveStateDescriptor::setAutosave | ( | bool | autosave | ) |
Sets whether the save is an autosave
bool SaveStateDescriptor::isAutosave | ( | ) | const |
Returns true whether the save is an autosave
bool SaveStateDescriptor::hasAutosaveName | ( | ) | const |
Returns true if the save has an autosave name
bool SaveStateDescriptor::isValid | ( | ) | const |
Returns true if this entry is valid