Skip to content

Commit

Permalink
SCUMM: Rename InfoStuff to SaveStateMetaInfos
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Apr 5, 2011
1 parent d7a6bf5 commit fb53303
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion engines/scumm/detection.cpp
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions engines/scumm/saveload.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down
7 changes: 3 additions & 4 deletions engines/scumm/scumm.h
Expand Up @@ -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;
Expand Down Expand Up @@ -678,11 +677,11 @@ class ScummEngine : public Engine {
}
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 */
Expand Down

0 comments on commit fb53303

Please sign in to comment.