[Scummvm-git-logs] scummvm master -> 44072e907e48f8e159ec4faaf2776b0dbae96b66
athrxx
noreply at scummvm.org
Tue Jul 23 23:20:29 UTC 2024
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:
44072e907e SCUMM: (MM) - fix bug no. 15277
Commit: 44072e907e48f8e159ec4faaf2776b0dbae96b66
https://github.com/scummvm/scummvm/commit/44072e907e48f8e159ec4faaf2776b0dbae96b66
Author: athrxx (athrxx at scummvm.org)
Date: 2024-07-24T01:19:22+02:00
Commit Message:
SCUMM: (MM) - fix bug no. 15277
("Man-Eating Plant should not be selectable as actor")COMMON: add PC-98 8-colors render mode
Changed paths:
engines/scumm/actor.cpp
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 00345d36bd3..71ed6b27c03 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -2112,17 +2112,26 @@ void Actor::adjustActorPos() {
}
int ScummEngine::getActorFromPos(int x, int y) {
- int i;
-
if (!testGfxAnyUsageBits(x / 8))
return 0;
- for (i = 1; i < _numActors; i++) {
- if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
- && y >= _actors[i]->_top && y <= _actors[i]->_bottom) {
- if (_game.version > 2 || i != VAR(VAR_EGO))
- return i;
+ for (int i = 1; i < _numActors; i++) {
+ int16 y1 = _actors[i]->_top;
+ int16 y2 = _actors[i]->_bottom;
+
+ if (_game.version <= 2) {
+ if (i == VAR(VAR_EGO))
+ continue;
+ y2 = _actors[i]->getPos().y;
+ y1 = _actors[i]->getPos().y - 40 * V12_Y_MULTIPLIER;
+ // Yes, it's really like this in the original code. And it works as intended for
+ // e. g. bug #15277 ("MANIAC: Man-Eating Plant should not be selectable as actor")
+ if ((uint16)y1 > 128)
+ y1 = 1;
}
+
+ if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable) && y >= y1 && y <= y2)
+ return i;
}
return 0;
More information about the Scummvm-git-logs
mailing list