From f84516078b0c093cd45b8541f9f6fe6dc599ab2b Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 27 Nov 2024 20:40:28 +0100 Subject: [PATCH] minor code change --- src/files.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/files.c b/src/files.c index d13e44be..2b7af216 100644 --- a/src/files.c +++ b/src/files.c @@ -9947,9 +9947,17 @@ void DumpTape(struct TapeInfo *tape) return; } + int year2 = tape->date / 10000; + int year4 = (year2 < 70 ? 2000 + year2 : 1900 + year2); + int month_index_raw = (tape->date / 100) % 100; + int month_index = month_index_raw % 12; // prevent invalid index + int month = month_index + 1; + int day = tape->date % 100; + PrintLine("-", 79); Print("Tape of level set '%s', level %03d\n", tape->level_identifier, tape->level_nr); + Print("- tape date: %04d-%02d-%02d\n", year4, month, day); Print("- file version: %s\n", getVersionString(tape->file_version)); Print("- game version: %s\n", getVersionString(tape->game_version)); Print("- engine version: %s\n", getVersionString(tape->engine_version)); @@ -9980,15 +9988,6 @@ void DumpTape(struct TapeInfo *tape) Print("[small_graphics]"); Print("\n"); - int year2 = tape->date / 10000; - int year4 = (year2 < 70 ? 2000 + year2 : 1900 + year2); - int month_index_raw = (tape->date / 100) % 100; - int month_index = month_index_raw % 12; // prevent invalid index - int month = month_index + 1; - int day = tape->date % 100; - - Print("- tape date: %04d-%02d-%02d\n", year4, month, day); - PrintLine("-", 79); tape_frame_counter = 0; -- 2.34.1