[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.380,1.381 actor.h,1.84,1.85 akos.cpp,1.237,1.238 resource.cpp,1.344,1.345 script_v100he.cpp,2.177,2.178 script_v72he.cpp,2.310,2.311
kirben
kirben at users.sourceforge.net
Thu Oct 20 19:27:17 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sound adpcm.cpp,1.8.2.1,1.8.2.2 adpcm.h,1.4.2.1,1.4.2.2 wave.cpp,1.8.2.1,1.8.2.2 wave.h,1.4.2.1,1.4.2.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.379.2.1,1.379.2.2 actor.h,1.83.2.1,1.83.2.2 akos.cpp,1.236.2.1,1.236.2.2 resource.cpp,1.339.2.3,1.339.2.4 script_v100he.cpp,2.173.2.1,2.173.2.2 script_v72he.cpp,2.307.2.1,2.307.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2692/scumm
Modified Files:
actor.cpp actor.h akos.cpp resource.cpp script_v100he.cpp
script_v72he.cpp
Log Message:
Add XMAP support for actors.
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -d -r1.380 -r1.381
--- actor.cpp 18 Oct 2005 01:30:20 -0000 1.380
+++ actor.cpp 21 Oct 2005 02:26:24 -0000 1.381
@@ -107,6 +107,7 @@
stopActorMoving();
+ _heXmapNum = 0;
_shadowMode = 0;
_layer = 0;
@@ -1104,12 +1105,23 @@
}
bcr->_shadow_mode = _shadowMode;
- if ((_vm->_features & GF_SMALL_HEADER) || _vm->_heversion >= 71)
+ if (_vm->_features & GF_SMALL_HEADER) {
bcr->_shadow_table = NULL;
- else if (_vm->_heversion == 70)
+ } else if (_vm->_heversion >= 95 && _heXmapNum) {
+ byte shadow_table[65536];
+ const uint8 *dataPtr = _vm->getResourceAddress(rtImage, _heXmapNum);
+ assert(dataPtr);
+ const uint8 *xmapPtr = _vm->findResourceData(MKID('XMAP'), dataPtr);
+ assert(xmapPtr);
+ int32 size = _vm->getResourceDataSize(xmapPtr);
+ assert(size == 65536);
+ memcpy(shadow_table, xmapPtr, size);
+ bcr->_shadow_table = shadow_table;
+ } else if (_vm->_heversion == 70) {
bcr->_shadow_table = _vm->_HEV7ActorPalette;
- else
+ } else {
bcr->_shadow_table = _vm->_shadowPalette;
+ }
bcr->setCostume(_costume);
bcr->setPalette(_palette);
Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- actor.h 18 Oct 2005 01:30:20 -0000 1.84
+++ actor.h 21 Oct 2005 02:26:24 -0000 1.85
@@ -134,6 +134,7 @@
CostumeData _cost;
/* HE specific */
+ int32 _heXmapNum;
byte _hePaletteNum;
bool _heNoTalkAnimation;
bool _heSkipLimbs;
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -d -r1.237 -r1.238
--- akos.cpp 18 Oct 2005 01:30:20 -0000 1.237
+++ akos.cpp 21 Oct 2005 02:26:24 -0000 1.238
@@ -458,6 +458,8 @@
_ymove -= lastDy;
}
+ uint16 shadowMask = 0;
+
if (!useCondMask || !akct) {
decflag = 1;
} else {
@@ -468,7 +470,7 @@
uint32 type = cond & 0xC0000000;
cond &= 0x3FFFFFFF;
if (_vm->_heversion >= 95) {
-// uint16 shadowMask = cond & 0xE000;
+ shadowMask = cond & 0xE000;
cond &= ~0xE000;
}
if (_vm->_heversion >= 95 && cond == 0) {
@@ -488,6 +490,10 @@
if (decflag == 0)
continue;
+ if (_vm->_heversion >= 95) {
+ _shadow_mode = (shadowMask) ? 3: 0;
+ }
+
switch (codec) {
case 1:
result |= codec1(xmoveCur, ymoveCur);
@@ -559,7 +565,7 @@
} else if (_shadow_mode == 2) {
error("codec1_spec2"); // TODO
} else if (_shadow_mode == 3) {
- if (pcolor < 8) {
+ if (_vm->_heversion >= 95 || pcolor < 8) {
pcolor = (pcolor << 8) + *dst;
pcolor = _shadow_table[pcolor];
}
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.344
retrieving revision 1.345
diff -u -d -r1.344 -r1.345
--- resource.cpp 19 Oct 2005 19:26:53 -0000 1.344
+++ resource.cpp 21 Oct 2005 02:26:24 -0000 1.345
@@ -1232,8 +1232,10 @@
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
}
- _shadowPaletteSize = 256;
- _shadowPalette = (byte *)calloc(_shadowPaletteSize, 1);
+ if (_heversion <= 70) {
+ _shadowPaletteSize = 256;
+ _shadowPalette = (byte *)calloc(_shadowPaletteSize, 1);
+ }
}
void ScummEngine::readGlobalObjects() {
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.177
retrieving revision 2.178
diff -u -d -r2.177 -r2.178
--- script_v100he.cpp 19 Oct 2005 09:43:13 -0000 2.177
+++ script_v100he.cpp 21 Oct 2005 02:26:24 -0000 2.178
@@ -469,9 +469,8 @@
a->setScale(i, i);
break;
case 70: // SO_SHADOW
- a->_shadowMode = pop();
+ a->_heXmapNum = pop();
a->_needRedraw = true;
- debug(0, "o100_actorOps: Set actor XMAP idx to %d", a->_shadowMode);
break;
case 74: // SO_STEP_DIST
j = pop();
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.310
retrieving revision 2.311
diff -u -d -r2.310 -r2.311
--- script_v72he.cpp 19 Oct 2005 09:43:13 -0000 2.310
+++ script_v72he.cpp 21 Oct 2005 02:26:24 -0000 2.311
@@ -1262,9 +1262,8 @@
a->setAnimSpeed(pop());
break;
case 98: // SO_SHADOW
- a->_shadowMode = pop();
+ a->_heXmapNum = pop();
a->_needRedraw = true;
- debug(1, "Set actor XMAP idx to %d", a->_shadowMode);
break;
case 99: // SO_TEXT_OFFSET
a->_talkPosY = pop();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sound adpcm.cpp,1.8.2.1,1.8.2.2 adpcm.h,1.4.2.1,1.4.2.2 wave.cpp,1.8.2.1,1.8.2.2 wave.h,1.4.2.1,1.4.2.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.379.2.1,1.379.2.2 actor.h,1.83.2.1,1.83.2.2 akos.cpp,1.236.2.1,1.236.2.2 resource.cpp,1.339.2.3,1.339.2.4 script_v100he.cpp,2.173.2.1,2.173.2.2 script_v72he.cpp,2.307.2.1,2.307.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list