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 #pragma warning(disable : 4244) // MIPS
28 #pragma warning(disable : 4136) // X86
29 #pragma warning(disable : 4051) // ALPHA
80 int iTexMenu; // nearest, linear, etc
81 float fGamma; // gamma for textures
82 char szProject[256]; // last project loaded
83 vec3_t colors[COLOR_LAST];
92 void Sys_UpdateStatusBar( void );
93 void Sys_UpdateWindows (int bits);
95 void Sys_ClearPrintf (void);
96 void Sys_Printf (char *text, ...);
97 double Sys_DoubleTime (void);
98 void Sys_GetCursorPos (int *x, int *y);
99 void Sys_SetCursorPos (int x, int y);
100 void Sys_SetTitle (char *text);
101 void Sys_BeginWait (void);
102 void Sys_EndWait (void);
103 void Sys_Status(const char *psz, int part);
106 ** most of the QE globals are stored in this structure
115 entity_t *d_project_entity;
117 float d_new_brush_bottom_z,
120 HINSTANCE d_hInstance;
134 vec3_t d_points[MAX_POINTS];
136 pedge_t d_edges[MAX_EDGES];
139 int d_num_move_points;
140 float *d_move_points[1024];
142 qtexture_t *d_qtextures;
144 texturewin_t d_texturewin;
146 int d_pointfile_display_list;
150 LPMRUMENU d_lpMruMenu;
152 SavedInfo_t d_savedinfo;
156 // connect entities uses the last two brushes selected
158 brush_t *d_select_order[2];
159 vec3_t d_select_translate; // for dragging w/o making new display lists
160 select_t d_select_mode;
164 int d_parsed_brushes;
166 qboolean show_blocks;
169 void *qmalloc (int size);
170 char *copystring (char *s);
171 char *ExpandReletivePath (char *p);
173 void Pointfile_Delete (void);
174 void Pointfile_Check (void);
175 void Pointfile_Next (void);
176 void Pointfile_Prev (void);
177 void Pointfile_Clear (void);
178 void Pointfile_Draw( void );
179 void Pointfile_Load( void );
184 void Drag_Begin (int x, int y, int buttons,
185 vec3_t xaxis, vec3_t yaxis,
186 vec3_t origin, vec3_t dir);
187 void Drag_MouseMoved (int x, int y, int buttons);
188 void Drag_MouseUp (void);
193 void CSG_MakeHollow (void);
194 void CSG_Subtract (void);
200 void SetupVertexSelection (void);
201 void SelectEdgeByRay (vec3_t org, vec3_t dir);
202 void SelectVertexByRay (vec3_t org, vec3_t dir);
204 void ConnectEntities (void);
206 extern int update_bits;
208 extern int screen_width;
209 extern int screen_height;
211 extern HANDLE bsp_process;
213 char *TranslateString (char *buf);
215 void ProjectDialog (void);
217 void FillTextureMenu (void);
218 void FillBSPMenu (void);
220 BOOL CALLBACK Win_Dialog (
221 HWND hwndDlg, // handle to dialog box
222 UINT uMsg, // message
223 WPARAM wParam, // first message parameter
224 LPARAM lParam // second message parameter
231 void WCam_Create (HINSTANCE hInstance);
237 void WXY_Create (HINSTANCE hInstance);
242 void WZ_Create (HINSTANCE hInstance);
252 void Main_Create (HINSTANCE hInstance);
253 extern BOOL SaveWindowState(HWND hWnd, const char *pszName);
254 extern BOOL LoadWindowState(HWND hWnd, const char *pszName);
256 extern BOOL SaveRegistryInfo(const char *pszName, void *pvBuf, long lSize);
257 extern BOOL loadRegistryInfo(const char *pszName, void *pvBuf, long *plSize);
262 BOOL CreateEntityWindow(HINSTANCE hInstance);
263 void FillClassList (void);
264 BOOL UpdateEntitySel(eclass_t *pec);
265 void SetInspectorMode(int iType);
266 int DrawTexControls(HWND hWnd);
267 void SetSpawnFlags(void);
268 void GetSpawnFlags(void);
269 void SetKeyValuePairs(void);
270 extern void BuildGammaTable(float g);
280 void DoSurface(void);
283 ** QE function declarations
285 void QE_CheckAutoSave( void );
286 void QE_ConvertDOSToUnixName( char *dst, const char *src );
287 void QE_CountBrushesAndUpdateStatusBar( void );
288 void QE_CheckOpenGLForErrors(void);
289 void QE_ExpandBspString (char *bspaction, char *out, char *mapname);
291 qboolean QE_KeyDown (int key);
292 qboolean QE_LoadProject (char *projectfile);
293 qboolean QE_SingleBrush (void);
296 ** QE Win32 function declarations
298 int QEW_SetupPixelFormat(HDC hDC, qboolean zbuffer );
299 void QEW_StopGL( HWND hWnd, HGLRC hGLRC, HDC hDC );
302 ** extern declarations
304 extern QEGlobals_t g_qeglobals;