X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=44bbc57bcbe440274f30575c61e5f462207c19ce;hb=322297d68005c08b35e7c309a841553b73259a9c;hp=01948ed9e7f14ddf55f27698cb9e171dbbca544d;hpb=681721dddc91bcdaef50002d1e861cc8d484e938;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 01948ed9..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 @@ -77,7 +78,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS]; #define VIDEO_TIME_YSIZE 16 /* special */ -#define VIDEO_PBEND_LABEL_XPOS 6 +#define VIDEO_PBEND_LABEL_XPOS 5 #define VIDEO_PBEND_LABEL_YPOS 220 #define VIDEO_PBEND_LABEL_XSIZE 35 #define VIDEO_PBEND_LABEL_YSIZE 30 @@ -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)