Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "libxml/parser.h"
-
#include "StdAfx.h"
-#include "str.h"
-//#include "gtkr_list.h"
-
#include "funchandlers.h"
-//#include "misc.h"
+#include "misc.h"
#include "dialogs/dialogs-gtk.h"
#include "../../libs/cmdlib.h"
// Radiant function table
-_QERFuncTable_1 __QERTABLENAME;
-_QERShadersTable __SHADERSTABLENAME; // vvvvvvvvvvvvvvvvvvvv
-_QERQglTable __QGLTABLENAME; // for path plotting (hooking to DBobView)
+_QERFuncTable_1 g_FuncTable;
+_QERAppDataTable g_AppDataTable;
+_QERBrushTable g_BrushTable;
+_QERShadersTable g_ShadersTable; // vvvvvvvvvvvvvvvvvvvv
+_QERSelectedFaceTable g_SelectedFaceTable; // to get texture sizes
+_QERQglTable g_QglTable; // for path plotting (hooking to DBobView)
_QERUITable g_MessageTable; // for path plotting (listening for update)
-_QEREntityTable __ENTITYTABLENAME;
-_QERBrushTable __BRUSHTABLENAME;
-_QERPatchTable __PATCHTABLENAME;
+_QEREntityTable g_EntityTable;
// plugin name
-char* PLUGIN_NAME = "bobToolz";
+const char* PLUGIN_NAME = "bobToolz";
// 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
GtkWidget *g_pRadiantWnd = NULL;
} else if( !stricmp(p, "reset textures...") ) {
DoResetTextures();
} else if( !stricmp(p, "pitomatic") ) {
- DoPitBuilder();
+ DoPitBuilder(vMin, vMax);
} else if( !stricmp(p, "vis viewer") ) {
DoVisAnalyse();
} else if( !stricmp(p, "about...") ) {
- DoMessageBox(PLUGIN_ABOUT, "About", eMB_OK);
+ DoMessageBox(PLUGIN_ABOUT, "About", IDOK);
}
}
GdkBitmap *mask;
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);
gdk_pixmap_unref (gdkpixmap);
gdk_pixmap_unref (mask);
return pixmap;
-}
+}
class CBobtoolzToolbarButton : public IToolbarButton
{
switch( mIndex ) {
case 3: return eToggleButton;
default: return eButton;
- }
+ }
}
virtual const char* getText() const
{
// =============================================================================
// SYNAPSE
-#include "synapse.h"
-
class CSynapseClientBobtoolz : public CSynapseClient
{
public:
// CSynapseClient API
bool RequestAPI(APIDescriptor_t *pAPI);
const char* GetInfo();
-
+
CSynapseClientBobtoolz() { }
virtual ~CSynapseClientBobtoolz() { }
};
CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientBobtoolz g_SynapseClient;
-extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer)
-{
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
if (strcmp(version, SYNAPSE_VERSION))
{
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);
g_pSynapseServer = pServer;
g_pSynapseServer->IncRef();
Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf());
-
+
g_SynapseClient.AddAPI(TOOLBAR_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPlugToolbarTable));
g_SynapseClient.AddAPI(PLUGIN_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPluginTable));
- g_SynapseClient.AddAPI(BRUSH_MAJOR, NULL, sizeof(__BRUSHTABLENAME), SYN_REQUIRE, &g_BrushTable);
- g_SynapseClient.AddAPI(PATCH_MAJOR, NULL, sizeof(__PATCHTABLENAME), SYN_REQUIRE, &g_BrushTable);
+ g_SynapseClient.AddAPI(DATA_MAJOR, NULL, sizeof(g_AppDataTable), SYN_REQUIRE, &g_AppDataTable);
+ g_SynapseClient.AddAPI(BRUSH_MAJOR, NULL, sizeof(g_BrushTable), SYN_REQUIRE, &g_BrushTable);
g_SynapseClient.AddAPI(SHADERS_MAJOR, "*", sizeof(g_ShadersTable), SYN_REQUIRE, &g_ShadersTable);
g_SynapseClient.AddAPI(ENTITY_MAJOR, NULL, sizeof(g_EntityTable), SYN_REQUIRE, &g_EntityTable);
g_SynapseClient.AddAPI(SELECTEDFACE_MAJOR, NULL, sizeof(g_SelectedFaceTable), SYN_REQUIRE, &g_SelectedFaceTable);
g_SynapseClient.AddAPI(UI_MAJOR, NULL, sizeof(g_MessageTable), SYN_REQUIRE, &g_MessageTable);
- g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(__QERTABLENAME), SYN_REQUIRE, &g_FuncTable);
+ g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(g_FuncTable), SYN_REQUIRE, &g_FuncTable);
g_SynapseClient.AddAPI(QGL_MAJOR, NULL, sizeof(g_QglTable), SYN_REQUIRE, &g_QglTable);
return &g_SynapseClient;
StripFilename( buffer );
strcat(buffer, "/");
strcat(buffer, filename);
- //buffer = UnixToDosPath(buffer);
+ buffer = UnixToDosPath(buffer);
return buffer;
}