summaryrefslogtreecommitdiffhomepage
path: root/examples/src/textures/textures_raw_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src/textures/textures_raw_data.c')
-rw-r--r--examples/src/textures/textures_raw_data.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/src/textures/textures_raw_data.c b/examples/src/textures/textures_raw_data.c
index b038792..481bd66 100644
--- a/examples/src/textures/textures_raw_data.c
+++ b/examples/src/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);