diff options
author | Joost Peters | 2011-11-24 22:18:05 +0100 |
---|---|---|
committer | Joost Peters | 2011-11-24 22:18:05 +0100 |
commit | 672e981b17610d7b8403fccbb8757fae05ade3b5 (patch) | |
tree | 7e85f2bf4ba9ec145a6e0c25712296b45605b42b /engines/toltecs | |
parent | fe21e5b0a918a7c6dfa144a4bb25ed2f80d625eb (diff) | |
download | scummvm-rg350-672e981b17610d7b8403fccbb8757fae05ade3b5.tar.gz scummvm-rg350-672e981b17610d7b8403fccbb8757fae05ade3b5.tar.bz2 scummvm-rg350-672e981b17610d7b8403fccbb8757fae05ade3b5.zip |
TOLTECS: Fix crash on Big Endian
Diffstat (limited to 'engines/toltecs')
-rw-r--r-- | engines/toltecs/screen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp index 4eda8f643f..d66ed18d8c 100644 --- a/engines/toltecs/screen.cpp +++ b/engines/toltecs/screen.cpp @@ -213,13 +213,13 @@ void Screen::addAnimatedSprite(int16 x, int16 y, int16 fragmentId, byte *data, i drawRequest.scaling = 0; } - int16 count = spriteArray[0]; + int16 count = FROM_LE_16(spriteArray[0]); //debug(0, "count = %d", count); for (int16 index = 1; index <= count; index++) { - byte *spriteItem = data + spriteArray[index]; + byte *spriteItem = data + FROM_LE_16(spriteArray[index]); uint16 loopNum = READ_LE_UINT16(spriteItem + 0) & 0x7FFF; uint16 loopCount = READ_LE_UINT16(spriteItem + 2); |