From 23d02ee03f894b5da60cb354dee3e85d16f1b49c Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 14 Feb 2005 07:21:17 +0000 Subject: Add opcode svn-id: r16786 --- scumm/script_v80he.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3