+Rect
+TileMap::get_tiles_overlapping(const Rectf &rect) const
+{
+ Rectf rect2 = rect;
+ rect2.move(-offset);
+
+ int t_left = std::max(0 , int(floorf(rect2.get_left () / 32)));
+ int t_right = std::min(width , int(ceilf (rect2.get_right () / 32)));
+ int t_top = std::max(0 , int(floorf(rect2.get_top () / 32)));
+ int t_bottom = std::min(height, int(ceilf (rect2.get_bottom() / 32)));
+ return Rect(t_left, t_top, t_right, t_bottom);
+}
+