[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.88,1.88.2.1 simon.cpp,1.260.2.2,1.260.2.3 simon.h,1.82,1.82.2.1
Travis Howell
kirben at users.sourceforge.net
Sun Jul 27 05:07:06 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.88,1.89 simon.cpp,1.264,1.265 simon.h,1.82,1.83
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.33,1.34 imuse_digi.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv10644/simon
Modified Files:
Tag: branch-0-5-0
items.cpp simon.cpp simon.h
Log Message:
Count amount of save files available so load/save dialog works correctly.
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.88
retrieving revision 1.88.2.1
diff -u -d -r1.88 -r1.88.2.1
--- items.cpp 21 Jul 2003 16:25:16 -0000 1.88
+++ items.cpp 27 Jul 2003 12:06:49 -0000 1.88.2.1
@@ -1422,8 +1422,8 @@
if (!_savedialog_flag)
goto start_over_2;
_saveload_row_curpos += 6;
-// if (_saveload_row_curpos >= _num_savegame_rows)
-// _saveload_row_curpos = _num_savegame_rows;
+ if (_saveload_row_curpos >= _num_savegame_rows)
+ _saveload_row_curpos = _num_savegame_rows;
goto strange_jump;
}
@@ -1459,6 +1459,8 @@
if (!_savedialog_flag)
goto start_over_3;
_saveload_row_curpos += 6;
+ if (_saveload_row_curpos >= _num_savegame_rows)
+ _saveload_row_curpos = _num_savegame_rows;
goto strange_jump;
}
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.260.2.2
retrieving revision 1.260.2.3
diff -u -d -r1.260.2.2 -r1.260.2.3
--- simon.cpp 25 Jul 2003 08:49:22 -0000 1.260.2.2
+++ simon.cpp 27 Jul 2003 12:06:49 -0000 1.260.2.3
@@ -2513,6 +2513,21 @@
save_or_load_dialog(true);
}
+int SimonEngine::count_savegames() {
+ File f;
+ uint i = 1;
+
+ while (i < 256) {
+ f.open(gen_savename(i), getSavePath());
+ if (f.isOpen() == false)
+ break;
+
+ f.close();
+ i++;
+ }
+ return i;
+}
+
int SimonEngine::display_savegame_list(int curpos, bool load, char *dst) {
int slot, last_slot;
File in;
@@ -2601,7 +2616,7 @@
_copy_partial_mode = 1;
- num = _number_of_savegames;
+ _number_of_savegames = num = count_savegames();
if (!load)
num++;
num -= 6;
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.82
retrieving revision 1.82.2.1
diff -u -d -r1.82 -r1.82.2.1
--- simon.h 21 Jul 2003 16:25:16 -0000 1.82
+++ simon.h 27 Jul 2003 12:06:49 -0000 1.82.2.1
@@ -790,6 +790,7 @@
void o_unk_132_helper_2(FillOrCopyStruct *fcs, int x);
void savegame_dialog(char *buf);
+ int count_savegames();
int display_savegame_list(int curpos, bool load, char *dst);
void show_it(void *buf);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.88,1.89 simon.cpp,1.264,1.265 simon.h,1.82,1.83
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.33,1.34 imuse_digi.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list