aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTravis Howell2006-03-02 06:06:24 +0000
committerTravis Howell2006-03-02 06:06:24 +0000
commit64ce4d6dd731ffa5556e76bbe37c5d5ec181e90e (patch)
tree935813b209a9d9e16898ededf42d6909fee8ebce /engines/scumm
parent2c9f04117899098ef1347421bbe937d7ac486b49 (diff)
downloadscummvm-rg350-64ce4d6dd731ffa5556e76bbe37c5d5ec181e90e.tar.gz
scummvm-rg350-64ce4d6dd731ffa5556e76bbe37c5d5ec181e90e.tar.bz2
scummvm-rg350-64ce4d6dd731ffa5556e76bbe37c5d5ec181e90e.zip
C64 maniac uses separate bitmasks for actor settings and misc settings
svn-id: r21004
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/actor.cpp1
-rw-r--r--engines/scumm/actor.h3
-rw-r--r--engines/scumm/script_c64.cpp35
3 files changed, 22 insertions, 17 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 289fa8356a..1e313ce485 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -78,6 +78,7 @@ void Actor::initActor(int mode) {
_walkdata.point3.x = 32000;
_walkScript = 0;
memset(_heTalkQueue, 0, sizeof(_heTalkQueue));
+ _miscflags = 0;
mode = 1;
}
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index 2a6e49ed15..a164294815 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -133,6 +133,9 @@ public:
uint16 _sound[32];
CostumeData _cost;
+ /* C64 maniac specific */
+ byte _miscflags;
+
/* HE specific */
bool _heNoTalkAnimation;
bool _heSkipLimbs;
diff --git a/engines/scumm/script_c64.cpp b/engines/scumm/script_c64.cpp
index 493064ff78..29dd4a4919 100644
--- a/engines/scumm/script_c64.cpp
+++ b/engines/scumm/script_c64.cpp
@@ -690,50 +690,51 @@ void ScummEngine_c64::o_nop() {
}
void ScummEngine_c64::o_setActorBitVar() {
- byte flag = getVarOrDirectByte(PARAM_1);
+ byte act = getVarOrDirectByte(PARAM_1);
byte mask = getVarOrDirectByte(PARAM_2);
byte mod = getVarOrDirectByte(PARAM_3);
- //if (mod)
- // _miscFlags[flag] |= mask;
- //else
- // _miscFlags[flag] &= ~mash;
+ Actor *a = derefActor(act, "o_setActorBitVar");
+ if (mod)
+ a->_miscflags |= mask;
+ else
+ a->_miscflags &= ~mask;
- warning("STUB: o_setActorBitVar(%d, %d, %d)", flag, mask, mod);
+ debug(0, "o_setActorBitVar(%d, %d, %d)", act, mask, mod);
}
void ScummEngine_c64::o_getActorBitVar() {
getResultPos();
- byte flag = getVarOrDirectByte(PARAM_1);
+ byte act = getVarOrDirectByte(PARAM_1);
byte mask = getVarOrDirectByte(PARAM_2);
- //setResult((_miscFlags[flag] & mask) ? 1 : 0);
+ Actor *a = derefActor(act, "o_setActorBitVar");
+ setResult((a->_miscflags & mask) ? 1 : 0);
- setResult(0);
- warning("STUB: o_getActorBitVar(%d, %d)", flag, mask);
+ debug(0, "o_getActorBitVar(%d, %d, %d)", act, mask, (a->_miscflags & mask));
}
void ScummEngine_c64::o_setBitVar() {
- int var = getVarOrDirectByte(PARAM_1);
+ byte flag = getVarOrDirectByte(PARAM_1);
byte mask = getVarOrDirectByte(PARAM_2);
byte mod = getVarOrDirectByte(PARAM_3);
if (mod)
- _scummVars[var] |= (1 << mask);
+ _bitVars[flag] |= (1 << mask);
else
- _scummVars[var] &= ~(1 << mask);
+ _bitVars[flag] &= ~(1 << mask);
- debug(0, "o_setBitVar (%d, %d %d)", var, mask, mod);
+ debug(0, "o_setBitVar (%d, %d %d)", flag, mask, mod);
}
void ScummEngine_c64::o_getBitVar() {
getResultPos();
- int var = getVarOrDirectByte(PARAM_1);
+ byte flag = getVarOrDirectByte(PARAM_1);
byte mask = getVarOrDirectByte(PARAM_2);
- setResult((_scummVars[var] & (1 << mask)) ? 1 : 0);
+ setResult((_bitVars[flag] & (1 << mask)) ? 1 : 0);
- debug(0, "o_getBitVar (%d, %d %d)", var, mask, _scummVars[var] & (1 << mask));
+ debug(0, "o_getBitVar (%d, %d %d)", flag, mask, _bitVars[flag] & (1 << mask));
}
void ScummEngine_c64::o_print_c64() {