From: Tobias Markus Date: Mon, 3 Feb 2014 10:10:16 +0000 (+0100) Subject: Possibly fixing another memory leak X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=88aae01a523fa0bac33f114b3f75161018e5b36c;p=supertux.git Possibly fixing another memory leak --- diff --git a/src/supertux/title_screen.cpp b/src/supertux/title_screen.cpp index fbe7fee0b..1acf5739c 100644 --- a/src/supertux/title_screen.cpp +++ b/src/supertux/title_screen.cpp @@ -56,6 +56,11 @@ TitleScreen::TitleScreen(PlayerStatus* player_status) : player->set_speedlimit(230); //MAX_WALK_XM frame = Surface::create("images/engine/menu/frame.png"); + copyright_text = "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" + ); } std::string @@ -141,11 +146,7 @@ TitleScreen::draw(DrawingContext& context) //context.draw_surface(frame, Vector(0,0),LAYER_FOREGROUND1); context.draw_text(Resources::small_font, - "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" - ), + copyright_text, Vector(5, SCREEN_HEIGHT - 50), ALIGN_LEFT, LAYER_FOREGROUND1); } diff --git a/src/supertux/title_screen.hpp b/src/supertux/title_screen.hpp index f80e1bf6f..205ef1ccb 100644 --- a/src/supertux/title_screen.hpp +++ b/src/supertux/title_screen.hpp @@ -60,6 +60,7 @@ private: SurfacePtr frame; std::auto_ptr controller; std::auto_ptr titlesession; + std::string copyright_text; private: TitleScreen(const TitleScreen&);