![]() |
naev 0.12.6
|
Inventory management for the player items. More...

Go to the source code of this file.
Functions | |
| static void | item_free (PlayerItem *pi) |
| void | player_inventoryClear (void) |
| Clears the inventory and frees memory. | |
| const PlayerItem * | player_inventory (void) |
| Gets the whole player inventory. | |
| int | player_inventoryAmount (const char *name) |
| Gets the amount of an item the player has. | |
| int | player_inventoryAdd (const char *name, int amount) |
| Adds an item to the player inventory. | |
| int | player_inventoryRemove (const char *name, int amount) |
| Removes an item from the player inventory. | |
Variables | |
| static PlayerItem * | inventory = NULL |
Inventory management for the player items.
Definition in file player_inventory.c.
|
static |
Definition at line 19 of file player_inventory.c.
| const PlayerItem * player_inventory | ( | void | ) |
Gets the whole player inventory.
Definition at line 38 of file player_inventory.c.
| int player_inventoryAdd | ( | const char * | name, |
| int | amount ) |
Adds an item to the player inventory.
| name | Item to add. |
| amount | Amount to add. |
Definition at line 65 of file player_inventory.c.
| int player_inventoryAmount | ( | const char * | name | ) |
Gets the amount of an item the player has.
| name | Name of the item to try to get. |
Definition at line 49 of file player_inventory.c.
| void player_inventoryClear | ( | void | ) |
Clears the inventory and frees memory.
Definition at line 27 of file player_inventory.c.
| int player_inventoryRemove | ( | const char * | name, |
| int | amount ) |
Removes an item from the player inventory.
| name | Item to remove. |
| amount | Amount to remove. |
Definition at line 92 of file player_inventory.c.
|
static |
Items the player has.
Definition at line 17 of file player_inventory.c.