aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-25 15:46:07 +0000
committerJohannes Schickel2008-04-25 15:46:07 +0000
commit671e475567607764f513cd8c558a4961cf02efa8 (patch)
tree8d63af62cff0be4b1bd31059a34fe44a6f736044 /engines/kyra
parent425c87481618bbff5a2b5c7ba867ab523b5ed430 (diff)
downloadscummvm-rg350-671e475567607764f513cd8c558a4961cf02efa8.tar.gz
scummvm-rg350-671e475567607764f513cd8c558a4961cf02efa8.tar.bz2
scummvm-rg350-671e475567607764f513cd8c558a4961cf02efa8.zip
Implmented opcodes:
- 11: o3_getCharacterFrameFromFacing - 12: o3_setCharacterFacingOverwrite svn-id: r31722
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/kyra_v3.h2
-rw-r--r--engines/kyra/script_v3.cpp16
2 files changed, 16 insertions, 2 deletions
diff --git a/engines/kyra/kyra_v3.h b/engines/kyra/kyra_v3.h
index 5d82bad67d..54ad1b39fb 100644
--- a/engines/kyra/kyra_v3.h
+++ b/engines/kyra/kyra_v3.h
@@ -674,6 +674,8 @@ private:
int o3_getCharacterFacing(ScriptState *script);
int o3_getCharacterScene(ScriptState *script);
int o3_getMalcolmsMood(ScriptState *script);
+ int o3_getCharacterFrameFromFacing(ScriptState *script);
+ int o3_setCharacterFacingOverwrite(ScriptState *script);
int o3_trySceneChange(ScriptState *script);
int o3_moveCharacter(ScriptState *script);
int o3_setCharacterFacing(ScriptState *script);
diff --git a/engines/kyra/script_v3.cpp b/engines/kyra/script_v3.cpp
index 3a1914c7d1..349e0ab237 100644
--- a/engines/kyra/script_v3.cpp
+++ b/engines/kyra/script_v3.cpp
@@ -113,6 +113,18 @@ int KyraEngine_v3::o3_getMalcolmsMood(ScriptState *script) {
return _malcolmsMood;
}
+int KyraEngine_v3::o3_getCharacterFrameFromFacing(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_getCharacterFrameFromFacing(%p) ()", (const void *)script);
+ return _characterFrameTable[_mainCharacter.facing];
+}
+
+int KyraEngine_v3::o3_setCharacterFacingOverwrite(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_setCharacterFacingOverwrite(%p) (%d)", (const void *)script, stackPos(0));
+ _mainCharacter.facing = stackPos(0);
+ _overwriteSceneFacing = true;
+ return 0;
+}
+
int KyraEngine_v3::o3_trySceneChange(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_trySceneChange(%p) (%d, %d, %d, %d)", (const void *)script,
stackPos(0), stackPos(1), stackPos(2), stackPos(3));
@@ -1125,9 +1137,9 @@ void KyraEngine_v3::setupOpcodeTable() {
Opcode(o3_getMalcolmsMood);
Opcode(o3_dummy);
Opcode(o3_dummy);
- OpcodeUnImpl();
+ Opcode(o3_getCharacterFrameFromFacing);
// 0x0c
- OpcodeUnImpl();
+ Opcode(o3_setCharacterFacingOverwrite);
Opcode(o3_trySceneChange);
Opcode(o3_moveCharacter);
Opcode(o3_setCharacterFacing);