A RPG I'm messing with made in Raylib.
1#ifndef ANIMATED_TEXURE_H
2#define ANIMATED_TEXURE_H
3#include "raylib.h"
4#include "raymath.h"
5
6typedef struct {
7 unsigned int number_of_frames;
8 Rectangle current_frame;
9 int step;
10
11 float speed;
12 float duration_left;
13
14 Texture2D texture;
15} AnimatedTexture;
16
17AnimatedTexture animated_texture_create(const char *file_path, int number_of_frames, float speed);
18int animated_texture_delete(AnimatedTexture animated_texture);
19void animated_texture_update(AnimatedTexture *animated_texture);
20void animated_texture_draw(AnimatedTexture *animated_texture, Vector2 position, Color tint);
21
22#endif