refactored plugin api; refactored callback library; added signals library

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@44 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
spog
2006-04-09 17:15:13 +00:00
parent ba55f1bbf6
commit 6ee91d153e
127 changed files with 3723 additions and 2092 deletions

View File

@@ -93,11 +93,33 @@ const char* GameDescription_getRequiredKeyValue(const char* key)
return g_pGameDescription->getRequiredKeyValue(key);
}
const char* mapname_get()
const char* getMapName()
{
return Map_Name(g_map);
}
scene::Node& getMapWorldEntity()
{
return Map_FindOrInsertWorldspawn(g_map);
}
VIEWTYPE XYWindow_getViewType()
{
return g_pParentWnd->GetXYWnd()->GetViewType();
}
Vector3 XYWindow_windowToWorld(const WindowVector& position)
{
Vector3 result(0, 0, 0);
g_pParentWnd->GetXYWnd()->XY_ToPoint(static_cast<int>(position.x()), static_cast<int>(position.y()), result);
return result;
}
const char* TextureBrowser_getSelectedShader()
{
return TextureBrowser_GetSelectedShader(GlobalTextureBrowser());
}
class RadiantCoreAPI
{
_QERFuncTable_1 m_radiantcore;
@@ -115,7 +137,9 @@ public:
m_radiantcore.getGameName = &gamename_get;
m_radiantcore.getGameMode = &gamemode_get;
m_radiantcore.getMapName = &mapname_get;
m_radiantcore.getMapName = &getMapName;
m_radiantcore.getMapWorldEntity = getMapWorldEntity;
m_radiantcore.getGridSize = GetGridSize;
m_radiantcore.getGameDescriptionKeyValue = &GameDescription_getKeyValue;
m_radiantcore.getRequiredGameDescriptionKeyValue = &GameDescription_getRequiredKeyValue;
@@ -129,6 +153,12 @@ public:
m_radiantcore.attachGameModeObserver = Radiant_attachGameModeObserver;
m_radiantcore.detachGameModeObserver = Radiant_detachGameModeObserver;
m_radiantcore.XYWindowMouseDown_connect = XYWindowMouseDown_connect;
m_radiantcore.XYWindowMouseDown_disconnect = XYWindowMouseDown_disconnect;
m_radiantcore.XYWindow_getViewType = XYWindow_getViewType;
m_radiantcore.XYWindow_windowToWorld = XYWindow_windowToWorld;
m_radiantcore.TextureBrowser_getSelectedShader = TextureBrowser_getSelectedShader;
m_radiantcore.m_pfnMessageBox = &gtk_MessageBox;
m_radiantcore.m_pfnFileDialog = &file_dialog;
m_radiantcore.m_pfnColorDialog = &color_dialog;