mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Cleanup to idTech2 surface inspector.
This commit is contained in:
parent
99e8ea8cf2
commit
7d092b3417
2 changed files with 27 additions and 35 deletions
|
@ -34,22 +34,6 @@
|
||||||
|
|
||||||
#include "synapse.h"
|
#include "synapse.h"
|
||||||
|
|
||||||
class CSynapseClient_SurfDLG : public CSynapseClient
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
// CSynapseClient API
|
|
||||||
bool RequestAPI( APIDescriptor_t *pAPI );
|
|
||||||
const char* GetInfo();
|
|
||||||
const char* GetName();
|
|
||||||
bool OnActivate();
|
|
||||||
|
|
||||||
CSynapseClient_SurfDLG() { }
|
|
||||||
virtual ~CSynapseClient_SurfDLG() { }
|
|
||||||
};
|
|
||||||
|
|
||||||
// =============================================================================
|
|
||||||
// SYNAPSE
|
|
||||||
|
|
||||||
_QERFuncTable_1 g_FuncTable;
|
_QERFuncTable_1 g_FuncTable;
|
||||||
_QERUndoTable g_UndoTable;
|
_QERUndoTable g_UndoTable;
|
||||||
_QERAppSurfaceTable g_AppSurfaceTable;
|
_QERAppSurfaceTable g_AppSurfaceTable;
|
||||||
|
@ -58,6 +42,17 @@ _QERShadersTable g_ShadersTable;
|
||||||
_QERAppShadersTable g_AppShadersTable;
|
_QERAppShadersTable g_AppShadersTable;
|
||||||
_QERAppDataTable g_AppDataTable;
|
_QERAppDataTable g_AppDataTable;
|
||||||
|
|
||||||
|
class CSynapseClient_SurfDLG : public CSynapseClient
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// CSynapseClient API
|
||||||
|
bool RequestAPI( APIDescriptor_t *pAPI );
|
||||||
|
const char* GetInfo();
|
||||||
|
|
||||||
|
CSynapseClient_SurfDLG() { }
|
||||||
|
virtual ~CSynapseClient_SurfDLG() { }
|
||||||
|
};
|
||||||
|
|
||||||
CSynapseServer* g_pSynapseServer = NULL;
|
CSynapseServer* g_pSynapseServer = NULL;
|
||||||
CSynapseClient_SurfDLG g_SynapseClient;
|
CSynapseClient_SurfDLG g_SynapseClient;
|
||||||
|
|
||||||
|
@ -76,27 +71,29 @@ extern "C" CSynapseClient * SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( cons
|
||||||
g_pSynapseServer->IncRef();
|
g_pSynapseServer->IncRef();
|
||||||
Set_Syn_Printf( g_pSynapseServer->Get_Syn_Printf() );
|
Set_Syn_Printf( g_pSynapseServer->Get_Syn_Printf() );
|
||||||
|
|
||||||
g_SynapseClient.AddAPI( SURFACEDIALOG_MAJOR, "idtech2", sizeof( _QERPlugSurfaceTable ) );
|
g_SynapseClient.AddAPI( SURFACEDIALOG_MAJOR, SURFACEDIALOG_MINOR, sizeof( _QERPlugSurfaceTable ) );
|
||||||
|
|
||||||
g_SynapseClient.AddAPI( RADIANT_MAJOR, NULL, sizeof( _QERFuncTable_1 ), SYN_REQUIRE, &g_FuncTable );
|
g_SynapseClient.AddAPI( RADIANT_MAJOR, NULL, sizeof( _QERFuncTable_1 ), SYN_REQUIRE, &g_FuncTable );
|
||||||
g_SynapseClient.AddAPI( UNDO_MAJOR, NULL, sizeof( _QERUndoTable ), SYN_REQUIRE, &g_UndoTable );
|
g_SynapseClient.AddAPI( UNDO_MAJOR, NULL, sizeof( _QERUndoTable ), SYN_REQUIRE, &g_UndoTable );
|
||||||
g_SynapseClient.AddAPI( APPSURFACEDIALOG_MAJOR, NULL, sizeof( _QERAppSurfaceTable ), SYN_REQUIRE, &g_AppSurfaceTable );
|
g_SynapseClient.AddAPI( APPSURFACEDIALOG_MAJOR, NULL, sizeof( _QERAppSurfaceTable ), SYN_REQUIRE, &g_AppSurfaceTable );
|
||||||
g_SynapseClient.AddAPI( SELECTEDFACE_MAJOR, NULL, sizeof( _QERSelectedFaceTable ), SYN_REQUIRE, &g_SelectedFaceTable );
|
g_SynapseClient.AddAPI( SELECTEDFACE_MAJOR, NULL, sizeof( _QERSelectedFaceTable ), SYN_REQUIRE, &g_SelectedFaceTable );
|
||||||
g_SynapseClient.AddAPI( SHADERS_MAJOR, "idtech2", sizeof( _QERShadersTable ), SYN_REQUIRE, &g_ShadersTable );
|
g_SynapseClient.AddAPI( SHADERS_MAJOR, SHADERS_MINOR, sizeof( _QERShadersTable ), SYN_REQUIRE, &g_ShadersTable );
|
||||||
g_SynapseClient.AddAPI( APPSHADERS_MAJOR, NULL, sizeof( _QERAppShadersTable ), SYN_REQUIRE, &g_AppShadersTable );
|
g_SynapseClient.AddAPI( APPSHADERS_MAJOR, NULL, sizeof( _QERAppShadersTable ), SYN_REQUIRE, &g_AppShadersTable );
|
||||||
g_SynapseClient.AddAPI( DATA_MAJOR, NULL, sizeof( _QERAppDataTable ), SYN_REQUIRE, &g_AppDataTable );
|
g_SynapseClient.AddAPI( DATA_MAJOR, NULL, sizeof( _QERAppDataTable ), SYN_REQUIRE, &g_AppDataTable );
|
||||||
|
|
||||||
return &g_SynapseClient;
|
return &g_SynapseClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSynapseClient_SurfDLG::RequestAPI( APIDescriptor_t *pAPI ){
|
bool CSynapseClient_SurfDLG::RequestAPI( APIDescriptor_t *pAPI ) {
|
||||||
|
|
||||||
if ( !strcmp( pAPI->major_name, SURFACEDIALOG_MAJOR ) ) {
|
if ( !strcmp( pAPI->major_name, SURFACEDIALOG_MAJOR ) ) {
|
||||||
_QERPlugSurfaceTable* pSurfDialogTable = static_cast<_QERPlugSurfaceTable*>( pAPI->mpTable );
|
if ( !strcmp( pAPI->minor_name, SURFACEDIALOG_MINOR ) ) {
|
||||||
if ( !strcmp( pAPI->minor_name, "idtech2" ) ) {
|
_QERPlugSurfaceTable* pSurfaceTable = static_cast<_QERPlugSurfaceTable*>( pAPI->mpTable );
|
||||||
pSurfDialogTable->m_pfnToggleSurface = &ToggleSurface;
|
pSurfaceTable->m_pfnToggleSurface = &ToggleSurface;
|
||||||
pSurfDialogTable->m_pfnDoSurface = &DoSurface;
|
pSurfaceTable->m_pfnDoSurface = &DoSurface;
|
||||||
pSurfDialogTable->m_pfnUpdateSurfaceDialog = &UpdateSurfaceDialog;
|
pSurfaceTable->m_pfnUpdateSurfaceDialog = &UpdateSurfaceDialog;
|
||||||
pSurfDialogTable->m_pfnSurfaceDlgFitAll = &SurfaceDlgFitAll;
|
pSurfaceTable->m_pfnSurfaceDlgFitAll = &SurfaceDlgFitAll;
|
||||||
pSurfDialogTable->m_pfnGet_SI_Module_Widget = &Get_SI_Module_Widget;
|
pSurfaceTable->m_pfnGet_SI_Module_Widget = &Get_SI_Module_Widget;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,14 +104,6 @@ bool CSynapseClient_SurfDLG::RequestAPI( APIDescriptor_t *pAPI ){
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
const char* CSynapseClient_SurfDLG::GetInfo(){
|
const char *CSynapseClient_SurfDLG::GetInfo(){
|
||||||
return "Surface Dialog (idTech2) module built " __DATE__ " " RADIANT_VERSION;
|
return "Surface Dialog (idTech2) module built " __DATE__ " " RADIANT_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* CSynapseClient_SurfDLG::GetName(){
|
|
||||||
return "surface";
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CSynapseClient_SurfDLG::OnActivate(){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
|
@ -50,6 +50,9 @@ typedef char* LPCSTR;
|
||||||
|
|
||||||
#include "isurfaceplugin.h"
|
#include "isurfaceplugin.h"
|
||||||
|
|
||||||
|
#define SURFACEDIALOG_MINOR "idtech2"
|
||||||
|
#define SHADERS_MINOR "idtech2"
|
||||||
|
|
||||||
class SurfaceDialog : public IPluginTexdef
|
class SurfaceDialog : public IPluginTexdef
|
||||||
{
|
{
|
||||||
int refCount;
|
int refCount;
|
||||||
|
|
Loading…
Reference in a new issue