aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorRobert Göffringmann2003-12-18 01:00:42 +0000
committerRobert Göffringmann2003-12-18 01:00:42 +0000
commitaa6e1ba76045f9be0965b05b0aea9b2f23a852cd (patch)
tree33c09671b0c210400964cfb3dd934eadaf70d249 /sword1
parent5f4c9cbeeb6a32a96cff1357fb565843417dc051 (diff)
downloadscummvm-rg350-aa6e1ba76045f9be0965b05b0aea9b2f23a852cd.tar.gz
scummvm-rg350-aa6e1ba76045f9be0965b05b0aea9b2f23a852cd.tar.bz2
scummvm-rg350-aa6e1ba76045f9be0965b05b0aea9b2f23a852cd.zip
big endian typecasts for FROM_LE_xx
svn-id: r11727
Diffstat (limited to 'sword1')
-rw-r--r--sword1/screen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sword1/screen.cpp b/sword1/screen.cpp
index 05f715fa7e..8fd61be6b9 100644
--- a/sword1/screen.cpp
+++ b/sword1/screen.cpp
@@ -327,12 +327,12 @@ void SwordScreen::processImage(uint32 id) {
uint16 spriteY = compact->o_anim_y;
if (compact->o_status & STAT_SHRINK) {
scale = (compact->o_scale_a * compact->o_ycoord + compact->o_scale_b) / 256;
- spriteX += (FROM_LE_16(frameHead->offsetX) * scale) / 256;
- spriteY += (FROM_LE_16(frameHead->offsetY) * scale) / 256;
+ spriteX += ((int16)FROM_LE_16(frameHead->offsetX) * scale) / 256;
+ spriteY += ((int16)FROM_LE_16(frameHead->offsetY) * scale) / 256;
} else {
scale = 256;
- spriteX += FROM_LE_16(frameHead->offsetX);
- spriteY += FROM_LE_16(frameHead->offsetY);
+ spriteX += (int16)FROM_LE_16(frameHead->offsetX);
+ spriteY += (int16)FROM_LE_16(frameHead->offsetY);
}
if (scale > 512)
debug(1, "compact %d is oversized: scale = %d", id, scale);