[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.76,1.77 costume.cpp,1.25,1.26
Max Horn
fingolfin at users.sourceforge.net
Tue Apr 22 12:09:35 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv15061
Modified Files:
actor.cpp costume.cpp
Log Message:
cleanup; small fix for GF_OLD256 games; also the head hack for indy3 is not needed anymore
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- actor.cpp 20 Apr 2003 17:11:12 -0000 1.76
+++ actor.cpp 22 Apr 2003 18:57:09 -0000 1.77
@@ -470,13 +470,6 @@
assert(f != 0x3E);
frame = f;
-
- // FIXME: This is a hack to fix decapitation, which somehow occurs only on
- // the standFrame (CHORE mode 3). We hack around this by simply using the
- // initFrame instead. As far as it goes, I see no difference. Apart from
- // keeping my lovely head intact.
- if (f == 3 && _vm->_gameId == GID_INDY3_256 && (_vm->_currentRoom != 79))
- f = initFrame;
if (isInCurrentRoom() && costume != 0) {
animProgress = 0;
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- costume.cpp 19 Apr 2003 14:43:55 -0000 1.25
+++ costume.cpp 22 Apr 2003 18:57:10 -0000 1.26
@@ -1205,12 +1205,13 @@
default:
error("Costume %d is invalid", id);
}
+
+ // In GF_OLD_BUNDLE games, there is no actual palette, just a single color byte.
+ // Don't forget, these games were designed around a fixed 16 color HW palette :-)
+ if (_vm->_features & GF_OLD_BUNDLE)
+ _numColors = 1;
- if (_vm->_features & GF_OLD_BUNDLE) {
- _dataptr = _ptr + READ_LE_UINT16(_ptr + 9);
- } else {
- _dataptr = _ptr + READ_LE_UINT16(_ptr + _numColors + 8);
- }
+ _dataptr = _ptr + READ_LE_UINT16(_ptr + _numColors + 8);
}
byte CostumeRenderer::drawLimb(const CostumeData &cost, int limb) {
@@ -1222,10 +1223,7 @@
i = cost.curpos[limb] & 0x7FFF;
- if (_vm->_features & GF_OLD_BUNDLE)
- _frameptr = _loaded._ptr + READ_LE_UINT16(_loaded._ptr + limb * 2 + 11);
- else
- _frameptr = _loaded._ptr + READ_LE_UINT16(_loaded._ptr + _loaded._numColors + limb * 2 + 10);
+ _frameptr = _loaded._ptr + READ_LE_UINT16(_loaded._ptr + _loaded._numColors + limb * 2 + 10);
code = _loaded._dataptr[i] & 0x7F;
@@ -1262,22 +1260,13 @@
return;
}
- if (_features & GF_OLD_BUNDLE) {
- r = p + READ_LE_UINT16(p + anim * 2 + 43);
- } 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_OLD_BUNDLE)
- dataptr = p + READ_LE_UINT16(p + 9);
- else if (_features & GF_OLD256)
- dataptr = p + *(p + lc._numColors + 8);
- else
- dataptr = p + READ_LE_UINT16(p + lc._numColors + 8);
+ dataptr = lc._dataptr;
mask = READ_LE_UINT16(r);
r += 2;
@@ -1285,9 +1274,7 @@
do {
if (mask & 0x8000) {
if (_features & GF_AFTER_V3) {
- j = 0;
- j = *(r);
- r++;
+ j = *r++;
if (j == 0xFF)
j = 0xFFFF;
} else {
@@ -1329,8 +1316,14 @@
int i;
byte color;
- if (_vm->_features & GF_OLD_BUNDLE)
- palette[_loaded._ptr[8]] = palette[0];
+ if (_vm->_features & GF_OLD_BUNDLE) {
+ for (i = 0; i < _loaded._numColors; i++) {
+ _palette[i] = i;
+ }
+ _palette[_loaded._ptr[8]] = palette[0];
+ // TODO / FIXME
+ return;
+ }
for (i = 0; i < _loaded._numColors; i++) {
if ((_vm->_vars[_vm->VAR_CURRENT_LIGHTS] & LIGHTMODE_actor_color) || (_vm->_features & GF_AFTER_V6)) {
More information about the Scummvm-git-logs
mailing list