X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fgameconfig.hpp;h=3b7dd06da90a80d057b00de4b53107fcc36d1019;hb=146cb5cf3c1ea9bd8f884e3c99a7789c42d598f1;hp=0fd89e6d17be007d83c1ecbd6da5a34810c50258;hpb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;p=supertux.git diff --git a/src/supertux/gameconfig.hpp b/src/supertux/gameconfig.hpp index 0fd89e6d1..3b7dd06da 100644 --- a/src/supertux/gameconfig.hpp +++ b/src/supertux/gameconfig.hpp @@ -17,7 +17,10 @@ #ifndef HEADER_SUPERTUX_SUPERTUX_GAMECONFIG_HPP #define HEADER_SUPERTUX_SUPERTUX_GAMECONFIG_HPP -#include "video/video_systems.hpp" +#include "control/joystick_config.hpp" +#include "control/keyboard_config.hpp" +#include "math/size.hpp" +#include "video/video_system.hpp" class Config { @@ -30,29 +33,30 @@ public: int profile; - // the width/height to be used to display the game in fullscreen - int fullscreen_width; - int fullscreen_height; + /** the width/height to be used to display the game in fullscreen */ + Size fullscreen_size; - // the width/height of the window managers window - int window_width; - int window_height; + /** refresh rate for use in fullscreen, 0 for auto */ + int fullscreen_refresh_rate; + + /** the width/height of the window managers window */ + Size window_size; + + /** the aspect ratio */ + Size aspect_size; - // the aspect ratio - int aspect_width; - int aspect_height; - float magnification; bool use_fullscreen; - VideoSystem video; + VideoSystem::Enum video; bool try_vsync; bool show_fps; bool sound_enabled; bool music_enabled; bool console_enabled; - int random_seed; // initial random seed. 0 ==> set from time() + /** initial random seed. 0 ==> set from time() */ + int random_seed; /** this variable is set if supertux should start in a specific level */ std::string start_level; @@ -60,10 +64,23 @@ public: std::string start_demo; std::string record_demo; - 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. */ -}; + /** 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. */ + std::string locale; -extern Config* g_config; + KeyboardConfig keyboard_config; + JoystickConfig joystick_config; + + struct Addon + { + std::string id; + bool enabled; + }; + std::vector addons; + + bool developer_mode; +}; #endif