mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-20 06:53:00 +00:00
Merge branch 'challenge-final' into 'master'
Challenges Final II See merge request KartKrew/Kart!2176
This commit is contained in:
commit
31afbef95a
9 changed files with 46 additions and 22 deletions
|
|
@ -207,7 +207,7 @@ void K_TimerInit(void)
|
|||
}
|
||||
else if (skipstats != 0 && bossintro == false)
|
||||
{
|
||||
S_StartSound(NULL, sfx_s26c); //sfx_endwrp
|
||||
S_StartSound(NULL, sfx_s26c);
|
||||
}
|
||||
|
||||
if ((gametyperules & (GTR_CATCHER|GTR_CIRCUIT)) == (GTR_CATCHER|GTR_CIRCUIT))
|
||||
|
|
|
|||
|
|
@ -1405,8 +1405,6 @@ extern struct challengesmenu_s {
|
|||
boolean chaokeyadd, keywasadded;
|
||||
UINT8 chaokeyhold;
|
||||
|
||||
boolean considersealedswapalert;
|
||||
|
||||
boolean requestflip;
|
||||
|
||||
UINT16 unlockcount[CMC_MAX];
|
||||
|
|
|
|||
|
|
@ -6417,9 +6417,9 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, UINT8 *flash
|
|||
|
||||
#ifdef DEVELOP
|
||||
if (cv_debugchallenges.value > 0 &&
|
||||
cv_debugchallenges.value != ref->conditionset)
|
||||
cv_debugchallenges.value != num+1)
|
||||
{
|
||||
// Searching for a conditionset, fade out any tiles
|
||||
// Searching for an unlockable ID, fade out any tiles
|
||||
// that don't match.
|
||||
tileflags = V_80TRANS;
|
||||
}
|
||||
|
|
@ -6749,7 +6749,7 @@ drawborder:
|
|||
// Display the conditionset for this tile.
|
||||
V_DrawThinString(x, y,
|
||||
ref->conditionset == cv_debugchallenges.value ? V_AQUAMAP : V_GRAYMAP,
|
||||
va("%u", ref->conditionset));
|
||||
va("%u", num+1));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -7508,6 +7508,10 @@ static void M_DrawChallengeKeys(INT32 tilex, INT32 tiley)
|
|||
|
||||
static void M_DrawChallengeScrollBar(UINT8 *flashmap)
|
||||
{
|
||||
#ifdef DEVELOP
|
||||
extern consvar_t cv_debugchallenges;
|
||||
#endif
|
||||
|
||||
const INT32 bary = 4, barh = 1, hiliw = 1;
|
||||
|
||||
if (!gamedata->challengegrid || !gamedata->challengegridwidth)
|
||||
|
|
@ -7574,7 +7578,21 @@ static void M_DrawChallengeScrollBar(UINT8 *flashmap)
|
|||
if (gamedata->challengegrid[i] >= MAXUNLOCKABLES)
|
||||
continue;
|
||||
|
||||
if (gamedata->unlocked[gamedata->challengegrid[i]] && completionamount != -1)
|
||||
#ifdef DEVELOP
|
||||
if (cv_debugchallenges.value > 0
|
||||
&& cv_debugchallenges.value == gamedata->challengegrid[i]+1)
|
||||
{
|
||||
V_DrawFill(barx + hilix, bary, hiliw, barh, (challengesmenu.ticker & 2) ? 0 : 32);
|
||||
|
||||
// The debug fill overrides everything else.
|
||||
completionamount = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (completionamount == -1)
|
||||
continue;
|
||||
|
||||
if (gamedata->unlocked[gamedata->challengegrid[i]])
|
||||
{
|
||||
completionamount += (10/CHALLENGEGRIDHEIGHT);
|
||||
|
||||
|
|
|
|||
|
|
@ -528,6 +528,7 @@ void M_PlayMenuJam(void)
|
|||
const char* overridetotrack[GDMUSIC_MAX-1] = {
|
||||
"KEYGEN",
|
||||
"LOSERC",
|
||||
"TRACKA",
|
||||
};
|
||||
|
||||
if (refMenu != NULL && NotCurrentlyPlaying(overridetotrack[override - 1]))
|
||||
|
|
@ -580,6 +581,9 @@ boolean M_ConsiderSealedSwapAlert(void)
|
|||
NULL, MM_NOTHING, NULL, NULL
|
||||
);
|
||||
|
||||
if (gamedata->musicstate < GDMUSIC_TRACK10)
|
||||
gamedata->musicstate = GDMUSIC_TRACK10;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
12
src/m_cond.c
12
src/m_cond.c
|
|
@ -3113,8 +3113,6 @@ boolean M_UpdateUnlockablesAndExtraEmblems(boolean loud, boolean doall)
|
|||
response++;
|
||||
}
|
||||
|
||||
response += newkeys;
|
||||
|
||||
// Announce
|
||||
if (response != 0)
|
||||
{
|
||||
|
|
@ -3124,6 +3122,16 @@ boolean M_UpdateUnlockablesAndExtraEmblems(boolean loud, boolean doall)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (newkeys != 0)
|
||||
{
|
||||
if (loud)
|
||||
{
|
||||
S_StartSound(NULL, sfx_keygen);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,6 +286,7 @@ typedef enum {
|
|||
GDMUSIC_KEYG,
|
||||
GDMUSIC_KEEPONMENU, // Minimum to keep after leaving the Challenge Grid
|
||||
GDMUSIC_LOSERCLUB = GDMUSIC_KEEPONMENU,
|
||||
GDMUSIC_TRACK10,
|
||||
GDMUSIC_MAX
|
||||
} gdmusic_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -361,7 +361,6 @@ menu_t *M_InterruptMenuWithChallenges(menu_t *desiredmenu)
|
|||
challengesmenu.requestnew = false;
|
||||
challengesmenu.chaokeyadd = false;
|
||||
challengesmenu.keywasadded = false;
|
||||
challengesmenu.considersealedswapalert = false;
|
||||
challengesmenu.chaokeyhold = 0;
|
||||
challengesmenu.unlockcondition = NULL;
|
||||
|
||||
|
|
@ -649,7 +648,7 @@ void M_ChallengesTick(void)
|
|||
|
||||
if (gamedata->keyspending > 0)
|
||||
{
|
||||
S_StartSound(NULL, sfx_achiev);
|
||||
S_StartSound(NULL, sfx_keygen);
|
||||
gamedata->keyspending--;
|
||||
gamedata->chaokeys++;
|
||||
challengesmenu.unlockcount[CMC_CHAOANIM]++;
|
||||
|
|
@ -707,9 +706,6 @@ void M_ChallengesTick(void)
|
|||
gamedata->unlocked[challengesmenu.currentunlock] = true;
|
||||
M_UpdateUnlockablesAndExtraEmblems(true, true);
|
||||
|
||||
if (ref->type == SECRET_SPECIALATTACK)
|
||||
challengesmenu.considersealedswapalert = true;
|
||||
|
||||
// Update shown description just in case..?
|
||||
if (challengesmenu.unlockcondition)
|
||||
Z_Free(challengesmenu.unlockcondition);
|
||||
|
|
@ -780,11 +776,7 @@ void M_ChallengesTick(void)
|
|||
// Fade decrease.
|
||||
if (--challengesmenu.fade == 0)
|
||||
{
|
||||
// Play music the moment control returns.
|
||||
M_PlayMenuJam();
|
||||
|
||||
if (challengesmenu.considersealedswapalert == true
|
||||
&& M_ConsiderSealedSwapAlert() == true)
|
||||
if (M_ConsiderSealedSwapAlert() == true)
|
||||
{
|
||||
// No keygen tutorial in this case...
|
||||
// not ideal but at least unlikely to
|
||||
|
|
@ -795,6 +787,9 @@ void M_ChallengesTick(void)
|
|||
{
|
||||
M_ChallengesTutorial(CCTUTORIAL_KEYGEN);
|
||||
}
|
||||
|
||||
// Play music the moment control returns.
|
||||
M_PlayMenuJam();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1102,8 +1102,8 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"typri2", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // SA2 final boss-type typewriting
|
||||
{"eggspr", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Sonic Unleashed Trap Spring
|
||||
{"achiev", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Achievement"},
|
||||
{"gpmetr", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // End of a "Tutorial Teleport"
|
||||
{"endwrp", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // End of a "Tutorial Teleport"
|
||||
{"keygen", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Key Generated"},
|
||||
{"gpmetr", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
||||
// SRB2Kart - Ring Box
|
||||
{"slot00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bar"},
|
||||
|
|
|
|||
|
|
@ -1170,8 +1170,8 @@ typedef enum
|
|||
sfx_typri2,
|
||||
sfx_eggspr,
|
||||
sfx_achiev,
|
||||
sfx_keygen,
|
||||
sfx_gpmetr,
|
||||
sfx_endwrp,
|
||||
|
||||
// SRB2Kart - Ring Box
|
||||
sfx_slot00,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue