X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=642ce5c399d814bac1b65a967fe35aa09b306390;hb=a047db7b385f7523ca97deb21fdc504f34a80c7e;hp=410ebb238b55612d99a73d2a402d4a2d32dfde40;hpb=5df470717980e8b1e8648a536ca620e4ca52a170;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 410ebb23..642ce5c3 100644 --- a/src/tape.c +++ b/src/tape.c @@ -50,7 +50,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS]; #define VIDEO_DATE_LABEL_YPOS (VIDEO_DISPLAY1_YPOS) #define VIDEO_DATE_LABEL_XSIZE (VIDEO_DISPLAY_XSIZE) #define VIDEO_DATE_LABEL_YSIZE (VIDEO_DISPLAY_YSIZE) -#define VIDEO_DATE_XPOS (VIDEO_DISPLAY1_XPOS + 1) +#define VIDEO_DATE_XPOS (VIDEO_DISPLAY1_XPOS + 2) #define VIDEO_DATE_YPOS (VIDEO_DISPLAY1_YPOS + 14) #define VIDEO_DATE_XSIZE (VIDEO_DISPLAY_XSIZE) #define VIDEO_DATE_YSIZE 16 @@ -78,7 +78,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS]; #define VIDEO_PAUSE_SYMBOL_YPOS (VIDEO_DISPLAY2_YPOS) #define VIDEO_PAUSE_SYMBOL_XSIZE 17 #define VIDEO_PAUSE_SYMBOL_YSIZE 13 -#define VIDEO_TIME_XPOS (VIDEO_DISPLAY2_XPOS + 38) +#define VIDEO_TIME_XPOS (VIDEO_DISPLAY2_XPOS + 39) #define VIDEO_TIME_YPOS (VIDEO_DISPLAY2_YPOS + 14) #define VIDEO_TIME_XSIZE 50 #define VIDEO_TIME_YSIZE 16 @@ -177,7 +177,7 @@ void DrawVideoDisplay(unsigned long state, unsigned long value) VY + VIDEO_REC_LABEL_YPOS); } - for(i=0;i<10;i++) + for (i = 0; i < 10; i++) { if (state & (1<identifier); + tape.level_nr = level_nr; tape.pos[tape.counter].delay = 0; tape.changed = TRUE; @@ -313,7 +316,12 @@ void TapeErase() tape.game_version = GAME_VERSION_ACTUAL; tape.engine_version = level.game_version; - for(i=0; i= MAX_TAPELEN - 1) { @@ -421,11 +434,15 @@ 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; - for(i=0; ifirst_level; - printf_line('=', 79); + printf_line("=", 79); printf("Automatically playing level tapes\n"); - printf_line('-', 79); + printf_line("-", 79); printf("Level series identifier: '%s'\n", autoplay_leveldir->identifier); printf("Level series name: '%s'\n", autoplay_leveldir->name); printf("Level series author: '%s'\n", autoplay_leveldir->author); printf("Number of levels: %d\n", autoplay_leveldir->levels); - printf_line('=', 79); + printf_line("=", 79); printf("\n"); - for (i=0; iidentifier, num_levels_solved, num_levels_played, - num_levels_solved * 100 / num_levels_played); + (num_levels_played ? num_levels_solved * 100 / num_levels_played :0)); if (num_levels_played != num_levels_solved) { printf(", FAILED:"); - for (i=0; i