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) {