Added my own flapping. :)
[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 #ifndef SUPERTUX_DEFINES_H
23 #define SUPERTUX_DEFINES_H 1
24
25 #include <config.h>
26
27 /* Version: */
28
29 #ifndef VERSION
30         #define VERSION "0.1.1"
31 #endif
32
33 enum Direction { LEFT = 0, RIGHT = 1 };
34
35 /* Direction (keyboard/joystick) states: */
36
37 #define UP 0
38 #define DOWN 1
39
40 /* Dying types: */
41
42 /* ---- NO 0 */
43 enum DyingType {
44   DYING_NOT = 0,
45   DYING_SQUISHED = 1,
46   DYING_FALLING = 2
47 };
48
49 /* Screen-related stuff */
50 // +1 is needed because when tiles are wrapping around the screen there
51 //  are two partial tiles on the screen
52 #define VISIBLE_TILES_X (25 +1)
53 #define VISIBLE_TILES_Y (19 +1)
54
55 /* Speed constraints: */
56
57 #define MAX_WALK_XM 2.3
58 #define MAX_RUN_XM 3.2
59 #define MAX_YM 20.0
60 #define MAX_JUMP_TIME 375
61 #define MAX_LIVES 99
62
63 #define WALK_SPEED 1.0
64 #define RUN_SPEED 1.5
65 #define JUMP_SPEED 1.2
66
67 /* gameplay related defines */
68
69 #define START_LIVES 4
70
71 #define MAX_FIRE_BULLETS 2
72 #define MAX_ICE_BULLETS  1
73 #define FROZEN_TIME 3000
74
75 #define YM_FOR_JUMP 6.0
76 #define WALK_ACCELERATION_X 0.03
77 #define RUN_ACCELERATION_X 0.04
78 #define KILL_BOUNCE_YM 8.0
79
80 #define SKID_XM 2.0
81 #define SKID_TIME 200
82
83 /* Size constraints: */
84
85 #define X_OFFSCREEN_DISTANCE (screen->w/2)
86 #define Y_OFFSCREEN_DISTANCE (screen->h/2)
87
88 /* Debugging */
89
90 #ifdef DEBUG
91         #define DEBUG_MSG( msg ) { \
92         printf( msg ); printf("\n"); \
93         }
94         #else
95        #define DEBUG_MSG( msg ) {}
96 #endif
97
98 #define UNUSED_ARG(a) do {/* null */} while (&a == 0)
99
100 #endif /*SUPERTUX_DEFINES_H*/
101