[Scummvm-cvs-logs] SF.net SVN: scummvm: [29031] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Sep 23 00:37:20 CEST 2007
Revision: 29031
http://scummvm.svn.sourceforge.net/scummvm/?rev=29031&view=rev
Author: thebluegr
Date: 2007-09-22 15:37:20 -0700 (Sat, 22 Sep 2007)
Log Message:
-----------
Fix for bug #1800276 - "IHNM: Problem in saving". A bug in the logic of the save slot allocation algorithm became apparent with the FS node merge. It should be working correctly now
Modified Paths:
--------------
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/saga/saveload.cpp
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2007-09-22 20:51:34 UTC (rev 29030)
+++ scummvm/trunk/engines/saga/saga.h 2007-09-22 22:37:20 UTC (rev 29031)
@@ -517,7 +517,7 @@
uint getNewSaveSlotNumber();
bool locateSaveFile(char *saveName, uint &titleNumber);
bool isSaveListFull() const {
- return _saveFilesMaxCount == _saveFilesCount;
+ return _saveFilesCount == MAX_SAVES;
}
uint getSaveFilesCount() const {
return isSaveListFull() ? _saveFilesCount : _saveFilesCount + 1;
@@ -611,7 +611,6 @@
}
private:
- uint _saveFilesMaxCount;
uint _saveFilesCount;
SaveFileData _saveFiles[MAX_SAVES];
bool _saveMarks[MAX_SAVES];
Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp 2007-09-22 20:51:34 UTC (rev 29030)
+++ scummvm/trunk/engines/saga/saveload.cpp 2007-09-22 22:37:20 UTC (rev 29031)
@@ -59,7 +59,7 @@
}
SaveFileData *SagaEngine::getSaveFile(uint idx) {
- if (idx >= _saveFilesMaxCount) {
+ if (idx >= MAX_SAVES) {
error("getSaveFileName wrong idx");
}
if (isSaveListFull()) {
@@ -94,7 +94,7 @@
error("getNewSaveSlotNumber save list is full");
}
for (i = 0; i < MAX_SAVES; i++) {
- if (_saveMarks[i]) {
+ if (!_saveMarks[i]) {
found = false;
for (j = 0; j < _saveFilesCount; j++) {
if (_saveFiles[j].slotNumber == i) {
@@ -138,11 +138,7 @@
_saveMarks[slotNum] = true; //mark this slot as valid
}
- _saveFilesMaxCount = 0;
for (i = 0; i < MAX_SAVES; i++) {
- if (_saveMarks[i]) {
- _saveFilesMaxCount++;
- }
_saveFiles[i].name[0] = 0;
_saveFiles[i].slotNumber = (uint)-1;
}
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