From e1a0bde5ee8208c8186df8a67c4aa109dde2c258 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 3 Jun 2022 15:43:53 +0900 Subject: [PATCH] [sound] Remove a pile of unwanted sound.h includes This does mean that the gl and sw renderers can no longer call S_ExtraUpdate, but really, they shouldn't be anyway. And I seem to remember it not really helping (been way too long since quake ran that slowly for me). --- libs/net/nm/net_dgrm.c | 2 ++ libs/video/renderer/gl/gl_mod_alias.c | 7 ------- libs/video/renderer/gl/gl_rmain.c | 11 ----------- libs/video/renderer/r_ent.c | 6 ------ libs/video/renderer/sw/draw.c | 8 -------- libs/video/renderer/sw/sw_redge.c | 5 ----- libs/video/renderer/sw/sw_rmain.c | 6 ------ nq/include/client.h | 1 - nq/include/server.h | 2 +- nq/source/cl_main.c | 1 + nq/source/cl_parse.c | 2 +- nq/source/host.c | 1 + nq/source/sv_ded.c | 1 + nq/source/sv_main.c | 3 +++ qw/source/sv_send.c | 1 - 15 files changed, 10 insertions(+), 47 deletions(-) diff --git a/libs/net/nm/net_dgrm.c b/libs/net/nm/net_dgrm.c index 512fb6c7d..7004513cc 100644 --- a/libs/net/nm/net_dgrm.c +++ b/libs/net/nm/net_dgrm.c @@ -47,6 +47,8 @@ #include "netmain.h" +//FIXME these should not be here!!! +#include "../nq/include/client.h" #include "../nq/include/server.h" // This is enables a simple IP banning mechanism diff --git a/libs/video/renderer/gl/gl_mod_alias.c b/libs/video/renderer/gl/gl_mod_alias.c index 7e28beea9..119d6b0c7 100644 --- a/libs/video/renderer/gl/gl_mod_alias.c +++ b/libs/video/renderer/gl/gl_mod_alias.c @@ -39,14 +39,7 @@ #include #include -#include "QF/cvar.h" -#include "QF/mathlib.h" -#include "QF/qargs.h" -#include "QF/render.h" #include "QF/skin.h" -#include "QF/sound.h" -#include "QF/sys.h" -#include "QF/vid.h" #include "QF/scene/entity.h" diff --git a/libs/video/renderer/gl/gl_rmain.c b/libs/video/renderer/gl/gl_rmain.c index e6d0bd14c..3e3f082a8 100644 --- a/libs/video/renderer/gl/gl_rmain.c +++ b/libs/video/renderer/gl/gl_rmain.c @@ -39,16 +39,6 @@ #include #include -#include "QF/cvar.h" -#include "QF/draw.h" -#include "QF/mathlib.h" -#include "QF/qargs.h" -#include "QF/render.h" -#include "QF/skin.h" -#include "QF/sound.h" -#include "QF/sys.h" -#include "QF/vid.h" - #include "QF/scene/entity.h" #include "QF/GL/defines.h" @@ -276,7 +266,6 @@ gl_R_RenderView (void) gl_Fog_EnableGFog (); gl_R_DrawWorld (); - S_ExtraUpdate (); // don't let sound get messed up if going slow gl_R_RenderDlights (); if (vr_data.view_model) { R_DrawViewModel (); diff --git a/libs/video/renderer/r_ent.c b/libs/video/renderer/r_ent.c index 6868a38ef..df5374e58 100644 --- a/libs/video/renderer/r_ent.c +++ b/libs/video/renderer/r_ent.c @@ -38,12 +38,6 @@ #include #include -#include "QF/model.h" -#include "QF/msg.h" -#include "QF/render.h" -#include "QF/sound.h" -#include "QF/sys.h" - #include "QF/scene/entity.h" #include "r_internal.h" diff --git a/libs/video/renderer/sw/draw.c b/libs/video/renderer/sw/draw.c index ad09e6315..27568d82c 100644 --- a/libs/video/renderer/sw/draw.c +++ b/libs/video/renderer/sw/draw.c @@ -37,11 +37,7 @@ #include -#include "QF/cvar.h" -#include "QF/draw.h" #include "QF/quakefs.h" -#include "QF/sound.h" -#include "QF/sys.h" #include "QF/ui/view.h" #include "d_iface.h" @@ -779,8 +775,6 @@ Draw_FadeScreen (void) int width = vid.conview->xlen / 4; uint32_t *pbuf; - S_ExtraUpdate (); - for (y = 0; y < height; y++) { uint32_t mask; @@ -792,8 +786,6 @@ Draw_FadeScreen (void) } } vr_data.scr_copyeverything = 1; - - S_ExtraUpdate (); } void diff --git a/libs/video/renderer/sw/sw_redge.c b/libs/video/renderer/sw/sw_redge.c index 92499477a..339c98bcb 100644 --- a/libs/video/renderer/sw/sw_redge.c +++ b/libs/video/renderer/sw/sw_redge.c @@ -28,9 +28,6 @@ # include "config.h" #endif -#include "QF/render.h" -#include "QF/sound.h" - #include "d_ifacea.h" #include "r_internal.h" #include "vid_internal.h" @@ -520,8 +517,6 @@ R_ScanEdges (void) // flush the span list if we can't be sure we have enough spans left // for the next scan if (span_p > max_span_p) { - S_ExtraUpdate (); // don't let sound get messed up if going slow - if (r_drawculledpolys) R_DrawCulledPolys (); else diff --git a/libs/video/renderer/sw/sw_rmain.c b/libs/video/renderer/sw/sw_rmain.c index b75c7efae..7edac2b8d 100644 --- a/libs/video/renderer/sw/sw_rmain.c +++ b/libs/video/renderer/sw/sw_rmain.c @@ -41,12 +41,6 @@ #include #include "QF/cmd.h" -#include "QF/cvar.h" -#include "QF/mathlib.h" -#include "QF/render.h" -#include "QF/screen.h" -#include "QF/sound.h" -#include "QF/sys.h" #include "QF/scene/entity.h" #include "QF/scene/scene.h" diff --git a/nq/include/client.h b/nq/include/client.h index 9aec5fed3..33d0c0174 100644 --- a/nq/include/client.h +++ b/nq/include/client.h @@ -33,7 +33,6 @@ #include "QF/mathlib.h" #include "QF/model.h" #include "QF/quakefs.h" -#include "QF/sound.h" #include "QF/render.h" #include "client/chase.h" diff --git a/nq/include/server.h b/nq/include/server.h index 905c5c548..d22a9b331 100644 --- a/nq/include/server.h +++ b/nq/include/server.h @@ -35,7 +35,7 @@ #include "QF/quakeio.h" #include "QF/sizebuf.h" -#include "client.h" +#include "game.h" #include "netmain.h" #include "protocol.h" #include "sv_progs.h" diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index b3d74bd9a..39f3d06a1 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -45,6 +45,7 @@ #include "QF/render.h" #include "QF/screen.h" #include "QF/skin.h" +#include "QF/sound.h" #include "QF/sys.h" #include "QF/va.h" diff --git a/nq/source/cl_parse.c b/nq/source/cl_parse.c index b8c1df2b2..12defffa9 100644 --- a/nq/source/cl_parse.c +++ b/nq/source/cl_parse.c @@ -48,7 +48,7 @@ #include "QF/sys.h" #include "QF/screen.h" #include "QF/skin.h" -#include "QF/sound.h" // FIXME: DEFAULT_SOUND_PACKET_* +#include "QF/sound.h" #include "QF/va.h" #include "QF/scene/scene.h" diff --git a/nq/source/host.c b/nq/source/host.c index c0fe78167..f943a564a 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -45,6 +45,7 @@ #include "buildnum.h" +#include "nq/include/client.h" #include "nq/include/host.h" #include "nq/include/server.h" diff --git a/nq/source/sv_ded.c b/nq/source/sv_ded.c index 99e8cadc1..0b4e7b88d 100644 --- a/nq/source/sv_ded.c +++ b/nq/source/sv_ded.c @@ -38,6 +38,7 @@ #include "client/world.h" +#include "nq/include/client.h" #include "nq/include/host.h" #include "nq/include/server.h" diff --git a/nq/source/sv_main.c b/nq/source/sv_main.c index 993f00cc1..32315d6f5 100644 --- a/nq/source/sv_main.c +++ b/nq/source/sv_main.c @@ -34,10 +34,13 @@ #include "QF/gib.h" #include "QF/msg.h" #include "QF/mathlib.h" +#include "QF/quakefs.h" #include "QF/set.h" #include "QF/sys.h" #include "QF/va.h" +#include "QF/simd/vec4f.h" + #include "compat.h" #include "world.h" diff --git a/qw/source/sv_send.c b/qw/source/sv_send.c index 112e9b7e8..71e03d593 100644 --- a/qw/source/sv_send.c +++ b/qw/source/sv_send.c @@ -44,7 +44,6 @@ #include "QF/dstring.h" #include "QF/msg.h" #include "QF/set.h" -#include "QF/sound.h" // FIXME: DEFAULT_SOUND_PACKET_* #include "QF/sys.h" #include "compat.h"