summaryrefslogtreecommitdiffhomepage
path: root/examples/textures
diff options
context:
space:
mode:
authorRay <[email protected]>2022-07-07 12:09:30 +0200
committerRay <[email protected]>2022-07-07 12:09:30 +0200
commite121058eb625c3d54ec8ec3eab0289c9a99fd086 (patch)
tree1e32bed7287a36a73e7fe66e3cba4b0bb1bbd3ea /examples/textures
parente3ff5f3dc250e8e1ca8acd59a0cd6e1a619cec07 (diff)
downloadraylib-e121058eb625c3d54ec8ec3eab0289c9a99fd086.tar.gz
raylib-e121058eb625c3d54ec8ec3eab0289c9a99fd086.zip
RENAMED: example: textures_rectangle -> textures_sprite_anim
Diffstat (limited to 'examples/textures')
-rw-r--r--examples/textures/textures_sprite_anim.c (renamed from examples/textures/textures_rectangle.c)5
-rw-r--r--examples/textures/textures_sprite_anim.png (renamed from examples/textures/textures_rectangle.png)bin39809 -> 39809 bytes
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/textures/textures_rectangle.c b/examples/textures/textures_sprite_anim.c
index eb9f818b..0e66b883 100644
--- a/examples/textures/textures_rectangle.c
+++ b/examples/textures/textures_sprite_anim.c
@@ -1,6 +1,6 @@
/*******************************************************************************************
*
-* raylib [textures] example - Texture loading and drawing a part defined by a rectangle
+* raylib [textures] example - Sprite animation
*
* This example has been created using raylib 1.3 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
@@ -24,7 +24,7 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
- InitWindow(screenWidth, screenHeight, "raylib [texture] example - texture rectangle");
+ InitWindow(screenWidth, screenHeight, "raylib [texture] example - sprite anim");
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading
@@ -56,6 +56,7 @@ int main(void)
frameRec.x = (float)currentFrame*(float)scarfy.width/6;
}
+ // Control frames speed
if (IsKeyPressed(KEY_RIGHT)) framesSpeed++;
else if (IsKeyPressed(KEY_LEFT)) framesSpeed--;
diff --git a/examples/textures/textures_rectangle.png b/examples/textures/textures_sprite_anim.png
index aa66464e..aa66464e 100644
--- a/examples/textures/textures_rectangle.png
+++ b/examples/textures/textures_sprite_anim.png
Binary files differ