[Scummvm-cvs-logs] scummvm master -> bac23bde2747143b8f61196d80d491dd1f793470
lordhoto
lordhoto at gmail.com
Mon Nov 14 15:45:56 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f410480cfd KYRA: Fix bug #3437647 "LOL: Unexpected missing save file".
bac23bde27 KYRA: Whitespace fixes.
Commit: f410480cfd848636cce21d3f89c8a8b0ef068680
https://github.com/scummvm/scummvm/commit/f410480cfd848636cce21d3f89c8a8b0ef068680
Author: Johannes Schickel (lordhoto at gmail.com)
Date: 2011-11-14T06:42:20-08:00
Commit Message:
KYRA: Fix bug #3437647 "LOL: Unexpected missing save file".
Formerly the code was confused about what _saveSlots is doing, i.e. creating a
continous list of existing save slot ids.
Changed paths:
engines/kyra/gui_lol.cpp
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 93a1138..22a1561 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -2575,8 +2575,8 @@ void GUI_LoL::setupSaveMenuSlots(Menu &menu, int num) {
int saveSlotMaxLen = ((_screen->getScreenDim(8))->w << 3) - _screen->getCharWidth('W');
for (int i = startSlot; i < num && _savegameOffset + i - slotOffs < _savegameListSize; ++i) {
- if (_savegameList[_saveSlots[i + _savegameOffset - slotOffs]]) {
- Common::strlcpy(s, _savegameList[_saveSlots[i + _savegameOffset - slotOffs]], 80);
+ if (_savegameList[i + _savegameOffset - slotOffs]) {
+ Common::strlcpy(s, _savegameList[i + _savegameOffset - slotOffs], 80);
// Trim long GMM save descriptions to fit our save slots
int fC = _screen->getTextWidth(s);
@@ -2626,7 +2626,7 @@ void GUI_LoL::updateSavegameList() {
_savegameList = new char *[_savegameListSize];
for (int i = 0; i < _savegameListSize; i++) {
- in = _vm->openSaveForReading(_vm->getSavegameFilename(i), header);
+ in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i]), header);
if (in) {
_savegameList[i] = new char[header.description.size() + 1];
Common::strlcpy(_savegameList[i], header.description.c_str(), header.description.size() + 1);
@@ -2634,10 +2634,9 @@ void GUI_LoL::updateSavegameList() {
delete in;
} else {
_savegameList[i] = 0;
- error("GUI_LoL::updateSavegameList(): Unexpected missing save file for slot: %d.", i);
+ error("GUI_LoL::updateSavegameList(): Unexpected missing save file for slot: %d.", _saveSlots[i]);
}
}
-
} else {
_savegameList = 0;
}
Commit: bac23bde2747143b8f61196d80d491dd1f793470
https://github.com/scummvm/scummvm/commit/bac23bde2747143b8f61196d80d491dd1f793470
Author: Johannes Schickel (lordhoto at gmail.com)
Date: 2011-11-14T06:44:58-08:00
Commit Message:
KYRA: Whitespace fixes.
Changed paths:
engines/kyra/gui_lol.cpp
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 22a1561..2017a6e 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -2572,8 +2572,8 @@ void GUI_LoL::setupSaveMenuSlots(Menu &menu, int num) {
slotOffs = 1;
}
- int saveSlotMaxLen = ((_screen->getScreenDim(8))->w << 3) - _screen->getCharWidth('W');
-
+ int saveSlotMaxLen = ((_screen->getScreenDim(8))->w << 3) - _screen->getCharWidth('W');
+
for (int i = startSlot; i < num && _savegameOffset + i - slotOffs < _savegameListSize; ++i) {
if (_savegameList[i + _savegameOffset - slotOffs]) {
Common::strlcpy(s, _savegameList[i + _savegameOffset - slotOffs], 80);
More information about the Scummvm-git-logs
mailing list