[Scummvm-git-logs] scummvm master -> a8b5d65fb8cf8eff53083fde5d92577b5b5838eb

bluegr noreply at scummvm.org
Mon Apr 25 07:16:23 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a8b5d65fb8 SCUMM: Work around DOTT glitch when Bernard looks out of Chron-O-John


Commit: a8b5d65fb8cf8eff53083fde5d92577b5b5838eb
    https://github.com/scummvm/scummvm/commit/a8b5d65fb8cf8eff53083fde5d92577b5b5838eb
Author: Torbjörn Andersson (eriktorbjorn at telia.com)
Date: 2022-04-25T10:16:18+03:00

Commit Message:
SCUMM: Work around DOTT glitch when Bernard looks out of Chron-O-John

When Bernard turns his head inside the Chron-O-John during the DOTT
intro, part of the Chron-O-John is mirrored along with Bernard's face.
This is probably because the opening of the lid is part of the actor
animation.

This causes a visible glitch when Bernard is facing to the left side of
the screen. We fix that by always keeping the same mirroring for the
Chron-O-John and adjusting Bernard's head by a few pixels.

Changed paths:
    engines/scumm/costume.cpp


diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 09530661feb..18421b04726 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -910,7 +910,37 @@ byte ClassicCostumeRenderer::drawLimb(const Actor *a, int limb) {
 				_srcptr += 12;
 			}
 
-			return mainRoutine(xmoveCur, ymoveCur);
+			// WORKAROUND: During the intro, there are a couple of
+			// glitches when Bernard looks out of his Chron-O-John.
+			// The actor has two limbs: The lid and the face. The
+			// lid is slightly misaligned, and when Bernard faces to
+			// the left both the lid and the face are mirrored when
+			// only his face should be.
+			//
+			// We adjust the positioning a bit (though not while the
+			// lid is opening, since that causes further glitches),
+			// and make sure that the lid is always drawn the
+			// correct way.
+
+			bool mirror = _mirror;
+
+			if (_vm->_game.id == GID_TENTACLE && _vm->_currentRoom == 61 && a->_number == 1 && _loaded._id == 324 && _vm->_enableEnhancements) {
+				if (limb == 0) {
+					_mirror = true;
+					byte frm = a->_cost.curpos[3] & 0x0FF;
+					if (frm == 0x3D || frm == 0x3E)
+						xmoveCur--;
+				} else if (a->getFacing() == 270 && !_mirror) {
+					xmoveCur += 4;
+				} else if (a->getFacing() == 90) {
+					xmoveCur--;
+				}
+			}
+
+			bool result = mainRoutine(xmoveCur, ymoveCur);
+
+			_mirror = mirror;
+			return result;
 		}
 	}
 




More information about the Scummvm-git-logs mailing list