Change data type of conditionset and showconditionset in unlockable_t and extraemblem_t

This commit is contained in:
Lactozilla 2024-05-20 00:59:24 -03:00
parent 46711f2315
commit 2fb04b8a93
2 changed files with 12 additions and 12 deletions

View file

@ -3127,9 +3127,9 @@ void readextraemblemdata(MYFILE *f, INT32 num)
deh_strlcpy(extraemblems[num-1].description, word2, deh_strlcpy(extraemblems[num-1].description, word2,
sizeof (extraemblems[num-1].description), va("Extra emblem %d: objective", num)); sizeof (extraemblems[num-1].description), va("Extra emblem %d: objective", num));
else if (fastcmp(word, "CONDITIONSET")) else if (fastcmp(word, "CONDITIONSET"))
extraemblems[num-1].conditionset = (UINT8)value; extraemblems[num-1].conditionset = (UINT16)value;
else if (fastcmp(word, "SHOWCONDITIONSET")) else if (fastcmp(word, "SHOWCONDITIONSET"))
extraemblems[num-1].showconditionset = (UINT8)value; extraemblems[num-1].showconditionset = (UINT16)value;
else else
{ {
strupr(word2); strupr(word2);
@ -3215,9 +3215,9 @@ void readunlockable(MYFILE *f, INT32 num)
if (fastcmp(word, "HEIGHT")) if (fastcmp(word, "HEIGHT"))
unlockables[num].height = (UINT16)i; unlockables[num].height = (UINT16)i;
else if (fastcmp(word, "CONDITIONSET")) else if (fastcmp(word, "CONDITIONSET"))
unlockables[num].conditionset = (UINT8)i; unlockables[num].conditionset = (UINT16)i;
else if (fastcmp(word, "SHOWCONDITIONSET")) else if (fastcmp(word, "SHOWCONDITIONSET"))
unlockables[num].showconditionset = (UINT8)i; unlockables[num].showconditionset = (UINT16)i;
else if (fastcmp(word, "NOCECHO")) else if (fastcmp(word, "NOCECHO"))
unlockables[num].nocecho = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y'); unlockables[num].nocecho = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y');
else if (fastcmp(word, "NOCHECKLIST")) else if (fastcmp(word, "NOCHECKLIST"))

View file

@ -99,12 +99,12 @@ typedef struct
} emblem_t; } emblem_t;
typedef struct typedef struct
{ {
char name[20]; ///< Name of the goal (used in the "emblem awarded" cecho) char name[20]; ///< Name of the goal (used in the "emblem awarded" cecho)
char description[40]; ///< Description of goal (used in statistics) char description[40]; ///< Description of goal (used in statistics)
UINT8 conditionset; ///< Condition set that awards this emblem. UINT16 conditionset; ///< Condition set that awards this emblem.
UINT8 showconditionset; ///< Condition set that shows this emblem. UINT16 showconditionset; ///< Condition set that shows this emblem.
UINT8 sprite; ///< emblem sprite to use, 0 - 25 UINT8 sprite; ///< emblem sprite to use, 0 - 25
UINT16 color; ///< skincolor to use UINT16 color; ///< skincolor to use
} extraemblem_t; } extraemblem_t;
// Unlockable information // Unlockable information
@ -113,8 +113,8 @@ typedef struct
char name[64]; char name[64];
char objective[64]; char objective[64];
UINT16 height; // menu height UINT16 height; // menu height
UINT8 conditionset; UINT16 conditionset;
UINT8 showconditionset; UINT16 showconditionset;
INT16 type; INT16 type;
INT16 variable; INT16 variable;
char *stringVar; char *stringVar;