c86ad5dc49b73cc02ad78534f06da581712185e3
[supertux.git] / src / defines.h
1 //  $Id$
2 // 
3 //  SuperTux
4 //  Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
5 //  Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
6 //
7 //  This program is free software; you can redistribute it and/or
8 //  modify it under the terms of the GNU General Public License
9 //  as published by the Free Software Foundation; either version 2
10 //  of the License, or (at your option) any later version.
11 //
12 //  This program is distributed in the hope that it will be useful,
13 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 //  GNU General Public License for more details.
16 // 
17 //  You should have received a copy of the GNU General Public License
18 //  along with this program; if not, write to the Free Software
19 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 //  02111-1307, USA.
21
22 #if !defined( SUPERTUX_DEFINES_H )
23
24 #define SUPERTUX_DEFINES_H
25 /* Version: */
26
27 #ifndef VERSION
28         #define VERSION "0.0.5-0.0.6-CVS"
29 #endif
30
31 /* Frames per second: */
32
33 #define FPS (1000 / 25)
34
35
36 /* Joystick buttons and axes: */
37
38 #define JOY_A 0
39 #define JOY_B 1
40 #define JOY_START 9
41
42 #define JOY_X 0
43 #define JOY_Y 1
44
45 /* Direction (keyboard/joystick) states: */
46
47 #define UP 0
48 #define DOWN 1
49
50 /* Dying types: */
51
52 /* ---- NO 0 */
53 enum DyingType {
54   DYING_NOT = 0,
55   DYING_SQUISHED = 1,
56   DYING_FALLING = 2
57 };
58
59 /* Hurt modes: */
60
61 #define KILL 0
62 #define SHRINK 1
63
64 /* Directions: */
65
66 #define LEFT 0
67 #define RIGHT 1
68
69 /* Sizes: */
70
71 #define SMALL 0
72 #define BIG 1
73
74 /* Speed constraints: */
75
76 #define MAX_WALK_XM 2.3
77 #define MAX_RUN_XM 3.2
78 #define MAX_YM 20.0
79 #define MAX_JUMP_TIME 375
80 #define MAX_LIVES 99
81
82 #define WALK_SPEED 1.0
83 #define RUN_SPEED 1.5
84 #define JUMP_SPEED 1.2
85
86 #define GRAVITY 1.0
87 #define YM_FOR_JUMP 6.0
88 #define WALK_ACCELERATION_X 0.02
89 #define RUN_ACCELERATION_X 0.03
90 #define KILL_BOUNCE_YM 8.0
91
92 #define SKID_XM 2.0
93 #define SKID_TIME 200
94
95 /* Size constraints: */
96
97 #define OFFSCREEN_DISTANCE 256
98
99 #define LEVEL_WIDTH 375
100
101
102 /* Debugging */
103
104 #ifdef DEBUG
105         #define DEBUG_MSG( msg ) { \
106         printf( msg ); printf("\n"); \
107         }
108         #else
109        #define DEBUG_MSG( msg ) {}
110 #endif
111
112 #endif
113