diff --git a/contrib/bobtoolz/DBobView.cpp b/contrib/bobtoolz/DBobView.cpp index a6973aaf..ca092106 100644 --- a/contrib/bobtoolz/DBobView.cpp +++ b/contrib/bobtoolz/DBobView.cpp @@ -25,11 +25,8 @@ //#include "misc.h" #include "funchandlers.h" -#include - #include "iglrender.h" #include "qerplugin.h" -#include "str.h" #include "math/matrix.h" #include "DEntity.h" @@ -202,9 +199,9 @@ void DBobView_setEntity( Entity& entity, float multiplier, int points, float var DEntity trigger; trigger.LoadEPairList( &entity ); - if ( !strcmp( trigger.m_Classname, "trigger_push" ) ) { + if ( trigger.m_Classname == "trigger_push" ) { if ( DEPair* trigger_ep = trigger.FindEPairByKey( "target" ) ) { - const scene::Path* entTarget = FindEntityFromTargetname( trigger_ep->value ); + const scene::Path* entTarget = FindEntityFromTargetname( trigger_ep->value.c_str() ); if ( entTarget ) { g_PathView.reset(); // delete old at first g_PathView.reset( new DBobView ); @@ -215,7 +212,7 @@ void DBobView_setEntity( Entity& entity, float multiplier, int points, float var g_PathView->target = target; target->attach( *g_PathView ); } - g_PathView->Begin( trigger_ep->value, multiplier, points, varGravity, bShowExtra ); + g_PathView->Begin( trigger_ep->value.c_str(), multiplier, points, varGravity, bShowExtra ); } else{ globalErrorStream() << "bobToolz PathPlotter: trigger_push ARGH\n"; diff --git a/contrib/bobtoolz/DBrush.cpp b/contrib/bobtoolz/DBrush.cpp index 3fdbc6f1..3af4f490 100644 --- a/contrib/bobtoolz/DBrush.cpp +++ b/contrib/bobtoolz/DBrush.cpp @@ -24,7 +24,6 @@ #include "DBrush.h" #include -#include "str.h" #include "DPoint.h" #include "DPlane.h" @@ -619,22 +618,13 @@ bool DBrush::BBoxTouch( DBrush *chkBrush ){ return true; } -void DBrush::ResetChecks( std::list* exclusionList ){ +void DBrush::ResetChecks( const std::vector& exclusionList ){ for ( DPlane *plane : faceList ) { - bool set = false; - - if ( exclusionList ) { - for ( const Str& texture : *exclusionList ) - { - if ( strstr( plane->m_shader.c_str(), texture.GetBuffer() ) ) { - set = true; - break; - } - } - } - - plane->m_bChkOk = set; + plane->m_bChkOk = std::any_of( exclusionList.cbegin(), exclusionList.cend(), + [plane]( const CopiedString& texture ){ + return strstr( plane->m_shader.c_str(), texture.c_str() ) != nullptr; + } ); } } diff --git a/contrib/bobtoolz/DBrush.h b/contrib/bobtoolz/DBrush.h index 6aeda074..47084d96 100644 --- a/contrib/bobtoolz/DBrush.h +++ b/contrib/bobtoolz/DBrush.h @@ -25,8 +25,9 @@ #include #include +#include #include "mathlib.h" -#include "str.h" +#include "string/string.h" class DPlane; class DWinding; @@ -73,7 +74,7 @@ public: scene::Node* BuildInRadiant( bool allowDestruction, int* changeCnt, scene::Node* entity = NULL ); void selectInRadiant() const; - void ResetChecks( std::list* exclusionList ); + void ResetChecks( const std::vector& exclusionList ); void ClearFaces(); void ClearPoints(); diff --git a/contrib/bobtoolz/DEPair.cpp b/contrib/bobtoolz/DEPair.cpp index c75a8751..ad4979fe 100644 --- a/contrib/bobtoolz/DEPair.cpp +++ b/contrib/bobtoolz/DEPair.cpp @@ -27,19 +27,6 @@ // Construction/Destruction ////////////////////////////////////////////////////////////////////// -DEPair::DEPair(){ - -} - -DEPair::~DEPair(){ - -} - ////////////////////////////////////////////////////////////////////// // Implementation ////////////////////////////////////////////////////////////////////// - -void DEPair::Build( const char *pKey, const char *pValue ){ - key = pKey; - value = pValue; -} diff --git a/contrib/bobtoolz/DEPair.h b/contrib/bobtoolz/DEPair.h index 712bceb9..fd890e04 100644 --- a/contrib/bobtoolz/DEPair.h +++ b/contrib/bobtoolz/DEPair.h @@ -23,18 +23,12 @@ #pragma once -#include "str.h" +#include "string/string.h" -class DEPair +struct DEPair { -public: - DEPair(); - virtual ~DEPair(); - - void Build( const char* pKey, const char* pValue ); - - Str key; - Str value; + DEPair( const char* pKey, const char* pValue ) : key( pKey ), value( pValue ){ + } + CopiedString key; + CopiedString value; }; - -//typedef CList DEPairList; diff --git a/contrib/bobtoolz/DEntity.cpp b/contrib/bobtoolz/DEntity.cpp index c502b277..6943938c 100644 --- a/contrib/bobtoolz/DEntity.cpp +++ b/contrib/bobtoolz/DEntity.cpp @@ -23,9 +23,7 @@ #include "DEntity.h" -#include #include -#include "str.h" #include "DPoint.h" #include "DPlane.h" @@ -43,9 +41,6 @@ #include "generic/referencecounted.h" -#include -#include -#include #include #include "scenelib.h" @@ -348,9 +343,9 @@ bool DEntity::LoadFromEntity( scene::Node& ent, const LoadOptions options ) { return true; } -void DEntity::RemoveNonCheckBrushes( std::list* exclusionList ){ +void DEntity::RemoveNonCheckBrushes( const std::vector& exclusionList ){ brushList.erase( std::remove_if( brushList.begin(), brushList.end(), [&]( DBrush *brush ){ - if ( std::any_of( exclusionList->cbegin(), exclusionList->cend(), [brush]( const Str& tex ){ return brush->HasTexture( tex.GetBuffer() ); } ) ) { + if ( std::any_of( exclusionList.cbegin(), exclusionList.cend(), [brush]( const CopiedString& tex ){ return brush->HasTexture( tex.c_str() ); } ) ) { delete brush; return true; } @@ -358,7 +353,7 @@ void DEntity::RemoveNonCheckBrushes( std::list* exclusionList ){ } ), brushList.end() ); } -void DEntity::ResetChecks( std::list* exclusionList ){ +void DEntity::ResetChecks( const std::vector& exclusionList ){ for ( DBrush *brush : brushList ) { brush->ResetChecks( exclusionList ); @@ -377,14 +372,14 @@ int DEntity::FixBrushes(){ } void DEntity::BuildInRadiant( bool allowDestruction ){ - bool makeEntity = strcmp( m_Classname, "worldspawn" ) ? true : false; + const bool makeEntity = m_Classname != "worldspawn"; if ( makeEntity ) { - NodeSmartReference node( GlobalEntityCreator().createEntity( GlobalEntityClassManager().findOrInsert( m_Classname.GetBuffer(), !brushList.empty() || !patchList.empty() ) ) ); + NodeSmartReference node( GlobalEntityCreator().createEntity( GlobalEntityClassManager().findOrInsert( m_Classname.c_str(), !brushList.empty() || !patchList.empty() ) ) ); - for ( const DEPair *epair : epairList ) + for ( const DEPair& epair : epairList ) { - Node_getEntity( node )->setKeyValue( epair->key, epair->value ); + Node_getEntity( node )->setKeyValue( epair.key.c_str(), epair.value.c_str() ); } Node_getTraversable( GlobalSceneGraph().root() )->insert( node ); @@ -416,11 +411,11 @@ void DEntity::SetClassname( const char *classname ) { void DEntity::SaveToFile( FILE *pFile ){ fprintf( pFile, "{\n" ); - fprintf( pFile, "\"classname\" \"%s\"\n", (const char *)m_Classname ); + fprintf( pFile, "\"classname\" \"%s\"\n", m_Classname.c_str() ); - for ( const DEPair *ep : epairList ) + for ( const DEPair& ep : epairList ) { - fprintf( pFile, "\"%s\" \"%s\"\n", (const char *)ep->key, (const char *)ep->value ); + fprintf( pFile, "\"%s\" \"%s\"\n", ep.key.c_str(), ep.value.c_str() ); } for ( DBrush *brush : brushList ) @@ -432,23 +427,15 @@ void DEntity::SaveToFile( FILE *pFile ){ } void DEntity::ClearEPairs(){ - for ( DEPair *epair : epairList ) - { - delete epair; - } epairList.clear(); } void DEntity::AddEPair( const char *key, const char *value ) { - DEPair* newEPair; - newEPair = FindEPairByKey( key ); - if ( !newEPair ) { - newEPair = new DEPair; - newEPair->Build( key, value ); - epairList.push_back( newEPair ); + if ( DEPair* pair = FindEPairByKey( key ) ) { + *pair = DEPair( key, value ); } else { - newEPair->Build( key, value ); + epairList.push_back( DEPair( key, value ) ); } } @@ -508,13 +495,13 @@ bool DEntity::ResetTextures( const char* textureName, float fScale[2], float } DEPair* DEntity::FindEPairByKey( const char* keyname ){ - for ( DEPair *ep : epairList ) + for ( DEPair& ep : epairList ) { - if ( !strcmp( ep->key, keyname ) ) { - return ep; + if ( ep.key == keyname ) { + return &ep; } } - return NULL; + return nullptr; } void DEntity::RemoveFromRadiant(){ @@ -526,7 +513,7 @@ void DEntity::RemoveFromRadiant(){ void DEntity::SpawnString( const char* key, const char* defaultstring, const char** out ){ DEPair* pEP = FindEPairByKey( key ); if ( pEP ) { - *out = pEP->value; + *out = pEP->value.c_str(); } else { *out = defaultstring; @@ -536,7 +523,7 @@ void DEntity::SpawnString( const char* key, const char* defaultstring, const cha void DEntity::SpawnInt( const char* key, const char* defaultstring, int* out ){ DEPair* pEP = FindEPairByKey( key ); if ( pEP ) { - *out = atoi( pEP->value ); + *out = atoi( pEP->value.c_str() ); } else { *out = atoi( defaultstring ); @@ -546,7 +533,7 @@ void DEntity::SpawnInt( const char* key, const char* defaultstring, int* out ){ void DEntity::SpawnFloat( const char* key, const char* defaultstring, float* out ){ DEPair* pEP = FindEPairByKey( key ); if ( pEP ) { - *out = static_cast( atof( pEP->value ) ); + *out = static_cast( atof( pEP->value.c_str() ) ); } else { *out = static_cast( atof( defaultstring ) ); @@ -556,7 +543,7 @@ void DEntity::SpawnFloat( const char* key, const char* defaultstring, float* out void DEntity::SpawnVector( const char* key, const char* defaultstring, vec_t* out ){ DEPair* pEP = FindEPairByKey( key ); if ( pEP ) { - sscanf( pEP->value, "%f %f %f", &out[0], &out[1], &out[2] ); + sscanf( pEP->value.c_str(), "%f %f %f", &out[0], &out[1], &out[2] ); } else { sscanf( defaultstring, "%f %f %f", &out[0], &out[1], &out[2] ); diff --git a/contrib/bobtoolz/DEntity.h b/contrib/bobtoolz/DEntity.h index d0606075..e7934fc9 100644 --- a/contrib/bobtoolz/DEntity.h +++ b/contrib/bobtoolz/DEntity.h @@ -23,13 +23,12 @@ #pragma once -#include #include -#include "str.h" +#include "string/string.h" #include "mathlib.h" #include "DMap.h" +#include "DEPair.h" -class DEPair; class DBrush; class DPlane; class DPatch; @@ -66,8 +65,8 @@ public: void SetClassname( const char* classname ); void BuildInRadiant( bool allowDestruction ); - void ResetChecks( std::list* exclusionList ); - void RemoveNonCheckBrushes( std::list* exclusionList ); + void ResetChecks( const std::vector& exclusionList ); + void RemoveNonCheckBrushes( const std::vector& exclusionList ); int GetBrushCount( void ); DBrush* FindBrushByPointer( scene::Node& brush ); @@ -94,11 +93,11 @@ public: // --------------------------------------------- // vars - std::list epairList; + std::vector epairList; std::vector brushList; // new patches, wahey!!! std::vector patchList; - Str m_Classname; + CopiedString m_Classname; // --------------------------------------------- diff --git a/contrib/bobtoolz/DMap.cpp b/contrib/bobtoolz/DMap.cpp index 33d3179b..06bf8530 100644 --- a/contrib/bobtoolz/DMap.cpp +++ b/contrib/bobtoolz/DMap.cpp @@ -23,9 +23,6 @@ #include "DMap.h" -#include "str.h" -#include - #include "DPoint.h" #include "DPlane.h" #include "DBrush.h" @@ -37,9 +34,6 @@ #include "generic/referencecounted.h" -#include -#include -#include #include #include "scenelib.h" @@ -147,7 +141,7 @@ void DMap::ResetTextures( const char* textureName, float fScale[2], float f bool bResetTextureName, bool bResetScale[2], bool bResetShift[2], bool bResetRotation ){ for ( DEntity *entity : entityList ) { - if ( string_equal_nocase( "worldspawn", entity->m_Classname ) ) { + if ( string_equal_nocase( "worldspawn", entity->m_Classname.c_str() ) ) { entity->ResetTextures( textureName, fScale, fShift, rotation, newTextureName, bResetTextureName, bResetScale, bResetShift, bResetRotation, true ); } diff --git a/contrib/bobtoolz/DPatch.cpp b/contrib/bobtoolz/DPatch.cpp index 176fbde0..148605e5 100644 --- a/contrib/bobtoolz/DPatch.cpp +++ b/contrib/bobtoolz/DPatch.cpp @@ -24,7 +24,6 @@ #include "DPatch.h" #include -#include "str.h" #include "scenelib.h" #include "ipatch.h" diff --git a/contrib/bobtoolz/DPlane.cpp b/contrib/bobtoolz/DPlane.cpp index 688027ec..b12d8b99 100644 --- a/contrib/bobtoolz/DPlane.cpp +++ b/contrib/bobtoolz/DPlane.cpp @@ -28,7 +28,6 @@ #include "DPoint.h" #include "DWinding.h" -#include "str.h" #include "misc.h" ////////////////////////////////////////////////////////////////////// diff --git a/contrib/bobtoolz/DShape.cpp b/contrib/bobtoolz/DShape.cpp index 89185126..088f2c58 100644 --- a/contrib/bobtoolz/DShape.cpp +++ b/contrib/bobtoolz/DShape.cpp @@ -23,9 +23,7 @@ #include "DShape.h" -#include #include -#include "str.h" #include "DPoint.h" #include "DPlane.h" diff --git a/contrib/bobtoolz/DTrainDrawer.cpp b/contrib/bobtoolz/DTrainDrawer.cpp index 88250546..d95578b9 100644 --- a/contrib/bobtoolz/DTrainDrawer.cpp +++ b/contrib/bobtoolz/DTrainDrawer.cpp @@ -20,7 +20,6 @@ #include "DTrainDrawer.h" #include -#include "str.h" #include "DPoint.h" #include "DPlane.h" @@ -177,7 +176,7 @@ public: e.ClearEPairs(); e.LoadEPairList( Node_getEntity( instance.path().top() ) ); - const char* classname = e.m_Classname.GetBuffer(); + const char* classname = e.m_Classname.c_str(); const char* target; const char* control; const char* targetname; diff --git a/contrib/bobtoolz/DTreePlanter.cpp b/contrib/bobtoolz/DTreePlanter.cpp index d8403406..ac5cf24e 100644 --- a/contrib/bobtoolz/DTreePlanter.cpp +++ b/contrib/bobtoolz/DTreePlanter.cpp @@ -19,9 +19,6 @@ #include "DTreePlanter.h" -#include -#include "str.h" - #include "DPoint.h" #include "DPlane.h" #include "DBrush.h" @@ -184,7 +181,7 @@ public: } vec3_t vec, out; - sscanf( pEpair->value.GetBuffer(), "%f %f %f", &vec[0], &vec[1], &vec[2] ); + sscanf( pEpair->value.c_str(), "%f %f %f", &vec[0], &vec[1], &vec[2] ); planter.FindDropPoint( vec, out ); diff --git a/contrib/bobtoolz/DVisDrawer.cpp b/contrib/bobtoolz/DVisDrawer.cpp index b897d54f..7b8170b9 100644 --- a/contrib/bobtoolz/DVisDrawer.cpp +++ b/contrib/bobtoolz/DVisDrawer.cpp @@ -26,9 +26,6 @@ #include "iglrender.h" #include "math/matrix.h" -#include -#include "str.h" - #include "DPoint.h" #include "misc.h" diff --git a/contrib/bobtoolz/DWinding.cpp b/contrib/bobtoolz/DWinding.cpp index 7c809f0d..cb5064bd 100644 --- a/contrib/bobtoolz/DWinding.cpp +++ b/contrib/bobtoolz/DWinding.cpp @@ -23,8 +23,6 @@ #include "DWinding.h" -#include - #include "DPoint.h" #include "DPlane.h" diff --git a/contrib/bobtoolz/bobToolz-GTK.cpp b/contrib/bobtoolz/bobToolz-GTK.cpp index b41694e6..1948d64d 100644 --- a/contrib/bobtoolz/bobToolz-GTK.cpp +++ b/contrib/bobtoolz/bobToolz-GTK.cpp @@ -19,7 +19,6 @@ -#include "str.h" #include "qerplugin.h" #include "mathlib.h" #include "string/string.h" diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 5a7202f4..d8131ec3 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -20,9 +20,6 @@ #include "dialogs-gtk.h" #include "../funchandlers.h" -#include "str.h" -#include - #include "../lists.h" #include "../misc.h" diff --git a/contrib/bobtoolz/funchandlers-GTK.cpp b/contrib/bobtoolz/funchandlers-GTK.cpp index ae71086c..c58fc539 100644 --- a/contrib/bobtoolz/funchandlers-GTK.cpp +++ b/contrib/bobtoolz/funchandlers-GTK.cpp @@ -21,8 +21,7 @@ #include "dialogs/dialogs-gtk.h" -#include -#include "str.h" +#include "string/string.h" #include "DPoint.h" #include "DPlane.h" @@ -47,19 +46,16 @@ #include #include -#include #include #include "scenelib.h" // for autocaulk -std::list exclusionList; // whole brush exclusion -std::list exclusionList_Face; // single face exclusion +std::vector exclusionList; // whole brush exclusion +std::vector exclusionList_Face; // single face exclusion bool el1Loaded = false; bool el2Loaded = false; -bool clrLst1Loaded = false; -bool clrLst2Loaded = false; std::unique_ptr g_PathView; std::unique_ptr g_VisView; @@ -75,10 +71,10 @@ void LoadLists(){ char buffer[256]; if ( !el1Loaded ) { - el1Loaded = LoadExclusionList( GetFilename( buffer, "bt/bt-el1.txt" ), &exclusionList ); + el1Loaded = LoadExclusionList( GetFilename( buffer, "bt/bt-el1.txt" ), exclusionList ); } if ( !el2Loaded ) { - el2Loaded = LoadExclusionList( GetFilename( buffer, "bt/bt-el2.txt" ), &exclusionList_Face ); + el2Loaded = LoadExclusionList( GetFilename( buffer, "bt/bt-el2.txt" ), exclusionList_Face ); } } @@ -116,7 +112,7 @@ void DoIntersect(){ break; } } - world.RemoveNonCheckBrushes( &exclusionList ); + world.RemoveNonCheckBrushes( exclusionList ); bool* pbSelectList; if ( rs.bDuplicateOnly ) { diff --git a/contrib/bobtoolz/lists.cpp b/contrib/bobtoolz/lists.cpp index 4ab46710..10a205bb 100644 --- a/contrib/bobtoolz/lists.cpp +++ b/contrib/bobtoolz/lists.cpp @@ -21,17 +21,17 @@ #include "misc.h" -bool LoadExclusionList( char* filename, std::list* exclusionList ){ +bool LoadExclusionList( const char* filename, std::vector& exclusionList ){ FILE* eFile = fopen( filename, "r" ); if ( eFile ) { char buffer[256]; while ( !feof( eFile ) ) { - memset( buffer, 0, 256 ); + memset( buffer, 0, sizeof( buffer ) ); fscanf( eFile, "%s\n", buffer ); - if ( strlen( buffer ) > 0 ) { - exclusionList->push_back( buffer ); + if ( !string_empty( buffer ) ) { + exclusionList.push_back( buffer ); } } diff --git a/contrib/bobtoolz/lists.h b/contrib/bobtoolz/lists.h index 35da22ff..ada42415 100644 --- a/contrib/bobtoolz/lists.h +++ b/contrib/bobtoolz/lists.h @@ -19,9 +19,9 @@ #pragma once -#include -#include "str.h" +#include +#include "string/string.h" #include -bool LoadExclusionList( char* filename, std::list* exclusionList ); +bool LoadExclusionList( const char* filename, std::vector& exclusionList ); QStringList LoadListStore( char* filename ); diff --git a/contrib/bobtoolz/misc.cpp b/contrib/bobtoolz/misc.cpp index 25226d2a..7157ead1 100644 --- a/contrib/bobtoolz/misc.cpp +++ b/contrib/bobtoolz/misc.cpp @@ -19,9 +19,6 @@ #include "misc.h" -#include -#include "str.h" - #include "DPoint.h" #include "DPlane.h" #include "DBrush.h" @@ -42,8 +39,6 @@ #include "qerplugin.h" #include -#include -#include #include #include "scenelib.h" @@ -206,15 +201,15 @@ class EntityWriteMiniPrt { mutable DEntity world; FILE* pFile; - std::list* exclusionList; + const std::vector& exclusionList; public: - EntityWriteMiniPrt( FILE* pFile, std::list* exclusionList ) + EntityWriteMiniPrt( FILE* pFile, const std::vector& exclusionList ) : pFile( pFile ), exclusionList( exclusionList ){ } void operator()( scene::Instance& instance ) const { const char* classname = Node_getEntity( instance.path().top() )->getClassName(); - if ( !strcmp( classname, "worldspawn" ) ) { + if ( string_equal( classname, "worldspawn" ) ) { world.LoadFromEntity( instance.path().top() ); world.RemoveNonCheckBrushes( exclusionList ); world.SaveToFile( pFile ); @@ -228,7 +223,7 @@ public: } }; -void BuildMiniPrt( std::list* exclusionList ){ +void BuildMiniPrt( const std::vector& exclusionList ){ // yes, we could just use -fulldetail option, but, as SPOG said // it'd be faster without all the hint, donotenter etc textures and // doors, etc diff --git a/contrib/bobtoolz/misc.h b/contrib/bobtoolz/misc.h index dba390d2..b9f426b8 100644 --- a/contrib/bobtoolz/misc.h +++ b/contrib/bobtoolz/misc.h @@ -20,8 +20,8 @@ #pragma once #include "mathlib.h" -#include -#include "str.h" +#include +#include "string/string.h" #include "iscenegraph.h" #define MAX_ROUND_ERROR 0.05 @@ -34,7 +34,7 @@ const char* GetCurrentTexture(); class _QERFaceData; void FillDefaultTexture( _QERFaceData* faceData, vec3_t va, vec3_t vb, vec3_t vc, const char* texture ); -void BuildMiniPrt( std::list* exclusionList ); +void BuildMiniPrt( const std::vector& exclusionList ); void MoveBlock( int dir, vec3_t min, vec3_t max, float dist ); void SetInitialStairPos( int dir, vec3_t min, vec3_t max, float width ); diff --git a/contrib/bobtoolz/shapes.cpp b/contrib/bobtoolz/shapes.cpp index aa3be34e..955e0daa 100644 --- a/contrib/bobtoolz/shapes.cpp +++ b/contrib/bobtoolz/shapes.cpp @@ -20,12 +20,9 @@ #include "shapes.h" -#include - #include "DPoint.h" #include "DPlane.h" -#include "str.h" #include "misc.h" #include "funchandlers.h" @@ -36,9 +33,6 @@ #include "ipatch.h" #include "qerplugin.h" -#include -#include -#include #include #include diff --git a/contrib/bobtoolz/visfind.cpp b/contrib/bobtoolz/visfind.cpp index f61c0df3..2f635718 100644 --- a/contrib/bobtoolz/visfind.cpp +++ b/contrib/bobtoolz/visfind.cpp @@ -7,8 +7,6 @@ #include "bsploader.h" #include "DVisDrawer.h" -#include - typedef struct { int portalclusters; int leafbytes; //leafbytes = ((portalclusters+63)&~63)>>3;