diff --git a/hw/source/master.c b/hw/source/master.c index ef63366f4..4617e3c7d 100644 --- a/hw/source/master.c +++ b/hw/source/master.c @@ -16,12 +16,13 @@ #include "QF/idparse.h" #include "QF/mathlib.h" #include "QF/msg.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/qendian.h" #include "QF/sizebuf.h" #include "QF/sys.h" +#include "QF/plugin/console.h" + #include "compat.h" #include "netchan.h" diff --git a/include/QF/plugin.h b/include/QF/plugin.h index c8be6a386..09c939938 100644 --- a/include/QF/plugin.h +++ b/include/QF/plugin.h @@ -37,12 +37,6 @@ #define QFPLUGIN_VERSION "1.0" #include -#include -#include -#include -#include -#include -#include #ifdef STATIC_PLUGINS #define PLUGIN_INFO(type,name) plugin_t *type##_##name##_PluginInfo (void); plugin_t * type##_##name##_PluginInfo (void) @@ -57,24 +51,25 @@ typedef enum { qfp_console, // Console `driver' qfp_snd_output, // Sound output (OSS, ALSA, Win32) qfp_snd_render, // Sound mixing + qfp_vid_render, // Video renderer } plugin_type_t; typedef struct plugin_funcs_s { - general_funcs_t *general; - input_funcs_t *input; - cd_funcs_t *cd; - console_funcs_t *console; - snd_output_funcs_t *snd_output; - snd_render_funcs_t *snd_render; + struct general_funcs_s *general; + struct input_funcs_s *input; + struct cd_funcs_s *cd; + struct console_funcs_s *console; + struct snd_output_funcs_s *snd_output; + struct snd_render_funcs_s *snd_render; } plugin_funcs_t; typedef struct plugin_data_s { - general_data_t *general; - input_data_t *input; - cd_data_t *cd; - console_data_t *console; - snd_output_data_t *snd_output; - snd_render_data_t *snd_render; + struct general_data_s *general; + struct input_data_s *input; + struct cd_data_s *cd; + struct console_data_s *console; + struct snd_output_data_s *snd_output; + struct snd_render_data_s *snd_render; } plugin_data_t; typedef struct plugin_s { diff --git a/include/QF/plugin/cd.h b/include/QF/plugin/cd.h index 99a62f7b8..e5a2c33c0 100644 --- a/include/QF/plugin/cd.h +++ b/include/QF/plugin/cd.h @@ -28,6 +28,7 @@ #ifndef __QF_plugin_cd_h_ #define __QF_plugin_cd_h_ +#include #include /* diff --git a/include/QF/plugin/console.h b/include/QF/plugin/console.h index 0ea21d47f..753788d8f 100644 --- a/include/QF/plugin/console.h +++ b/include/QF/plugin/console.h @@ -32,6 +32,7 @@ #include #include +#include #include typedef void (*P_C_Print) (const char *fmt, va_list args); @@ -41,7 +42,7 @@ typedef void (*P_C_DrawConsole) (void); typedef void (*P_C_CheckResize) (void); typedef void (*P_C_NewMap) (void); -typedef struct console_func_s { +typedef struct console_funcs_s { P_C_Print pC_Print; P_C_ProcessInput pC_ProcessInput; P_C_KeyEvent pC_KeyEvent; diff --git a/include/QF/plugin/general.h b/include/QF/plugin/general.h index d0b70129e..e1d3bc31e 100644 --- a/include/QF/plugin/general.h +++ b/include/QF/plugin/general.h @@ -29,6 +29,7 @@ #ifndef __QF_plugin_general_h_ #define __QF_plugin_general_h_ +#include #include /* @@ -38,7 +39,7 @@ typedef void (*P_Init) (void); typedef void (*P_Shutdown) (void); -typedef struct general_func_s { +typedef struct general_funcs_s { P_Init p_Init; P_Shutdown p_Shutdown; } general_funcs_t; diff --git a/include/QF/plugin/input.h b/include/QF/plugin/input.h index 015ba5343..e17d6ee9d 100644 --- a/include/QF/plugin/input.h +++ b/include/QF/plugin/input.h @@ -29,6 +29,7 @@ #ifndef __QF_plugin_input_h_ #define __QF_plugin_input_h_ +#include #include /* diff --git a/include/QF/plugin/snd_output.h b/include/QF/plugin/snd_output.h index 55fe8dfe0..33febc005 100644 --- a/include/QF/plugin/snd_output.h +++ b/include/QF/plugin/snd_output.h @@ -28,6 +28,7 @@ #ifndef __QF_plugin_snd_output_h_ #define __QF_plugin_snd_output_h_ +#include #include /* diff --git a/include/QF/plugin/snd_render.h b/include/QF/plugin/snd_render.h index 75982e66f..4078cd96b 100644 --- a/include/QF/plugin/snd_render.h +++ b/include/QF/plugin/snd_render.h @@ -28,6 +28,7 @@ #ifndef __QF_plugin_snd_render_h_ #define __QF_plugin_snd_render_h_ +#include #include /* diff --git a/include/snd_internal.h b/include/snd_internal.h index 18197c679..7b0b74aad 100644 --- a/include/snd_internal.h +++ b/include/snd_internal.h @@ -38,7 +38,9 @@ */ //@{ +#include "QF/plugin/general.h" #include "QF/plugin/snd_render.h" +#include "QF/plugin/snd_output.h" #include "QF/quakeio.h" #include "QF/sound.h" #include "QF/zone.h" diff --git a/libs/audio/cd.c b/libs/audio/cd.c index 9494e83a0..d78d16489 100644 --- a/libs/audio/cd.c +++ b/libs/audio/cd.c @@ -36,11 +36,13 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cdaudio.h" #include "QF/cmd.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/qtypes.h" #include "QF/sys.h" +#include "QF/plugin/general.h" +#include "QF/plugin/cd.h" + cvar_t *cd_plugin; plugin_t *cdmodule = NULL; diff --git a/libs/audio/cd_file.c b/libs/audio/cd_file.c index 29ac282e3..11786292e 100644 --- a/libs/audio/cd_file.c +++ b/libs/audio/cd_file.c @@ -56,7 +56,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/dstring.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/qfplist.h" #include "QF/quakefs.h" @@ -65,6 +64,9 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/sys.h" #include "QF/va.h" +#include "QF/plugin/general.h" +#include "QF/plugin/cd.h" + #include "compat.h" #include "snd_internal.h" diff --git a/libs/audio/cd_linux.c b/libs/audio/cd_linux.c index c6904d2c8..ae855fe4a 100644 --- a/libs/audio/cd_linux.c +++ b/libs/audio/cd_linux.c @@ -53,11 +53,13 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cdaudio.h" #include "QF/cmd.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sound.h" #include "QF/sys.h" +#include "QF/plugin/general.h" +#include "QF/plugin/cd.h" + #include "compat.h" static plugin_t plugin_info; diff --git a/libs/audio/cd_sdl.c b/libs/audio/cd_sdl.c index 616a4e1d7..56d8715ae 100644 --- a/libs/audio/cd_sdl.c +++ b/libs/audio/cd_sdl.c @@ -43,11 +43,13 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cdaudio.h" #include "QF/cmd.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sound.h" #include "QF/sys.h" +#include "QF/plugin/general.h" +#include "QF/plugin/cd.h" + #include "compat.h" static plugin_t plugin_info; diff --git a/libs/audio/cd_sgi.c b/libs/audio/cd_sgi.c index ae88bc207..5471b9769 100644 --- a/libs/audio/cd_sgi.c +++ b/libs/audio/cd_sgi.c @@ -42,7 +42,9 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/qargs.h" #include "QF/sound.h" #include "QF/sys.h" -#include "QF/plugin.h" + +#include "QF/plugin/general.h" +#include "QF/plugin/cd.h" #include "compat.h" diff --git a/libs/audio/cd_win.c b/libs/audio/cd_win.c index b222d8b91..edb26f2dd 100644 --- a/libs/audio/cd_win.c +++ b/libs/audio/cd_win.c @@ -36,11 +36,13 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cdaudio.h" #include "QF/cmd.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sound.h" #include "QF/sys.h" +#include "QF/plugin/general.h" +#include "QF/plugin/cd.h" + #include "compat.h" static plugin_t plugin_info; diff --git a/libs/audio/cd_xmms.c b/libs/audio/cd_xmms.c index 774ba5962..c90a95c46 100644 --- a/libs/audio/cd_xmms.c +++ b/libs/audio/cd_xmms.c @@ -59,11 +59,13 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cdaudio.h" #include "QF/cmd.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sound.h" #include "QF/sys.h" +#include "QF/plugin/general.h" +#include "QF/plugin/cd.h" + #include "compat.h" static plugin_t plugin_info; diff --git a/libs/audio/snd.c b/libs/audio/snd.c index bc1a4ca40..fb6335866 100644 --- a/libs/audio/snd.c +++ b/libs/audio/snd.c @@ -35,10 +35,11 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cvar.h" #include "QF/sound.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sys.h" +#include "snd_internal.h" + static cvar_t *snd_output; static cvar_t *snd_render; static plugin_t *snd_render_module = NULL; diff --git a/libs/audio/targets/snd_alsa.c b/libs/audio/targets/snd_alsa.c index d3fa440a4..949cd78ff 100644 --- a/libs/audio/targets/snd_alsa.c +++ b/libs/audio/targets/snd_alsa.c @@ -37,7 +37,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sys.h" diff --git a/libs/audio/targets/snd_disk.c b/libs/audio/targets/snd_disk.c index ddbfee0b1..f740e2bae 100644 --- a/libs/audio/targets/snd_disk.c +++ b/libs/audio/targets/snd_disk.c @@ -48,7 +48,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sys.h" diff --git a/libs/audio/targets/snd_dx.c b/libs/audio/targets/snd_dx.c index 87c8e19a6..9dea31137 100644 --- a/libs/audio/targets/snd_dx.c +++ b/libs/audio/targets/snd_dx.c @@ -36,7 +36,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "winquake.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sys.h" diff --git a/libs/audio/targets/snd_oss.c b/libs/audio/targets/snd_oss.c index b1281cddd..5ef069c27 100644 --- a/libs/audio/targets/snd_oss.c +++ b/libs/audio/targets/snd_oss.c @@ -68,7 +68,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cmd.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sys.h" diff --git a/libs/audio/targets/snd_sdl.c b/libs/audio/targets/snd_sdl.c index c2ee47a34..be6f9bb98 100644 --- a/libs/audio/targets/snd_sdl.c +++ b/libs/audio/targets/snd_sdl.c @@ -45,7 +45,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cmd.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sys.h" diff --git a/libs/audio/targets/snd_sgi.c b/libs/audio/targets/snd_sgi.c index 478c524f6..125952d86 100644 --- a/libs/audio/targets/snd_sgi.c +++ b/libs/audio/targets/snd_sgi.c @@ -37,7 +37,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/qtypes.h" #include "QF/sys.h" diff --git a/libs/audio/targets/snd_sun.c b/libs/audio/targets/snd_sun.c index 058bff065..0ff117e8c 100644 --- a/libs/audio/targets/snd_sun.c +++ b/libs/audio/targets/snd_sun.c @@ -54,7 +54,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/qtypes.h" #include "QF/sys.h" diff --git a/libs/audio/targets/snd_win.c b/libs/audio/targets/snd_win.c index 299dbfdf4..52febd806 100644 --- a/libs/audio/targets/snd_win.c +++ b/libs/audio/targets/snd_win.c @@ -35,7 +35,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "winquake.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/sys.h" diff --git a/libs/console/client.c b/libs/console/client.c index 1c926087f..3da91ca53 100644 --- a/libs/console/client.c +++ b/libs/console/client.c @@ -54,7 +54,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/gib.h" #include "QF/input.h" #include "QF/keys.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/quakefs.h" #include "QF/render.h" @@ -64,6 +63,9 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/vid.h" #include "QF/view.h" +#include "QF/plugin/general.h" +#include "QF/plugin/console.h" + #include "compat.h" static general_data_t plugin_info_general_data; diff --git a/libs/console/complete.c b/libs/console/complete.c index 59aaedea5..7c8b8d84f 100644 --- a/libs/console/complete.c +++ b/libs/console/complete.c @@ -45,9 +45,11 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/mathlib.h" -#include "QF/plugin.h" #include "QF/sys.h" #include "QF/va.h" + +#include "QF/plugin/console.h" + #include "compat.h" /* diff --git a/libs/console/console.c b/libs/console/console.c index 4bf099fc5..6d0cc52a1 100644 --- a/libs/console/console.c +++ b/libs/console/console.c @@ -40,9 +40,11 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cmd.h" #include "QF/console.h" #include "QF/cvar.h" -#include "QF/plugin.h" #include "QF/sys.h" +#include "QF/plugin/general.h" +#include "QF/plugin/console.h" + //FIXME probably shouldn't be visible VISIBLE int con_linewidth; // characters across screen diff --git a/libs/console/menu.c b/libs/console/menu.c index e9614e1dd..3915f3ae1 100644 --- a/libs/console/menu.c +++ b/libs/console/menu.c @@ -43,7 +43,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cvar.h" #include "QF/draw.h" #include "QF/hash.h" -#include "QF/plugin.h" #include "QF/progs.h" #include "QF/quakefs.h" #include "QF/render.h" @@ -52,6 +51,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/sys.h" #include "QF/view.h" +#include "QF/plugin/console.h" + typedef struct menu_pic_s { struct menu_pic_s *next; int x, y; diff --git a/libs/console/server.c b/libs/console/server.c index 8d5ceda0d..3205f83c2 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -65,13 +65,15 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cvar.h" #include "QF/dstring.h" #include "QF/keys.h" -#include "QF/plugin.h" #include "QF/qtypes.h" #include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" #include "QF/view.h" +#include "QF/plugin/general.h" +#include "QF/plugin/console.h" + #include "compat.h" #include "sv_console.h" diff --git a/libs/util/plugin.c b/libs/util/plugin.c index f8a4d7ac4..16a559a2a 100644 --- a/libs/util/plugin.c +++ b/libs/util/plugin.c @@ -61,6 +61,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/sys.h" #include "QF/cmd.h" +#include "QF/plugin/general.h" + #include "compat.h" // loaded_plugins is only for plugins loaded from scripts - not system diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index 7be168778..96aa2dca3 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/input.h" #include "QF/keys.h" #include "QF/msg.h" -#include "QF/plugin.h" #include "QF/qfplist.h" #include "QF/render.h" #include "QF/screen.h" @@ -48,6 +47,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/sys.h" #include "QF/va.h" +#include "QF/plugin/console.h" + #include "chase.h" #include "cl_skin.h" #include "client.h" diff --git a/nq/source/host.c b/nq/source/host.c index 3f7c4d795..563b13fd3 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -45,7 +45,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; #include "QF/input.h" #include "QF/keys.h" #include "QF/msg.h" -#include "QF/plugin.h" #include "QF/png.h" #include "QF/progs.h" #include "QF/qargs.h" @@ -55,6 +54,8 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; #include "QF/vid.h" #include "QF/gib.h" +#include "QF/plugin/console.h" + #include "buildnum.h" #include "chase.h" #include "compat.h" diff --git a/nq/source/sbar.c b/nq/source/sbar.c index 7c94ea651..d3054a723 100644 --- a/nq/source/sbar.c +++ b/nq/source/sbar.c @@ -46,7 +46,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/draw.h" #include "QF/dstring.h" #include "QF/gib.h" -#include "QF/plugin.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/va.h" @@ -54,6 +53,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/view.h" #include "QF/wad.h" +#include "QF/plugin/console.h" + #include "client.h" #include "compat.h" #include "game.h" diff --git a/qtv/source/qtv.c b/qtv/source/qtv.c index eb32e9e9b..0506d3dd7 100644 --- a/qtv/source/qtv.c +++ b/qtv/source/qtv.c @@ -51,13 +51,14 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/dstring.h" #include "QF/idparse.h" #include "QF/info.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" #include "QF/zone.h" +#include "QF/plugin/console.h" + #include "qw/protocol.h" #include "client.h" diff --git a/qtv/source/sbar.c b/qtv/source/sbar.c index ce6a7a3a8..300d3f924 100644 --- a/qtv/source/sbar.c +++ b/qtv/source/sbar.c @@ -35,10 +35,11 @@ static __attribute__ ((used)) const char rcsid[] = "$Id: template.c 11394 2007-03-17 03:23:39Z taniwha $"; #include "QF/console.h" -#include "QF/plugin.h" #include "QF/view.h" #include "QF/va.h" +#include "QF/plugin/console.h" + #include "client.h" #include "server.h" #include "sv_console.h" diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 3aab6b108..9db3c400c 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -76,7 +76,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/keys.h" #include "QF/model.h" #include "QF/msg.h" -#include "QF/plugin.h" #include "QF/png.h" #include "QF/progs.h" #include "QF/qargs.h" @@ -91,6 +90,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/vid.h" #include "QF/gib.h" +#include "QF/plugin/console.h" + #include "qw/bothdefs.h" #include "buildnum.h" #include "cl_cam.h" diff --git a/qw/source/sbar.c b/qw/source/sbar.c index ce94bf9c6..751acb1e5 100644 --- a/qw/source/sbar.c +++ b/qw/source/sbar.c @@ -48,7 +48,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/dstring.h" #include "QF/gib.h" #include "QF/msg.h" -#include "QF/plugin.h" #include "QF/quakefs.h" #include "QF/screen.h" #include "QF/sys.h" @@ -56,6 +55,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/vid.h" #include "QF/view.h" +#include "QF/plugin/console.h" + #include "qw/bothdefs.h" #include "cl_cam.h" #include "cl_parse.h" diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index e8ee03162..73768d7d0 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -71,7 +71,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/dstring.h" #include "QF/model.h" #include "QF/msg.h" -#include "QF/plugin.h" #include "QF/qargs.h" #include "QF/quakefs.h" #include "QF/sys.h" @@ -79,6 +78,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/ver_check.h" #include "QF/zone.h" +#include "QF/plugin/console.h" + #include "qw/bothdefs.h" #include "buildnum.h" #include "compat.h" diff --git a/qw/source/sv_sbar.c b/qw/source/sv_sbar.c index 918ff4fae..183f01bb5 100644 --- a/qw/source/sv_sbar.c +++ b/qw/source/sv_sbar.c @@ -35,10 +35,11 @@ static __attribute__ ((used)) const char rcsid[] = "$Id: template.c 11394 2007-03-17 03:23:39Z taniwha $"; #include "QF/console.h" -#include "QF/plugin.h" #include "QF/view.h" #include "QF/va.h" +#include "QF/plugin/console.h" + #include "server.h" #include "sv_console.h" #include "sv_recorder.h"