aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-03-07 06:06:22 +0000
committerTravis Howell2005-03-07 06:06:22 +0000
commit26da9cc393ef78d223105e17e555e1678ede12e4 (patch)
tree351f7fd7dddd7d9c1a777984545c02c523713ec5
parent1e07216b8590224efb7e38675e08e63267a4bc0b (diff)
downloadscummvm-rg350-26da9cc393ef78d223105e17e555e1678ede12e4.tar.gz
scummvm-rg350-26da9cc393ef78d223105e17e555e1678ede12e4.tar.bz2
scummvm-rg350-26da9cc393ef78d223105e17e555e1678ede12e4.zip
Fix dup_n, billboard in circdemo works now.
svn-id: r17024
-rw-r--r--scumm/intern.h2
-rw-r--r--scumm/script_v100he.cpp2
-rw-r--r--scumm/script_v90he.cpp18
3 files changed, 12 insertions, 10 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 186ed71dea..d208672ac7 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -1013,7 +1013,7 @@ public:
protected:
/* HE version 90 script opcodes */
- void o90_dup();
+ void o90_dup_n();
void o90_min();
void o90_max();
void o90_sin();
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index b146ac5724..eaec995282 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -92,7 +92,7 @@ void ScummEngine_v100he::setupOpcodes() {
OPCODE(o100_drawObject),
/* 28 */
OPCODE(o6_dup),
- OPCODE(o90_dup),
+ OPCODE(o90_dup_n),
OPCODE(o6_endCutscene),
OPCODE(o6_stopObjectCode),
/* 2C */
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index daebf12f56..c261c5e034 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -53,7 +53,7 @@ void ScummEngine_v90he::setupOpcodes() {
/* 08 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o90_dup),
+ OPCODE(o90_dup_n),
OPCODE(o6_wordArrayIndexedRead),
/* 0C */
OPCODE(o6_dup),
@@ -374,14 +374,16 @@ const char *ScummEngine_v90he::getOpcodeDesc(byte i) {
return _opcodesV90he[i].desc;
}
-void ScummEngine_v90he::o90_dup() {
- int a, num;
+void ScummEngine_v90he::o90_dup_n() {
+ int num;
+ int args[16];
- num = fetchScriptWord();
- for (int i = 0; i < num; i++) {
- a = pop();
- push(a);
- push(a);
+ push(fetchScriptWord());
+ num = getStackList(args, ARRAYSIZE(args));
+
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < num; j++)
+ push(args[j]);
}
}