* applied patch by StefanV (from mailinglist) that fixes an error in config.py (broke compilation) and some string conversion warnings

* fixes some more string conversions warnings in bobtoolz
* fixed unresolved symbols in bobtoolz and gtkgensurf (due to the above mentioned patch where the prototypes were not updated)


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@320 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
mattn 2008-09-06 08:35:17 +00:00
parent cc4e44e31a
commit 204566e81e
17 changed files with 167 additions and 168 deletions

View File

@ -267,9 +267,9 @@ class Config:
self.CheckoutOrUpdate( svnurl, os.path.join( path, 'installs', pak ) ) self.CheckoutOrUpdate( svnurl, os.path.join( path, 'installs', pak ) )
def Setup( self ): def Setup( self ):
if ( platform == 'local' ): if ( platform == 'local' ):
# special case, fetch external paks under the local install directory # special case, fetch external paks under the local install directory
self.FetchGamePaks( self.install_directory ) self.FetchGamePaks( self.install_directory )
# NOTE: unrelated to self.setup_platforms - grab support files and binaries and install them # NOTE: unrelated to self.setup_platforms - grab support files and binaries and install them
if ( self.platform == 'Windows' ): if ( self.platform == 'Windows' ):
depsfile = 'GtkR-deps-1.6-3.zip' depsfile = 'GtkR-deps-1.6-3.zip'
@ -292,7 +292,7 @@ class Config:
if ( ret != 0 ): if ( ret != 0 ):
raise Exception( 'unzip dependencies file failed' ) raise Exception( 'unzip dependencies file failed' )
os.chdir( backup_cwd ) os.chdir( backup_cwd )
# copy all the dependent runtime data to the install directory # copy all the dependent runtime data to the install directory
srcdir = os.path.dirname( backup_cwd ) srcdir = os.path.dirname( backup_cwd )
for f in [ for f in [

View File

@ -93,9 +93,9 @@ void DoBkgrndToggleYZ();
#define NUM_TOOLBAR_BUTTONS 4 #define NUM_TOOLBAR_BUTTONS 4
struct toolbar_button_info_s struct toolbar_button_info_s
{ {
char *image; const char *image;
char *text; const char *text;
char *tip; const char *tip;
void (*func)(); void (*func)();
IToolbarButton::EType type; IToolbarButton::EType type;
}; };

View File

@ -42,7 +42,7 @@ DEPair::~DEPair()
// Implementation // Implementation
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
void DEPair::Build(char *pKey, char *pValue) void DEPair::Build(const char *pKey, const char *pValue)
{ {
key = pKey; key = pKey;
value = pValue; value = pValue;

View File

@ -28,13 +28,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#pragma once #pragma once
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
class DEPair class DEPair
{ {
public: public:
DEPair(); DEPair();
virtual ~DEPair(); virtual ~DEPair();
void Build(char* pKey, char* pValue); void Build(const char* pKey, const char* pValue);
Str key; Str key;
Str value; Str value;

View File

@ -135,7 +135,7 @@ bool DEntity::LoadFromPrt(char *filename)
ClearBrushes(); ClearBrushes();
ClearEPairs(); ClearEPairs();
bool build = false; bool build = false;
for(unsigned int i = 0; i < portals.node_count; i++) for(unsigned int i = 0; i < portals.node_count; i++)
{ {
@ -144,7 +144,7 @@ bool DEntity::LoadFromPrt(char *filename)
for(unsigned int j = 0; j < portals.node[i].portal_count; j++) for(unsigned int j = 0; j < portals.node[i].portal_count; j++)
{ {
for(unsigned int k = 0; k < portals.node[i].portal[j].point_count-2; k++) for(unsigned int k = 0; k < portals.node[i].portal[j].point_count-2; k++)
{ {
vec3_t v1, v2, normal, n; vec3_t v1, v2, normal, n;
VectorSubtract(portals.node[i].portal[j].point[k+2].p, portals.node[i].portal[j].point[k+1].p, v1); VectorSubtract(portals.node[i].portal[j].point[k+2].p, portals.node[i].portal[j].point[k+1].p, v1);
@ -152,7 +152,7 @@ bool DEntity::LoadFromPrt(char *filename)
CrossProduct(v1, v2, n); CrossProduct(v1, v2, n);
VectorNormalize(n, v2); VectorNormalize(n, v2);
if(k == 0) if(k == 0)
{ {
VectorCopy(v2, normal); VectorCopy(v2, normal);
} }
@ -520,8 +520,8 @@ void DEntity::ClearEPairs()
epairList.clear(); epairList.clear();
} }
void DEntity::AddEPair(char *key, char *value) { void DEntity::AddEPair(const char *key, const char *value) {
DEPair* newEPair; DEPair* newEPair;
newEPair = FindEPairByKey( key ); newEPair = FindEPairByKey( key );
if(!newEPair) { if(!newEPair) {
newEPair = new DEPair; newEPair = new DEPair;
@ -539,14 +539,14 @@ void DEntity::LoadEPairList(epair_t *epl)
{ {
if(!strcmp(ep->key, "classname")) if(!strcmp(ep->key, "classname"))
SetClassname(ep->value); SetClassname(ep->value);
else else
AddEPair(ep->key, ep->value); AddEPair(ep->key, ep->value);
ep = ep->next; ep = ep->next;
} }
} }
bool DEntity::ResetTextures(const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName, bool DEntity::ResetTextures(const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName,
int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation, bool rebuild) int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation, bool rebuild)
{ {
g_FuncTable.m_pfnDeselectAllBrushes(); g_FuncTable.m_pfnDeselectAllBrushes();
@ -557,7 +557,7 @@ bool DEntity::ResetTextures(const char* textureName, float fScale[2], float
for(list<DBrush *>::const_iterator resetBrush=brushList.begin(); resetBrush!=brushList.end(); resetBrush++) for(list<DBrush *>::const_iterator resetBrush=brushList.begin(); resetBrush!=brushList.end(); resetBrush++)
{ {
bool tmp = (*resetBrush)->ResetTextures(textureName, fScale, fShift, rotation, newTextureName, bool tmp = (*resetBrush)->ResetTextures(textureName, fScale, fShift, rotation, newTextureName,
bResetTextureName, bResetScale, bResetShift, bResetRotation); bResetTextureName, bResetScale, bResetShift, bResetRotation);
if(tmp) if(tmp)
@ -566,7 +566,7 @@ bool DEntity::ResetTextures(const char* textureName, float fScale[2], float
if(rebuild) if(rebuild)
{ {
entity_t *pE = (*resetBrush)->QER_brush->owner; entity_t *pE = (*resetBrush)->QER_brush->owner;
g_FuncTable.m_pfnDeleteBrushHandle((*resetBrush)->QER_brush); g_FuncTable.m_pfnDeleteBrushHandle((*resetBrush)->QER_brush);
(*resetBrush)->BuildInRadiant(FALSE, NULL, pE->entityId == 0 ? NULL : pE); (*resetBrush)->BuildInRadiant(FALSE, NULL, pE->entityId == 0 ? NULL : pE);
@ -589,7 +589,7 @@ bool DEntity::ResetTextures(const char* textureName, float fScale[2], float
if(rebuild) if(rebuild)
{ {
entity_t *pE = (*resetPatch)->QER_brush->owner; entity_t *pE = (*resetPatch)->QER_brush->owner;
g_FuncTable.m_pfnDeleteBrushHandle((*resetPatch)->QER_brush); g_FuncTable.m_pfnDeleteBrushHandle((*resetPatch)->QER_brush);
(*resetPatch)->BuildInRadiant(pE->entityId == 0 ? NULL : pE); (*resetPatch)->BuildInRadiant(pE->entityId == 0 ? NULL : pE);
} }

View File

@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#pragma once #pragma once
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
class DEntity class DEntity
{ {
public: public:
void RemoveFromRadiant(); void RemoveFromRadiant();
@ -47,7 +47,7 @@ public:
// epair functions........ // epair functions........
void LoadEPairList(epair_t* epl); void LoadEPairList(epair_t* epl);
void AddEPair(char* key, char* value); void AddEPair(const char* key, const char* value);
void ClearEPairs(); void ClearEPairs();
DEPair* FindEPairByKey(const char* keyname); DEPair* FindEPairByKey(const char* keyname);
// --------------------------------------------- // ---------------------------------------------
@ -73,7 +73,7 @@ public:
bool* BuildDuplicateList(); bool* BuildDuplicateList();
bool* BuildIntersectList(); bool* BuildIntersectList();
// --------------------------------------------- // ---------------------------------------------
// brush operations // brush operations
void ClearBrushes(); // clears brush list and frees memory for brushes void ClearBrushes(); // clears brush list and frees memory for brushes

View File

@ -40,7 +40,7 @@ DMap::~DMap()
ClearEntities(); ClearEntities();
} }
DEntity* DMap::AddEntity(char *classname, int ID) DEntity* DMap::AddEntity(const char *classname, int ID)
{ {
DEntity* newEntity; DEntity* newEntity;
if(ID == -1) if(ID == -1)
@ -49,7 +49,7 @@ DEntity* DMap::AddEntity(char *classname, int ID)
newEntity = new DEntity(classname, ID); newEntity = new DEntity(classname, ID);
entityList.push_back(newEntity); entityList.push_back(newEntity);
return newEntity; return newEntity;
} }
@ -131,7 +131,7 @@ int DMap::FixBrushes(bool rebuild)
else else
{ {
cnt = (*fixEntity)->FixBrushes(FALSE); cnt = (*fixEntity)->FixBrushes(FALSE);
if(cnt && rebuild) if(cnt && rebuild)
RebuildEntity(*fixEntity); RebuildEntity(*fixEntity);
} }
@ -142,21 +142,21 @@ int DMap::FixBrushes(bool rebuild)
return count; return count;
} }
void DMap::ResetTextures( const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName, void DMap::ResetTextures( const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName,
int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation) int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation)
{ {
for(list<DEntity *>::const_iterator texEntity=entityList.begin(); texEntity!=entityList.end(); texEntity++) for(list<DEntity *>::const_iterator texEntity=entityList.begin(); texEntity!=entityList.end(); texEntity++)
{ {
if(!stricmp("worldspawn", (*texEntity)->m_Classname)) if(!stricmp("worldspawn", (*texEntity)->m_Classname))
(*texEntity)->ResetTextures(textureName, fScale, fShift, rotation, newTextureName, (*texEntity)->ResetTextures(textureName, fScale, fShift, rotation, newTextureName,
bResetTextureName, bResetScale, bResetShift, bResetRotation, TRUE); bResetTextureName, bResetScale, bResetShift, bResetRotation, TRUE);
else else
{ {
if((*texEntity)->ResetTextures( textureName, fScale, fShift, rotation, newTextureName, if((*texEntity)->ResetTextures( textureName, fScale, fShift, rotation, newTextureName,
bResetTextureName, bResetScale, bResetShift, bResetRotation, FALSE)) bResetTextureName, bResetScale, bResetShift, bResetRotation, FALSE))
RebuildEntity(*texEntity); RebuildEntity(*texEntity);
} }
} }
} }
void DMap::RebuildEntity(DEntity *ent) void DMap::RebuildEntity(DEntity *ent)

View File

@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#pragma once #pragma once
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
class DMap class DMap
{ {
public: public:
static void RebuildEntity(DEntity* ent); static void RebuildEntity(DEntity* ent);
@ -43,7 +43,7 @@ public:
void ClearEntities(); void ClearEntities();
DEntity* DMap::GetEntityForID(int ID); DEntity* DMap::GetEntityForID(int ID);
DEntity* AddEntity(char* classname = "worldspawn", int ID = -1); DEntity* AddEntity(const char* classname = "worldspawn", int ID = -1);
list<DEntity*> entityList; list<DEntity*> entityList;

View File

@ -36,10 +36,10 @@ _QERUITable g_MessageTable; // for path plotting (listening for update)
_QEREntityTable g_EntityTable; _QEREntityTable g_EntityTable;
// plugin name // plugin name
char* PLUGIN_NAME = "bobToolz"; const char* PLUGIN_NAME = "bobToolz";
// commands in the menu // commands in the menu
static char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Turn edge"; static const char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Turn edge";
// globals // globals
GtkWidget *g_pRadiantWnd = NULL; GtkWidget *g_pRadiantWnd = NULL;
@ -108,14 +108,14 @@ GtkWidget* new_pixmap (char* filename) {
GdkBitmap *mask; GdkBitmap *mask;
GtkWidget *pixmap; GtkWidget *pixmap;
g_FuncTable.m_pfnLoadBitmap(filename, (void **)&gdkpixmap, (void **)&mask); g_FuncTable.m_pfnLoadBitmap(filename, (void **)&gdkpixmap, (void **)&mask);
pixmap = gtk_pixmap_new (gdkpixmap, mask); pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap); gdk_pixmap_unref (gdkpixmap);
gdk_pixmap_unref (mask); gdk_pixmap_unref (mask);
return pixmap; return pixmap;
} }
class CBobtoolzToolbarButton : public IToolbarButton class CBobtoolzToolbarButton : public IToolbarButton
{ {
@ -140,7 +140,7 @@ public:
switch( mIndex ) { switch( mIndex ) {
case 3: return eToggleButton; case 3: return eToggleButton;
default: return eButton; default: return eButton;
} }
} }
virtual const char* getText() const virtual const char* getText() const
{ {
@ -210,7 +210,7 @@ public:
// CSynapseClient API // CSynapseClient API
bool RequestAPI(APIDescriptor_t *pAPI); bool RequestAPI(APIDescriptor_t *pAPI);
const char* GetInfo(); const char* GetInfo();
CSynapseClientBobtoolz() { } CSynapseClientBobtoolz() { }
virtual ~CSynapseClientBobtoolz() { } virtual ~CSynapseClientBobtoolz() { }
}; };
@ -234,7 +234,7 @@ extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const
g_pSynapseServer = pServer; g_pSynapseServer = pServer;
g_pSynapseServer->IncRef(); g_pSynapseServer->IncRef();
Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf()); Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf());
g_SynapseClient.AddAPI(TOOLBAR_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPlugToolbarTable)); g_SynapseClient.AddAPI(TOOLBAR_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPlugToolbarTable));
g_SynapseClient.AddAPI(PLUGIN_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPluginTable)); g_SynapseClient.AddAPI(PLUGIN_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPluginTable));

View File

@ -161,7 +161,7 @@ bool ValidateTextFloatRange(const char* pData, float min, float max, char* error
return FALSE; return FALSE;
} }
bool ValidateTextIntRange(const char* pData, int min, int max, char* error_title, int* value) bool ValidateTextIntRange(const char* pData, int min, int max, const char* error_title, int* value)
{ {
char error_buffer[256]; char error_buffer[256];
sprintf(error_buffer, "Please Enter An Integer Between %i and %i", min, max); sprintf(error_buffer, "Please Enter An Integer Between %i and %i", min, max);

View File

@ -117,7 +117,7 @@ void SetInitialStairPos(int dir, vec3_t min, vec3_t max, float width)
} }
} }
char* TranslateString (char *buf) char* TranslateString (const char *buf)
{ {
static char buf2[32768]; static char buf2[32768];
int i, l; int i, l;
@ -140,7 +140,7 @@ char* TranslateString (char *buf)
return buf2; return buf2;
} }
void Sys_ERROR (char* text, ...) void Sys_ERROR (const char* text, ...)
{ {
va_list argptr; va_list argptr;
char buf[32768]; char buf[32768];
@ -191,7 +191,7 @@ const char* ExtractFilename(const char* path)
return ++p; return ++p;
} }
extern char* PLUGIN_NAME; extern const char* PLUGIN_NAME;
/*char* GetGameFilename(char* buffer, const char* filename) /*char* GetGameFilename(char* buffer, const char* filename)
{ {
strcpy(buffer, g_FuncTable.m_pfnGetGamePath()); strcpy(buffer, g_FuncTable.m_pfnGetGamePath());

View File

@ -26,7 +26,7 @@ const char* GetCurrentTexture();
void FillDefaultTexture(_QERFaceData* faceData, vec3_t va, vec3_t vb, vec3_t vc, const char* texture); void FillDefaultTexture(_QERFaceData* faceData, vec3_t va, vec3_t vb, vec3_t vc, const char* texture);
void Sys_ERROR (char* text, ...); void Sys_ERROR (const char* text, ...);
void BuildMiniPrt(list<Str>* exclusionList); void BuildMiniPrt(list<Str>* exclusionList);

View File

@ -47,7 +47,7 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri)
int Bisect(NODE *, int, int, int); int Bisect(NODE *, int, int, int);
void CalcAngles(NODE *, int *, float *); void CalcAngles(NODE *, int *, float *);
void EdgeOnSide(int *, int *, int *); void EdgeOnSide(int *, int *, int *);
int tricall(int, NODE *, int *, TRI **, TRI **, char *); int tricall(int, NODE *, int *, TRI **, TRI **, const char *);
int CheckBorders(int *,int,NODE *,int *,TRI **); int CheckBorders(int *,int,NODE *,int *,TRI **);
float biggesterror; float biggesterror;
@ -195,7 +195,7 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri)
Tri = *pTri; Tri = *pTri;
// Sliver-check along borders. Since borders are often linear, the errors // Sliver-check along borders. Since borders are often linear, the errors
// along borders will often be zero, so no new points will be added. This // along borders will often be zero, so no new points will be added. This
// tends to produce long, thin brushes. For all border triangles, check // tends to produce long, thin brushes. For all border triangles, check
// that minimum angle isn't less than SLIVER_ANGLE. If it is, add another // that minimum angle isn't less than SLIVER_ANGLE. If it is, add another
// vertex. // vertex.
while(CheckBorders(&NumNodesUsed,NumNodes[0],Node,NumTris,pTri) > 0) while(CheckBorders(&NumNodesUsed,NumNodes[0],Node,NumTris,pTri) > 0)
@ -323,9 +323,8 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri)
/* tricall Takes an array of nodes, spits out an array of triangles */ /* tricall Takes an array of nodes, spits out an array of triangles */
/* */ /* */
/*****************************************************************************/ /*****************************************************************************/
int tricall(int NumNodes, NODE *Node, int *NumTris, TRI **inTri, TRI **Tri, LPSTR Options) int tricall(int NumNodes, NODE *Node, int *NumTris, TRI **inTri, TRI **Tri, const char *Options)
{ {
struct triangulateio in, out; struct triangulateio in, out;
int i, N; int i, N;
int NumUsedNodes; int NumUsedNodes;
@ -426,18 +425,18 @@ int tricall(int NumNodes, NODE *Node, int *NumTris, TRI **inTri, TRI **Tri, LPST
/* Make necessary initializations */ /* Make necessary initializations */
out.pointlist = (REAL *) NULL; /* Not needed if -N switch used. */ out.pointlist = (REAL *) NULL; /* Not needed if -N switch used. */
out.pointattributelist = (REAL *) NULL; /* Not needed if -N switch used or out.pointattributelist = (REAL *) NULL; /* Not needed if -N switch used or
number of point attributes is zero: */ number of point attributes is zero: */
out.pointmarkerlist = (int *) NULL; /* Not needed if -N or -B switch used. */ out.pointmarkerlist = (int *) NULL; /* Not needed if -N or -B switch used. */
out.trianglelist = (int *) NULL; /* Not needed if -E switch used. */ out.trianglelist = (int *) NULL; /* Not needed if -E switch used. */
out.triangleattributelist = (REAL *) NULL; /* Not needed if -E switch used or out.triangleattributelist = (REAL *) NULL; /* Not needed if -E switch used or
number of triangle attributes is number of triangle attributes is
zero: */ zero: */
out.trianglearealist = (REAL *) NULL; out.trianglearealist = (REAL *) NULL;
out.neighborlist = (int *) NULL; /* Needed only if -n switch used. */ out.neighborlist = (int *) NULL; /* Needed only if -n switch used. */
out.segmentlist = (int *) NULL; /* Needed only if segments are output out.segmentlist = (int *) NULL; /* Needed only if segments are output
(-p or -c) and -P not used: */ (-p or -c) and -P not used: */
out.segmentmarkerlist = (int *) NULL; /* Needed only if segments are output out.segmentmarkerlist = (int *) NULL; /* Needed only if segments are output
(-p or -c) and -P and -B not used: */ (-p or -c) and -P and -B not used: */
out.edgelist = (int *) NULL; /* Needed only if -e switch used. */ out.edgelist = (int *) NULL; /* Needed only if -e switch used. */
out.edgemarkerlist = (int *) NULL; /* Needed if -e used and -B not used. */ out.edgemarkerlist = (int *) NULL; /* Needed if -e used and -B not used. */
@ -715,7 +714,7 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
if(UseDetail) contents += CONTENTS_DETAIL; if(UseDetail) contents += CONTENTS_DETAIL;
if(UseLadder) contents += CONTENTS_LADDER; if(UseLadder) contents += CONTENTS_LADDER;
} }
OpenFuncGroup(); OpenFuncGroup();
for(i=0; i<NumTris; i++) for(i=0; i<NumTris; i++)
{ {
@ -725,11 +724,11 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
brush.face[0].v[0][0] = Node[Tri[i].v[0]].p[0]; brush.face[0].v[0][0] = Node[Tri[i].v[0]].p[0];
brush.face[0].v[0][1] = Node[Tri[i].v[0]].p[1]; brush.face[0].v[0][1] = Node[Tri[i].v[0]].p[1];
brush.face[0].v[0][2] = Node[Tri[i].v[0]].p[2]; brush.face[0].v[0][2] = Node[Tri[i].v[0]].p[2];
brush.face[0].v[1][0] = Node[Tri[i].v[2]].p[0]; brush.face[0].v[1][0] = Node[Tri[i].v[2]].p[0];
brush.face[0].v[1][1] = Node[Tri[i].v[2]].p[1]; brush.face[0].v[1][1] = Node[Tri[i].v[2]].p[1];
brush.face[0].v[1][2] = Node[Tri[i].v[2]].p[2]; brush.face[0].v[1][2] = Node[Tri[i].v[2]].p[2];
brush.face[0].v[2][0] = Node[Tri[i].v[1]].p[0]; brush.face[0].v[2][0] = Node[Tri[i].v[1]].p[0];
brush.face[0].v[2][1] = Node[Tri[i].v[1]].p[1]; brush.face[0].v[2][1] = Node[Tri[i].v[1]].p[1];
brush.face[0].v[2][2] = Node[Tri[i].v[1]].p[2]; brush.face[0].v[2][2] = Node[Tri[i].v[1]].p[2];
@ -778,50 +777,50 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
brush.face[1].v[0][0] = Node[Tri[i].v[0]].p[0]; brush.face[1].v[0][0] = Node[Tri[i].v[0]].p[0];
brush.face[1].v[0][1] = (float)backface; brush.face[1].v[0][1] = (float)backface;
brush.face[1].v[0][2] = Node[Tri[i].v[0]].p[2]; brush.face[1].v[0][2] = Node[Tri[i].v[0]].p[2];
brush.face[1].v[1][0] = Node[Tri[i].v[1]].p[0]; brush.face[1].v[1][0] = Node[Tri[i].v[1]].p[0];
brush.face[1].v[1][1] = (float)backface; brush.face[1].v[1][1] = (float)backface;
brush.face[1].v[1][2] = Node[Tri[i].v[1]].p[2]; brush.face[1].v[1][2] = Node[Tri[i].v[1]].p[2];
brush.face[1].v[2][0] = Node[Tri[i].v[2]].p[0]; brush.face[1].v[2][0] = Node[Tri[i].v[2]].p[0];
brush.face[1].v[2][1] = (float)backface; brush.face[1].v[2][1] = (float)backface;
brush.face[1].v[2][2] = Node[Tri[i].v[2]].p[2]; brush.face[1].v[2][2] = Node[Tri[i].v[2]].p[2];
// 0-1 side // 0-1 side
brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0]; brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0];
brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1]; brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1];
brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2]; brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2];
brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0]; brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0];
brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1]; brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1];
brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2]; brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2];
brush.face[2].v[2][0] = Node[Tri[i].v[1]].p[0]; brush.face[2].v[2][0] = Node[Tri[i].v[1]].p[0];
brush.face[2].v[2][1] = (float)backface; brush.face[2].v[2][1] = (float)backface;
brush.face[2].v[2][2] = Node[Tri[i].v[1]].p[2]; brush.face[2].v[2][2] = Node[Tri[i].v[1]].p[2];
// 1-2 side // 1-2 side
brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0]; brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0];
brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1]; brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1];
brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2]; brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2];
brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0]; brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0];
brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1]; brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1];
brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2]; brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2];
brush.face[3].v[2][0] = Node[Tri[i].v[2]].p[0]; brush.face[3].v[2][0] = Node[Tri[i].v[2]].p[0];
brush.face[3].v[2][1] = (float)backface; brush.face[3].v[2][1] = (float)backface;
brush.face[3].v[2][2] = Node[Tri[i].v[2]].p[2]; brush.face[3].v[2][2] = Node[Tri[i].v[2]].p[2];
// 2-0 side // 2-0 side
brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0]; brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0];
brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1]; brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1];
brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2]; brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2];
brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0]; brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0];
brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1]; brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1];
brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2]; brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2];
brush.face[4].v[2][0] = Node[Tri[i].v[0]].p[0]; brush.face[4].v[2][0] = Node[Tri[i].v[0]].p[0];
brush.face[4].v[2][1] = (float)backface; brush.face[4].v[2][1] = (float)backface;
brush.face[4].v[2][2] = Node[Tri[i].v[0]].p[2]; brush.face[4].v[2][2] = Node[Tri[i].v[0]].p[2];
@ -832,50 +831,50 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
brush.face[1].v[0][0] = (float)backface; brush.face[1].v[0][0] = (float)backface;
brush.face[1].v[0][1] = Node[Tri[i].v[0]].p[1]; brush.face[1].v[0][1] = Node[Tri[i].v[0]].p[1];
brush.face[1].v[0][2] = Node[Tri[i].v[0]].p[2]; brush.face[1].v[0][2] = Node[Tri[i].v[0]].p[2];
brush.face[1].v[1][0] = (float)backface; brush.face[1].v[1][0] = (float)backface;
brush.face[1].v[1][1] = Node[Tri[i].v[1]].p[1]; brush.face[1].v[1][1] = Node[Tri[i].v[1]].p[1];
brush.face[1].v[1][2] = Node[Tri[i].v[1]].p[2]; brush.face[1].v[1][2] = Node[Tri[i].v[1]].p[2];
brush.face[1].v[2][0] = (float)backface; brush.face[1].v[2][0] = (float)backface;
brush.face[1].v[2][1] = Node[Tri[i].v[2]].p[1]; brush.face[1].v[2][1] = Node[Tri[i].v[2]].p[1];
brush.face[1].v[2][2] = Node[Tri[i].v[2]].p[2]; brush.face[1].v[2][2] = Node[Tri[i].v[2]].p[2];
// 0-1 side // 0-1 side
brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0]; brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0];
brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1]; brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1];
brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2]; brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2];
brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0]; brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0];
brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1]; brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1];
brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2]; brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2];
brush.face[2].v[2][0] = (float)backface; brush.face[2].v[2][0] = (float)backface;
brush.face[2].v[2][1] = Node[Tri[i].v[1]].p[1]; brush.face[2].v[2][1] = Node[Tri[i].v[1]].p[1];
brush.face[2].v[2][2] = Node[Tri[i].v[1]].p[2]; brush.face[2].v[2][2] = Node[Tri[i].v[1]].p[2];
// 1-2 side // 1-2 side
brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0]; brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0];
brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1]; brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1];
brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2]; brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2];
brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0]; brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0];
brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1]; brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1];
brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2]; brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2];
brush.face[3].v[2][0] = (float)backface; brush.face[3].v[2][0] = (float)backface;
brush.face[3].v[2][1] = Node[Tri[i].v[2]].p[1]; brush.face[3].v[2][1] = Node[Tri[i].v[2]].p[1];
brush.face[3].v[2][2] = Node[Tri[i].v[2]].p[2]; brush.face[3].v[2][2] = Node[Tri[i].v[2]].p[2];
// 2-0 side // 2-0 side
brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0]; brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0];
brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1]; brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1];
brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2]; brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2];
brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0]; brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0];
brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1]; brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1];
brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2]; brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2];
brush.face[4].v[2][0] = (float)backface; brush.face[4].v[2][0] = (float)backface;
brush.face[4].v[2][1] = Node[Tri[i].v[0]].p[1]; brush.face[4].v[2][1] = Node[Tri[i].v[0]].p[1];
brush.face[4].v[2][2] = Node[Tri[i].v[0]].p[2]; brush.face[4].v[2][2] = Node[Tri[i].v[0]].p[2];
@ -885,55 +884,55 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
brush.face[1].v[0][0] = Node[Tri[i].v[0]].p[0]; brush.face[1].v[0][0] = Node[Tri[i].v[0]].p[0];
brush.face[1].v[0][1] = Node[Tri[i].v[0]].p[1]; brush.face[1].v[0][1] = Node[Tri[i].v[0]].p[1];
brush.face[1].v[0][2] = (float)backface; brush.face[1].v[0][2] = (float)backface;
brush.face[1].v[1][0] = Node[Tri[i].v[1]].p[0]; brush.face[1].v[1][0] = Node[Tri[i].v[1]].p[0];
brush.face[1].v[1][1] = Node[Tri[i].v[1]].p[1]; brush.face[1].v[1][1] = Node[Tri[i].v[1]].p[1];
brush.face[1].v[1][2] = (float)backface; brush.face[1].v[1][2] = (float)backface;
brush.face[1].v[2][0] = Node[Tri[i].v[2]].p[0]; brush.face[1].v[2][0] = Node[Tri[i].v[2]].p[0];
brush.face[1].v[2][1] = Node[Tri[i].v[2]].p[1]; brush.face[1].v[2][1] = Node[Tri[i].v[2]].p[1];
brush.face[1].v[2][2] = (float)backface; brush.face[1].v[2][2] = (float)backface;
// 0-1 side // 0-1 side
brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0]; brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0];
brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1]; brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1];
brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2]; brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2];
brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0]; brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0];
brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1]; brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1];
brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2]; brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2];
brush.face[2].v[2][0] = Node[Tri[i].v[1]].p[0]; brush.face[2].v[2][0] = Node[Tri[i].v[1]].p[0];
brush.face[2].v[2][1] = Node[Tri[i].v[1]].p[1]; brush.face[2].v[2][1] = Node[Tri[i].v[1]].p[1];
brush.face[2].v[2][2] = (float)backface; brush.face[2].v[2][2] = (float)backface;
// 1-2 side // 1-2 side
brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0]; brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0];
brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1]; brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1];
brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2]; brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2];
brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0]; brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0];
brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1]; brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1];
brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2]; brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2];
brush.face[3].v[2][0] = Node[Tri[i].v[2]].p[0]; brush.face[3].v[2][0] = Node[Tri[i].v[2]].p[0];
brush.face[3].v[2][1] = Node[Tri[i].v[2]].p[1]; brush.face[3].v[2][1] = Node[Tri[i].v[2]].p[1];
brush.face[3].v[2][2] = (float)backface; brush.face[3].v[2][2] = (float)backface;
// 2-0 side // 2-0 side
brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0]; brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0];
brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1]; brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1];
brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2]; brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2];
brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0]; brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0];
brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1]; brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1];
brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2]; brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2];
brush.face[4].v[2][0] = Node[Tri[i].v[0]].p[0]; brush.face[4].v[2][0] = Node[Tri[i].v[0]].p[0];
brush.face[4].v[2][1] = Node[Tri[i].v[0]].p[1]; brush.face[4].v[2][1] = Node[Tri[i].v[0]].p[1];
brush.face[4].v[2][2] = (float)backface; brush.face[4].v[2][2] = (float)backface;
} }
for(j=0; j<5; j++) for(j=0; j<5; j++)
{ {
strcpy(brush.face[j].texture, strcpy(brush.face[j].texture,
@ -1052,10 +1051,10 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
default: default:
front = MoreThan(zmax,32.); front = MoreThan(zmax,32.);
} }
for(i=0; i<NumTris; i++) for(i=0; i<NumTris; i++)
Tri[i].flag = 0; Tri[i].flag = 0;
switch(Plane) switch(Plane)
{ {
case PLANE_XZ0: case PLANE_XZ0:
@ -1075,7 +1074,7 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
j1 = 0; j1 = 0;
j2 = 1; j2 = 1;
} }
brush.Number = 0; brush.Number = 0;
brush.NumFaces = 6; brush.NumFaces = 6;
MaxHints = NH*NV-1; MaxHints = NH*NV-1;
@ -1131,41 +1130,41 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
brush.face[0].v[0][0] = Node[q[2]].p[0]; brush.face[0].v[0][0] = Node[q[2]].p[0];
brush.face[0].v[0][1] = (float)front; brush.face[0].v[0][1] = (float)front;
brush.face[0].v[0][2] = Node[q[2]].p[2]; brush.face[0].v[0][2] = Node[q[2]].p[2];
brush.face[0].v[1][0] = Node[q[1]].p[0]; brush.face[0].v[1][0] = Node[q[1]].p[0];
brush.face[0].v[1][1] = (float)front; brush.face[0].v[1][1] = (float)front;
brush.face[0].v[1][2] = Node[q[1]].p[2]; brush.face[0].v[1][2] = Node[q[1]].p[2];
brush.face[0].v[2][0] = Node[q[0]].p[0]; brush.face[0].v[2][0] = Node[q[0]].p[0];
brush.face[0].v[2][1] = (float)front; brush.face[0].v[2][1] = (float)front;
brush.face[0].v[2][2] = Node[q[0]].p[2]; brush.face[0].v[2][2] = Node[q[0]].p[2];
// back // back
brush.face[1].v[0][0] = Node[q[0]].p[0]; brush.face[1].v[0][0] = Node[q[0]].p[0];
brush.face[1].v[0][1] = (float)backface; brush.face[1].v[0][1] = (float)backface;
brush.face[1].v[0][2] = Node[q[0]].p[2]; brush.face[1].v[0][2] = Node[q[0]].p[2];
brush.face[1].v[1][0] = Node[q[1]].p[0]; brush.face[1].v[1][0] = Node[q[1]].p[0];
brush.face[1].v[1][1] = (float)backface; brush.face[1].v[1][1] = (float)backface;
brush.face[1].v[1][2] = Node[q[1]].p[2]; brush.face[1].v[1][2] = Node[q[1]].p[2];
brush.face[1].v[2][0] = Node[q[2]].p[0]; brush.face[1].v[2][0] = Node[q[2]].p[0];
brush.face[1].v[2][1] = (float)backface; brush.face[1].v[2][1] = (float)backface;
brush.face[1].v[2][2] = Node[q[2]].p[2]; brush.face[1].v[2][2] = Node[q[2]].p[2];
for(k0=0; k0<brush.NumFaces-2; k0++) for(k0=0; k0<brush.NumFaces-2; k0++)
{ {
k =k0+2; k =k0+2;
k1=(k0+1) % (brush.NumFaces-2); k1=(k0+1) % (brush.NumFaces-2);
brush.face[k].v[0][0] = Node[q[k0]].p[0]; brush.face[k].v[0][0] = Node[q[k0]].p[0];
brush.face[k].v[0][1] = (float)front; brush.face[k].v[0][1] = (float)front;
brush.face[k].v[0][2] = Node[q[k0]].p[2]; brush.face[k].v[0][2] = Node[q[k0]].p[2];
brush.face[k].v[1][0] = Node[q[k1]].p[0]; brush.face[k].v[1][0] = Node[q[k1]].p[0];
brush.face[k].v[1][1] = (float)front; brush.face[k].v[1][1] = (float)front;
brush.face[k].v[1][2] = Node[q[k1]].p[2]; brush.face[k].v[1][2] = Node[q[k1]].p[2];
brush.face[k].v[2][0] = Node[q[k1]].p[0]; brush.face[k].v[2][0] = Node[q[k1]].p[0];
brush.face[k].v[2][1] = (float)backface; brush.face[k].v[2][1] = (float)backface;
brush.face[k].v[2][2] = Node[q[k1]].p[2]; brush.face[k].v[2][2] = Node[q[k1]].p[2];
@ -1177,41 +1176,41 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
brush.face[0].v[0][0] = (float)front; brush.face[0].v[0][0] = (float)front;
brush.face[0].v[0][1] = Node[q[2]].p[1]; brush.face[0].v[0][1] = Node[q[2]].p[1];
brush.face[0].v[0][2] = Node[q[2]].p[2]; brush.face[0].v[0][2] = Node[q[2]].p[2];
brush.face[0].v[1][0] = (float)front; brush.face[0].v[1][0] = (float)front;
brush.face[0].v[1][1] = Node[q[1]].p[1]; brush.face[0].v[1][1] = Node[q[1]].p[1];
brush.face[0].v[1][2] = Node[q[1]].p[2]; brush.face[0].v[1][2] = Node[q[1]].p[2];
brush.face[0].v[2][0] = (float)front; brush.face[0].v[2][0] = (float)front;
brush.face[0].v[2][1] = Node[q[0]].p[1]; brush.face[0].v[2][1] = Node[q[0]].p[1];
brush.face[0].v[2][2] = Node[q[0]].p[2]; brush.face[0].v[2][2] = Node[q[0]].p[2];
// back // back
brush.face[1].v[0][0] = (float)backface; brush.face[1].v[0][0] = (float)backface;
brush.face[1].v[0][1] = Node[q[0]].p[1]; brush.face[1].v[0][1] = Node[q[0]].p[1];
brush.face[1].v[0][2] = Node[q[0]].p[2]; brush.face[1].v[0][2] = Node[q[0]].p[2];
brush.face[1].v[1][0] = (float)backface; brush.face[1].v[1][0] = (float)backface;
brush.face[1].v[1][1] = Node[q[1]].p[1]; brush.face[1].v[1][1] = Node[q[1]].p[1];
brush.face[1].v[1][2] = Node[q[1]].p[2]; brush.face[1].v[1][2] = Node[q[1]].p[2];
brush.face[1].v[2][0] = (float)backface; brush.face[1].v[2][0] = (float)backface;
brush.face[1].v[2][1] = Node[q[2]].p[1]; brush.face[1].v[2][1] = Node[q[2]].p[1];
brush.face[1].v[2][2] = Node[q[2]].p[2]; brush.face[1].v[2][2] = Node[q[2]].p[2];
for(k0=0; k0<brush.NumFaces-2; k0++) for(k0=0; k0<brush.NumFaces-2; k0++)
{ {
k =k0+2; k =k0+2;
k1=(k0+1) % (brush.NumFaces-2); k1=(k0+1) % (brush.NumFaces-2);
brush.face[k].v[0][0] = (float)front; brush.face[k].v[0][0] = (float)front;
brush.face[k].v[0][1] = Node[q[k0]].p[1]; brush.face[k].v[0][1] = Node[q[k0]].p[1];
brush.face[k].v[0][2] = Node[q[k0]].p[2]; brush.face[k].v[0][2] = Node[q[k0]].p[2];
brush.face[k].v[1][0] = (float)front; brush.face[k].v[1][0] = (float)front;
brush.face[k].v[1][1] = Node[q[k1]].p[1]; brush.face[k].v[1][1] = Node[q[k1]].p[1];
brush.face[k].v[1][2] = Node[q[k1]].p[2]; brush.face[k].v[1][2] = Node[q[k1]].p[2];
brush.face[k].v[2][0] = (float)backface; brush.face[k].v[2][0] = (float)backface;
brush.face[k].v[2][1] = Node[q[k1]].p[1]; brush.face[k].v[2][1] = Node[q[k1]].p[1];
brush.face[k].v[2][2] = Node[q[k1]].p[2]; brush.face[k].v[2][2] = Node[q[k1]].p[2];
@ -1222,41 +1221,41 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
brush.face[0].v[0][0] = Node[q[2]].p[0]; brush.face[0].v[0][0] = Node[q[2]].p[0];
brush.face[0].v[0][1] = Node[q[2]].p[1]; brush.face[0].v[0][1] = Node[q[2]].p[1];
brush.face[0].v[0][2] = (float)front; brush.face[0].v[0][2] = (float)front;
brush.face[0].v[1][0] = Node[q[1]].p[0]; brush.face[0].v[1][0] = Node[q[1]].p[0];
brush.face[0].v[1][1] = Node[q[1]].p[1]; brush.face[0].v[1][1] = Node[q[1]].p[1];
brush.face[0].v[1][2] = (float)front; brush.face[0].v[1][2] = (float)front;
brush.face[0].v[2][0] = Node[q[0]].p[0]; brush.face[0].v[2][0] = Node[q[0]].p[0];
brush.face[0].v[2][1] = Node[q[0]].p[1]; brush.face[0].v[2][1] = Node[q[0]].p[1];
brush.face[0].v[2][2] = (float)front; brush.face[0].v[2][2] = (float)front;
// back // back
brush.face[1].v[0][0] = Node[q[0]].p[0]; brush.face[1].v[0][0] = Node[q[0]].p[0];
brush.face[1].v[0][1] = Node[q[0]].p[1]; brush.face[1].v[0][1] = Node[q[0]].p[1];
brush.face[1].v[0][2] = (float)backface; brush.face[1].v[0][2] = (float)backface;
brush.face[1].v[1][0] = Node[q[1]].p[0]; brush.face[1].v[1][0] = Node[q[1]].p[0];
brush.face[1].v[1][1] = Node[q[1]].p[1]; brush.face[1].v[1][1] = Node[q[1]].p[1];
brush.face[1].v[1][2] = (float)backface; brush.face[1].v[1][2] = (float)backface;
brush.face[1].v[2][0] = Node[q[2]].p[0]; brush.face[1].v[2][0] = Node[q[2]].p[0];
brush.face[1].v[2][1] = Node[q[2]].p[1]; brush.face[1].v[2][1] = Node[q[2]].p[1];
brush.face[1].v[2][2] = (float)backface; brush.face[1].v[2][2] = (float)backface;
for(k0=0; k0<brush.NumFaces-2; k0++) for(k0=0; k0<brush.NumFaces-2; k0++)
{ {
k =k0+2; k =k0+2;
k1=(k0+1) % (brush.NumFaces-2); k1=(k0+1) % (brush.NumFaces-2);
brush.face[k].v[0][0] = Node[q[k0]].p[0]; brush.face[k].v[0][0] = Node[q[k0]].p[0];
brush.face[k].v[0][1] = Node[q[k0]].p[1]; brush.face[k].v[0][1] = Node[q[k0]].p[1];
brush.face[k].v[0][2] = (float)front; brush.face[k].v[0][2] = (float)front;
brush.face[k].v[1][0] = Node[q[k1]].p[0]; brush.face[k].v[1][0] = Node[q[k1]].p[0];
brush.face[k].v[1][1] = Node[q[k1]].p[1]; brush.face[k].v[1][1] = Node[q[k1]].p[1];
brush.face[k].v[1][2] = (float)front; brush.face[k].v[1][2] = (float)front;
brush.face[k].v[2][0] = Node[q[k1]].p[0]; brush.face[k].v[2][0] = Node[q[k1]].p[0];
brush.face[k].v[2][1] = Node[q[k1]].p[1]; brush.face[k].v[2][1] = Node[q[k1]].p[1];
brush.face[k].v[2][2] = (float)backface; brush.face[k].v[2][2] = (float)backface;

View File

@ -176,7 +176,7 @@ void texfont_init ()
int i, j, x, y; int i, j, x, y;
float inv = 1.0f/128; float inv = 1.0f/128;
char *charlines[16] = { const char *charlines[16] = {
"abcdefghijklmn", "opqrstuvwxyz0", "123456789ABC", "DEFGHIJKLMN", "abcdefghijklmn", "opqrstuvwxyz0", "123456789ABC", "DEFGHIJKLMN",
"OPQRSTUVWX", "YZ,.!;:<>/?{}@$%", "&*()-+=_[] #" }; "OPQRSTUVWX", "YZ,.!;:<>/?{}@$%", "&*()-+=_[] #" };
unsigned char lefts[7][17] = { unsigned char lefts[7][17] = {

View File

@ -1393,10 +1393,10 @@ GtkWidget* create_main_dialog ()
GtkObject *adj; GtkObject *adj;
GSList *group; GSList *group;
int i; int i;
char *games[] = { "Quake 2", "Half-Life", "SiN", "Heretic 2", "Kingpin", "Genesis3D", "Quake 3 Arena" }; const char *games[] = { "Quake 2", "Half-Life", "SiN", "Heretic 2", "Kingpin", "Genesis3D", "Quake 3 Arena" };
char *waveforms[] = { "Alternating hill/valley", "Cylindrical left-to-right", "Cylindrical top-to-bottom", const char *waveforms[] = { "Alternating hill/valley", "Cylindrical left-to-right", "Cylindrical top-to-bottom",
"From bitmap", "Fractal" }; "From bitmap", "Fractal" };
char *orientations[] = { "Ground surface", "Ceiling", "Wall facing 0", "Wall facing 90", const char *orientations[] = { "Ground surface", "Ceiling", "Wall facing 0", "Wall facing 90",
"Wall facing 180","Wall facing 270" }; "Wall facing 180","Wall facing 270" };
g_pWnd = dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_pWnd = dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);

View File

@ -321,7 +321,7 @@ varargs versions of all text functions.
FIXME: make this buffer size safe someday FIXME: make this buffer size safe someday
============ ============
*/ */
char *va (char *format, ...) char *va (const char *format, ...)
{ {
va_list argptr; va_list argptr;
static char string[1024]; static char string[1024];

View File

@ -48,7 +48,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "version.h" #include "version.h"
CRadiantImageManager g_ImageManager; CRadiantImageManager g_ImageManager;
CRadiantPluginManager g_PluginsManager; CRadiantPluginManager g_PluginsManager;
_QERPlugSurfaceTable g_SurfaceTable; _QERPlugSurfaceTable g_SurfaceTable;
_QERFileSystemTable g_FileSystemTable; _QERFileSystemTable g_FileSystemTable;
@ -127,7 +127,7 @@ void InitFileTypes()
GetFileTypeRegistry()->addType(MAP_MAJOR, g_pattern_mapq3); GetFileTypeRegistry()->addType(MAP_MAJOR, g_pattern_mapq3);
GetFileTypeRegistry()->addType(MAP_MAJOR, g_pattern_mapxml); GetFileTypeRegistry()->addType(MAP_MAJOR, g_pattern_mapxml);
GetFileTypeRegistry()->addType("region", g_pattern_regq3); GetFileTypeRegistry()->addType("region", g_pattern_regq3);
/* /*
GetFileTypeRegistry()->addType(MODEL_MAJOR, g_pattern_modelmd3); GetFileTypeRegistry()->addType(MODEL_MAJOR, g_pattern_modelmd3);
@ -282,7 +282,7 @@ public:
return &elem->m_model; return &elem->m_model;
} }
} }
elem = new CModelWrapper(id, version); elem = new CModelWrapper(id, version);
g_ptr_array_add(m_ptrs, elem); g_ptr_array_add(m_ptrs, elem);
@ -327,7 +327,7 @@ public:
} }
mAPIs.clear(); mAPIs.clear();
} }
// CSynapseAPIManager interface ------------------- // CSynapseAPIManager interface -------------------
APIDescriptor_t* BuildRequireAPI(APIDescriptor_t* pAPI) APIDescriptor_t* BuildRequireAPI(APIDescriptor_t* pAPI)
{ {
@ -346,7 +346,7 @@ public:
for(i=mAPIs.begin(); i!=mAPIs.end(); i++) for(i=mAPIs.begin(); i!=mAPIs.end(); i++)
AddItem((_QERPlugToolbarTable*)(*i)->mpTable); AddItem((_QERPlugToolbarTable*)(*i)->mpTable);
} }
private: private:
void AddItem(_QERPlugToolbarTable* pTable) void AddItem(_QERPlugToolbarTable* pTable)
@ -423,7 +423,7 @@ void CRadiantImageManager::LoadImage(const char *name, byte **pic, int *width, i
} }
return; return;
} }
// start walking the interfaces // start walking the interfaces
list<CImageTableSlot *>::iterator iSlot; list<CImageTableSlot *>::iterator iSlot;
for(iSlot = mSlots.begin(); iSlot != mSlots.end(); iSlot++) for(iSlot = mSlots.begin(); iSlot != mSlots.end(); iSlot++)
@ -456,7 +456,7 @@ const char* CRadiantImageManager::GetNextExtension()
/* plugin manager --------------------------------------- */ /* plugin manager --------------------------------------- */
APIDescriptor_t* CRadiantPluginManager::BuildRequireAPI(APIDescriptor_t *pAPI) APIDescriptor_t* CRadiantPluginManager::BuildRequireAPI(APIDescriptor_t *pAPI)
{ {
CPluginSlot *pSlot = new CPluginSlot(pAPI); CPluginSlot *pSlot = new CPluginSlot(pAPI);
mSlots.push_front(pSlot); mSlots.push_front(pSlot);
return pSlot->GetDescriptor(); return pSlot->GetDescriptor();
@ -479,7 +479,7 @@ void CSynapseClientRadiant::ImportMap(IDataStream *in, CPtrArray *ents, const ch
} }
else if (strcmp(type,"xmap")==0) else if (strcmp(type,"xmap")==0)
{ {
g_MapTable2.m_pfnMap_Read(in, ents); g_MapTable2.m_pfnMap_Read(in, ents);
} }
else else
Sys_FPrintf(SYS_WRN, "WARNING: no module found for map interface type '%s'\n", type); Sys_FPrintf(SYS_WRN, "WARNING: no module found for map interface type '%s'\n", type);
@ -512,7 +512,7 @@ CPluginSlot::CPluginSlot(APIDescriptor_t *pAPI)
} }
CPluginSlot::~CPluginSlot() CPluginSlot::~CPluginSlot()
{ {
delete mpAPI; delete mpAPI;
delete mpTable; delete mpTable;
while (m_CommandStrings) while (m_CommandStrings)
@ -551,14 +551,14 @@ int CPluginSlot::getCommandCount()
{ {
if (!m_bReady) if (!m_bReady)
Init(); Init();
return g_slist_length (m_CommandStrings); return g_slist_length (m_CommandStrings);
} }
const char* CPluginSlot::getCommand(int n) const char* CPluginSlot::getCommand(int n)
{ {
if (!m_bReady) if (!m_bReady)
Init(); Init();
return (char*)g_slist_nth_data (m_CommandStrings, n); return (char*)g_slist_nth_data (m_CommandStrings, n);
} }
void CPluginSlot::addMenuID(int n) void CPluginSlot::addMenuID(int n)
@ -647,11 +647,11 @@ void CPlugInManager::InitForDir(const Str &dir)
path += g_strModulesDir; path += g_strModulesDir;
// SYNAPSE // SYNAPSE
g_pParentWnd->GetSynapseServer().AddSearchPath(path); g_pParentWnd->GetSynapseServer().AddSearchPath(path);
} }
} }
static const XMLConfigEntry_t manager_entries[] = static const XMLConfigEntry_t manager_entries[] =
{ {
{ VFS_MAJOR, SYN_REQUIRE, sizeof(g_FileSystemTable), &g_FileSystemTable }, { VFS_MAJOR, SYN_REQUIRE, sizeof(g_FileSystemTable), &g_FileSystemTable },
{ SHADERS_MAJOR, SYN_REQUIRE, sizeof(g_ShadersTable), &g_ShadersTable }, { SHADERS_MAJOR, SYN_REQUIRE, sizeof(g_ShadersTable), &g_ShadersTable },
{ MAP_MAJOR, SYN_REQUIRE, sizeof(g_MapTable), &g_MapTable }, { MAP_MAJOR, SYN_REQUIRE, sizeof(g_MapTable), &g_MapTable },
@ -662,9 +662,9 @@ static const XMLConfigEntry_t manager_entries[] =
void CPlugInManager::Init() void CPlugInManager::Init()
{ {
Str synapse_config; Str synapse_config;
Cleanup(); Cleanup();
// set some globals // set some globals
g_qeglobals.bBSPFrontendPlugin = false; g_qeglobals.bBSPFrontendPlugin = false;
@ -675,10 +675,10 @@ void CPlugInManager::Init()
synapse_config += "synapse.config"; synapse_config += "synapse.config";
if (!g_pParentWnd->GetSynapseServer().Initialize(synapse_config.GetBuffer(), &Sys_Printf_VA)) if (!g_pParentWnd->GetSynapseServer().Initialize(synapse_config.GetBuffer(), &Sys_Printf_VA))
Error("Synpase server initialization failed (see console)\n"); Error("Synpase server initialization failed (see console)\n");
// builtin modules // builtin modules
g_pParentWnd->GetSynapseServer().EnumerateBuiltinModule(&eclass_def); g_pParentWnd->GetSynapseServer().EnumerateBuiltinModule(&eclass_def);
// APIs we provide // APIs we provide
g_pParentWnd->GetSynapseClient().AddAPI(RADIANT_MAJOR, NULL, sizeof(_QERFuncTable_1)); g_pParentWnd->GetSynapseClient().AddAPI(RADIANT_MAJOR, NULL, sizeof(_QERFuncTable_1));
g_pParentWnd->GetSynapseClient().AddAPI(SCRIPLIB_MAJOR, NULL, sizeof(_QERScripLibTable)); g_pParentWnd->GetSynapseClient().AddAPI(SCRIPLIB_MAJOR, NULL, sizeof(_QERScripLibTable));
@ -691,15 +691,15 @@ void CPlugInManager::Init()
g_pParentWnd->GetSynapseClient().AddAPI(SELECTEDFACE_MAJOR, NULL, sizeof(_QERSelectedFaceTable)); g_pParentWnd->GetSynapseClient().AddAPI(SELECTEDFACE_MAJOR, NULL, sizeof(_QERSelectedFaceTable));
g_pParentWnd->GetSynapseClient().AddAPI(APPSURFACEDIALOG_MAJOR, NULL, sizeof(_QERAppSurfaceTable)); g_pParentWnd->GetSynapseClient().AddAPI(APPSURFACEDIALOG_MAJOR, NULL, sizeof(_QERAppSurfaceTable));
g_pParentWnd->GetSynapseClient().AddAPI(UNDO_MAJOR, NULL, sizeof(_QERUndoTable)); g_pParentWnd->GetSynapseClient().AddAPI(UNDO_MAJOR, NULL, sizeof(_QERUndoTable));
g_pParentWnd->GetSynapseClient().AddAPI(UI_MAJOR, NULL, sizeof(_QERUITable)); g_pParentWnd->GetSynapseClient().AddAPI(UI_MAJOR, NULL, sizeof(_QERUITable));
g_pParentWnd->GetSynapseClient().AddAPI(UIGTK_MAJOR, NULL, sizeof(_QERUIGtkTable)); g_pParentWnd->GetSynapseClient().AddAPI(UIGTK_MAJOR, NULL, sizeof(_QERUIGtkTable));
g_pParentWnd->GetSynapseClient().AddAPI(CAMERA_MAJOR, NULL, sizeof(_QERCameraTable)); g_pParentWnd->GetSynapseClient().AddAPI(CAMERA_MAJOR, NULL, sizeof(_QERCameraTable));
// modules configured by XML // modules configured by XML
if ( !g_pParentWnd->GetSynapseClient().ConfigXML( &g_pParentWnd->GetSynapseServer(), "core", manager_entries ) ) { if ( !g_pParentWnd->GetSynapseClient().ConfigXML( &g_pParentWnd->GetSynapseServer(), "core", manager_entries ) ) {
Error("Synapse server initialization failed (see console)\n"); Error("Synapse server initialization failed (see console)\n");
} }
// adding a manager is a special case that ConfigXML doesn't take care of // adding a manager is a special case that ConfigXML doesn't take care of
g_pParentWnd->GetSynapseServer().SelectClientConfig( "core" ); g_pParentWnd->GetSynapseServer().SelectClientConfig( "core" );
char *minor; char *minor;
@ -709,11 +709,11 @@ void CPlugInManager::Init()
} }
g_ImageManager.SetMatchAPI( IMAGE_MAJOR, minor ); g_ImageManager.SetMatchAPI( IMAGE_MAJOR, minor );
g_pParentWnd->GetSynapseClient().AddManager( &g_ImageManager ); g_pParentWnd->GetSynapseClient().AddManager( &g_ImageManager );
// SYN_REQUIRE entries which are still hardcoded // SYN_REQUIRE entries which are still hardcoded
g_pParentWnd->GetSynapseClient().AddAPI(MAP_MAJOR, "mapxml", sizeof(g_MapTable2), SYN_REQUIRE, &g_MapTable2); g_pParentWnd->GetSynapseClient().AddAPI(MAP_MAJOR, "mapxml", sizeof(g_MapTable2), SYN_REQUIRE, &g_MapTable2);
g_pParentWnd->GetSynapseClient().AddAPI(ENTITY_MAJOR, NULL, sizeof(g_EntityTable), SYN_REQUIRE, &g_EntityTable); g_pParentWnd->GetSynapseClient().AddAPI(ENTITY_MAJOR, NULL, sizeof(g_EntityTable), SYN_REQUIRE, &g_EntityTable);
// plugins: load anything that claims to be a plugin // plugins: load anything that claims to be a plugin
// minor becomes some kind of matching pattern // minor becomes some kind of matching pattern
// g_PluginsManager is an API any class, it receives several function tables as needed // g_PluginsManager is an API any class, it receives several function tables as needed
@ -850,7 +850,7 @@ void CPlugInManager::DeleteBrushHandle(void * vp)
void CPlugInManager::CommitBrushHandleToMap(void * vp) void CPlugInManager::CommitBrushHandleToMap(void * vp)
{ {
g_bScreenUpdates = false; g_bScreenUpdates = false;
for (int i = 0; i < m_BrushHandles.GetSize(); i++) for (int i = 0; i < m_BrushHandles.GetSize(); i++)
{ {
brush_t *pb = reinterpret_cast<brush_t*>(m_BrushHandles.GetAt(i)); brush_t *pb = reinterpret_cast<brush_t*>(m_BrushHandles.GetAt(i));
@ -863,7 +863,7 @@ void CPlugInManager::CommitBrushHandleToMap(void * vp)
Select_Brush(pb); Select_Brush(pb);
} }
} }
g_bScreenUpdates = true; g_bScreenUpdates = true;
Sys_UpdateWindows(W_ALL); Sys_UpdateWindows(W_ALL);
} }
@ -971,7 +971,7 @@ void QERApp_SetCamera( vec3_t origin, vec3_t angles )
VectorCopy( origin, g_pParentWnd->GetCamWnd()->Camera()->origin ); VectorCopy( origin, g_pParentWnd->GetCamWnd()->Camera()->origin );
VectorCopy( angles, g_pParentWnd->GetCamWnd()->Camera()->angles ); VectorCopy( angles, g_pParentWnd->GetCamWnd()->Camera()->angles );
Sys_UpdateWindows( W_ALL ); // specify Sys_UpdateWindows( W_ALL ); // specify
g_pParentWnd->OnTimer(); g_pParentWnd->OnTimer();
} }
@ -1484,7 +1484,7 @@ void* WINAPI QERApp_GetEntityHandle(int nIndex)
return static_cast<void*>(pe); return static_cast<void*>(pe);
} }
epair_t* WINAPI QERApp_AllocateEpair( char *key, char *val ) epair_t* WINAPI QERApp_AllocateEpair( const char *key, const char *val )
{ {
epair_t *e = (epair_t*)qmalloc (sizeof(*e)); epair_t *e = (epair_t*)qmalloc (sizeof(*e));
e->key = (char*)qmalloc(strlen(key)+1); e->key = (char*)qmalloc(strlen(key)+1);
@ -1503,7 +1503,7 @@ IEpair* WINAPI QERApp_IEpairForEntityHandle(void *vp)
return pEp; return pEp;
} }
IEpair* WINAPI QERApp_IEpairForProjectKeys() IEpair* WINAPI QERApp_IEpairForProjectKeys()
{ {
CEpairsWrapper *pEp = new CEpairsWrapper(g_qeglobals.d_project_entity); CEpairsWrapper *pEp = new CEpairsWrapper(g_qeglobals.d_project_entity);
pEp->IncRef(); pEp->IncRef();
@ -1784,7 +1784,7 @@ void CPlugInManager::CommitEntityHandleToMap(void* vpEntity)
void WINAPI QERApp_SetScreenUpdate(int bScreenUpdates) void WINAPI QERApp_SetScreenUpdate(int bScreenUpdates)
{ {
g_bScreenUpdates = bScreenUpdates; g_bScreenUpdates = bScreenUpdates;
} }
texturewin_t* QERApp_QeglobalsTexturewin() texturewin_t* QERApp_QeglobalsTexturewin()
@ -2123,7 +2123,7 @@ unsigned long QERApp_GetTickCount()
gettimeofday(&tp, &tzp); gettimeofday(&tp, &tzp);
if (!basetime) if (!basetime)
basetime = tp.tv_sec; basetime = tp.tv_sec;
return (tp.tv_sec-basetime) + tp.tv_usec/1000; return (tp.tv_sec-basetime) + tp.tv_usec/1000;
#endif #endif
} }
@ -2274,7 +2274,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
pShadersTable->m_pfnTexture_ShowInuse = Texture_ShowInuse; pShadersTable->m_pfnTexture_ShowInuse = Texture_ShowInuse;
pShadersTable->m_pfnBuildShaderList = &BuildShaderList; pShadersTable->m_pfnBuildShaderList = &BuildShaderList;
pShadersTable->m_pfnPreloadShaders = &PreloadShaders; pShadersTable->m_pfnPreloadShaders = &PreloadShaders;
return true; return true;
} }
if (!strcmp(pAPI->major_name, QGL_MAJOR)) if (!strcmp(pAPI->major_name, QGL_MAJOR))
@ -2304,7 +2304,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
pQglTable->m_pfn_qglDeleteTextures = qglDeleteTextures; pQglTable->m_pfn_qglDeleteTextures = qglDeleteTextures;
pQglTable->m_pfn_qglDrawElements = qglDrawElements; pQglTable->m_pfn_qglDrawElements = qglDrawElements;
pQglTable->m_pfn_qglEnable = qglEnable; pQglTable->m_pfn_qglEnable = qglEnable;
pQglTable->m_pfn_qglEnableClientState = qglEnableClientState; pQglTable->m_pfn_qglEnableClientState = qglEnableClientState;
pQglTable->m_pfn_qglEnd = qglEnd; pQglTable->m_pfn_qglEnd = qglEnd;
pQglTable->m_pfn_qglEndList = qglEndList; pQglTable->m_pfn_qglEndList = qglEndList;
pQglTable->m_pfn_qglFogf = qglFogf; pQglTable->m_pfn_qglFogf = qglFogf;
@ -2380,7 +2380,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
pDataTable->m_pfnSelectedBrushes = QERApp_SelectedBrushes; pDataTable->m_pfnSelectedBrushes = QERApp_SelectedBrushes;
pDataTable->m_pfnFilteredBrushes = QERApp_FilteredBrushes; pDataTable->m_pfnFilteredBrushes = QERApp_FilteredBrushes;
pDataTable->m_pfnLstSkinCache = QERApp_LstSkinCache; pDataTable->m_pfnLstSkinCache = QERApp_LstSkinCache;
return true; return true;
} }
if (!strcmp(pAPI->major_name, PATCH_MAJOR)) if (!strcmp(pAPI->major_name, PATCH_MAJOR))
@ -2389,24 +2389,24 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
pPatchTable->m_pfnPatch_Alloc = &Patch_Alloc; pPatchTable->m_pfnPatch_Alloc = &Patch_Alloc;
pPatchTable->m_pfnAddBrushForPatch = &AddBrushForPatch; pPatchTable->m_pfnAddBrushForPatch = &AddBrushForPatch;
pPatchTable->m_pfnMakeNewPatch = &MakeNewPatch; pPatchTable->m_pfnMakeNewPatch = &MakeNewPatch;
return true; return true;
} }
if (!strcmp(pAPI->major_name, ECLASSMANAGER_MAJOR)) if (!strcmp(pAPI->major_name, ECLASSMANAGER_MAJOR))
{ {
_EClassManagerTable *pEClassManTable = static_cast<_EClassManagerTable *>(pAPI->mpTable); _EClassManagerTable *pEClassManTable = static_cast<_EClassManagerTable *>(pAPI->mpTable);
pEClassManTable->m_pfnEclass_InsertAlphabetized = &Eclass_InsertAlphabetized; pEClassManTable->m_pfnEclass_InsertAlphabetized = &Eclass_InsertAlphabetized;
pEClassManTable->m_pfnGet_Eclass_E = &Get_EClass_E; pEClassManTable->m_pfnGet_Eclass_E = &Get_EClass_E;
pEClassManTable->m_pfnSet_Eclass_Found = &Set_Eclass_Found; pEClassManTable->m_pfnSet_Eclass_Found = &Set_Eclass_Found;
pEClassManTable->m_pfnGet_Parsing_Single = &Get_Parsing_Single; pEClassManTable->m_pfnGet_Parsing_Single = &Get_Parsing_Single;
pEClassManTable->m_pfnEClass_Create = &EClass_Create; pEClassManTable->m_pfnEClass_Create = &EClass_Create;
pEClassManTable->m_pfnEclass_ForName = &Eclass_ForName; pEClassManTable->m_pfnEclass_ForName = &Eclass_ForName;
return true; return true;
} }
if (!strcmp(pAPI->major_name, SELECTEDFACE_MAJOR)) if (!strcmp(pAPI->major_name, SELECTEDFACE_MAJOR))
{ {
_QERSelectedFaceTable *pSelectedFaceTable = static_cast<_QERSelectedFaceTable *>(pAPI->mpTable); _QERSelectedFaceTable *pSelectedFaceTable = static_cast<_QERSelectedFaceTable *>(pAPI->mpTable);
pSelectedFaceTable->m_pfnGetSelectedFaceCount = &QERApp_GetSelectedFaceCount; pSelectedFaceTable->m_pfnGetSelectedFaceCount = &QERApp_GetSelectedFaceCount;
@ -2452,7 +2452,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
return true; return true;
} }
if (!strcmp(pAPI->major_name, UNDO_MAJOR)) if (!strcmp(pAPI->major_name, UNDO_MAJOR))
{ {
_QERUndoTable *pUndoTable = static_cast<_QERUndoTable *>(pAPI->mpTable); _QERUndoTable *pUndoTable = static_cast<_QERUndoTable *>(pAPI->mpTable);
pUndoTable->m_pfnUndo_Start = &Undo_Start; pUndoTable->m_pfnUndo_Start = &Undo_Start;
@ -2482,7 +2482,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
return true; return true;
} }
if (!strcmp(pAPI->major_name, UI_MAJOR)) if (!strcmp(pAPI->major_name, UI_MAJOR))
{ {
_QERUITable *pUITable = static_cast<_QERUITable *>(pAPI->mpTable); _QERUITable *pUITable = static_cast<_QERUITable *>(pAPI->mpTable);
pUITable->m_pfnCreateGLWindow = QERApp_CreateGLWindow; pUITable->m_pfnCreateGLWindow = QERApp_CreateGLWindow;
@ -2495,7 +2495,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
return true; return true;
} }
if (!strcmp(pAPI->major_name, UIGTK_MAJOR)) if (!strcmp(pAPI->major_name, UIGTK_MAJOR))
{ {
_QERUIGtkTable *pUIGtkTable = static_cast<_QERUIGtkTable *>(pAPI->mpTable); _QERUIGtkTable *pUIGtkTable = static_cast<_QERUIGtkTable *>(pAPI->mpTable);
pUIGtkTable->m_pfn_GetQeglobalsGLWidget = &QERApp_GetQeGlobalsGLWidget; pUIGtkTable->m_pfn_GetQeglobalsGLWidget = &QERApp_GetQeGlobalsGLWidget;