53 lines
877 B
C
53 lines
877 B
C
#ifndef ITEM_H
|
|
# define ITEM_H
|
|
|
|
#include <core.h>
|
|
|
|
typedef enum {
|
|
ITEM_EQUIPABLE,
|
|
ITEM_CONSUMABLE,
|
|
ITEM_PLACEABLE,
|
|
ITEM_QUEST,
|
|
} ITEM_FLAGS;
|
|
|
|
typedef enum {
|
|
TRANSLOCATOR,
|
|
} ITEM_LIST;
|
|
|
|
#define ITEM_NUMBER 1
|
|
|
|
const char *ITEM_NAME[ITEM_NUMBER] = {
|
|
"Translocator",
|
|
};
|
|
|
|
const char *ITEM_DESC[ITEM_NUMBER] = {
|
|
"Used to access the void network",
|
|
};
|
|
|
|
typedef struct {
|
|
ITEM_LIST id;
|
|
int number;
|
|
int rarity;
|
|
int flags;
|
|
int stack;
|
|
} Item;
|
|
|
|
/*
|
|
inventory could be a grid that have an item focused,
|
|
the item focused have a description and stats windows on the left,
|
|
the focused item is either the one under the mouse
|
|
or can be choosen using arrow keys (easier controller support)
|
|
*/
|
|
typedef struct {
|
|
int size;
|
|
int capacity;
|
|
Item storage[100];
|
|
} Inventory;
|
|
|
|
typedef struct {
|
|
int *loot;
|
|
int *proba;
|
|
} LootTable;
|
|
|
|
#endif
|