X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsupertux.cpp;h=088222ff26b03ccccd37bdcaf0776e25ec4abfe0;hb=2dcdb5c4759e73d6961770fed7250a939be3063f;hp=01f15f8202f9ce49d36b32f366bfdbac6d4ab61f;hpb=6d682d915eb92b08f2a92906a07d77f0749f0b6c;p=supertux.git diff --git a/src/supertux.cpp b/src/supertux.cpp index 01f15f820..088222ff2 100644 --- a/src/supertux.cpp +++ b/src/supertux.cpp @@ -17,6 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. +#include #include #include @@ -24,7 +25,7 @@ #include #include "utils/exceptions.h" -#include "app/defines.h" +#include "defines.h" #include "app/globals.h" #include "app/setup.h" #include "intro.h" @@ -48,19 +49,19 @@ int main(int argc, char * argv[]) #endif config = new MyConfig; setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - bind_textdomain_codeset(PACKAGE, "ISO-8859-1"); + (void) bindtextdomain(PACKAGE, LOCALEDIR); + (void) textdomain(PACKAGE); + (void) bind_textdomain_codeset(PACKAGE, "ISO-8859-1"); - st_info_setup(PACKAGE_NAME,PACKAGE,PACKAGE_VERSION); + Setup::info(PACKAGE_NAME, PACKAGE, PACKAGE_VERSION); - st_directory_setup(); - parseargs(argc, argv); + Setup::directories(); + Setup::parseargs(argc, argv); - st_audio_setup(); - st_video_setup(SCREEN_W,SCREEN_H); - st_joystick_setup(); - st_general_setup(); + Setup::audio(); + Setup::video(800, 600); + Setup::joystick(); + Setup::general(); st_menu(); loadshared(); @@ -95,25 +96,18 @@ int main(int argc, char * argv[]) title(); } - SDL_FillRect(screen, 0, 0); - //SDL_Flip(screen); - unloadshared(); - st_general_free(); + Setup::general_free(); st_menu_free(); TileManager::destroy_instance(); - #ifdef DEBUG +#ifdef DEBUG Surface::debug_check(); - #endif - st_shutdown(); +#endif + Termination::shutdown(); #ifndef DEBUG // we want to see the backtrace in gdb when in debug mode - } - catch (SuperTuxException &e) - { + } catch (SuperTuxException &e) { std::cerr << "Unhandled SuperTux exception:\n " << e.what_file() << ":" << e.what_line() << ": " << e.what() << std::endl; - } - catch (std::exception &e) - { + } catch (std::exception &e) { std:: cerr << "Unhandled exception: " << e.what() << std::endl; } #endif