diff options
| author | raysan5 <[email protected]> | 2020-05-31 23:31:43 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-05-31 23:31:43 +0200 |
| commit | 82fca4340621d51f70b2fa832caaede1deb437dc (patch) | |
| tree | 6ad8a7244e705f2d0878e5caaaff2244352cb4ad /examples/textures/textures_sprite_explosion.c | |
| parent | 0e1d7d643081929338ba7cc7c5f85736ac632e92 (diff) | |
| download | raylib-82fca4340621d51f70b2fa832caaede1deb437dc.tar.gz raylib-82fca4340621d51f70b2fa832caaede1deb437dc.zip | |
Replaced some resources for better licensing
Some resources used in examples have not a clear license, so, I'm replacing some of them for clearly licensed versions or resources created by me under CC0. License file to be added.
Diffstat (limited to 'examples/textures/textures_sprite_explosion.c')
| -rw-r--r-- | examples/textures/textures_sprite_explosion.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/textures/textures_sprite_explosion.c b/examples/textures/textures_sprite_explosion.c index 823c1b8a..02f06aab 100644 --- a/examples/textures/textures_sprite_explosion.c +++ b/examples/textures/textures_sprite_explosion.c @@ -11,8 +11,8 @@ #include "raylib.h" -#define NUM_FRAMES 8 -#define NUM_LINES 6 +#define NUM_FRAMES_PER_LINE 5 +#define NUM_LINES 5 int main(void) { @@ -32,7 +32,7 @@ int main(void) Texture2D explosion = LoadTexture("resources/explosion.png"); // Init variables for animation - int frameWidth = explosion.width/NUM_FRAMES; // Sprite one frame rectangle width + int frameWidth = explosion.width/NUM_FRAMES_PER_LINE; // Sprite one frame rectangle width int frameHeight = explosion.height/NUM_LINES; // Sprite one frame rectangle height int currentFrame = 0; int currentLine = 0; @@ -73,7 +73,7 @@ int main(void) { currentFrame++; - if (currentFrame >= NUM_FRAMES) + if (currentFrame >= NUM_FRAMES_PER_LINE) { currentFrame = 0; currentLine++; |
