[Scummvm-cvs-logs] CVS: scummvm/scumm script_v80he.cpp,2.73,2.74

kirben kirben at users.sourceforge.net
Sun Feb 13 23:23:25 CET 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2726/scumm

Modified Files:
	script_v80he.cpp 
Log Message:

Add opcode


Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.73
retrieving revision 2.74
diff -u -d -r2.73 -r2.74
--- script_v80he.cpp	2 Feb 2005 12:05:00 -0000	2.73
+++ script_v80he.cpp	14 Feb 2005 07:21:17 -0000	2.74
@@ -128,7 +128,7 @@
 		/* 44 */
 		OPCODE(o6_invalid),
 		OPCODE(o80_loadSBNG),
-		OPCODE(o6_invalid),
+		OPCODE(o80_getFileSize),
 		OPCODE(o6_wordArrayWrite),
 		/* 48 */
 		OPCODE(o80_stringToInt),
@@ -395,6 +395,22 @@
 	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;





More information about the Scummvm-git-logs mailing list