some work on fpc

This commit is contained in:
2025-12-30 22:13:01 +02:00
parent 842eeabbde
commit 773a541199
27 changed files with 298 additions and 101 deletions

View File

@@ -2,6 +2,9 @@
#include "helper.h"
static BuildFileInfo_t buildfileinfo = {};
CBuildStage *g_pCurrentStage = NULL;
GetProjectObjectFn g_pfnGetProjectObject = NULL;
BuildFileInfo_t *GetBuildFileInfo()
{
return &buildfileinfo;
@@ -12,6 +15,7 @@ CBuildStage::CBuildStage( const char *psz, int(*pMainFn)() )
{
m_psz = psz;
m_pMainFn = pMainFn;
printf("%p\n",m_pMainFn);
if (psz == 0 || pMainFn == 0)
Plat_FatalErrorFunc("Name and function pointer must be set\n");
@@ -20,7 +24,19 @@ CBuildStage::CBuildStage( const char *psz, int(*pMainFn)() )
CBuildDependentFile::CBuildDependentFile( const char *psz )
{
// TODO: This doesn't affect recursion, which is bad
GetBuildFileInfo()->m_dependantFiles.AppendTail(psz);
}
EXPOSE_INTERFACE_GLOBALVAR(BuildFileInfo_t, BuildFileInfo_t, BUILD_FILE_INFO_INTERFACE_NAME, buildfileinfo);
CUtlString FPC_GetProjectObject( const char *szName, const char *szObjectName )
{
CUtlString szOutputString;
szOutputString = g_pfnGetProjectObject(szName, szObjectName);
return szOutputString;
}
EXPOSE_INTERFACE_GLOBALVAR(BuildFileInfo_t, BuildFileInfo_t, BUILD_FILE_INFO_INTERFACE_VERSION, buildfileinfo);
EXPOSE_INTERFACE_GLOBALVAR(CBuildStage, CBuildStage, BUILD_CURRENT_STAGE_INTERFACE_VERSION, g_pCurrentStage);
EXPOSE_INTERFACE_GLOBALVAR(GetProjectObjectFn, GetProjectObjectFn, BUILD_GET_PROJECT_OBJECT_INTERFACE_VERSION, g_pfnGetProjectObject);