summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-14 11:05:51 +0100
committerRay <[email protected]>2021-03-14 11:05:51 +0100
commit01e28263be9869b28acae5cf1128472269626edb (patch)
tree7536aebc3ff6273926fc52c4aa5929dd2b96fba6 /src/text.c
parent75038baf716a79606e86d46dad9d527bbb65628a (diff)
downloadraylib-01e28263be9869b28acae5cf1128472269626edb.tar.gz
raylib-01e28263be9869b28acae5cf1128472269626edb.zip
WARNING: VERY BREAKING CHANGE: Renamed some enum values for consistency
Some enums values have been renamed to be more consistent and also provide a more detailed description: - ShaderLocationIndex: LOC_VERTEX_POSITION -> SHADER_SHADER_LOC_VERTEX_POSITION - ShaderUniformDataType: UNIFORM_VEC2 -> SHADER_UNIFORM_VEC2 - MaterialMapType: MAP_ALBEDO -> MATERIAL_MAP_ALBEDO - PixelFormat: UNCOMPRESSED_GRAYSCALE -> PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/text.c b/src/text.c
index 204cc4e3..e945b33f 100644
--- a/src/text.c
+++ b/src/text.c
@@ -196,7 +196,7 @@ extern void LoadFontDefault(void)
.data = calloc(128*128, 2), // 2 bytes per pixel (gray + alpha)
.width = 128,
.height = 128,
- .format = UNCOMPRESSED_GRAY_ALPHA,
+ .format = PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
.mipmaps = 1
};
@@ -440,7 +440,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar)
.data = pixels,
.width = image.width,
.height = image.height,
- .format = UNCOMPRESSED_R8G8B8A8,
+ .format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8,
.mipmaps = 1
};
@@ -598,7 +598,7 @@ CharInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize
chars[i].image.width = chw;
chars[i].image.height = chh;
chars[i].image.mipmaps = 1;
- chars[i].image.format = UNCOMPRESSED_GRAYSCALE;
+ chars[i].image.format = PIXELFORMAT_UNCOMPRESSED_GRAYSCALE;
chars[i].offsetY += (int)((float)ascent*scaleFactor);
@@ -609,7 +609,7 @@ CharInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize
.data = calloc(chars[i].advanceX*fontSize, 2),
.width = chars[i].advanceX,
.height = fontSize,
- .format = UNCOMPRESSED_GRAYSCALE,
+ .format = PIXELFORMAT_UNCOMPRESSED_GRAYSCALE,
.mipmaps = 1
};
@@ -679,7 +679,7 @@ Image GenImageFontAtlas(const CharInfo *chars, Rectangle **charRecs, int charsCo
atlas.width = imageSize; // Atlas bitmap width
atlas.height = imageSize; // Atlas bitmap height
atlas.data = (unsigned char *)RL_CALLOC(1, atlas.width*atlas.height); // Create a bitmap to store characters (8 bpp)
- atlas.format = UNCOMPRESSED_GRAYSCALE;
+ atlas.format = PIXELFORMAT_UNCOMPRESSED_GRAYSCALE;
atlas.mipmaps = 1;
// DEBUG: We can see padding in the generated image setting a gray background...
@@ -783,7 +783,7 @@ Image GenImageFontAtlas(const CharInfo *chars, Rectangle **charRecs, int charsCo
RL_FREE(atlas.data);
atlas.data = dataGrayAlpha;
- atlas.format = UNCOMPRESSED_GRAY_ALPHA;
+ atlas.format = PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA;
*charRecs = recs;
@@ -1794,14 +1794,14 @@ static Font LoadBMFont(const char *fileName)
Image imFont = LoadImage(imPath);
- if (imFont.format == UNCOMPRESSED_GRAYSCALE)
+ if (imFont.format == PIXELFORMAT_UNCOMPRESSED_GRAYSCALE)
{
// Convert image to GRAYSCALE + ALPHA, using the mask as the alpha channel
Image imFontAlpha = {
.data = calloc(imFont.width*imFont.height, 2),
.width = imFont.width,
.height = imFont.height,
- .format = UNCOMPRESSED_GRAY_ALPHA,
+ .format = PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
.mipmaps = 1
};