mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
CON: Add EVENT_OPENMENUSOUND.
Set RETURN to the sound played when the menu is opened. -1 to cancel. Patch from Fox. git-svn-id: https://svn.eduke32.com/eduke32@6516 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
66162032a0
commit
102a720402
3 changed files with 5 additions and 1 deletions
|
@ -130,6 +130,7 @@ enum GameEvent_t {
|
|||
EVENT_SCREEN,
|
||||
EVENT_DISPLAYROOMSEND,
|
||||
EVENT_DISPLAYEND,
|
||||
EVENT_OPENMENUSOUND,
|
||||
#ifdef LUNATIC
|
||||
EVENT_ANIMATEALLSPRITES,
|
||||
#endif
|
||||
|
|
|
@ -726,6 +726,7 @@ const char *EventNames[MAXEVENTS] =
|
|||
"EVENT_SCREEN",
|
||||
"EVENT_DISPLAYROOMSEND",
|
||||
"EVENT_DISPLAYEND",
|
||||
"EVENT_OPENMENUSOUND",
|
||||
#ifdef LUNATIC
|
||||
"EVENT_ANIMATEALLSPRITES",
|
||||
#endif
|
||||
|
|
|
@ -181,7 +181,9 @@ void S_MenuSound(void)
|
|||
PISTOL_RICOCHET, PISTOL_BODYHIT, PISTOL_FIRE, SHOTGUN_FIRE, BOS1_WALK, RPG_EXPLODE,
|
||||
PIPEBOMB_BOUNCE, PIPEBOMB_EXPLODE, NITEVISION_ONOFF, RPG_SHOOT, SELECT_WEAPON,
|
||||
};
|
||||
S_PlaySound(menusnds[SoundNum++ % ARRAY_SIZE(menusnds)]);
|
||||
int32_t s = VM_OnEventWithReturn(EVENT_OPENMENUSOUND, -1, myconnectindex, menusnds[SoundNum++ % ARRAY_SIZE(menusnds)]);
|
||||
if (s != -1)
|
||||
S_PlaySound(s);
|
||||
}
|
||||
|
||||
int32_t S_PlayMusic(const char *fn)
|
||||
|
|
Loading…
Reference in a new issue