Light KeyValues cleanup

This commit is contained in:
Kawe Mazidjatari 2022-05-28 02:24:57 +02:00
parent dbec823be6
commit c808aa077d
2 changed files with 4 additions and 32 deletions

View File

@ -64,41 +64,14 @@ const char* CKeyValuesSystem::GetStringForSymbol(HKeySymbol symbol)
return CallVFunc<const char*>(index, this, symbol);
}
//-----------------------------------------------------------------------------
// Purpose: frees a KeyValues object from the shared mempool
// Input : *pMem -
//-----------------------------------------------------------------------------
void CKeyValuesSystem::FreeKeyValuesMemory(CKeyValuesSystem* thisptr, void* pMem)
{
//__int64* v2; // rax
//__int64 v4; // rax
//__int64* v5; // rax
//v2 = qword_14D40B538;
//if (!qword_14D40B538)
//{
// v2 = sub_140462930();
// qword_14D40B538 = v2;
//}
//v4 = (*(*v2 + 48))(v2, pMem);
//if (v4 > 0)
// CKeyValuesSystem::m_pMemPool -= v4;
//v5 = qword_14D40B538;
//if (!qword_14D40B538)
//{
// v5 = sub_140462930();
// qword_14D40B538 = v5;
//}
//(*(*v5 + 40))(v5, pMem);
}
//-----------------------------------------------------------------------------
// Purpose: gets the global KeyValues memory pool
// Output : *g_pKeyValuesMemPool -
//-----------------------------------------------------------------------------
void* CKeyValuesSystem::GetMemPool(void) const
void* CKeyValuesSystem::GetMemPool(void)
{
return g_pKeyValuesMemPool; // May need to dereference this once more not sure right now.
static int index = 7;
return CallVFunc<void*>(index, this);
}
//-----------------------------------------------------------------------------

View File

@ -11,9 +11,8 @@ public:
void FreeKeyValuesMemory(void* pMem);
HKeySymbol GetSymbolForString(const char* name, bool bCreate);
const char* GetStringForSymbol(HKeySymbol symbol);
void __fastcall FreeKeyValuesMemory(CKeyValuesSystem* this_arg, void* ptr_mem_arg);
void* GetMemPool(void) const; // GetMemPool returns a global variable called m_pMemPool, it gets modified by AllocKeyValuesMemory and with FreeKeyValuesMemory you can see where to find it in FreeKeyValuesMemory.
void* GetMemPool(void); // GetMemPool returns a global variable called m_pMemPool, it gets modified by AllocKeyValuesMemory and with FreeKeyValuesMemory you can see where to find it in FreeKeyValuesMemory.
void SetKeyValuesExpressionSymbol(const char* name, bool bValue);
bool GetKeyValuesExpressionSymbol(const char* name);
HKeySymbol GetSymbolForStringCaseSensitive(HKeySymbol& hCaseInsensitiveSymbol, const char* name, bool bCreate);