From 0eacf9a67df059f8d2c897d0e984b9cc3d789125 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Wed, 26 Sep 2012 22:57:47 +0200 Subject: [PATCH] fix blinking on fading out occuring sometimes --- src/main.c | 5 ++++- src/moonwalk.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 6a79e61..7d8d30b 100644 --- a/src/main.c +++ b/src/main.c @@ -296,7 +296,10 @@ void FadeGameState(struct Game *game, bool in) { } } al_destroy_bitmap(bitmap); - DrawGameState(game); + al_clear_to_color(al_map_rgb(0,0,0)); + if (in) { + DrawGameState(game); + } } /*! \brief Scales bitmap using software linear filtering method to current target. */ diff --git a/src/moonwalk.c b/src/moonwalk.c index 6117ed5..d137ec8 100644 --- a/src/moonwalk.c +++ b/src/moonwalk.c @@ -42,8 +42,8 @@ void Moonwalk_Draw(struct Game *game) { if (game->level.moonwalk.derpy_pos>1) { game->level.moonwalk.derpy_pos=-1; - UnloadGameState(game); Level_Passed(game); + UnloadGameState(game); if (game->level.current_level<6) { game->gamestate = GAMESTATE_LOADING; game->loadstate = GAMESTATE_MAP;