SuperTuxKart
constants.hpp
1 // SuperTuxKart - a fun racing game with go-kart
2 //
3 // Copyright (C) 2004-2015 Steve Baker <sjbaker1@airmail.net>
4 // Copyright (C) 2012-2015 SuperTuxKart-Team
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 3
9 // of the License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 
20 #ifndef HEADER_CONSTANTS_HPP
21 #define HEADER_CONSTANTS_HPP
22 
23 /*
24  All final units are in meters (or meters/sec or meters/sec^2)
25  and degrees (or degrees/sec).
26 */
27 
28 /* Handy constants */
29 #define KILOMETER 1000.000f
30 #define HOUR (60.0f * 60.0f)
31 
32 /*
33  For convenience - here are some multipliers for other units.
34 
35  eg 30 * MILES_PER_HOUR is 30mph expressed in m/sec
36 */
37 
38 #define KILOMETERS_PER_HOUR (KILOMETER/HOUR)
39 
40 /* M$ compilers don't define M_PI... */
41 
42 #ifndef M_PI
43 # define M_PI 3.14159265358979323846f /* As in Linux's math.h */
44 #endif
45 #ifndef M_PI_2
46 # define M_PI_2 1.57079632679489661923
47 #endif
48 
49 #define NINETY_DEGREE_RAD (M_PI/2.0f)
50 #define DEGREE_TO_RAD (M_PI/180.0f)
51 #define RAD_TO_DEGREE (180.0f/M_PI)
52 
53 const unsigned int MAX_PLAYER_COUNT = 8;
54 
55 extern const bool IS_LITTLE_ENDIAN;
56 
57 #define DEFAULT_GROUP_NAME "standard"
58 
59 extern const char STK_VERSION[];
60 
61 #endif