[Scummvm-git-logs] scummvm master -> 68e367b719ff8bbafbfa31b1daf60f6a0951381c
athrxx
athrxx at scummvm.org
Thu May 6 16:23:46 UTC 2021
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:
68e367b719 KYRA: (MR/Chinese) - minor interface fixes
Commit: 68e367b719ff8bbafbfa31b1daf60f6a0951381c
https://github.com/scummvm/scummvm/commit/68e367b719ff8bbafbfa31b1daf60f6a0951381c
Author: athrxx (athrxx at scummvm.org)
Date: 2021-05-06T18:22:35+02:00
Commit Message:
KYRA: (MR/Chinese) - minor interface fixes
Some more hardcoded things from disasm. I haven't seen any gltiches based on that so far, but that doesn't mean they can't happen.
Changed paths:
engines/kyra/engine/items_mr.cpp
engines/kyra/graphics/screen_mr.cpp
diff --git a/engines/kyra/engine/items_mr.cpp b/engines/kyra/engine/items_mr.cpp
index a159cec7e8..983fdb825f 100644
--- a/engines/kyra/engine/items_mr.cpp
+++ b/engines/kyra/engine/items_mr.cpp
@@ -168,7 +168,7 @@ bool KyraEngine_MR::processItemDrop(uint16 sceneId, Item item, int x, int y, int
bool needRepositioning = true;
while (needRepositioning) {
- if ((_screen->getDrawLayer(posX, posY) <= 1 && _screen->getDrawLayer2(posX, posY, itemHeight) <= 1 && isDropable(posX, posY)) || posY == 187) {
+ if ((_screen->getDrawLayer(posX, posY) <= 1 && _screen->getDrawLayer2(posX, posY, itemHeight) <= 1 && isDropable(posX, posY)) || (posY == _interfaceCommandLineY1 - 1)) {
int posX2 = posX, posX3 = posX;
bool repositioning = true;
@@ -197,10 +197,10 @@ bool KyraEngine_MR::processItemDrop(uint16 sceneId, Item item, int x, int y, int
}
}
- if (posY == 187)
+ if (posY == _interfaceCommandLineY1 - 1)
needRepositioning = false;
else
- posY = MIN(posY + 2, 187);
+ posY = MIN(posY + 2, _interfaceCommandLineY1 - 1);
}
if (itemX == -1 || itemY == -1)
@@ -369,7 +369,7 @@ bool KyraEngine_MR::pickUpItem(int x, int y, int runScript) {
}
bool KyraEngine_MR::isDropable(int x, int y) {
- if (y < 14 || y > 187)
+ if (y < 14 || (y > _interfaceCommandLineY1 - 1))
return false;
x -= 12;
diff --git a/engines/kyra/graphics/screen_mr.cpp b/engines/kyra/graphics/screen_mr.cpp
index 33836503e1..fb9f8c3a9f 100644
--- a/engines/kyra/graphics/screen_mr.cpp
+++ b/engines/kyra/graphics/screen_mr.cpp
@@ -40,8 +40,8 @@ int Screen_MR::getLayer(int x, int y) {
if (y < 0) {
y = 0;
- } else if (y >= _interfaceCommandLineY1) {
- y = _interfaceCommandLineY1 - 1;
+ } else if (y >= 187) {
+ y = 187;
// The original actually limits the _maskMin/MaxY check to cases where y has already been clipped to 187.
// Whether this was intentional or not: Scenes actually require that we do it that way or animations may
// be drawn on the wrong layer (bug #11312).
More information about the Scummvm-git-logs
mailing list