mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 07:21:54 +00:00
- WH: start the menu music.
This commit is contained in:
parent
3fa9e7894b
commit
c171ba38e7
7 changed files with 29 additions and 1 deletions
|
@ -924,4 +924,11 @@ DEFINE_ACTION_FUNCTION(_Witchaven, GetViewPlayer)
|
|||
{
|
||||
ACTION_RETURN_POINTER(&player[myconnectindex]);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Witchaven, PlayMenuMusic, SND_MenuMusic)
|
||||
{
|
||||
SND_MenuMusic();
|
||||
return 0;
|
||||
}
|
||||
|
||||
END_WH_NS
|
||||
|
|
|
@ -45,7 +45,7 @@ void startsong(int which) // 0, 1, 2 or 3
|
|||
void startmusic(int level)
|
||||
{
|
||||
// allow music override from MAPINFO.
|
||||
if (currentLevel->music.IsNotEmpty())
|
||||
if (currentLevel && currentLevel->music.IsNotEmpty())
|
||||
{
|
||||
Mus_Play(currentLevel->music, true);
|
||||
oldsong = -1;
|
||||
|
|
|
@ -491,6 +491,7 @@ inline int spritesound(int sn, DWHActor* s, int loop = 0, int channel = CHAN_AUT
|
|||
void startmusic(int);
|
||||
void startsong(int);
|
||||
void setupmidi();
|
||||
void SND_MenuMusic();
|
||||
|
||||
extern int attacktheme;
|
||||
|
||||
|
@ -517,6 +518,7 @@ struct GameInterface : public ::GameInterface
|
|||
bool GenerateSavePic() override;
|
||||
GameStats getStats() override;
|
||||
void MenuOpened() override;
|
||||
//void MenuClosed() override;
|
||||
void MenuSound(EMenuSounds snd) override;
|
||||
bool CanSave() override;
|
||||
void LoadGameTextures() override;
|
||||
|
|
|
@ -89,6 +89,7 @@ LISTMENU "MainMenu"
|
|||
}
|
||||
ifgame(Witchaven2)
|
||||
{
|
||||
class "WH2MainMenu"
|
||||
position 160, 35
|
||||
Linespacing 22
|
||||
WH2TextItem "$MNU_NEWGAME", "n", "SkillMenu"
|
||||
|
|
|
@ -33,6 +33,12 @@ class WHMenuDelegate : RazeMenuDelegate
|
|||
|
||||
class WHMainMenu : ListMenu
|
||||
{
|
||||
override void Init(Menu parent, ListMenuDescriptor desc)
|
||||
{
|
||||
Super.Init(parent, desc);
|
||||
Witchaven.PlayMenuMusic();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -31,6 +31,17 @@ class WH2MenuDelegate : RazeMenuDelegate
|
|||
}
|
||||
|
||||
|
||||
class WH2MainMenu : ListMenu
|
||||
{
|
||||
override void Init(Menu parent, ListMenuDescriptor desc)
|
||||
{
|
||||
Super.Init(parent, desc);
|
||||
Witchaven.PlayMenuMusic();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// text item
|
||||
|
|
|
@ -208,6 +208,7 @@ struct Witchaven native
|
|||
|
||||
native static void PlaySound(int s);
|
||||
native static WhPlayer GetViewPlayer();
|
||||
native static void PlayMenuMusic();
|
||||
}
|
||||
|
||||
struct WhWeaponInf native {
|
||||
|
|
Loading…
Reference in a new issue