From 3c1671f1615abf61c01effd998ec1c9afa8044ad Mon Sep 17 00:00:00 2001 From: spog Date: Sat, 13 May 2006 10:36:50 +0000 Subject: [PATCH] integrated bobtoolz patch from LordHavoc git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@62 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- CHANGES | 1 + contrib/bobtoolz/DTreePlanter.h | 2 +- contrib/bobtoolz/bobToolz-GTK.cpp | 6 +++--- contrib/bobtoolz/funchandlers-GTK.cpp | 2 +- contrib/bobtoolz/misc.cpp | 14 ++++++-------- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/CHANGES b/CHANGES index 333cf5e9..a59f9c80 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ LordHavoc - Removed static-linked libstdc++ hack for non-final builds. - Removed gcc explicit linking hack for non-final builds. - Added workaround for gcc static-member-pointer-as-template-argument bug. +- Fixed bobtoolz linux compile errors. 30/04/2006 SPoG diff --git a/contrib/bobtoolz/DTreePlanter.h b/contrib/bobtoolz/DTreePlanter.h index 7fceba3a..10421660 100644 --- a/contrib/bobtoolz/DTreePlanter.h +++ b/contrib/bobtoolz/DTreePlanter.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "string/string.h" #include "DEntity.h" -#include "scriptparser.h" +#include "ScriptParser.h" #include "mathlib.h" #include "misc.h" diff --git a/contrib/bobtoolz/bobToolz-GTK.cpp b/contrib/bobtoolz/bobToolz-GTK.cpp index c32a027b..26578e93 100644 --- a/contrib/bobtoolz/bobToolz-GTK.cpp +++ b/contrib/bobtoolz/bobToolz-GTK.cpp @@ -127,7 +127,7 @@ const char* QERPlug_GetCommandTitleList() #define NUM_TOOLBARBUTTONS 9 -unsigned int ToolbarButtonCount( void ) { +std::size_t ToolbarButtonCount( void ) { return NUM_TOOLBARBUTTONS; } @@ -209,7 +209,7 @@ public: CBobtoolzToolbarButton g_bobtoolzToolbarButtons[NUM_TOOLBARBUTTONS]; -const IToolbarButton* GetToolbarButton(unsigned int index) +const IToolbarButton* GetToolbarButton(std::size_t index) { g_bobtoolzToolbarButtons[index].mIndex = index; return &g_bobtoolzToolbarButtons[index]; @@ -325,4 +325,4 @@ extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer& server) g_BobToolzPluginModule.selfRegister(); g_BobToolzToolbarModule.selfRegister(); -} \ No newline at end of file +} diff --git a/contrib/bobtoolz/funchandlers-GTK.cpp b/contrib/bobtoolz/funchandlers-GTK.cpp index 577bdaf0..5d1f16a9 100644 --- a/contrib/bobtoolz/funchandlers-GTK.cpp +++ b/contrib/bobtoolz/funchandlers-GTK.cpp @@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "DTrainDrawer.h" #include "misc.h" -#include "scriptparser.h" +#include "ScriptParser.h" #include "DTreePlanter.h" #include "shapes.h" diff --git a/contrib/bobtoolz/misc.cpp b/contrib/bobtoolz/misc.cpp index cce40e14..027e123d 100644 --- a/contrib/bobtoolz/misc.cpp +++ b/contrib/bobtoolz/misc.cpp @@ -217,8 +217,6 @@ bool Q_Exec( const char *pCmd, bool bCreateConsole ) } #endif -#include - #ifdef WIN32 #include @@ -239,7 +237,7 @@ bool Q_Exec( const char *pCmd, bool bCreateConsole ) for(; *pCmd == ' '; pCmd++); - if(!CreateProcess(NULL, (char *)pCmd, NULL, NULL, FALSE, dwCreationFlags, NULL, NULL, &si, &pi)) + if(!CreateProcess(NULL, (char *)pCmd, NULL, NULL, false, dwCreationFlags, NULL, NULL, &si, &pi)) return false; return true; @@ -262,7 +260,7 @@ void StartBSP() char command[1024]; sprintf(command, "%s -nowater -fulldetail %s", exename, mapname); - Q_Exec( command, TRUE ); + Q_Exec( command, true ); } class EntityWriteMiniPrt @@ -281,8 +279,8 @@ public: if(!strcmp(classname, "worldspawn")) { - world.LoadFromEntity(instance.path().top(), FALSE); - world.RemoveNonCheckBrushes(exclusionList, TRUE); + world.LoadFromEntity(instance.path().top(), false); + world.RemoveNonCheckBrushes(exclusionList, true); world.SaveToFile(pFile); } else if(strstr(classname, "info_")) @@ -379,12 +377,12 @@ bool GetEntityCentre(const char* entity, vec3_t centre) { const scene::Path* ent = FindEntityFromTargetname(entity); if(!ent) - return FALSE; + return false; scene::Instance& instance = *GlobalSceneGraph().find(*ent); VectorCopy(instance.worldAABB().origin, centre); - return TRUE; + return true; } vec_t Min(vec_t a, vec_t b) -- 2.39.2