mirror of
https://github.com/Ed94/VEFontCache-Odin.git
synced 2025-08-06 06:52:44 -07:00
using zpl for stb_truetype allocation extension instead of gb.h (trying to gamble a build with mac)
This commit is contained in:
10827
thirdparty/stb/src/gb/gb.h
vendored
10827
thirdparty/stb/src/gb/gb.h
vendored
File diff suppressed because it is too large
Load Diff
14
thirdparty/stb/src/stb_truetype.h
vendored
14
thirdparty/stb/src/stb_truetype.h
vendored
@@ -415,9 +415,9 @@ int main(int arg, char **argv)
|
||||
#pragma region ODIN: CUSTOM ALLOCATOR
|
||||
|
||||
#ifdef STB_TRUETYPE_IMPLEMENTATION
|
||||
#define GB_IMPLEMENTATION
|
||||
#define ZPL_IMPLEMENTATION
|
||||
#endif
|
||||
#include "gb/gb.h"
|
||||
#include "zpl/zpl.h"
|
||||
|
||||
#ifdef STBTT_STATIC
|
||||
#define STBTT_DEF static
|
||||
@@ -429,21 +429,21 @@ int main(int arg, char **argv)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
STBTT_DEF void stbtt_SetAllocator( gbAllocator allocator );
|
||||
STBTT_DEF void stbtt_SetAllocator( zpl_allocator allocator );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef STBTT_malloc
|
||||
#define STBTT_malloc(x,u) ((void)(u), gb_alloc(stbtt__allocator, x))
|
||||
#define STBTT_free(x,u) ((void)(u), gb_free(stbtt__allocator, x))
|
||||
#define STBTT_malloc(x,u) ((void)(u), zpl_alloc(stbtt__allocator, x))
|
||||
#define STBTT_free(x,u) ((void)(u), zpl_free(stbtt__allocator, x))
|
||||
#endif
|
||||
|
||||
#ifdef STB_TRUETYPE_IMPLEMENTATION
|
||||
gb_global gbAllocator stbtt__allocator = { gb_heap_allocator_proc, NULL };
|
||||
zpl_global zpl_allocator stbtt__allocator = { zpl_heap_allocator_proc, NULL };
|
||||
|
||||
STBTT_DEF void stbtt_SetAllocator( gbAllocator allocator ) {
|
||||
STBTT_DEF void stbtt_SetAllocator( zpl_allocator allocator ) {
|
||||
stbtt__allocator = allocator;
|
||||
}
|
||||
#endif
|
||||
|
19055
thirdparty/stb/src/zpl/zpl.h
vendored
Normal file
19055
thirdparty/stb/src/zpl/zpl.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user