SuperTuxKart
Loading...
Searching...
No Matches
grand_prix_win.hpp
1//
2// SuperTuxKart - a fun racing game with go-kart
3// Copyright (C) 2010-2015 SuperTuxKart-Team
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_GRAND_PRIX_WIN_HPP
20#define HEADER_GRAND_PRIX_WIN_HPP
21
22#include "audio/sfx_base.hpp"
23#include "guiengine/screen.hpp"
24#include "karts/kart_model.hpp"
25#include "states_screens/grand_prix_cutscene.hpp"
26#include <utility>
27
28namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; class ILightSceneNode; class IMeshSceneNode; } }
29namespace GUIEngine { class LabelWidget; }
30class KartProperties;
31class TrackObject;
32
38 public GrandPrixCutscene,
39 public GUIEngine::ScreenSingleton<GrandPrixWin>
40{
42
44
45 virtual ~GrandPrixWin() {};
46
49
50 TrackObject* m_podium_steps[3];
51
52 TrackObject* m_kart_node[3];
53
55 std::vector<KartModel*> m_all_kart_models;
56
57 GUIEngine::LabelWidget* m_unlocked_label;
58
59 int m_phase;
60
61 float m_kart_x[3], m_kart_y[3], m_kart_z[3];
62 float m_kart_rotation[3];
63
64 float m_podium_x[3], m_podium_y[3], m_podium_z[3];
65
68
69public:
70 // implement callbacks from parent class GUIEngine::Screen
71 void init() OVERRIDE;
72 void loadedFromFile() OVERRIDE {};
73 void onCutsceneEnd() OVERRIDE;
74 void onUpdate(float dt) OVERRIDE;
75 MusicInformation* getInGameMenuMusic() const OVERRIDE;
76
78 void setKarts(const std::pair<std::string, float> karts[3]);
79 void setPlayerWon(bool some_player_won) { m_player_won = some_player_won; }
80};
81
82#endif
83
A simple label widget.
Definition: label_widget.hpp:36
Declares a class to be a singleton.
Definition: screen.hpp:59
Definition: grand_prix_cutscene.hpp:28
Screen shown at the end of a Grand Prix.
Definition: grand_prix_win.hpp:40
double m_global_time
Global evolution of time.
Definition: grand_prix_win.hpp:48
void setKarts(const std::pair< std::string, float > karts[3])
Definition: grand_prix_win.cpp:334
void onUpdate(float dt) OVERRIDE
optional callback you can override to be notified at every frame.
Definition: grand_prix_win.cpp:224
void loadedFromFile() OVERRIDE
Callback invoked when loading this menu.
Definition: grand_prix_win.hpp:72
MusicInformation * getInGameMenuMusic() const OVERRIDE
Definition: grand_prix_win.cpp:428
bool m_player_won
Used to display a different message if a player is 1st.
Definition: grand_prix_win.hpp:67
std::vector< KartModel * > m_all_kart_models
A copy of the kart model for each kart used.
Definition: grand_prix_win.hpp:55
void init() OVERRIDE
Callback invoked when entering this menu (after the widgets have been added).
Definition: grand_prix_win.cpp:150
This class stores the properties of a kart.
Definition: kart_properties.hpp:60
Wrapper around an instance of the Music interface Adds information like composer, song title,...
Definition: music_information.hpp:43
This is a base object for any separate object on the track, which might also have a skeletal animatio...
Definition: track_object.hpp:56
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33