mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
Kill HW3SOUND related code (in files that are actually used)
This commit is contained in:
parent
83cbdb4601
commit
472f7d060c
7 changed files with 1 additions and 148 deletions
|
|
@ -92,10 +92,6 @@
|
||||||
#include "hardware/hw_main.h" // 3D View Rendering
|
#include "hardware/hw_main.h" // 3D View Rendering
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
#include "hardware/hw3sound.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "lua_script.h"
|
#include "lua_script.h"
|
||||||
|
|
||||||
/* Manually defined asset hashes
|
/* Manually defined asset hashes
|
||||||
|
|
@ -838,10 +834,6 @@ void D_SRB2Loop(void)
|
||||||
interp = R_UsingFrameInterpolation() && !dedicated;
|
interp = R_UsingFrameInterpolation() && !dedicated;
|
||||||
doDisplay = false;
|
doDisplay = false;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
HW3S_BeginFrameUpdate();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (realtics > 0 || singletics)
|
if (realtics > 0 || singletics)
|
||||||
{
|
{
|
||||||
// don't skip more than 10 frames at a time
|
// don't skip more than 10 frames at a time
|
||||||
|
|
@ -932,10 +924,6 @@ void D_SRB2Loop(void)
|
||||||
S_TickSoundTest();
|
S_TickSoundTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
HW3S_EndFrameUpdate();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LUA_Step();
|
LUA_Step();
|
||||||
|
|
||||||
#ifdef HAVE_DISCORDRPC
|
#ifdef HAVE_DISCORDRPC
|
||||||
|
|
|
||||||
|
|
@ -15,46 +15,6 @@
|
||||||
#ifndef __DOOMDEF__
|
#ifndef __DOOMDEF__
|
||||||
#define __DOOMDEF__
|
#define __DOOMDEF__
|
||||||
|
|
||||||
// Sound system select
|
|
||||||
// This should actually be in the makefile,
|
|
||||||
// but I can't stand that gibberish. D:
|
|
||||||
#define SOUND_DUMMY 0
|
|
||||||
#define SOUND_SDL 1
|
|
||||||
#define SOUND_MIXER 2
|
|
||||||
#define SOUND_FMOD 3
|
|
||||||
|
|
||||||
#ifndef SOUND
|
|
||||||
#ifdef HAVE_SDL
|
|
||||||
|
|
||||||
// Use Mixer interface?
|
|
||||||
#ifdef HAVE_MIXER
|
|
||||||
#define SOUND SOUND_MIXER
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
#undef HW3SOUND
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Use generic SDL interface.
|
|
||||||
#ifndef SOUND
|
|
||||||
#define SOUND SOUND_SDL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else // No SDL.
|
|
||||||
|
|
||||||
// Use FMOD?
|
|
||||||
#ifdef HAVE_FMOD
|
|
||||||
#define SOUND SOUND_FMOD
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
#undef HW3SOUND
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
// No more interfaces. :(
|
|
||||||
#define SOUND SOUND_DUMMY
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define ASMCALL __cdecl
|
#define ASMCALL __cdecl
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,6 @@
|
||||||
#include "k_objects.h"
|
#include "k_objects.h"
|
||||||
#include "k_roulette.h"
|
#include "k_roulette.h"
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
#include "hardware/hw3sound.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
boolean LUA_CallAction(enum actionnum actionnum, mobj_t *actor);
|
boolean LUA_CallAction(enum actionnum actionnum, mobj_t *actor);
|
||||||
|
|
||||||
player_t *stplyr;
|
player_t *stplyr;
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,6 @@
|
||||||
#include "k_terrain.h"
|
#include "k_terrain.h"
|
||||||
#include "acs/interface.h"
|
#include "acs/interface.h"
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
#include "hardware/hw3sound.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Not sure if this is necessary, but it was in w_wad.c, so I'm putting it here too -Shadow Hog
|
// Not sure if this is necessary, but it was in w_wad.c, so I'm putting it here too -Shadow Hog
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,6 @@
|
||||||
#include "music.h"
|
#include "music.h"
|
||||||
#include "k_tally.h"
|
#include "k_tally.h"
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
#include "hardware/hw3sound.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
#include "hardware/hw_light.h"
|
#include "hardware/hw_light.h"
|
||||||
#include "hardware/hw_main.h"
|
#include "hardware/hw_main.h"
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,7 @@
|
||||||
#include "v_video.h" // V_ThinStringWidth
|
#include "v_video.h" // V_ThinStringWidth
|
||||||
#include "music.h"
|
#include "music.h"
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
// 3D Sound Interface
|
|
||||||
#include "hardware/hw3sound.h"
|
|
||||||
#else
|
|
||||||
static boolean S_AdjustSoundParams(const mobj_t *listener, const mobj_t *source, INT32 *vol, INT32 *sep, INT32 *pitch, sfxinfo_t *sfxinfo);
|
static boolean S_AdjustSoundParams(const mobj_t *listener, const mobj_t *source, INT32 *vol, INT32 *sep, INT32 *pitch, sfxinfo_t *sfxinfo);
|
||||||
#endif
|
|
||||||
|
|
||||||
static void Command_Tunes_f(void);
|
static void Command_Tunes_f(void);
|
||||||
static void Command_RestartAudio_f(void);
|
static void Command_RestartAudio_f(void);
|
||||||
|
|
@ -213,13 +208,6 @@ void SetChannelsNum(void)
|
||||||
if (cv_numChannels.value == 999999999) //Alam_GBC: OH MY ROD!(ROD rimmiced with GOD!)
|
if (cv_numChannels.value == 999999999) //Alam_GBC: OH MY ROD!(ROD rimmiced with GOD!)
|
||||||
CV_StealthSet(&cv_numChannels,cv_numChannels.defaultvalue);
|
CV_StealthSet(&cv_numChannels,cv_numChannels.defaultvalue);
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
{
|
|
||||||
HW3S_SetSourcesNum();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (cv_numChannels.value)
|
if (cv_numChannels.value)
|
||||||
channels = (channel_t *)Z_Calloc(cv_numChannels.value * sizeof (channel_t), PU_STATIC, NULL);
|
channels = (channel_t *)Z_Calloc(cv_numChannels.value * sizeof (channel_t), PU_STATIC, NULL);
|
||||||
numofchannels = (channels ? cv_numChannels.value : 0);
|
numofchannels = (channels ? cv_numChannels.value : 0);
|
||||||
|
|
@ -267,14 +255,6 @@ void S_StopSounds(void)
|
||||||
{
|
{
|
||||||
INT32 cnum;
|
INT32 cnum;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
{
|
|
||||||
HW3S_StopSounds();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// kill all playing sounds at start of level
|
// kill all playing sounds at start of level
|
||||||
for (cnum = 0; cnum < numofchannels; cnum++)
|
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||||
if (channels[cnum].sfxinfo)
|
if (channels[cnum].sfxinfo)
|
||||||
|
|
@ -294,13 +274,6 @@ void S_StopSoundByID(void *origin, sfxenum_t sfx_id)
|
||||||
#if 0
|
#if 0
|
||||||
if (!origin)
|
if (!origin)
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
{
|
|
||||||
HW3S_StopSoundByID(origin, sfx_id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
for (cnum = 0; cnum < numofchannels; cnum++)
|
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||||
{
|
{
|
||||||
|
|
@ -315,13 +288,6 @@ void S_StopSoundByNum(sfxenum_t sfxnum)
|
||||||
{
|
{
|
||||||
INT32 cnum;
|
INT32 cnum;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
{
|
|
||||||
HW3S_StopSoundByNum(sfxnum);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
for (cnum = 0; cnum < numofchannels; cnum++)
|
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||||
{
|
{
|
||||||
if (channels[cnum].sfxinfo == &S_sfx[sfxnum])
|
if (channels[cnum].sfxinfo == &S_sfx[sfxnum])
|
||||||
|
|
@ -484,14 +450,6 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
{
|
|
||||||
HW3S_StartSound(origin, sfx_id);
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i <= r_splitscreen; i++)
|
for (i = 0; i <= r_splitscreen; i++)
|
||||||
{
|
{
|
||||||
player_t *player = &players[displayplayers[i]];
|
player_t *player = &players[displayplayers[i]];
|
||||||
|
|
@ -649,12 +607,7 @@ void S_StartSound(const void *origin, sfxenum_t sfx_id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// the volume is handled 8 bits
|
// the volume is handled 8 bits
|
||||||
#ifdef HW3SOUND
|
S_StartSoundAtVolume(origin, sfx_id, 255);
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
HW3S_StartSound(origin, sfx_id);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
S_StartSoundAtVolume(origin, sfx_id, 255);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void S_ReducedVFXSoundAtVolume(const void *origin, sfxenum_t sfx_id, INT32 volume, player_t *owner)
|
void S_ReducedVFXSoundAtVolume(const void *origin, sfxenum_t sfx_id, INT32 volume, player_t *owner)
|
||||||
|
|
@ -687,13 +640,6 @@ void S_StopSound(void *origin)
|
||||||
if (!origin)
|
if (!origin)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
{
|
|
||||||
HW3S_StopSound(origin);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
for (cnum = 0; cnum < numofchannels; cnum++)
|
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||||
{
|
{
|
||||||
if (channels[cnum].sfxinfo && channels[cnum].origin == origin)
|
if (channels[cnum].sfxinfo && channels[cnum].origin == origin)
|
||||||
|
|
@ -765,14 +711,6 @@ void S_UpdateSounds(void)
|
||||||
I_UpdateMumble(players[consoleplayer].mo, listener[0]);
|
I_UpdateMumble(players[consoleplayer].mo, listener[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
{
|
|
||||||
HW3S_UpdateSources();
|
|
||||||
goto notinlevel;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i <= r_splitscreen; i++)
|
for (i = 0; i <= r_splitscreen; i++)
|
||||||
{
|
{
|
||||||
player_t *player = &players[displayplayers[i]];
|
player_t *player = &players[displayplayers[i]];
|
||||||
|
|
@ -919,12 +857,8 @@ void S_SetSfxVolume(INT32 volume)
|
||||||
//CV_SetValue(&cv_soundvolume, volume);
|
//CV_SetValue(&cv_soundvolume, volume);
|
||||||
actualsfxvolume = volume;
|
actualsfxvolume = volume;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
hws_mode == HWS_DEFAULT_MODE ? I_SetSfxVolume(volume&0x1F) : HW3S_SetSfxVolume(volume&0x1F);
|
|
||||||
#else
|
|
||||||
// now hardware volume
|
// now hardware volume
|
||||||
I_SetSfxVolume(volume);
|
I_SetSfxVolume(volume);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void S_ClearSfx(void)
|
void S_ClearSfx(void)
|
||||||
|
|
@ -1128,11 +1062,6 @@ INT32 S_OriginPlaying(void *origin)
|
||||||
if (!origin)
|
if (!origin)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
return HW3S_OriginPlaying(origin);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (cnum = 0; cnum < numofchannels; cnum++)
|
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||||
if (channels[cnum].origin == origin)
|
if (channels[cnum].origin == origin)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1145,11 +1074,6 @@ INT32 S_IdPlaying(sfxenum_t id)
|
||||||
{
|
{
|
||||||
INT32 cnum;
|
INT32 cnum;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
return HW3S_IdPlaying(id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (cnum = 0; cnum < numofchannels; cnum++)
|
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||||
if ((size_t)(channels[cnum].sfxinfo - S_sfx) == (size_t)id)
|
if ((size_t)(channels[cnum].sfxinfo - S_sfx) == (size_t)id)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1164,11 +1088,6 @@ INT32 S_SoundPlaying(void *origin, sfxenum_t id)
|
||||||
if (!origin)
|
if (!origin)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
|
||||||
if (hws_mode != HWS_DEFAULT_MODE)
|
|
||||||
return HW3S_SoundPlaying(origin, id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (cnum = 0; cnum < numofchannels; cnum++)
|
for (cnum = 0; cnum < numofchannels; cnum++)
|
||||||
{
|
{
|
||||||
if (channels[cnum].origin == origin
|
if (channels[cnum].origin == origin
|
||||||
|
|
|
||||||
|
|
@ -251,10 +251,8 @@ void S_StartSoundName(void *mo, const char *soundname);
|
||||||
void S_StopSoundByID(void *origin, sfxenum_t sfx_id);
|
void S_StopSoundByID(void *origin, sfxenum_t sfx_id);
|
||||||
void S_StopSoundByNum(sfxenum_t sfxnum);
|
void S_StopSoundByNum(sfxenum_t sfxnum);
|
||||||
|
|
||||||
#ifndef HW3SOUND
|
|
||||||
#define S_StartAttackSound S_StartSound
|
#define S_StartAttackSound S_StartSound
|
||||||
#define S_StartScreamSound S_StartSound
|
#define S_StartScreamSound S_StartSound
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue