SAM: Fix for graphics glitch
|Reported by:||eriktorbjorn||Owned by:||fingolfin|
|Game:||Sam and Max|
This patch fixes a graphics glitch at the Ball of Twine:
* Walk Sam to the foot of the stairs to the gondola
* Wait until Max stops walking. He should now be
standing in the parking lot.
* Walk Sam up the stairs. As the camera moves to the
right, you should see a partially drawn Max appear on
the right side of the screen.
This happens because Max is drawn with _xpos < 0, so he
"wraps around" to the right side.
It's possible/probable that it fixes other similar bugs
- I've made the change in all the codecs, not just the
one that causes the Sam & Max glitch - but this is the
only one I know how to trigger in any reliable way.
An alternative fix would probably be to make _xpos
unsigned. I'm not suggesting we actually do it this way
since it's not human-readable, but it could explain why
the code was reverse-engineered to only clip against
the right edge of the screen.
Oh, and the same thing probably applies to AKOS as
well, but I don't know of any test cases for it.
Ticket imported from: #639699. Ticket imported from: patches/235.