![]() |
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 | |
| #define | CPU_USE_LESS 10 |
| wait more | |
| #define | CPU_USE_NICE 0 |
| let the other process have some times | |
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 | |
| struct GAME_ENV |
Collaboration diagram for 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 53 of file n_games.c.
References Free.
Referenced by load_game_config().
Here is the caller graph for this function:| 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().
Here is the caller graph for this function:| 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 66 of file n_games.c.
References CPU_MODE, CPU_USE_FULL, CPU_USE_LESS, CPU_USE_NICE, destroy_game_env(), GFX_CONFIG_MODE, GFX_UPDATE_RATE, init_game_env(), LOG_ERR, LOG_NOTICE, LOGIC_RATE, n_log, and nb_min_particles.
Here is the call graph for this function: