From 5ae3fc5d27076677a95153162abcf527c6dc8e63 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 13 Sep 2007 00:37:51 +0200 Subject: [PATCH] rnd-20070913-1-src * fixed some problems with displaying game panel when quick-loading tape --- ChangeLog | 3 +++ src/conftime.h | 2 +- src/game.c | 17 +++++++++++++++++ src/game.h | 2 ++ src/libgame/sound.c | 2 ++ src/screens.c | 8 ++++++++ src/tape.c | 4 ++++ 7 files changed, 37 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 229f2000..12d0f0f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-09-12 + * fixed some problems with displaying game panel when quick-loading tape + 2007-09-07 * fixed (experimental only) redrawing of every tile per frame (even if unneeded) for the extended (R'n'D based) EMC graphics engine diff --git a/src/conftime.h b/src/conftime.h index 55d02dcb..a67c325a 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-09-08 02:19" +#define COMPILE_DATE_STRING "2007-09-12 23:07" diff --git a/src/game.c b/src/game.c index 31aca393..2cd5f41f 100644 --- a/src/game.c +++ b/src/game.c @@ -2662,6 +2662,15 @@ void DisplayGameControlValues() game_status = GAME_MODE_PLAYING; } +void UpdateAndDisplayGameControlValues() +{ + if (tape.warp_forward) + return; + + UpdateGameControlValues(); + DisplayGameControlValues(); +} + void DrawGameValue_Emeralds(int value) { struct TextPosInfo *pos = &game.panel.gems; @@ -4213,8 +4222,12 @@ void InitGame() SetPanelBackground(); SetDrawBackgroundMask(REDRAW_DOOR_1); +#if 1 + UpdateAndDisplayGameControlValues(); +#else UpdateGameDoorValues(); DrawGameDoorValues(); +#endif if (!game.restart_level) { @@ -11421,8 +11434,12 @@ static void CheckLevelTime() DrawVideoDisplay(VIDEO_STATE_TIME_ON, TapeTime); } +#if 1 + UpdateAndDisplayGameControlValues(); +#else UpdateGameDoorValues(); DrawGameDoorValues(); +#endif } void AdvanceFrameAndPlayerCounters(int player_nr) diff --git a/src/game.h b/src/game.h index d6814708..c1fb5b12 100644 --- a/src/game.h +++ b/src/game.h @@ -307,6 +307,8 @@ int GetElementFromGroupElement(int); void DrawGameValue_Time(int); void DrawGameDoorValues(void); +void UpdateAndDisplayGameControlValues(); + void InitGameSound(); void InitGame(); diff --git a/src/libgame/sound.c b/src/libgame/sound.c index fc187139..b80cccab 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -1559,6 +1559,8 @@ static void *Load_WAV(char *filename) #else /* AUDIO_UNIX_NATIVE */ + clear_mem(&header, sizeof(struct SoundHeader_WAV)); /* to make gcc happy */ + if ((file = fopen(filename, MODE_READ)) == NULL) { Error(ERR_WARN, "cannot open sound file '%s'", filename); diff --git a/src/screens.c b/src/screens.c index efd320ee..ec482ba1 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1269,9 +1269,11 @@ void DrawMainMenuExt(int fade_mask, boolean do_fading) /* needed if last screen was the editor screen */ UndrawSpecialEditorDoor(); +#if 0 if (fade_mask == REDRAW_FIELD) BackToFront(); #endif +#endif #if defined(TARGET_SDL) SetDrawtoField(DRAW_BACKBUFFER); @@ -1346,6 +1348,12 @@ void DrawMainMenuExt(int fade_mask, boolean do_fading) FadeIn(fade_mask); FadeSetEnterMenu(); +#if 1 + /* update screen area with special editor door */ + redraw_mask |= REDRAW_ALL; + BackToFront(); +#endif + SetMouseCursor(CURSOR_DEFAULT); InitAnimation(); diff --git a/src/tape.c b/src/tape.c index 1aaabf55..fc90ad51 100644 --- a/src/tape.c +++ b/src/tape.c @@ -566,6 +566,10 @@ static void TapeAppendRecording() DrawVideoDisplay(VIDEO_STATE_DATE_ON, tape.date); DrawVideoDisplay(VIDEO_STATE_PLAY_OFF | VIDEO_STATE_REC_ON, 0); + +#if 1 + UpdateAndDisplayGameControlValues(); +#endif } void TapeHaltRecording() -- 2.34.1