#include "type.h"
+class Tile;
+class World;
+
/* Collision objects */
enum
{
CO_BULLET,
CO_BADGUY,
- CO_BSOD,
CO_PLAYER
};
+enum CollisionType {
+ COLLISION_NORMAL,
+ COLLISION_BUMP,
+ COLLISION_SQUISH
+};
+
bool rectcollision(base_type* one, base_type* two);
bool rectcollision_offset(base_type* one, base_type* two, float off_x, float off_y);
+
void collision_swept_object_map(base_type* old, base_type* current);
bool collision_object_map(base_type* object);
-/* Checks for all possible collisions.
- And calls the collision_handlers, which the collision_objects provide for this case (or not). */
-void collision_handler();
+/** Return a pointer to the tile at the given x/y coordinates */
+Tile* gettile(float x, float y);
+
+// Some little helper function to check for tile properties
+bool issolid(float x, float y);
+bool isbrick(float x, float y);
+bool isice(float x, float y);
+bool isfullbox(float x, float y);
#endif /*SUPERTUX_COLLISION_H*/