SCUMM: Rename InfoStuff to SaveStateMetaInfos

This commit is contained in:
Max Horn 2011-04-05 11:39:07 +02:00
parent d7a6bf5846
commit fb53303847
3 changed files with 8 additions and 9 deletions

View File

@ -1186,7 +1186,7 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int
desc.setDeletableFlag(true);
desc.setThumbnail(thumbnail);
InfoStuff infos;
SaveStateMetaInfos infos;
memset(&infos, 0, sizeof(infos));
if (ScummEngine::loadInfosFromSlot(target, slot, &infos)) {
int day = (infos.date >> 24) & 0xFF;

View File

@ -373,7 +373,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
// Since version 56 we save additional information about the creation of
// the save game and the save time.
if (hdr.ver >= VER(56)) {
InfoStuff infos;
SaveStateMetaInfos infos;
if (!loadInfos(in, &infos)) {
warning("Info section could not be found");
delete in;
@ -703,7 +703,7 @@ Graphics::Surface *ScummEngine::loadThumbnailFromSlot(const char *target, int sl
return thumb;
}
bool ScummEngine::loadInfosFromSlot(const char *target, int slot, InfoStuff *stuff) {
bool ScummEngine::loadInfosFromSlot(const char *target, int slot, SaveStateMetaInfos *stuff) {
Common::SeekableReadStream *in;
SaveGameHeader hdr;
@ -741,8 +741,8 @@ bool ScummEngine::loadInfosFromSlot(const char *target, int slot, InfoStuff *stu
return true;
}
bool ScummEngine::loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff) {
memset(stuff, 0, sizeof(InfoStuff));
bool ScummEngine::loadInfos(Common::SeekableReadStream *file, SaveStateMetaInfos *stuff) {
memset(stuff, 0, sizeof(SaveStateMetaInfos));
SaveInfoSection section;
section.type = file->readUint32BE();

View File

@ -308,8 +308,7 @@ enum WhereIsObject {
WIO_FLOBJECT = 4
};
// TODO: Rename InfoStuff to something more descriptive
struct InfoStuff {
struct SaveStateMetaInfos {
uint32 date;
uint16 time;
uint32 playtime;
@ -678,11 +677,11 @@ public:
}
static Graphics::Surface *loadThumbnailFromSlot(const char *target, int slot);
static bool loadInfosFromSlot(const char *target, int slot, InfoStuff *stuff);
static bool loadInfosFromSlot(const char *target, int slot, SaveStateMetaInfos *stuff);
protected:
void saveInfos(Common::WriteStream* file);
static bool loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff);
static bool loadInfos(Common::SeekableReadStream *file, SaveStateMetaInfos *stuff);
protected:
/* Script VM - should be in Script class */