[Scummvm-cvs-logs] CVS: scummvm/scumm object.cpp,1.90,1.91
Max Horn
fingolfin at users.sourceforge.net
Sat May 10 15:13:07 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.35,1.36 debug.cpp,1.13,1.14 debugger.cpp,1.33,1.34 dialogs.cpp,1.45,1.46 gfx.cpp,2.87,2.88 nut_renderer.cpp,1.22,1.23 object.cpp,1.89,1.90 saveload.cpp,1.64,1.65 script.cpp,1.79,1.80 script_v2.cpp,2.57,2.58 script_v5.cpp,1.74,1.75 script_v6.cpp,1.106,1.107 script_v8.cpp,2.151,2.152 scumm.h,1.181,1.182 scummvm.cpp,2.134,2.135 string.cpp,1.107,1.108 verbs.cpp,1.35,1.36
- Next message: [Scummvm-cvs-logs] CVS: tools descumm6.cpp,1.98,1.99
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv30577
Modified Files:
object.cpp
Log Message:
fixed object drawing state handling for V2 games (this shouldn't cause any regressions in newer games)
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- object.cpp 10 May 2003 21:49:57 -0000 1.90
+++ object.cpp 10 May 2003 22:12:23 -0000 1.91
@@ -250,6 +250,7 @@
int Scumm::findObject(int x, int y) {
int i, b;
byte a;
+ const int mask = (_features & GF_AFTER_V2) ? 0x8 : 0xF;
for (i = 1; i < _numLocalObjects; i++) {
if ((_objs[i].obj_nr < 1) || getClass(_objs[i].obj_nr, 32))
@@ -264,7 +265,7 @@
return _objs[i].obj_nr;
break;
}
- } while (_objs[b].state == a);
+ } while ((_objs[b].state & mask) == a);
}
return 0;
}
@@ -272,6 +273,7 @@
void Scumm::drawRoomObject(int i, int arg) {
ObjectData *od;
byte a;
+ const int mask = (_features & GF_AFTER_V2) ? 0x8 : 0xF;
od = &_objs[i];
if ((i < 1) || (od->obj_nr < 1) || !od->state)
@@ -284,11 +286,12 @@
break;
}
od = &_objs[od->parent];
- } while (od->state == a);
+ } while ((od->state & mask) == a);
}
void Scumm::drawRoomObjects(int arg) {
int i;
+ const int mask = (_features & GF_AFTER_V2) ? 0x8 : 0xF;
if (_features & GF_DRAWOBJ_OTHER_ORDER) {
for (i = 1; i < _numLocalObjects; i++)
@@ -296,8 +299,9 @@
drawRoomObject(i, arg);
} else {
for (i = (_numLocalObjects-1); i > 0; i--)
- if (_objs[i].obj_nr > 0)
+ if (_objs[i].obj_nr > 0 && (_objs[i].state & mask)) {
drawRoomObject(i, arg);
+ }
}
}
@@ -636,8 +640,8 @@
od->y_pos = ((*(ptr + 10)) & 0x7F) << 3;
od->parentstate = (*(ptr + 10) & 0x80) ? 1 : 0;
- if (_features & GF_OLD_BUNDLE)
- od->parentstate <<= 4;
+ if (_features & GF_AFTER_V2)
+ od->parentstate <<= 3;
od->width = *(ptr + 11) << 3;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.35,1.36 debug.cpp,1.13,1.14 debugger.cpp,1.33,1.34 dialogs.cpp,1.45,1.46 gfx.cpp,2.87,2.88 nut_renderer.cpp,1.22,1.23 object.cpp,1.89,1.90 saveload.cpp,1.64,1.65 script.cpp,1.79,1.80 script_v2.cpp,2.57,2.58 script_v5.cpp,1.74,1.75 script_v6.cpp,1.106,1.107 script_v8.cpp,2.151,2.152 scumm.h,1.181,1.182 scummvm.cpp,2.134,2.135 string.cpp,1.107,1.108 verbs.cpp,1.35,1.36
- Next message: [Scummvm-cvs-logs] CVS: tools descumm6.cpp,1.98,1.99
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list