New grow and skid sounds from remaxim
[supertux.git] / src / levelintro.hpp
1 //  $Id$
2 //
3 //  SuperTux -- LevelIntro screen
4 //  Copyright (C) 2008 Christoph Sommer <christoph.sommer@2008.expires.deltadevelopment.de>
5 //
6 //  This program is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU General Public License
8 //  as published by the Free Software Foundation; either version 2
9 //  of the License, or (at your option) any later version.
10 //
11 //  This program is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //  GNU General Public License for more details.
15 //
16 //  You should have received a copy of the GNU General Public License
17 //  along with this program; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 //  02111-1307, USA.
20
21 #ifndef __LEVELINTRO_H__
22 #define __LEVELINTRO_H__
23
24 #include <vector>
25 #include <string>
26 #include <map>
27 #include <memory>
28
29 #include "screen.hpp"
30 #include "math/vector.hpp"
31 #include "math/rect.hpp"
32 #include "level.hpp"
33 #include "sprite/sprite.hpp"
34 #include "timer.hpp"
35
36 class DrawingContext;
37 class Surface;
38
39 /**
40  * Screen that welcomes the player to a level
41  */
42 class LevelIntro : public Screen
43 {
44   static Color header_color;
45   static Color author_color;
46   static Color stat_hdr_color;
47   static Color stat_color;
48 public:
49   LevelIntro(const Level* level, const Statistics* best_level_statistics);
50   virtual ~LevelIntro();
51
52   void setup();
53   void draw(DrawingContext& context);
54   void update(float elapsed_time);
55
56 private:
57   const Level* level; /**< The level of which this is the intro screen */
58   const Statistics* best_level_statistics; /**< Best level statistics of the level of which is the intro screen */
59   std::auto_ptr<Sprite> player_sprite; /**< Sprite representing the player */
60   float player_sprite_py; /**< Position (y axis) for the player sprite */
61   float player_sprite_vy; /**< Velocity (y axis) for the player sprite */
62   Timer player_sprite_jump_timer; /**< When timer fires, the player sprite will "jump" */
63 };
64
65 #endif