added beginning of automatic docu generation for the scripting interface
[supertux.git] / src / sector.cpp
index b040e17..81f3591 100644 (file)
@@ -32,7 +32,7 @@
 #include "object/camera.h"
 #include "object/background.h"
 #include "object/particlesystem.h"
-#include "object/particlesystem_absolute.h"
+#include "object/particlesystem_interactive.h"
 #include "object/tilemap.h"
 #include "lisp/parser.h"
 #include "lisp/lisp.h"
@@ -76,7 +76,11 @@ Sector::Sector()
   player = new Player(&player_status);
   add_object(player);
 
+#ifdef USE_GRID
   grid = new CollisionGrid(32000, 32000);
+#else
+  grid = 0;
+#endif
 }
 
 Sector::~Sector()
@@ -497,10 +501,12 @@ Sector::update_game_objects()
           std::remove(bullets.begin(), bullets.end(), bullet),
           bullets.end());
     }
+#ifdef USE_GRID
     MovingObject* movingobject = dynamic_cast<MovingObject*> (object);
     if(movingobject) {
       grid->remove_object(movingobject);
     }
+#endif
     delete *i;
     i = gameobjects.erase(i);
   }
@@ -515,9 +521,11 @@ Sector::update_game_objects()
     if(bullet)
       bullets.push_back(bullet);
 
+#ifdef USE_GRID
     MovingObject* movingobject = dynamic_cast<MovingObject*> (object);
     if(movingobject)
       grid->add_object(movingobject);
+#endif
     
     TileMap* tilemap = dynamic_cast<TileMap*> (object);
     if(tilemap && tilemap->is_solid()) {
@@ -570,7 +578,7 @@ Sector::draw(DrawingContext& context)
   context.pop_transform();
 }
 
-static const float DELTA = .001;
+static const float DELTA = .0001;
 
 void
 Sector::collision_tilemap(MovingObject* object, int depth)
@@ -784,8 +792,7 @@ Sector::add_floating_text(const Vector& pos, const std::string& text)
 void
 Sector::load_music()
 {
-  level_song = sound_manager->load_music(
-    get_resource_filename("/music/" + song_title));
+  level_song = sound_manager->load_music("/music/" + song_title);
 }
 
 void