[Super-tux-commit] supertux/src scene.cpp,1.8,1.9
Brought to you by:
wkendrick
From: Tobias Gl??er <to...@us...> - 2004-03-24 22:26:25
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13063/src Modified Files: scene.cpp Log Message: new levelformat with multiple layers and and new tileset code. Along with a new particlesystem. (the latest one was contributed by Matze Braun) Index: scene.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/scene.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- scene.cpp 24 Mar 2004 22:01:08 -0000 1.8 +++ scene.cpp 24 Mar 2004 22:15:44 -0000 1.9 @@ -25,7 +25,8 @@ int distro_counter; timer_type super_bkgd_timer; float scroll_x; -int global_frame_counter; +unsigned int global_frame_counter; + std::vector<bouncy_distro_type> bouncy_distros; std::vector<broken_brick_type> broken_bricks; std::vector<bouncy_brick_type> bouncy_bricks; @@ -33,6 +34,7 @@ std::vector<floating_score_type> floating_scores; std::vector<upgrade_type> upgrades; std::vector<bullet_type> bullets; +std::vector<ParticleSystem*> particle_systems; Player tux; texture_type img_box_full; texture_type img_box_empty; @@ -49,13 +51,18 @@ void arrays_free(void) { - bad_guys.clear(); - bouncy_distros.clear(); - broken_bricks.clear(); - bouncy_bricks.clear(); - floating_scores.clear(); - upgrades.clear(); - bullets.clear(); +bad_guys.clear(); +bouncy_distros.clear(); +broken_bricks.clear(); +bouncy_bricks.clear(); +floating_scores.clear(); +upgrades.clear(); +bullets.clear(); +std::vector<ParticleSystem*>::iterator i; +for(i = particle_systems.begin(); i != particle_systems.end(); ++i) { + delete *i; +} +particle_systems.clear(); } void set_defaults(void) |