aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-20 02:22:08 +0000
committerJohannes Schickel2008-04-20 02:22:08 +0000
commit913f40688af37eb1aa4c392da1b4fa1614225d77 (patch)
tree1d46961e51e08721ff6278776c097b6121aa8f46 /engines/kyra
parent2db899d1c70ddb703b39555ca59d6402fb3a96ae (diff)
downloadscummvm-rg350-913f40688af37eb1aa4c392da1b4fa1614225d77.tar.gz
scummvm-rg350-913f40688af37eb1aa4c392da1b4fa1614225d77.tar.bz2
scummvm-rg350-913f40688af37eb1aa4c392da1b4fa1614225d77.zip
Added some more opcodes.
svn-id: r31589
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/kyra_v3.h4
-rw-r--r--engines/kyra/script_v3.cpp28
2 files changed, 28 insertions, 4 deletions
diff --git a/engines/kyra/kyra_v3.h b/engines/kyra/kyra_v3.h
index 1ce2cbe47e..0a24e52f39 100644
--- a/engines/kyra/kyra_v3.h
+++ b/engines/kyra/kyra_v3.h
@@ -520,9 +520,12 @@ private:
void loadExtrasShapes();
// opcodes
+ int o3_getMalcolmShapes(ScriptState *script);
int o3_setCharacterPos(ScriptState *script);
int o3_defineObject(ScriptState *script);
int o3_refreshCharacter(ScriptState *script);
+ int o3_getCharacterX(ScriptState *script);
+ int o3_getCharacterY(ScriptState *script);
int o3_showSceneFileMessage(ScriptState *script);
int o3_showBadConscience(ScriptState *script);
int o3_hideBadConscience(ScriptState *script);
@@ -531,6 +534,7 @@ private:
int o3_queryGameFlag(ScriptState *script);
int o3_resetGameFlag(ScriptState *script);
int o3_setGameFlag(ScriptState *script);
+ int o3_getHandItem(ScriptState *script);
int o3_hideMouse(ScriptState *script);
int o3_setMousePos(ScriptState *script);
int o3_showMouse(ScriptState *script);
diff --git a/engines/kyra/script_v3.cpp b/engines/kyra/script_v3.cpp
index 75ca5ae107..4eca162734 100644
--- a/engines/kyra/script_v3.cpp
+++ b/engines/kyra/script_v3.cpp
@@ -32,6 +32,11 @@
namespace Kyra {
+int KyraEngine_v3::o3_getMalcolmShapes(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_getMaloclmShapes(%p) ()", (const void *)script);
+ return _malcolmShapes;
+}
+
int KyraEngine_v3::o3_setCharacterPos(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_setCharacterPos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
int x = stackPos(0);
@@ -83,6 +88,16 @@ int KyraEngine_v3::o3_refreshCharacter(ScriptState *script) {
return 0;
}
+int KyraEngine_v3::o3_getCharacterX(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_getCharacterX(%p) ()", (const void *)script);
+ return _mainCharacter.x1;
+}
+
+int KyraEngine_v3::o3_getCharacterY(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_getCharacterY(%p) ()", (const void *)script);
+ return _mainCharacter.y1;
+}
+
int KyraEngine_v3::o3_showSceneFileMessage(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_showSceneFileMessage(%p) (%d)", (const void *)script, stackPos(0));
showMessage((const char*)getTableEntry(_scenesFile, stackPos(0)), 0xFF, 0xF0);
@@ -141,6 +156,11 @@ int KyraEngine_v3::o3_setGameFlag(ScriptState *script) {
return 1;
}
+int KyraEngine_v3::o3_getHandItem(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_getHandItem(%p) ()", (const void *)script);
+ return _itemInHand;
+}
+
int KyraEngine_v3::o3_hideMouse(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_hideMouse(%p) ()", (const void *)script);
_screen->hideMouse();
@@ -419,13 +439,13 @@ typedef Functor1Mem<ScriptState*, int, KyraEngine_v3> OpcodeV3;
void KyraEngine_v3::setupOpcodeTable() {
static const OpcodeV3 opcodeTable[] = {
// 0x00
- OpcodeUnImpl(),
+ Opcode(o3_getMalcolmShapes),
Opcode(o3_setCharacterPos),
Opcode(o3_defineObject),
Opcode(o3_refreshCharacter),
// 0x04
- OpcodeUnImpl(),
- OpcodeUnImpl(),
+ Opcode(o3_getCharacterX),
+ Opcode(o3_getCharacterY),
OpcodeUnImpl(),
OpcodeUnImpl(),
// 0x08
@@ -474,7 +494,7 @@ void KyraEngine_v3::setupOpcodeTable() {
OpcodeUnImpl(),
OpcodeUnImpl(),
// 0x2c
- OpcodeUnImpl(),
+ Opcode(o3_getHandItem),
Opcode(o3_hideMouse),
OpcodeUnImpl(),
Opcode(o3_setMousePos),