Changeset 208
- Timestamp:
- 03/16/08 04:42:56 (4 months ago)
- Files:
-
- GtkRadiant/branches/ZeroRadiant/plugins/sample/plugin.cpp (modified) (6 diffs)
- GtkRadiant/branches/ZeroRadiant/radiant/filters.cpp (modified) (2 diffs)
- GtkRadiant/branches/ZeroRadiant/radiant/filters.h (modified) (1 diff)
- GtkRadiant/branches/ZeroRadiant/radiant/mainframe.cpp (modified) (1 diff)
- GtkRadiant/branches/ZeroRadiant/radiant/pluginmanager.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/branches/ZeroRadiant/plugins/sample/plugin.cpp
r206 r208 22 22 #include "plugin.h" 23 23 24 #define CMD_SEP "-" 24 #define CMD_SEP "-" 25 25 #define CMD_ABOUT "About..." 26 26 // ============================================================================= … … 61 61 } toolbar_button_info_t; 62 62 63 static const toolbar_button_info_t toolbar_buttons[NUM_TOOLBAR_BUTTONS] = 63 static const toolbar_button_info_t toolbar_buttons[NUM_TOOLBAR_BUTTONS] = 64 64 { 65 65 { 66 66 "sample.bmp", 67 67 "Sample", 68 "Sample image",68 "Sample image", 69 69 DoSample, 70 70 IToolbarButton::eToggleButton … … 147 147 #pragma GCC visibility push(default) 148 148 #endif 149 extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) 149 extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) 150 150 { 151 151 #if __GNUC__ >= 4 … … 162 162 g_SynapseClient.AddAPI(TOOLBAR_MAJOR, SAMPLE_MINOR, sizeof(_QERPlugToolbarTable)); 163 163 g_SynapseClient.AddAPI(PLUGIN_MAJOR, SAMPLE_MINOR, sizeof(_QERPluginTable)); 164 164 165 165 g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(g_FuncTable), SYN_REQUIRE, &g_FuncTable); 166 166 g_SynapseClient.AddAPI(QGL_MAJOR, NULL, sizeof(g_QglTable), SYN_REQUIRE, &g_QglTable); … … 178 178 if (!strcmp(pAPI->major_name, PLUGIN_MAJOR)) { 179 179 _QERPluginTable* pTable= static_cast<_QERPluginTable*>(pAPI->mpTable); 180 180 181 181 pTable->m_pfnQERPlug_Init = QERPlug_Init; 182 182 pTable->m_pfnQERPlug_GetName = QERPlug_GetName; … … 186 186 } else if (!strcmp(pAPI->major_name, TOOLBAR_MAJOR)) { 187 187 _QERPlugToolbarTable* pTable= static_cast<_QERPlugToolbarTable*>(pAPI->mpTable); 188 188 189 189 pTable->m_pfnToolbarButtonCount = &ToolbarButtonCount; 190 190 pTable->m_pfnGetToolbarButton = &GetToolbarButton; 191 191 return true; 192 192 } 193 193 194 194 Syn_Printf("ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo()); 195 195 return false; GtkRadiant/branches/ZeroRadiant/radiant/filters.cpp
r197 r208 31 31 #include "stdafx.h" 32 32 33 // type 1 = texture filter (name) 34 // type 3 = entity filter (name) 35 // type 2 = QER_* shader flags 36 // type 4 = entity classes 33 37 bfilter_t *FilterAdd(bfilter_t *pFilter, int type, int bmask, char *str, int exclude) 34 38 { … … 43 47 pNew->active = false; 44 48 return pNew; 49 } 50 51 bfilter_t *FilterCreate (int type, int bmask, char *str, int exclude) 52 { 53 g_qeglobals.d_savedinfo.filters = FilterAdd(g_qeglobals.d_savedinfo.filters, type, bmask, str, exclude); 54 Syn_Printf("Added filter %s (type: %i, bmask: %i, exclude: %i)\n", str, type, bmask, exclude); 55 return g_qeglobals.d_savedinfo.filters; 56 } 57 58 extern void PerformFiltering(); 59 60 void FiltersActivate (void) 61 { 62 PerformFiltering(); 63 Sys_UpdateWindows(W_XY|W_CAMERA); 45 64 } 46 65 GtkRadiant/branches/ZeroRadiant/radiant/filters.h
r183 r208 23 23 #define _FILTERS_H_ 24 24 25 void FiltersActivate(void); 26 bfilter_t *FilterCreate(int type, int bmask, char *str, int exclude); 25 27 bfilter_t *FilterAdd(bfilter_t *pFilter, int type, int bmask, char *str, int exclude); 26 28 bfilter_t *FilterListDelete(bfilter_t *pFilter); GtkRadiant/branches/ZeroRadiant/radiant/mainframe.cpp
r200 r208 7475 7475 brush_t *brush; 7476 7476 7477 // mattn - this should be removed - otherwise the filters from the 7478 // plugins are wiped away with each update 7479 #if 1 7477 7480 // spog - deletes old filters list and creates new one when 7478 7481 // g_qeglobals.d_savedinfo.exclude is updated 7479 7482 g_qeglobals.d_savedinfo.filters = FilterListDelete(g_qeglobals.d_savedinfo.filters); 7480 7483 g_qeglobals.d_savedinfo.filters = FilterUpdate(g_qeglobals.d_savedinfo.filters); 7484 #endif 7481 7485 7482 7486 for ( brush = active_brushes.next; brush != &active_brushes; brush = brush->next ) GtkRadiant/branches/ZeroRadiant/radiant/pluginmanager.cpp
r185 r208 44 44 #include "plugin.h" 45 45 #include "missing.h" 46 #include "filters.h" 46 47 47 48 #include "version.h" … … 2229 2230 pTable->m_pfnReadProjectKey = &QERApp_ReadProjectKey; 2230 2231 pTable->m_pfnGetMapName = &QERApp_GetMapName; 2232 pTable->m_pfnFilterAdd = &FilterCreate; 2233 pTable->m_pfnFiltersActivate = &FiltersActivate; 2231 2234 2232 2235 return true;
