summaryrefslogtreecommitdiff
path: root/badeline.h
blob: d18455d3fcb13cae9afbd552b081f485fc4e72b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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