summaryrefslogtreecommitdiffhomepage
path: root/docs/examples/src/textures/textures_srcrec_dstrec.c
diff options
context:
space:
mode:
authorvictorfisac <[email protected]>2017-05-02 14:18:11 +0200
committervictorfisac <[email protected]>2017-05-02 14:18:11 +0200
commitdb0cfa935f52a2557e6e3dfddab341917cb1eb14 (patch)
tree15e9782c639571d57030420f69c6b8f7c4a69f50 /docs/examples/src/textures/textures_srcrec_dstrec.c
parent8849a4c7526ee6a321df9393dd69d0b29820311a (diff)
parentd593bd0081ea2dcafe3182ffc874882b5b7110b4 (diff)
downloadraylib-db0cfa935f52a2557e6e3dfddab341917cb1eb14.tar.gz
raylib-db0cfa935f52a2557e6e3dfddab341917cb1eb14.zip
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
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
//--------------------------------------------------------------------------------------