summaryrefslogtreecommitdiff
path: root/badeline.h
diff options
context:
space:
mode:
Diffstat (limited to 'badeline.h')
-rw-r--r--badeline.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/badeline.h b/badeline.h
new file mode 100644
index 0000000..d18455d
--- /dev/null
+++ b/badeline.h
@@ -0,0 +1,33 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* badeline.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: kdx <kdx @student.42angouleme.fr +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2022/10/16 01:27:51 by kdx #+# #+# */
+/* Updated: 2022/10/16 01:54:13 by kdx ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef BADELINE_H
+# include "sily.h"
+# include <stdbool.h>
+# define BADELINE_H
+# define BADELINE_DELAY 30
+
+typedef struct s_player t_player;
+typedef struct s_badeline
+{
+ t_player *follow;
+ double queue[BADELINE_DELAY][2];
+ double erase[2];
+ int queue_size;
+ bool active;
+} t_badeline;
+
+void badeline_update(t_badeline *badeline);
+void badeline_erase(t_sily *sily, t_badeline *badeline);
+void badeline_draw(t_sily *sily, t_badeline *badeline);
+
+#endif