Merge branch 'perfectra' into 'master'

Record Attack perfect bonus stuff

Closes #457

See merge request STJr/SRB2Internal!607
This commit is contained in:
MascaraSnake 2019-12-05 17:02:38 -05:00
commit 69da1a7733
3 changed files with 8 additions and 3 deletions

View file

@ -466,7 +466,8 @@ extern recorddata_t *mainrecords[NUMMAPS];
#define MV_ALLEMERALDS 4 #define MV_ALLEMERALDS 4
#define MV_ULTIMATE 8 #define MV_ULTIMATE 8
#define MV_PERFECT 16 #define MV_PERFECT 16
#define MV_MAX 31 // used in gamedata check #define MV_PERFECTRA 32
#define MV_MAX 63 // used in gamedata check, update whenever MV's are added
#define MV_MP 128 #define MV_MP 128
extern UINT8 mapvisited[NUMMAPS]; extern UINT8 mapvisited[NUMMAPS];

View file

@ -3233,9 +3233,13 @@ static void G_UpdateVisited(void)
// eh, what the hell // eh, what the hell
if (ultimatemode) if (ultimatemode)
mapvisited[gamemap-1] |= MV_ULTIMATE; mapvisited[gamemap-1] |= MV_ULTIMATE;
// may seem incorrect but IS possible in what the main game uses as special stages, and nummaprings will be -1 in NiGHTS // may seem incorrect but IS possible in what the main game uses as mp special stages, and nummaprings will be -1 in NiGHTS
if (nummaprings > 0 && players[consoleplayer].rings >= nummaprings) if (nummaprings > 0 && players[consoleplayer].rings >= nummaprings)
{
mapvisited[gamemap-1] |= MV_PERFECT; mapvisited[gamemap-1] |= MV_PERFECT;
if (modeattacking)
mapvisited[gamemap-1] |= MV_PERFECTRA;
}
if (!spec) if (!spec)
{ {
// not available to special stages because they can only really be done in one order in an unmodified game, so impossible for first six and trivial for seventh // not available to special stages because they can only really be done in one order in an unmodified game, so impossible for first six and trivial for seventh

View file

@ -9236,7 +9236,7 @@ void M_DrawTimeAttackMenu(void)
V_DrawString(104-72, 73+lsheadingheight/2, V_YELLOWMAP, "RINGS:"); V_DrawString(104-72, 73+lsheadingheight/2, V_YELLOWMAP, "RINGS:");
V_DrawRightAlignedString(104+64, 73+lsheadingheight/2, V_ALLOWLOWERCASE|((mapvisited[cv_nextmap.value-1] & MV_PERFECT) ? V_YELLOWMAP : 0), beststr); V_DrawRightAlignedString(104+64, 73+lsheadingheight/2, V_ALLOWLOWERCASE|((mapvisited[cv_nextmap.value-1] & MV_PERFECTRA) ? V_YELLOWMAP : 0), beststr);
V_DrawRightAlignedString(104+72, 83+lsheadingheight/2, V_ALLOWLOWERCASE, reqrings); V_DrawRightAlignedString(104+72, 83+lsheadingheight/2, V_ALLOWLOWERCASE, reqrings);
} }