[Scummvm-cvs-logs] scummvm master -> eece58df7f20b6411f5e534cbdf7b80c19fdee2a
wjp
wjp at usecode.org
Tue Mar 8 22:52:35 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
eece58df7f SCI: Remove unused argument to said
Commit: eece58df7f20b6411f5e534cbdf7b80c19fdee2a
https://github.com/scummvm/scummvm/commit/eece58df7f20b6411f5e534cbdf7b80c19fdee2a
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-03-08T13:50:32-08:00
Commit Message:
SCI: Remove unused argument to said
Changed paths:
engines/sci/console.cpp
engines/sci/engine/kparse.cpp
engines/sci/graphics/menu.cpp
engines/sci/parser/said.cpp
engines/sci/parser/vocabulary.h
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index b5bb5aa..aaf79da 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 c0a5e95..09cf774 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 3b9119c..b2e564c 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 e9c6d98..666a235 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 3d644d8..6d3e0b3 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
More information about the Scummvm-git-logs
mailing list