#include "../util/rectangle.h"
struct jumpnrun_game_state;
+struct jumpnrun_level;
+struct jumpnrun_item;
+
+enum {
+ JUMPNRUN_ITEM_COLLECTED = 1
+};
typedef struct jumpnrun_item_type {
badge_sprite sprite;
- void (*on_collect)(struct jumpnrun_game_state *state);
+ void (*on_collect)(struct jumpnrun_item *item,
+ struct jumpnrun_game_state *state,
+ struct jumpnrun_level *lv);
} jumpnrun_item_type;
typedef struct jumpnrun_item {
- vec2d pos;
+ vec2d pos;
+ uint8_t flags;
jumpnrun_item_type const *type;
} jumpnrun_item;
enum {
JUMPNRUN_ITEM_TYPE_DOCUMENT,
+ JUMPNRUN_ITEM_TYPE_CHECKPOINT,
+ JUMPNRUN_ITEM_TYPE_KEY,
+ JUMPNRUN_ITEM_TYPE_ENCRYPTED_DOCUMENT,
JUMPNRUN_ITEM_TYPE_COUNT
};