- added object support (untested)
[supertux.git] / src / collision.h
1 // C Interface: collision
2 //
3 // Description: 
4 //
5 //
6 // Author: Tobias Glaesser <tobi.web@web.de>, (C) 2004
7 //
8 // Copyright: See COPYING file that comes with this distribution
9 //
10 //
11
12 #ifndef SUPERTUX_COLLISION_H
13 #define SUPERTUX_COLLISION_H
14
15 #include "type.h"
16
17 /* Collision objects */
18 enum
19 {
20   CO_BULLET,
21   CO_BADGUY,
22   CO_PLAYER
23 };
24
25 enum CollisionType {
26     COLLISION_NORMAL,
27     COLLISION_BUMP,
28     COLLISION_SQUICH
29 };
30
31 bool rectcollision(base_type* one, base_type* two);
32 bool rectcollision_offset(base_type* one, base_type* two, float off_x, float off_y);
33 void collision_swept_object_map(base_type* old, base_type* current);
34 bool collision_object_map(base_type* object);
35
36 /* Checks for all possible collisions.
37    And calls the collision_handlers, which the collision_objects provide for this case (or not). */
38 void collision_handler();
39
40 #endif /*SUPERTUX_COLLISION_H*/
41