mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
EDUKE32_STANDALONE guard some hard-coded Duke3D sound behavior
git-svn-id: https://svn.eduke32.com/eduke32@6817 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ad75d09d57
commit
bcd5e48c8c
1 changed files with 7 additions and 2 deletions
|
@ -175,6 +175,7 @@ void S_RestartMusic(void)
|
||||||
|
|
||||||
void S_MenuSound(void)
|
void S_MenuSound(void)
|
||||||
{
|
{
|
||||||
|
#ifndef EDUKE32_STANDALONE
|
||||||
static int32_t SoundNum;
|
static int32_t SoundNum;
|
||||||
int32_t const menusnds[] = {
|
int32_t const menusnds[] = {
|
||||||
LASERTRIP_EXPLODE, DUKE_GRUNT, DUKE_LAND_HURT, CHAINGUN_FIRE, SQUISHED, KICK_HIT,
|
LASERTRIP_EXPLODE, DUKE_GRUNT, DUKE_LAND_HURT, CHAINGUN_FIRE, SQUISHED, KICK_HIT,
|
||||||
|
@ -182,6 +183,9 @@ void S_MenuSound(void)
|
||||||
PIPEBOMB_BOUNCE, PIPEBOMB_EXPLODE, NITEVISION_ONOFF, RPG_SHOOT, SELECT_WEAPON,
|
PIPEBOMB_BOUNCE, PIPEBOMB_EXPLODE, NITEVISION_ONOFF, RPG_SHOOT, SELECT_WEAPON,
|
||||||
};
|
};
|
||||||
int32_t s = VM_OnEventWithReturn(EVENT_OPENMENUSOUND, g_player[screenpeek].ps->i, screenpeek, menusnds[SoundNum++ % ARRAY_SIZE(menusnds)]);
|
int32_t s = VM_OnEventWithReturn(EVENT_OPENMENUSOUND, g_player[screenpeek].ps->i, screenpeek, menusnds[SoundNum++ % ARRAY_SIZE(menusnds)]);
|
||||||
|
#else
|
||||||
|
int32_t s = VM_OnEventWithReturn(EVENT_OPENMENUSOUND, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||||
|
#endif
|
||||||
if (s != -1)
|
if (s != -1)
|
||||||
S_PlaySound(s);
|
S_PlaySound(s);
|
||||||
}
|
}
|
||||||
|
@ -590,6 +594,7 @@ sound_further_processing:
|
||||||
!cansee(cam->x,cam->y,cam->z-(24<<8),camsect, SX(i),SY(i),SZ(i)-(24<<8),SECT(i)))
|
!cansee(cam->x,cam->y,cam->z-(24<<8),camsect, SX(i),SY(i),SZ(i)-(24<<8),SECT(i)))
|
||||||
sndist += sndist>>5;
|
sndist += sndist>>5;
|
||||||
|
|
||||||
|
#ifndef EDUKE32_STANDALONE
|
||||||
switch (DYNAMICSOUNDMAP(num))
|
switch (DYNAMICSOUNDMAP(num))
|
||||||
{
|
{
|
||||||
case PIPEBOMB_EXPLODE__STATIC:
|
case PIPEBOMB_EXPLODE__STATIC:
|
||||||
|
@ -600,6 +605,7 @@ sound_further_processing:
|
||||||
sndist = 6144;
|
sndist = 6144;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((g_sounds[num].m & SF_GLOBAL) || sndist < ((255-LOUDESTVOLUME)<<6))
|
if ((g_sounds[num].m & SF_GLOBAL) || sndist < ((255-LOUDESTVOLUME)<<6))
|
||||||
sndist = ((255-LOUDESTVOLUME)<<6);
|
sndist = ((255-LOUDESTVOLUME)<<6);
|
||||||
|
@ -975,11 +981,10 @@ int32_t A_CheckSoundPlaying(int32_t i, int32_t num)
|
||||||
int32_t A_CheckAnySoundPlaying(int32_t i)
|
int32_t A_CheckAnySoundPlaying(int32_t i)
|
||||||
{
|
{
|
||||||
int32_t const msp = g_highestSoundIdx;
|
int32_t const msp = g_highestSoundIdx;
|
||||||
int32_t k;
|
|
||||||
|
|
||||||
for (bssize_t j=0; j<msp; ++j)
|
for (bssize_t j=0; j<msp; ++j)
|
||||||
{
|
{
|
||||||
for (k=0; k<MAXSOUNDINSTANCES; ++k)
|
for (native_t k=0; k<MAXSOUNDINSTANCES; ++k)
|
||||||
if (g_sounds[j].instances[k].spriteNum == i)
|
if (g_sounds[j].instances[k].spriteNum == i)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue