[Scummvm-cvs-logs] SF.net SVN: scummvm:[44769] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Oct 8 01:34:24 CEST 2009


Revision: 44769
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44769&view=rev
Author:   fingolfin
Date:     2009-10-07 23:34:24 +0000 (Wed, 07 Oct 2009)

Log Message:
-----------
SCI: Turn lookup_node & lookup_list into SegManager::lookupNode & SegManager::lookupList

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/engine/kernel.h
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/klists.cpp
    scummvm/trunk/engines/sci/engine/kpathing.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.h
    scummvm/trunk/engines/sci/gui/gui.cpp
    scummvm/trunk/engines/sci/gui/gui_gfx.cpp
    scummvm/trunk/engines/sci/gui32/gui32.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/console.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -1860,7 +1860,7 @@
 		case 0:
 			break;
 		case KSIG_LIST: {
-			List *l = lookup_list(_vm->_gamestate, reg);
+			List *l = _vm->_gamestate->_segMan->lookupList(reg);
 
 			DebugPrintf("list\n");
 

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2009-10-07 23:34:24 UTC (rev 44769)
@@ -274,23 +274,7 @@
  */
 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 ********************/
 
 /* Maximum length of a savegame name (including terminator character) */

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -753,10 +753,10 @@
 	}
 
 	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 @@
 				}
 
 			} // if (other_obj != obj)
-			node = lookup_node(s, node->succ); // move on
+			node = s->_segMan->lookupNode(node->succ); // move on
 		}
 	}
 

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -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 @@
 	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 @@
 }
 
 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 @@
 	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 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 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 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 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 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 @@
 }
 
 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 @@
 	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 @@
 	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 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 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 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 @@
 			// 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 @@
 	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 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 @@
 
 	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 @@
 		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);

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -372,18 +372,18 @@
 	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 @@
 	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 @@
 	}
 
 	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 @@
 
 	// 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 @@
 					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 @@
 				count += GET_SEL32(node->value, size).toUint16();
 			}
 
-			node = lookup_node(s, node->succ);
+			node = s->_segMan->lookupNode(node->succ);
 		}
 	}
 

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -137,8 +137,8 @@
 
 	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 @@
 
 		}
 
-		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);

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -895,6 +895,44 @@
 	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;
 

Modified: scummvm/trunk/engines/sci/engine/seg_manager.h
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.h	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/engine/seg_manager.h	2009-10-07 23:34:24 UTC (rev 44769)
@@ -227,7 +227,21 @@
 	 */
 	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
 
 	/**

Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/gui/gui.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -388,7 +388,7 @@
 		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 @@
 
 	_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");
 

Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -1069,7 +1069,7 @@
 
 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 @@
 //		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> *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 @@
 		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

Modified: scummvm/trunk/engines/sci/gui32/gui32.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui32/gui32.cpp	2009-10-07 23:21:18 UTC (rev 44768)
+++ scummvm/trunk/engines/sci/gui32/gui32.cpp	2009-10-07 23:34:24 UTC (rev 44769)
@@ -945,7 +945,7 @@
 	}
 
 	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 @@
 
 				// 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 @@
 		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 @@
 						// 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 @@
 		return;
 	}
 
-	list = lookup_list(s, listReference);
+	list = s->_segMan->lookupList(listReference);
 
 	pic_views = gfxw_new_list(s->picture_port->_bounds, 1);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list