2010-12-15 17:59:55 -05:00
|
|
|
// $Id$
|
|
|
|
//
|
|
|
|
// SuperTuxKart - a fun racing game with go-kart
|
|
|
|
// Copyright (C) 2010 SuperTuxKart-Team
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 3
|
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
2010-05-30 11:48:24 -04:00
|
|
|
#ifndef HEADER_GRAND_PRIX_LOSE_HPP
|
|
|
|
#define HEADER_GRAND_PRIX_LOSE_HPP
|
2010-02-20 21:22:05 -05:00
|
|
|
|
|
|
|
#include "guiengine/screen.hpp"
|
2010-09-10 09:30:31 -04:00
|
|
|
#include "karts/kart_model.hpp"
|
2010-02-20 21:22:05 -05:00
|
|
|
|
2010-07-17 14:17:15 -04:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2010-02-20 21:22:05 -05:00
|
|
|
namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; class ILightSceneNode; } }
|
|
|
|
class KartProperties;
|
|
|
|
|
2010-04-23 16:48:56 -04:00
|
|
|
/**
|
|
|
|
* \brief Screen shown at the end of a Grand Prix
|
|
|
|
* \ingroup states_screens
|
|
|
|
*/
|
2010-05-30 11:48:24 -04:00
|
|
|
class GrandPrixLose : public GUIEngine::Screen, public GUIEngine::ScreenSingleton<GrandPrixLose>
|
2010-02-20 21:22:05 -05:00
|
|
|
{
|
2010-05-30 11:48:24 -04:00
|
|
|
friend class GUIEngine::ScreenSingleton<GrandPrixLose>;
|
2010-02-20 21:22:05 -05:00
|
|
|
|
2010-05-30 11:48:24 -04:00
|
|
|
GrandPrixLose();
|
2010-02-20 21:22:05 -05:00
|
|
|
|
|
|
|
/** sky angle, 0-360 */
|
|
|
|
float m_sky_angle;
|
|
|
|
|
|
|
|
/** Global evolution of time */
|
2010-06-17 22:03:36 -04:00
|
|
|
float m_global_time;
|
2010-02-20 21:22:05 -05:00
|
|
|
|
2010-05-30 11:48:24 -04:00
|
|
|
irr::scene::IMeshSceneNode* m_garage;
|
2010-02-21 18:10:24 -05:00
|
|
|
|
2010-05-30 11:48:24 -04:00
|
|
|
irr::scene::IAnimatedMeshSceneNode* m_garage_door;
|
|
|
|
|
2010-09-13 21:36:14 -04:00
|
|
|
irr::scene::ISceneNode* m_kart_node[4];
|
2010-02-20 21:22:05 -05:00
|
|
|
|
|
|
|
irr::scene::ISceneNode* m_sky;
|
|
|
|
irr::scene::ICameraSceneNode* m_camera;
|
|
|
|
|
|
|
|
irr::scene::ILightSceneNode* m_light;
|
2010-02-21 18:10:24 -05:00
|
|
|
|
2010-09-10 09:30:31 -04:00
|
|
|
/** A copy of the kart model for each kart used. */
|
|
|
|
std::vector<KartModel*> m_all_kart_models;
|
|
|
|
|
2010-02-21 18:10:24 -05:00
|
|
|
int m_phase;
|
|
|
|
|
2010-05-30 11:48:24 -04:00
|
|
|
float m_kart_x, m_kart_y, m_kart_z;
|
2010-02-21 18:10:24 -05:00
|
|
|
|
2010-02-21 19:15:36 -05:00
|
|
|
float m_camera_x, m_camera_y, m_camera_z;
|
|
|
|
float m_camera_target_x, m_camera_target_z;
|
2010-06-13 14:25:49 -04:00
|
|
|
|
|
|
|
MusicInformation* m_music;
|
2010-02-21 19:15:36 -05:00
|
|
|
|
2010-11-09 11:00:21 -05:00
|
|
|
//irr::core::recti m_viewport[4];
|
2010-09-13 21:36:14 -04:00
|
|
|
|
2010-02-20 21:22:05 -05:00
|
|
|
public:
|
|
|
|
|
2010-05-01 15:16:38 -04:00
|
|
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
|
|
|
virtual void loadedFromFile();
|
|
|
|
|
|
|
|
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
2010-02-20 21:22:05 -05:00
|
|
|
void onUpdate(float dt, irr::video::IVideoDriver*);
|
|
|
|
|
2010-05-01 15:16:38 -04:00
|
|
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
2010-02-20 21:22:05 -05:00
|
|
|
void init();
|
|
|
|
|
2010-05-01 15:16:38 -04:00
|
|
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
|
|
|
void tearDown();
|
2010-02-21 18:10:24 -05:00
|
|
|
|
2010-05-01 15:16:38 -04:00
|
|
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
2010-02-20 21:22:05 -05:00
|
|
|
void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID);
|
2010-05-01 15:16:38 -04:00
|
|
|
|
2010-07-17 14:17:15 -04:00
|
|
|
/** \brief set which karts lost this GP */
|
2010-09-13 21:36:14 -04:00
|
|
|
void setKarts(std::vector<std::string> ident);
|
2010-02-20 21:22:05 -05:00
|
|
|
|
2010-06-13 14:25:49 -04:00
|
|
|
virtual MusicInformation* getMusic() const { return m_music; }
|
|
|
|
|
2010-02-20 21:22:05 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|