X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fmain.hpp;h=fc9014448b64b90c8b0b12dc8c7e4ae7c405507b;hb=6469bdeda8d2e7ccae79f2682ef4efc441601c4b;hp=4bfe7e6de66f493ddf684088294620cf11088c2d;hpb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;p=supertux.git diff --git a/src/supertux/main.hpp b/src/supertux/main.hpp index 4bfe7e6de..fc9014448 100644 --- a/src/supertux/main.hpp +++ b/src/supertux/main.hpp @@ -17,24 +17,25 @@ #ifndef HEADER_SUPERTUX_SUPERTUX_MAIN_HPP #define HEADER_SUPERTUX_SUPERTUX_MAIN_HPP -void init_video(); -void wait_for_event(float min_delay, float max_delay); - -/** The width of the display (this is a logical value, not the - physical value, since aspect_ration and projection_area might - shrink or scale things) */ -extern int SCREEN_WIDTH; - -/** The width of the display (this is a logical value, not the - physical value, since aspect_ration and projection_area might - shrink or scale things) */ -extern int SCREEN_HEIGHT; - -// global variables -class JoystickKeyboardController; -extern JoystickKeyboardController* g_main_controller; - -int supertux_main(int argc, char** argv); +class Main +{ +private: + bool parse_commandline(int argc, char** argv); + bool pre_parse_commandline(int argc, char** argv); + void init_audio(); + void init_config(); + void init_physfs(const char* argv0); + void init_rand(); + void init_sdl(); + void init_tinygettext(); + void init_video(); + void print_usage(const char* argv0); + void quit_audio(); + void wait_for_event(float min_delay, float max_delay); + +public: + int main(int argc, char** argv); +}; #endif