Checkpoints.
[hackover2013-badge-firmware.git] / badge / jumpnrun / jumpnrun.h
index fc386c7..c6613f5 100644 (file)
@@ -25,12 +25,14 @@ enum {
 };
 
 typedef struct jumpnrun_shot {
+  rectangle old_box;
   rectangle current_box;
   vec2d     inertia;
   uint8_t   tick;
 } jumpnrun_shot;
 
 static inline bool jumpnrun_shot_spawned(jumpnrun_shot const *shot) { return fixed_point_ne(shot->inertia.x, FIXED_INT(0)); }
+static inline void jumpnrun_shot_despawn(jumpnrun_shot       *shot) { shot->inertia.x = FIXED_INT(0); }
 
 enum {
   JUMPNRUN_MAX_SHOTS = 2
@@ -41,12 +43,12 @@ typedef struct jumpnrun_game_state {
 
   uint8_t status;
   int     left;
+  uint8_t lives;
 
   jumpnrun_shot shots[JUMPNRUN_MAX_SHOTS];
 } jumpnrun_game_state;
 
-rectangle hacker_rect_current(jumpnrun_game_state const *state);
-
+vec2d hacker_extents(void);
 void jumpnrun_passive_movement(vec2d *inertia);
 
 uint8_t jumpnrun_play(char const *lvname);
This page took 0.019547 seconds and 4 git commands to generate.