X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=72c7cc737aace49afc26e23555fa5004c160f27d;hb=d8e3568accbc475855027f7199e55543dc4d1ddf;hp=479adfbfc0f2cb4767f73cdc8d76f5f5b2f381b2;hpb=af07d74262e7d5075feaea67fa16c04c6be0e3f6;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 479adfbf..72c7cc73 100644 --- a/src/tape.c +++ b/src/tape.c @@ -734,7 +734,7 @@ static void TapeStartGameRecording() { TapeStartRecording(); -#if defined(PLATFORM_UNIX) +#if defined(NETWORK_AVALIABLE) if (options.network) SendToServer_StartPlaying(); else @@ -776,8 +776,10 @@ void TapeHaltRecording() void TapeStopRecording() { +#if 0 if (!tape.recording) return; +#endif TapeHaltRecording(); @@ -923,8 +925,10 @@ static void TapeStartGamePlaying() void TapeStopPlaying() { +#if 0 if (!tape.playing) return; +#endif tape.playing = FALSE; tape.pausing = FALSE; @@ -944,7 +948,7 @@ byte *TapePlayAction() if (!tape.playing || tape.pausing) return NULL; - if (tape.pause_before_death) /* STOP 10s BEFORE PLAYER GETS KILLED... */ + if (tape.pause_before_death) /* stop 10 seconds before player gets killed */ { if (!(FrameCounter % 20)) { @@ -962,9 +966,10 @@ byte *TapePlayAction() DrawVideoDisplay(VIDEO_STATE_WARP2_ON, VIDEO_DISPLAY_SYMBOL_ONLY); } - if (TimePlayed > tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH) + if (TapeTime > tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH) { TapeTogglePause(TAPE_TOGGLE_MANUAL); + return NULL; } } @@ -983,6 +988,7 @@ byte *TapePlayAction() DrawVideoDisplay(VIDEO_STATE_WARP2_ON, VIDEO_DISPLAY_SYMBOL_ONLY); } } + #if 0 /* !!! this makes things much slower !!! */ else if (tape.warp_forward) @@ -1152,13 +1158,19 @@ void TapeQuickSave() void TapeQuickLoad() { + char *filename = getTapeFilename(level_nr); + + if (!fileExists(filename)) + { + Request("No tape for this level !", REQ_CONFIRM); + + return; + } + if (tape.recording && !Request("Stop recording and load tape ?", REQ_ASK | REQ_STAY_CLOSED)) { - BlitBitmap(bitmap_db_door, bitmap_db_door, - DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, - DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1); - OpenDoor(DOOR_OPEN_1); + OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK); return; } @@ -1176,8 +1188,12 @@ void TapeQuickLoad() tape.quick_resume = TRUE; } - else - Request("No tape for this level !", REQ_CONFIRM); + else /* this should not happen (basically checked above) */ + { + int reopen_door = (game_status == GAME_MODE_PLAYING ? REQ_REOPEN : 0); + + Request("No tape for this level !", REQ_CONFIRM | reopen_door); + } } } @@ -1304,6 +1320,7 @@ void AutoPlayTape() printf("LEVELDIR '%s', SOLVED %d/%d (%d%%)", autoplay_leveldir->identifier, num_levels_solved, num_levels_played, (num_levels_played ? num_levels_solved * 100 / num_levels_played :0)); + if (num_levels_played != num_levels_solved) { printf(", FAILED:"); @@ -1311,6 +1328,7 @@ void AutoPlayTape() if (levels_failed[i]) printf(" %03d", i); } + printf("\n"); printf_line("=", 79); @@ -1558,9 +1576,15 @@ static void HandleTapeButtons(struct GadgetInfo *gi) } else /* AUTO PAUSE -> NORMAL PLAY */ { +#if 1 + if (tape.warp_forward) + TapeStopWarpForward(); +#else + tape.warp_forward = FALSE; +#endif tape.fast_forward = FALSE; tape.pause_before_death = FALSE; - tape.warp_forward = FALSE; + #if 1 DrawVideoDisplay(VIDEO_STATE_PBEND_OFF | VIDEO_STATE_PLAY_ON, 0); #else