[Scummvm-cvs-logs] SF.net SVN: scummvm: [24468] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Mon Oct 23 07:59:00 CEST 2006


Revision: 24468
          http://svn.sourceforge.net/scummvm/?rev=24468&view=rev
Author:   kirben
Date:     2006-10-22 22:58:53 -0700 (Sun, 22 Oct 2006)

Log Message:
-----------
Add hasIcon difference in Elvira 1

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/icons.cpp
    scummvm/trunk/engines/agos/items.cpp

Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp	2006-10-23 05:32:54 UTC (rev 24467)
+++ scummvm/trunk/engines/agos/agos.cpp	2006-10-23 05:58:53 UTC (rev 24468)
@@ -682,7 +682,7 @@
 		_vgaMemSize = gVars->memory[kMemSimon1Games];
 #endif
 		_itemMemSize = 64000;
-		_tableMemSize = 50000;
+		_tableMemSize = 100000;
 		_frameRate = 4;
 		_vgaBaseDelay = 1;
 		_numVars = 255;

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2006-10-23 05:32:54 UTC (rev 24467)
+++ scummvm/trunk/engines/agos/agos.h	2006-10-23 05:58:53 UTC (rev 24468)
@@ -781,7 +781,7 @@
 	void removeArrows(WindowBlock *window, uint num);
 
 	void draw_icon_c(WindowBlock *window, uint icon, uint x, uint y);
-	bool has_item_childflag_0x10(Item *item);
+	bool hasIcon(Item *item);
 	uint itemGetIconNumber(Item *item);
 	uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
 	void drawIconArray(uint i, Item *item_ptr, int line, int classMask);

Modified: scummvm/trunk/engines/agos/icons.cpp
===================================================================
--- scummvm/trunk/engines/agos/icons.cpp	2006-10-23 05:32:54 UTC (rev 24467)
+++ scummvm/trunk/engines/agos/icons.cpp	2006-10-23 05:58:53 UTC (rev 24468)
@@ -288,7 +288,7 @@
 	while (itemRef && line-- != 0) {
 		curWidth = 0;
 		while (itemRef && width > curWidth) {
-			if ((classMask == 0 || itemRef->classFlags & classMask) && has_item_childflag_0x10(itemRef))
+			if ((classMask == 0 || itemRef->classFlags & classMask) && hasIcon(itemRef))
 				curWidth += iconSize;
 			itemRef = derefItem(itemRef->next);
 		}
@@ -306,7 +306,7 @@
 	showArrows = false;
 
 	while (itemRef) {
-		if ((classMask == 0 || itemRef->classFlags & classMask) && has_item_childflag_0x10(itemRef)) {
+		if ((classMask == 0 || itemRef->classFlags & classMask) && hasIcon(itemRef)) {
 			if (item_again == false) {
 				window->iconPtr->iconArray[k].item = itemRef;
 				if (getGameType() == GType_SIMON2) {
@@ -389,7 +389,7 @@
 		uint16 ct = xp;
 		while (itemRef && ct < iconperline) {
 			if ((classMask == 0) || ((itemRef->classFlags & classMask) != 0)) {
-				if (has_item_childflag_0x10(itemRef)) {
+				if (hasIcon(itemRef)) {
 					ct += 45;
 					k++;
 				}
@@ -410,7 +410,7 @@
 	while (itemRef) {
 		if ((classMask != 0) && ((itemRef->classFlags & classMask) == 0))
 			goto l1;
-		if (has_item_childflag_0x10(itemRef) == 0)
+		if (hasIcon(itemRef) == 0)
 			goto l1;
 		if (!idone) {
 /*

Modified: scummvm/trunk/engines/agos/items.cpp
===================================================================
--- scummvm/trunk/engines/agos/items.cpp	2006-10-23 05:32:54 UTC (rev 24467)
+++ scummvm/trunk/engines/agos/items.cpp	2006-10-23 05:58:53 UTC (rev 24468)
@@ -60,6 +60,15 @@
 		error("Out Of Memory - Items");
 }
 
+bool AGOSEngine::hasIcon(Item *item) {
+	if (getGameType() == GType_ELVIRA1) {
+		return (getUserFlag(item, 7) != 0);
+	} else {
+		SubObject *child = (SubObject *)findChildOfType(item, 2);
+		return (child && (child->objectFlags & kOFIcon) != 0);
+	}
+}
+
 uint AGOSEngine::itemGetIconNumber(Item *item) {
 	if (getGameType() == GType_ELVIRA1) {
 		return getUserFlag(item, 7);
@@ -341,11 +350,6 @@
 	}
 }
 
-bool AGOSEngine::has_item_childflag_0x10(Item *item) {
-	SubObject *child = (SubObject *)findChildOfType(item, 2);
-	return child && (child->objectFlags & kOFIcon) != 0;
-}
-
 int AGOSEngine::wordMatch(Item *item, int16 a, int16 n) {
 	if ((a == -1) && (n == item->noun))
 		return 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