24 lines
606 B
C
24 lines
606 B
C
#ifndef INVENTORY_H
|
|
#define INVENTORY_H
|
|
/*** Inventory
|
|
|
|
***/
|
|
struct Inventory {
|
|
int max_weight;
|
|
int max_slots;
|
|
int slots_per_row;
|
|
int x;
|
|
int y;
|
|
int selected; // selected number (x+y)
|
|
int count; // amount of items in inventory
|
|
struct Tile *owner; // the owner or opener of the inventory
|
|
struct Tile *last_tile; // last tile in inventory
|
|
struct Tile *tile; // first tile in inventory
|
|
};
|
|
|
|
int inventoryMove(struct Inventory *inventory, int x, int y);
|
|
int inventoryDrop(struct Inventory *inventory, int selected);
|
|
int addToInventory(struct Inventory *inventory, struct Tile *tile);
|
|
|
|
#endif
|