2 BobToolz plugin for GtkRadiant
3 Copyright (C) 2001 Gordon Biggans
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "funchandlers.h"
25 #include "dialogs/dialogs-gtk.h"
27 // Radiant function table
28 _QERFuncTable_1 g_FuncTable;
29 _QERAppBSPFrontendTable g_BSPTable; // for map name
31 BOOL g_bBSPInitDone = FALSE;
34 static const char *PLUGIN_NAME = "ctfToolz";
36 // commands in the menu
37 static const char *PLUGIN_COMMANDS = "About...,Colour Changer...,Swap Light Colours,Change Angles 180,Swap Spawn Points";
40 GtkWidget *g_pRadiantWnd = NULL;
42 static const char *PLUGIN_ABOUT = "ctfToolz for NetRadiant\n"
44 "http://www.planetquake.com/toolz\n\n";
46 extern "C" LPVOID WINAPI
48 QERPlug_GetFuncTable()
53 extern "C" LPCSTR WINAPI
56 GtkWidget *pMainWidget
58 g_pRadiantWnd = pMainWidget;
60 0, sizeof( _QERFuncTable_1 ));
62 m_fVersion = QER_PLUG_VERSION;
64 m_nSize = sizeof(_QERFuncTable_1);
66 return "ctfToolz for GTKradiant";
69 extern "C" LPCSTR WINAPI
73 return (char *) PLUGIN_NAME;
76 extern "C" LPCSTR WINAPI
78 QERPlug_GetCommandList()
80 return (char *) PLUGIN_COMMANDS;
83 extern "C" void WINAPI
84 QERPlug_Dispatch( LPCSTR
92 if ( !g_bBSPInitDone ) {
94 m_nSize = sizeof(_QERAppBSPFrontendTable);
96 m_pfnRequestInterface( QERAppBSPFrontendTable_GUID,
98 <LPVOID>( &g_BSPTable )
100 g_bBSPInitDone = TRUE;
104 Sys_ERROR( "_QERAppBSPFrontendTable interface request failed\n" );
112 DoMessageBox( PLUGIN_ABOUT,
117 "Colour Changer..." )) {
118 DoCTFColourChanger();
123 "Swap Light Colours" )) {
129 "Change Angles 180" )) {
135 "Swap Spawn Points" )) {