Import from neverball-1.4.0.tar.gz
[neverball-archive.git] / ball / game.h
blob3f6b4e120b79c633f59285d6e96857eee362123d
1 #ifndef GAME_H
2 #define GAME_H
4 #include <stdio.h>
6 /*---------------------------------------------------------------------------*/
8 #define AUD_MENU 1
9 #define AUD_START 2
10 #define AUD_READY 3
11 #define AUD_SET 4
12 #define AUD_GO 5
13 #define AUD_BALL 6
14 #define AUD_BUMP 7
15 #define AUD_COIN 8
16 #define AUD_TICK 9
17 #define AUD_TOCK 10
18 #define AUD_SWITCH 11
19 #define AUD_JUMP 12
20 #define AUD_GOAL 13
21 #define AUD_SCORE 14
22 #define AUD_FALL 15
23 #define AUD_TIME 16
24 #define AUD_OVER 17
25 #define AUD_COUNT 18
27 /*---------------------------------------------------------------------------*/
29 #define MAX_DT 0.01666666 /* Maximum physics update cycle */
30 #define MAX_DN 16 /* Maximum subdivisions of dt */
31 #define RESPONSE 0.05f /* Input smoothing time */
33 #define GAME_NONE 0
34 #define GAME_TIME 1
35 #define GAME_GOAL 2
36 #define GAME_FALL 3
38 /*---------------------------------------------------------------------------*/
40 int game_init(const char *, const char *, const char *, int, int);
41 void game_free(void);
43 int curr_clock(void);
44 char *curr_intro(void);
46 void game_draw(int, float);
47 int game_step(const float[3], float, int);
49 void game_set_pos(int, int);
50 void game_set_x (int);
51 void game_set_z (int);
52 void game_set_rot(float);
53 void game_set_fly(float);
55 void game_look(float, float);
57 void game_kill_fade(void);
58 void game_step_fade(float);
59 void game_fade(float);
61 int put_game_state(FILE *);
62 int get_game_state(FILE *);
64 /*---------------------------------------------------------------------------*/
66 #endif