SuperTuxKart
tutorial_world.hpp
1 // SuperTuxKart - a fun racing game with go-kart
2 //
3 // Copyright (C) 2012-2015 Marianne Gagnon
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 3
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 #ifndef HEADER_TUTORIAL_MODE_HPP
20 #define HEADER_TUTORIAL_MODE_HPP
21 
22 #include "modes/standard_race.hpp"
23 #include "LinearMath/btTransform.h"
24 
26 {
27 public:
28 
29  TutorialWorld();
30  virtual unsigned int getNumberOfRescuePositions() const OVERRIDE
31  {
32  // Don't use LinearWorld's function, but WorldWithRank, since the
33  // latter is based on rescuing to start positions
35  }
36  // ------------------------------------------------------------------------
38  virtual unsigned int getRescuePositionIndex(AbstractKart *kart) OVERRIDE;
39  // ------------------------------------------------------------------------
41  virtual btTransform getRescueTransform(unsigned int index) const OVERRIDE
42  {
43  // Don't use LinearWorld's function, but WorldWithRank, since the
44  // latter is based on rescuing to start positions
46  }
47 
48  bool shouldDrawTimer() const OVERRIDE { return false; }
49 
50 
51 }; // class TutorialWorld
52 
53 #endif
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Represents a standard race, i.e.
Definition: standard_race.hpp:29
Definition: tutorial_world.hpp:26
virtual unsigned int getRescuePositionIndex(AbstractKart *kart) OVERRIDE
Determines the rescue position index of the specified kart.
Definition: tutorial_world.cpp:30
virtual unsigned int getNumberOfRescuePositions() const OVERRIDE
Returns the number of rescue positions on a given track, which in linear races is just the number of ...
Definition: tutorial_world.hpp:30
bool shouldDrawTimer() const OVERRIDE
The code that draws the timer should call this first to know whether the game mode wants a timer draw...
Definition: tutorial_world.hpp:48
virtual btTransform getRescueTransform(unsigned int index) const OVERRIDE
Returns the bullet transformation for the specified rescue index.
Definition: tutorial_world.hpp:41
virtual unsigned int getNumberOfRescuePositions() const
Returns the number of rescue positions on a given track and game mode.
Definition: world.cpp:1547
virtual btTransform getRescueTransform(unsigned int index) const
Returns the bullet transformation for the specified rescue index.
Definition: world.cpp:1539