X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/1f08d48f93c1575e16ba2c11f60a014ad72a499c..99ea957edc68bf087e037cd6678828ce479cccc1:/badge/jumpnrun/jumpnrun.h?ds=inline diff --git a/badge/jumpnrun/jumpnrun.h b/badge/jumpnrun/jumpnrun.h index 598e8da..7890889 100644 --- a/badge/jumpnrun/jumpnrun.h +++ b/badge/jumpnrun/jumpnrun.h @@ -4,19 +4,19 @@ #include "enemies.h" #include "items.h" #include "levels.h" +#include "shots.h" #include "tiles.h" -#include "../util/fixed_point.h" -#include "../util/rectangle.h" #include "../ui/sprite.h" +#include "../util/util.h" #include #include enum { JUMPNRUN_PLAYING, - JUMPNRUN_DEAD, JUMPNRUN_WON, + JUMPNRUN_LOST, JUMPNRUN_ERROR }; @@ -25,29 +25,12 @@ enum { JUMPNRUN_MAX_SPAWNED_ENEMIES = 10 }; -typedef struct jumpnrun_game_state { - vec2d current_pos; - vec2d inertia; - vec2d inertia_mod; - uint8_t status; - - uint8_t tick_minor; - uint8_t anim_frame; - uint8_t anim_direction; - - int left; - - bool touching_ground; - uint8_t jumpable_frames; - - size_t spawned_enemies_counter; - size_t spawned_enemies[JUMPNRUN_MAX_SPAWNED_ENEMIES]; -} jumpnrun_game_state; - -rectangle hacker_rect_current(jumpnrun_game_state const *state); - +vec2d jumpnrun_player_extents(void); +void jumpnrun_apply_gravity(vec2d *inertia); void jumpnrun_passive_movement(vec2d *inertia); +badge_sprite const *jumpnrun_hacker_symbol(void); -uint8_t jumpnrun_play(char const *lvname); +uint8_t jumpnrun_play_level(char const *lvname); +void jumpnrun_play(void); #endif