Allow for marking Emblems as "not a Medal" via SOC definition

Also remove long-unused `hint` string
This commit is contained in:
toaster 2022-12-13 17:48:35 +00:00
parent 47901939d5
commit ff1574f80f
3 changed files with 12 additions and 16 deletions

View file

@ -2124,14 +2124,6 @@ void reademblemdata(MYFILE *f, INT32 num)
word2 = tmp += 2;
value = atoi(word2); // used for numerical settings
// Up here to allow lowercase in hints
if (fastcmp(word, "HINT"))
{
while ((tmp = strchr(word2, '\\')))
*tmp = '\n';
deh_strlcpy(emblemlocations[num-1].hint, word2, sizeof (emblemlocations[num-1].hint), va("Emblem %d: hint", num));
continue;
}
strupr(word2);
if (fastcmp(word, "TYPE"))
@ -2172,6 +2164,8 @@ void reademblemdata(MYFILE *f, INT32 num)
emblemlocations[num-1].var = get_number(word2);
}
else if (fastcmp(word, "NOTMEDAL"))
emblemlocations[num-1].notMedal = (boolean)(i != 0 || word2[0] == 'T' || word2[0] == 'Y');
else
deh_warning("Emblem %d: unknown word '%s'", num, word);
}

View file

@ -1067,6 +1067,8 @@ INT32 M_CountMedals(boolean all)
INT32 found = 0, i;
for (i = 0; i < numemblems; ++i)
{
if (emblemlocations[i].notMedal)
continue;
if (!all && !gamedata->collected[i])
continue;
found++;

View file

@ -69,14 +69,14 @@ struct conditionset_t
struct emblem_t
{
UINT8 type; ///< Emblem type
INT16 tag; ///< Tag of emblem mapthing
char * level; ///< Level on which this emblem can be found.
UINT8 sprite; ///< emblem sprite to use, 0 - 25
UINT16 color; ///< skincolor to use
INT32 var; ///< If needed, specifies information on the target amount to achieve (or target skin)
char *stringVar; ///< String version
char hint[110]; ///< Hint for emblem hints menu
UINT8 type; ///< Emblem type
INT16 tag; ///< Tag of emblem mapthing
char * level; ///< Level on which this emblem can be found.
UINT8 sprite; ///< emblem sprite to use, 0 - 25
UINT16 color; ///< skincolor to use
INT32 var; ///< If needed, specifies information on the target amount to achieve (or target skin)
char *stringVar; ///< String version
boolean notMedal; ///< Not a Medal?
};
// Unlockable information