mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Keep displaying difficulty menu for as long as the *voice* plays.
Previously, the check was for the hard-coded sound number. This made it impossible to change difficulty selection sounds via EVENT_SOUND. git-svn-id: https://svn.eduke32.com/eduke32@4449 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fb05cf5b7e
commit
184653fc25
4 changed files with 13 additions and 11 deletions
|
@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
extern char inputloc;
|
extern char inputloc;
|
||||||
int16_t g_skillSoundID=-1;
|
int32_t g_skillSoundVoice = -1;
|
||||||
int32_t probey=0; // the row number on which the menu cursor is positioned
|
int32_t probey=0; // the row number on which the menu cursor is positioned
|
||||||
static int32_t lastsavehead=0,last_menu_pos=0,last_menu,sh,onbar,buttonstat;
|
static int32_t lastsavehead=0,last_menu_pos=0,last_menu,sh,onbar,buttonstat;
|
||||||
static int32_t last_main,last_main_ingame,last_episode,last_options,last_load = 0;
|
static int32_t last_main,last_main_ingame,last_episode,last_options,last_load = 0;
|
||||||
|
@ -2446,23 +2446,25 @@ cheat_for_port_credits2:
|
||||||
x = M_Probe(margin,ybase,19,g_numSkills);
|
x = M_Probe(margin,ybase,19,g_numSkills);
|
||||||
if (x >= 0)
|
if (x >= 0)
|
||||||
{
|
{
|
||||||
|
int32_t skillsound = 0;
|
||||||
|
|
||||||
switch (x)
|
switch (x)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
g_skillSoundID = JIBBED_ACTOR6;
|
skillsound = JIBBED_ACTOR6;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
g_skillSoundID = BONUS_SPEECH1;
|
skillsound = BONUS_SPEECH1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
g_skillSoundID = DUKE_GETWEAPON2;
|
skillsound = DUKE_GETWEAPON2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
g_skillSoundID = JIBBED_ACTOR5;
|
skillsound = JIBBED_ACTOR5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
S_PlaySound(g_skillSoundID);
|
g_skillSoundVoice = S_PlaySound(skillsound);
|
||||||
|
|
||||||
ud.m_player_skill = x+1;
|
ud.m_player_skill = x+1;
|
||||||
if (x == 3) ud.m_respawn_monsters = 1;
|
if (x == 3) ud.m_respawn_monsters = 1;
|
||||||
|
|
|
@ -136,7 +136,6 @@ enum MenuIndex_t {
|
||||||
|
|
||||||
};
|
};
|
||||||
extern char inputloc;
|
extern char inputloc;
|
||||||
extern int16_t g_skillSoundID;
|
|
||||||
extern int32_t g_lastSaveSlot;
|
extern int32_t g_lastSaveSlot;
|
||||||
extern int32_t g_quitDeadline;
|
extern int32_t g_quitDeadline;
|
||||||
extern int32_t probey;
|
extern int32_t probey;
|
||||||
|
|
|
@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "gamedef.h"
|
#include "gamedef.h"
|
||||||
#include "premap.h"
|
#include "premap.h"
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
|
#include "fx_man.h"
|
||||||
#include "gameexec.h"
|
#include "gameexec.h"
|
||||||
#include "anim.h"
|
#include "anim.h"
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
|
@ -1368,13 +1369,13 @@ void G_NewGame(int32_t vn, int32_t ln, int32_t sk)
|
||||||
|
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
if (g_skillSoundID >= 0 && ud.config.FXDevice >= 0 && ud.config.SoundToggle)
|
if (g_skillSoundVoice >= 0 && ud.config.FXDevice >= 0 && ud.config.SoundToggle)
|
||||||
{
|
{
|
||||||
while (S_CheckSoundPlaying(-1, g_skillSoundID))
|
while (FX_SoundActive(g_skillSoundVoice))
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
g_skillSoundID = -1;
|
g_skillSoundVoice = -1;
|
||||||
|
|
||||||
ready2send = 0;
|
ready2send = 0;
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ typedef struct
|
||||||
|
|
||||||
extern volatile char g_soundlocks[MAXSOUNDS];
|
extern volatile char g_soundlocks[MAXSOUNDS];
|
||||||
extern sound_t g_sounds[MAXSOUNDS];
|
extern sound_t g_sounds[MAXSOUNDS];
|
||||||
extern int16_t g_skillSoundID;
|
extern int32_t g_skillSoundVoice;
|
||||||
extern int32_t g_numEnvSoundsPlaying,g_maxSoundPos;
|
extern int32_t g_numEnvSoundsPlaying,g_maxSoundPos;
|
||||||
|
|
||||||
int32_t A_CheckSoundPlaying(int32_t i,int32_t num);
|
int32_t A_CheckSoundPlaying(int32_t i,int32_t num);
|
||||||
|
|
Loading…
Reference in a new issue