b218e33da8655ee536aa0308fa5869bd681d5b5a
[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 #define JOY_START 9
33
34 #define JOY_X 0
35 #define JOY_Y 1
36
37 /* Direction (keyboard/joystick) states: */
38
39 #define UP 0
40 #define DOWN 1
41
42 /* Dying types: */
43
44 /* ---- NO 0 */
45 enum DyingType {
46   DYING_NOT = 0,
47   DYING_SQUISHED = 1,
48   DYING_FALLING = 2
49 };
50
51 /* Hurt modes: */
52
53 #define KILL 0
54 #define SHRINK 1
55
56 /* Directions: */
57
58 #define LEFT 0
59 #define RIGHT 1
60
61 /* Sizes: */
62
63 #define SMALL 0
64 #define BIG 1
65
66 /* Speed constraints: */
67
68 #define MAX_WALK_XM 2.3
69 #define MAX_RUN_XM 3.2
70 #define MAX_YM 20.0
71 #define MAX_JUMP_TIME 375
72 #define MAX_LIVES 99
73
74 #define WALK_SPEED 1.0
75 #define RUN_SPEED 1.5
76 #define JUMP_SPEED 1.2
77
78 #define GRAVITY 1.0
79 #define YM_FOR_JUMP 6.0
80 #define WALK_ACCELERATION_X 0.02
81 #define RUN_ACCELERATION_X 0.03
82 #define KILL_BOUNCE_YM 8.0
83
84 #define SKID_XM 2.0
85 #define SKID_TIME 200
86
87 /* Size constraints: */
88
89 #define OFFSCREEN_DISTANCE 256
90
91 #define LEVEL_WIDTH 375
92
93
94 /* Debugging */
95
96 #ifdef DEBUG
97         #define DEBUG_MSG( msg ) { \
98         printf( msg ); printf("\n"); \
99         }
100         #else
101        #define DEBUG_MSG( msg ) {}
102 #endif
103
104 #endif
105