From 5b31d2c27a79ba23688c130c3324cadfa110d0fa Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 20 Oct 2006 20:26:53 +0200 Subject: [PATCH 1/1] rnd-20061020-2-src * fixed bug with background not drawn in Hall of Fame after game was won --- ChangeLog | 1 + src/conftime.h | 2 +- src/screens.c | 9 +++++++++ src/tools.c | 7 ++++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2613fd7f..e7195116 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ - "titlescreen_{1-5}.anim_mode: {fade,crossfade} default is using normal fading for menues and initial title screens, while using cross-fading for level set title screens + * fixed bug with background not drawn in Hall of Fame after game was won 2006-10-18 * added configuration directives for the remaining main menu items diff --git a/src/conftime.h b/src/conftime.h index 98686142..2fd0b54b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-10-20 19:44]" +#define COMPILE_DATE_STRING "[2006-10-20 20:24]" diff --git a/src/screens.c b/src/screens.c index dcfd35b8..484d113b 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2848,6 +2848,15 @@ void DrawHallOfFame(int highlight_position) { UnmapAllGadgets(); FadeSoundsAndMusic(); + + /* (this is needed when called from GameEnd() after winning a game) */ + KeyboardAutoRepeatOn(); + ActivateJoystick(); + + /* (this is needed when called from GameEnd() after winning a game) */ + SetDrawDeactivationMask(REDRAW_NONE); + SetDrawBackgroundMask(REDRAW_FIELD); + CloseDoor(DOOR_CLOSE_2); if (highlight_position < 0) diff --git a/src/tools.c b/src/tools.c index e46b0a6d..32289597 100644 --- a/src/tools.c +++ b/src/tools.c @@ -629,7 +629,9 @@ void SetPanelBackground() void DrawBackground(int dst_x, int dst_y, int width, int height) { -#if 1 + /* !!! "drawto" might still point to playfield buffer here (see below) !!! */ + /* (when entering hall of fame after playing) */ +#if 0 ClearRectangleOnBackground(drawto, dst_x, dst_y, width, height); #else ClearRectangleOnBackground(backbuffer, dst_x, dst_y, width, height); @@ -640,8 +642,11 @@ void DrawBackground(int dst_x, int dst_y, int width, int height) void ClearWindow() { + /* !!! "drawto" might still point to playfield buffer here (see above) !!! */ + /* (when entering hall of fame after playing) */ DrawBackground(REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE); + /* !!! maybe this should be done before clearing the background !!! */ if (setup.soft_scrolling && game_status == GAME_MODE_PLAYING) { ClearRectangle(fieldbuffer, 0, 0, FXSIZE, FYSIZE); -- 2.34.1