[Scummvm-cvs-logs] scummvm master -> bc3c68c5088a39cf2befe5fba5bb2056643c4b4f
bluegr
md5 at scummvm.org
Sun Sep 25 17:57:53 CEST 2011
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
85213cdb32 AGI: Cleanup of some detection entries
a1c4aa6d89 AGI: Fixed typo in restart dialog
18a0214672 AGI: Resolved an old FIXME concerning OOB access
c02603fce2 AGI: Replaced odd usage of sprintf() with strcpy()
0779018484 AGI: Bugfix for script bug #3116541 - "AGI FAN Beyond the Titanic 2: Crash on Item Viewing"
bc3c68c508 AGI: Fixed bug #3292784 - "AGI: SQ2: Name forgotten after game restart"
Commit: 85213cdb32a84a85f9b3d2d3442a11df968eb06a
https://github.com/scummvm/scummvm/commit/85213cdb32a84a85f9b3d2d3442a11df968eb06a
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-25T08:15:30-07:00
Commit Message:
AGI: Cleanup of some detection entries
Changed paths:
engines/agi/detection_tables.h
Commit: a1c4aa6d89805a0d9929f3d746f88f8cd15930ab
https://github.com/scummvm/scummvm/commit/a1c4aa6d89805a0d9929f3d746f88f8cd15930ab
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-25T08:34:35-07:00
Commit Message:
AGI: Fixed typo in restart dialog
Changed paths:
engines/agi/op_cmd.cpp
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 17addc0..23ccee2 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1368,7 +1368,7 @@ void cmdRestartGame(AgiGame *state, uint8 *p) {
state->_vm->_sound->stopSound();
sel = getflag(fAutoRestart) ? 0 :
- state->_vm->selectionBox(" Restart _game, or continue? \n\n\n", buttons);
+ state->_vm->selectionBox(" Restart game, or continue? \n\n\n", buttons);
if (sel == 0) {
state->_vm->_restartGame = true;
Commit: 18a0214672c34411bbbff6be383425f7a4c38544
https://github.com/scummvm/scummvm/commit/18a0214672c34411bbbff6be383425f7a4c38544
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-25T08:35:37-07:00
Commit Message:
AGI: Resolved an old FIXME concerning OOB access
Changed paths:
engines/agi/text.cpp
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 82a2340..efb4a64 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -89,8 +89,7 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
x1++;
// DF: changed the len-1 to len...
- // FIXME: m[len] doesn't make sense and may read out of bounds?
- if (x1 == len && m[len] != '\n') {
+ if (x1 == len && m[len - 1] != '\n') {
y1++;
x1 = foff = 0;
}
@@ -732,4 +731,4 @@ void AgiEngine::drawWindow(int x1, int y1, int x2, int y2) {
_gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOR, MSG_BOX_LINE, 2);
}
-} // End of namespace Agi
+} // End of namespace Agi
\ No newline at end of file
Commit: c02603fce209a3923216ff3a5ae8f5120a09b40d
https://github.com/scummvm/scummvm/commit/c02603fce209a3923216ff3a5ae8f5120a09b40d
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-25T08:36:33-07:00
Commit Message:
AGI: Replaced odd usage of sprintf() with strcpy()
Fixes an odd bug with savegame names being truncated in MSVC
Changed paths:
engines/agi/saveload.cpp
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 28dd0a5..e62b9d4 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -557,7 +557,7 @@ void AgiEngine::getSavegameDescription(int num, char *buf, bool showEmpty) {
Common::InSaveFile *in;
debugC(4, kDebugLevelMain | kDebugLevelSavegame, "Current game id is %s", _targetName.c_str());
- sprintf(fileName, "%s", getSavegameFilename(num));
+ strcpy(fileName, getSavegameFilename(num));
if (!(in = _saveFileMan->openForLoading(fileName))) {
debugC(4, kDebugLevelMain | kDebugLevelSavegame, "File %s does not exist", fileName);
@@ -852,7 +852,7 @@ int AgiEngine::saveGameDialog() {
return errOK;
}
- sprintf(fileName, "%s", getSavegameFilename(_firstSlot + slot));
+ strcpy(fileName, getSavegameFilename(_firstSlot + slot));
debugC(8, kDebugLevelMain | kDebugLevelResources, "file is [%s]", fileName);
// Make sure all graphics was blitted to screen. This fixes bug
Commit: 07790184843c5b2f47a09eedf184121b5438e8c0
https://github.com/scummvm/scummvm/commit/07790184843c5b2f47a09eedf184121b5438e8c0
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-25T08:37:37-07:00
Commit Message:
AGI: Bugfix for script bug #3116541 - "AGI FAN Beyond the Titanic 2: Crash on Item Viewing"
Changed paths:
engines/agi/objects.cpp
diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp
index efc8645..94eef92 100644
--- a/engines/agi/objects.cpp
+++ b/engines/agi/objects.cpp
@@ -68,15 +68,20 @@ int AgiEngine::decodeObjects(uint8 *mem, uint32 flen) {
for (i = 0, so = spos; i < _game.numObjects; i++, so += padsize) {
int offset;
- (_objects + i)->location = *(mem + so + 2);
+ _objects[i].location = *(mem + so + 2);
offset = READ_LE_UINT16(mem + so) + spos;
if ((uint) offset < flen) {
- (_objects + i)->name = (char *)strdup((const char *)mem + offset);
+ _objects[i].name = (char *)strdup((const char *)mem + offset);
} else {
warning("object %i name beyond object filesize (%04x > %04x)", i, offset, flen);
- (_objects + i)->name = strdup("");
+ _objects[i].name = strdup("");
}
+
+ // Don't show the invalid "?" object in ego's inventory in the fanmade
+ // game Beyond the Titanic 2 (bug #3116541).
+ if (!strcmp(_objects[i].name, "?") && _objects[i].location == EGO_OWNED)
+ _objects[i].location = 0;
}
debug(0, "Reading objects: %d objects read.", _game.numObjects);
Commit: bc3c68c5088a39cf2befe5fba5bb2056643c4b4f
https://github.com/scummvm/scummvm/commit/bc3c68c5088a39cf2befe5fba5bb2056643c4b4f
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-25T08:39:22-07:00
Commit Message:
AGI: Fixed bug #3292784 - "AGI: SQ2: Name forgotten after game restart"
The string buffer should not be cleared on game restart, as game scripts
depend on it being maintained unchanged during restart.
Changed paths:
engines/agi/agi.cpp
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 4bebf97..3a79f02 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -362,9 +362,15 @@ int AgiEngine::agiInit() {
initPriTable();
- // clear string buffer
- for (i = 0; i < MAX_STRINGS; i++)
- _game.strings[i][0] = 0;
+ // Clear the string buffer on startup, but not when the game restarts, as
+ // some scripts expect that the game strings remain unaffected after a
+ // restart. An example is script 98 in SQ2, which is not invoked on restart
+ // to ask Ego's name again. The name is supposed to be maintained in string 1.
+ // Fixes bug #3292784.
+ if (!_restartGame) {
+ for (i = 0; i < MAX_STRINGS; i++)
+ _game.strings[i][0] = 0;
+ }
// setup emulation
More information about the Scummvm-git-logs
mailing list