From: Laszlo T. <ave...@us...> - 2005-05-21 14:17:48
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24767/plugins/Core Modified Files: Inventory.cpp Inventory.h Log Message: Completed Container implementation (PC inventory ground items still have to be completed) Index: Inventory.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Inventory.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Inventory.cpp 20 May 2005 16:41:03 -0000 1.48 --- Inventory.cpp 21 May 2005 14:17:40 -0000 1.49 *************** *** 48,51 **** --- 48,58 ---- } + CREItem *Inventory::GetItem(size_t idx) + { + CREItem *item = Slots[idx]; + Slots.erase(Slots.begin()+idx); + return item; + } + void Inventory::AddItem(CREItem *item) { Index: Inventory.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Inventory.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Inventory.h 20 May 2005 16:41:03 -0000 1.29 --- Inventory.h 21 May 2005 14:17:40 -0000 1.30 *************** *** 115,119 **** Inventory(); virtual ~Inventory(); ! /** adds an item to the inventory */ void AddItem(CREItem *item); --- 115,122 ---- Inventory(); virtual ~Inventory(); ! ! /** removes an item from the inventory, destroys slot ! use it only for containers */ ! CREItem *GetItem(size_t idx); /** adds an item to the inventory */ void AddItem(CREItem *item); |