- Trampoline test level
[supertux.git] / src / globals.h
1 //  $Id$
2 // 
3 //  SuperTux
4 //  Copyright (C) 2004 Bill Kendrick <bill@newbreedsoftware.com>
5 //                     Tobias Glaesser <tobi.web@gmx.de>
6 //                     Ingo Ruhnke <grumbel@gmx.de>
7 //
8 //  This program is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU General Public License
10 //  as published by the Free Software Foundation; either version 2
11 //  of the License, or (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 //  GNU General Public License for more details.
17 // 
18 //  You should have received a copy of the GNU General Public License
19 //  along with this program; if not, write to the Free Software
20 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21
22 #ifndef SUPERTUX_GLOBALS_H
23 #define SUPERTUX_GLOBALS_H
24
25 #include <string>
26 #include <SDL.h>
27 #include "text.h"
28 #include "menu.h"
29 #include "mousecursor.h"
30
31 extern std::string datadir;
32
33 struct JoystickKeymap
34 {
35   int a_button;
36   int b_button;
37   int start_button;
38
39   int x_axis;
40   int y_axis;
41   
42   int dead_zone;
43
44   JoystickKeymap();
45 };
46
47 extern JoystickKeymap joystick_keymap;
48
49 extern SDL_Surface * screen;
50 extern Text* black_text;
51 extern Text* gold_text;
52 extern Text* silver_text;
53 extern Text* white_text;
54 extern Text* white_small_text;
55 extern Text* white_big_text;
56 extern Text* blue_text;
57 extern Text* red_text;
58 extern Text* green_text;
59 extern Text* yellow_nums;
60
61 extern MouseCursor * mouse_cursor;
62
63 extern bool use_gl;
64 extern bool use_joystick;
65 extern bool use_fullscreen;
66 extern bool debug_mode;
67 extern bool show_fps;
68
69 /** The number of the joystick that will be use in the game */
70 extern int joystick_num;
71 extern char* level_startup_file;
72 extern bool launch_leveleditor_mode;
73
74 /* SuperTux directory ($HOME/.supertux) and save directory($HOME/.supertux/save) */
75 extern char* st_dir;
76 extern char* st_save_dir;
77
78 extern float game_speed;
79 extern SDL_Joystick * js;
80
81 int wait_for_event(SDL_Event& event,unsigned int min_delay = 0, unsigned int max_delay = 0, bool empty_events = false);
82
83 #endif /* SUPERTUX_GLOBALS_H */