diff options
author | Paul Gilbert | 2008-12-13 08:40:04 +0000 |
---|---|---|
committer | Paul Gilbert | 2008-12-13 08:40:04 +0000 |
commit | 48f5e51c7753957391aabbf9f901e90d95d7d88d (patch) | |
tree | b8aa4dced539d46ca8af5ca1b0b9935642dc4684 | |
parent | c2daf686d6fc207c8bce04674a006619e742749a (diff) | |
download | scummvm-rg350-48f5e51c7753957391aabbf9f901e90d95d7d88d.tar.gz scummvm-rg350-48f5e51c7753957391aabbf9f901e90d95d7d88d.tar.bz2 scummvm-rg350-48f5e51c7753957391aabbf9f901e90d95d7d88d.zip |
Added handling for record differences in the hotspot/polygon format in DW1 Demo
svn-id: r35331
-rw-r--r-- | engines/tinsel/polygons.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp index f1ba989444..037ff141ad 100644 --- a/engines/tinsel/polygons.cpp +++ b/engines/tinsel/polygons.cpp @@ -211,6 +211,8 @@ void Poly::nextPoly() { // Note: Originally I used a Serialiser, but dropped because for now we want // the endian to remain as it is. It may be cleaner to later on switch to using // it, and removing all endian conversions from the code that uses POLY's + const byte *pRecord = _pData; + int typeVal = nextLong(_pData); if ((typeVal == 5) && TinselV2) ++typeVal; type = (POLY_TYPE)typeVal; @@ -218,7 +220,7 @@ void Poly::nextPoly() { for (int i = 0; i < 4; ++i) x[i] = nextLong(_pData); for (int i = 0; i < 4; ++i) y[i] = nextLong(_pData); - if (TinselVersion == TINSEL_V2) { + if (TinselV2) { xoff = nextLong(_pData); yoff = nextLong(_pData); id = nextLong(_pData); @@ -232,7 +234,7 @@ void Poly::nextPoly() { nodey = nextLong(_pData); hFilm = nextLong(_pData); - if (TinselVersion != TINSEL_V2) { + if (!TinselV2) { reftype = nextLong(_pData); id = nextLong(_pData); } @@ -240,7 +242,7 @@ void Poly::nextPoly() { scale1 = nextLong(_pData); scale2 = nextLong(_pData); - if (TinselVersion == TINSEL_V2) { + if (TinselV2) { level1 = nextLong(_pData); level2 = nextLong(_pData); bright1 = nextLong(_pData); @@ -253,6 +255,11 @@ void Poly::nextPoly() { pnodelistx = nextLong(_pData); pnodelisty = nextLong(_pData); plinelist = nextLong(_pData); + + if (TinselV0) + // Skip to the last 4 bytes of the record for the hScript value + _pData = pRecord + 0x62C; + hScript = nextLong(_pData); } |