Archival snapshot of the Virtual World Entertainment Tesla cockpit software, 1994-1996: MUNGA engine and L4 pod layer source (Borland C++ 5.0), BT/RP game code, and game content (models, audio, maps, gauges, Division renderer data). Includes third-party libraries: Division dVS/DPL graphics, HMI SOS audio, WATTCP networking. Files are preserved byte-for-byte (.gitattributes disables all line-ending conversion). README.md documents the layout, target hardware, and toolchain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
46 lines
908 B
C++
46 lines
908 B
C++
/*
|
|
This block of code is expected to override the memory allocater in the DPL library
|
|
*/
|
|
#include <mungal4.hpp>
|
|
#pragma hdrstop
|
|
|
|
#if !defined(L4VIDEO_HPP)
|
|
# include <l4video.hpp>
|
|
#endif
|
|
|
|
extern "C"
|
|
{
|
|
void
|
|
*dpl_malloc ( int n_bytes ),
|
|
*dpl_calloc ( size_t n, size_t n_bytes ),
|
|
dpl_free ( void *ptr ),
|
|
dpl_free_all ( void );
|
|
};
|
|
|
|
void *dpl_malloc ( int n_bytes )
|
|
{
|
|
Check_Pointer(DPLRenderer::DPLHeap);
|
|
return DPLRenderer::DPLHeap->Allocate(n_bytes);
|
|
}
|
|
|
|
void *dpl_calloc ( size_t n, size_t n_bytes )
|
|
{
|
|
Check_Pointer(DPLRenderer::DPLHeap);
|
|
void *p = DPLRenderer::DPLHeap->Allocate(n * n_bytes);
|
|
memset ( p, 0x0, n_bytes*n );
|
|
return p;
|
|
}
|
|
|
|
void dpl_free ( void *ptr )
|
|
{
|
|
Check_Pointer(DPLRenderer::DPLHeap);
|
|
DPLRenderer::DPLHeap->Release(ptr);
|
|
}
|
|
|
|
void dpl_free_all ( void )
|
|
{
|
|
Check_Pointer(DPLRenderer::DPLHeap);
|
|
DPLRenderer::DPLHeap->ReleaseAll();
|
|
}
|
|
|