From c36f712fee06681d5104b39a826586f22e64148f Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Sun, 25 Apr 2004 13:51:19 +0000 Subject: [PATCH] -added gradient support for start screens SVN-Revision: 703 --- src/gameloop.cpp | 6 +++--- src/level.cpp | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 685eef3ac..d956b227e 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -149,7 +149,7 @@ GameSession::levelintro(void) if (get_level()->img_bkgd) get_level()->img_bkgd->draw(0, 0); else - clearscreen(0, 0, 0); + drawgradient(get_level()->bkgd_top, get_level()->bkgd_bottom); sprintf(str, "%s", world->get_level()->name.c_str()); gold_text->drawf(str, 0, 200, A_HMIDDLE, A_TOP, 1); @@ -663,7 +663,7 @@ GameSession::drawendscreen() if (get_level()->img_bkgd) get_level()->img_bkgd->draw(0, 0); else - clearscreen(0, 0, 0); + drawgradient(get_level()->bkgd_top, get_level()->bkgd_bottom); blue_text->drawf("GAMEOVER", 0, 200, A_HMIDDLE, A_TOP, 1); @@ -687,7 +687,7 @@ GameSession::drawresultscreen(void) if (get_level()->img_bkgd) get_level()->img_bkgd->draw(0, 0); else - clearscreen(0, 0, 0); + drawgradient(get_level()->bkgd_top, get_level()->bkgd_bottom); blue_text->drawf("Result:", 0, 200, A_HMIDDLE, A_TOP, 1); diff --git a/src/level.cpp b/src/level.cpp index ea04cf11c..e30caebd2 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -635,8 +635,7 @@ Level::load_gfx() } else { - /* Quick hack to make sure an image is loaded, when we are freeing it afterwards. */ - load_image(&img_bkgd, theme,"solid0.png", IGNORE_ALPHA); + img_bkgd = 0; } } -- 2.11.0