aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorStrangerke2014-03-15 11:31:43 +0100
committerStrangerke2014-03-15 11:31:43 +0100
commit8f41fc10b2c458e13631d8eeed0ee3de8879a8fa (patch)
tree50fe8fdd90206f9b9c9db27a417fd056df5de39e /engines/cge
parent0a9b8978ee87039e32ad6348f90d9cc3a0227a47 (diff)
downloadscummvm-rg350-8f41fc10b2c458e13631d8eeed0ee3de8879a8fa.tar.gz
scummvm-rg350-8f41fc10b2c458e13631d8eeed0ee3de8879a8fa.tar.bz2
scummvm-rg350-8f41fc10b2c458e13631d8eeed0ee3de8879a8fa.zip
CGE: Remove a useless structure member, reduce a variable scope
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/cge.h1
-rw-r--r--engines/cge/cge_main.cpp5
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/cge/cge.h b/engines/cge/cge.h
index 1af9a90207..a65069ff46 100644
--- a/engines/cge/cge.h
+++ b/engines/cge/cge.h
@@ -107,7 +107,6 @@ struct SavegameHeader {
Graphics::Surface *thumbnail;
int saveYear, saveMonth, saveDay;
int saveHour, saveMinutes;
- int totalFrames;
};
extern const char *savegameStr;
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index b18bae64c8..e738b6ebb3 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -195,7 +195,6 @@ bool CGEEngine::loadGame(int slotNumber, SavegameHeader *header, bool tiny) {
debugC(1, kCGEDebugEngine, "CGEEngine::loadgame(%d, header, %s)", slotNumber, tiny ? "true" : "false");
Common::MemoryReadStream *readStream;
- SavegameHeader saveHeader;
if (slotNumber == -1) {
// Loading the data for the initial game state
@@ -231,6 +230,8 @@ bool CGEEngine::loadGame(int slotNumber, SavegameHeader *header, bool tiny) {
return false;
} else {
// Found header
+ SavegameHeader saveHeader;
+
if (!readSavegameHeader(readStream, saveHeader)) {
delete readStream;
return false;
@@ -424,7 +425,7 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt
}
bool CGEEngine::readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header) {
- header.thumbnail = NULL;
+ header.thumbnail = nullptr;
// Get the savegame version
header.version = in->readByte();