[Scummvm-cvs-logs] SF.net SVN: scummvm:[55531] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue Jan 25 14:00:58 CET 2011


Revision: 55531
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55531&view=rev
Author:   drmccoy
Date:     2011-01-25 13:00:58 +0000 (Tue, 25 Jan 2011)

Log Message:
-----------
GOB: o7_draw0x8A is o7_findFile()

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter.h
    scummvm/trunk/engines/gob/inter_v7.cpp

Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h	2011-01-25 13:00:38 UTC (rev 55530)
+++ scummvm/trunk/engines/gob/inter.h	2011-01-25 13:00:58 UTC (rev 55531)
@@ -599,7 +599,7 @@
 	void o7_draw0x45();
 	void o7_intToString();
 	void o7_draw0x89();
-	void o7_draw0x8A();
+	void o7_findFile();
 	void o7_getSystemProperty();
 	void o7_loadLBM();
 	void o7_draw0x93();

Modified: scummvm/trunk/engines/gob/inter_v7.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v7.cpp	2011-01-25 13:00:38 UTC (rev 55530)
+++ scummvm/trunk/engines/gob/inter_v7.cpp	2011-01-25 13:00:58 UTC (rev 55531)
@@ -24,6 +24,7 @@
  */
 
 #include "common/endian.h"
+#include "common/archive.h"
 
 #include "gob/gob.h"
 #include "gob/global.h"
@@ -51,7 +52,7 @@
 	OPCODEDRAW(0x45, o7_draw0x45);
 	OPCODEDRAW(0x57, o7_intToString);
 	OPCODEDRAW(0x89, o7_draw0x89);
-	OPCODEDRAW(0x8A, o7_draw0x8A);
+	OPCODEDRAW(0x8A, o7_findFile);
 	OPCODEDRAW(0x8C, o7_getSystemProperty);
 	OPCODEDRAW(0x90, o7_loadLBM);
 	OPCODEDRAW(0x93, o7_draw0x93);
@@ -128,14 +129,28 @@
 	warning("Addy Stub Draw 0x89: \"%s\", \"%s\", %d", str0.c_str(), str1.c_str(), index0);
 }
 
-void Inter_v7::o7_draw0x8A() {
+void Inter_v7::o7_findFile() {
 	_vm->_game->_script->evalExpr(0);
-	Common::String str0 = _vm->_game->_script->getResultStr();
+	const char *file = _vm->_game->_script->getResultStr();
+	uint16 pathIndex = _vm->_game->_script->readVarIndex();
 
-	int16 index0 = _vm->_game->_script->readVarIndex();
-	int16 index1 = _vm->_game->_script->readVarIndex();
+	if (!strncmp(file, "<ME>", 4))
+		file += 4;
+	if (!strncmp(file, "<ALLCD>", 7))
+		file += 7;
 
-	warning("Addy Stub Draw 0x8A: \"%s\", %d, %d", str0.c_str(), index0, index1);
+	Common::ArchiveMemberList files;
+
+	SearchMan.listMatchingMembers(files, file);
+
+	if (files.empty()) {
+		GET_VARO_STR(pathIndex)[0] = '\0';
+		storeValue(0);
+		return;
+	}
+
+	strcpy(GET_VARO_STR(pathIndex), files.front()->getName().c_str());
+	storeValue(1);
 }
 
 void Inter_v7::o7_getSystemProperty() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list