]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - include/iselectedface.h
Updating Windows compile guide after the major overhaul of Windows
[xonotic/netradiant.git] / include / iselectedface.h
index a01c5283227c7fba9cba6ea0edb19d934b2c6329..61bc70d40c7083123d4889480062335e3981ebed 100644 (file)
@@ -1,88 +1,88 @@
-/*\r
-Copyright (C) 1999-2007 id Software, Inc. and contributors.\r
-For a list of contributors, see the accompanying CONTRIBUTORS file.\r
-\r
-This file is part of GtkRadiant.\r
-\r
-GtkRadiant is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2 of the License, or\r
-(at your option) any later version.\r
-\r
-GtkRadiant is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GtkRadiant; if not, write to the Free Software\r
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
-*/\r
-\r
-//-----------------------------------------------------------------------------\r
-//\r
-// DESCRIPTION:\r
-// Quick interface hack for selected face interface\r
-// this one really needs more work, but I'm in a hurry with TexTool\r
-\r
-#ifndef __ISELECTEDFACE_H_\r
-#define __ISELECTEDFACE_H_\r
-\r
-#define SELECTEDFACE_MAJOR "selectedface"\r
-// v2.0\r
-// support for multiple faces selection (first use in textool v2)\r
-// using the g_ptrSelectedFaces indexes, get the face_t* with GETFACE\r
-// still relies on the _QERFaceData*, unless you cast the face_t* to do your own stuff\r
-// removed PFN_TEXTUREFORNAME, it's in the IShaders API now\r
-\r
-//++timo TODO: this interface needs some cleanup with the new texture / shaders interface\r
-\r
-// number of selected textures\r
-typedef int   (WINAPI* PFN_GETSELECTEDFACECOUNT) ();\r
-// retrieve the corresponding brush_t* (we need it when we need to explicitely rebuild stuff)\r
-typedef brush_t*    (WINAPI* PFN_GETFACEBRUSH) (int iface);\r
-// retrieve a given face_t*\r
-typedef face_t*     (WINAPI* PFN_GETFACE) (int iface);\r
-// winding_t is assumed to have MAX_POINTS_ON_WINDING allocated and waiting\r
-typedef int            (WINAPI* PFN_GETFACEINFO)               (int iface, _QERFaceData*, winding_t* );\r
-// tell editor to update the selected face data\r
-typedef int            (WINAPI* PFN_SETFACEINFO)               (int iface, _QERFaceData*);\r
-// retrieve the texture number to bind to\r
-typedef int            (WINAPI* PFN_GETTEXTURENUMBER)  (int iface);\r
-// retrieving some texture information\r
-typedef void   (WINAPI* PFN_GETTEXTURESIZE)    (int iface, int Size[2] );\r
-// straight func pointer to Select_SetTexture\r
-// last parameter must be casted to an IPluginTexdef\r
-typedef void   (WINAPI* PFN_SELECT_SETTEXTURE)         (texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale, void* pPlugTexdef);\r
-\r
-// NOTE: some things in there are not really related to the selected face\r
-// having some stuff moved into a textures-dedicated part ?\r
-struct _QERSelectedFaceTable\r
-{\r
-       int m_nSize;\r
-  PFN_GETSELECTEDFACECOUNT  m_pfnGetSelectedFaceCount;\r
-  PFN_GETFACEBRUSH          m_pfnGetFaceBrush;\r
-  PFN_GETFACE               m_pfnGetFace;\r
-  PFN_GETFACEINFO                            m_pfnGetFaceInfo;\r
-  PFN_SETFACEINFO                            m_pfnSetFaceInfo;\r
-  PFN_GETTEXTURENUMBER     m_pfnGetTextureNumber;\r
-  PFN_GETTEXTURESIZE               m_pfnGetTextureSize;\r
-  PFN_SELECT_SETTEXTURE            m_pfnSelect_SetTexture;     \r
-};\r
-\r
-#ifdef USE_SELECTEDFACETABLE_DEFINE\r
-  #ifndef __SELECTEDFACETABLENAME\r
-    #define __SELECTEDFACETABLENAME g_SelectedFaceTable\r
-  #endif\r
-\r
-  #define GetSelectedFaceCount __SELECTEDFACETABLENAME.m_pfnGetSelectedFaceCount\r
-  #define GetFaceBrush __SELECTEDFACETABLENAME.m_pfnGetFaceBrush\r
-  #define GetFace __SELECTEDFACETABLENAME.m_pfnGetFace\r
-  #define GetFaceInfo __SELECTEDFACETABLENAME.m_pfnGetFaceInfo\r
-  #define SetFaceInfo __SELECTEDFACETABLENAME.m_pfnSetFaceInfo\r
-  #define GetTextureNumber __SELECTEDFACETABLENAME.m_pfnGetTextureNumber\r
-  #define GetTextureSize __SELECTEDFACETABLENAME.m_pfnGetTextureSize\r
-  #define Select_SetTexture __SELECTEDFACETABLENAME.m_pfnSelect_SetTexture\r
-#endif\r
-\r
-#endif\r
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+//-----------------------------------------------------------------------------
+//
+// DESCRIPTION:
+// Quick interface hack for selected face interface
+// this one really needs more work, but I'm in a hurry with TexTool
+
+#ifndef __ISELECTEDFACE_H_
+#define __ISELECTEDFACE_H_
+
+#define SELECTEDFACE_MAJOR "selectedface"
+// v2.0
+// support for multiple faces selection (first use in textool v2)
+// using the g_ptrSelectedFaces indexes, get the face_t* with GETFACE
+// still relies on the _QERFaceData*, unless you cast the face_t* to do your own stuff
+// removed PFN_TEXTUREFORNAME, it's in the IShaders API now
+
+//++timo TODO: this interface needs some cleanup with the new texture / shaders interface
+
+// number of selected textures
+typedef int   (WINAPI* PFN_GETSELECTEDFACECOUNT) ();
+// retrieve the corresponding brush_t* (we need it when we need to explicitely rebuild stuff)
+typedef brush_t*    (WINAPI* PFN_GETFACEBRUSH) (int iface);
+// retrieve a given face_t*
+typedef face_t*     (WINAPI* PFN_GETFACE) (int iface);
+// winding_t is assumed to have MAX_POINTS_ON_WINDING allocated and waiting
+typedef int            (WINAPI* PFN_GETFACEINFO)               (int iface, _QERFaceData*, winding_t* );
+// tell editor to update the selected face data
+typedef int            (WINAPI* PFN_SETFACEINFO)               (int iface, _QERFaceData*);
+// retrieve the texture number to bind to
+typedef int            (WINAPI* PFN_GETTEXTURENUMBER)  (int iface);
+// retrieving some texture information
+typedef void   (WINAPI* PFN_GETTEXTURESIZE)    (int iface, int Size[2] );
+// straight func pointer to Select_SetTexture
+// last parameter must be casted to an IPluginTexdef
+typedef void   (WINAPI* PFN_SELECT_SETTEXTURE)         (texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale, void* pPlugTexdef);
+
+// NOTE: some things in there are not really related to the selected face
+// having some stuff moved into a textures-dedicated part ?
+struct _QERSelectedFaceTable
+{
+       int m_nSize;
+  PFN_GETSELECTEDFACECOUNT  m_pfnGetSelectedFaceCount;
+  PFN_GETFACEBRUSH          m_pfnGetFaceBrush;
+  PFN_GETFACE               m_pfnGetFace;
+  PFN_GETFACEINFO                            m_pfnGetFaceInfo;
+  PFN_SETFACEINFO                            m_pfnSetFaceInfo;
+  PFN_GETTEXTURENUMBER     m_pfnGetTextureNumber;
+  PFN_GETTEXTURESIZE               m_pfnGetTextureSize;
+  PFN_SELECT_SETTEXTURE            m_pfnSelect_SetTexture;     
+};
+
+#ifdef USE_SELECTEDFACETABLE_DEFINE
+  #ifndef __SELECTEDFACETABLENAME
+    #define __SELECTEDFACETABLENAME g_SelectedFaceTable
+  #endif
+
+  #define GetSelectedFaceCount __SELECTEDFACETABLENAME.m_pfnGetSelectedFaceCount
+  #define GetFaceBrush __SELECTEDFACETABLENAME.m_pfnGetFaceBrush
+  #define GetFace __SELECTEDFACETABLENAME.m_pfnGetFace
+  #define GetFaceInfo __SELECTEDFACETABLENAME.m_pfnGetFaceInfo
+  #define SetFaceInfo __SELECTEDFACETABLENAME.m_pfnSetFaceInfo
+  #define GetTextureNumber __SELECTEDFACETABLENAME.m_pfnGetTextureNumber
+  #define GetTextureSize __SELECTEDFACETABLENAME.m_pfnGetTextureSize
+  #define Select_SetTexture __SELECTEDFACETABLENAME.m_pfnSelect_SetTexture
+#endif
+
+#endif