26 #include "..\client\client.h"
36 #define WM_MOUSEWHEEL (WM_MOUSELAST+1) // message that will be supported by the OS
55 #define VID_NUM_MODES ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )
57 LONG WINAPI
MainWndProc( HWND hWnd,
UINT uMsg, WPARAM wParam, LPARAM lParam );
77 SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0 );
81 RegisterHotKey( 0, 0, MOD_ALT, VK_TAB );
82 RegisterHotKey( 0, 1, MOD_ALT, VK_RETURN );
95 SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0 );
99 UnregisterHotKey( 0, 0 );
100 UnregisterHotKey( 0, 1 );
115 #define MAXPRINTMSG 4096
122 va_start (argptr,fmt);
123 vsprintf (
msg,fmt,argptr);
136 MessageBox( 0,
msg,
"PRINT_ALERT", MB_ICONWARNING );
137 OutputDebugString(
msg );
147 va_start (argptr,fmt);
148 vsprintf (
msg,fmt,argptr);
160 0 , 27,
'1',
'2',
'3',
'4',
'5',
'6',
162 'q',
'w',
'e',
'r',
't',
'y',
'u',
'i',
163 'o',
'p',
'[',
']', 13 ,
K_CTRL,
'a',
's',
164 'd',
'f',
'g',
'h',
'j',
'k',
'l',
';',
165 '\'' ,
'`',
K_SHIFT,
'\\',
'z',
'x',
'c',
'v',
166 'b',
'n',
'm',
',',
'.',
'/',
K_SHIFT,
'*',
171 K_F12,0 , 0 , 0 , 0 , 0 , 0 , 0,
172 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
173 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
174 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
175 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
188 int modified = ( key >> 16 ) & 255;
194 if ( key & ( 1 << 24 ) )
295 if ( ( (
int ) wParam ) > 0 )
305 return DefWindowProc (hWnd, uMsg, wParam, lParam);
315 if ( (
short ) HIWORD( wParam ) > 0 )
334 return DefWindowProc (hWnd, uMsg, wParam, lParam);
338 return DefWindowProc (hWnd, uMsg, wParam, lParam);
343 return DefWindowProc (hWnd, uMsg, wParam, lParam);
347 int fActive, fMinimized;
350 fActive = LOWORD(wParam);
351 fMinimized = (
BOOL) HIWORD(wParam);
358 return DefWindowProc (hWnd, uMsg, wParam, lParam);
368 xPos = (short) LOWORD(lParam);
369 yPos = (short) HIWORD(lParam);
376 style = GetWindowLong( hWnd, GWL_STYLE );
377 AdjustWindowRect( &
r, style, FALSE );
387 return DefWindowProc (hWnd, uMsg, wParam, lParam);
403 if (wParam & MK_LBUTTON)
406 if (wParam & MK_RBUTTON)
409 if (wParam & MK_MBUTTON)
417 if ( wParam == SC_SCREENSAVE )
419 return DefWindowProc (hWnd, uMsg, wParam, lParam);
441 LONG CDAudio_MessageHandler(HWND hWnd,
UINT uMsg, WPARAM wParam, LPARAM lParam);
442 lRet = CDAudio_MessageHandler (hWnd, uMsg, wParam, lParam);
447 return DefWindowProc (hWnd, uMsg, wParam, lParam);
451 return DefWindowProc( hWnd, uMsg, wParam, lParam );
470 SetWindowLong(
cl_hwnd, GWL_EXSTYLE, WS_EX_TOPMOST );
471 SetForegroundWindow(
cl_hwnd );
486 {
"Mode 0: 320x240", 320, 240, 0 },
487 {
"Mode 1: 400x300", 400, 300, 1 },
488 {
"Mode 2: 512x384", 512, 384, 2 },
489 {
"Mode 3: 640x480", 640, 480, 3 },
490 {
"Mode 4: 800x600", 800, 600, 4 },
491 {
"Mode 5: 960x720", 960, 720, 5 },
492 {
"Mode 6: 1024x768", 1024, 768, 6 },
493 {
"Mode 7: 1152x864", 1152, 864, 7 },
494 {
"Mode 8: 1280x960", 1280, 960, 8 },
495 {
"Mode 9: 1600x1200", 1600, 1200, 9 },
496 {
"Mode 10: 2048x1536", 2048, 1536, 10 }
524 style = GetWindowLong(
cl_hwnd, GWL_STYLE );
525 AdjustWindowRect( &
r, style, FALSE );
527 w =
r.right -
r.left;
528 h =
r.bottom -
r.top;
548 memset (&
re, 0,
sizeof(
re));
613 Com_Printf(
"------------------------------------\n");
741 putenv(
"FX_GLIDE_NO_SPLASH=0");