Data Structures |
|
struct | RwFileFunctions |
struct | RwMemoryFunctions |
Defines |
|
#define | RwMalloc(_s) ((RWSRCGLOBAL(memoryFuncs).rwmalloc)((_s))) |
#define | RwFree(_p) ((RWSRCGLOBAL(memoryFuncs).rwfree)((_p))) |
#define | RwCalloc(_n, _s) ((RWSRCGLOBAL(memoryFuncs).rwcalloc)((_n), (_s))) |
#define | RwRealloc(_p, _s) ((RWSRCGLOBAL(memoryFuncs).rwrealloc)((_p),(_s))) |
Functions |
|
RwFileFunctions * | RwOsGetFileInterface (void) |
RwMemoryFunctions * | RwOsGetMemoryInterface (void) |
This object exposes the file and memory interfaces to the application.
RenderWare maintains tables of file I/O and memory handling functions. The prototypes are based on standard ANSI functionality. Developers are allowed to change individual entries in these tables so that they can provide their own functions.
Extreme care should be taken with these functions as memory leaks or data corruption may occur if this feature is misused. RwEngineInit() can be used instead of these functions if you only need to change the functions once, when your application starts.
|
RwCalloc(_n, _s) is a macro for calloc(_n, _s). |
|
RwFree(_p) is a macro for free(_p). |
|
RwMalloc(_s) is a macro for malloc(_s). |
|
RwRealloc(_p, _s) is a macro for realloc(_p, _s). |
|
RwOsGetFileInterface is used to retrieve the file system functions used by RenderWare. The default file system interface is installed when the rendering engine is initialized and uses the standard ANSI functions if implemented. The application may install an alternative file system interface providing it complies with the ANSI interface. This new interface will be used by all subsequent RenderWare file operations. See RwFileFunctions for details of the file interface.
|
|
RwOsGetMemoryInterface is used to retrieve the memory functions used by RenderWare. By default the standard ANSI functions are used. The application may install an alternative interface providing that it is ANSI compliant. If an application wishes to completely overload the memory interface then this can be achieved via the RwEngineInit API function which guarantees that the overload takes place before any memory allocation. The memory function pointers should not be manipulated directly. Note that since RenderWare allocates and frees memory in an asynchronous fashion it is not possible to install a completely different memory handler once the library has been initialized. It is, however, possible to install a daisy chained handler that gathers statistics before calling the default. See the section RenderWare Data Types for details of the memory interface.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |