aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
diff options
context:
space:
mode:
authorRobert Göffringmann2007-04-01 00:13:54 +0000
committerRobert Göffringmann2007-04-01 00:13:54 +0000
commit63ff4aa50bdc8504a28b3c20c70a6c9d32be76d9 (patch)
tree78d54f36b559b68990c6d04b0b2979922e7dc23d /engines/sky
parent2edec11986c504e022e8f3e43e6259ad496c4f0f (diff)
downloadscummvm-rg350-63ff4aa50bdc8504a28b3c20c70a6c9d32be76d9.tar.gz
scummvm-rg350-63ff4aa50bdc8504a28b3c20c70a6c9d32be76d9.tar.bz2
scummvm-rg350-63ff4aa50bdc8504a28b3c20c70a6c9d32be76d9.zip
Fixed setFocusRectangle code. At least I think I did, I don't know where it came from and I can't test it either. But it looked rather broken.
svn-id: r26335
Diffstat (limited to 'engines/sky')
-rw-r--r--engines/sky/logic.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index 0d54380edb..dac64dff4e 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -2513,12 +2513,11 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
if (SkyEngine::isCDVersion())
speechFileFound = _skySound->startSpeech((uint16)textNum);
-
- // Calculate the point where the character is
- int x = (((uint32) (target->xcood)) * GAME_SCREEN_WIDTH) >> 9;
- int y = ((((uint32) (target->ycood)) * GAME_SCREEN_HEIGHT) >> 9);
// Set the focus region to that area
+ // Calculate the point where the character is
+ int x = target->xcood - TOP_LEFT_X;
+ int y = target->ycood - TOP_LEFT_Y;
// TODO: Make the box size change based on the object that has the focus
Common::Rect rect(x - 96, y - 64, x + 96, y + 64);
_skyScreen->setFocusRectangle(rect);