]> icculus.org git repositories - divverent/darkplaces.git/blob - winquake.h
changed SV_Move calls to use MOVE_NORMAL or MOVE_NOMONSTERS instead of false/true...
[divverent/darkplaces.git] / winquake.h
1 /*
2 Copyright (C) 1996-1997 Id Software, Inc.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
12
13 See the GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
19 */
20 // winquake.h: Win32-specific Quake header file
21
22 #pragma warning( disable : 4229 )  // mgraph gets this
23
24 #include <windows.h>
25 #define WM_MOUSEWHEEL                   0x020A
26
27 #ifndef SERVERONLY
28 #include <ddraw.h>
29 #include <dsound.h>
30 #endif
31
32 extern  HINSTANCE       global_hInstance;
33 extern  int                     global_nCmdShow;
34
35 #ifndef SERVERONLY
36
37 extern LPDIRECTDRAW             lpDD;
38 extern LPDIRECTDRAWSURFACE      lpPrimary;
39 extern LPDIRECTDRAWSURFACE      lpFrontBuffer;
40 extern LPDIRECTDRAWSURFACE      lpBackBuffer;
41 extern LPDIRECTDRAWPALETTE      lpDDPal;
42 extern LPDIRECTSOUND pDS;
43 extern LPDIRECTSOUNDBUFFER pDSBuf;
44
45 extern DWORD gSndBufSize;
46 //#define SNDBUFSIZE 65536
47
48 void    VID_LockBuffer (void);
49 void    VID_UnlockBuffer (void);
50
51 #endif
52
53 typedef enum {MS_WINDOWED, MS_FULLSCREEN, MS_FULLDIB, MS_UNINIT} modestate_t;
54
55 extern modestate_t      modestate;
56
57 extern HWND                     mainwindow;
58 extern qboolean         ActiveApp, Minimized;
59
60 void IN_ShowMouse (void);
61 void IN_DeactivateMouse (void);
62 void IN_HideMouse (void);
63 void IN_ActivateMouse (void);
64 void IN_MouseEvent (int mstate);
65
66 extern qboolean winsock_lib_initialized;
67
68 extern int              window_center_x, window_center_y, window_x, window_y;
69 extern RECT             window_rect;
70
71 extern qboolean mouseinitialized;
72
73 extern HANDLE   hinput, houtput;
74
75 void IN_UpdateClipCursor (void);
76 void CenterWindow(HWND hWndCenter, int width, int height, BOOL lefttopjustify);
77
78 void S_BlockSound (void);
79 void S_UnblockSound (void);
80
81 void VID_SetDefaultMode (void);
82
83 int (PASCAL FAR *pWSAStartup)(WORD wVersionRequired, LPWSADATA lpWSAData);
84 int (PASCAL FAR *pWSACleanup)(void);
85 int (PASCAL FAR *pWSAGetLastError)(void);
86 SOCKET (PASCAL FAR *psocket)(int af, int type, int protocol);
87 int (PASCAL FAR *pioctlsocket)(SOCKET s, long cmd, u_long FAR *argp);
88 int (PASCAL FAR *psetsockopt)(SOCKET s, int level, int optname,
89                                                           const char FAR * optval, int optlen);
90 int (PASCAL FAR *precvfrom)(SOCKET s, char FAR * buf, int len, int flags,
91                                                         struct sockaddr FAR *from, int FAR * fromlen);
92 int (PASCAL FAR *psendto)(SOCKET s, const char FAR * buf, int len, int flags,
93                                                   const struct sockaddr FAR *to, int tolen);
94 int (PASCAL FAR *pclosesocket)(SOCKET s);
95 int (PASCAL FAR *pgethostname)(char FAR * name, int namelen);
96 struct hostent FAR * (PASCAL FAR *pgethostbyname)(const char FAR * name);
97 struct hostent FAR * (PASCAL FAR *pgethostbyaddr)(const char FAR * addr,
98                                                                                                   int len, int type);
99 int (PASCAL FAR *pgetsockname)(SOCKET s, struct sockaddr FAR *name,
100                                                            int FAR * namelen);