43#include <allegro5/allegro.h>
47#define CPU_USE_FULL -1
51#define CPU_USE_LESS 10
56#define GFX_FULLSCREEN 1
58#define GFX_FULLSCREEN_WINDOW 2
int lifes
Remaining lives.
int nb_min_particles
minimum number of particles
ALLEGRO_DISPLAY * display
Allegro5 display.
int GFX_UPDATE_RATE
time between two graphic frames 20000 default
ALLEGRO_TIMER * logic_timer
logic timer
int BLUR
wanna blur effect ? ( 0 or 1 )
ALLEGRO_TIMER * draw_timer
drawing timer
ALLEGRO_EVENT_QUEUE * event_queue
event queue
int CPU_MODE
status of the cpu mode , CPU_USE_FULL by default
int left_attack_pos
left attack position
ALLEGRO_BITMAP * scrbuf
screen buffer bitmap
int DONE
loop while DONE != 1
int wait_for_slowing_down_cpu
=0 for doing nothing, =1 if logic is done, = 2 if drawing is done too
int loop_time
time between each loop
int right_attack
right attack trigger
int LOGIC_RATE
time between two logic frames 20000 default
int left_attack
left attack trigger
int logic_time
time before a new logic update is done
int score
Store score value.
int draw_time
time before updating graphics in usec
int GFX_CONFIG_MODE
display mode: GFX_WINDOWED, GFX_FULLSCREEN, or GFX_FULLSCREEN_WINDOW
int fade_value
alpha value of black blit ( 20 default )
int real_framerate
Measured framerate.
int right_attack_pos
right attack position
void destroy_game_env(GAME_ENV **game)
destroy a game environment
GAME_ENV * load_game_config(char *config_name)
load a game config from file
int init_game_env(GAME_ENV **game)
initialize a new game environment
Game Environment structure.
Common headers and low-level functions & define.