SCI: Make the implicit segMan param to GET_SEL32(V) and PUT_SEL32(V) explicit

svn-id: r45234
This commit is contained in:
Max Horn
2009-10-18 19:42:56 +00:00
parent 2bbf708dea
commit f3ab3051d8
15 changed files with 415 additions and 415 deletions
+7 -8
View File
@@ -79,7 +79,6 @@ Common::String kernel_lookup_text(EngineState *s, reg_t address, int index) {
reg_t kSaid(EngineState *s, int argc, reg_t *argv) {
SegManager *segMan = s->_segMan;
reg_t heap_said_block = argv[0];
byte *said_block;
int new_lastmatch;
@@ -104,7 +103,7 @@ reg_t kSaid(EngineState *s, int argc, reg_t *argv) {
s->_voc->decipherSaidBlock(said_block);
#endif
if (s->parser_event.isNull() || (GET_SEL32V(s->parser_event, claimed))) {
if (s->parser_event.isNull() || (GET_SEL32V(s->_segMan, s->parser_event, claimed))) {
return NULL_REG;
}
@@ -118,7 +117,7 @@ reg_t kSaid(EngineState *s, int argc, reg_t *argv) {
s->r_acc = make_reg(0, 1);
if (new_lastmatch != SAID_PARTIAL_MATCH)
PUT_SEL32V(s->parser_event, claimed, 1);
PUT_SEL32V(s->_segMan, s->parser_event, claimed, 1);
} else {
return NULL_REG;
@@ -137,14 +136,14 @@ reg_t kSetSynonyms(EngineState *s, int argc, reg_t *argv) {
s->_voc->clearSynonyms();
list = s->_segMan->lookupList(GET_SEL32(object, elements));
list = s->_segMan->lookupList(GET_SEL32(segMan, object, elements));
node = s->_segMan->lookupNode(list->first);
while (node) {
reg_t objpos = node->value;
int seg;
script = GET_SEL32V(objpos, number);
script = GET_SEL32V(segMan, objpos, number);
seg = s->_segMan->getScriptSegment(script);
if (seg > 0)
@@ -214,7 +213,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) {
if (syntax_fail) {
s->r_acc = make_reg(0, 1);
PUT_SEL32V(event, claimed, 1);
PUT_SEL32V(segMan, event, claimed, 1);
invoke_selector(INV_SEL(s->game_obj, syntaxFail, kStopOnInvalidSelector), 2, s->parser_base, stringpos);
/* Issue warning */
@@ -223,7 +222,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) {
} else {
s->parserIsValid = true;
PUT_SEL32V(event, claimed, 0);
PUT_SEL32V(segMan, event, claimed, 0);
#ifdef DEBUG_PARSER
s->_voc->dumpParseTree();
@@ -233,7 +232,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) {
} else {
s->r_acc = make_reg(0, 0);
PUT_SEL32V(event, claimed, 1);
PUT_SEL32V(segMan, event, claimed, 1);
if (error) {
s->_segMan->strcpy(s->parser_base, error);
debugC(2, kDebugLevelParser, "Word unknown: %s\n", error);