aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-09-24 00:32:03 +0000
committerTravis Howell2005-09-24 00:32:03 +0000
commit82a3d88586a77b400163369a0b2dd367cf1fc62a (patch)
treee3521afafaff8821a9a96213c1cdc2e379ef3ad5 /scumm
parent2ad34bc57fc2e5e5335188c2b400512c42ac32dc (diff)
downloadscummvm-rg350-82a3d88586a77b400163369a0b2dd367cf1fc62a.tar.gz
scummvm-rg350-82a3d88586a77b400163369a0b2dd367cf1fc62a.tar.bz2
scummvm-rg350-82a3d88586a77b400163369a0b2dd367cf1fc62a.zip
Rename & update opcode in C64 maniac.
svn-id: r18868
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h14
-rw-r--r--scumm/script_c64.cpp83
2 files changed, 50 insertions, 47 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 12845ee1f0..336ad250bc 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -426,17 +426,17 @@ protected:
void o_getActorMoving();
void o_animateActor();
void o_putActorAtObject();
- void o_unknown13();
+ void o_lockActor();
void o_loadActor();
void o_loadRoom();
- void o_freezeScript();
+ void o_lockScript();
void o_loadScript();
- void o_unknown4D();
+ void o_lockRoom();
void o_cursorCommand();
void o_lights();
void o_pickupObject();
- void o_unknown93();
- void o_unfreezeScript();
+ void o_unlockActor();
+ void o_unlockScript();
void o_decrement();
void o_badOpcode();
void o_nop();
@@ -446,10 +446,10 @@ protected:
void o_unknown2();
void o_unknown3();
void o_getClosestObjActor();
- void o_askDisk();
+ void o_askForDisk();
void o_printEgo_c64();
void o_print_c64();
- void o_unknownCD();
+ void o_unlockRoom();
void o_beginOverride();
void o_isEqual();
void o_isGreater();
diff --git a/scumm/script_c64.cpp b/scumm/script_c64.cpp
index e7c60208b4..c36157a360 100644
--- a/scumm/script_c64.cpp
+++ b/scumm/script_c64.cpp
@@ -38,7 +38,7 @@ void ScummEngine_c64::setupOpcodes() {
/* 00 */
OPCODE(o5_stopObjectCode),
OPCODE(o2_putActor),
- OPCODE(o_askDisk),
+ OPCODE(o_askForDisk),
OPCODE(o_unknown1),
/* 04 */
OPCODE(o_isGreaterEqual),
@@ -59,7 +59,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o5_breakHere),
OPCODE(o_animateActor),
OPCODE(o2_panCameraTo),
- OPCODE(o_unknown13),
+ OPCODE(o_lockActor),
/* 14 */
OPCODE(o_print_c64),
OPCODE(o2_actorFromPos),
@@ -99,7 +99,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_loadActor),
OPCODE(o2_getBitVar),
OPCODE(o2_setCameraAt),
- OPCODE(o_freezeScript),
+ OPCODE(o_lockScript),
/* 34 */
OPCODE(o5_getDist),
OPCODE(o_stopCurrentScript),
@@ -132,7 +132,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_setActorBitVar),
/* 4C */
OPCODE(o_loadScript),
- OPCODE(o_unknown4D),
+ OPCODE(o_lockRoom),
OPCODE(o_putActorAtObject),
OPCODE(o2_clearState02),
/* 50 */
@@ -219,7 +219,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o2_pickupObject),
OPCODE(o_animateActor),
OPCODE(o2_panCameraTo),
- OPCODE(o_unknown93),
+ OPCODE(o_unlockActor),
/* 94 */
OPCODE(o5_print),
OPCODE(o2_actorFromPos),
@@ -259,7 +259,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_loadActor),
OPCODE(o2_getBitVar),
OPCODE(o2_setCameraAt),
- OPCODE(o_unfreezeScript),
+ OPCODE(o_unlockScript),
/* B4 */
OPCODE(o5_getDist),
OPCODE(o_stopCurrentScript),
@@ -292,7 +292,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_setActorBitVar),
/* CC */
OPCODE(o_loadScript),
- OPCODE(o_unknownCD),
+ OPCODE(o_unlockRoom),
OPCODE(o_putActorAtObject),
OPCODE(o2_setState02),
/* D0 */
@@ -487,21 +487,16 @@ void ScummEngine_c64::o_loadSound() {
ensureResourceLoaded(rtSound, resid);
}
-void ScummEngine_c64::o_unknown13() {
- debug(0, "o_unknown13 (Actor %d)", fetchScriptByte());
-}
-
void ScummEngine_c64::o_loadActor() {
debug(0, "o_loadActor (%d)", getVarOrDirectByte(PARAM_1));
}
-void ScummEngine_c64::o_loadRoom() {
- int resid = getVarOrDirectByte(PARAM_1);
- ensureResourceLoaded(rtRoom, resid);
+void ScummEngine_c64::o_lockActor() {
+ debug(0, "o_lockActor (%d)", fetchScriptByte());
}
-void ScummEngine_c64::o_unknown4D() {
- debug(0, "o_unknown4D (Actor %d)", fetchScriptByte());
+void ScummEngine_c64::o_unlockActor() {
+ debug(0, "o_unlockActor (%d)", fetchScriptByte());
}
void ScummEngine_c64::o_loadScript() {
@@ -509,6 +504,35 @@ void ScummEngine_c64::o_loadScript() {
ensureResourceLoaded(rtScript, resid);
}
+void ScummEngine_c64::o_lockScript() {
+ int resid = fetchScriptByte();
+ res.lock(rtScript, resid);
+ debug(0, "o_lockScript (%d)", resid);
+}
+
+void ScummEngine_c64::o_unlockScript() {
+ int resid = fetchScriptByte();
+ res.unlock(rtScript, resid);
+ debug(0, "o_unlockScript (%d)", resid);
+}
+
+void ScummEngine_c64::o_loadRoom() {
+ int resid = getVarOrDirectByte(PARAM_1);
+ ensureResourceLoaded(rtRoom, resid);
+}
+
+void ScummEngine_c64::o_lockRoom() {
+ int resid = fetchScriptByte();
+ res.lock(rtRoom, resid);
+ debug(0, "o_lockRoom (%d)", resid);
+}
+
+void ScummEngine_c64::o_unlockRoom() {
+ int resid = fetchScriptByte();
+ res.unlock(rtRoom, resid);
+ debug(0, "o_unlockRoom (%d)", resid);
+}
+
void ScummEngine_c64::o_cursorCommand() {
// TODO
@@ -543,22 +567,6 @@ void ScummEngine_c64::o_lights() {
_fullRedraw = true;
}
-void ScummEngine_c64::o_unknown93() {
- debug(0, "o_unknown93 (Actor %d)", fetchScriptByte());
-}
-
-void ScummEngine_c64::o_freezeScript() {
- int scr = fetchScriptByte();
- vm.slot[scr].status &= 0x80;
- vm.slot[scr].freezeCount = 1;
-}
-
-void ScummEngine_c64::o_unfreezeScript() {
- int scr = fetchScriptByte();
- vm.slot[scr].status &= 0x7F;
- vm.slot[scr].freezeCount = 0;
-}
-
void ScummEngine_c64::o_animateActor() {
int act = getVarOrDirectByte(PARAM_1);
int anim = getVarOrDirectByte(PARAM_2);
@@ -635,13 +643,11 @@ void ScummEngine_c64::o_getActorBitVar() {
void ScummEngine_c64::o_print_c64() {
_actorToPrintStrFor = fetchScriptByte();
decodeParseString();
- warning("STUB: o_print_c64()");
}
void ScummEngine_c64::o_printEgo_c64() {
_actorToPrintStrFor = (byte)VAR(VAR_EGO);
decodeParseString();
- warning("STUB: o_printEgo_c64()");
}
void ScummEngine_c64::o_unknown1() {
@@ -688,12 +694,9 @@ void ScummEngine_c64::o_getClosestObjActor() {
setResult(closest_obj);
}
-void ScummEngine_c64::o_askDisk() {
- warning("STUB: o_askDisk");
-}
-
-void ScummEngine_c64::o_unknownCD() {
- debug(0, "o_unknownCD(%d)", fetchScriptByte());
+void ScummEngine_c64::o_askForDisk() {
+ int disk = getVarOrDirectByte(PARAM_1);
+ debug(0, "o_askForDisk (%d)", disk);
}
void ScummEngine_c64::o_beginOverride() {