[Scummvm-cvs-logs] CVS: scummvm/saga interface.cpp,1.77,1.78 interface.h,1.41,1.42

Eugene Sandulenko sev at users.sourceforge.net
Wed Apr 20 16:42:41 CEST 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5764

Modified Files:
	interface.cpp interface.h 
Log Message:
Implement inventoryItemPosition()


Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- interface.cpp	19 Apr 2005 11:07:06 -0000	1.77
+++ interface.cpp	20 Apr 2005 23:42:19 -0000	1.78
@@ -535,6 +535,14 @@
 	}
 }
 
+int Interface::inventoryItemPosition(int sprite) {
+	for (int i = 0; i < _inventoryCount; i++)
+		if (_inventory[i] == sprite)
+			return i;
+
+	return -1;
+}
+
 void Interface::drawInventory() {
 	if (_panelMode != kPanelMain)
 		return;

Index: interface.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- interface.h	18 Apr 2005 20:03:12 -0000	1.41
+++ interface.h	20 Apr 2005 23:42:19 -0000	1.42
@@ -139,6 +139,7 @@
 	
 	void addToInventory(int sprite);
 	void removeFromInventory(int sprite);
+	int inventoryItemPosition(int sprite);
 	void drawInventory();
 	
 private:





More information about the Scummvm-git-logs mailing list