2 ===========================================================================
3 Copyright (C) 1997-2006 Id Software, Inc.
5 This file is part of Quake 2 Tools source code.
7 Quake 2 Tools 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.
12 Quake 2 Tools 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.
17 You should have received a copy of the GNU General Public License
18 along with Quake 2 Tools source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 ===========================================================================
26 // disable data conversion warnings for gl
27 #if GDEF_COMPILER_MSVC
28 #pragma warning(disable : 4244) // MIPS
29 #pragma warning(disable : 4136) // X86
30 #pragma warning(disable : 4051) // ALPHA
82 int iTexMenu; // nearest, linear, etc
83 float fGamma; // gamma for textures
84 char szProject[256]; // last project loaded
85 vec3_t colors[COLOR_LAST];
94 void Sys_UpdateStatusBar( void );
95 void Sys_UpdateWindows (int bits);
97 void Sys_ClearPrintf (void);
98 void Sys_Printf (char *text, ...);
99 double Sys_DoubleTime (void);
100 void Sys_GetCursorPos (int *x, int *y);
101 void Sys_SetCursorPos (int x, int y);
102 void Sys_SetTitle (char *text);
103 void Sys_BeginWait (void);
104 void Sys_EndWait (void);
105 void Sys_Status(const char *psz, int part);
108 ** most of the QE globals are stored in this structure
117 entity_t *d_project_entity;
119 float d_new_brush_bottom_z,
122 HINSTANCE d_hInstance;
136 vec3_t d_points[MAX_POINTS];
138 pedge_t d_edges[MAX_EDGES];
141 int d_num_move_points;
142 float *d_move_points[1024];
144 qtexture_t *d_qtextures;
146 texturewin_t d_texturewin;
148 int d_pointfile_display_list;
152 LPMRUMENU d_lpMruMenu;
154 SavedInfo_t d_savedinfo;
158 // connect entities uses the last two brushes selected
160 brush_t *d_select_order[2];
161 vec3_t d_select_translate; // for dragging w/o making new display lists
162 select_t d_select_mode;
166 int d_parsed_brushes;
168 qboolean show_blocks;
171 void *qmalloc (int size);
172 char *copystring (char *s);
173 char *ExpandReletivePath (char *p);
175 void Pointfile_Delete (void);
176 void Pointfile_Check (void);
177 void Pointfile_Next (void);
178 void Pointfile_Prev (void);
179 void Pointfile_Clear (void);
180 void Pointfile_Draw( void );
181 void Pointfile_Load( void );
186 void Drag_Begin (int x, int y, int buttons,
187 vec3_t xaxis, vec3_t yaxis,
188 vec3_t origin, vec3_t dir);
189 void Drag_MouseMoved (int x, int y, int buttons);
190 void Drag_MouseUp (void);
195 void CSG_MakeHollow (void);
196 void CSG_Subtract (void);
202 void SetupVertexSelection (void);
203 void SelectEdgeByRay (vec3_t org, vec3_t dir);
204 void SelectVertexByRay (vec3_t org, vec3_t dir);
206 void ConnectEntities (void);
208 extern int update_bits;
210 extern int screen_width;
211 extern int screen_height;
213 extern HANDLE bsp_process;
215 char *TranslateString (char *buf);
217 void ProjectDialog (void);
219 void FillTextureMenu (void);
220 void FillBSPMenu (void);
222 BOOL CALLBACK Win_Dialog (
223 HWND hwndDlg, // handle to dialog box
224 UINT uMsg, // message
225 WPARAM wParam, // first message parameter
226 LPARAM lParam // second message parameter
233 void WCam_Create (HINSTANCE hInstance);
239 void WXY_Create (HINSTANCE hInstance);
244 void WZ_Create (HINSTANCE hInstance);
254 void Main_Create (HINSTANCE hInstance);
255 extern BOOL SaveWindowState(HWND hWnd, const char *pszName);
256 extern BOOL LoadWindowState(HWND hWnd, const char *pszName);
258 extern BOOL SaveRegistryInfo(const char *pszName, void *pvBuf, long lSize);
259 extern BOOL loadRegistryInfo(const char *pszName, void *pvBuf, long *plSize);
264 BOOL CreateEntityWindow(HINSTANCE hInstance);
265 void FillClassList (void);
266 BOOL UpdateEntitySel(eclass_t *pec);
267 void SetInspectorMode(int iType);
268 int DrawTexControls(HWND hWnd);
269 void SetSpawnFlags(void);
270 void GetSpawnFlags(void);
271 void SetKeyValuePairs(void);
272 extern void BuildGammaTable(float g);
282 void DoSurface(void);
285 ** QE function declarations
287 void QE_CheckAutoSave( void );
288 void QE_ConvertDOSToUnixName( char *dst, const char *src );
289 void QE_CountBrushesAndUpdateStatusBar( void );
290 void QE_CheckOpenGLForErrors(void);
291 void QE_ExpandBspString (char *bspaction, char *out, char *mapname);
293 qboolean QE_KeyDown (int key);
294 qboolean QE_LoadProject (char *projectfile);
295 qboolean QE_SingleBrush (void);
298 ** QE Win32 function declarations
300 int QEW_SetupPixelFormat(HDC hDC, qboolean zbuffer );
301 void QEW_StopGL( HWND hWnd, HGLRC hGLRC, HDC hDC );
304 ** extern declarations
306 extern QEGlobals_t g_qeglobals;