Merged changes from branches/supertux-milestone2-grumbel/ to trunk/supertux/
[supertux.git] / src / supertux / gameconfig.hpp
1 //  SuperTux=
2 //  Copyright (C) 2006 Matthias Braun <matze@braunis.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_GAMECONFIG_HPP
18 #define HEADER_SUPERTUX_SUPERTUX_GAMECONFIG_HPP
19
20 #include "video/video_systems.hpp"
21
22 class Config
23 {
24 public:
25   Config();
26   ~Config();
27
28   void load();
29   void save();
30
31   int profile;
32
33   // the width/height to be used to display the game in fullscreen
34   int fullscreen_width;
35   int fullscreen_height;
36
37   // the width/height of the window managers window 
38   int window_width;
39   int window_height;
40
41   // the aspect ratio
42   int aspect_width;
43   int aspect_height;
44   
45   float magnification;
46
47   bool use_fullscreen;
48   VideoSystem video;
49   bool try_vsync;
50   bool show_fps;
51   bool sound_enabled;
52   bool music_enabled;
53   bool console_enabled;
54
55   int random_seed;            // initial random seed.  0 ==> set from time()
56
57   /** this variable is set if supertux should start in a specific level */
58   std::string start_level;
59   bool enable_script_debugger;
60   std::string start_demo;
61   std::string record_demo;
62
63   std::string locale; /**< force SuperTux language to this locale, e.g. "de". A file "data/locale/xx.po" must exist for this to work. An empty string means autodetect. */
64 };
65
66 extern Config* g_config;
67
68 #endif
69
70 /* EOF */