aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorRobert Göffringmann2003-12-17 11:11:03 +0000
committerRobert Göffringmann2003-12-17 11:11:03 +0000
commit9f8b022fd410d828140b1a6a1644e9170ede098f (patch)
treef1c69690c174ef475c0f0d1669d49d1da7d7f86e /sword1
parenta739f3ae3b34044915d09ddb954fead713779850 (diff)
downloadscummvm-rg350-9f8b022fd410d828140b1a6a1644e9170ede098f.tar.gz
scummvm-rg350-9f8b022fd410d828140b1a6a1644e9170ede098f.tar.bz2
scummvm-rg350-9f8b022fd410d828140b1a6a1644e9170ede098f.zip
big endian fix
svn-id: r11708
Diffstat (limited to 'sword1')
-rw-r--r--sword1/resman.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sword1/resman.cpp b/sword1/resman.cpp
index 352950e9b8..041cb488b9 100644
--- a/sword1/resman.cpp
+++ b/sword1/resman.cpp
@@ -249,14 +249,14 @@ void *ResMan::mouseResOpen(uint32 id) {
BsMemHandle *memHandle = resHandle(id);
if (memHandle->cond == MEM_FREED) {
resOpen(id);
-#ifdef SCUMM_BIG_ENDIAN
uint16 *head = (uint16*)memHandle->data;
+#ifdef SCUMM_BIG_ENDIAN
for (uint8 endCnt = 0; endCnt < 5; endCnt++)
head[endCnt] = READ_LE_UINT16(head + endCnt);
#endif
// fix transparency:
uint8 *rawData = (uint8*)memHandle->data;
- uint32 size = READ_LE_UINT16(rawData) * READ_LE_UINT16(rawData + 2) * READ_LE_UINT16(rawData + 4);
+ uint32 size = head[0] * head[1] * head[2];
rawData += 0x3A;
for (uint32 cnt = 0; cnt < size; cnt++)
if (rawData[cnt] == 0)