[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.395,1.396
kirben
kirben at users.sourceforge.net
Fri Jan 6 02:16:02 CET 2006
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm resource_v7he.cpp,1.51,1.52
- Next message: [Scummvm-cvs-logs] CVS: scummvm/kyra animator.cpp,1.2,1.3 gui.cpp,1.1,1.2 kyra.cpp,1.111,1.112 kyra.h,1.63,1.64 screen.cpp,1.33,1.34 screen.h,1.19,1.20 script_v1.cpp,1.60,1.61 seqplayer.h,1.5,1.6 sprites.cpp,1.17,1.18 text.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21741/scumm
Modified Files:
actor.cpp
Log Message:
HE90+ games use difference value for actor conditions.
Fixes animation regressions during speech.
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.395
retrieving revision 1.396
diff -u -d -r1.395 -r1.396
--- actor.cpp 5 Jan 2006 09:27:02 -0000 1.395
+++ actor.cpp 6 Jan 2006 10:14:59 -0000 1.396
@@ -1995,14 +1995,14 @@
}
void Actor::setUserCondition(int slot, int set) {
- debug(1, "Actor::setUserCondition(%d, %d)", slot, set);
- assert(slot >= 1 && slot <= 0x20);
+ const int condMaskCode = (_vm->_heversion >= 90) ? 0x1FFF : 0x3FF;
+ checkRange(32, 1, slot, "Condition %d out of range");
if (set == 0) {
_heCondMask &= ~(1 << (slot + 0xF));
} else {
_heCondMask |= 1 << (slot + 0xF);
}
- if (_heCondMask & 0x3FF) {
+ if (_heCondMask & condMaskCode) {
_heCondMask &= ~1;
} else {
_heCondMask |= 1;
@@ -2010,17 +2010,17 @@
}
bool Actor::isUserConditionSet(int slot) const {
- assert(slot >= 1 && slot <= 0x20);
+ checkRange(32, 1, slot, "Condition %d out of range");
return (_heCondMask & (1 << (slot + 0xF))) != 0;
}
void Actor::setTalkCondition(int slot) {
- debug(1, "Actor::setTalkCondition(%d)", slot);
- assert(slot >= 1 && slot <= 0x10);
- _heCondMask = (_heCondMask & ~0x3FF) | 1;
+ const int condMaskCode = (_vm->_heversion >= 90) ? 0x1FFF : 0x3FF;
+ checkRange(32, 1, slot, "Condition %d out of range");
+ _heCondMask = (_heCondMask & ~condMaskCode) | 1;
if (slot != 1) {
_heCondMask |= 1 << (slot - 1);
- if (_heCondMask & 0x3FF) {
+ if (_heCondMask & condMaskCode) {
_heCondMask &= ~1;
} else {
_heCondMask |= 1;
@@ -2029,7 +2029,7 @@
}
bool Actor::isTalkConditionSet(int slot) const {
- assert(slot >= 1 && slot <= 0x10);
+ checkRange(32, 1, slot, "Condition %d out of range");
return (_heCondMask & (1 << (slot - 1))) != 0;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm resource_v7he.cpp,1.51,1.52
- Next message: [Scummvm-cvs-logs] CVS: scummvm/kyra animator.cpp,1.2,1.3 gui.cpp,1.1,1.2 kyra.cpp,1.111,1.112 kyra.h,1.63,1.64 screen.cpp,1.33,1.34 screen.h,1.19,1.20 script_v1.cpp,1.60,1.61 seqplayer.h,1.5,1.6 sprites.cpp,1.17,1.18 text.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list