mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-03 07:22:10 +00:00
Goner setup music: Change behaviour
- Hook into M_PlayMenuJam, to reduce bespoke behaviour - Use the finalised track string - Play on the Sound Options menu Also, use MAIN_Goner as reference for the password field's presence, because I lost like 30 minutes to a related bug
This commit is contained in:
parent
a4c91f66ec
commit
647a9d0a0e
3 changed files with 32 additions and 21 deletions
|
|
@ -212,6 +212,7 @@ void M_GonerTutorial(INT32 choice);
|
||||||
void M_GonerResetLooking(int type);
|
void M_GonerResetLooking(int type);
|
||||||
void M_GonerCheckLooking(void);
|
void M_GonerCheckLooking(void);
|
||||||
void M_GonerGDQ(boolean opinion);
|
void M_GonerGDQ(boolean opinion);
|
||||||
|
boolean M_GonerMusicPlayable(void);
|
||||||
|
|
||||||
extern menuitem_t PLAY_CharSelect[];
|
extern menuitem_t PLAY_CharSelect[];
|
||||||
extern menu_t PLAY_CharSelectDef;
|
extern menu_t PLAY_CharSelectDef;
|
||||||
|
|
|
||||||
|
|
@ -357,11 +357,6 @@ void M_PlayMenuJam(void)
|
||||||
menu_t *refMenu = (menuactive ? currentMenu : restoreMenu);
|
menu_t *refMenu = (menuactive ? currentMenu : restoreMenu);
|
||||||
static boolean musicstatepermitted = false;
|
static boolean musicstatepermitted = false;
|
||||||
|
|
||||||
if (M_GameTrulyStarted() == false)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (challengesmenu.pending)
|
if (challengesmenu.pending)
|
||||||
{
|
{
|
||||||
Music_StopAll();
|
Music_StopAll();
|
||||||
|
|
@ -375,6 +370,17 @@ void M_PlayMenuJam(void)
|
||||||
if (Playing() || soundtest.playing)
|
if (Playing() || soundtest.playing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (M_GameTrulyStarted() == false)
|
||||||
|
{
|
||||||
|
if (M_GonerMusicPlayable() && NotCurrentlyPlaying("_GONER"))
|
||||||
|
{
|
||||||
|
Music_Remap("menu", "_GONER");
|
||||||
|
Music_Play("menu");
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (refMenu != NULL && refMenu->music != NULL)
|
if (refMenu != NULL && refMenu->music != NULL)
|
||||||
{
|
{
|
||||||
if (refMenu->music[0] == '.' && refMenu->music[1] == '\0')
|
if (refMenu->music[0] == '.' && refMenu->music[1] == '\0')
|
||||||
|
|
@ -582,6 +588,7 @@ void M_StartControlPanel(void)
|
||||||
// Are you ready for the First Boot Experience?
|
// Are you ready for the First Boot Experience?
|
||||||
M_ResetOptions();
|
M_ResetOptions();
|
||||||
currentMenu = &MAIN_GonerDef;
|
currentMenu = &MAIN_GonerDef;
|
||||||
|
M_PlayMenuJam();
|
||||||
}
|
}
|
||||||
else if (cv_currprofile.value == -1) // Only ask once per session.
|
else if (cv_currprofile.value == -1) // Only ask once per session.
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ void M_AddGonerLines(void)
|
||||||
// This one always plays, so it checks the levelworking instead of gamedata.
|
// This one always plays, so it checks the levelworking instead of gamedata.
|
||||||
if (goner_levelworking == GDGONER_INTRO)
|
if (goner_levelworking == GDGONER_INTRO)
|
||||||
{
|
{
|
||||||
if (!currentMenu->menuitems[0].mvar2)
|
if (!MAIN_Goner[0].mvar2)
|
||||||
{
|
{
|
||||||
LinesToDigest.emplace_front(GONERSPEAKER_EGGMAN, 0,
|
LinesToDigest.emplace_front(GONERSPEAKER_EGGMAN, 0,
|
||||||
"Metal Sonic. Are you online?");
|
"Metal Sonic. Are you online?");
|
||||||
|
|
@ -406,28 +406,19 @@ void M_GonerRailroad(bool set)
|
||||||
S_StartSound(NULL, sfx_s3k63);
|
S_StartSound(NULL, sfx_s3k63);
|
||||||
}
|
}
|
||||||
|
|
||||||
void M_GonerPlayMusic(void)
|
|
||||||
{
|
|
||||||
if (gamedata->gonerlevel <= GDGONER_SOUND || Music_Playing("menu"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Music_Remap("menu", "_OCEAN"); //"_GONER");
|
|
||||||
Music_Play("menu");
|
|
||||||
}
|
|
||||||
|
|
||||||
void M_GonerHidePassword(void)
|
void M_GonerHidePassword(void)
|
||||||
{
|
{
|
||||||
if (currentMenu->menuitems[0].mvar2)
|
if (MAIN_Goner[0].mvar2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
currentMenu->menuitems[0] =
|
MAIN_Goner[0] =
|
||||||
{IT_STRING | IT_CALL, "EXIT PROGRAM",
|
{IT_STRING | IT_CALL, "EXIT PROGRAM",
|
||||||
"CONCLUDE OBSERVATIONS NOW.", NULL,
|
"CONCLUDE OBSERVATIONS NOW.", NULL,
|
||||||
{.routine = M_QuitSRB2}, 0, 1};
|
{.routine = M_QuitSRB2}, 0, 1};
|
||||||
|
|
||||||
S_StartSound(NULL, sfx_s3k5b);
|
S_StartSound(NULL, sfx_s3k5b);
|
||||||
|
|
||||||
M_GonerPlayMusic();
|
M_PlayMenuJam();
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace
|
}; // namespace
|
||||||
|
|
@ -451,6 +442,20 @@ void M_GonerResetLooking(int type)
|
||||||
goner_youactuallylooked = 0;
|
goner_youactuallylooked = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean M_GonerMusicPlayable(void)
|
||||||
|
{
|
||||||
|
if (!MAIN_Goner[0].mvar2)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (currentMenu == &OPTIONS_SoundDef)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (gamedata->gonerlevel <= GDGONER_SOUND)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void M_GonerCheckLooking(void)
|
void M_GonerCheckLooking(void)
|
||||||
{
|
{
|
||||||
if (goner_lasttypelooking != gamedata->gonerlevel)
|
if (goner_lasttypelooking != gamedata->gonerlevel)
|
||||||
|
|
@ -487,7 +492,7 @@ void M_GonerTick(void)
|
||||||
{
|
{
|
||||||
first = goner_gdq = false;
|
first = goner_gdq = false;
|
||||||
|
|
||||||
currentMenu->menuitems[0] =
|
MAIN_Goner[0] =
|
||||||
{IT_STRING | IT_CVAR | IT_CV_STRING, ". . .",
|
{IT_STRING | IT_CVAR | IT_CV_STRING, ". . .",
|
||||||
"ATTEMPT ADMINISTRATOR ACCESS.", NULL,
|
"ATTEMPT ADMINISTRATOR ACCESS.", NULL,
|
||||||
{.cvar = &cv_dummyextraspassword}, 0, 0};
|
{.cvar = &cv_dummyextraspassword}, 0, 0};
|
||||||
|
|
@ -508,8 +513,6 @@ void M_GonerTick(void)
|
||||||
goner_levelworking--;
|
goner_levelworking--;
|
||||||
}
|
}
|
||||||
|
|
||||||
M_GonerPlayMusic();
|
|
||||||
|
|
||||||
lastseenlevel = gamedata->gonerlevel;
|
lastseenlevel = gamedata->gonerlevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue