aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-07-31 10:57:19 +0000
committerMax Horn2006-07-31 10:57:19 +0000
commita0599ab773e8f324f90baa080c05ce05a7728406 (patch)
tree50b0dcf9346ebe35e271220dbf5bcc5e01dc1756 /engines
parent9918eaa6b9af3ec2d24bf35d5e7ee6cb430e7afe (diff)
downloadscummvm-rg350-a0599ab773e8f324f90baa080c05ce05a7728406.tar.gz
scummvm-rg350-a0599ab773e8f324f90baa080c05ce05a7728406.tar.bz2
scummvm-rg350-a0599ab773e8f324f90baa080c05ce05a7728406.zip
Cleaned up some comments
svn-id: r23641
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/boxes.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 24cb3659c4..05969bac33 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -90,7 +90,7 @@ static Common::Point closestPtOnLine(const Common::Point &start, const Common::P
byte ScummEngine::getMaskFromBox(int box) {
- // Fix for bug #740244 and #755863. This appears to have been a
+ // WORKAROUND for bug #740244 and #755863. This appears to have been a
// long standing bug in the original engine?
if (_game.version <= 3 && box == 255)
return 1;
@@ -379,27 +379,27 @@ Box *ScummEngine::getBoxBaseAddr(int box) {
if (!ptr || box == 255)
return NULL;
- // The NES version of Maniac Mansion attempts to set flags for boxes 2-4
+ // WORKAROUND: The NES version of Maniac Mansion attempts to set flags for boxes 2-4
// when there are only three boxes (0-2) when walking out to the garage.
if ((_game.id == GID_MANIAC) && (_game.platform == Common::kPlatformNES) && (box >= ptr[0]))
return NULL;
- // FIXME: In "pass to adventure", the loom demo, when bobbin enters
+ // WORKAROUND: In "pass to adventure", the loom demo, when bobbin enters
// the tent to the elders, box = 2, but ptr[0] = 2 -> errors out.
- // Hence we disable the check for now. Maybe in PASS (and other old games)
- // we shouldn't subtract 1 from ptr[0] when performing the check?
- // this also seems to be incorrect for atari st demo of zak
- // and assumingly other v2 games
- // The same happens in Indy3EGA (see bug #770351)
- // Also happens in ZakEGA (see bug #771803).
+ // Also happens in Indy3EGA (see bug #770351) and ZakEGA (see bug #771803).
//
// This *might* mean that we have a bug in our box implementation
// OTOH, the original engine, unlike ScummVM, performed no bound
// checking at all. All the problems so far have been cases where
// the value was exactly one more than what we consider the maximum.
- // So it's very well possible that all of these are script errors.
+ // So it seems to be most likely that all of these are script errors.
+ //
+ // As a workaround, we simply use the last box if the last+1 box is requested.
+ // Note that this may cause different behavior than the original game
+ // engine exhibited! To faithfully reproduce the behavior of the original
+ // engine, we would have to know the data coming *after* the walkbox table.
if (_game.version <= 4 && ptr[0] == box)
- box--;
+ box--;
checkRange(ptr[0] - 1, 0, box, "Illegal box %d");
if (_game.version == 0)
@@ -715,7 +715,7 @@ byte *ScummEngine::getBoxMatrixBaseAddr() {
return ptr;
}
-/*
+/**
* Compute if there is a way that connects box 'from' with box 'to'.
* Returns the number of a box adjactant to 'from' that is the next on the
* way to 'to' (this can be 'to' itself or a third box).