From 3e4f6b4a2409512eed7d0ef048b7d6adb0ea3715 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 25 Aug 2010 07:41:54 +0000 Subject: SCUMM: Fix bug #3039004 Bug #3039004: "MANIACNES: Ed does not appear at doorway." Actually whole thing is a gross hack on top of SCUMM v1.5 hack with extra wide screen. It all calls for review and writing specified methods. svn-id: r52375 --- engines/scumm/scumm.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines/scumm') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index b0b86516e7..75c507565c 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -2117,7 +2117,12 @@ void ScummEngine::scummLoop_updateScummVars() { // 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; + // But do not do it when only scrolling right to left, since otherwise Ed will not show + // up on the doorbell (Bug #3039004) + if (VAR(VAR_CAMERA_POS_X) < (camera._cur.x >> V12_X_SHIFT) + 2) + VAR(VAR_CAMERA_POS_X) = (camera._cur.x >> V12_X_SHIFT) + 2; + else + VAR(VAR_CAMERA_POS_X) = (camera._cur.x >> V12_X_SHIFT); } else if (_game.version <= 2) { VAR(VAR_CAMERA_POS_X) = camera._cur.x >> V12_X_SHIFT; } else { -- cgit v1.2.3