mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
feat: draw view cone (without DDA)
This commit is contained in:
parent
8eb247ae3e
commit
6bd9b5e3c2
1 changed files with 3 additions and 4 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue