From: Holger Schemel Date: Sun, 12 Jun 2022 17:39:20 +0000 (+0200) Subject: added printing envelope text when dumping level in debug mode X-Git-Tag: 4.3.2.2~4 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=be87135dee857f298379bf68ea26f9fec49890b8;p=rocksndiamonds.git added printing envelope text when dumping level in debug mode --- diff --git a/src/files.c b/src/files.c index 4a980dff..5c8b149d 100644 --- a/src/files.c +++ b/src/files.c @@ -7798,6 +7798,28 @@ void DumpLevel(struct LevelInfo *level) Print("use step counter: %s\n", (level->use_step_counter ? "yes" : "no")); Print("rate time over score: %s\n", (level->rate_time_over_score ? "yes" : "no")); + if (options.debug) + { + int i, j; + + for (i = 0; i < NUM_ENVELOPES; i++) + { + char *text = level->envelope[i].text; + int text_len = strlen(text); + boolean has_text = FALSE; + + for (j = 0; j < text_len; j++) + if (text[j] != ' ' && text[j] != '\n') + has_text = TRUE; + + if (has_text) + { + Print("\n"); + Print("Envelope %d:\n'%s'\n", i + 1, text); + } + } + } + PrintLine("-", 79); }