diff options
author | Vincent Hamm | 2007-11-04 01:11:39 +0000 |
---|---|---|
committer | Vincent Hamm | 2007-11-04 01:11:39 +0000 |
commit | 6e4037165d49ed4ba1a6e76656eab2d03851eeda (patch) | |
tree | a8f38190adf5b2867d2a4ded717039cd928dfe67 /engines/cruise/function.cpp | |
parent | 034eb920d2e3c869ed16a011886ec1e69d50001c (diff) | |
download | scummvm-rg350-6e4037165d49ed4ba1a6e76656eab2d03851eeda.tar.gz scummvm-rg350-6e4037165d49ed4ba1a6e76656eab2d03851eeda.tar.bz2 scummvm-rg350-6e4037165d49ed4ba1a6e76656eab2d03851eeda.zip |
Fix a few script issues
svn-id: r29397
Diffstat (limited to 'engines/cruise/function.cpp')
-rw-r--r-- | engines/cruise/function.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 128da02890..7225f4040b 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -1389,6 +1389,27 @@ int16 Op_2A(void) { return getProcParam(overlayIdx, 40, (uint8 *) var_26); } +int16 Op_SetObjectAtNode(void) { + int16 node = popVar(); + int16 obj = popVar(); + int16 ovl = popVar(); + + if(!ovl) + ovl = currentScriptPtr->overlayNumber;; + + int nodeInfo[2]; + + if(!getNode(nodeInfo, node)) + { + setObjectPosition(ovl, obj, 0, nodeInfo[0]); + setObjectPosition(ovl, obj, 1, nodeInfo[1]); + setObjectPosition(ovl, obj, 2, nodeInfo[1]); + setObjectPosition(ovl, obj, 4, computeZoom(nodeInfo[1])); + } + + return 0; +} + void setupOpcodeTable(void) { int i; @@ -1422,6 +1443,7 @@ void setupOpcodeTable(void) { opcodeTablePtr[0x18] = Op_AddAnimation; opcodeTablePtr[0x19] = Op_RemoveAnimation; opcodeTablePtr[0x1A] = Op_SetZoom; + opcodeTablePtr[0x1B] = Op_SetObjectAtNode; opcodeTablePtr[0x1E] = Op_1E; opcodeTablePtr[0x21] = Op_21; opcodeTablePtr[0x22] = Op_22; |