2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
\r
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
\r
5 This file is part of GtkRadiant.
\r
7 GtkRadiant is free software; you can redistribute it and/or modify
\r
8 it under the terms of the GNU General Public License as published by
\r
9 the Free Software Foundation; either version 2 of the License, or
\r
10 (at your option) any later version.
\r
12 GtkRadiant is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with GtkRadiant; if not, write to the Free Software
\r
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\r
26 // API for brush stuff
\r
29 #define BRUSH_MAJOR "brush"
\r
30 // {c1c3f567-2541-4aa3-9d5b-031fbe2a013b}
\r
31 static const GUID QERBrushTable_GUID =
\r
32 { 0xc1c3f567, 0x2541, 0x4aa3, { 0x9d, 0x5b, 0x03, 0x1f, 0xbe, 0x2a, 0x01, 0x3b } };
\r
34 typedef void (* PFN_BRUSHADDTOLIST) (brush_t *b, brush_t *lst);
\r
35 typedef void (* PFN_BRUSHBUILD) (brush_t *b, bool bSnap, bool bMarkMap, bool bConvert, bool bFilterTest);
\r
36 typedef brush_t* (* PFN_BRUSHCREATE) (vec3_t mins, vec3_t maxs, texdef_t *texdef);
\r
37 typedef void (* PFN_BRUSHFREE) (brush_t *b, bool bRemoveNode);
\r
38 typedef void (* PFN_BRUSHROTATE) (brush_t *b, vec3_t vAngle, vec3_t vOrigin, bool bBuild);
\r
39 typedef brush_t* (* PFN_BRUSHALLOC) ();
\r
40 typedef int (* PFN_BPMESSAGEBOX) (int);
\r
41 typedef face_t* (* PFN_FACEALLOC) (void);
\r
42 typedef eclass_t* (* PFN_HASMODEL) (brush_t *b);
\r
44 struct _QERBrushTable
\r
47 PFN_BRUSHADDTOLIST m_pfnBrush_AddToList;
\r
48 PFN_BRUSHBUILD m_pfnBrush_Build;
\r
49 PFN_BRUSHCREATE m_pfnBrush_Create;
\r
50 PFN_BRUSHFREE m_pfnBrush_Free;
\r
51 PFN_BRUSHROTATE m_pfnBrush_Rotate;
\r
52 PFN_BRUSHALLOC m_pfnBrushAlloc;
\r
53 PFN_BPMESSAGEBOX m_pfnBP_MessageBox;
\r
54 PFN_FACEALLOC m_pfnFace_Alloc;
\r
55 PFN_HASMODEL m_pfnHasModel;
\r
58 #ifdef USE_BRUSHTABLE_DEFINE
\r
59 #ifndef __BRUSHTABLENAME
\r
60 #define __BRUSHTABLENAME g_BrushTable
\r
62 #define Brush_AddToList __BRUSHTABLENAME.m_pfnBrush_AddToList
\r
63 #define Brush_Build __BRUSHTABLENAME.m_pfnBrush_Build
\r
64 #define Brush_Create __BRUSHTABLENAME.m_pfnBrush_Create
\r
65 #define Brush_Free __BRUSHTABLENAME.m_pfnBrush_Free
\r
66 #define Brush_Rotate __BRUSHTABLENAME.m_pfnBrush_Rotate
\r
67 #define Brush_Alloc __BRUSHTABLENAME.m_pfnBrushAlloc
\r
68 #define BP_MessageBox __BRUSHTABLENAME.m_pfnBP_MessageBox
\r
69 #define Face_Alloc __BRUSHTABLENAME.m_pfnFace_Alloc
\r
70 #define HasModel __BRUSHTABLENAME.m_pfnHasModel
\r