X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=44bbc57bcbe440274f30575c61e5f462207c19ce;hb=c5a7bf958a0d27d4adf56afea16aff5d9026bd1f;hp=8771feddef94b86889ce4d2bcb7fc8fbf762a4b3;hpb=b4972331ee89ad1a930c3e78ea26562720f64805;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 8771fedd..44bbc57b 100644 --- a/src/tape.c +++ b/src/tape.c @@ -18,6 +18,7 @@ #include "tools.h" #include "files.h" #include "network.h" +#include "cartoons.h" /* tape button identifiers */ #define TAPE_CTRL_ID_EJECT 0 @@ -315,13 +316,17 @@ void TapeStartRecording() void TapeStopRecording() { +#if 0 int i; +#endif if (!tape.recording) return; +#if 0 for(i=0; i= MAX_TAPELEN-1) + { + TapeStopRecording(); + return; + } + + if (tape.pos[tape.counter].delay > 0) /* already stored action */ + { + boolean changed_events = FALSE; + + for(i=0; i= 255) + { + tape.counter++; + tape.pos[tape.counter].delay = 0; + } + else + tape.pos[tape.counter].delay++; + } + + if (tape.pos[tape.counter].delay == 0) /* store new action */ + { + for(i=0; i tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH) + { + TapeTogglePause(); + return NULL; + } + } + + if (tape.counter >= tape.length) + { + TapeStop(); + return NULL; + } + + for(i=0; i= tape.pos[tape.counter].delay) + { + tape.counter++; + tape.delay_played = 0; + } + + return action; +} +#endif + +#if 0 boolean TapePlayDelay() { if (!tape.playing || tape.pausing) @@ -494,6 +599,14 @@ boolean TapePlayDelay() return(FALSE); } +#else + +boolean TapePlayDelay() +{ + return TRUE|FALSE; /* ...it doesn't matter at all */ +} +#endif + void TapeStop() { TapeStopRecording(); @@ -675,6 +788,7 @@ static void HandleTapeButtons(struct GadgetInfo *gi) #endif { game_status = PLAYING; + StopAnimation(); InitGame(); } } @@ -703,6 +817,7 @@ static void HandleTapeButtons(struct GadgetInfo *gi) TapeStartPlaying(); game_status = PLAYING; + StopAnimation(); InitGame(); } else if (tape.playing)