| 1 | // SuperTux |
| 2 | // Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de> |
| 3 | // Copyright (C) 2006 Matthias Braun <matze@braunis.de> |
| 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 3 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, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | #ifndef HEADER_SUPERTUX_SUPERTUX_TITLE_SCREEN_HPP |
| 19 | #define |
| 20 | |
| 21 | #include "supertux/screen.hpp" |
| 22 | #include "video/surface_ptr.hpp" |
| 23 | |
| 24 | #include <string> |
| 25 | |
| 26 | class CodeController; |
| 27 | class GameSession; |
| 28 | class Savegame; |
| 29 | |
| 30 | /** Screen that displays the SuperTux logo, lets players start a new |
| 31 | game, etc. */ |
| 32 | class TitleScreen final : public Screen |
| 33 | { |
| 34 | public: |
| 35 | TitleScreen(Savegame& savegame); |
| 36 | virtual ~TitleScreen(); |
| 37 | |
| 38 | virtual void setup() override; |
| 39 | virtual void leave() override; |
| 40 | |
| 41 | virtual void draw(Compositor& compositor) override; |
| 42 | virtual void update(float dt_sec, const Controller& controller) override; |
| 43 | |
| 44 | private: |
| 45 | void make_tux_jump(); |
| 46 | |
| 47 | private: |
| 48 | SurfacePtr m_frame; |
| 49 | std::unique_ptr<CodeController> m_controller; |
| 50 | std::unique_ptr<GameSession> m_titlesession; |
| 51 | std::string m_copyright_text; |
| 52 | std::string m_videosystem_name; |
| 53 | |
| 54 | private: |
| 55 | TitleScreen(const TitleScreen&) = delete; |
| 56 | TitleScreen& operator=(const TitleScreen&) = delete; |
| 57 | }; |
| 58 | |
| 59 | #endif |
| 60 | |
| 61 | /* EOF */ |
| 62 | |