Browse Source

RENAMED: example: textures_rectangle -> textures_sprite_anim

pull/2570/head
Ray 2 years ago
parent
commit
e121058eb6
9 changed files with 19 additions and 15 deletions
  1. +3
    -2
      examples/Makefile
  2. +2
    -2
      examples/Makefile.Web
  3. +3
    -1
      examples/README.md
  4. +3
    -2
      examples/textures/textures_sprite_anim.c
  5. +0
    -0
      examples/textures/textures_sprite_anim.png
  6. +3
    -3
      projects/VS2019/examples/textures_sprite_anim.vcxproj
  7. +1
    -1
      projects/VS2019/raylib.sln
  8. +3
    -3
      projects/VS2022/examples/textures_sprite_anim.vcxproj
  9. +1
    -1
      projects/VS2022/raylib.sln

+ 3
- 2
examples/Makefile View File

@ -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 \

+ 2
- 2
examples/Makefile.Web View File

@ -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

+ 3
- 1
examples/README.md View File

@ -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

examples/textures/textures_rectangle.c → examples/textures/textures_sprite_anim.c View File

@ -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--;

examples/textures/textures_rectangle.png → examples/textures/textures_sprite_anim.png View File


projects/VS2019/examples/textures_rectangle.vcxproj → projects/VS2019/examples/textures_sprite_anim.vcxproj View File

@ -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">

+ 1
- 1
projects/VS2019/raylib.sln View File

@ -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

projects/VS2022/examples/textures_rectangle.vcxproj → projects/VS2022/examples/textures_sprite_anim.vcxproj View File

@ -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">

+ 1
- 1
projects/VS2022/raylib.sln View File

@ -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

||||||
x
 
000:0
Loading…
Cancel
Save