nolok dies properly now :)
[supertux.git] / src / tilemap.cpp
index b7f3c5a..0878441 100644 (file)
@@ -160,6 +160,21 @@ TileMap::draw(DrawingContext& context)
     }
   }
 
+  if (debug_grid)
+  {
+    for (pos.x = start_x; pos.x < end_x; pos.x += 32)
+    {
+       context.draw_filled_rect(Vector (pos.x, start_y), Vector(1, fabsf(start_y - end_y)),
+                  Color(225, 225, 225), LAYER_GUI-50);
+    }
+
+    for (pos.y = start_y; pos.y < end_y; pos.y += 32)
+    {
+       context.draw_filled_rect(Vector (start_x, pos.y), Vector(fabsf(start_x - end_x), 1),
+                  Color(225, 225, 225), LAYER_GUI-50);
+    }
+  }
+
   context.pop_transform();
 }
 
@@ -231,7 +246,7 @@ TileMap::get_tile(int x, int y) const
 {
   if(x < 0 || x >= width || y < 0 || y >= height) {
 #ifdef DEBUG
-    std::cout << "Warning: tile outside tilemap requested!\n";
+    //std::cout << "Warning: tile outside tilemap requested!\n";
 #endif
     return tilemanager->get(0);
   }