Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

win_local.h (2589B)


      1 /*
      2 ===========================================================================
      3 Copyright (C) 1999-2005 Id Software, Inc.
      4 
      5 This file is part of Quake III Arena source code.
      6 
      7 Quake III Arena source code is free software; you can redistribute it
      8 and/or modify it under the terms of the GNU General Public License as
      9 published by the Free Software Foundation; either version 2 of the License,
     10 or (at your option) any later version.
     11 
     12 Quake III Arena source code is distributed in the hope that it will be
     13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 GNU General Public License for more details.
     16 
     17 You should have received a copy of the GNU General Public License
     18 along with Foobar; if not, write to the Free Software
     19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20 ===========================================================================
     21 */
     22 // win_local.h: Win32-specific Quake3 header file
     23 
     24 #if defined (_MSC_VER) && (_MSC_VER >= 1200)
     25 #pragma warning(disable : 4201)
     26 #pragma warning( push )
     27 #endif
     28 #include <windows.h>
     29 #if defined (_MSC_VER) && (_MSC_VER >= 1200)
     30 #pragma warning( pop )
     31 #endif
     32 
     33 #define	DIRECTSOUND_VERSION	0x0300
     34 #define	DIRECTINPUT_VERSION	0x0300
     35 
     36 #include <dinput.h>
     37 #include <dsound.h>
     38 #include <winsock.h>
     39 #include <wsipx.h>
     40 
     41 void	IN_MouseEvent (int mstate);
     42 
     43 void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr );
     44 
     45 void	Sys_CreateConsole( void );
     46 void	Sys_DestroyConsole( void );
     47 
     48 char	*Sys_ConsoleInput (void);
     49 
     50 qboolean	Sys_GetPacket ( netadr_t *net_from, msg_t *net_message );
     51 
     52 // Input subsystem
     53 
     54 void	IN_Init (void);
     55 void	IN_Shutdown (void);
     56 void	IN_JoystickCommands (void);
     57 
     58 void	IN_Move (usercmd_t *cmd);
     59 // add additional non keyboard / non mouse movement on top of the keyboard move cmd
     60 
     61 void	IN_DeactivateWin32Mouse( void);
     62 
     63 void	IN_Activate (qboolean active);
     64 void	IN_Frame (void);
     65 
     66 // window procedure
     67 LONG WINAPI MainWndProc (
     68     HWND    hWnd,
     69     UINT    uMsg,
     70     WPARAM  wParam,
     71     LPARAM  lParam);
     72 
     73 void Conbuf_AppendText( const char *msg );
     74 
     75 void SNDDMA_Activate( void );
     76 int  SNDDMA_InitDS ();
     77 
     78 typedef struct
     79 {
     80 	
     81 	HINSTANCE		reflib_library;		// Handle to refresh DLL 
     82 	qboolean		reflib_active;
     83 
     84 	HWND			hWnd;
     85 	HINSTANCE		hInstance;
     86 	qboolean		activeApp;
     87 	qboolean		isMinimized;
     88 	OSVERSIONINFO	osversion;
     89 
     90 	// when we get a windows message, we store the time off so keyboard processing
     91 	// can know the exact time of an event
     92 	unsigned		sysMsgTime;
     93 } WinVars_t;
     94 
     95 extern WinVars_t	g_wv;