36 lines
746 B
C
36 lines
746 B
C
//---
|
|
// items: Dropped objects that can be picked up from the ground
|
|
//---
|
|
|
|
#pragma once
|
|
|
|
#include "comp/entity.h"
|
|
#include "geometry.h"
|
|
#include "anim.h"
|
|
|
|
enum {
|
|
ITEM_LIFE = 0,
|
|
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,
|
|
};
|
|
|
|
/* Animation for each item. */
|
|
anim_t const *item_anim(int item);
|
|
|
|
/* Create an item. This is just an AOE with a particular type. */
|
|
entity_t *item_make(int item, vec2 position);
|
|
|
|
/* Give an item to a player entity. */
|
|
void item_pick_up(int item, entity_t *player);
|