summaryrefslogtreecommitdiffhomepage
path: root/src/textures.c
diff options
context:
space:
mode:
authorRay <[email protected]>2020-06-30 11:05:09 +0200
committerRay <[email protected]>2020-06-30 11:05:09 +0200
commit5986eee6ab0c69045b1115d30b9f7d8a42d2f330 (patch)
tree1b06c47e0b5907769463c1aae436d95142c39c09 /src/textures.c
parent00557df17fc1654688b3306cfbee86fa8c725366 (diff)
downloadraylib-5986eee6ab0c69045b1115d30b9f7d8a42d2f330.tar.gz
raylib-5986eee6ab0c69045b1115d30b9f7d8a42d2f330.zip
Expose additional configuration options
Some internal defines have been exposed in config.h
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/textures.c b/src/textures.c
index 71efe280..589c5563 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -148,8 +148,8 @@
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------
-#ifndef R5G5B5A1_ALPHA_THRESHOLD
- #define R5G5B5A1_ALPHA_THRESHOLD 50 // Threshold over 255 to set alpha as 0
+#ifndef UNCOMPRESSED_R5G5B5A1_ALPHA_THRESHOLD
+ #define UNCOMPRESSED_R5G5B5A1_ALPHA_THRESHOLD 50 // Threshold over 255 to set alpha as 0
#endif
//----------------------------------------------------------------------------------
@@ -932,7 +932,7 @@ void ImageFormat(Image *image, int newFormat)
r = (unsigned char)(round(pixels[i].x*31.0f));
g = (unsigned char)(round(pixels[i].y*31.0f));
b = (unsigned char)(round(pixels[i].z*31.0f));
- a = (pixels[i].w > ((float)R5G5B5A1_ALPHA_THRESHOLD/255.0f))? 1 : 0;
+ a = (pixels[i].w > ((float)UNCOMPRESSED_R5G5B5A1_ALPHA_THRESHOLD/255.0f))? 1 : 0;
((unsigned short *)image->data)[i] = (unsigned short)r << 11 | (unsigned short)g << 6 | (unsigned short)b << 1 | (unsigned short)a;
}
@@ -2351,7 +2351,7 @@ void ImageDrawPixel(Image *dst, int x, int y, Color color)
unsigned char r = (unsigned char)(round(coln.x*31.0f));
unsigned char g = (unsigned char)(round(coln.y*31.0f));
unsigned char b = (unsigned char)(round(coln.z*31.0f));
- unsigned char a = (coln.w > ((float)R5G5B5A1_ALPHA_THRESHOLD/255.0f))? 1 : 0;;
+ unsigned char a = (coln.w > ((float)UNCOMPRESSED_R5G5B5A1_ALPHA_THRESHOLD/255.0f))? 1 : 0;;
((unsigned short *)dst->data)[y*dst->width + x] = (unsigned short)r << 11 | (unsigned short)g << 6 | (unsigned short)b << 1 | (unsigned short)a;
@@ -3620,7 +3620,7 @@ void SetPixelColor(void *dstPtr, Color color, int format)
unsigned char r = (unsigned char)(round(coln.x*31.0f));
unsigned char g = (unsigned char)(round(coln.y*31.0f));
unsigned char b = (unsigned char)(round(coln.z*31.0f));
- unsigned char a = (coln.w > ((float)R5G5B5A1_ALPHA_THRESHOLD/255.0f))? 1 : 0;;
+ unsigned char a = (coln.w > ((float)UNCOMPRESSED_R5G5B5A1_ALPHA_THRESHOLD/255.0f))? 1 : 0;;
((unsigned short *)dstPtr)[0] = (unsigned short)r << 11 | (unsigned short)g << 6 | (unsigned short)b << 1 | (unsigned short)a;