summaryrefslogtreecommitdiffhomepage
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
parente3ff5f3dc250e8e1ca8acd59a0cd6e1a619cec07 (diff)
downloadraylib-e121058eb625c3d54ec8ec3eab0289c9a99fd086.tar.gz
raylib-e121058eb625c3d54ec8ec3eab0289c9a99fd086.zip
RENAMED: example: textures_rectangle -> textures_sprite_anim
-rw-r--r--examples/Makefile5
-rw-r--r--examples/Makefile.Web4
-rw-r--r--examples/README.md4
-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
-rw-r--r--projects/VS2019/examples/textures_sprite_anim.vcxproj (renamed from projects/VS2019/examples/textures_rectangle.vcxproj)6
-rw-r--r--projects/VS2019/raylib.sln2
-rw-r--r--projects/VS2022/examples/textures_sprite_anim.vcxproj (renamed from projects/VS2022/examples/textures_rectangle.vcxproj)6
-rw-r--r--projects/VS2022/raylib.sln2
9 files changed, 19 insertions, 15 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 636f5ec6..8517a91c 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -413,7 +413,6 @@ SHAPES = \
TEXTURES = \
textures/textures_logo_raylib \
textures/textures_mouse_painting \
- textures/textures_rectangle \
textures/textures_srcrec_dstrec \
textures/textures_image_drawing \
textures/textures_image_generation \
@@ -425,12 +424,14 @@ TEXTURES = \
textures/textures_particles_blending \
textures/textures_npatch_drawing \
textures/textures_background_scrolling \
+ textures/textures_sprite_anim \
textures/textures_sprite_button \
textures/textures_sprite_explosion \
textures/textures_bunnymark \
textures/textures_blend_modes \
textures/textures_draw_tiled \
- textures/textures_polygon
+ textures/textures_polygon \
+ textures/textures_gif_anim
TEXT = \
text/text_raylib_fonts \
diff --git a/examples/Makefile.Web b/examples/Makefile.Web
index 9d27443d..9765a2ff 100644
--- a/examples/Makefile.Web
+++ b/examples/Makefile.Web
@@ -427,7 +427,6 @@ SHAPES = \
TEXTURES = \
textures/textures_logo_raylib \
textures/textures_mouse_painting \
- textures/textures_rectangle \
textures/textures_srcrec_dstrec \
textures/textures_image_drawing \
textures/textures_image_generation \
@@ -439,6 +438,7 @@ TEXTURES = \
textures/textures_particles_blending \
textures/textures_npatch_drawing \
textures/textures_background_scrolling \
+ textures/textures_sprite_anim \
textures/textures_sprite_button \
textures/textures_sprite_explosion \
textures/textures_bunnymark \
@@ -659,7 +659,7 @@ textures/textures_logo_raylib: textures/textures_logo_raylib.c
textures/textures_mouse_painting: textures/textures_mouse_painting.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
-textures/textures_rectangle: textures/textures_rectangle.c
+textures/textures_sprite_anim: textures/textures_sprite_anim.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file textures/resources/scarfy.png@resources/scarfy.png
diff --git a/examples/README.md b/examples/README.md
index 15ccfc25..6fb65514 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -77,7 +77,6 @@ Examples using raylib textures functionality, including image/textures loading/g
| ## | example | image | developer | new |
|----|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|:------------------------------------------------:|:---:|
| 40 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="200"> | ray | |
-| 41 | [textures_rectangle](textures/textures_rectangle.c) | <img src="textures/textures_rectangle.png" alt="textures_rectangle" width="200"> | ray | |
| 42 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="200"> | ray | |
| 43 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="200"> | ray | |
| 44 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="200"> | ray | |
@@ -89,6 +88,7 @@ Examples using raylib textures functionality, including image/textures loading/g
| 50 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="200"> | ray | |
| 51 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="200"> | [Jorge A. Gomes](https://github.com/overdev) | |
| 52 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="200"> | ray | |
+| 41 | [textures_sprite_anim](textures/textures_sprite_anim.c) | <img src="textures/textures_sprite_anim.png" alt="textures_sprite_anim" width="200"> | ray | |
| 53 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="200"> | ray | |
| 54 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="200"> | ray | |
| 55 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="200"> | ray | |
@@ -96,6 +96,8 @@ Examples using raylib textures functionality, including image/textures loading/g
| 57 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="200"> | [Karlo Licudine](https://github.com/accidentalrebel) | |
| 58 | [textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| -- | [textures_poly](textures/textures_poly.c) | <img src="textures/textures_poly.png" alt="textures_poly" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
+| -- | [textures_gif_anim](textures/textures_gif_anim.c) | <img src="textures/textures_gif_anim.png" alt="textures_gif_anim" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
+
### category: text
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
diff --git a/projects/VS2019/examples/textures_rectangle.vcxproj b/projects/VS2019/examples/textures_sprite_anim.vcxproj
index a4736962..32db8858 100644
--- a/projects/VS2019/examples/textures_rectangle.vcxproj
+++ b/projects/VS2019/examples/textures_sprite_anim.vcxproj
@@ -37,9 +37,9 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{C25D2CC6-80CA-4C8A-BE3B-2E0F4EA5D0CC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
- <RootNamespace>textures_rectangle</RootNamespace>
+ <RootNamespace>textures_sprite_anim</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- <ProjectName>textures_rectangle</ProjectName>
+ <ProjectName>textures_sprite_anim</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -374,7 +374,7 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\..\..\examples\textures\textures_rectangle.c" />
+ <ClCompile Include="..\..\..\examples\textures\textures_sprite_anim.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\raylib\raylib.vcxproj">
diff --git a/projects/VS2019/raylib.sln b/projects/VS2019/raylib.sln
index 4b37ca3d..fba26af0 100644
--- a/projects/VS2019/raylib.sln
+++ b/projects/VS2019/raylib.sln
@@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{87
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_basic_window", "examples\core_basic_window.vcxproj", "{0981CA98-E4A5-4DF1-987F-A41D09131EFC}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "textures_rectangle", "examples\textures_rectangle.vcxproj", "{C25D2CC6-80CA-4C8A-BE3B-2E0F4EA5D0CC}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "textures_sprite_anim", "examples\textures_sprite_anim.vcxproj", "{C25D2CC6-80CA-4C8A-BE3B-2E0F4EA5D0CC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "textures_srcrec_dstrec", "examples\textures_srcrec_dstrec.vcxproj", "{103B292B-049B-4B15-85A1-9F902840DB2C}"
EndProject
diff --git a/projects/VS2022/examples/textures_rectangle.vcxproj b/projects/VS2022/examples/textures_sprite_anim.vcxproj
index a4736962..32db8858 100644
--- a/projects/VS2022/examples/textures_rectangle.vcxproj
+++ b/projects/VS2022/examples/textures_sprite_anim.vcxproj
@@ -37,9 +37,9 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{C25D2CC6-80CA-4C8A-BE3B-2E0F4EA5D0CC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
- <RootNamespace>textures_rectangle</RootNamespace>
+ <RootNamespace>textures_sprite_anim</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- <ProjectName>textures_rectangle</ProjectName>
+ <ProjectName>textures_sprite_anim</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -374,7 +374,7 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\..\..\examples\textures\textures_rectangle.c" />
+ <ClCompile Include="..\..\..\examples\textures\textures_sprite_anim.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\raylib\raylib.vcxproj">
diff --git a/projects/VS2022/raylib.sln b/projects/VS2022/raylib.sln
index ff6681f2..36c31220 100644
--- a/projects/VS2022/raylib.sln
+++ b/projects/VS2022/raylib.sln
@@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{87
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_basic_window", "examples\core_basic_window.vcxproj", "{0981CA98-E4A5-4DF1-987F-A41D09131EFC}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "textures_rectangle", "examples\textures_rectangle.vcxproj", "{C25D2CC6-80CA-4C8A-BE3B-2E0F4EA5D0CC}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "textures_sprite_anim", "examples\textures_sprite_anim.vcxproj", "{C25D2CC6-80CA-4C8A-BE3B-2E0F4EA5D0CC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "textures_srcrec_dstrec", "examples\textures_srcrec_dstrec.vcxproj", "{103B292B-049B-4B15-85A1-9F902840DB2C}"
EndProject