From 66d8d8757e9e7eeafc3ee841f3eaab3fdbca0008 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 21 Apr 2023 15:09:49 +0100 Subject: [PATCH] emblem_t: Add var2/stringVar2 --- src/deh_soc.c | 10 ++++++++++ src/m_cond.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/deh_soc.c b/src/deh_soc.c index 38b2fae56..54830f217 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -143,6 +143,9 @@ void clear_emblems(void) Z_Free(emblemlocations[i].stringVar); emblemlocations[i].stringVar = NULL; + + Z_Free(emblemlocations[i].stringVar2); + emblemlocations[i].stringVar2 = NULL; } memset(&emblemlocations, 0, sizeof(emblemlocations)); @@ -2201,6 +2204,13 @@ void reademblemdata(MYFILE *f, INT32 num) emblemlocations[num-1].var = get_number(word2); } + else if (fastcmp(word, "VAR2")) + { + Z_Free(emblemlocations[num-1].stringVar2); + emblemlocations[num-1].stringVar2 = Z_StrDup(word2); + + emblemlocations[num-1].var2 = get_number(word2); + } else if (fastcmp(word, "FLAGS")) emblemlocations[num-1].flags = get_number(word2); else diff --git a/src/m_cond.h b/src/m_cond.h index a53e66ad7..a34825bc2 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -147,7 +147,9 @@ struct emblem_t UINT16 color; ///< skincolor to use INT32 flags; ///< GE or ME constants INT32 var; ///< If needed, specifies extra information + INT32 var2; ///< Ditto char *stringVar; ///< String version + char *stringVar2; ///< Ditto }; // Unlockable information