From a047db7b385f7523ca97deb21fdc504f34a80c7e Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 14 Mar 2004 23:06:45 +0100 Subject: [PATCH] rnd-20040314-1-src --- src/conftime.h | 2 +- src/game.c | 20 ++++++++++++++++++++ src/tape.c | 22 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/conftime.h b/src/conftime.h index 5189ebef..7438bad0 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-03-13 16:17]" +#define COMPILE_DATE_STRING "[2004-03-14 22:31]" diff --git a/src/game.c b/src/game.c index 88e92d03..0e84aa84 100644 --- a/src/game.c +++ b/src/game.c @@ -7576,6 +7576,15 @@ void GameActions() recorded_player_action = (tape.playing ? TapePlayAction() : NULL); #if 1 + if (recorded_player_action == NULL && tape.pausing) + return; +#endif + +#if 0 + printf("::: %d\n", stored_player[0].action); +#endif + +#if 0 if (recorded_player_action != NULL) for (i = 0; i < MAX_PLAYERS; i++) stored_player[i].action = recorded_player_action[i]; @@ -7597,6 +7606,12 @@ void GameActions() if (!options.network && !setup.team_mode) local_player->effective_action = summarized_player_action; +#if 1 + if (recorded_player_action != NULL) + for (i = 0; i < MAX_PLAYERS; i++) + stored_player[i].effective_action = recorded_player_action[i]; +#endif + #if 1 for (i = 0; i < MAX_PLAYERS; i++) { @@ -7632,6 +7647,11 @@ void GameActions() actual_player_action = stored_player[i].programmed_action; #endif +#if 0 + if (stored_player[i].programmed_action) + printf("::: %d\n", stored_player[i].programmed_action); +#endif + if (recorded_player_action) { #if 0 diff --git a/src/tape.c b/src/tape.c index 36748a7e..642ce5c3 100644 --- a/src/tape.c +++ b/src/tape.c @@ -434,6 +434,10 @@ void TapeRecordAction(byte action[MAX_PLAYERS]) return; } +#if 0 + printf("::: %05d: recording action: %d\n", FrameCounter, action[0]); +#endif + if (tape.pos[tape.counter].delay > 0) /* already stored action */ { boolean changed_events = FALSE; @@ -453,6 +457,11 @@ void TapeRecordAction(byte action[MAX_PLAYERS]) if (tape.pos[tape.counter].delay == 0) /* store new action */ { + +#if 0 + printf("::: %05d: new sequence\n", FrameCounter); +#endif + for (i = 0; i < MAX_PLAYERS; i++) tape.pos[tape.counter].action[i] = action[i]; @@ -491,7 +500,9 @@ void TapeTogglePause(boolean toggle_manual) tape.quick_resume = FALSE; TapeAppendRecording(); +#if 0 TapeTogglePause(toggle_manual); +#endif } } } @@ -586,11 +597,22 @@ byte *TapePlayAction() tape.delay_played = 0; } +#if 0 + printf("::: %05d: replaying action: %d\n", FrameCounter, action[0]); +#endif + return action; } void TapeStop() { +#if 0 + if (tape.recording) + printf("::: stopped recording: %d\n", FrameCounter); + else if (tape.playing) + printf("::: stopped playing: %d\n\n", FrameCounter); +#endif + TapeStopRecording(); TapeStopPlaying(); -- 2.34.1