[Scummvm-cvs-logs] SF.net SVN: scummvm: [27195] scummvm/trunk/engines/agos/saveload.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Fri Jun 8 10:40:25 CEST 2007
Revision: 27195
http://scummvm.svn.sourceforge.net/scummvm/?rev=27195&view=rev
Author: Kirben
Date: 2007-06-08 01:40:23 -0700 (Fri, 08 Jun 2007)
Log Message:
-----------
Don't save game, when no saved game name is given in earlier games.
Modified Paths:
--------------
scummvm/trunk/engines/agos/saveload.cpp
Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp 2007-06-08 08:13:07 UTC (rev 27194)
+++ scummvm/trunk/engines/agos/saveload.cpp 2007-06-08 08:40:23 UTC (rev 27195)
@@ -283,26 +283,29 @@
}
}
- int16 slot = matchSaveGame(name, numSaveGames);
- if (!load) {
- if (slot >= 0 && !confirmOverWrite(window))
- goto restart;
+ if (_saveGameNameLen != 0) {
+ int16 slot = matchSaveGame(name, numSaveGames);
+ if (!load) {
+ if (slot >= 0 && !confirmOverWrite(window))
+ goto restart;
- if (slot < 0)
- slot = numSaveGames;
+ if (slot < 0)
+ slot = numSaveGames;
- if (!saveGame(slot, name))
- fileError(_windowArray[4], true);
- } else {
- if (slot < 0) {
- fileError(_windowArray[4], false);
+ if (!saveGame(slot, name))
+ fileError(_windowArray[4], true);
} else {
- if (!loadGame(genSaveName(slot)))
+ if (slot < 0) {
fileError(_windowArray[4], false);
+ } else {
+ if (!loadGame(genSaveName(slot)))
+ fileError(_windowArray[4], false);
+ }
}
+
+ printStats();
}
- printStats();
restartAnimation();
_gameStoppedClock = time(NULL) - saveTime + _gameStoppedClock;
}
@@ -459,11 +462,13 @@
}
}
- if (slot < 0)
- slot = numSaveGames;
+ if (_saveGameNameLen != 0) {
+ if (slot < 0)
+ slot = numSaveGames;
- if (!saveGame(slot, buf + 192))
- fileError(_windowArray[num], true);
+ if (!saveGame(slot, buf + 192))
+ fileError(_windowArray[num], true);
+ }
} else {
i = userGameGetKey(&b, buf, 128);
if (i != 225) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list