X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsupertux.cpp;h=46efc59ee861084bb1e8c5fe670377cc994c40e6;hb=f54737bb28bec638b9f436d023b9f21fec2caadd;hp=d089f0131e174f56070519645656d10ee4073060;hpb=c5cbd36c2e01d8c807c8c931ca44fb7c1b48ad18;p=supertux.git diff --git a/src/supertux.cpp b/src/supertux.cpp index d089f0131..46efc59ee 100644 --- a/src/supertux.cpp +++ b/src/supertux.cpp @@ -17,17 +17,16 @@ // 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 "app/defines.h" #include "app/globals.h" #include "app/setup.h" -#include "intro.h" #include "title.h" #include "gameloop.h" #include "leveleditor.h" @@ -37,7 +36,6 @@ #include "video/surface.h" #include "tile_manager.h" #include "app/gettext.h" -#include "player.h" #include "misc.h" #include "utils/configfile.h" @@ -47,18 +45,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(screen_width, screen_height); Setup::joystick(); Setup::general(); st_menu(); @@ -95,25 +88,15 @@ 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) - { - 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