no engine anymore

This commit is contained in:
2025-07-30 23:53:26 +03:00
parent 8a29e6b86f
commit 395ced9e28
159 changed files with 2767 additions and 9484 deletions

View File

@@ -1,5 +1,6 @@
#include "tier0/mem.h"
#include "stdlib.h"
#include "tier0/platform.h"
//-----------------------------------------------------------------------------
// These functions copy over libc memory functions
@@ -7,7 +8,10 @@
void* V_malloc(int nSize)
{
return malloc(nSize);
void *pMemory = malloc(nSize);
if (!pMemory)
Plat_FatalErrorFunc("Failed to allocate memory");
return pMemory;
}
void V_free(void *pMem)
@@ -19,3 +23,18 @@ void* V_realloc(void *pMem, int nSize)
{
return realloc(pMem, nSize);
}
void *operator new( size_t nCount )
{
return V_malloc(nCount);
}
void *operator new ( size_t nCount, void *pPtr )
{
return pPtr;
}
void operator delete( void *pMem ) noexcept
{
return V_free(pMem);
}