projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- moved loadshared() to the right point
[supertux.git]
/
src
/
supertux.cpp
diff --git
a/src/supertux.cpp
b/src/supertux.cpp
index
d43ca9e
..
79638a0
100644
(file)
--- a/
src/supertux.cpp
+++ b/
src/supertux.cpp
@@
-11,13
+11,11
@@
*/
#include "supertux.h"
*/
#include "supertux.h"
-
-
-/* --- MAIN --- */
+#include "resources.h"
int main(int argc, char * argv[])
{
int main(int argc, char * argv[])
{
-
int
done;
+
bool
done;
st_directory_setup();
parseargs(argc, argv);
st_directory_setup();
parseargs(argc, argv);
@@
-27,6
+25,7
@@
int main(int argc, char * argv[])
st_joystick_setup();
st_general_setup();
st_menu();
st_joystick_setup();
st_general_setup();
st_menu();
+ loadshared();
if (launch_worldmap_mode)
{
if (launch_worldmap_mode)
{
@@
-34,12
+33,12
@@
int main(int argc, char * argv[])
}
else if (level_startup_file)
{
}
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
{
}
else
{
- done = 0;
-
+ done = false;
while (!done)
{
done = title();
while (!done)
{
done = title();
@@
-49,7
+48,8
@@
int main(int argc, char * argv[])
clearscreen(0, 0, 0);
updatescreen();
clearscreen(0, 0, 0);
updatescreen();
+ unloadshared();
st_shutdown();
st_shutdown();
- return
(0)
;
+ return
0
;
}
}