X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=15be125214d49ff1bf163a85e7901056af9ce198;hb=e4b2e4f943c20af98956d30fd3014888e9f75416;hp=27e1733227f1bdad1ca511cf22eda1c2ec44c751;hpb=2a4f48a259cbb8cf1f4cc8d6c9a734b37446d118;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 27e17332..15be1252 100644 --- a/src/tape.c +++ b/src/tape.c @@ -459,6 +459,8 @@ void TapeDeactivateDisplayOff(boolean redraw_display) if (redraw_display) { RedrawPlayfield(); + + UpdateGameDoorValues(); DrawGameDoorValues(); } } @@ -538,8 +540,14 @@ void TapeErase(void) tape.length_frames = 0; tape.length_seconds = 0; + tape.score_tape_basename[0] = '\0'; + if (leveldir_current) - setString(&tape.level_identifier, leveldir_current->identifier); + { + strncpy(tape.level_identifier, leveldir_current->identifier, + MAX_FILENAME_LEN); + tape.level_identifier[MAX_FILENAME_LEN] = '\0'; + } tape.level_nr = level_nr; tape.pos[tape.counter].delay = 0; @@ -1158,12 +1166,7 @@ static boolean checkTapesFromSameLevel(struct TapeInfo *t1, struct TapeInfo *t2) static void CopyTape(struct TapeInfo *tape_from, struct TapeInfo *tape_to) { - if (tape_to->level_identifier != NULL) - checked_free(tape_to->level_identifier); - *tape_to = *tape_from; - - tape_to->level_identifier = getStringCopy(tape_from->level_identifier); } static void SwapTapes(struct TapeInfo *t1, struct TapeInfo *t2) @@ -1237,6 +1240,7 @@ void AutoPlayTapes(void) { "original tape", "em_random_bug", + "screen_34x34", NULL }; @@ -1244,6 +1248,7 @@ void AutoPlayTapes(void) { VERSION_IDENT(0,0,0,0), VERSION_IDENT(3,3,1,0), + VERSION_IDENT(0,0,0,0), -1 }; @@ -1251,6 +1256,7 @@ void AutoPlayTapes(void) { VERSION_IDENT(9,9,9,9), VERSION_IDENT(4,0,1,1), + VERSION_IDENT(4,2,2,0), -1 }; @@ -1258,6 +1264,7 @@ void AutoPlayTapes(void) { TAPE_PROPERTY_NONE, TAPE_PROPERTY_EM_RANDOM_BUG, + TAPE_PROPERTY_NONE, -1 }; @@ -1408,6 +1415,8 @@ void AutoPlayTapes(void) if (global.autoplay_mode == AUTOPLAY_MODE_FIX) { + boolean skip_patch = FALSE; + if (tape.engine_version < patch_version_first[patch_nr] || tape.engine_version > patch_version_last[patch_nr]) { @@ -1420,6 +1429,22 @@ void AutoPlayTapes(void) (tape.engine_version / 100 ) % 100, (tape.engine_version ) % 100); + skip_patch = TRUE; + } + + if (strEqual(patch_name[patch_nr], "screen_34x34") && + tape.num_participating_players == 1) + { + Print("Tape %03d %s[%02d:%02d]: (%s) - skipped.\n", + level_nr, tape_patch_info, + tape.length_seconds / 60, tape.length_seconds % 60, + "not suitable for single player tapes"); + + skip_patch = TRUE; + } + + if (skip_patch) + { if (patch_name[patch_nr + 1] != NULL) { // continue with next patch @@ -1434,7 +1459,15 @@ void AutoPlayTapes(void) continue; } - tape.property_bits |= patch_property_bit[patch_nr]; + if (strEqual(patch_name[patch_nr], "screen_34x34")) + { + tape.scr_fieldx = SCR_FIELDX_DEFAULT * 2; + tape.scr_fieldy = SCR_FIELDY_DEFAULT * 2; + } + else + { + tape.property_bits |= patch_property_bit[patch_nr]; + } } InitCounter();