mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-03 15:32:45 +00:00
M_PlayMenuJam
Pre-emptive work for more complicated menu music behaviour, permitting consistent implementation of the cycling music.
This commit is contained in:
parent
d31e5ac76f
commit
57b22f32d5
3 changed files with 22 additions and 10 deletions
|
|
@ -593,6 +593,8 @@ void M_GoBack(INT32 choice);
|
||||||
void M_Ticker(void);
|
void M_Ticker(void);
|
||||||
void M_Init(void);
|
void M_Init(void);
|
||||||
|
|
||||||
|
void M_PlayMenuJam(void);
|
||||||
|
|
||||||
void M_MenuTypingInput(INT32 key);
|
void M_MenuTypingInput(INT32 key);
|
||||||
|
|
||||||
extern menu_t MessageDef;
|
extern menu_t MessageDef;
|
||||||
|
|
|
||||||
|
|
@ -356,6 +356,17 @@ boolean M_Responder(event_t *ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void M_PlayMenuJam(void)
|
||||||
|
{
|
||||||
|
if (cv_menujam_update.value)
|
||||||
|
{
|
||||||
|
CV_AddValue(&cv_menujam, 1);
|
||||||
|
CV_SetValue(&cv_menujam_update, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
S_ChangeMusicInternal(cv_menujam.string, true);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// M_SpecificMenuRestore
|
// M_SpecificMenuRestore
|
||||||
//
|
//
|
||||||
|
|
@ -472,14 +483,6 @@ void M_StartControlPanel(void)
|
||||||
CON_ToggleOff();
|
CON_ToggleOff();
|
||||||
|
|
||||||
modeattacking = ATTACKING_NONE;
|
modeattacking = ATTACKING_NONE;
|
||||||
|
|
||||||
if (cv_menujam_update.value)
|
|
||||||
{
|
|
||||||
CV_AddValue(&cv_menujam, 1);
|
|
||||||
CV_SetValue(&cv_menujam_update, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
S_ChangeMusicInternal(cv_menujam.string, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_currprofile.value == -1) // Only ask once per session.
|
if (cv_currprofile.value == -1) // Only ask once per session.
|
||||||
|
|
@ -510,6 +513,8 @@ void M_StartControlPanel(void)
|
||||||
currentMenu = M_SpecificMenuRestore(M_InterruptMenuWithChallenges(restoreMenu));
|
currentMenu = M_SpecificMenuRestore(M_InterruptMenuWithChallenges(restoreMenu));
|
||||||
restoreMenu = NULL;
|
restoreMenu = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M_PlayMenuJam();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include "m_cond.h" // for conditionsets
|
#include "m_cond.h" // for conditionsets
|
||||||
#include "lua_hook.h" // MusicChange hook
|
#include "lua_hook.h" // MusicChange hook
|
||||||
#include "byteptr.h"
|
#include "byteptr.h"
|
||||||
|
#include "k_menu.h" // M_PlayMenuJam
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
#ifdef HW3SOUND
|
||||||
// 3D Sound Interface
|
// 3D Sound Interface
|
||||||
|
|
@ -2651,9 +2652,13 @@ void GameDigiMusic_OnChange(void)
|
||||||
{
|
{
|
||||||
P_RestoreMusic(&players[consoleplayer]);
|
P_RestoreMusic(&players[consoleplayer]);
|
||||||
}
|
}
|
||||||
else if (S_MusicExists("menu"))
|
else if (gamestate == GS_TITLESCREEN)
|
||||||
{
|
{
|
||||||
S_ChangeMusicInternal("menu", looptitle);
|
S_ChangeMusicInternal("_title", looptitle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
M_PlayMenuJam();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue