From 2884cb273130660d64871bef2845525ef0bfc034 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 18 Aug 2006 21:17:25 +0200 Subject: [PATCH] rnd-20060818-1-src * fixed bug that caused broken tapes when manually appending to tapes using the "pause before death" functionality, followed by recording * added setup option to disable fading of screens for faster testing --- ChangeLog | 5 +++++ src/conftime.h | 2 +- src/files.c | 2 +- src/game.c | 24 ++++++++++++++++++++++++ src/game_em/input.c | 16 ++++++++++++++++ src/screens.c | 2 +- src/tools.c | 2 +- 7 files changed, 49 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7fdd05a..287a460e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-08-18 + * fixed bug that caused broken tapes when manually appending to tapes + using the "pause before death" functionality, followed by recording + * added setup option to disable fading of screens for faster testing + 2006-08-16 * code cleanup of new fading functions diff --git a/src/conftime.h b/src/conftime.h index d6874f3a..9e0a36fa 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-08-16 22:55]" +#define COMPILE_DATE_STRING "[2006-08-18 21:12]" diff --git a/src/files.c b/src/files.c index 4a89c9b2..16fbe2bc 100644 --- a/src/files.c +++ b/src/files.c @@ -7140,7 +7140,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->direct_draw = !si->double_buffering; si->scroll_delay = TRUE; si->soft_scrolling = TRUE; - si->fading = FALSE; + si->fading = TRUE; si->autorecord = TRUE; si->show_titlescreen = TRUE; si->quick_doors = FALSE; diff --git a/src/game.c b/src/game.c index 4e4c901c..703cfa54 100644 --- a/src/game.c +++ b/src/game.c @@ -9924,8 +9924,26 @@ void GameActions() network_player_action_received = FALSE; #endif + /* when playing tape, read previously recorded player input from tape data */ recorded_player_action = (tape.playing ? TapePlayAction() : NULL); +#if 1 + /* TapePlayAction() may return NULL when toggling to "pause before death" */ + if (tape.pausing) + return; +#endif + +#if 0 + if (tape.playing) + { + if (recorded_player_action == NULL) + printf("!!! THIS SHOULD NOT HAPPEN !!!\n"); + else + printf("::: %05d: TAPE PLAYING: %08x\n", + FrameCounter, recorded_player_action[0]); + } +#endif + if (tape.set_centered_player) { game.centered_player_nr_next = tape.centered_player_nr_next; @@ -9972,6 +9990,12 @@ void GameActions() if (tape.recording) TapeRecordAction(tape_action); +#if 0 + if (tape.recording) + printf("::: %05d: TAPE RECORDING: %08x\n", + FrameCounter, tape_action[0]); +#endif + if (level.game_engine_type == GAME_ENGINE_TYPE_EM) { GameActions_EM_Main(); diff --git a/src/game_em/input.c b/src/game_em/input.c index 2c6c1faa..8ea8c04b 100644 --- a/src/game_em/input.c +++ b/src/game_em/input.c @@ -71,6 +71,22 @@ void GameActions_EM(byte action[MAX_PLAYERS], boolean warp_mode) { int i; +#if 0 + static int foo = -1; + + if (action[0] == 0 && foo != 0) + printf("KEY RELEASED @ %05d\n", FrameCounter); + + foo = action[0]; +#endif + +#if 0 +#if 1 + if (FrameCounter % 10 == 0) +#endif + printf("::: %05d: %lu, %d\n", FrameCounter, RandomEM, frame); +#endif + game_animscreen(); #if 1 diff --git a/src/screens.c b/src/screens.c index cd380873..8e09ecc9 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2804,8 +2804,8 @@ static struct TokenInfo setup_info_graphics[] = #if 0 { TYPE_SWITCH, &setup.soft_scrolling, "Soft Scrolling:" }, { TYPE_SWITCH, &setup.double_buffering,"Double-Buffering:" }, - { TYPE_SWITCH, &setup.fading, "Fading:" }, #endif + { TYPE_SWITCH, &setup.fading, "Fading:" }, { TYPE_SWITCH, &setup.quick_switch, "Quick Player Focus Switch:" }, { TYPE_SWITCH, &setup.quick_doors, "Quick Menu Doors:" }, { TYPE_SWITCH, &setup.show_titlescreen,"Show Title Screens:" }, diff --git a/src/tools.c b/src/tools.c index 7f5d5db6..05219bf9 100644 --- a/src/tools.c +++ b/src/tools.c @@ -438,7 +438,7 @@ void FadeExt(int fade_mask, int fade_mode) redraw_mask |= fade_mask; - if (fade_delay == 0) + if (!setup.fading || fade_delay == 0) { if (fade_mode == FADE_MODE_FADE_OUT) ClearRectangle(backbuffer, x, y, width, height); -- 2.34.1