diff --git a/include/QF/input.h b/include/QF/input.h index 2cb78571f..786c3ffa8 100644 --- a/include/QF/input.h +++ b/include/QF/input.h @@ -67,7 +67,6 @@ extern float in_mouse_x, in_mouse_y; void IN_LL_Init_Cvars (void); void IN_LL_Init (void); void IN_LL_Shutdown (void); -void IN_LL_Commands (void); void IN_LL_Grab_Input (void); void IN_LL_Ungrab_Input (void); void IN_LL_SendKeyEvents (void); diff --git a/include/QF/plugin/cd.h b/include/QF/plugin/cd.h index 3048862f4..8d31b545e 100644 --- a/include/QF/plugin/cd.h +++ b/include/QF/plugin/cd.h @@ -28,7 +28,6 @@ #ifndef __QF_plugin_cd_h_ #define __QF_plugin_cd_h_ -#include #include #include diff --git a/include/QF/plugin/input.h b/include/QF/plugin/input.h index 50fe2fc3b..7f2c4a7cb 100644 --- a/include/QF/plugin/input.h +++ b/include/QF/plugin/input.h @@ -30,7 +30,6 @@ #define __QF_plugin_input_h_ #include -#include #include /* diff --git a/include/QF/plugin/snd_output.h b/include/QF/plugin/snd_output.h index d9475b8dc..9b0b14d60 100644 --- a/include/QF/plugin/snd_output.h +++ b/include/QF/plugin/snd_output.h @@ -29,7 +29,6 @@ #define __QF_plugin_snd_output_h_ #include -#include #include /* diff --git a/include/QF/plugin/snd_render.h b/include/QF/plugin/snd_render.h index e11077065..98f0006df 100644 --- a/include/QF/plugin/snd_render.h +++ b/include/QF/plugin/snd_render.h @@ -29,22 +29,24 @@ #define __QF_plugin_snd_render_h_ #include -#include #include /* All sound plugins must export these functions */ + +struct sfx_s; + typedef void (QFPLUGIN *P_S_Init) (void); typedef void (QFPLUGIN *P_S_Shutdown) (void); typedef void (QFPLUGIN *P_S_AmbientOff) (void); typedef void (QFPLUGIN *P_S_AmbientOn) (void); typedef void (QFPLUGIN *P_S_TouchSound) (const char *sample); typedef void (QFPLUGIN *P_S_ClearBuffer) (void); -typedef void (QFPLUGIN *P_S_StartSound) (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation); -typedef void (QFPLUGIN *P_S_StaticSound) (sfx_t *sfx, vec3_t origin, float vol, float attenuation); +typedef void (QFPLUGIN *P_S_StartSound) (int entnum, int entchannel, struct sfx_s *sfx, vec3_t origin, float fvol, float attenuation); +typedef void (QFPLUGIN *P_S_StaticSound) (struct sfx_s *sfx, vec3_t origin, float vol, float attenuation); typedef void (QFPLUGIN *P_S_StopSound) (int entnum, int entchannel); -typedef sfx_t * (QFPLUGIN *P_S_PrecacheSound) (const char *sample); +typedef struct sfx_s * (QFPLUGIN *P_S_PrecacheSound) (const char *sample); typedef void (QFPLUGIN *P_S_ClearPrecache) (void); typedef void (QFPLUGIN *P_S_Update) (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up); typedef void (QFPLUGIN *P_S_StopAllSounds) (qboolean clear); diff --git a/libs/video/targets/in_common.c b/libs/video/targets/in_common.c index d69bd859b..8e3034a9a 100644 --- a/libs/video/targets/in_common.c +++ b/libs/video/targets/in_common.c @@ -95,8 +95,6 @@ void IN_Commands (void) { JOY_Command (); - - IN_LL_Commands (); } void diff --git a/libs/video/targets/in_fbdev.c b/libs/video/targets/in_fbdev.c index a8b23529c..c86523cdb 100644 --- a/libs/video/targets/in_fbdev.c +++ b/libs/video/targets/in_fbdev.c @@ -130,11 +130,6 @@ IN_LL_SendKeyEvents (void) } } -void -IN_LL_Commands (void) -{ -} - void IN_LL_Grab_Input (void) { diff --git a/libs/video/targets/in_sdl.c b/libs/video/targets/in_sdl.c index 4600b37f6..114fd1ef6 100644 --- a/libs/video/targets/in_sdl.c +++ b/libs/video/targets/in_sdl.c @@ -819,11 +819,6 @@ IN_LL_SendKeyEvents (void) } } -void -IN_LL_Commands (void) -{ -} - void IN_LL_Grab_Input (void) { diff --git a/libs/video/targets/in_svgalib.c b/libs/video/targets/in_svgalib.c index b1757f565..88c61f7e9 100644 --- a/libs/video/targets/in_svgalib.c +++ b/libs/video/targets/in_svgalib.c @@ -417,11 +417,7 @@ IN_LL_SendKeyEvents (void) if (UseKeyboard) { while ((keyboard_update ())); } -} -void -IN_LL_Commands (void) -{ if (UseMouse) { /* Poll mouse values */ while (mouse_update ()); diff --git a/libs/video/targets/in_win.c b/libs/video/targets/in_win.c index f7209bb11..0c4b45a9e 100644 --- a/libs/video/targets/in_win.c +++ b/libs/video/targets/in_win.c @@ -401,16 +401,44 @@ IN_MouseEvent (int mstate) } void -IN_LL_Commands (void) +IN_LL_Grab_Input (void) { - int mx, my; +} +void +IN_LL_Ungrab_Input (void) +{ +} + +void +IN_LL_ClearStates (void) +{ + + if (in_mouse_avail) { + mx_accum = 0; + my_accum = 0; + mouse_oldbuttonstate = 0; + } +} + +void +IN_LL_SendKeyEvents (void) +{ + MSG msg; + int mx, my; // HDC hdc; int i; DIDEVICEOBJECTDATA od; DWORD dwElements; HRESULT hr; + while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { + if (!GetMessage (&msg, NULL, 0, 0)) + Sys_Quit (); + TranslateMessage (&msg); + DispatchMessage (&msg); + } + if (!in_mouse_avail) return; @@ -497,37 +525,3 @@ IN_LL_Commands (void) SetCursorPos (window_center_x, window_center_y); } } - -void -IN_LL_Grab_Input (void) -{ -} - -void -IN_LL_Ungrab_Input (void) -{ -} - -void -IN_LL_ClearStates (void) -{ - - if (in_mouse_avail) { - mx_accum = 0; - my_accum = 0; - mouse_oldbuttonstate = 0; - } -} - -void -IN_LL_SendKeyEvents (void) -{ - MSG msg; - - while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { - if (!GetMessage (&msg, NULL, 0, 0)) - Sys_Quit (); - TranslateMessage (&msg); - DispatchMessage (&msg); - } -} diff --git a/libs/video/targets/in_x11.c b/libs/video/targets/in_x11.c index 362579095..b3d602dcb 100644 --- a/libs/video/targets/in_x11.c +++ b/libs/video/targets/in_x11.c @@ -473,11 +473,6 @@ event_motion (XEvent * event) } } -void -IN_LL_Commands (void) -{ -} - void IN_LL_Grab_Input (void) { @@ -512,11 +507,7 @@ IN_LL_Shutdown (void) in_mouse_avail = 0; if (x_disp) { XAutoRepeatOn (x_disp); - -#ifdef HAVE_DGA - if (dga_avail) - XF86DGADirectVideo (x_disp, DefaultScreen (x_disp), 0); -#endif + dga_off (); } X11_CloseDisplay (); }