summaryrefslogtreecommitdiffhomepage
path: root/examples/textures
diff options
context:
space:
mode:
authorRay <[email protected]>2019-01-10 16:57:15 +0100
committerGitHub <[email protected]>2019-01-10 16:57:15 +0100
commit56173d7cf457413fd56e26967becc7c5054aa2cf (patch)
treef1428e583f4ed5ee8c7060c47da55e8ce0194882 /examples/textures
parent6056a2a5cf2aa939a10e807e452ed43d4b67f1ce (diff)
parent93471b0a7c75fc675f27fc74dfda281eb8310a7a (diff)
downloadraylib-56173d7cf457413fd56e26967becc7c5054aa2cf.tar.gz
raylib-56173d7cf457413fd56e26967becc7c5054aa2cf.zip
Merge branch 'master' into window-visibility
Diffstat (limited to 'examples/textures')
-rw-r--r--examples/textures/textures_image_text.c2
-rw-r--r--examples/textures/textures_raw_data.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/textures/textures_image_text.c b/examples/textures/textures_image_text.c
index fb99e827..ce91fbf2 100644
--- a/examples/textures/textures_image_text.c
+++ b/examples/textures/textures_image_text.c
@@ -21,7 +21,7 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [texture] example - image text drawing");
// TTF Font loading with custom generation parameters
- Font font = LoadFontEx("resources/KAISG.ttf", 64, 95, 0);
+ Font font = LoadFontEx("resources/KAISG.ttf", 64, 0, 0);
Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM)
diff --git a/examples/textures/textures_raw_data.c b/examples/textures/textures_raw_data.c
index b038792b..481bd66a 100644
--- a/examples/textures/textures_raw_data.c
+++ b/examples/textures/textures_raw_data.c
@@ -32,8 +32,8 @@ int main()
UnloadImage(fudesumiRaw); // Unload CPU (RAM) image data
// Generate a checked texture by code (1024x1024 pixels)
- int width = 1024;
- int height = 1024;
+ int width = 960;
+ int height = 480;
// Dynamic memory allocation to store pixels data (Color type)
Color *pixels = (Color *)malloc(width*height*sizeof(Color));
@@ -42,8 +42,8 @@ int main()
{
for (int x = 0; x < width; x++)
{
- if (((x/32+y/32)/1)%2 == 0) pixels[y*height + x] = ORANGE;
- else pixels[y*height + x] = GOLD;
+ if (((x/32+y/32)/1)%2 == 0) pixels[y*width + x] = ORANGE;
+ else pixels[y*width + x] = GOLD;
}
}
@@ -73,9 +73,9 @@ int main()
DrawTexture(checked, screenWidth/2 - checked.width/2, screenHeight/2 - checked.height/2, Fade(WHITE, 0.5f));
DrawTexture(fudesumi, 430, -30, WHITE);
- DrawText("CHECKED TEXTURE ", 84, 100, 30, BROWN);
- DrawText("GENERATED by CODE", 72, 164, 30, BROWN);
- DrawText("and RAW IMAGE LOADING", 46, 226, 30, BROWN);
+ DrawText("CHECKED TEXTURE ", 84, 85, 30, BROWN);
+ DrawText("GENERATED by CODE", 72, 148, 30, BROWN);
+ DrawText("and RAW IMAGE LOADING", 46, 210, 30, BROWN);
DrawText("(c) Fudesumi sprite by Eiden Marsal", 310, screenHeight - 20, 10, BROWN);