projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lebenszahl levelweise einstellbar.
[hackover2013-badge-firmware.git]
/
badge
/
jumpnrun
/
items.h
diff --git
a/badge/jumpnrun/items.h
b/badge/jumpnrun/items.h
index
f10204a
..
e939e68
100644
(file)
--- a/
badge/jumpnrun/items.h
+++ b/
badge/jumpnrun/items.h
@@
-1,18
+1,27
@@
#ifndef INCLUDED_JUMPNRUN_ITEMS_H
#define INCLUDED_JUMPNRUN_ITEMS_H
#ifndef INCLUDED_JUMPNRUN_ITEMS_H
#define INCLUDED_JUMPNRUN_ITEMS_H
-#include
<badge/ui/sprite.h>
-#include
<badge/util/rectangle.h>
+#include
"../ui/sprite.h"
+#include
"../util/rectangle.h"
struct jumpnrun_game_state;
struct jumpnrun_game_state;
+struct jumpnrun_level;
+struct jumpnrun_item;
+
+enum {
+ JUMPNRUN_ITEM_COLLECTED = 1
+};
typedef struct jumpnrun_item_type {
badge_sprite sprite;
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 {
} jumpnrun_item_type;
typedef struct jumpnrun_item {
- vec2d pos;
+ vec2d pos;
+ uint8_t flags;
jumpnrun_item_type const *type;
} jumpnrun_item;
jumpnrun_item_type const *type;
} jumpnrun_item;
@@
-25,6
+34,9
@@
static inline rectangle rect_from_item(jumpnrun_item const *item) {
enum {
JUMPNRUN_ITEM_TYPE_DOCUMENT,
enum {
JUMPNRUN_ITEM_TYPE_DOCUMENT,
+ JUMPNRUN_ITEM_TYPE_CHECKPOINT,
+ JUMPNRUN_ITEM_TYPE_KEY,
+ JUMPNRUN_ITEM_TYPE_ENCRYPTED_DOCUMENT,
JUMPNRUN_ITEM_TYPE_COUNT
};
JUMPNRUN_ITEM_TYPE_COUNT
};
This page took
0.02118 seconds
and
4
git commands to generate.