mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
qw-client-wgl now builds (nq-wgl next)
This commit is contained in:
parent
12c14bd71f
commit
4ae2ad2949
5 changed files with 23 additions and 115 deletions
11
configure.in
11
configure.in
|
@ -851,12 +851,12 @@ fi
|
|||
|
||||
dnl Win32
|
||||
if test -z "$SNDTYPE" -a "x$ac_cv_header_windows_h" = "xyes" -a \
|
||||
"x$ac_cv_header_mmsystem_h" = "xyes"; then
|
||||
"x$ac_cv_header_dsound_h" = "xyes"; then
|
||||
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include <dsound.h>
|
||||
#ifdef GMEM_MOVEABLE
|
||||
#ifdef WAVE_FORMAT_PCM
|
||||
#ifdef DirectSoundEnumerate
|
||||
QF_maGiC_VALUE
|
||||
#endif
|
||||
#endif
|
||||
|
@ -962,15 +962,17 @@ QF_maGiC_VALUE
|
|||
fi
|
||||
|
||||
if test -z "$CDTYPE"; then
|
||||
AC_EGREP_CPP([QF_maGIC_VALUE],
|
||||
AC_EGREP_CPP([QF_maGiC_VALUE],
|
||||
[
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#if defined(MCI_SET_DOOR_OPEN)
|
||||
QF_maGiC_VALUE
|
||||
#endif
|
||||
],
|
||||
AC_MSG_RESULT([yes (Win32)])
|
||||
CDTYPE=WIN32
|
||||
CD_LIBS=""
|
||||
)
|
||||
fi
|
||||
|
||||
|
@ -1467,6 +1469,7 @@ AC_MSG_RESULT([
|
|||
Server support: $SV_TARGETS
|
||||
Client support:$CL_TARGETS
|
||||
Sound system: $SNDTYPE
|
||||
CD Audio system: $CDTYPE
|
||||
IPv6 networking: $NETTYPE_IPV6
|
||||
Compression support: $HAVE_ZLIB
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "QF/cdaudio.h"
|
||||
#include "QF/cmd.h"
|
||||
#include "QF/compat.h"
|
||||
#include "QF/console.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/qargs.h"
|
||||
|
@ -63,7 +64,7 @@ CDAudio_Eject (void)
|
|||
dwReturn = mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN,
|
||||
(DWORD) NULL);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
|
||||
Con_DPrintf ("MCI_SET_DOOR_OPEN failed (%li)\n", dwReturn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +77,7 @@ CDAudio_CloseDoor (void)
|
|||
dwReturn =
|
||||
mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD) NULL);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
|
||||
Con_DPrintf ("MCI_SET_DOOR_CLOSED failed (%li)\n", dwReturn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +154,7 @@ CDAudio_Play (byte track, qboolean looping)
|
|||
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
|
||||
(DWORD) (LPVOID) & mciStatusParms);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("MCI_STATUS failed (%i)\n", dwReturn);
|
||||
Con_DPrintf ("MCI_STATUS failed (%li)\n", dwReturn);
|
||||
return;
|
||||
}
|
||||
if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO) {
|
||||
|
@ -168,7 +169,7 @@ CDAudio_Play (byte track, qboolean looping)
|
|||
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
|
||||
(DWORD) (LPVOID) & mciStatusParms);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("MCI_STATUS failed (%i)\n", dwReturn);
|
||||
Con_DPrintf ("MCI_STATUS failed (%li)\n", dwReturn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -185,7 +186,7 @@ CDAudio_Play (byte track, qboolean looping)
|
|||
mciSendCommand (wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO,
|
||||
(DWORD) (LPVOID) & mciPlayParms);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
|
||||
Con_DPrintf ("CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -211,7 +212,7 @@ CDAudio_Stop (void)
|
|||
|
||||
dwReturn = mciSendCommand (wDeviceID, MCI_STOP, 0, (DWORD) NULL);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("MCI_STOP failed (%i)", dwReturn);
|
||||
Con_DPrintf ("MCI_STOP failed (%li)", dwReturn);
|
||||
}
|
||||
|
||||
wasPlaying = false;
|
||||
|
@ -236,7 +237,7 @@ CDAudio_Pause (void)
|
|||
mciSendCommand (wDeviceID, MCI_PAUSE, 0,
|
||||
(DWORD) (LPVOID) & mciGenericParms);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("MCI_PAUSE failed (%i)", dwReturn);
|
||||
Con_DPrintf ("MCI_PAUSE failed (%li)", dwReturn);
|
||||
}
|
||||
|
||||
wasPlaying = playing;
|
||||
|
@ -266,7 +267,7 @@ CDAudio_Resume (void)
|
|||
mciSendCommand (wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY,
|
||||
(DWORD) (LPVOID) & mciPlayParms);
|
||||
if (dwReturn) {
|
||||
Con_DPrintf ("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
|
||||
Con_DPrintf ("CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
|
||||
return;
|
||||
}
|
||||
playing = true;
|
||||
|
@ -456,7 +457,7 @@ CDAudio_Init (void)
|
|||
mciSendCommand (0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE,
|
||||
(DWORD) (LPVOID) & mciOpenParms);
|
||||
if (dwReturn) {
|
||||
Con_Printf ("CDAudio_Init: MCI_OPEN failed (%i)\n", dwReturn);
|
||||
Con_Printf ("CDAudio_Init: MCI_OPEN failed (%li)\n", dwReturn);
|
||||
return -1;
|
||||
}
|
||||
wDeviceID = mciOpenParms.wDeviceID;
|
||||
|
@ -467,7 +468,7 @@ CDAudio_Init (void)
|
|||
mciSendCommand (wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT,
|
||||
(DWORD) (LPVOID) & mciSetParms);
|
||||
if (dwReturn) {
|
||||
Con_Printf ("MCI_SET_TIME_FORMAT failed (%i)\n", dwReturn);
|
||||
Con_Printf ("MCI_SET_TIME_FORMAT failed (%li)\n", dwReturn);
|
||||
mciSendCommand (wDeviceID, MCI_CLOSE, 0, (DWORD) NULL);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -251,8 +251,8 @@ qw_client_sgl_DEPENDENCIES= $(CLIENT_LIB_DEPS)
|
|||
#
|
||||
wgl_SOURCES= vid_wgl.c
|
||||
|
||||
qw_client_wgl_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES) $(wgl_SOURCES)
|
||||
qw_client_wgl_LDADD= $(CLIENT_LIBS)
|
||||
qw_client_wgl_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES) $(wgl_SOURCES) in_win.c
|
||||
qw_client_wgl_LDADD= $(CLIENT_LIBS) $(GLX_LIBS) -lgdi32
|
||||
qw_client_wgl_DEPENDENCIES= $(CLIENT_LIB_DEPS)
|
||||
|
||||
#
|
||||
|
|
|
@ -36,10 +36,11 @@
|
|||
#include <dinput.h>
|
||||
#include "client.h"
|
||||
#include "QF/keys.h"
|
||||
#include "QF/compat.h"
|
||||
#include "QF/console.h"
|
||||
#include "QF/qargs.h"
|
||||
#include "QF/cmd.h"
|
||||
#include "input.h"
|
||||
#include "QF/input.h"
|
||||
#include "cl_input.h"
|
||||
#include "view.h"
|
||||
#include "host.h"
|
||||
|
|
|
@ -153,9 +153,6 @@ float gldepthmin, gldepthmax;
|
|||
|
||||
modestate_t modestate = MS_UNINIT;
|
||||
|
||||
void VID_MenuDraw (void);
|
||||
void VID_MenuKey (int key);
|
||||
|
||||
LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
void AppActivate (BOOL fActive, BOOL minimize);
|
||||
char *VID_GetModeDescription (int mode);
|
||||
|
@ -1650,9 +1647,6 @@ VID_Init (unsigned char *palette)
|
|||
// Check for 3DFX Extensions and initialize them.
|
||||
VID_Init8bitPalette ();
|
||||
|
||||
vid_menudrawfn = VID_MenuDraw;
|
||||
vid_menukeyfn = VID_MenuKey;
|
||||
|
||||
strcpy (badmode.modedesc, "Bad mode");
|
||||
vid_canalttab = true;
|
||||
|
||||
|
@ -1672,15 +1666,6 @@ VID_Init_Cvars ()
|
|||
// Video menu stuff
|
||||
//========================================================
|
||||
|
||||
extern void M_Menu_Options_f (void);
|
||||
extern void M_Print (int cx, int cy, char *str);
|
||||
extern void M_PrintWhite (int cx, int cy, char *str);
|
||||
extern void M_DrawCharacter (int cx, int line, int num);
|
||||
extern void M_DrawTransPic (int x, int y, qpic_t *pic);
|
||||
extern void M_DrawPic (int x, int y, qpic_t *pic);
|
||||
|
||||
static int vid_wmodes;
|
||||
|
||||
typedef struct {
|
||||
int modenum;
|
||||
char *desc;
|
||||
|
@ -1691,90 +1676,8 @@ typedef struct {
|
|||
#define MODE_AREA_HEIGHT (MAX_COLUMN_SIZE + 2)
|
||||
#define MAX_MODEDESCS (MAX_COLUMN_SIZE*3)
|
||||
|
||||
static modedesc_t modedescs[MAX_MODEDESCS];
|
||||
//static modedesc_t modedescs[MAX_MODEDESCS];
|
||||
|
||||
/*
|
||||
VID_MenuDraw
|
||||
*/
|
||||
void
|
||||
VID_MenuDraw (void)
|
||||
{
|
||||
qpic_t *p;
|
||||
char *ptr;
|
||||
int lnummodes, i, k, column, row;
|
||||
vmode_t *pv;
|
||||
|
||||
p = Draw_CachePic ("gfx/vidmodes.lmp", true);
|
||||
M_DrawPic ((320 - p->width) / 2, 4, p);
|
||||
|
||||
vid_wmodes = 0;
|
||||
lnummodes = VID_NumModes ();
|
||||
|
||||
for (i = 1; (i < lnummodes) && (vid_wmodes < MAX_MODEDESCS); i++) {
|
||||
ptr = VID_GetModeDescription (i);
|
||||
pv = VID_GetModePtr (i);
|
||||
|
||||
k = vid_wmodes;
|
||||
|
||||
modedescs[k].modenum = i;
|
||||
modedescs[k].desc = ptr;
|
||||
modedescs[k].iscur = 0;
|
||||
|
||||
if (i == vid_modenum)
|
||||
modedescs[k].iscur = 1;
|
||||
|
||||
vid_wmodes++;
|
||||
|
||||
}
|
||||
|
||||
if (vid_wmodes > 0) {
|
||||
M_Print (2 * 8, 36 + 0 * 8, "Fullscreen Modes (WIDTHxHEIGHTxBPP)");
|
||||
|
||||
column = 8;
|
||||
row = 36 + 2 * 8;
|
||||
|
||||
for (i = 0; i < vid_wmodes; i++) {
|
||||
if (modedescs[i].iscur)
|
||||
M_PrintWhite (column, row, modedescs[i].desc);
|
||||
else
|
||||
M_Print (column, row, modedescs[i].desc);
|
||||
|
||||
column += 13 * 8;
|
||||
|
||||
if ((i % VID_ROW_SIZE) == (VID_ROW_SIZE - 1)) {
|
||||
column = 8;
|
||||
row += 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
M_Print (3 * 8, 36 + MODE_AREA_HEIGHT * 8 + 8 * 2,
|
||||
"Video modes must be set from the");
|
||||
M_Print (3 * 8, 36 + MODE_AREA_HEIGHT * 8 + 8 * 3,
|
||||
"command line with -width <width>");
|
||||
M_Print (3 * 8, 36 + MODE_AREA_HEIGHT * 8 + 8 * 4,
|
||||
"and -bpp <bits-per-pixel>");
|
||||
M_Print (3 * 8, 36 + MODE_AREA_HEIGHT * 8 + 8 * 6,
|
||||
"Select windowed mode with -window");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
VID_MenuKey
|
||||
*/
|
||||
void
|
||||
VID_MenuKey (int key)
|
||||
{
|
||||
switch (key) {
|
||||
case K_ESCAPE:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
M_Menu_Options_f ();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
VID_SetCaption (char *text)
|
||||
|
|
Loading…
Reference in a new issue