- fixed problem with last_menu not being able to handle menues deeper than two submenues
[supertux.git] / src / collision.h
index 3836871..deee4b8 100644 (file)
 
 #include "type.h"
 
+class Tile;
+class World;
+
 /* Collision objects */
 enum
 {
   CO_BULLET,
   CO_BADGUY,
-  CO_BSOD,
   CO_PLAYER
 };
 
-int rectcollision(itop_type* one, itop_type* two);
-int rectcollision_offset(itop_type* one, itop_type* two, float off_x, float off_y);
+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);
+
+/** Return a pointer to the tile at the given x/y coordinates */
+Tile* gettile(float x, float y);
 
-/* Checks for all possible collisions.
-   And calls the collision_handlers, which the collision_objects provide for this case (or not). */
-void collision_handler();
+// 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*/