diff options
| author | victorfisac <[email protected]> | 2017-03-30 02:46:19 +0200 |
|---|---|---|
| committer | victorfisac <[email protected]> | 2017-03-30 02:46:19 +0200 |
| commit | 0d06c946f2a6b7ce0eb374159333872392a707d9 (patch) | |
| tree | ac7321f9ef1d4ea8221aa01089e660ff477e2326 /src/utils.c | |
| parent | b2f0c7ca8b8e9484560a45c4547794fa62cf484f (diff) | |
| parent | 954a24545ffd65f55893bf02c3c8d530a03f099a (diff) | |
| download | raylib-0d06c946f2a6b7ce0eb374159333872392a707d9.tar.gz raylib-0d06c946f2a6b7ce0eb374159333872392a707d9.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/utils.c')
| -rw-r--r-- | src/utils.c | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/src/utils.c b/src/utils.c index 4d30cbc7..649fda4f 100644 --- a/src/utils.c +++ b/src/utils.c @@ -20,7 +20,7 @@ * Show TraceLog() DEBUG messages * * DEPENDENCIES: -* stb_image_write - PNG writting functions +* stb_image_write - BMP/PNG writting functions * * * LICENSE: zlib/libpng @@ -88,14 +88,15 @@ static int android_close(void *cookie); //---------------------------------------------------------------------------------- // Module Functions Definition - Utilities //---------------------------------------------------------------------------------- -// Outputs a trace log message + +// Output trace log messages void TraceLog(int msgType, const char *text, ...) { -#if !defined(NO_TRACELOG) +#if defined(SUPPORT_TRACELOG) static char buffer[128]; int traceDebugMsgs = 1; -#ifdef DO_NOT_TRACE_DEBUG_MSGS +#if defined(SUPPORT_TRACELOG_DEBUG) traceDebugMsgs = 0; #endif @@ -131,7 +132,7 @@ void TraceLog(int msgType, const char *text, ...) if (msgType == ERROR) exit(1); // If ERROR message, exit program -#endif // NO_TRACELOG +#endif // SUPPORT_TRACELOG } #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) @@ -153,6 +154,16 @@ void SavePNG(const char *fileName, unsigned char *imgData, int width, int height #endif #endif +// Keep track of memory allocated +// NOTE: mallocType defines the type of data allocated +/* +void RecordMalloc(int mallocType, int mallocSize, const char *msg) +{ + // TODO: Investigate how to record memory allocation data... + // Maybe creating my own malloc function... +} +*/ + #if defined(PLATFORM_ANDROID) // Initialize asset manager from android app void InitAssetManager(AAssetManager *manager) @@ -173,24 +184,6 @@ FILE *android_fopen(const char *fileName, const char *mode) } #endif -// Keep track of memory allocated -// NOTE: mallocType defines the type of data allocated -/* -void RecordMalloc(int mallocType, int mallocSize, const char *msg) -{ - // TODO: Investigate how to record memory allocation data... - // Maybe creating my own malloc function... -} -*/ - -// Get the extension for a filename -const char *GetExtension(const char *fileName) -{ - const char *dot = strrchr(fileName, '.'); - if (!dot || dot == fileName) return ""; - return (dot + 1); -} - //---------------------------------------------------------------------------------- // Module specific Functions Definition //---------------------------------------------------------------------------------- |
