diff --git a/libs/audio/cd/cd_null.c b/libs/audio/cd/cd_null.c index 1a9c7cc67..2680f225a 100644 --- a/libs/audio/cd/cd_null.c +++ b/libs/audio/cd/cd_null.c @@ -30,7 +30,7 @@ # include "config.h" #endif -#include "cdaudio.h" +#include "QF/cdaudio.h" void CDAudio_Play (byte track, qboolean looping) diff --git a/qw/source/cl_cam.c b/qw/source/cl_cam.c index 048eea775..4e10bbd4d 100644 --- a/qw/source/cl_cam.c +++ b/qw/source/cl_cam.c @@ -45,6 +45,7 @@ #include "cl_cam.h" #include "client.h" +#include "QF/compat.h" #include "QF/console.h" #include "QF/msg.h" #include "pmove.h" diff --git a/qw/source/cl_demo.c b/qw/source/cl_demo.c index b9d39cb78..b33a87240 100644 --- a/qw/source/cl_demo.c +++ b/qw/source/cl_demo.c @@ -36,6 +36,7 @@ # include #endif +#include "QF/compat.h" #include "QF/console.h" #include "cl_main.h" #include "client.h" diff --git a/qw/source/cl_misc.c b/qw/source/cl_misc.c index 67a598d9d..16c23a7f0 100644 --- a/qw/source/cl_misc.c +++ b/qw/source/cl_misc.c @@ -33,6 +33,7 @@ #include #include "host.h" +#include "QF/compat.h" #include "QF/sys.h" qboolean diff --git a/qw/source/cl_slist.c b/qw/source/cl_slist.c index f2f938504..897e312ba 100644 --- a/qw/source/cl_slist.c +++ b/qw/source/cl_slist.c @@ -47,6 +47,9 @@ #ifdef HAVE_UNISTD_H # include #endif +#ifdef HAVE_WINDOWS_H +# include +#endif #include #include "bothdefs.h" diff --git a/qw/source/cl_sys_win.c b/qw/source/cl_sys_win.c index 5e5bee20f..44534f8eb 100644 --- a/qw/source/cl_sys_win.c +++ b/qw/source/cl_sys_win.c @@ -45,7 +45,7 @@ #include "QF/qargs.h" #include "resource.h" #include "screen.h" -#include "sound.h" +#include "QF/sound.h" #include "QF/sys.h" #include "vid.h" diff --git a/qw/source/console.c b/qw/source/console.c index fdec865ce..92fd13eee 100644 --- a/qw/source/console.c +++ b/qw/source/console.c @@ -40,6 +40,7 @@ #include "client.h" #include "QF/cmd.h" +#include "QF/compat.h" #include "QF/console.h" #include "draw.h" #include "QF/input.h" diff --git a/qw/source/gl_mesh.c b/qw/source/gl_mesh.c index 83d119b73..b4bc26dfd 100644 --- a/qw/source/gl_mesh.c +++ b/qw/source/gl_mesh.c @@ -38,6 +38,7 @@ #include +#include "QF/compat.h" #include "QF/console.h" #include "QF/mdfour.h" #include "QF/model.h" diff --git a/qw/source/gl_model_alias.c b/qw/source/gl_model_alias.c index 4effecd3c..5491bfe14 100644 --- a/qw/source/gl_model_alias.c +++ b/qw/source/gl_model_alias.c @@ -39,6 +39,7 @@ # include #endif +#include "QF/compat.h" #include "QF/console.h" #include "glquake.h" #include "QF/model.h" diff --git a/qw/source/gl_model_brush.c b/qw/source/gl_model_brush.c index 8f6a0d02f..a39cddda5 100644 --- a/qw/source/gl_model_brush.c +++ b/qw/source/gl_model_brush.c @@ -39,6 +39,7 @@ # include #endif +#include "QF/compat.h" #include "QF/console.h" #include "glquake.h" #include "QF/model.h" diff --git a/qw/source/gl_model_sprite.c b/qw/source/gl_model_sprite.c index 7416073cb..2c3b79368 100644 --- a/qw/source/gl_model_sprite.c +++ b/qw/source/gl_model_sprite.c @@ -40,6 +40,7 @@ #endif #include "glquake.h" +#include "QF/compat.h" #include "QF/model.h" #include "QF/qendian.h" diff --git a/qw/source/gl_ngraph.c b/qw/source/gl_ngraph.c index 785e4b8b3..d7d654513 100644 --- a/qw/source/gl_ngraph.c +++ b/qw/source/gl_ngraph.c @@ -39,6 +39,7 @@ #include #include "cl_parse.h" +#include "QF/compat.h" #include "QF/cvar.h" #include "draw.h" #include "glquake.h" diff --git a/qw/source/gl_sky.c b/qw/source/gl_sky.c index 119f1df52..dedd1cc21 100644 --- a/qw/source/gl_sky.c +++ b/qw/source/gl_sky.c @@ -36,6 +36,7 @@ # include #endif +#include "QF/compat.h" #include "QF/console.h" #include "glquake.h" #include "tga.h" diff --git a/qw/source/joy_win.c b/qw/source/joy_win.c index 31bac2bb5..58ca6f0d1 100644 --- a/qw/source/joy_win.c +++ b/qw/source/joy_win.c @@ -47,7 +47,7 @@ #include "QF/console.h" #include "QF/cvar.h" #include "host.h" -#include "input.h" +#include "QF/input.h" #include "QF/keys.h" #include "protocol.h" #include "QF/qargs.h" diff --git a/qw/source/keys.c b/qw/source/keys.c index d8a09eeaa..8ca8c3247 100644 --- a/qw/source/keys.c +++ b/qw/source/keys.c @@ -44,6 +44,7 @@ #include "client.h" #include "QF/cmd.h" +#include "QF/compat.h" #include "QF/console.h" #include "QF/cvar.h" #include "QF/keys.h" diff --git a/qw/source/locs.c b/qw/source/locs.c index 7df145e50..bb4c28f26 100644 --- a/qw/source/locs.c +++ b/qw/source/locs.c @@ -39,6 +39,7 @@ #include #include "client.h" +#include "QF/compat.h" #include "QF/console.h" #include "locs.h" #include "QF/quakefs.h" diff --git a/qw/source/model_alias.c b/qw/source/model_alias.c index eeeba2852..7d40b6072 100644 --- a/qw/source/model_alias.c +++ b/qw/source/model_alias.c @@ -41,6 +41,7 @@ #include "cl_main.h" #include "client.h" +#include "QF/compat.h" #include "QF/crc.h" #include "QF/info.h" #include "QF/model.h" diff --git a/qw/source/teamplay.c b/qw/source/teamplay.c index 34ea5da9c..837b25993 100644 --- a/qw/source/teamplay.c +++ b/qw/source/teamplay.c @@ -39,6 +39,7 @@ #include #include "bothdefs.h" +#include "QF/compat.h" #include "QF/console.h" #include "QF/cmd.h" #include "client.h" diff --git a/qw/source/vid_common_gl.c b/qw/source/vid_common_gl.c index a7298887c..8c5528243 100644 --- a/qw/source/vid_common_gl.c +++ b/qw/source/vid_common_gl.c @@ -44,6 +44,7 @@ #include +#include "QF/compat.h" #include "QF/console.h" #include "glquake.h" #include "QF/input.h" diff --git a/qw/source/vid_wgl.c b/qw/source/vid_wgl.c index 779d929a3..0f719807e 100644 --- a/qw/source/vid_wgl.c +++ b/qw/source/vid_wgl.c @@ -30,8 +30,11 @@ # include "config.h" #endif -#include "cdaudio.h" +#include "winquake.h" + +#include "QF/cdaudio.h" #include "QF/cmd.h" +#include "QF/compat.h" #include "QF/console.h" #include "draw.h" #include "glquake.h" @@ -43,10 +46,9 @@ #include "resource.h" #include "sbar.h" #include "screen.h" -#include "sound.h" +#include "QF/sound.h" #include "QF/sys.h" #include "QF/va.h" -#include "winquake.h" extern void (*vid_menudrawfn) (void); extern void (*vid_menukeyfn) (int); @@ -258,7 +260,7 @@ VID_SetWindowedMode (int modenum) global_hInstance, NULL); if (!mainwindow) - Sys_Error ("Couldn't create DIB window (%x)\r\n",GetLastError()); + Sys_Error ("Couldn't create DIB window (%lx)\r\n",GetLastError()); // Center and show the window CenterWindow (mainwindow, WindowRect.right - WindowRect.left, @@ -314,7 +316,7 @@ VID_SetFullDIBMode (int modenum) if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) - Sys_Error ("Couldn't set fullscreen DIB mode (%x)\r\n",GetLastError()); + Sys_Error ("Couldn't set fullscreen DIB mode (%lx)\r\n",GetLastError()); } lastmodestate = modestate; @@ -348,7 +350,7 @@ VID_SetFullDIBMode (int modenum) global_hInstance, NULL); if (!mainwindow) - Sys_Error ("Couldn't create DIB window (%x)\r\n",GetLastError()); + Sys_Error ("Couldn't create DIB window (%lx)\r\n",GetLastError()); ShowWindow (mainwindow, SW_SHOWDEFAULT); UpdateWindow (mainwindow); @@ -889,7 +891,7 @@ AppActivate (BOOL fActive, BOOL minimize) if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) { IN_ShowMouse (); - Sys_Error ("Couldn't set fullscreen DIB mode\n(try upgrading your video drivers)\r\n (%x)",GetLastError()); + Sys_Error ("Couldn't set fullscreen DIB mode\n(try upgrading your video drivers)\r\n (%lx)",GetLastError()); } ShowWindow (mainwindow, SW_SHOWNORMAL); @@ -1210,7 +1212,7 @@ VID_InitDIB (HINSTANCE hInstance) wc.lpszClassName = "QuakeForge"; if (!RegisterClass (&wc)) - Sys_Error ("Couldn't register window class (%x)\r\n",GetLastError()); + Sys_Error ("Couldn't register window class (%lx)\r\n",GetLastError()); modelist[0].type = MS_WINDOWED; @@ -1426,7 +1428,7 @@ void VID_Init (unsigned char *palette) { int i, existingmode; - int basenummodes, width, height, bpp, findbpp, done; + int basenummodes, width, height=480, bpp, findbpp, done; char gldir[MAX_OSPATH]; HDC hdc; DEVMODE devmode; @@ -1625,7 +1627,7 @@ VID_Init (unsigned char *palette) lasterror=GetLastError(); if (maindc && mainwindow) ReleaseDC (mainwindow, maindc); - Sys_Error("Could not initialize GL (wglCreateContext failed).\n\nMake sure you in are 65535 color mode, and try running -window. \nError code: (%x)\r\n",lasterror); + Sys_Error("Could not initialize GL (wglCreateContext failed).\n\nMake sure you in are 65535 color mode, and try running -window. \nError code: (%lx)\r\n",lasterror); } if (!wglMakeCurrent (maindc, baseRC)) { @@ -1634,7 +1636,7 @@ VID_Init (unsigned char *palette) wglDeleteContext (baseRC); if (maindc && mainwindow) ReleaseDC (mainwindow, maindc); - Sys_Error ("wglMakeCurrent failed (%x)\r\n",lasterror); + Sys_Error ("wglMakeCurrent failed (%lx)\r\n",lasterror); } GL_Init ();