Back to index

supertuxkart  0.5+dfsg1
constants.hpp
Go to the documentation of this file.
00001 //  $Id: constants.hpp 2111 2008-05-31 07:04:30Z cosmosninja $
00002 //
00003 //  SuperTuxKart - a fun racing game with go-kart
00004 //  Copyright (C) 2004 Steve Baker <sjbaker1@airmail.net>
00005 //
00006 //  This program is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU General Public License
00008 //  as published by the Free Software Foundation; either version 2
00009 //  of the License, or (at your option) any later version.
00010 //
00011 //  This program is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //  GNU General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU General Public License
00017 //  along with this program; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020 #ifndef HEADER_CONSTANTS_H
00021 #define HEADER_CONSTANTS_H
00022 
00023 
00024 #define MAX_HISTORY            50000   /* number of history events                */
00025 #define TIME_DELAY_TILL_FINISH  10.0f  /* time after all player karts finish      */
00026 #define TIME_MUSIC_DESCRIPTION  10.0f  /* duration music description is displayed */
00027 /*
00028   All final units are in meters (or meters/sec or meters/sec^2)
00029   and degrees (or degrees/sec).
00030 */
00031 
00032 /* Handy constants */
00033 #define KILOMETER            1000.000f
00034 #define HOUR                 (60.0f * 60.0f)
00035 
00036 /*
00037   For convenience - here are some multipliers for other units.
00038  
00039   eg  30 * MILES_PER_HOUR  is 30mph expressed in m/sec
00040 */
00041 
00042 #define KILOMETERS_PER_HOUR  (KILOMETER/HOUR)
00043 
00044 // Zipper related constants:
00045 // =========================
00046 #define ZIPPER_ANGLE          45.0
00047 #define ZIPPER_TIME           1.0f   /* Seconds */
00048 #define ZIPPER_VELOCITY      (100.0f * KILOMETERS_PER_HOUR )
00049 
00050 // Traffic (not used at this time)
00051 // ===============================
00052 #define TRAFFIC_VELOCITY        ( 20.0f * KILOMETERS_PER_HOUR )
00053 
00054 /* M$ compilers don't define M_PI... */
00055 
00056 #ifndef M_PI
00057 #  define M_PI 3.14159265358979323846f  /* As in Linux's math.h */
00058 #endif
00059 
00060 #define NINETY_DEGREE_RAD  (M_PI/2.0f)
00061 #define DEGREE_TO_RAD(x)          ((x)*M_PI/180.0f)
00062 #define RAD_TO_DEGREE(x)          ((x)*180.0f/M_PI)
00063 #endif
00064