From c33c1fa07680ef07540fb1c48a323bdc816e3e77 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 6 Feb 2010 15:54:13 +0000 Subject: Fix Heretic/Hexen "noise" sound debug cheats. Subversion-branch: /branches/raven-branch Subversion-revision: 1850 --- src/heretic/s_sound.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/heretic/s_sound.c') diff --git a/src/heretic/s_sound.c b/src/heretic/s_sound.c index bdd24594..be4ae0e3 100644 --- a/src/heretic/s_sound.c +++ b/src/heretic/s_sound.c @@ -550,8 +550,16 @@ void S_GetChannelInfo(SoundInfo_t * s) c->priority = channel[i].priority; c->name = S_sfx[c->id].name; c->mo = channel[i].mo; - c->distance = P_AproxDistance(c->mo->x - viewx, c->mo->y - viewy) - >> FRACBITS; + + if (c->mo != NULL) + { + c->distance = P_AproxDistance(c->mo->x - viewx, c->mo->y - viewy) + >> FRACBITS; + } + else + { + c->distance = 0; + } } } -- cgit v1.2.3 From f04325260a5a95ca4c60c3b57762e48beedc381e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 7 Feb 2010 03:02:01 +0000 Subject: Move sound structure and ammo definitions into headers. Add #ifndef guards around info.h. Subversion-branch: /branches/raven-branch Subversion-revision: 1857 --- src/heretic/s_sound.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/heretic/s_sound.c') diff --git a/src/heretic/s_sound.c b/src/heretic/s_sound.c index be4ae0e3..8e0be9f1 100644 --- a/src/heretic/s_sound.c +++ b/src/heretic/s_sound.c @@ -33,6 +33,8 @@ #include "r_local.h" #include "p_local.h" +#include "sounds.h" + #include "w_wad.h" #include "z_zone.h" @@ -55,9 +57,6 @@ int mus_lumpnum; void *mus_sndptr; byte *soundCurve; -extern sfxinfo_t S_sfx[]; -extern musicinfo_t S_music[]; - int snd_MaxVolume = 10; int snd_MusicVolume = 10; int snd_Channels = 16; -- cgit v1.2.3 From af48a6309cf1f03b5136e26a5fc27a38e490d808 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 30 Apr 2010 21:48:34 +0000 Subject: Scale up music volume from configuration file value in Heretic/Hexen. Subversion-branch: /branches/raven-branch Subversion-revision: 1925 --- src/heretic/s_sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/heretic/s_sound.c') diff --git a/src/heretic/s_sound.c b/src/heretic/s_sound.c index 8e0be9f1..73942201 100644 --- a/src/heretic/s_sound.c +++ b/src/heretic/s_sound.c @@ -528,7 +528,7 @@ void S_Init(void) { snd_Channels = 8; } - I_SetMusicVolume(snd_MusicVolume); + I_SetMusicVolume(snd_MusicVolume * 8); S_SetMaxVolume(true); I_AtExit(S_ShutDown, true); @@ -586,7 +586,7 @@ void S_SetMaxVolume(boolean fullprocess) static boolean musicPaused; void S_SetMusicVolume(void) { - I_SetMusicVolume(snd_MusicVolume); + I_SetMusicVolume(snd_MusicVolume * 8); if (snd_MusicVolume == 0) { I_PauseSong(); -- cgit v1.2.3