X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcollision_grid_iterator.hpp;h=c73a533d1f2f18384b96f066bf8723e1f489fe92;hb=07ddaed2a657e4d2a3d038fed223fc5827159caf;hp=0f7877778ea5b4e52860eedfc25807c572a78018;hpb=5b7f9214cb929399f1a855ef5807018a9447d510;p=supertux.git diff --git a/src/collision_grid_iterator.hpp b/src/collision_grid_iterator.hpp index 0f7877778..c73a533d1 100644 --- a/src/collision_grid_iterator.hpp +++ b/src/collision_grid_iterator.hpp @@ -1,7 +1,7 @@ // $Id$ -// +// // SuperTux -// Copyright (C) 2005 Matthias Braun +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -12,7 +12,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -21,6 +21,7 @@ #define __COLLISION_GRID_ITERATOR_H__ #include "math/rect.hpp" +#include "log.hpp" class CollisionGrid; @@ -46,16 +47,16 @@ public: end_y = int(bbox.p2.y / grid.cell_height) + 2; if(end_y > (int) grid.cells_y) end_y = grid.cells_y; + + timestamp = grid.iterator_timestamp++; + entry = 0; if(start_x >= end_x) { - printf("bad region.\n"); + log_debug << "bad region" << std::endl; y = 0; end_y = 0; return; } - - timestamp = grid.iterator_timestamp++; - entry = 0; } MovingObject* next()