mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-21 07:22:33 +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)
|
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))
|
if ((gametyperules & (GTR_CATCHER|GTR_CIRCUIT)) == (GTR_CATCHER|GTR_CIRCUIT))
|
||||||
|
|
|
||||||
|
|
@ -1405,8 +1405,6 @@ extern struct challengesmenu_s {
|
||||||
boolean chaokeyadd, keywasadded;
|
boolean chaokeyadd, keywasadded;
|
||||||
UINT8 chaokeyhold;
|
UINT8 chaokeyhold;
|
||||||
|
|
||||||
boolean considersealedswapalert;
|
|
||||||
|
|
||||||
boolean requestflip;
|
boolean requestflip;
|
||||||
|
|
||||||
UINT16 unlockcount[CMC_MAX];
|
UINT16 unlockcount[CMC_MAX];
|
||||||
|
|
|
||||||
|
|
@ -6417,9 +6417,9 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, UINT8 *flash
|
||||||
|
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
if (cv_debugchallenges.value > 0 &&
|
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.
|
// that don't match.
|
||||||
tileflags = V_80TRANS;
|
tileflags = V_80TRANS;
|
||||||
}
|
}
|
||||||
|
|
@ -6749,7 +6749,7 @@ drawborder:
|
||||||
// Display the conditionset for this tile.
|
// Display the conditionset for this tile.
|
||||||
V_DrawThinString(x, y,
|
V_DrawThinString(x, y,
|
||||||
ref->conditionset == cv_debugchallenges.value ? V_AQUAMAP : V_GRAYMAP,
|
ref->conditionset == cv_debugchallenges.value ? V_AQUAMAP : V_GRAYMAP,
|
||||||
va("%u", ref->conditionset));
|
va("%u", num+1));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -7508,6 +7508,10 @@ static void M_DrawChallengeKeys(INT32 tilex, INT32 tiley)
|
||||||
|
|
||||||
static void M_DrawChallengeScrollBar(UINT8 *flashmap)
|
static void M_DrawChallengeScrollBar(UINT8 *flashmap)
|
||||||
{
|
{
|
||||||
|
#ifdef DEVELOP
|
||||||
|
extern consvar_t cv_debugchallenges;
|
||||||
|
#endif
|
||||||
|
|
||||||
const INT32 bary = 4, barh = 1, hiliw = 1;
|
const INT32 bary = 4, barh = 1, hiliw = 1;
|
||||||
|
|
||||||
if (!gamedata->challengegrid || !gamedata->challengegridwidth)
|
if (!gamedata->challengegrid || !gamedata->challengegridwidth)
|
||||||
|
|
@ -7574,7 +7578,21 @@ static void M_DrawChallengeScrollBar(UINT8 *flashmap)
|
||||||
if (gamedata->challengegrid[i] >= MAXUNLOCKABLES)
|
if (gamedata->challengegrid[i] >= MAXUNLOCKABLES)
|
||||||
continue;
|
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);
|
completionamount += (10/CHALLENGEGRIDHEIGHT);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -528,6 +528,7 @@ void M_PlayMenuJam(void)
|
||||||
const char* overridetotrack[GDMUSIC_MAX-1] = {
|
const char* overridetotrack[GDMUSIC_MAX-1] = {
|
||||||
"KEYGEN",
|
"KEYGEN",
|
||||||
"LOSERC",
|
"LOSERC",
|
||||||
|
"TRACKA",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (refMenu != NULL && NotCurrentlyPlaying(overridetotrack[override - 1]))
|
if (refMenu != NULL && NotCurrentlyPlaying(overridetotrack[override - 1]))
|
||||||
|
|
@ -580,6 +581,9 @@ boolean M_ConsiderSealedSwapAlert(void)
|
||||||
NULL, MM_NOTHING, NULL, NULL
|
NULL, MM_NOTHING, NULL, NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (gamedata->musicstate < GDMUSIC_TRACK10)
|
||||||
|
gamedata->musicstate = GDMUSIC_TRACK10;
|
||||||
|
|
||||||
return true;
|
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++;
|
||||||
}
|
}
|
||||||
|
|
||||||
response += newkeys;
|
|
||||||
|
|
||||||
// Announce
|
// Announce
|
||||||
if (response != 0)
|
if (response != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -3124,6 +3122,16 @@ boolean M_UpdateUnlockablesAndExtraEmblems(boolean loud, boolean doall)
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newkeys != 0)
|
||||||
|
{
|
||||||
|
if (loud)
|
||||||
|
{
|
||||||
|
S_StartSound(NULL, sfx_keygen);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,7 @@ typedef enum {
|
||||||
GDMUSIC_KEYG,
|
GDMUSIC_KEYG,
|
||||||
GDMUSIC_KEEPONMENU, // Minimum to keep after leaving the Challenge Grid
|
GDMUSIC_KEEPONMENU, // Minimum to keep after leaving the Challenge Grid
|
||||||
GDMUSIC_LOSERCLUB = GDMUSIC_KEEPONMENU,
|
GDMUSIC_LOSERCLUB = GDMUSIC_KEEPONMENU,
|
||||||
|
GDMUSIC_TRACK10,
|
||||||
GDMUSIC_MAX
|
GDMUSIC_MAX
|
||||||
} gdmusic_t;
|
} gdmusic_t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,6 @@ menu_t *M_InterruptMenuWithChallenges(menu_t *desiredmenu)
|
||||||
challengesmenu.requestnew = false;
|
challengesmenu.requestnew = false;
|
||||||
challengesmenu.chaokeyadd = false;
|
challengesmenu.chaokeyadd = false;
|
||||||
challengesmenu.keywasadded = false;
|
challengesmenu.keywasadded = false;
|
||||||
challengesmenu.considersealedswapalert = false;
|
|
||||||
challengesmenu.chaokeyhold = 0;
|
challengesmenu.chaokeyhold = 0;
|
||||||
challengesmenu.unlockcondition = NULL;
|
challengesmenu.unlockcondition = NULL;
|
||||||
|
|
||||||
|
|
@ -649,7 +648,7 @@ void M_ChallengesTick(void)
|
||||||
|
|
||||||
if (gamedata->keyspending > 0)
|
if (gamedata->keyspending > 0)
|
||||||
{
|
{
|
||||||
S_StartSound(NULL, sfx_achiev);
|
S_StartSound(NULL, sfx_keygen);
|
||||||
gamedata->keyspending--;
|
gamedata->keyspending--;
|
||||||
gamedata->chaokeys++;
|
gamedata->chaokeys++;
|
||||||
challengesmenu.unlockcount[CMC_CHAOANIM]++;
|
challengesmenu.unlockcount[CMC_CHAOANIM]++;
|
||||||
|
|
@ -707,9 +706,6 @@ void M_ChallengesTick(void)
|
||||||
gamedata->unlocked[challengesmenu.currentunlock] = true;
|
gamedata->unlocked[challengesmenu.currentunlock] = true;
|
||||||
M_UpdateUnlockablesAndExtraEmblems(true, true);
|
M_UpdateUnlockablesAndExtraEmblems(true, true);
|
||||||
|
|
||||||
if (ref->type == SECRET_SPECIALATTACK)
|
|
||||||
challengesmenu.considersealedswapalert = true;
|
|
||||||
|
|
||||||
// Update shown description just in case..?
|
// Update shown description just in case..?
|
||||||
if (challengesmenu.unlockcondition)
|
if (challengesmenu.unlockcondition)
|
||||||
Z_Free(challengesmenu.unlockcondition);
|
Z_Free(challengesmenu.unlockcondition);
|
||||||
|
|
@ -780,11 +776,7 @@ void M_ChallengesTick(void)
|
||||||
// Fade decrease.
|
// Fade decrease.
|
||||||
if (--challengesmenu.fade == 0)
|
if (--challengesmenu.fade == 0)
|
||||||
{
|
{
|
||||||
// Play music the moment control returns.
|
if (M_ConsiderSealedSwapAlert() == true)
|
||||||
M_PlayMenuJam();
|
|
||||||
|
|
||||||
if (challengesmenu.considersealedswapalert == true
|
|
||||||
&& M_ConsiderSealedSwapAlert() == true)
|
|
||||||
{
|
{
|
||||||
// No keygen tutorial in this case...
|
// No keygen tutorial in this case...
|
||||||
// not ideal but at least unlikely to
|
// not ideal but at least unlikely to
|
||||||
|
|
@ -795,6 +787,9 @@ void M_ChallengesTick(void)
|
||||||
{
|
{
|
||||||
M_ChallengesTutorial(CCTUTORIAL_KEYGEN);
|
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
|
{"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
|
{"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"},
|
{"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"
|
{"keygen", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Key Generated"},
|
||||||
{"endwrp", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // End of a "Tutorial Teleport"
|
{"gpmetr", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||||
|
|
||||||
// SRB2Kart - Ring Box
|
// SRB2Kart - Ring Box
|
||||||
{"slot00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bar"},
|
{"slot00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bar"},
|
||||||
|
|
|
||||||
|
|
@ -1170,8 +1170,8 @@ typedef enum
|
||||||
sfx_typri2,
|
sfx_typri2,
|
||||||
sfx_eggspr,
|
sfx_eggspr,
|
||||||
sfx_achiev,
|
sfx_achiev,
|
||||||
|
sfx_keygen,
|
||||||
sfx_gpmetr,
|
sfx_gpmetr,
|
||||||
sfx_endwrp,
|
|
||||||
|
|
||||||
// SRB2Kart - Ring Box
|
// SRB2Kart - Ring Box
|
||||||
sfx_slot00,
|
sfx_slot00,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue