projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Vergessene Dinge eingecheckt.
[hackover2013-badge-firmware.git]
/
badge
/
jumpnrun
/
moveable.h
diff --git
a/badge/jumpnrun/moveable.h
b/badge/jumpnrun/moveable.h
index
5e7514b
..
7b680d2
100644
(file)
--- a/
badge/jumpnrun/moveable.h
+++ b/
badge/jumpnrun/moveable.h
@@
-2,17
+2,26
@@
#define INCLUDED_BADGE_JUMPNRUN_MOVEABLE_H
#include "../util/util.h"
#define INCLUDED_BADGE_JUMPNRUN_MOVEABLE_H
#include "../util/util.h"
+#include <stdint.h>
+
+enum {
+ // Do not collide with JUMPNRUN_ENEMY_* and JUMPNRUN_PLAYER_* flags.
+ JUMPNRUN_MOVEABLE_TOUCHING_GROUND = 1,
+ JUMPNRUN_MOVEABLE_MIRRORED = 2
+};
typedef struct jumpnrun_moveable {
typedef struct jumpnrun_moveable {
- rectangle
current_
box;
+ rectangle
hit
box;
vec2d inertia;
uint8_t tick_minor;
uint8_t anim_frame;
vec2d inertia;
uint8_t tick_minor;
uint8_t anim_frame;
- uint8_t anim_direction;
-
bool touching_ground
;
+
uint8_t flags
;
uint8_t jumpable_frames;
} jumpnrun_moveable;
uint8_t jumpable_frames;
} jumpnrun_moveable;
+static inline bool jumpnrun_moveable_touching_ground(jumpnrun_moveable const *self) { return self->flags & JUMPNRUN_MOVEABLE_TOUCHING_GROUND; }
+static inline bool jumpnrun_moveable_mirrored (jumpnrun_moveable const *self) { return self->flags & JUMPNRUN_MOVEABLE_MIRRORED ; }
+
#endif
#endif
This page took
0.023708 seconds
and
4
git commands to generate.