diff options
author | Max Horn | 2009-10-07 23:34:24 +0000 |
---|---|---|
committer | Max Horn | 2009-10-07 23:34:24 +0000 |
commit | 0988e273eca17749037e501c20715b99b2dfb89a (patch) | |
tree | c48e7187c380d78f23de3aa65c5afd4bfe8891e5 /engines | |
parent | a4fa78743d23deed3414f1915694184bac3f2798 (diff) | |
download | scummvm-rg350-0988e273eca17749037e501c20715b99b2dfb89a.tar.gz scummvm-rg350-0988e273eca17749037e501c20715b99b2dfb89a.tar.bz2 scummvm-rg350-0988e273eca17749037e501c20715b99b2dfb89a.zip |
SCI: Turn lookup_node & lookup_list into SegManager::lookupNode & SegManager::lookupList
svn-id: r44769
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/console.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 16 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/klists.cpp | 103 | ||||
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 22 | ||||
-rw-r--r-- | engines/sci/engine/kstring.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 38 | ||||
-rw-r--r-- | engines/sci/engine/seg_manager.h | 14 | ||||
-rw-r--r-- | engines/sci/gui/gui.cpp | 4 | ||||
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 10 | ||||
-rw-r--r-- | engines/sci/gui32/gui32.cpp | 10 |
11 files changed, 113 insertions, 118 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 63c4b3fab2..03700abe65 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -1860,7 +1860,7 @@ bool Console::cmdViewReference(int argc, const char **argv) { case 0: break; case KSIG_LIST: { - List *l = lookup_list(_vm->_gamestate, reg); + List *l = _vm->_gamestate->_segMan->lookupList(reg); DebugPrintf("list\n"); diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index e01a8e8722..cd2bc97b6a 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -274,22 +274,6 @@ extern Common::Rect get_nsrect(EngineState *s, reg_t object, byte clip); */ void process_sound_events(EngineState *s); -/** - * Resolves an address into a list node - * @param s The state to operate on - * @param addr The address to resolve - * @return The list node referenced, or NULL on error - */ -Node *lookup_node(EngineState *s, reg_t addr); - -/** - * Resolves a list pointer to a list - * @param s The state to operate on - * @param addr The address to resolve - * @return The list referenced, or NULL on error - */ -List *lookup_list(EngineState *s, reg_t addr); - /******************** Constants ********************/ diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 65965a04b9..c764e09b68 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -753,10 +753,10 @@ reg_t kCanBeHere(EngineState *s, int argc, reg_t *argv) { } if (cliplist_ref.segment) - cliplist = lookup_list(s, cliplist_ref); + cliplist = s->_segMan->lookupList(cliplist_ref); if (cliplist) { - Node *node = lookup_node(s, cliplist->first); + Node *node = s->_segMan->lookupNode(cliplist->first); retval = 0; // Assume that we Can'tBeHere... @@ -774,7 +774,7 @@ reg_t kCanBeHere(EngineState *s, int argc, reg_t *argv) { } } // if (other_obj != obj) - node = lookup_node(s, node->succ); // move on + node = s->_segMan->lookupNode(node->succ); // move on } } diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index ea33a48f4e..4a171eab65 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -28,47 +28,6 @@ namespace Sci { -Node *lookup_node(EngineState *s, reg_t addr) { - if (!addr.offset && !addr.segment) - return NULL; // Non-error null - - SegmentObj *mobj = GET_SEGMENT(*s->_segMan, addr.segment, SEG_TYPE_NODES); - if (!mobj) { - // FIXME: This occurs right at the beginning of SQ4, when walking north from the first screen. It doesn't - // seem to have any apparent ill-effects, though, so it's been changed to non-fatal, for now - //error("%s, L%d: Attempt to use non-node %04x:%04x as list node", __FILE__, __LINE__, PRINT_REG(addr)); - warning("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr)); - return NULL; - } - - NodeTable *nt = (NodeTable *)mobj; - - if (!nt->isValidEntry(addr.offset)) { - warning("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr)); - return NULL; - } - - return &(nt->_table[addr.offset]); -} - -List *lookup_list(EngineState *s, reg_t addr) { - SegmentObj *mobj = GET_SEGMENT(*s->_segMan, addr.segment, SEG_TYPE_LISTS); - - if (!mobj) { - warning("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); - return NULL; - } - - ListTable *lt = (ListTable *)mobj; - - if (!lt->isValidEntry(addr.offset)) { - warning("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); - return NULL; - } - - return &(lt->_table[addr.offset]); -} - #ifdef DISABLE_VALIDATIONS #define sane_nodep(a, b) 1 @@ -81,7 +40,7 @@ static int sane_nodep(EngineState *s, reg_t addr) { reg_t prev = addr; do { - Node *node = lookup_node(s, addr); + Node *node = s->_segMan->lookupNode(addr); if (!node) return 0; @@ -98,7 +57,7 @@ static int sane_nodep(EngineState *s, reg_t addr) { } int sane_listp(EngineState *s, reg_t addr) { - List *l = lookup_list(s, addr); + List *l = s->_segMan->lookupList(addr); int empties = 0; if (l->first.isNull()) @@ -113,8 +72,8 @@ int sane_listp(EngineState *s, reg_t addr) { if (!empties) { Node *node_a, *node_z; - node_a = lookup_node(s, l->first); - node_z = lookup_node(s, l->last); + node_a = s->_segMan->lookupNode(l->first); + node_z = s->_segMan->lookupNode(l->last); if (!node_a || !node_z) return 0; @@ -143,7 +102,7 @@ reg_t kNewList(EngineState *s, int argc, reg_t *argv) { } reg_t kDisposeList(EngineState *s, int argc, reg_t *argv) { - List *l = lookup_list(s, argv[0]); + List *l = s->_segMan->lookupList(argv[0]); if (!l) { // FIXME: This should be an error, but it's turned to a warning for now @@ -158,7 +117,7 @@ reg_t kDisposeList(EngineState *s, int argc, reg_t *argv) { reg_t n_addr = l->first; while (!n_addr.isNull()) { // Free all nodes - Node *n = lookup_node(s, n_addr); + Node *n = s->_segMan->lookupNode(n_addr); s->_segMan->free_Node(n_addr); n_addr = n->succ; } @@ -196,7 +155,7 @@ reg_t kNewNode(EngineState *s, int argc, reg_t *argv) { reg_t kFirstNode(EngineState *s, int argc, reg_t *argv) { if (argv[0].isNull()) return NULL_REG; - List *l = lookup_list(s, argv[0]); + List *l = s->_segMan->lookupList(argv[0]); if (l && !sane_listp(s, argv[0])) warning("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); @@ -208,7 +167,7 @@ reg_t kFirstNode(EngineState *s, int argc, reg_t *argv) { } reg_t kLastNode(EngineState *s, int argc, reg_t *argv) { - List *l = lookup_list(s, argv[0]); + List *l = s->_segMan->lookupList(argv[0]); if (l && !sane_listp(s, argv[0])) warning("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); @@ -220,7 +179,7 @@ reg_t kLastNode(EngineState *s, int argc, reg_t *argv) { } reg_t kEmptyList(EngineState *s, int argc, reg_t *argv) { - List *l = lookup_list(s, argv[0]); + List *l = s->_segMan->lookupList(argv[0]); if (!l || !sane_listp(s, argv[0])) warning("List at %04x:%04x is invalid or not sane anymore", PRINT_REG(argv[0])); @@ -229,8 +188,8 @@ reg_t kEmptyList(EngineState *s, int argc, reg_t *argv) { } void _k_add_to_front(EngineState *s, reg_t listbase, reg_t nodebase) { - List *l = lookup_list(s, listbase); - Node *new_n = lookup_node(s, nodebase); + List *l = s->_segMan->lookupList(listbase); + Node *new_n = s->_segMan->lookupNode(nodebase); debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase)); @@ -246,15 +205,15 @@ void _k_add_to_front(EngineState *s, reg_t listbase, reg_t nodebase) { if (l->first.isNull()) l->last = nodebase; else { - Node *old_n = lookup_node(s, l->first); + Node *old_n = s->_segMan->lookupNode(l->first); old_n->pred = nodebase; } l->first = nodebase; } void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) { - List *l = lookup_list(s, listbase); - Node *new_n = lookup_node(s, nodebase); + List *l = s->_segMan->lookupList(listbase); + Node *new_n = s->_segMan->lookupNode(nodebase); debugC(2, kDebugLevelNodes, "Adding node %04x:%04x to end of list %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase)); @@ -270,14 +229,14 @@ void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) { if (l->last.isNull()) l->first = nodebase; else { - Node *old_n = lookup_node(s, l->last); + Node *old_n = s->_segMan->lookupNode(l->last); old_n->succ = nodebase; } l->last = nodebase; } reg_t kNextNode(EngineState *s, int argc, reg_t *argv) { - Node *n = lookup_node(s, argv[0]); + Node *n = s->_segMan->lookupNode(argv[0]); if (!sane_nodep(s, argv[0])) { warning("List node at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); return NULL_REG; @@ -287,7 +246,7 @@ reg_t kNextNode(EngineState *s, int argc, reg_t *argv) { } reg_t kPrevNode(EngineState *s, int argc, reg_t *argv) { - Node *n = lookup_node(s, argv[0]); + Node *n = s->_segMan->lookupNode(argv[0]); if (!sane_nodep(s, argv[0])) warning("List node at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); @@ -295,7 +254,7 @@ reg_t kPrevNode(EngineState *s, int argc, reg_t *argv) { } reg_t kNodeValue(EngineState *s, int argc, reg_t *argv) { - Node *n = lookup_node(s, argv[0]); + Node *n = s->_segMan->lookupNode(argv[0]); if (!sane_nodep(s, argv[0])) { warning("List node at %04x:%04x is not sane", PRINT_REG(argv[0])); return NULL_REG; @@ -310,9 +269,9 @@ reg_t kAddToFront(EngineState *s, int argc, reg_t *argv) { } reg_t kAddAfter(EngineState *s, int argc, reg_t *argv) { - List *l = lookup_list(s, argv[0]); - Node *firstnode = argv[1].isNull() ? NULL : lookup_node(s, argv[1]); - Node *newnode = lookup_node(s, argv[2]); + List *l = s->_segMan->lookupList(argv[0]); + Node *firstnode = argv[1].isNull() ? NULL : s->_segMan->lookupNode(argv[1]); + Node *newnode = s->_segMan->lookupNode(argv[2]); if (!l || !sane_listp(s, argv[0])) warning("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0])); @@ -339,7 +298,7 @@ reg_t kAddAfter(EngineState *s, int argc, reg_t *argv) { // Set new node as last list node l->last = argv[2]; else - lookup_node(s, oldnext)->pred = argv[2]; + s->_segMan->lookupNode(oldnext)->pred = argv[2]; } else { // !firstnode _k_add_to_front(s, argv[0], argv[2]); // Set as initial list node @@ -363,12 +322,12 @@ reg_t kFindKey(EngineState *s, int argc, reg_t *argv) { if (!sane_listp(s, list_pos)) warning("List at %04x:%04x is not sane anymore", PRINT_REG(list_pos)); - node_pos = lookup_list(s, list_pos)->first; + node_pos = s->_segMan->lookupList(list_pos)->first; debugC(2, kDebugLevelNodes, "First node at %04x:%04x\n", PRINT_REG(node_pos)); while (!node_pos.isNull()) { - Node *n = lookup_node(s, node_pos); + Node *n = s->_segMan->lookupNode(node_pos); if (n->key == key) { debugC(2, kDebugLevelNodes, " Found key at %04x:%04x\n", PRINT_REG(node_pos)); return node_pos; @@ -385,21 +344,21 @@ reg_t kFindKey(EngineState *s, int argc, reg_t *argv) { reg_t kDeleteKey(EngineState *s, int argc, reg_t *argv) { reg_t node_pos = kFindKey(s, 2, argv); Node *n; - List *l = lookup_list(s, argv[0]); + List *l = s->_segMan->lookupList(argv[0]); if (node_pos.isNull()) return NULL_REG; // Signal falure - n = lookup_node(s, node_pos); + n = s->_segMan->lookupNode(node_pos); if (l->first == node_pos) l->first = n->succ; if (l->last == node_pos) l->last = n->pred; if (!n->pred.isNull()) - lookup_node(s, n->pred)->succ = n->succ; + s->_segMan->lookupNode(n->pred)->succ = n->succ; if (!n->succ.isNull()) - lookup_node(s, n->succ)->pred = n->pred; + s->_segMan->lookupNode(n->succ)->pred = n->pred; //s->_segMan->free_Node(node_pos); @@ -450,8 +409,8 @@ reg_t kSort(EngineState *s, int argc, reg_t *argv) { PUT_SEL32V(dest, size, input_size); - list = lookup_list(s, input_data); - node = lookup_node(s, list->first); + list = s->_segMan->lookupList(input_data); + node = s->_segMan->lookupNode(list->first); sort_temp_t *temp_array = (sort_temp_t *)malloc(sizeof(sort_temp_t) * input_size); @@ -462,7 +421,7 @@ reg_t kSort(EngineState *s, int argc, reg_t *argv) { temp_array[i].value = node->value; temp_array[i].order = s->r_acc; i++; - node = lookup_node(s, node->succ); + node = s->_segMan->lookupNode(node->succ); } qsort(temp_array, input_size, sizeof(sort_temp_t), sort_temp_cmp); diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index ea6e5c7610..2671aad6b6 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -372,18 +372,18 @@ static void draw_input(EngineState *s, reg_t poly_list, Common::Point start, Com if (!poly_list.segment) return; - list = lookup_list(s, poly_list); + list = s->_segMan->lookupList(poly_list); if (!list) { warning("[avoidpath] Could not obtain polygon list"); return; } - node = lookup_node(s, list->first); + node = s->_segMan->lookupNode(list->first); while (node) { draw_polygon(s, node->value); - node = lookup_node(s, node->succ); + node = s->_segMan->lookupNode(node->succ); } } @@ -418,7 +418,7 @@ static void print_input(EngineState *s, reg_t poly_list, Common::Point start, Co if (!poly_list.segment) return; - list = lookup_list(s, poly_list); + list = s->_segMan->lookupList(poly_list); if (!list) { warning("[avoidpath] Could not obtain polygon list"); @@ -426,11 +426,11 @@ static void print_input(EngineState *s, reg_t poly_list, Common::Point start, Co } printf("Polygons:\n"); - node = lookup_node(s, list->first); + node = s->_segMan->lookupNode(list->first); while (node) { print_polygon(s->_segMan, node->value); - node = lookup_node(s, node->succ); + node = s->_segMan->lookupNode(node->succ); } } @@ -1355,11 +1355,11 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co // Convert all polygons if (poly_list.segment) { - List *list = lookup_list(s, poly_list); - Node *node = lookup_node(s, list->first); + List *list = s->_segMan->lookupList(poly_list); + Node *node = s->_segMan->lookupNode(list->first); while (node) { - Node *dup = lookup_node(s, list->first); + Node *dup = s->_segMan->lookupNode(list->first); // Workaround for game bugs that put a polygon in the list more than once while (dup != node) { @@ -1367,7 +1367,7 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co warning("[avoidpath] Ignoring duplicate polygon"); break; } - dup = lookup_node(s, dup->succ); + dup = s->_segMan->lookupNode(dup->succ); } if (dup == node) { @@ -1377,7 +1377,7 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co count += GET_SEL32(node->value, size).toUint16(); } - node = lookup_node(s, node->succ); + node = s->_segMan->lookupNode(node->succ); } } diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 0d80618bfd..1e26450066 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -137,8 +137,8 @@ reg_t kSetSynonyms(EngineState *s, int argc, reg_t *argv) { s->_voc->clearSynonyms(); - list = lookup_list(s, GET_SEL32(object, elements)); - node = lookup_node(s, list->first); + list = s->_segMan->lookupList(GET_SEL32(object, elements)); + node = s->_segMan->lookupNode(list->first); while (node) { reg_t objpos = node->value; @@ -174,7 +174,7 @@ reg_t kSetSynonyms(EngineState *s, int argc, reg_t *argv) { } - node = lookup_node(s, node->succ); + node = s->_segMan->lookupNode(node->succ); } debugC(2, kDebugLevelParser, "A total of %d synonyms are active now.\n", numSynonyms); diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index b8412da8fb..234ad42eb2 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -895,6 +895,44 @@ Hunk *SegManager::alloc_Hunk(reg_t *addr) { return &(table->_table[offset]); } +List *SegManager::lookupList(reg_t addr) { + if (getSegmentType(addr.segment) != SEG_TYPE_LISTS) { + warning("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); + return NULL; + } + + ListTable *lt = (ListTable *)_heap[addr.segment]; + + if (!lt->isValidEntry(addr.offset)) { + warning("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); + return NULL; + } + + return &(lt->_table[addr.offset]); +} + +Node *SegManager::lookupNode(reg_t addr) { + if (!addr.offset && !addr.segment) + return NULL; // Non-error null + + if (getSegmentType(addr.segment) != SEG_TYPE_NODES) { + // FIXME: This occurs right at the beginning of SQ4, when walking north from the first screen. It doesn't + // seem to have any apparent ill-effects, though, so it's been changed to non-fatal, for now + //error("%s, L%d: Attempt to use non-node %04x:%04x as list node", __FILE__, __LINE__, PRINT_REG(addr)); + warning("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr)); + return NULL; + } + + NodeTable *nt = (NodeTable *)_heap[addr.segment]; + + if (!nt->isValidEntry(addr.offset)) { + warning("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr)); + return NULL; + } + + return &(nt->_table[addr.offset]); +} + SegmentRef SegManager::dereference(reg_t pointer) { SegmentRef ret; diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index 6226d1ce76..2b827400fd 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -227,6 +227,20 @@ public: */ Node *allocateNode(reg_t *addr); + /** + * Resolves a list pointer to a list. + * @param addr The address to resolve + * @return The list referenced, or NULL on error + */ + List *lookupList(reg_t addr); + + /** + * Resolves an address into a list node. + * @param addr The address to resolve + * @return The list node referenced, or NULL on error + */ + Node *lookupNode(reg_t addr); + // 8. Hunk Memory diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 743172fe4e..befad94231 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -388,7 +388,7 @@ void SciGui::animate(reg_t listReference, bool cycle, int argc, reg_t *argv) { return; } - List *list = lookup_list(_s, listReference); + List *list = _s->_segMan->lookupList(listReference); if (!list) error("kAnimate called with non-list as parameter"); @@ -425,7 +425,7 @@ void SciGui::addToPicList(reg_t listReference, int argc, reg_t *argv) { _gfx->SetPort((GuiPort *)_windowMgr->_picWind); - list = lookup_list(_s, listReference); + list = _s->_segMan->lookupList(listReference); if (!list) error("kAddToPic called with non-list as parameter"); diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 1cfe3f3a5a..76ade972d7 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -1069,7 +1069,7 @@ void SciGuiGfx::AnimateDisposeLastCast() { void SciGuiGfx::AnimateInvoke(List *list, int argc, reg_t *argv) { reg_t curAddress = list->first; - Node *curNode = lookup_node(_s, curAddress); + Node *curNode = _s->_segMan->lookupNode(curAddress); reg_t curObject; //uint16 mask; @@ -1080,10 +1080,10 @@ void SciGuiGfx::AnimateInvoke(List *list, int argc, reg_t *argv) { // if ((mask & 0x100) == 0) { invoke_selector(_s, curObject, _s->_kernel->_selectorCache.doit, kContinueOnInvalidSelector, argv, argc, __FILE__, __LINE__, 0); // Lookup node again, since the nodetable it was in may have been reallocated - curNode = lookup_node(_s, curAddress); + curNode = _s->_segMan->lookupNode(curAddress); // } curAddress = curNode->succ; - curNode = lookup_node(_s, curAddress); + curNode = _s->_segMan->lookupNode(curAddress); } } @@ -1095,7 +1095,7 @@ Common::List<GuiAnimateList> *SciGuiGfx::AnimateMakeSortedList(List *list) { Common::List<GuiAnimateList> *sortedList = new Common::List<GuiAnimateList>; GuiAnimateList listHelper; reg_t curAddress = list->first; - Node *curNode = lookup_node(_s, curAddress); + Node *curNode = _s->_segMan->lookupNode(curAddress); reg_t curObject; // First convert the given List to Common::List @@ -1107,7 +1107,7 @@ Common::List<GuiAnimateList> *SciGuiGfx::AnimateMakeSortedList(List *list) { sortedList->push_back(listHelper); curAddress = curNode->succ; - curNode = lookup_node(_s, curAddress); + curNode = _s->_segMan->lookupNode(curAddress); } // Now do a bubble sort on this Common::List diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp index 4d86fe3fe6..06718b9c12 100644 --- a/engines/sci/gui32/gui32.cpp +++ b/engines/sci/gui32/gui32.cpp @@ -945,7 +945,7 @@ void SciGui32::_k_make_view_list(GfxList **widget_list, List *list, int options, } reg_t next_node = list->first; - node = lookup_node(s, next_node); + node = s->_segMan->lookupNode(next_node); while (node) { reg_t obj = node->value; // The object we're using GfxDynView *tempWidget; @@ -961,7 +961,7 @@ void SciGui32::_k_make_view_list(GfxList **widget_list, List *list, int options, // Lookup node again, since the NodeTable it was in may // have been re-allocated. - node = lookup_node(s, next_node); + node = s->_segMan->lookupNode(next_node); } } @@ -974,7 +974,7 @@ void SciGui32::_k_make_view_list(GfxList **widget_list, List *list, int options, if (tempWidget) (*widget_list)->add((GfxContainer *)(*widget_list), tempWidget); - node = lookup_node(s, next_node); // Next node + node = s->_segMan->lookupNode(next_node); // Next node } widget = (GfxDynView *)(*widget_list)->_contents; @@ -1853,7 +1853,7 @@ void SciGui32::animate(reg_t listReference, bool cycle, int argc, reg_t *argv) { // after all, damage the cast list if (listReference.segment) { - cast_list = lookup_list(s, listReference); + cast_list = s->_segMan->lookupList(listReference); if (!cast_list) return; } @@ -1958,7 +1958,7 @@ void SciGui32::addToPicList(reg_t listReference, int argc, reg_t *argv) { return; } - list = lookup_list(s, listReference); + list = s->_segMan->lookupList(listReference); pic_views = gfxw_new_list(s->picture_port->_bounds, 1); |