X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsupertux.cpp;h=79638a03701c702e7fb316284450a4d114216e36;hb=628bd2257f2a318846c9dfc399575a533498dd6c;hp=26da3cfe0c6277efa7e3b338d008fb57f499472b;hpb=e663d12ea58746c210fe087874be89346d953cde;p=supertux.git diff --git a/src/supertux.cpp b/src/supertux.cpp index 26da3cfe0..79638a037 100644 --- a/src/supertux.cpp +++ b/src/supertux.cpp @@ -11,13 +11,11 @@ */ #include "supertux.h" - - -/* --- MAIN --- */ +#include "resources.h" int main(int argc, char * argv[]) { - int done; + bool done; st_directory_setup(); parseargs(argc, argv); @@ -27,6 +25,7 @@ int main(int argc, char * argv[]) st_joystick_setup(); st_general_setup(); st_menu(); + loadshared(); if (launch_worldmap_mode) { @@ -34,14 +33,12 @@ int main(int argc, char * argv[]) } else if (level_startup_file) { - gameloop(level_startup_file, 1, ST_GL_LOAD_LEVEL_FILE); + GameSession session(level_startup_file, 1, ST_GL_LOAD_LEVEL_FILE); + session.run(); } else { - done = intro(); - - done = 0; - + done = false; while (!done) { done = title(); @@ -51,7 +48,8 @@ int main(int argc, char * argv[]) clearscreen(0, 0, 0); updatescreen(); + unloadshared(); st_shutdown(); - return(0); + return 0; }