- moved lots of code around, made gameloop even more into a class
[supertux.git] / src / defines.h
1 /*
2   defines.h
3   
4   Super Tux
5   
6   by Bill Kendrick & Tobias Glaesser <tobi.web@gmx.de>
7   bill@newbreedsoftware.com
8   http://www.newbreedsoftware.com/supertux/
9  
10   April 11, 2000 - March 15, 2004
11 */
12
13
14 #if !defined( SUPERTUX_DEFINES_H )
15
16 #define SUPERTUX_DEFINES_H
17 /* Version: */
18
19 #ifndef VERSION
20         #define VERSION "0.0.5-0.0.6-CVS"
21 #endif
22
23 /* Frames per second: */
24
25 #define FPS (1000 / 25)
26
27
28 /* Joystick buttons and axes: */
29
30 #define JOY_A 0
31 #define JOY_B 1
32
33 #define JOY_X 0
34 #define JOY_Y 1
35
36 /* Direction (keyboard/joystick) states: */
37
38 #define UP 0
39 #define DOWN 1
40
41 /* Dying types: */
42
43 /* ---- NO 0 */
44 enum DyingType {
45   DYING_NOT = 0,
46   DYING_SQUISHED = 1,
47   DYING_FALLING = 2
48 };
49
50 /* Hurt modes: */
51
52 #define KILL 0
53 #define SHRINK 1
54
55 /* Directions: */
56
57 #define LEFT 0
58 #define RIGHT 1
59
60 /* Sizes: */
61
62 #define SMALL 0
63 #define BIG 1
64
65 /* Speed constraints: */
66
67 #define MAX_WALK_XM 2.3
68 #define MAX_RUN_XM 3.2
69 #define MAX_YM 20.0
70 #define MAX_JUMP_TIME 375
71 #define MAX_LIVES 4.0
72
73 #define WALK_SPEED 1.0
74 #define RUN_SPEED 1.5
75 #define JUMP_SPEED 1.2
76
77 #define GRAVITY 1.0
78 #define YM_FOR_JUMP 6.0
79 #define KILL_BOUNCE_YM 8.0
80
81 #define SKID_XM 2.0
82 #define SKID_TIME 200
83
84 /* Size constraints: */
85
86 #define OFFSCREEN_DISTANCE 256
87
88 #define LEVEL_WIDTH 375
89
90
91 /* Debugging */
92
93 #ifdef DEBUG
94         #define DEBUG_MSG( msg ) { \
95         printf( msg ); printf("\n"); \
96         }
97         #else
98        #define DEBUG_MSG( msg ) {}
99 #endif
100
101 #endif
102