RogueLife/src/item.h

36 lines
746 B
C
Raw Normal View History

2022-02-16 17:42:05 +01:00
//---
// items: Dropped objects that can be picked up from the ground
//---
#pragma once
#include "comp/entity.h"
#include "geometry.h"
2022-03-16 20:00:22 +01:00
#include "anim.h"
2022-02-16 17:42:05 +01:00
enum {
ITEM_LIFE = 0,
2022-03-10 19:34:32 +01:00
ITEM_POTION_ATK = 1,
ITEM_POTION_COOLDOWN = 2,
ITEM_POTION_DEF = 3,
ITEM_POTION_FRZ = 4,
ITEM_POTION_HP = 5,
ITEM_POTION_SPD = 6,
/**/ ITEM_EQUIPMENT_START = 100,
ITEM_SCEPTER1,
ITEM_SCEPTER2,
ITEM_SWORD1,
ITEM_SWORD2,
/**/ ITEM_EQUIPMENT_END,
2022-02-16 17:42:05 +01:00
};
2022-03-16 20:00:22 +01:00
/* Animation for each item. */
anim_t const *item_anim(int item);
2022-02-16 17:42:05 +01:00
/* Create an item. This is just an AOE with a particular type. */
2022-03-10 19:34:32 +01:00
entity_t *item_make(int item, vec2 position);
2022-02-16 17:42:05 +01:00
/* Give an item to a player entity. */
2022-03-10 19:34:32 +01:00
void item_pick_up(int item, entity_t *player);