ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

SaveStateDescriptor Class Reference

Object describing a save state. More...

#include <savestate.h>

Collaboration diagram for SaveStateDescriptor:

List of all members.

Public Member Functions

 SaveStateDescriptor ()
 SaveStateDescriptor (int s, const Common::String &d)
void setSaveSlot (int slot)
int getSaveSlot () const
void setDescription (const Common::String &desc)
const Common::StringgetDescription () const
void setDeletableFlag (bool state)
 Optional entries only included when querying via MetaEngine::querySaveMetaInfo.
bool getDeletableFlag () const
 Queries whether the save state is allowed to be deleted.
void setWriteProtectedFlag (bool state)
 Defines whether the save state is write protected.
bool getWriteProtectedFlag () const
 Queries whether the save state is write protected.
void setLocked (bool state)
 Defines whether the save state is "locked" because is being synced.
bool getLocked () const
 Queries whether the save state is "locked" because is being synced.
const Graphics::SurfacegetThumbnail () const
 Return a thumbnail graphics surface representing the savestate visually.
void setThumbnail (Graphics::Surface *t)
 Set a thumbnail graphics surface representing the savestate visually.
void setThumbnail (Common::SharedPtr< Graphics::Surface > t)
void setSaveDate (int year, int month, int day)
 Sets the date the save state was created.
const Common::StringgetSaveDate () const
 Queries a human readable description of the date the save state was created.
void setSaveTime (int hour, int min)
 Sets the time the save state was created.
const Common::StringgetSaveTime () const
 Queries a human readable description of the time the save state was created.
void setPlayTime (int hours, int minutes)
 Sets the time the game was played before the save state was created.
void setPlayTime (uint32 msecs)
 Sets the time the game was played before the save state was created.
const Common::StringgetPlayTime () const
 Queries a human readable description of the time the game was played before the save state was created.
uint32 getPlayTimeMSecs () const
 Returns the time the game was played before the save state was created in milliseconds.
void setAutosave (bool autosave)
 Sets whether the save is an autosave.
bool isAutosave () const
 Returns true whether the save is an autosave.

Private Types

enum  SaveType { kSaveTypeUndetermined, kSaveTypeRegular, kSaveTypeAutosave }

Private Attributes

int _slot
 The saveslot id, as it would be passed to the "-x" command line switch.
Common::String _description
 A human readable description of the save state.
bool _isDeletable
 Whether the save state can be deleted.
bool _isWriteProtected
 Whether the save state is write protected.
bool _isLocked
 Whether the save state is "locked" because is being synced.
Common::String _saveDate
 Human readable description of the date the save state was created.
Common::String _saveTime
 Human readable description of the time the save state was created.
Common::String _playTime
 Human readable description of the time the game was played till the save state was created.
uint32 _playTimeMSecs
 The time the game was played before the save state was created in milliseconds.
Common::SharedPtr
< Graphics::Surface
_thumbnail
 The thumbnail of the save state.
SaveType _saveType
 Save file type.

Detailed Description

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.

Definition at line 45 of file savestate.h.


Member Enumeration Documentation

Enumerator:
kSaveTypeUndetermined 
kSaveTypeRegular 
kSaveTypeAutosave 

Definition at line 47 of file savestate.h.


Constructor & Destructor Documentation

SaveStateDescriptor::SaveStateDescriptor (  ) 

Definition at line 28 of file savestate.cpp.

SaveStateDescriptor::SaveStateDescriptor ( int  s,
const Common::String d 
)

Definition at line 35 of file savestate.cpp.


Member Function Documentation

bool SaveStateDescriptor::getDeletableFlag (  )  const [inline]

Queries whether the save state is allowed to be deleted.

Definition at line 86 of file savestate.h.

const Common::String& SaveStateDescriptor::getDescription (  )  const [inline]
Returns:
A human readable description of the save state.

Definition at line 74 of file savestate.h.

bool SaveStateDescriptor::getLocked (  )  const [inline]

Queries whether the save state is "locked" because is being synced.

Definition at line 114 of file savestate.h.

const Common::String& SaveStateDescriptor::getPlayTime (  )  const [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.

Definition at line 184 of file savestate.h.

uint32 SaveStateDescriptor::getPlayTimeMSecs (  )  const [inline]

Returns the time the game was played before the save state was created in milliseconds.

It defaults to 0.

Definition at line 192 of file savestate.h.

const Common::String& SaveStateDescriptor::getSaveDate (  )  const [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.

Definition at line 146 of file savestate.h.

int SaveStateDescriptor::getSaveSlot (  )  const [inline]
Returns:
The saveslot id, as it would be passed to the "-x" command line switch.

Definition at line 64 of file savestate.h.

const Common::String& SaveStateDescriptor::getSaveTime (  )  const [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.

Definition at line 161 of file savestate.h.

const Graphics::Surface* SaveStateDescriptor::getThumbnail (  )  const [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.

Definition at line 122 of file savestate.h.

bool SaveStateDescriptor::getWriteProtectedFlag (  )  const [inline]

Queries whether the save state is write protected.

Definition at line 96 of file savestate.h.

bool SaveStateDescriptor::isAutosave (  )  const

Returns true whether the save is an autosave.

Definition at line 71 of file savestate.cpp.

void SaveStateDescriptor::setAutosave ( bool  autosave  ) 

Sets whether the save is an autosave.

Definition at line 67 of file savestate.cpp.

void SaveStateDescriptor::setDeletableFlag ( bool  state  )  [inline]

Optional entries only included when querying via MetaEngine::querySaveMetaInfo.

Defines whether the save state is allowed to be deleted.

Definition at line 81 of file savestate.h.

void SaveStateDescriptor::setDescription ( const Common::String desc  )  [inline]
Parameters:
desc A human readable description of the save state.

Definition at line 69 of file savestate.h.

void SaveStateDescriptor::setLocked ( bool  state  )  [inline]

Defines whether the save state is "locked" because is being synced.

Definition at line 101 of file savestate.h.

void SaveStateDescriptor::setPlayTime ( int  hours,
int  minutes 
)

Sets the time the game was played before the save state was created.

Parameters:
hours How many hours the user played the game so far.
minutes How many minutes the user played the game so far.

Definition at line 56 of file savestate.cpp.

void SaveStateDescriptor::setPlayTime ( uint32  msecs  ) 

Sets the time the game was played before the save state was created.

Parameters:
msecs How many milliseconds the user played the game so far.

Definition at line 61 of file savestate.cpp.

void SaveStateDescriptor::setSaveDate ( int  year,
int  month,
int  day 
)

Sets the date the save state was created.

Parameters:
year Year of creation.
month Month of creation.
day Day of creation.

Definition at line 48 of file savestate.cpp.

void SaveStateDescriptor::setSaveSlot ( int  slot  )  [inline]
Parameters:
slot The saveslot id, as it would be passed to the "-x" command line switch.

Definition at line 59 of file savestate.h.

void SaveStateDescriptor::setSaveTime ( int  hour,
int  min 
)

Sets the time the save state was created.

Parameters:
hour Hour of creation.
min Minute of creation.

Definition at line 52 of file savestate.cpp.

void SaveStateDescriptor::setThumbnail ( Common::SharedPtr< Graphics::Surface t  )  [inline]

Definition at line 130 of file savestate.h.

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.

Definition at line 41 of file savestate.cpp.

void SaveStateDescriptor::setWriteProtectedFlag ( bool  state  )  [inline]

Defines whether the save state is write protected.

Definition at line 91 of file savestate.h.


Member Data Documentation

A human readable description of the save state.

Definition at line 212 of file savestate.h.

Whether the save state can be deleted.

Definition at line 217 of file savestate.h.

Whether the save state is "locked" because is being synced.

Definition at line 227 of file savestate.h.

Whether the save state is write protected.

Definition at line 222 of file savestate.h.

Human readable description of the time the game was played till the save state was created.

Definition at line 243 of file savestate.h.

The time the game was played before the save state was created in milliseconds.

Definition at line 249 of file savestate.h.

Human readable description of the date the save state was created.

Definition at line 232 of file savestate.h.

Human readable description of the time the save state was created.

Definition at line 237 of file savestate.h.

Save file type.

Definition at line 259 of file savestate.h.

The saveslot id, as it would be passed to the "-x" command line switch.

Definition at line 207 of file savestate.h.

The thumbnail of the save state.

Definition at line 254 of file savestate.h.


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


Generated on Sat May 23 2020 05:01:52 for ResidualVM by doxygen 1.7.1
curved edge   curved edge