[Super-tux-commit] supertux/src gameloop.cpp,1.62,1.63 leveleditor.cpp,1.40,1.41 supertux.cpp,1.7,1.
Brought to you by:
wkendrick
From: Ingo R. <gr...@us...> - 2004-04-11 17:11:50
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15830 Modified Files: gameloop.cpp leveleditor.cpp supertux.cpp title.cpp Log Message: - removed local (un)loadshared() stuff and replaced it my a global one, fixes crash on entering a level twice Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- gameloop.cpp 11 Apr 2004 16:33:11 -0000 1.62 +++ gameloop.cpp 11 Apr 2004 16:58:05 -0000 1.63 @@ -104,7 +104,6 @@ } world->get_level()->load_gfx(); - loadshared(); world->activate_bad_guys(); world->activate_particle_systems(); @@ -363,7 +362,6 @@ world->get_level()->free_song(); world->arrays_free(); - unloadshared(); return(0); } tux.level_begin(); @@ -390,7 +388,6 @@ world->get_level()->free_song(); world->arrays_free(); - unloadshared(); return(0); } /* if (lives < 0) */ } @@ -640,7 +637,6 @@ world->get_level()->cleanup(); world->get_level()->free_song(); - unloadshared(); world->arrays_free(); return quit; Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- title.cpp 11 Apr 2004 16:38:58 -0000 1.34 +++ title.cpp 11 Apr 2004 16:58:06 -0000 1.35 @@ -146,7 +146,6 @@ st_pause_ticks_init(); GameSession session(datadir + "/levels/misc/menu.stl"); - loadshared(); //FIXME:activate_particle_systems(); Index: supertux.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/supertux.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- supertux.cpp 11 Apr 2004 01:24:58 -0000 1.7 +++ supertux.cpp 11 Apr 2004 16:58:06 -0000 1.8 @@ -11,9 +11,7 @@ */ #include "supertux.h" - - -/* --- MAIN --- */ +#include "resources.h" int main(int argc, char * argv[]) { @@ -42,7 +40,9 @@ done = false; while (!done) { + loadshared(); done = title(); + unloadshared(); } } Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- leveleditor.cpp 11 Apr 2004 16:38:58 -0000 1.40 +++ leveleditor.cpp 11 Apr 2004 16:58:05 -0000 1.41 @@ -242,7 +242,6 @@ leveleditor_menu->item[3].kind = MN_GOTO; le_level = 1; global_world.arrays_free(); - loadshared(); le_current_level = new Level; if(le_current_level->load(le_level_subset.name.c_str(), le_level) != 0) { @@ -273,7 +272,6 @@ leveleditor_menu->item[3].kind = MN_GOTO; le_level = 1; global_world.arrays_free(); - loadshared(); le_current_level = new Level; if(le_current_level->load(le_level_subset.name.c_str(), le_level) != 0) { @@ -595,7 +593,6 @@ le_current_level->free_gfx(); le_current_level->cleanup(); global_world.arrays_free(); - unloadshared(); } } @@ -1194,7 +1191,6 @@ Menu::set_current(leveleditor_menu); global_world.arrays_free(); le_current_level->load_gfx(); - loadshared(); global_world.activate_bad_guys(); } |