From 4c1754127612778a8bf8e28f28b80ad20918049b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 21 May 2009 21:49:43 +0000 Subject: SCI: got rid of vocabulary_lookup_sname svn-id: r40771 --- engines/sci/engine/scriptdebug.cpp | 2 +- engines/sci/vocab_debug.cpp | 9 --------- engines/sci/vocabulary.h | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 9fde6a2326..dc15b12aea 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -2157,7 +2157,7 @@ static int c_send(EngineState *s, const Common::Array &cmdParams) { reg_t *vptr; reg_t fptr; - selector_id = vocabulary_lookup_sname(s->_selectorNames, selector_name); + selector_id = script_find_selector(s, selector_name); if (selector_id < 0) { sciprintf("Unknown selector: \"%s\"\n", selector_name); diff --git a/engines/sci/vocab_debug.cpp b/engines/sci/vocab_debug.cpp index 9b969a75ad..b231b7ea1e 100644 --- a/engines/sci/vocab_debug.cpp +++ b/engines/sci/vocab_debug.cpp @@ -83,15 +83,6 @@ bool vocabulary_get_snames(ResourceManager *resmgr, bool isOldSci0, Common::Stri return true; } -int vocabulary_lookup_sname(const Common::StringList &selectorNames, const char *sname) { - for (uint pos = 0; pos < selectorNames.size(); ++pos) { - if (selectorNames[pos] == sname) - return pos; - } - - return -1; -} - void vocabulary_get_opcodes(ResourceManager *resmgr, Common::Array &o) { int count, i = 0; Resource* r = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_OPCODES, 0); diff --git a/engines/sci/vocabulary.h b/engines/sci/vocabulary.h index b8dcee795c..575e18fc8c 100644 --- a/engines/sci/vocabulary.h +++ b/engines/sci/vocabulary.h @@ -194,10 +194,6 @@ int vocabulary_get_class_count(ResourceManager *resmgr); */ bool vocabulary_get_snames(ResourceManager *resmgr, bool isOldSci0, Common::StringList &selectorNames); -/* Look up a selector name in an array, return the index */ -int vocabulary_lookup_sname(const Common::StringList &selectorNames, const char *sname); - - /** * Obtain the list of opcodes. */ -- cgit v1.2.3