1 #ifndef INCLUDED_BADGE_JUMPNRUN_GAME_STATE_H
2 #define INCLUDED_BADGE_JUMPNRUN_GAME_STATE_H
7 #include "../ui/display.h"
10 JUMPNRUN_MAX_SHOTS
= 2,
12 JUMPNRUN_STATE_WON
= 1
15 typedef struct jumpnrun_game_state
{
16 jumpnrun_player player
;
19 jumpnrun_shot shots
[JUMPNRUN_MAX_SHOTS
];
20 } jumpnrun_game_state
;
22 static inline int jumpnrun_screen_left (jumpnrun_game_state
const *state
) { return state
->screen_left
; }
23 static inline int jumpnrun_screen_right(jumpnrun_game_state
const *state
) { return jumpnrun_screen_left(state
) + BADGE_DISPLAY_WIDTH
; }
25 void jumpnrun_game_state_init (jumpnrun_game_state
*state
, jumpnrun_level
const *lv
);
26 void jumpnrun_game_state_respawn(jumpnrun_game_state
*state
, jumpnrun_level
const *lv
);
28 void jumpnrun_shot_spawn(jumpnrun_shot
*shot
, jumpnrun_game_state
const *state
);
This page took 0.054208 seconds and 5 git commands to generate.