21 |
|
|
22 |
|
|
23 |
/** |
/** |
24 |
* @file inventory.cc |
* @file rpg/inventory.cc |
25 |
* @author Kai Sterker <kaisterker@linuxgames.com> |
* @author Kai Sterker <kaisterker@linuxgames.com> |
26 |
* |
* |
27 |
* @brief Container for items. |
* @brief Container for items. |
64 |
} |
} |
65 |
|
|
66 |
// add named slot to inventory |
// add named slot to inventory |
67 |
void inventory::add_slot (const std::string & id, const bool & equipment) |
void inventory::add_slot (const string & id, const bool & equipment) |
68 |
{ |
{ |
69 |
Slots.push_back (new slot (this, id, equipment)); |
Slots.push_back (new slot (this, id, equipment)); |
70 |
} |
} |
71 |
|
|
72 |
// retrieve named slot from inventory |
// retrieve named slot from inventory |
73 |
slot *inventory::get_slot (const std::string & id) |
slot *inventory::get_slot (const string & id) |
74 |
{ |
{ |
75 |
std::vector<slot*>::iterator i; |
std::vector<slot*>::iterator i; |
76 |
|
|