blob: bc3a5e11f59ebade698a900382287814c471f72d (
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* player_erase.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kdx <kdx @student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/17 11:32:56 by kdx #+# #+# */
/* Updated: 2022/10/17 11:32:58 by kdx ### ########.fr */
/* */
/* ************************************************************************** */
#include "player.h"
#include "game.h"
#include "map.h"
#include "sily.h"
#include <math.h>
void player_erase(t_sily *sily, double pos[2])
{
int x;
int y;
x = round(pos[0]);
y = round(pos[1]);
map_draw_tile(sily, &sily->game->map, x, y);
map_draw_tile(sily, &sily->game->map, x + TSIZE, y + TSIZE);
map_draw_tile(sily, &sily->game->map, x + TSIZE, y);
map_draw_tile(sily, &sily->game->map, x, y + TSIZE);
}
|