aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-02-14 07:21:17 +0000
committerTravis Howell2005-02-14 07:21:17 +0000
commit23d02ee03f894b5da60cb354dee3e85d16f1b49c (patch)
tree034f889b86397bce95046344db723a1f8a6c9c04
parent0439ab507f7f1e58dbff164d32b1f57cb12bd8dd (diff)
downloadscummvm-rg350-23d02ee03f894b5da60cb354dee3e85d16f1b49c.tar.gz
scummvm-rg350-23d02ee03f894b5da60cb354dee3e85d16f1b49c.tar.bz2
scummvm-rg350-23d02ee03f894b5da60cb354dee3e85d16f1b49c.zip
Add opcode
svn-id: r16786
-rw-r--r--scumm/script_v80he.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 8dae92b389..ae943e1870 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -128,7 +128,7 @@ void ScummEngine_v80he::setupOpcodes() {
/* 44 */
OPCODE(o6_invalid),
OPCODE(o80_loadSBNG),
- OPCODE(o6_invalid),
+ OPCODE(o80_getFileSize),
OPCODE(o6_wordArrayWrite),
/* 48 */
OPCODE(o80_stringToInt),
@@ -395,6 +395,22 @@ void ScummEngine_v80he::o80_loadSBNG() {
debug(1,"o80_loadSBNG stub (%d)",subOp);
}
+void ScummEngine_v80he::o80_getFileSize() {
+ byte filename[256];
+
+ copyScriptString(filename);
+
+ File f;
+ if (f.open((char *)filename) == false) {
+ push(-1);
+ return;
+ }
+
+ f.seek(0, SEEK_END);
+ push(f.pos());
+ f.close();
+}
+
void ScummEngine_v80he::o80_stringToInt() {
int id, len, val;
byte *addr;