summaryrefslogtreecommitdiff
path: root/sprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'sprite.h')
-rw-r--r--sprite.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sprite.h b/sprite.h
new file mode 100644
index 0000000..7ad821d
--- /dev/null
+++ b/sprite.h
@@ -0,0 +1,28 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* sprite.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: kdx <kdx @student.42angouleme.fr +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2022/10/09 07:15:24 by kdx #+# #+# */
+/* Updated: 2022/10/09 07:47:13 by kdx ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef SPRITE_H
+# define SPRITE_H
+# include "sily.h"
+
+typedef struct s_sprite
+{
+ void *img;
+ int width;
+ int height;
+} t_sprite;
+
+t_sprite *sprite_load(t_sily *sily, char *path, int width, int height);
+void sprite_destroy(t_sily *sily, t_sprite *sprite);
+void sprite_draw(t_sily *sily, t_sprite *sprite, int x, int y);
+
+#endif