Allow loading RSON files by path ID

This commit is contained in:
Kawe Mazidjatari 2023-07-08 22:45:35 +02:00
parent 4f806ee2ba
commit a90302f09f
2 changed files with 3 additions and 3 deletions

View File

@ -9,9 +9,9 @@ RSON::Node_t* RSON::LoadFromBuffer(const char* pszBufferName, char* pBuffer, RSO
return RSON_LoadFromBuffer(pszBufferName, pBuffer, rootType, 0, NULL);
}
RSON::Node_t* RSON::LoadFromFile(const char* pszFilePath)
RSON::Node_t* RSON::LoadFromFile(const char* pszFilePath, const char* pPathID)
{
if (FileSystem()->FileExists(pszFilePath, "GAME"))
if (FileSystem()->FileExists(pszFilePath, pPathID))
{
FileHandle_t file = FileSystem()->Open(pszFilePath, "rt");

View File

@ -81,7 +81,7 @@ public:
public:
static Node_t* LoadFromBuffer(const char* pszBufferName, char* pBuffer, eFieldType rootType);
static Node_t* LoadFromFile(const char* pszFilePath);
static Node_t* LoadFromFile(const char* pszFilePath, const char* pPathID = nullptr);
};
///////////////////////////////////////////////////////////////////////////////
inline CMemory p_RSON_LoadFromBuffer;