X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsupertux.cpp;h=23a3fcf214eaa89a8b21e8576a2216f09e8b7e68;hb=5a542dea3c6043703683b68fcaa774f6cb0d9127;hp=c29d7f3b7ca9c122832469720245ddf21c964c33;hpb=28a78871d5b6d03c5267b9ef98c7082af5e41a29;p=supertux.git diff --git a/src/supertux.cpp b/src/supertux.cpp index c29d7f3b7..23a3fcf21 100644 --- a/src/supertux.cpp +++ b/src/supertux.cpp @@ -17,11 +17,13 @@ // 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 #include #include +#include #include "utils/exceptions.h" #include "defines.h" @@ -47,18 +49,13 @@ int main(int argc, char * argv[]) try { #endif config = new MyConfig; - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - bind_textdomain_codeset(PACKAGE, "ISO-8859-1"); + + Setup::init(PACKAGE_NAME, PACKAGE_NAME, PACKAGE_VERSION); - Setup::info(PACKAGE_NAME,PACKAGE,PACKAGE_VERSION); - - Setup::directories(); Setup::parseargs(argc, argv); Setup::audio(); - Setup::video(SCREEN_W,SCREEN_H); + Setup::video(800, 600); Setup::joystick(); Setup::general(); st_menu(); @@ -95,25 +92,18 @@ int main(int argc, char * argv[]) title(); } - SDL_FillRect(screen, 0, 0); - //SDL_Flip(screen); - unloadshared(); Setup::general_free(); st_menu_free(); TileManager::destroy_instance(); - #ifdef DEBUG +#ifdef DEBUG Surface::debug_check(); - #endif +#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