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));
|
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 = (UINT8)value;
|
||||||
|
else if (fastcmp(word, "SHOWCONDITIONSET"))
|
||||||
|
extraemblems[num-1].showconditionset = (UINT8)value;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strupr(word2);
|
strupr(word2);
|
||||||
|
@ -3281,6 +3283,8 @@ static void readunlockable(MYFILE *f, INT32 num)
|
||||||
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 = (UINT8)i;
|
||||||
|
else if (fastcmp(word, "SHOWCONDITIONSET"))
|
||||||
|
unlockables[num].showconditionset = (UINT8)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"))
|
||||||
|
|
14
src/m_cond.h
14
src/m_cond.h
|
@ -97,12 +97,13 @@ 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.
|
UINT8 conditionset; ///< Condition set that awards this emblem.
|
||||||
UINT8 sprite; ///< emblem sprite to use, 0 - 25
|
UINT8 showconditionset; ///< Condition set that shows this emblem.
|
||||||
UINT8 color; ///< skincolor to use
|
UINT8 sprite; ///< emblem sprite to use, 0 - 25
|
||||||
UINT8 collected; ///< Do you have this emblem?
|
UINT8 color; ///< skincolor to use
|
||||||
|
UINT8 collected; ///< Do you have this emblem?
|
||||||
} extraemblem_t;
|
} extraemblem_t;
|
||||||
|
|
||||||
// Unlockable information
|
// Unlockable information
|
||||||
|
@ -112,6 +113,7 @@ typedef struct
|
||||||
char objective[64];
|
char objective[64];
|
||||||
UINT16 height; // menu height
|
UINT16 height; // menu height
|
||||||
UINT8 conditionset;
|
UINT8 conditionset;
|
||||||
|
UINT8 showconditionset;
|
||||||
INT16 type;
|
INT16 type;
|
||||||
INT16 variable;
|
INT16 variable;
|
||||||
UINT8 nocecho;
|
UINT8 nocecho;
|
||||||
|
|
|
@ -6685,7 +6685,8 @@ static void M_DrawChecklist(void)
|
||||||
while (i < MAXUNLOCKABLES)
|
while (i < MAXUNLOCKABLES)
|
||||||
{
|
{
|
||||||
if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist
|
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;
|
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)));
|
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
|
else
|
||||||
V_DrawSmallScaledPatch(292, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
|
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;
|
y += 8;
|
||||||
|
|
Loading…
Reference in a new issue