mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
"showconditionset" option for Unlockables and Extra Emblems. See merge request (coming shortly) for full description/prompt.
This commit is contained in:
parent
508feaad9d
commit
f602e5bfb7
3 changed files with 18 additions and 8 deletions
|
@ -3195,6 +3195,8 @@ static void readextraemblemdata(MYFILE *f, INT32 num)
|
|||
sizeof (extraemblems[num-1].description), va("Extra emblem %d: objective", num));
|
||||
else if (fastcmp(word, "CONDITIONSET"))
|
||||
extraemblems[num-1].conditionset = (UINT8)value;
|
||||
else if (fastcmp(word, "SHOWCONDITIONSET"))
|
||||
extraemblems[num-1].showconditionset = (UINT8)value;
|
||||
else
|
||||
{
|
||||
strupr(word2);
|
||||
|
@ -3281,6 +3283,8 @@ static void readunlockable(MYFILE *f, INT32 num)
|
|||
unlockables[num].height = (UINT16)i;
|
||||
else if (fastcmp(word, "CONDITIONSET"))
|
||||
unlockables[num].conditionset = (UINT8)i;
|
||||
else if (fastcmp(word, "SHOWCONDITIONSET"))
|
||||
unlockables[num].showconditionset = (UINT8)i;
|
||||
else if (fastcmp(word, "NOCECHO"))
|
||||
unlockables[num].nocecho = (UINT8)(i || word2[0] == 'T' || word2[0] == 'Y');
|
||||
else if (fastcmp(word, "NOCHECKLIST"))
|
||||
|
|
|
@ -98,8 +98,9 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
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.
|
||||
UINT8 showconditionset; ///< Condition set that shows this emblem.
|
||||
UINT8 sprite; ///< emblem sprite to use, 0 - 25
|
||||
UINT8 color; ///< skincolor to use
|
||||
UINT8 collected; ///< Do you have this emblem?
|
||||
|
@ -112,6 +113,7 @@ typedef struct
|
|||
char objective[64];
|
||||
UINT16 height; // menu height
|
||||
UINT8 conditionset;
|
||||
UINT8 showconditionset;
|
||||
INT16 type;
|
||||
INT16 variable;
|
||||
UINT8 nocecho;
|
||||
|
|
|
@ -6685,7 +6685,8 @@ static void M_DrawChecklist(void)
|
|||
while (i < MAXUNLOCKABLES)
|
||||
{
|
||||
if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist
|
||||
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS)
|
||||
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS
|
||||
|| (!unlockables[i].unlocked && unlockables[i].showconditionset && !M_Achieved(unlockables[i].showconditionset)))
|
||||
continue;
|
||||
|
||||
V_DrawString(currentMenu->x, y, ((unlockables[i].unlocked) ? V_GREENMAP : V_TRANSLUCENT)|V_ALLOWLOWERCASE, ((unlockables[i].unlocked || !unlockables[i].nochecklist) ? unlockables[i].name : M_CreateSecretMenuOption(unlockables[i].name)));
|
||||
|
@ -8901,7 +8902,10 @@ static void M_DrawStatsMaps(int location)
|
|||
else
|
||||
V_DrawSmallScaledPatch(292, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
|
||||
|
||||
V_DrawString(20, y, V_YELLOWMAP|V_ALLOWLOWERCASE, va("%s", exemblem->description));
|
||||
V_DrawString(20, y, V_YELLOWMAP|V_ALLOWLOWERCASE,
|
||||
(!exemblem->collected && exemblem->showconditionset && !M_Achieved(exemblem->showconditionset))
|
||||
? M_CreateSecretMenuOption(exemblem->description)
|
||||
: exemblem->description);
|
||||
}
|
||||
|
||||
y += 8;
|
||||
|
|
Loading…
Reference in a new issue