aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v80he.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/script_v80he.cpp')
-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;