21055941205e6fadfafc38026278f0afb859f05d
[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_BSOD,
23   CO_PLAYER
24 };
25
26 bool rectcollision(base_type* one, base_type* two);
27 bool rectcollision_offset(base_type* one, base_type* two, float off_x, float off_y);
28 void collision_swept_object_map(base_type* old, base_type* current);
29 bool collision_object_map(base_type* object);
30
31 /* Checks for all possible collisions.
32    And calls the collision_handlers, which the collision_objects provide for this case (or not). */
33 void collision_handler();
34
35 #endif /*SUPERTUX_COLLISION_H*/
36