diff options
author | Travis Howell | 2006-03-17 01:46:36 +0000 |
---|---|---|
committer | Travis Howell | 2006-03-17 01:46:36 +0000 |
commit | a908cbed329e92b822704041e232a885a1f1e484 (patch) | |
tree | ba6a58d6d5ca92143c06c635f1fa2b2b2391d76f | |
parent | 87d74563ddc14d3e46d93275dc1e230d41df57c9 (diff) | |
download | scummvm-rg350-a908cbed329e92b822704041e232a885a1f1e484.tar.gz scummvm-rg350-a908cbed329e92b822704041e232a885a1f1e484.tar.bz2 scummvm-rg350-a908cbed329e92b822704041e232a885a1f1e484.zip |
Fix endian issues in akos costume code
svn-id: r21342
-rw-r--r-- | engines/scumm/akos.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index 915965608c..252ecd8771 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -386,7 +386,7 @@ byte AkosRenderer::drawLimb(const Actor *a, int limb) { code = p[0]; if (code & 0x80) - code = (code << 8) | p[1]; + code = READ_BE_UINT16(p); if (code == AKC_C021 || code == AKC_C022) { uint16 s = cost.curpos[limb] + 4; @@ -448,8 +448,8 @@ byte AkosRenderer::drawLimb(const Actor *a, int limb) { for (i = 0; i != extra; i++) { code = p[4]; if (code & 0x80) - code = ((code & 0xF) << 8) | (p[5] & 0xFFF); - off = akof + code; + code = READ_BE_UINT16(p + 4); + off = akof + (code & 0xFFF); _srcptr = akcd + READ_LE_UINT32(&off->akcd); costumeInfo = (const CostumeInfo *) (akci + READ_LE_UINT16(&off->akci)); @@ -1377,7 +1377,7 @@ bool ScummEngine::akos_increaseAnim(Actor *a, int chan, const byte *aksq, const code = aksq[curpos]; if (code & 0x80) - code = (code << 8) | aksq[curpos + 1]; + code = READ_BE_UINT16(aksq + curpos); switch (active) { case 6: @@ -1492,7 +1492,7 @@ bool ScummEngine::akos_increaseAnim(Actor *a, int chan, const byte *aksq, const code = aksq[curpos]; if (code & 0x80) - code = (code << 8) | aksq[curpos + 1]; + code = READ_BE_UINT16(aksq + curpos); if (flag_value && code != AKC_ClearFlag) continue; |