3730285b703a332cc285030a647d2da7c8c04cb2
[supertux.git] / src / physic.h
1 //
2 // C++ Interface: physic
3 //
4 // Description: 
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_PHYSIC_H
14 #define SUPERTUX_PHYSIC_H
15
16 #include "timer.h"
17
18 enum {
19   PH_VTU /* Vertical throw up. */
20 };
21
22 /* Physic type: */
23
24 typedef struct physic_type
25   {
26       int state;
27       unsigned int start_time;
28   }
29 physic_type;
30
31 void physic_init(physic_type* pphysic);
32 int physic_get_state(physic_type* pphysic);
33 void physic_set_state(physic_type* pphysic, int nstate);
34 float physic_get_velocity(physic_type* pphysic, float start_velocity);
35 float physic_get_max_distance(physic_type* pphysic, float start_velocity);
36 unsigned int physic_get_max_time(physic_type* pphysic, float start_velocity);
37 unsigned int physic_get_time_gone(physic_type* pphysic);
38
39 #endif /*SUPERTUX_PHYSIC_H*/