9 //Inventory::Inventory() {}
11 void Inventory::addObject( Object
*o
)
13 // assert( o->getLocation() == Object::LOC_FREE );
15 /*if( hasItem( o->getID() ) )
24 o
->setLocation( Object::LOC_INVENT
);
26 invent
.push_back( temp
);
29 Object
* Inventory::removeObject( invElement i
)
38 Object
* Inventory::removeObject( )
41 return removeObject( invent
.begin() );
45 void Inventory::Draw( Sint16 X
, Sint16 Y
)
50 for( invElement i
= invent
.begin(); i
!= invent
.end(); i
++, c
++ )
54 o
->getGraphic()->Draw( X
+ (c
*20), Y
);
59 /*invent_t *Inventory::hasItem( std::string id )
63 for( invElement i = invent.begin(); i != invent.end(); i++ )
65 if( (*i).obj->checkID( id ) )