X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/8a947d16e5132fd133d67c76468c6323881de221..5df5b3536a7e824c1340a07f3c26a7c61e78b68b:/badge/jumpnrun/jumpnrun.h?ds=sidebyside diff --git a/badge/jumpnrun/jumpnrun.h b/badge/jumpnrun/jumpnrun.h index 0d0dfd1..2437c36 100644 --- a/badge/jumpnrun/jumpnrun.h +++ b/badge/jumpnrun/jumpnrun.h @@ -6,9 +6,8 @@ #include "levels.h" #include "tiles.h" -#include -#include -#include +#include "../ui/sprite.h" +#include "../util/util.h" #include #include @@ -26,18 +25,11 @@ enum { }; typedef struct jumpnrun_game_state { - vec2d current_pos; - vec2d inertia; - uint8_t status; - - uint8_t tick_minor; - uint8_t anim_frame; - uint8_t anim_direction; + jumpnrun_moveable player; + uint8_t status; int left; - - bool touching_ground; - uint8_t jumpable_frames; + uint8_t anim_direction; size_t spawned_enemies_counter; size_t spawned_enemies[JUMPNRUN_MAX_SPAWNED_ENEMIES]; @@ -45,7 +37,6 @@ typedef struct jumpnrun_game_state { rectangle hacker_rect_current(jumpnrun_game_state const *state); - void jumpnrun_passive_movement(vec2d *inertia); uint8_t jumpnrun_play(char const *lvname);