From f3dcd1e347be67801e762aa5e3fac0f8a6a90fdc Mon Sep 17 00:00:00 2001 From: Ryan Flegel Date: Sun, 16 May 2004 02:07:26 +0000 Subject: [PATCH] - more game object progress SVN-Revision: 1205 --- src/level.cpp | 2 +- src/world.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/level.cpp b/src/level.cpp index e9612b110..b47b1a6ab 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -409,7 +409,7 @@ Level::load(const std::string& filename) } else { - if (lisp_symbol(lisp_car(data)) == "trampoline") + if (strcmp(lisp_symbol(lisp_car(data)),"trampoline") == 0) { ObjectData _trampoline_data; diff --git a/src/world.cpp b/src/world.cpp index 68dcb7a08..f4d83db8a 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -50,6 +50,7 @@ World::World(const std::string& filename) get_level()->load_gfx(); activate_bad_guys(); + activate_objects(); activate_particle_systems(); get_level()->load_song(); @@ -71,6 +72,7 @@ World::World(const std::string& subset, int level_nr) get_level()->load_gfx(); activate_bad_guys(); + activate_objects(); activate_particle_systems(); get_level()->load_song(); @@ -106,6 +108,9 @@ World::~World() for (BadGuys::iterator i = bad_guys.begin(); i != bad_guys.end(); ++i) delete *i; + for (Trampolines::iterator i = trampolines.begin(); i != trampolines.end(); ++i) + delete *i; + for (ParticleSystems::iterator i = particle_systems.begin(); i != particle_systems.end(); ++i) delete *i; @@ -161,7 +166,7 @@ World::activate_objects() for (std::vector< ObjectData >::iterator i = level->trampoline_data.begin(); i != level->trampoline_data.end(); ++i) - { + {puts("fo"); add_object >(*i); } } @@ -228,6 +233,9 @@ World::draw() for (BadGuys::iterator i = bad_guys.begin(); i != bad_guys.end(); ++i) (*i)->draw(); + for (Trampolines::iterator i = trampolines.begin(); i != trampolines.end(); ++i) + (*i)->draw(); + tux.draw(); for (unsigned int i = 0; i < bullets.size(); ++i) -- 2.11.0