From: Ryan Flegel Date: Fri, 1 May 2009 01:18:31 +0000 (+0000) Subject: - Fixed formatting in credits X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c7f37260e8eb9dc30c09d967e7020202724189b1;p=supertux.git - Fixed formatting in credits - Fixed slow credits framerate by only drawing items that are on the screen SVN-Revision: 5882 --- diff --git a/data/credits.txt b/data/credits.txt index 75896cfe1..fbae640c8 100644 --- a/data/credits.txt +++ b/data/credits.txt @@ -123,9 +123,9 @@ nn - Karl Ove Hufthammer pl - Dominik Klementowski pt - Ricardo Cruz - ru - Constantin Baranov + ru - Constantin Baranov sv - Arvid Norlander - uk - Eugen Uvin + uk - Eugen Uvin -Thanks to diff --git a/src/mainloop.cpp b/src/mainloop.cpp index 0add5f9c8..4b99735f9 100644 --- a/src/mainloop.cpp +++ b/src/mainloop.cpp @@ -73,7 +73,7 @@ MainLoop::push_screen(Screen* screen, ScreenFade* screen_fade) this->screen_fade.reset(screen_fade); nextpush = !nextpop; nextpop = false; - speed = 1.0; + speed = 1.0f; } void diff --git a/src/textscroller.cpp b/src/textscroller.cpp index 5c8586758..94a74ee64 100644 --- a/src/textscroller.cpp +++ b/src/textscroller.cpp @@ -124,7 +124,10 @@ TextScroller::draw(DrawingContext& context) float y = SCREEN_HEIGHT - scroll; for(size_t i = 0; i < lines.size(); i++) { - lines[i]->draw(context, Rect(LEFT_BORDER, y, SCREEN_WIDTH - 2*LEFT_BORDER, y), LAYER_GUI); + if (y + lines[i]->get_height() >= 0 && SCREEN_HEIGHT - y >= 0) { + lines[i]->draw(context, Rect(LEFT_BORDER, y, SCREEN_WIDTH - 2*LEFT_BORDER, y), LAYER_GUI); + } + y += lines[i]->get_height(); }