Cleanups related to tilemap positions:
authorFlorian Forster <supertux@octo.it>
Sat, 30 Jan 2010 12:44:05 +0000 (12:44 +0000)
committerFlorian Forster <supertux@octo.it>
Sat, 30 Jan 2010 12:44:05 +0000 (12:44 +0000)
commitbc7cdb32068257a8dd841873d25bb3993898a147
treeddbfa0cd80ec3816767b05eb1e105fbbb15f6f68
parent4203c84927f86be55f927a09f761aeed29932f2d
Cleanups related to tilemap positions:

- Combine TileMap::{x,y}_offset into a vector TileMap::offset.

- Factor out some widely duplicated code into new TileMap methods
  get_tile_position, get_bbox, get_tile_bbox, get_tiles_overlapping.

- AATriangle contains a Rectf instead of two vectors.

- Some simplification to Sector::is_free_of_tiles.

- BadGuy::might_fall passed a zero-width rectangle to
  Sector::is_free_of_tiles.  With the new code, such a rectangle can slip
  between two tiles without overlapping either one, giving an incorrect
  result.  So change the BadGuy::might_fall rectangle to have width 1.

Thanks to Matt McCutchen for this patch.

SVN-Revision: 6297
src/badguy/badguy.cpp
src/math/aatriangle.hpp
src/object/particlesystem_interactive.cpp
src/object/tilemap.cpp
src/object/tilemap.hpp
src/supertux/collision.cpp
src/supertux/sector.cpp