summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
diff options
context:
space:
mode:
authorvictorfisac <[email protected]>2017-03-24 15:37:58 +0100
committervictorfisac <[email protected]>2017-03-24 15:37:58 +0100
commitb2f0c7ca8b8e9484560a45c4547794fa62cf484f (patch)
tree3ab4d3ef3a49e0f75dac253098611d1f3e6a70b9 /src/utils.c
parentc964559bc966292a7d70f00559ea80c224aab96d (diff)
parent3f0c29642225f4da40e29e83117a4589f95be538 (diff)
downloadraylib-b2f0c7ca8b8e9484560a45c4547794fa62cf484f.tar.gz
raylib-b2f0c7ca8b8e9484560a45c4547794fa62cf484f.zip
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index 9a2a723a..4d30cbc7 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -4,14 +4,20 @@
*
* CONFIGURATION:
*
-* #define SUPPORT_SAVE_PNG
-* Enable saving PNG fileformat
+* #define SUPPORT_SAVE_PNG (defined by default)
+* Support saving image data as PNG fileformat
* NOTE: Requires stb_image_write library
*
* #define SUPPORT_SAVE_BMP
+* Support saving image data as BMP fileformat
+* NOTE: Requires stb_image_write library
+*
+* #define SUPPORT_TRACELOG
+* Show TraceLog() output messages
+* NOTE: By default DEBUG traces not shown
*
-* #define DO_NOT_TRACE_DEBUG_MSGS
-* Avoid showing DEBUG TraceLog() messages
+* #define SUPPORT_TRACELOG_DEBUG
+* Show TraceLog() DEBUG messages
*
* DEPENDENCIES:
* stb_image_write - PNG writting functions
@@ -19,7 +25,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-2017 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
@@ -129,18 +135,23 @@ void TraceLog(int msgType, const char *text, ...)
}
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
+
+#if defined(SUPPORT_SAVE_BMP)
// Creates a BMP image file from an array of pixel data
void SaveBMP(const char *fileName, unsigned char *imgData, int width, int height, int compSize)
{
stbi_write_bmp(fileName, width, height, compSize, imgData);
}
+#endif
+#if defined(SUPPORT_SAVE_PNG)
// Creates a PNG image file from an array of pixel data
void SavePNG(const char *fileName, unsigned char *imgData, int width, int height, int compSize)
{
stbi_write_png(fileName, width, height, compSize, imgData, width*compSize);
}
#endif
+#endif
#if defined(PLATFORM_ANDROID)
// Initialize asset manager from android app