From e3f1d020441eaf5018d34d7db7419737792b0047 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 25 Jan 2011 15:13:37 +0000 Subject: GOB: Add o7_zeroVar and partially implement draw0x89 svn-id: r55536 --- engines/gob/inter.h | 1 + engines/gob/inter_v7.cpp | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/gob/inter.h b/engines/gob/inter.h index f6bb5980e6..1c1bda8cd3 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -604,6 +604,7 @@ protected: void o7_getSystemProperty(); void o7_loadLBM(); void o7_draw0x93(); + void o7_zeroVar(); void o7_getINIValue(); void o7_setINIValue(); void o7_draw0xA4(); diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp index 5d0fff81c9..7eafce9f81 100644 --- a/engines/gob/inter_v7.cpp +++ b/engines/gob/inter_v7.cpp @@ -56,6 +56,7 @@ void Inter_v7::setupOpcodesDraw() { OPCODEDRAW(0x8C, o7_getSystemProperty); OPCODEDRAW(0x90, o7_loadLBM); OPCODEDRAW(0x93, o7_draw0x93); + OPCODEDRAW(0x95, o7_zeroVar); OPCODEDRAW(0xA1, o7_getINIValue); OPCODEDRAW(0xA2, o7_setINIValue); OPCODEDRAW(0xA4, o7_draw0xA4); @@ -124,9 +125,18 @@ void Inter_v7::o7_draw0x89() { _vm->_game->_script->evalExpr(0); Common::String str1 = _vm->_game->_script->getResultStr(); - int16 index0 = _vm->_game->_script->readVarIndex(); + warning("Addy Stub Draw 0x89: \"%s\", \"%s\"", str0.c_str(), str1.c_str()); + + Common::ArchiveMemberList files; + + SearchMan.listMatchingMembers(files, str0); - warning("Addy Stub Draw 0x89: \"%s\", \"%s\", %d", str0.c_str(), str1.c_str(), index0); + if (files.empty()) { + storeValue(0); + return; + } + + storeValue(1); } void Inter_v7::o7_findFile() { @@ -204,6 +214,12 @@ void Inter_v7::o7_draw0x93() { warning("Addy Stub Draw 0x93: %d", expr0); } +void Inter_v7::o7_zeroVar() { + uint16 index = _vm->_game->_script->readVarIndex(); + + WRITE_VARO_UINT32(index, 0); +} + void Inter_v7::o7_getINIValue() { _vm->_game->_script->evalExpr(0); -- cgit v1.2.3