Back to index

supertuxkart  0.5+dfsg1
stk_config.hpp
Go to the documentation of this file.
00001 //  $Id: stk_config.hpp 2111 2008-05-31 07:04:30Z cosmosninja $
00002 //
00003 //  SuperTuxKart - a fun racing game with go-kart
00004 //  Copyright (C) 2006 Joerg Henrichs
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_STKCONFIG_H
00021 #define HEADER_STKCONFIG_H
00022 
00023 #include "kart_properties.hpp"
00024 #include "music_information.hpp"
00025 #include "lisp/lisp.hpp"
00026 
00027 class STKConfig : public KartProperties
00028 {
00029 public:
00030     float m_anvil_weight;            // Additional kart weight if anvil is attached
00031     float m_anvil_speed_factor;      // To decrease speed once when attached
00032     float m_parachute_friction;      // Increased air friction when parachute
00033     float m_parachute_done_fraction; // fraction of speed when lost will detach parachute
00034     float m_parachute_time;          // time a parachute is active
00035     float m_parachute_time_other;    // time a parachute attached to other karts is active
00036     float m_bomb_time;               // time before a bomb explodes
00037     float m_bomb_time_increase;      // time added to bomb timer when it's passed on
00038     float m_anvil_time;              // time an anvil is active
00039     float m_zipper_time;             // duration a zipper is active
00040     float m_zipper_force;            // additional force added to the acceleration
00041     float m_zipper_speed_gain;       // initial one time speed gain
00042     float m_shortcut_segments;       // skipping more than this number of segments is
00043                                      // considered to be a shortcut
00044     float m_explosion_impulse;       // impulse affecting each non-hit kart
00045     float m_explosion_impulse_objects;// impulse of explosion on moving objects, e.g. road cones, ...
00046     int   m_max_karts;               // maximum number of karts
00047     int   m_grid_order;              // whether grand prix grid is in point or reverse point order
00048     std::vector<float> 
00049           m_leader_intervals;        // interval in follow the leader till last kart is reomved
00050     std::vector<int> m_scores;       // scores depending on position
00051 
00052     MusicInformation* m_title_music;  // filename of the title music to play
00053 
00054     STKConfig() : KartProperties() {};
00055     void init_defaults    ();
00056     void getAllData       (const lisp::Lisp* lisp);
00057     void load             (const std::string filename);
00058 }
00059 ;   // STKConfig
00060 
00061 extern STKConfig* stk_config;
00062 #endif