aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-10-28 23:21:33 +1100
committerPaul Gilbert2012-10-28 23:21:33 +1100
commitf7770dce2d0e999a41cea2df5e3b33c18200ebbc (patch)
tree34c21822e0b158fc8056be75cb988285b253d51f /engines
parentf1cace39e8fa7def5cc82c6e65ace366101bbf83 (diff)
downloadscummvm-rg350-f7770dce2d0e999a41cea2df5e3b33c18200ebbc.tar.gz
scummvm-rg350-f7770dce2d0e999a41cea2df5e3b33c18200ebbc.tar.bz2
scummvm-rg350-f7770dce2d0e999a41cea2df5e3b33c18200ebbc.zip
HOPKINS: Fix calculating offsets in get_offsetx/y
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/objects.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 2913a69866..df0b311ef1 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -205,7 +205,7 @@ void ObjectsManager::set_offsetxy(byte *data, int idx, int xp, int yp, bool isSi
int ObjectsManager::get_offsetx(const byte *spriteData, int spriteIndex, bool isSize) {
const byte *v3 = spriteData + 3;
for (int i = spriteIndex; i; --i)
- v3 += (int16)READ_LE_UINT16(v3) + 16;
+ v3 += READ_LE_UINT32(v3) + 16;
const byte *v5 = v3 + 8;
int result = (int16)READ_LE_UINT16(v5);
@@ -218,7 +218,7 @@ int ObjectsManager::get_offsetx(const byte *spriteData, int spriteIndex, bool is
int ObjectsManager::get_offsety(const byte *spriteData, int spriteIndex, bool isSize) {
const byte *v3 = spriteData + 3;
for (int i = spriteIndex; i; --i)
- v3 += (int16)READ_LE_UINT16(v3) + 16;
+ v3 += READ_LE_UINT32(v3) + 16;
const byte *v5 = v3 + 10;
int result = (int16)READ_LE_UINT16(v5);