From: Wolfgang Becker Date: Mon, 4 Dec 2006 21:56:26 +0000 (+0000) Subject: Fixed fading for sixteen_to_nine and four_to_three. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ed3c833bd1026d1b6aa8eb2354a262234a019b40;p=supertux.git Fixed fading for sixteen_to_nine and four_to_three. SVN-Revision: 4454 --- diff --git a/src/object/display_effect.cpp b/src/object/display_effect.cpp index a01e9db50..acf52bfc4 100644 --- a/src/object/display_effect.cpp +++ b/src/object/display_effect.cpp @@ -84,7 +84,8 @@ DisplayEffect::update(float elapsed_time) if(border_fading < 0) { border_fade = NO_FADE; } - border_size = border_fading / border_fading * BORDER_SIZE; + border_size = (border_fadetime - border_fading) + / border_fadetime * BORDER_SIZE; break; case FADE_OUT: border_fading -= elapsed_time; @@ -92,8 +93,7 @@ DisplayEffect::update(float elapsed_time) borders = false; border_fade = NO_FADE; } - border_size = (border_fadetime - border_fading) - / border_fadetime * BORDER_SIZE; + border_size = border_fading / border_fadetime * BORDER_SIZE; break; default: assert(false);