diff options
author | lukaslw | 2014-10-09 17:54:46 +0200 |
---|---|---|
committer | lukaslw | 2014-10-09 17:54:46 +0200 |
commit | 9db1d77d478fafe1ecd2d2723d4374a80bfba90e (patch) | |
tree | 3091d7eca9a5edf4eec14880bb22f7b80d035c0b /engines/prince/hero.cpp | |
parent | f80d72d10ae78c29b21a4ca0533a2f1b05e729ac (diff) | |
download | scummvm-rg350-9db1d77d478fafe1ecd2d2723d4374a80bfba90e.tar.gz scummvm-rg350-9db1d77d478fafe1ecd2d2723d4374a80bfba90e.tar.bz2 scummvm-rg350-9db1d77d478fafe1ecd2d2723d4374a80bfba90e.zip |
PRINCE: Remove readScript and LittleEndianReader templates from Script
Change all of READ_UINT16 to READ_LE_UINT16 and all READ_UINT32 to READ_LE_UINT32 for endian-safety
Diffstat (limited to 'engines/prince/hero.cpp')
-rw-r--r-- | engines/prince/hero.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/prince/hero.cpp b/engines/prince/hero.cpp index 69afb06ea2..8c13c6d1f9 100644 --- a/engines/prince/hero.cpp +++ b/engines/prince/hero.cpp @@ -462,18 +462,18 @@ void Hero::showHeroShadow(Graphics::Surface *screen, DrawNode *drawNode) { } //skip_line //next_line - if (READ_UINT16(shadowLineStart + 2) < READ_UINT16(shadowLineStart - 2)) { + if (READ_LE_UINT16(shadowLineStart + 2) < READ_LE_UINT16(shadowLineStart - 2)) { //minus_y shadBitAddr -= PrinceEngine::kMaxPicWidth / 8; shadPosY--; diffY--; - } else if (READ_UINT16(shadowLineStart + 2) > READ_UINT16(shadowLineStart - 2)) { + } else if (READ_LE_UINT16(shadowLineStart + 2) > READ_LE_UINT16(shadowLineStart - 2)) { shadBitAddr += PrinceEngine::kMaxPicWidth / 8; shadPosY++; diffY++; } //no_change_y - if (READ_UINT16(shadowLineStart) < READ_UINT16(shadowLineStart - 4)) { + if (READ_LE_UINT16(shadowLineStart) < READ_LE_UINT16(shadowLineStart - 4)) { //minus_x shadPosX--; //rol @@ -484,7 +484,7 @@ void Hero::showHeroShadow(Graphics::Surface *screen, DrawNode *drawNode) { shadBitMask <<= 1; } diffX--; - } else if (READ_UINT16(shadowLineStart) > READ_UINT16(shadowLineStart - 4)) { + } else if (READ_LE_UINT16(shadowLineStart) > READ_LE_UINT16(shadowLineStart - 4)) { shadPosX++; //ror if (shadBitMask == 1) { @@ -752,9 +752,9 @@ void Hero::showHero() { //go_for_it: while (1) { if (_currCoords != nullptr) { - if (READ_UINT32(_currCoords) != 0xFFFFFFFF) { - x = READ_UINT16(_currCoords); - y = READ_UINT16(_currCoords + 2); + if (READ_LE_UINT32(_currCoords) != 0xFFFFFFFF) { + x = READ_LE_UINT16(_currCoords); + y = READ_LE_UINT16(_currCoords + 2); _currCoords += 4; dir = *_currDirTab; _currDirTab++; @@ -801,8 +801,8 @@ void Hero::showHero() { } } else { //finito - _middleX = READ_UINT16(_currCoords - 4); - _middleY = READ_UINT16(_currCoords - 2); + _middleX = READ_LE_UINT16(_currCoords - 4); + _middleY = READ_LE_UINT16(_currCoords - 2); selectZoom(); if (_coords != nullptr) { |