[Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.18,1.19
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sun Apr 13 12:54:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv27920
Modified Files:
costume.cpp
Log Message:
handle old_bundle offsets for costume code, still wrong
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- costume.cpp 12 Apr 2003 19:51:43 -0000 1.18
+++ costume.cpp 13 Apr 2003 19:53:39 -0000 1.19
@@ -1210,7 +1210,10 @@
error("Costume %d is invalid", id);
}
- _dataptr = _ptr + READ_LE_UINT16(_ptr + _numColors + 8);
+ if (_vm->_features & GF_OLD_BUNDLE)
+ _dataptr = _ptr + *(_ptr + 11);
+ else
+ _dataptr = _ptr + READ_LE_UINT16(_ptr + _numColors + 8);
}
byte CostumeRenderer::drawLimb(const CostumeData &cost, int limb) {
@@ -1222,14 +1225,17 @@
i = cost.curpos[limb] & 0x7FFF;
- _frameptr = _loaded._ptr + READ_LE_UINT16(_loaded._ptr + _loaded._numColors + limb * 2 + 10);
+ if (_vm->_features & GF_OLD_BUNDLE)
+ _frameptr = _loaded._ptr + READ_LE_UINT16(_loaded._ptr + limb * 2 + 13);
+ else
+ _frameptr = _loaded._ptr + READ_LE_UINT16(_loaded._ptr + _loaded._numColors + limb * 2 + 10);
code = _loaded._dataptr[i] & 0x7F;
-
+
_srcptr = _loaded._ptr + READ_LE_UINT16(_frameptr + code * 2);
if (code != 0x7B) {
- if (!(_vm->_features & GF_OLD256) || code < 0x79) // GF_OLD256 or GF_AFTER_V3 ?
+ if (!(_vm->_features & GF_OLD256) || code < 0x79)
return mainRoutine(limb, code);
}
@@ -1255,16 +1261,29 @@
anim = cost_frameToAnim(a, frame);
p = lc._ptr;
- if (anim > p[6]) {
- return;
+ if (_features & GF_OLD_BUNDLE) {
+ if (anim > p[8]) {
+ return;
+ }
+ } else {
+ if (anim > p[6]) {
+ return;
+ }
+ }
+
+ if (_features & GF_OLD_BUNDLE) {
+ r = p + READ_LE_UINT16(p + anim * 2 + 45);
+ } else {
+ r = p + READ_LE_UINT16(p + anim * 2 + lc._numColors + 42);
}
- r = p + READ_LE_UINT16(p + anim * 2 + lc._numColors + 42);
if (r == p) {
return;
}
- if (_features & GF_AFTER_V3)
+ if (_features & GF_OLD_BUNDLE)
+ dataptr = p + *(p + 11);
+ if (_features & GF_OLD256)
dataptr = p + *(p + lc._numColors + 8);
else
dataptr = p + READ_LE_UINT16(p + lc._numColors + 8);
More information about the Scummvm-git-logs
mailing list