aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
authorJoost Peters2009-02-15 22:25:34 +0000
committerJoost Peters2009-02-15 22:25:34 +0000
commit7adf7214928a11ae53035db593566beb9422f08d (patch)
tree5f7124bc26e1157f43261a5d5858430e77a5ea02 /engines/tinsel
parentf86403ed22757edc76722b6f36ab797ecd5cfd97 (diff)
downloadscummvm-rg350-7adf7214928a11ae53035db593566beb9422f08d.tar.gz
scummvm-rg350-7adf7214928a11ae53035db593566beb9422f08d.tar.bz2
scummvm-rg350-7adf7214928a11ae53035db593566beb9422f08d.zip
Proper endianness handling in MatchingLevels().
Fixes #2603000 "DW2: Long pause entering Shades (big endian)" svn-id: r38316
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/polygons.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index 69031d7a9b..cb5b21f0c0 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -1336,11 +1336,11 @@ static bool MatchingLevels(PPOLYGON p1, PPOLYGON p2) {
Poly pp1(pps, p1->pIndex); // This polygon 1
Poly pp2(pps, p2->pIndex); // This polygon 2
- assert(pp1.level1 <= pp1.level2);
- assert(pp2.level1 <= pp2.level2);
+ assert((int32)FROM_LE_32(pp1.level1) <= (int32)FROM_LE_32(pp1.level2));
+ assert((int32)FROM_LE_32(pp2.level1) <= (int32)FROM_LE_32(pp2.level2));
- for (int pl = pp1.level1; pl <= pp1.level2; pl++) {
- if (pl >= pp2.level1 && pl <= pp2.level2)
+ for (int pl = (int32)FROM_LE_32(pp1.level1); pl <= (int32)FROM_LE_32(pp1.level2); pl++) {
+ if (pl >= (int32)FROM_LE_32(pp2.level1) && pl <= (int32)FROM_LE_32(pp2.level2))
return true;
}