SCI: Remove unused argument to said

This commit is contained in:
Willem Jan Palenstijn 2011-03-08 22:50:10 +01:00
parent b0cd614fd5
commit eece58df7f
5 changed files with 5 additions and 9 deletions

View file

@ -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"));
}

View file

@ -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

View file

@ -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++;

View file

@ -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();

View file

@ -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