diff --git a/examples/common/bgfx_utils.cpp b/examples/common/bgfx_utils.cpp index f9116d1d1..3e32d7a82 100644 --- a/examples/common/bgfx_utils.cpp +++ b/examples/common/bgfx_utils.cpp @@ -39,7 +39,7 @@ void* load(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const bx::FileP } else { - DBG("Failed to open: %s.", _filePath); + DBG("Failed to open: %s.", _filePath.getCPtr() ); } if (NULL != _size) @@ -72,7 +72,7 @@ static const bgfx::Memory* loadMem(bx::FileReaderI* _reader, const bx::FilePath& return mem; } - DBG("Failed to load %s.", _filePath); + DBG("Failed to load %s.", _filePath.getCPtr() ); return NULL; } @@ -92,7 +92,7 @@ static void* loadMem(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const return data; } - DBG("Failed to load %s.", _filePath); + DBG("Failed to load %s.", _filePath.getCPtr() ); return NULL; } diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index da932cb71..231730594 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -566,8 +566,22 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); // warning: 'int re BX_PRAGMA_DIAGNOSTIC_PUSH(); BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunknown-pragmas") BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wtype-limits"); // warning: comparison is always true due to limited range of data type -#define STBTT_malloc(_size, _userData) memAlloc(_size, _userData) -#define STBTT_free(_ptr, _userData) memFree(_ptr, _userData) + +#define STBTT_ifloor(_a) int32_t(bx::floor(_a) ) +#define STBTT_iceil(_a) int32_t(bx::ceil(_a) ) +#define STBTT_sqrt(_a) bx::sqrt(_a) +#define STBTT_pow(_a, _b) bx::pow(_a, _b) +#define STBTT_fmod(_a, _b) bx::mod(_a, _b) +#define STBTT_cos(_a) bx::cos(_a) +#define STBTT_acos(_a) bx::acos(_a) +#define STBTT_fabs(_a) bx::abs(_a) +#define STBTT_strlen(_str) bx::strLen(_str) + +#define STBTT_memcpy(_dst, _src, _numBytes) bx::memCopy(_dst, _src, _numBytes) +#define STBTT_memset(_dst, _ch, _numBytes) bx::memSet(_dst, _ch, _numBytes) +#define STBTT_malloc(_size, _userData) memAlloc(_size, _userData) +#define STBTT_free(_ptr, _userData) memFree(_ptr, _userData) + #define STB_RECT_PACK_IMPLEMENTATION #include #define STB_TRUETYPE_IMPLEMENTATION