Nilorea Library
C utilities for networking, threading, graphics
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{
15#endif
21#include "n_common.h"
22#include "n_log.h"
23#include "n_time.h"
24
26#define CPU_USE_FULL -1
28#define CPU_USE_NICE 0
30#define CPU_USE_LESS 10
31
33typedef struct GAME_ENV
34{
36 int score,
81
84
85} GAME_ENV ;
86
87/* initialize a new game environnement */
88int init_game_env( GAME_ENV **game );
89
90void destroy_game_env( GAME_ENV **game );
91
92/* load a config from file */
93GAME_ENV *load_game_config( char *config_name );
94
99#ifdef __cplusplus
100}
101#endif
102
103#endif /* #ifndef __N_GAMES__ */
int lifes
Remainging lives.
Definition: n_games.h:38
int nb_min_particles
time before a new logic update is done
Definition: n_games.h:56
int x
position x
Definition: n_games.h:68
N_TIME game_timer
TIMER.
Definition: n_games.h:83
int GFX_UPDATE_RATE
time between two graphic frames 20000 default
Definition: n_games.h:60
int BLUR
wanna blur effect ? ( 0 or 1 )
Definition: n_games.h:40
int CPU_MODE
status of the cpu mode , CPU_USE_FULL by default
Definition: n_games.h:48
int left_attack_pos
left attack trigger
Definition: n_games.h:78
int DONE
loop while DONE != 1
Definition: n_games.h:44
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:58
int loop_time
time between each loop
Definition: n_games.h:50
int right_attack
left attack trigger
Definition: n_games.h:76
int LOGIC_RATE
time between two logic frames 20000 default
Definition: n_games.h:62
int level
Level number.
Definition: n_games.h:66
int left_attack
left attack trigger
Definition: n_games.h:74
int logic_time
time before a new logic update is done
Definition: n_games.h:54
int score
Store score value.
Definition: n_games.h:36
int z
position z
Definition: n_games.h:72
int draw_time
time before updating graphics in usec
Definition: n_games.h:52
int GFX_CONFIG_MODE
GFX_OPENGL_WINDOWED.
Definition: n_games.h:46
int fade_value
alpha value of black blit ( 20 default )
Definition: n_games.h:42
int real_framerate
Measured framerate.
Definition: n_games.h:64
int right_attack_pos
left attack trigger
Definition: n_games.h:80
int y
position y
Definition: n_games.h:70
void destroy_game_env(GAME_ENV **game)
Definition: n_games.c:58
GAME_ENV * load_game_config(char *config_name)
load a config from file
Definition: n_games.c:75
int init_game_env(GAME_ENV **game)
Definition: n_games.c:15
Game Environment structure.
Definition: n_games.h:34
Timing Structure.
Definition: n_time.h:34
Common headers and low-level hugly functions & define.
Generic log system.
Timing utilities.