From: Holger Schemel Date: Wed, 27 Nov 2024 19:40:28 +0000 (+0100) Subject: minor code change X-Git-Tag: 4.4.0.0-test-4~23 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f84516078b0c093cd45b8541f9f6fe6dc599ab2b;p=rocksndiamonds.git minor code change --- 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;