7 typedef unsigned char bool;
26 unsigned char responsible
; /* responsible for the next fault (if any) */
43 #define GROUND_PHASE 0.4
46 #define BALL_JUMP_MIN 4
47 #define BALL_JUMP_MAX 10
48 #define BALL_DEFAULT_SPEED 3.0
50 #define GAME_X_MIN 41.0*2
51 #define GAME_X_MAX 270.0*2
52 #define GAME_X_MID ((GAME_X_MIN+GAME_X_MAX)/2)
54 #define GAME_Y_MIN 20.0*2+75
55 #define GAME_Y_MAX 150.0*2+75
56 #define GAME_Y_MID ((GAME_Y_MIN+GAME_Y_MAX)/2)
58 #define PLAYER_Y_MIN 0.0
59 #define PLAYER_Y_MAX 1.0*HEIGHT
61 #define IS_OUT_Y(y) (y<GAME_Y_MIN || y>GAME_Y_MAX)
62 #define IS_OUT_X(x) (x<GAME_X_MIN || x>GAME_X_MAX)
64 #define PLAYER_AREA 10.0*2
65 #define IS_NEAR_Y(py,by) (fabsf(py+(PLAYER_AREA/2)-by)<PLAYER_AREA)
67 #define PLAYER_STATE_MAX 10
68 #define PLAYER_POWERSHOT 8.2
71 void render( GameState
*);
72 bool step( GameState
*);
73 void limit_value( float*, float, float);
74 float get_phase( GameState
*);
75 float get_move_y( GameState
*, unsigned char);