2 // Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com>
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.
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.
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/>.
17 #ifndef HEADER_SUPERTUX_SUPERTUX_OPTIONS_HPP
18 #define HEADER_SUPERTUX_SUPERTUX_OPTIONS_HPP
20 #include <boost/optional.hpp>
22 #include "math/size.hpp"
23 #include "video/video_systems.hpp"
27 /** Command line argument parsing */
28 class CommandLineArguments
43 boost::optional<Size> fullscreen_size;
44 boost::optional<int> fullscreen_refresh_rate;
45 boost::optional<Size> window_size;
46 boost::optional<Size> aspect_size;
48 // boost::optional<float> magnification;
50 boost::optional<bool> use_fullscreen;
51 boost::optional<VideoSystem::Enum> video;
52 // boost::optional<bool> try_vsync;
53 boost::optional<bool> show_fps;
54 boost::optional<bool> sound_enabled;
55 boost::optional<bool> music_enabled;
56 boost::optional<bool> console_enabled;
58 // boost::optional<int> random_seed;
60 boost::optional<std::string> start_level;
61 boost::optional<bool> enable_script_debugger;
62 boost::optional<std::string> start_demo;
63 boost::optional<std::string> record_demo;
65 // boost::optional<std::string> locale;
68 CommandLineArguments();
69 ~CommandLineArguments();
71 Action get_action() const { return m_action; }
73 void parse_args(int argc, char** argv);
75 void print_help(const char* argv0);
79 void merge_into(Config& config);
82 CommandLineArguments(const CommandLineArguments&) = delete;
83 CommandLineArguments& operator=(const CommandLineArguments&) = delete;