X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=15be125214d49ff1bf163a85e7901056af9ce198;hb=e4b2e4f943c20af98956d30fd3014888e9f75416;hp=aa5b06b19231d47a7a5750b2b4891da63c75eeeb;hpb=d0c23c650700e594e103d368efad02887c8587dc;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index aa5b06b1..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)