Nilorea Library
C utilities for networking, threading, graphics
|
Data Structures | |
struct | GAME_ENV |
Game Environment structure. More... | |
Macros | |
#define | CPU_USE_FULL -1 |
full use of CPU More... | |
#define | CPU_USE_LESS 10 |
wait more More... | |
#define | CPU_USE_NICE 0 |
let the other process have some times More... | |
Functions | |
void | destroy_game_env (GAME_ENV **game) |
int | init_game_env (GAME_ENV **game) |
GAME_ENV * | load_game_config (char *config_name) |
load a config from file More... | |
struct GAME_ENV |
Data Fields | ||
---|---|---|
int | BLUR | wanna blur effect ? ( 0 or 1 ) |
int | CPU_MODE | status of the cpu mode , CPU_USE_FULL by default |
int | DONE | loop while DONE != 1 |
int | draw_time | time before updating graphics in usec |
int | fade_value | alpha value of black blit ( 20 default ) |
N_TIME | game_timer | TIMER. |
int | GFX_CONFIG_MODE | GFX_OPENGL_WINDOWED. |
int | GFX_UPDATE_RATE | time between two graphic frames 20000 default |
int | left_attack | left attack trigger |
int | left_attack_pos | left attack trigger |
int | level | Level number. |
int | lifes | Remainging lives. |
int | LOGIC_RATE | time between two logic frames 20000 default |
int | logic_time | time before a new logic update is done |
int | loop_time | time between each loop |
int | nb_min_particles | time before a new logic update is done |
int | real_framerate | Measured framerate. |
int | right_attack | left attack trigger |
int | right_attack_pos | left attack trigger |
int | score | Store score value. |
int | wait_for_slowing_down_cpu | =0 for doing nothing, =1 if logic is done, = 2 if drawing is done too |
int | x | position x |
int | y | position y |
int | z | position z |
#define CPU_USE_NICE 0 |
void destroy_game_env | ( | GAME_ENV ** | game | ) |
game | a pointer a to a game structure to destroy |
Definition at line 58 of file n_games.c.
References Free.
Referenced by load_game_config().
int init_game_env | ( | GAME_ENV ** | game | ) |
game | a pointer to a game structure to allocate |
Definition at line 15 of file n_games.c.
References CPU_USE_FULL, LOG_ERR, Malloc, and n_log.
Referenced by load_game_config().
GAME_ENV * load_game_config | ( | char * | config_name | ) |
load a config from file
config_name | the name of the game file config |
Definition at line 75 of file n_games.c.
References CPU_USE_FULL, CPU_USE_LESS, CPU_USE_NICE, destroy_game_env(), init_game_env(), LOG_ERR, LOG_NOTICE, and n_log.