aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/items
diff options
context:
space:
mode:
authorMatthew Hoops2011-09-30 12:52:04 -0400
committerMatthew Hoops2011-09-30 12:52:04 -0400
commit9be43b24ce9d7b4016139ce00b29c891717a12d3 (patch)
treef478bcca5fdea80e2f0892e94e8fe53221afe6a1 /engines/pegasus/items
parentb5af4bfc76eca31c1c784e944471dbdb2e4b0d1a (diff)
downloadscummvm-rg350-9be43b24ce9d7b4016139ce00b29c891717a12d3.tar.gz
scummvm-rg350-9be43b24ce9d7b4016139ce00b29c891717a12d3.tar.bz2
scummvm-rg350-9be43b24ce9d7b4016139ce00b29c891717a12d3.zip
PEGASUS: Fix auto dragging
Diffstat (limited to 'engines/pegasus/items')
-rwxr-xr-xengines/pegasus/items/autodragger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/pegasus/items/autodragger.cpp b/engines/pegasus/items/autodragger.cpp
index baad699a7e..de03f8118f 100755
--- a/engines/pegasus/items/autodragger.cpp
+++ b/engines/pegasus/items/autodragger.cpp
@@ -73,9 +73,9 @@ void AutoDragger::useIdleTime() {
TimeValue thisTime = getTime();
if (thisTime != _lastTime) {
- uint32 offsetX = (_stopLocation.x - _startLocation.x) * thisTime / getDuration();
- uint32 offsetY = (_stopLocation.y - _startLocation.y) * thisTime / getDuration();
- _draggingElement->moveElementTo(_startLocation.x + offsetX, _startLocation.x + offsetY);
+ int32 offsetX = (_stopLocation.x - _startLocation.x) * (int32)thisTime / (int32)getDuration();
+ int32 offsetY = (_stopLocation.y - _startLocation.y) * (int32)thisTime / (int32)getDuration();
+ _draggingElement->moveElementTo(_startLocation.x + offsetX, _startLocation.y + offsetY);
_lastTime = thisTime;
}