summaryrefslogtreecommitdiffhomepage
path: root/docs/examples/src/textures/textures_srcrec_dstrec.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-04-17 16:42:01 +0200
committerraysan5 <[email protected]>2017-04-17 16:42:01 +0200
commit881f134f4d2fb4419d50382284e19b4f8ca4660e (patch)
tree065658f8b462dd76837f849450bdd3895134121a /docs/examples/src/textures/textures_srcrec_dstrec.c
parent3e082f1d6251e366d7be6019d0950ea7a9e6b5b4 (diff)
downloadraylib-881f134f4d2fb4419d50382284e19b4f8ca4660e.tar.gz
raylib-881f134f4d2fb4419d50382284e19b4f8ca4660e.zip
Review and recompile web examples
Diffstat (limited to 'docs/examples/src/textures/textures_srcrec_dstrec.c')
-rw-r--r--docs/examples/src/textures/textures_srcrec_dstrec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/examples/src/textures/textures_srcrec_dstrec.c b/docs/examples/src/textures/textures_srcrec_dstrec.c
index 6d824ce6..53ffd1d0 100644
--- a/docs/examples/src/textures/textures_srcrec_dstrec.c
+++ b/docs/examples/src/textures/textures_srcrec_dstrec.c
@@ -21,10 +21,10 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rectangles");
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
- Texture2D guybrush = LoadTexture("resources/guybrush.png"); // Texture loading
+ Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading
- int frameWidth = guybrush.width/7;
- int frameHeight = guybrush.height;
+ int frameWidth = scarfy.width/6;
+ int frameHeight = scarfy.height;
// NOTE: Source rectangle (part of the texture to use for drawing)
Rectangle sourceRec = { 0, 0, frameWidth, frameHeight };
@@ -59,10 +59,12 @@ int main()
// destRec defines the rectangle where our texture part will fit (scaling it to fit)
// origin defines the point of the texture used as reference for rotation and scaling
// rotation defines the texture rotation (using origin as rotation point)
- DrawTexturePro(guybrush, sourceRec, destRec, origin, rotation, WHITE);
+ DrawTexturePro(scarfy, sourceRec, destRec, origin, rotation, WHITE);
DrawLine(destRec.x, 0, destRec.x, screenHeight, GRAY);
DrawLine(0, destRec.y, screenWidth, destRec.y, GRAY);
+
+ DrawText("(c) Scarfy sprite by Eiden Marsal", screenWidth - 200, screenHeight - 20, 10, GRAY);
EndDrawing();
//----------------------------------------------------------------------------------
@@ -70,7 +72,7 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
- UnloadTexture(guybrush); // Texture unloading
+ UnloadTexture(scarfy); // Texture unloading
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------