[Scummvm-cvs-logs] SF.net SVN: scummvm: [23641] scummvm/trunk/engines/scumm/boxes.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Jul 31 12:57:25 CEST 2006
Revision: 23641
Author: fingolfin
Date: 2006-07-31 03:57:19 -0700 (Mon, 31 Jul 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23641&view=rev
Log Message:
-----------
Cleaned up some comments
Modified Paths:
--------------
scummvm/trunk/engines/scumm/boxes.cpp
Modified: scummvm/trunk/engines/scumm/boxes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/boxes.cpp 2006-07-31 00:37:19 UTC (rev 23640)
+++ scummvm/trunk/engines/scumm/boxes.cpp 2006-07-31 10:57:19 UTC (rev 23641)
@@ -90,7 +90,7 @@
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 @@
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 @@
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).
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