X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=642ce5c399d814bac1b65a967fe35aa09b306390;hb=a047db7b385f7523ca97deb21fdc504f34a80c7e;hp=f05a3b45d18b4499f8123bb4b0fa6c353e5ff361;hpb=d42e0a36609c7990f8b9f6fcd80f37f65bcf5149;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index f05a3b45..642ce5c3 100644 --- a/src/tape.c +++ b/src/tape.c @@ -420,8 +420,13 @@ void TapeRecordAction(byte action[MAX_PLAYERS]) { int i; +#if 1 + if (!tape.recording) /* record action even when tape is paused! */ + return; +#else if (!tape.recording || tape.pausing) return; +#endif if (tape.counter >= MAX_TAPELEN - 1) { @@ -429,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; @@ -448,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]; @@ -486,7 +500,9 @@ void TapeTogglePause(boolean toggle_manual) tape.quick_resume = FALSE; TapeAppendRecording(); +#if 0 TapeTogglePause(toggle_manual); +#endif } } } @@ -581,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(); @@ -636,8 +663,13 @@ static void TapeStopIndexSearch() SetDrawDeactivationMask(REDRAW_NONE); audio.sound_deactivated = FALSE; - RedrawPlayfield(TRUE, 0,0,0,0); - DrawGameDoorValues(); +#if 1 + if (game_status == GAME_MODE_PLAYING) +#endif + { + RedrawPlayfield(TRUE, 0,0,0,0); + DrawGameDoorValues(); + } } static void TapeSingleStep()