Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups
n_games.h
Go to the documentation of this file.
1
9 #ifndef __N_GAMES__
10 #define __N_GAMES__
11
12 #ifdef __cplusplus
13 extern "C"
14 {
15 #endif
16
22 #include "n_common.h"
23 #include "n_log.h"
24
25 #ifndef GFX_DIRECTX
26 #define GFX_DIRECTX GFX_AUTODETECT
27 #endif
28 #ifndef GFX_DIRECTX_WIN
29 #define GFX_DIRECTX_WIN GFX_AUTODETECT_WINDOWED
30 #endif
31
33 #define CPU_USE_FULL -1
34
35 #define CPU_USE_NICE 0
36
37 #define CPU_USE_LESS 10
38
40 typedef struct GAME_ENV
41 {
43 int score,
45 lifes,
47 BLUR ,
49 fade_value ,
51 DONE ,
53 GFX_CONFIG_MODE ,
55 CPU_MODE ,
57 loop_time ,
59 draw_time ,
61 logic_time,
63 nb_min_particles ,
65 wait_for_slowing_down_cpu ,
67 GFX_UPDATE_RATE ,
69 LOGIC_RATE ,
71 real_framerate ,
73 level ,
75 x ,
77 y ,
79 z ,
81 left_attack ,
83 right_attack ,
85 left_attack_pos ,
87 right_attack_pos ;
88
90 BITMAP *scrbuf ;
92 N_TIME game_timer;
93
94 } GAME_ENV ;
95
96 /* initialize a new game environnement */
97 int init_game_env( GAME_ENV **game );
98
99 void destroy_game_env( GAME_ENV **game );
100
101 /* load a config from file */
102 GAME_ENV *load_game_config( char *config_name );
103
106 #ifdef __cplusplus
107 }
108 #endif
109
110 #endif /* #ifndef __N_GAMES__ */