mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-26 06:18:23 +00:00
Add difference in bitVars opcodes in C64 maniac
svn-id: r21002
This commit is contained in:
parent
e3a48bf276
commit
2584f0d69f
@ -412,6 +412,7 @@ protected:
|
||||
virtual const char *getOpcodeDesc(byte i);
|
||||
|
||||
virtual void setupScummVars();
|
||||
virtual void initScummVars();
|
||||
virtual void decodeParseString();
|
||||
|
||||
void initC64Verbs();
|
||||
@ -453,6 +454,8 @@ protected:
|
||||
void o_nop();
|
||||
void o_getActorBitVar();
|
||||
void o_setActorBitVar();
|
||||
void o_getBitVar();
|
||||
void o_setBitVar();
|
||||
void o_doSentence();
|
||||
void o_unknown2();
|
||||
void o_unknown3();
|
||||
|
@ -73,7 +73,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_getActorBitVar),
|
||||
/* 1C */
|
||||
OPCODE(o5_startSound),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifState04),
|
||||
/* 20 */
|
||||
@ -98,7 +98,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o2_ifState08),
|
||||
/* 30 */
|
||||
OPCODE(o_loadActor),
|
||||
OPCODE(o2_getBitVar),
|
||||
OPCODE(o_getBitVar),
|
||||
OPCODE(o2_setCameraAt),
|
||||
OPCODE(o_lockScript),
|
||||
/* 34 */
|
||||
@ -113,7 +113,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_stopCurrentScript),
|
||||
/* 3C */
|
||||
OPCODE(o5_stopSound),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifState02),
|
||||
/* 40 */
|
||||
@ -153,7 +153,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_getActorBitVar),
|
||||
/* 5C */
|
||||
OPCODE(o5_startSound),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifState04),
|
||||
/* 60 */
|
||||
@ -178,7 +178,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o2_ifState08),
|
||||
/* 70 */
|
||||
OPCODE(o_lights),
|
||||
OPCODE(o2_getBitVar),
|
||||
OPCODE(o_getBitVar),
|
||||
OPCODE(o_nop),
|
||||
OPCODE(o5_getObjectOwner),
|
||||
/* 74 */
|
||||
@ -193,7 +193,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_stopCurrentScript),
|
||||
/* 7C */
|
||||
OPCODE(o5_isSoundRunning),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifNotState02),
|
||||
/* 80 */
|
||||
@ -233,7 +233,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_getActorBitVar),
|
||||
/* 9C */
|
||||
OPCODE(o5_startSound),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifNotState04),
|
||||
/* A0 */
|
||||
@ -258,7 +258,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o2_ifNotState08),
|
||||
/* B0 */
|
||||
OPCODE(o_loadActor),
|
||||
OPCODE(o2_getBitVar),
|
||||
OPCODE(o_getBitVar),
|
||||
OPCODE(o2_setCameraAt),
|
||||
OPCODE(o_unlockScript),
|
||||
/* B4 */
|
||||
@ -273,7 +273,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_stopCurrentScript),
|
||||
/* BC */
|
||||
OPCODE(o5_stopSound),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifNotState02),
|
||||
/* C0 */
|
||||
@ -313,7 +313,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_getActorBitVar),
|
||||
/* DC */
|
||||
OPCODE(o5_startSound),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifNotState04),
|
||||
/* E0 */
|
||||
@ -338,7 +338,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o2_ifNotState08),
|
||||
/* F0 */
|
||||
OPCODE(o_lights),
|
||||
OPCODE(o2_getBitVar),
|
||||
OPCODE(o_getBitVar),
|
||||
OPCODE(o_nop),
|
||||
OPCODE(o5_getObjectOwner),
|
||||
/* F4 */
|
||||
@ -353,7 +353,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||
OPCODE(o_stopCurrentScript),
|
||||
/* FC */
|
||||
OPCODE(o5_isSoundRunning),
|
||||
OPCODE(o2_setBitVar),
|
||||
OPCODE(o_setBitVar),
|
||||
OPCODE(o2_walkActorTo),
|
||||
OPCODE(o2_ifState02)
|
||||
};
|
||||
@ -687,6 +687,29 @@ void ScummEngine_c64::o_getActorBitVar() {
|
||||
warning("STUB: o_getActorBitVar(%d, %d)", flag, mask);
|
||||
}
|
||||
|
||||
void ScummEngine_c64::o_setBitVar() {
|
||||
int var = getVarOrDirectByte(PARAM_1);
|
||||
byte mask = getVarOrDirectByte(PARAM_2);
|
||||
byte mod = getVarOrDirectByte(PARAM_3);
|
||||
|
||||
if (mod)
|
||||
_scummVars[var] |= (1 << mask);
|
||||
else
|
||||
_scummVars[var] &= ~(1 << mask);
|
||||
|
||||
debug(0, "o_setBitVar (%d, %d %d)", var, mask, mod);
|
||||
}
|
||||
|
||||
void ScummEngine_c64::o_getBitVar() {
|
||||
getResultPos();
|
||||
int var = getVarOrDirectByte(PARAM_1);
|
||||
byte mask = getVarOrDirectByte(PARAM_2);
|
||||
|
||||
setResult((_scummVars[var] & (1 << mask)) ? 1 : 0);
|
||||
|
||||
debug(0, "o_getBitVar (%d, %d %d)", var, mask, _scummVars[var] & (1 << mask));
|
||||
}
|
||||
|
||||
void ScummEngine_c64::o_print_c64() {
|
||||
_actorToPrintStrFor = fetchScriptByte();
|
||||
decodeParseString();
|
||||
|
@ -543,12 +543,13 @@ void ScummEngine_v8::setupScummVars() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScummEngine_v2::initScummVars() {
|
||||
void ScummEngine_c64::initScummVars() {
|
||||
_activeVerb = 13;
|
||||
|
||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC) {
|
||||
VAR(VAR_EGO) = 3;
|
||||
}
|
||||
|
||||
void ScummEngine_v2::initScummVars() {
|
||||
// This needs to be at least greater than 40 to get the more
|
||||
// elaborate version of the EGA Zak into. I don't know where
|
||||
// else it makes any difference.
|
||||
|
@ -521,13 +521,10 @@ void ScummEngine_c64::checkExecVerbs() {
|
||||
return;
|
||||
}
|
||||
|
||||
// HACK: Reset value
|
||||
VAR(VAR_EGO) = 3;
|
||||
|
||||
int object = findObject(_virtualMouse.x, _virtualMouse.y);
|
||||
if (object) {
|
||||
_activeObject = object;
|
||||
if (_currentMode == 3 && _activeVerb == 13) {
|
||||
if (_currentMode == 3) {
|
||||
int x, y, dir;
|
||||
a = derefActor(VAR(VAR_EGO), "checkExecVerbs");
|
||||
getObjectXYPos(object, x, y, dir);
|
||||
|
Loading…
x
Reference in New Issue
Block a user