#include "util/reader.hpp"
#include "video/drawing_context.hpp"
+#include <sstream>
#include <version.h>
-TitleScreen::TitleScreen() :
+TitleScreen::TitleScreen(PlayerStatus* player_status) :
main_menu(new MainMenu()),
frame(),
controller(),
titlesession()
{
controller.reset(new CodeController());
- titlesession.reset(new GameSession("levels/misc/menu.stl"));
+ titlesession.reset(new GameSession("levels/misc/menu.stl", player_status));
Player* player = titlesession->get_current_sector()->player;
player->set_controller(controller.get());
controller->press(Controller::RIGHT);
// Check if we should press the jump button
- Rect lookahead = tux->get_bbox();
+ Rectf lookahead = tux->get_bbox();
lookahead.p2.x += 96;
bool pathBlocked = !sector->is_free_of_statics(lookahead);
if ((pathBlocked && jumpWasReleased) || !tux->on_ground()) {
void
TitleScreen::setup()
{
- player_status->reset();
-
Sector* sector = titlesession->get_current_sector();
if(Sector::current() != sector) {
sector->play_music(LEVEL_MUSIC);
sector->draw(context);
// FIXME: Add something to scale the frame to the resolution of the screen
- context.draw_surface(frame.get(), Vector(0,0),LAYER_FOREGROUND1);
+ //context.draw_surface(frame, Vector(0,0),LAYER_FOREGROUND1);
- context.draw_text(Resources::small_font, "SuperTux " PACKAGE_VERSION "\n",
- Vector(5, SCREEN_HEIGHT - 50), ALIGN_LEFT, LAYER_FOREGROUND1);
context.draw_text(Resources::small_font,
- _(
- "Copyright (c) 2007 SuperTux Devel Team\n"
- "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to\n"
+ "SuperTux " PACKAGE_VERSION "\n" +
+ _("Copyright") + " (c) 2003-2013 SuperTux Devel Team\n" +
+ _("This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to\n"
"redistribute it under certain conditions; see the file COPYING for details.\n"
),
- Vector(5, SCREEN_HEIGHT - 50 + Resources::small_font->get_height() + 5),
+ Vector(5, SCREEN_HEIGHT - 50),
ALIGN_LEFT, LAYER_FOREGROUND1);
}