Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
n_games.h
Go to the documentation of this file.
1
9#ifndef __N_GAMES__
10#define __N_GAMES__
11
12#ifdef __cplusplus
13extern "C" {
14#endif
20#include "n_common.h"
21#include "n_log.h"
22#include "n_time.h"
23
25#define CPU_USE_FULL -1
27#define CPU_USE_NICE 0
29#define CPU_USE_LESS 10
30
84
85/* initialize a new game environnement */
86int init_game_env(GAME_ENV** game);
87
88void destroy_game_env(GAME_ENV** game);
89
90/* load a config from file */
91GAME_ENV* load_game_config(char* config_name);
92
97#ifdef __cplusplus
98}
99#endif
100
101#endif /* #ifndef __N_GAMES__ */
int lifes
Remainging lives.
Definition n_games.h:36
int nb_min_particles
time before a new logic update is done
Definition n_games.h:54
int x
position x
Definition n_games.h:66
N_TIME game_timer
TIMER.
Definition n_games.h:81
int GFX_UPDATE_RATE
time between two graphic frames 20000 default
Definition n_games.h:58
int BLUR
wanna blur effect ? ( 0 or 1 )
Definition n_games.h:38
int CPU_MODE
status of the cpu mode , CPU_USE_FULL by default
Definition n_games.h:46
int left_attack_pos
left attack trigger
Definition n_games.h:76
int DONE
loop while DONE != 1
Definition n_games.h:42
int wait_for_slowing_down_cpu
=0 for doing nothing, =1 if logic is done, = 2 if drawing is done too
Definition n_games.h:56
int loop_time
time between each loop
Definition n_games.h:48
int right_attack
left attack trigger
Definition n_games.h:74
int LOGIC_RATE
time between two logic frames 20000 default
Definition n_games.h:60
int level
Level number.
Definition n_games.h:64
int left_attack
left attack trigger
Definition n_games.h:72
int logic_time
time before a new logic update is done
Definition n_games.h:52
int score
Store score value.
Definition n_games.h:34
int z
position z
Definition n_games.h:70
int draw_time
time before updating graphics in usec
Definition n_games.h:50
int GFX_CONFIG_MODE
GFX_OPENGL_WINDOWED.
Definition n_games.h:44
int fade_value
alpha value of black blit ( 20 default )
Definition n_games.h:40
int real_framerate
Measured framerate.
Definition n_games.h:62
int right_attack_pos
left attack trigger
Definition n_games.h:78
int y
position y
Definition n_games.h:68
void destroy_game_env(GAME_ENV **game)
Definition n_games.c:53
GAME_ENV * load_game_config(char *config_name)
load a config from file
Definition n_games.c:66
int init_game_env(GAME_ENV **game)
Definition n_games.c:15
Game Environment structure.
Definition n_games.h:32
Timing Structure.
Definition n_time.h:32
Common headers and low-level functions & define.
Generic log system.
Timing utilities.