aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-03-08 22:50:10 +0100
committerWillem Jan Palenstijn2011-03-08 22:50:32 +0100
commiteece58df7f20b6411f5e534cbdf7b80c19fdee2a (patch)
treeefe8781780ab55b2e80711d740b21982ebf3288f /engines
parentb0cd614fd5a9b89765c7c3890a830abddc6d14f2 (diff)
downloadscummvm-rg350-eece58df7f20b6411f5e534cbdf7b80c19fdee2a.tar.gz
scummvm-rg350-eece58df7f20b6411f5e534cbdf7b80c19fdee2a.tar.bz2
scummvm-rg350-eece58df7f20b6411f5e534cbdf7b80c19fdee2a.zip
SCI: Remove unused argument to said
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/console.cpp2
-rw-r--r--engines/sci/engine/kparse.cpp2
-rw-r--r--engines/sci/graphics/menu.cpp5
-rw-r--r--engines/sci/parser/said.cpp2
-rw-r--r--engines/sci/parser/vocabulary.h3
5 files changed, 5 insertions, 9 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index b5bb5aaad0..aaf79dadda 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -1436,7 +1436,7 @@ bool Console::cmdSaid(int argc, const char **argv) {
_engine->getVocabulary()->dumpParseTree();
_engine->getVocabulary()->parserIsValid = true;
- int ret = said(_engine->_gamestate, (byte*)spec, true);
+ int ret = said((byte*)spec, true);
DebugPrintf("kSaid: %s\n", (ret == SAID_NO_MATCH ? "No match" : "Match"));
}
diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp
index c0a5e95811..09cf7744b2 100644
--- a/engines/sci/engine/kparse.cpp
+++ b/engines/sci/engine/kparse.cpp
@@ -70,7 +70,7 @@ reg_t kSaid(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
- new_lastmatch = said(s, said_block, debug_parser);
+ new_lastmatch = said(said_block, debug_parser);
if (new_lastmatch != SAID_NO_MATCH) { /* Build and possibly display a parse tree */
#ifdef DEBUG_PARSER
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 3b9119c52f..b2e564c288 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -404,7 +404,6 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject, bool pauseSound) {
GuiMenuItemList::iterator itemEnd = _itemList.end();
GuiMenuItemEntry *itemEntry = NULL;
bool forceClaimed = false;
- EngineState *s;
switch (eventType) {
case SCI_EVENT_KEYBOARD:
@@ -438,8 +437,6 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject, bool pauseSound) {
break;
case SCI_EVENT_SAID:
- // HACK: should be removed as soon as said() is cleaned up
- s = g_sci->getEngineState();
while (itemIterator != itemEnd) {
itemEntry = *itemIterator;
@@ -451,7 +448,7 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject, bool pauseSound) {
continue;
}
- if (said(s, saidSpec, 0) != SAID_NO_MATCH)
+ if (said(saidSpec, 0) != SAID_NO_MATCH)
break;
}
itemIterator++;
diff --git a/engines/sci/parser/said.cpp b/engines/sci/parser/said.cpp
index e9c6d9847f..666a235cf9 100644
--- a/engines/sci/parser/said.cpp
+++ b/engines/sci/parser/said.cpp
@@ -1020,7 +1020,7 @@ static int augment_parse_nodes(ParseTreeNode *parseT, ParseTreeNode *saidT) {
/**** Main code ****/
/*******************/
-int said(EngineState *s, const byte *spec, bool verbose) {
+int said(const byte *spec, bool verbose) {
int retval;
Vocabulary *voc = g_sci->getVocabulary();
diff --git a/engines/sci/parser/vocabulary.h b/engines/sci/parser/vocabulary.h
index 3d644d88f7..6d3e0b301e 100644
--- a/engines/sci/parser/vocabulary.h
+++ b/engines/sci/parser/vocabulary.h
@@ -383,12 +383,11 @@ void vocab_dump_parse_tree(const char *tree_name, ParseTreeNode *nodes);
/**
* Builds a parse tree from a spec and compares it to a parse tree.
- * @param s The affected state
* @param spec Pointer to the spec to build
* @param verbose Whether to display the parse tree after building it
* @return 1 on a match, 0 otherwise
*/
-int said(EngineState *s, const byte *spec, bool verbose);
+int said(const byte *spec, bool verbose);
} // End of namespace Sci