mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
The KeyValues class belongs here. Also reimplemented most loading methods for KeyValues, and adjusted the VPK building code to account for it. Pointers to the engine's implementation of KeyValues have been moved to a separate header ('keyvalues_iface.h'), as this allows external tools code to utilize the standalone KeyValues class implementation. Playlist utilities are completely separated from the KeyValues header; these have nothing to do with KeyValues other than manipulating a global KeyValues object for the playlists, and thus have been named as such and moved to rtech/playlists.
22 lines
833 B
C++
22 lines
833 B
C++
#include "tier1/keyvalues_iface.h"
|
|
#include "filesystem/filesystem.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: reads a keyvalues file
|
|
// Input : *pFileSystem -
|
|
// * pFileName -
|
|
// Output : pointer to KeyValues object
|
|
//-----------------------------------------------------------------------------
|
|
static KeyValues* ReadKeyValuesFile(CFileSystem_Stdio* pFileSystem, const char* pFileName)
|
|
{
|
|
return KeyValues__ReadKeyValuesFile(pFileSystem, pFileName);
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
void VKeyValues::Detour(const bool bAttach) const
|
|
{
|
|
DetourSetup(&KeyValues__ReadKeyValuesFile, &ReadKeyValuesFile, bAttach);
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
std::mutex g_InstalledMapsMutex; |