[Scummvm-cvs-logs] SF.net SVN: scummvm: [29091] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Mon Sep 24 21:45:18 CEST 2007


Revision: 29091
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29091&view=rev
Author:   peres001
Date:     2007-09-24 12:45:18 -0700 (Mon, 24 Sep 2007)

Log Message:
-----------
Fixed inventory regression introduced with yesterday's commit.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/inventory.cpp
    scummvm/trunk/engines/parallaction/saveload.cpp

Modified: scummvm/trunk/engines/parallaction/inventory.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/inventory.cpp	2007-09-24 19:37:57 UTC (rev 29090)
+++ scummvm/trunk/engines/parallaction/inventory.cpp	2007-09-24 19:45:18 UTC (rev 29091)
@@ -333,10 +333,7 @@
 
 
 ItemName Inventory::getItemName(ItemPosition pos) const {
-	// TODO: should assert against the number of items actually contained,
-	// not the theoretical limit.
-	assert(pos >= 0 && pos < INVENTORY_MAX_ITEMS);
-	return _items[pos]._index;
+	return (pos >= 0 && pos < INVENTORY_MAX_ITEMS) ? _items[pos]._index : 0;
 }
 
 const InventoryItem* Inventory::getItem(ItemPosition pos) const {

Modified: scummvm/trunk/engines/parallaction/saveload.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/saveload.cpp	2007-09-24 19:37:57 UTC (rev 29090)
+++ scummvm/trunk/engines/parallaction/saveload.cpp	2007-09-24 19:45:18 UTC (rev 29091)
@@ -147,7 +147,6 @@
 		f->readLine(s, 15);
 		name = atoi(s);
 
-		printf("loadGame: inv[%i].id = %i, inv[%i].index = %i\n", _si, value, _si, name);
 		addInventoryItem(name, value);
 	}
 


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