Rename game_comp_grav to game_tilt_grav
[neverball] / ball / game_common.h
1 #ifndef GAME_COMMON_H
2 #define GAME_COMMON_H
3
4 #include "lang.h"
5
6 /*---------------------------------------------------------------------------*/
7
8 #define AUD_MENU    "snd/menu.ogg"
9 #define AUD_START _("snd/select.ogg")
10 #define AUD_READY _("snd/ready.ogg")
11 #define AUD_SET   _("snd/set.ogg")
12 #define AUD_GO    _("snd/go.ogg")
13 #define AUD_BALL    "snd/ball.ogg"
14 #define AUD_BUMPS   "snd/bumplil.ogg"
15 #define AUD_BUMPM   "snd/bump.ogg"
16 #define AUD_BUMPL   "snd/bumpbig.ogg"
17 #define AUD_COIN    "snd/coin.ogg"
18 #define AUD_TICK    "snd/tick.ogg"
19 #define AUD_TOCK    "snd/tock.ogg"
20 #define AUD_SWITCH  "snd/switch.ogg"
21 #define AUD_JUMP    "snd/jump.ogg"
22 #define AUD_GOAL    "snd/goal.ogg"
23 #define AUD_SCORE _("snd/record.ogg")
24 #define AUD_FALL  _("snd/fall.ogg")
25 #define AUD_TIME  _("snd/time.ogg")
26 #define AUD_OVER  _("snd/over.ogg")
27 #define AUD_GROW    "snd/grow.ogg"
28 #define AUD_SHRINK  "snd/shrink.ogg"
29
30 /*---------------------------------------------------------------------------*/
31
32 #define GAME_NONE 0
33 #define GAME_TIME 1
34 #define GAME_GOAL 2
35 #define GAME_FALL 3
36
37 const char *status_to_str(int);
38
39 /*---------------------------------------------------------------------------*/
40
41 enum
42 {
43     VIEW_NONE = -1,
44
45     VIEW_CHASE,
46     VIEW_LAZY,
47     VIEW_MANUAL,
48     VIEW_TOPDOWN,
49
50     VIEW_MAX
51 };
52
53 const char *view_to_str(int);
54
55 /*---------------------------------------------------------------------------*/
56
57 struct game_tilt
58 {
59     float x[3], rx;
60     float z[3], rz;
61 };
62
63 void game_tilt_init(struct game_tilt *);
64 void game_tilt_axes(struct game_tilt *, float view_e[3][3]);
65 void game_tilt_grav(float h[3], const float g[3], const struct game_tilt *);
66
67 /*---------------------------------------------------------------------------*/
68
69 #endif