From 2fb04b8a93017afdf70a2a55a96a2aff5c10fa1f Mon Sep 17 00:00:00 2001
From: Lactozilla <jp6781615@gmail.com>
Date: Mon, 20 May 2024 00:59:24 -0300
Subject: [PATCH] Change data type of conditionset and showconditionset in
 unlockable_t and extraemblem_t

---
 src/deh_soc.c |  8 ++++----
 src/m_cond.h  | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/deh_soc.c b/src/deh_soc.c
index e28352e84a..e071defb43 100644
--- a/src/deh_soc.c
+++ b/src/deh_soc.c
@@ -3127,9 +3127,9 @@ void readextraemblemdata(MYFILE *f, INT32 num)
 				deh_strlcpy(extraemblems[num-1].description, word2,
 					sizeof (extraemblems[num-1].description), va("Extra emblem %d: objective", num));
 			else if (fastcmp(word, "CONDITIONSET"))
-				extraemblems[num-1].conditionset = (UINT8)value;
+				extraemblems[num-1].conditionset = (UINT16)value;
 			else if (fastcmp(word, "SHOWCONDITIONSET"))
-				extraemblems[num-1].showconditionset = (UINT8)value;
+				extraemblems[num-1].showconditionset = (UINT16)value;
 			else
 			{
 				strupr(word2);
@@ -3215,9 +3215,9 @@ void readunlockable(MYFILE *f, INT32 num)
 				if (fastcmp(word, "HEIGHT"))
 					unlockables[num].height = (UINT16)i;
 				else if (fastcmp(word, "CONDITIONSET"))
-					unlockables[num].conditionset = (UINT8)i;
+					unlockables[num].conditionset = (UINT16)i;
 				else if (fastcmp(word, "SHOWCONDITIONSET"))
-					unlockables[num].showconditionset = (UINT8)i;
+					unlockables[num].showconditionset = (UINT16)i;
 				else if (fastcmp(word, "NOCECHO"))
 					unlockables[num].nocecho = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y');
 				else if (fastcmp(word, "NOCHECKLIST"))
diff --git a/src/m_cond.h b/src/m_cond.h
index db98f66586..3f8288fcad 100644
--- a/src/m_cond.h
+++ b/src/m_cond.h
@@ -99,12 +99,12 @@ typedef struct
 } emblem_t;
 typedef struct
 {
-	char name[20];          ///< Name of the goal (used in the "emblem awarded" cecho)
-	char description[40];   ///< Description of goal (used in statistics)
-	UINT8 conditionset;     ///< Condition set that awards this emblem.
-	UINT8 showconditionset; ///< Condition set that shows this emblem.
-	UINT8 sprite;           ///< emblem sprite to use, 0 - 25
-	UINT16 color;           ///< skincolor to use
+	char name[20];           ///< Name of the goal (used in the "emblem awarded" cecho)
+	char description[40];    ///< Description of goal (used in statistics)
+	UINT16 conditionset;     ///< Condition set that awards this emblem.
+	UINT16 showconditionset; ///< Condition set that shows this emblem.
+	UINT8 sprite;            ///< emblem sprite to use, 0 - 25
+	UINT16 color;            ///< skincolor to use
 } extraemblem_t;
 
 // Unlockable information
@@ -113,8 +113,8 @@ typedef struct
 	char name[64];
 	char objective[64];
 	UINT16 height; // menu height
-	UINT8 conditionset;
-	UINT8 showconditionset;
+	UINT16 conditionset;
+	UINT16 showconditionset;
 	INT16 type;
 	INT16 variable;
 	char *stringVar;
-- 
GitLab