mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
clients now build (sdl, sgl, wgl), but don't link yet
This commit is contained in:
parent
8e2d89c4c2
commit
7f5d4cd7e9
20 changed files with 34 additions and 14 deletions
|
@ -30,7 +30,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "cdaudio.h"
|
#include "QF/cdaudio.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
CDAudio_Play (byte track, qboolean looping)
|
CDAudio_Play (byte track, qboolean looping)
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
|
|
||||||
#include "cl_cam.h"
|
#include "cl_cam.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "QF/msg.h"
|
#include "QF/msg.h"
|
||||||
#include "pmove.h"
|
#include "pmove.h"
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "cl_main.h"
|
#include "cl_main.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "host.h"
|
#include "host.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
|
|
||||||
qboolean
|
qboolean
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "bothdefs.h"
|
#include "bothdefs.h"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "QF/qargs.h"
|
#include "QF/qargs.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "sound.h"
|
#include "QF/sound.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
#include "vid.h"
|
#include "vid.h"
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "QF/input.h"
|
#include "QF/input.h"
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "QF/mdfour.h"
|
#include "QF/mdfour.h"
|
||||||
#include "QF/model.h"
|
#include "QF/model.h"
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
#include "QF/model.h"
|
#include "QF/model.h"
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
#include "QF/model.h"
|
#include "QF/model.h"
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/model.h"
|
#include "QF/model.h"
|
||||||
#include "QF/qendian.h"
|
#include "QF/qendian.h"
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "cl_parse.h"
|
#include "cl_parse.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
#include "tga.h"
|
#include "tga.h"
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
#include "host.h"
|
#include "host.h"
|
||||||
#include "input.h"
|
#include "QF/input.h"
|
||||||
#include "QF/keys.h"
|
#include "QF/keys.h"
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include "QF/qargs.h"
|
#include "QF/qargs.h"
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
#include "QF/keys.h"
|
#include "QF/keys.h"
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "locs.h"
|
#include "locs.h"
|
||||||
#include "QF/quakefs.h"
|
#include "QF/quakefs.h"
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
#include "cl_main.h"
|
#include "cl_main.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/crc.h"
|
#include "QF/crc.h"
|
||||||
#include "QF/info.h"
|
#include "QF/info.h"
|
||||||
#include "QF/model.h"
|
#include "QF/model.h"
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "bothdefs.h"
|
#include "bothdefs.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
#include "QF/input.h"
|
#include "QF/input.h"
|
||||||
|
|
|
@ -30,8 +30,11 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "cdaudio.h"
|
#include "winquake.h"
|
||||||
|
|
||||||
|
#include "QF/cdaudio.h"
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
|
#include "QF/compat.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
|
@ -43,10 +46,9 @@
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "sound.h"
|
#include "QF/sound.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
#include "QF/va.h"
|
#include "QF/va.h"
|
||||||
#include "winquake.h"
|
|
||||||
|
|
||||||
extern void (*vid_menudrawfn) (void);
|
extern void (*vid_menudrawfn) (void);
|
||||||
extern void (*vid_menukeyfn) (int);
|
extern void (*vid_menukeyfn) (int);
|
||||||
|
@ -258,7 +260,7 @@ VID_SetWindowedMode (int modenum)
|
||||||
global_hInstance, NULL);
|
global_hInstance, NULL);
|
||||||
|
|
||||||
if (!mainwindow)
|
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
|
// Center and show the window
|
||||||
CenterWindow (mainwindow, WindowRect.right - WindowRect.left,
|
CenterWindow (mainwindow, WindowRect.right - WindowRect.left,
|
||||||
|
@ -314,7 +316,7 @@ VID_SetFullDIBMode (int modenum)
|
||||||
|
|
||||||
if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) !=
|
if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) !=
|
||||||
DISP_CHANGE_SUCCESSFUL)
|
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;
|
lastmodestate = modestate;
|
||||||
|
@ -348,7 +350,7 @@ VID_SetFullDIBMode (int modenum)
|
||||||
global_hInstance, NULL);
|
global_hInstance, NULL);
|
||||||
|
|
||||||
if (!mainwindow)
|
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);
|
ShowWindow (mainwindow, SW_SHOWDEFAULT);
|
||||||
UpdateWindow (mainwindow);
|
UpdateWindow (mainwindow);
|
||||||
|
@ -889,7 +891,7 @@ AppActivate (BOOL fActive, BOOL minimize)
|
||||||
if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) !=
|
if (ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN) !=
|
||||||
DISP_CHANGE_SUCCESSFUL) {
|
DISP_CHANGE_SUCCESSFUL) {
|
||||||
IN_ShowMouse ();
|
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);
|
ShowWindow (mainwindow, SW_SHOWNORMAL);
|
||||||
|
|
||||||
|
@ -1210,7 +1212,7 @@ VID_InitDIB (HINSTANCE hInstance)
|
||||||
wc.lpszClassName = "QuakeForge";
|
wc.lpszClassName = "QuakeForge";
|
||||||
|
|
||||||
if (!RegisterClass (&wc))
|
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;
|
modelist[0].type = MS_WINDOWED;
|
||||||
|
|
||||||
|
@ -1426,7 +1428,7 @@ void
|
||||||
VID_Init (unsigned char *palette)
|
VID_Init (unsigned char *palette)
|
||||||
{
|
{
|
||||||
int i, existingmode;
|
int i, existingmode;
|
||||||
int basenummodes, width, height, bpp, findbpp, done;
|
int basenummodes, width, height=480, bpp, findbpp, done;
|
||||||
char gldir[MAX_OSPATH];
|
char gldir[MAX_OSPATH];
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
DEVMODE devmode;
|
DEVMODE devmode;
|
||||||
|
@ -1625,7 +1627,7 @@ VID_Init (unsigned char *palette)
|
||||||
lasterror=GetLastError();
|
lasterror=GetLastError();
|
||||||
if (maindc && mainwindow)
|
if (maindc && mainwindow)
|
||||||
ReleaseDC (mainwindow, maindc);
|
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)) {
|
if (!wglMakeCurrent (maindc, baseRC)) {
|
||||||
|
@ -1634,7 +1636,7 @@ VID_Init (unsigned char *palette)
|
||||||
wglDeleteContext (baseRC);
|
wglDeleteContext (baseRC);
|
||||||
if (maindc && mainwindow)
|
if (maindc && mainwindow)
|
||||||
ReleaseDC (mainwindow, maindc);
|
ReleaseDC (mainwindow, maindc);
|
||||||
Sys_Error ("wglMakeCurrent failed (%x)\r\n",lasterror);
|
Sys_Error ("wglMakeCurrent failed (%lx)\r\n",lasterror);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL_Init ();
|
GL_Init ();
|
||||||
|
|
Loading…
Reference in a new issue