SCUMM: Fix bug #1328120:

Bug #1328120: "MANIACNES: Screen width incorrect, camera halts sometimes".
Fixed by workaround and was tested with intro and on the kitchen,
where now it is possible to see Edna without her noticing you
first.

svn-id: r49764
This commit is contained in:
Eugene Sandulenko 2010-06-15 10:46:23 +00:00
parent 48d0d3008b
commit ba72975d3f

View File

@ -2081,6 +2081,12 @@ void ScummEngine::scummLoop_updateScummVars() {
if (_game.version >= 7) {
VAR(VAR_CAMERA_POS_X) = camera._cur.x;
VAR(VAR_CAMERA_POS_Y) = camera._cur.y;
} else if (_game.platform == Common::kPlatformNES) {
// WORKAROUND:
// Since there are 2 2-stripes wide borders in MM NES screen,
// we have to compensate for it here. This fixes paning effects.
// Fixes bug #1328120: "MANIACNES: Screen width incorrect, camera halts sometimes"
VAR(VAR_CAMERA_POS_X) = (camera._cur.x >> V12_X_SHIFT) + 2;
} else if (_game.version <= 2) {
VAR(VAR_CAMERA_POS_X) = camera._cur.x >> V12_X_SHIFT;
} else {