aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-03-17 11:06:43 +0000
committerTravis Howell2005-03-17 11:06:43 +0000
commitf50af11b5d99c1a6e8327261bfe1a3b3cae51dcc (patch)
tree57d4da26424df51f50386b5bb6542a2f5b6540d0 /scumm
parent4361ef655eb1619f91282c07c763151d1186224d (diff)
downloadscummvm-rg350-f50af11b5d99c1a6e8327261bfe1a3b3cae51dcc.tar.gz
scummvm-rg350-f50af11b5d99c1a6e8327261bfe1a3b3cae51dcc.tar.bz2
scummvm-rg350-f50af11b5d99c1a6e8327261bfe1a3b3cae51dcc.zip
Add HE72 version of file rename opcode
svn-id: r17175
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script_v100he.cpp2
-rw-r--r--scumm/script_v72he.cpp19
-rw-r--r--scumm/script_v80he.cpp2
-rw-r--r--scumm/script_v90he.cpp2
5 files changed, 15 insertions, 11 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 89c71578d6..cc504bf166 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -793,6 +793,7 @@ protected:
void o72_writeFile();
void o72_findAllObjects();
void o72_deleteFile();
+ void o72_rename();
void o72_getPixel();
void o72_pickVarRandom();
void o72_redimArray();
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 562068dffc..3333ae91a2 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -167,7 +167,7 @@ void ScummEngine_v100he::setupOpcodes() {
OPCODE(o6_invalid),
/* 64 */
OPCODE(o100_redimArray),
- OPCODE(o60_rename),
+ OPCODE(o72_rename),
OPCODE(o6_stopObjectCode),
OPCODE(o80_localizeArrayToRoom),
/* 68 */
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 3f78d52698..f91d984f35 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -322,7 +322,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o72_writeFile),
OPCODE(o72_findAllObjects),
OPCODE(o72_deleteFile),
- OPCODE(o60_rename),
+ OPCODE(o72_rename),
/* E0 */
OPCODE(o60_soundOps),
OPCODE(o72_getPixel),
@@ -1472,7 +1472,7 @@ void ScummEngine_v72he::o72_talkActor() {
void ScummEngine_v72he::o72_talkEgo() {
push(VAR(VAR_EGO));
- o6_talkActor();
+ o72_talkActor();
}
void ScummEngine_v72he::o72_dimArray() {
@@ -1807,15 +1807,18 @@ void ScummEngine_v72he::o72_findAllObjects() {
void ScummEngine_v72he::o72_deleteFile() {
byte filename[100];
- int r;
copyScriptString(filename);
- for (r = strlen((char*)filename); r != 0; r--) {
- if (filename[r - 1] == '\\')
- break;
- }
+ debug(1, "stub o72_deleteFile(%s)", filename);
+}
+
+void ScummEngine_v72he::o72_rename() {
+ byte oldFilename[256],newFilename[256];
+
+ copyScriptString(newFilename);
+ copyScriptString(oldFilename);
- debug(1, "stub o72_deleteFile(%s)", filename + r);
+ debug(1, "stub o72_rename(%s to %s)", oldFilename, newFilename);
}
void ScummEngine_v72he::o72_getPixel() {
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index f573187592..8b4b255eeb 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -319,7 +319,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o72_writeFile),
OPCODE(o72_findAllObjects),
OPCODE(o72_deleteFile),
- OPCODE(o60_rename),
+ OPCODE(o72_rename),
/* E0 */
OPCODE(o80_unknownE0),
OPCODE(o72_getPixel),
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index af28880922..8838b2e57e 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -319,7 +319,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o72_writeFile),
OPCODE(o72_findAllObjects),
OPCODE(o72_deleteFile),
- OPCODE(o60_rename),
+ OPCODE(o72_rename),
/* E0 */
OPCODE(o80_unknownE0),
OPCODE(o72_getPixel),