aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
authorSven Hesse2008-07-25 12:59:46 +0000
committerSven Hesse2008-07-25 12:59:46 +0000
commit84505d6374e0eb7134f1201050b84c45c29580fe (patch)
treef1a6c205b676bcd46589a5c447570e2314d305d5 /engines/tinsel
parent5ab21dcb0528fdb1f843d66a6f016959ecab02ad (diff)
downloadscummvm-rg350-84505d6374e0eb7134f1201050b84c45c29580fe.tar.gz
scummvm-rg350-84505d6374e0eb7134f1201050b84c45c29580fe.tar.bz2
scummvm-rg350-84505d6374e0eb7134f1201050b84c45c29580fe.zip
Fixed the inventory bug that's been reported in the forums
svn-id: r33288
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/cursor.cpp4
-rw-r--r--engines/tinsel/object.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp
index 4eb6b98da3..b95662cbfe 100644
--- a/engines/tinsel/cursor.cpp
+++ b/engines/tinsel/cursor.cpp
@@ -368,8 +368,8 @@ void SetAuxCursor(SCNHANDLE hFilm) {
assert(BackPal()); // no background palette
pim->hImgPal = TO_LE_32(BackPal()); // Poke in the background palette
- ACoX = (short)(FROM_LE_16(pim->imgWidth)/2 - FROM_LE_16(pim->anioffX));
- ACoY = (short)(FROM_LE_16(pim->imgHeight)/2 - FROM_LE_16(pim->anioffY));
+ ACoX = (short)(FROM_LE_16(pim->imgWidth)/2 - ((int16) FROM_LE_16(pim->anioffX)));
+ ACoY = (short)(FROM_LE_16(pim->imgHeight)/2 - ((int16) FROM_LE_16(pim->anioffY)));
// Initialise and insert the auxillary cursor object
AcurObj = MultiInitObject(pmi);
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index a708cd36d7..709fa4fad9 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -297,10 +297,10 @@ void GetAniOffset(SCNHANDLE hImg, int flags, int *pAniX, int *pAniY) {
const IMAGE *pImg = (const IMAGE *)LockMem(hImg);
// set ani X
- *pAniX = FROM_LE_16(pImg->anioffX);
+ *pAniX = (int16) FROM_LE_16(pImg->anioffX);
// set ani Y
- *pAniY = FROM_LE_16(pImg->anioffY);
+ *pAniY = (int16) FROM_LE_16(pImg->anioffY);
if (flags & DMA_FLIPH) {
// we are flipped horizontally