[Scummvm-cvs-logs] SF.net SVN: scummvm:[35331] scummvm/trunk/engines/tinsel/polygons.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Dec 13 09:40:05 CET 2008
Revision: 35331
http://scummvm.svn.sourceforge.net/scummvm/?rev=35331&view=rev
Author: dreammaster
Date: 2008-12-13 08:40:04 +0000 (Sat, 13 Dec 2008)
Log Message:
-----------
Added handling for record differences in the hotspot/polygon format in DW1 Demo
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/polygons.cpp
Modified: scummvm/trunk/engines/tinsel/polygons.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/polygons.cpp 2008-12-13 07:38:37 UTC (rev 35330)
+++ scummvm/trunk/engines/tinsel/polygons.cpp 2008-12-13 08:40:04 UTC (rev 35331)
@@ -211,6 +211,8 @@
// 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 @@
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 @@
nodey = nextLong(_pData);
hFilm = nextLong(_pData);
- if (TinselVersion != TINSEL_V2) {
+ if (!TinselV2) {
reftype = nextLong(_pData);
id = nextLong(_pData);
}
@@ -240,7 +242,7 @@
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 @@
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);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list