f6b9dfc8ae1f96b6fbff697b5d19a90729f5f9f4
[supertux.git] / src / supertux / globals.hpp
1 //  SuperTux
2 //  Copyright (C) 2009 Ingo Ruhnke <grumbel@gmx.de>
3 //
4 //  This program is free software: you can redistribute it and/or modify
5 //  it under the terms of the GNU General Public License as published by
6 //  the Free Software Foundation, either version 3 of the License, or
7 //  (at your option) any later version.
8 //
9 //  This program is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //  GNU General Public License for more details.
13 //
14 //  You should have received a copy of the GNU General Public License
15 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 #ifndef HEADER_SUPERTUX_SUPERTUX_GLOBALS_HPP
18 #define HEADER_SUPERTUX_SUPERTUX_GLOBALS_HPP
19
20 typedef struct SDL_Surface SDL_Surface;
21 namespace tinygettext { class DictionaryManager; }
22 class Config;
23 class JoystickKeyboardController;
24 class PlayerStatus;
25 class ScreenManager;
26 class SoundManager;
27 class SpriteManager;
28 class TextureManager;
29 class TileManager;
30 class TileSet;
31
32 /** The width of the display (this is a logical value, not the
33     physical value, since aspect_ration and projection_area might
34     shrink or scale things) */
35 extern int SCREEN_WIDTH;
36
37 /** The width of the display (this is a logical value, not the
38     physical value, since aspect_ration and projection_area might
39     shrink or scale things) */
40 extern int SCREEN_HEIGHT;
41
42 // global variables
43 extern JoystickKeyboardController* g_main_controller;
44
45 extern SDL_Surface* g_screen;
46
47 extern ScreenManager* g_screen_manager;
48
49 extern TextureManager* texture_manager;
50
51 extern SoundManager* sound_manager;
52
53 extern Config* g_config;
54
55 extern tinygettext::DictionaryManager* dictionary_manager;
56
57 extern float game_time;
58 extern float real_time;
59
60 extern TileManager *tile_manager;
61
62 /** this is only set while loading a map */
63 extern TileSet     *current_tileset;
64
65 // global player state
66 extern PlayerStatus* player_status;
67
68 extern SpriteManager* sprite_manager;
69
70 extern float g_game_speed;
71
72 #endif
73
74 /* EOF */