summaryrefslogtreecommitdiffhomepage
path: root/examples/textures/textures_raw_data.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2019-01-05 17:25:35 +0100
committerraysan5 <[email protected]>2019-01-05 17:25:35 +0100
commit490e930665c7a2853f4a678aa397a7ed3551d8df (patch)
treedd09000f37234b2997497d71936e5dd4155cccaf /examples/textures/textures_raw_data.c
parent1038e79b364d75a037e2b71e1a7dbc5937f88f1b (diff)
downloadraylib-490e930665c7a2853f4a678aa397a7ed3551d8df.tar.gz
raylib-490e930665c7a2853f4a678aa397a7ed3551d8df.zip
Reviewed example
Diffstat (limited to 'examples/textures/textures_raw_data.c')
-rw-r--r--examples/textures/textures_raw_data.c14
1 files changed, 7 insertions, 7 deletions
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);