X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/ac05cee74d9922fdca433dd2c03fd8542002bb28..b5399af0de27ae8d038453d5f20aba2b39a34d14:/badge/jumpnrun/game_state.c?ds=sidebyside diff --git a/badge/jumpnrun/game_state.c b/badge/jumpnrun/game_state.c index 1fa1485..21bd809 100644 --- a/badge/jumpnrun/game_state.c +++ b/badge/jumpnrun/game_state.c @@ -2,13 +2,14 @@ void jumpnrun_game_state_init(jumpnrun_game_state *state, jumpnrun_level const *lv) { memset(state, 0, sizeof(*state)); - jumpnrun_player_spawn(&state->player, lv->start_pos, 99); + jumpnrun_player_spawn(&state->player, lv->start_pos, lv->start_lives); } void jumpnrun_game_state_respawn(jumpnrun_game_state *state, jumpnrun_level const *lv) { jumpnrun_player_respawn(&state->player, lv->start_pos); state->flags = 0; state->screen_left = 0; + state->tick = 0; memset(state->shots, 0, sizeof(state->shots)); for(size_t i = 0; i < lv->header.enemy_count; ++i) {