1 //
2 // Cross-platform free Puyo-Puyo clone.
3 // Copyright (C) 2006, 2007 Emma's Software
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 //
19 #if !defined (AMOEBAX_CREDITS_STATE_H)
20 #define AMOEBAX_CREDITS_STATE_H
21 
22 #include "IState.h"
23 #include "System.h"
24 
25 namespace Amoebax
26 {
27     ///
28     /// \class CreditsState.
29     /// \brief The credits state.
30     ///
31     class CreditsState: public IState
32     {
33         public:
34             CreditsState (void);
35 
36             virtual void joyMotion (uint8_t joystick, uint8_t axis,
37                                     int16_t value);
38             virtual void joyDown (uint8_t joystick, uint8_t button);
39             virtual void joyUp (uint8_t joystick, uint8_t button);
40 #if !defined (IS_GP2X_HOST)
41             virtual void keyDown (uint32_t key);
42             virtual void keyUp (uint32_t key);
43 #endif // !IS_GP2X_HOST
44             virtual void redrawBackground (SDL_Rect *region, SDL_Surface *screen);
45             virtual void render (SDL_Surface *screen);
46             virtual void update (uint32_t elapsedTime);
47             virtual void videoModeChanged (void);
48 
49         private:
50             void removeCreditsState (void);
51             void loadGraphicResources (void);
52 
53             /// The menu's background.
54             std::auto_ptr<Surface> m_Background;
55             /// The font to use to draw the people's name.
56             std::auto_ptr<Font> m_NamesFont;
57             /// The font to use to draw the different development areas.
58             std::auto_ptr<Font> m_SectionsFont;
59             /// Tells if the state was already removed or not.
60             bool m_StateRemoved;
61     };
62 }
63 
64 #endif // !AMOEABX_CREDITS_STATE_H
65