feat: draw view cone (without DDA)

This commit is contained in:
Khaïs COLIN 2025-07-28 13:04:32 +02:00 committed by freddy_vqr
parent b6ac8867e5
commit dd82d902a5

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
/* Updated: 2025/07/28 15:20:30 by kcolin ### ########.fr */
/* Updated: 2025/07/28 15:21:17 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,7 +17,6 @@
#include "draw/drawutils.h"
#include "map/map_checker.h"
#include "draw/draw_map.h"
#include "map/mapdata.h"
#include "utils/hooks.h"
#include "utils/frees.h"
#include <stdbool.h>
@ -30,8 +29,8 @@
void init_player(t_mapdata *mapdata, t_player *player)
{
player->health = 100;
player->x = mapdata->startx * SIZE;
player->y = mapdata->starty * SIZE;
player->x = mapdata->startx;
player->y = mapdata->starty;
if (mapdata->map[mapdata->starty][mapdata->startx] == 'N')
player->yaw = M_PI;
else if (mapdata->map[mapdata->starty][mapdata->startx] == 'S')