aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2011-01-25 13:00:58 +0000
committerSven Hesse2011-01-25 13:00:58 +0000
commit3e5cd6d9de56513edffb2026e4372cbce28f8244 (patch)
treee560aa1f2a496ac77c2b376145c579bd4c8b56c2 /engines
parentbf60f061052b1700038d2c7cc383d4a69390ae8c (diff)
downloadscummvm-rg350-3e5cd6d9de56513edffb2026e4372cbce28f8244.tar.gz
scummvm-rg350-3e5cd6d9de56513edffb2026e4372cbce28f8244.tar.bz2
scummvm-rg350-3e5cd6d9de56513edffb2026e4372cbce28f8244.zip
GOB: o7_draw0x8A is o7_findFile()
svn-id: r55531
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/inter.h2
-rw-r--r--engines/gob/inter_v7.cpp27
2 files changed, 22 insertions, 7 deletions
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 7e0fc2572d..8ae192b96e 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -599,7 +599,7 @@ protected:
void o7_draw0x45();
void o7_intToString();
void o7_draw0x89();
- void o7_draw0x8A();
+ void o7_findFile();
void o7_getSystemProperty();
void o7_loadLBM();
void o7_draw0x93();
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index 442ff15273..d7c23cb4f7 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -24,6 +24,7 @@
*/
#include "common/endian.h"
+#include "common/archive.h"
#include "gob/gob.h"
#include "gob/global.h"
@@ -51,7 +52,7 @@ void Inter_v7::setupOpcodesDraw() {
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 @@ void Inter_v7::o7_draw0x89() {
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;
+
+ Common::ArchiveMemberList files;
+
+ SearchMan.listMatchingMembers(files, file);
+
+ if (files.empty()) {
+ GET_VARO_STR(pathIndex)[0] = '\0';
+ storeValue(0);
+ return;
+ }
- warning("Addy Stub Draw 0x8A: \"%s\", %d, %d", str0.c_str(), index0, index1);
+ strcpy(GET_VARO_STR(pathIndex), files.front()->getName().c_str());
+ storeValue(1);
}
void Inter_v7::o7_getSystemProperty() {