mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +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> +#+ +:+ +#+ */
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
/* 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 "draw/drawutils.h"
|
||||||
#include "map/map_checker.h"
|
#include "map/map_checker.h"
|
||||||
#include "draw/draw_map.h"
|
#include "draw/draw_map.h"
|
||||||
#include "map/mapdata.h"
|
|
||||||
#include "utils/hooks.h"
|
#include "utils/hooks.h"
|
||||||
#include "utils/frees.h"
|
#include "utils/frees.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
@ -30,8 +29,8 @@
|
||||||
void init_player(t_mapdata *mapdata, t_player *player)
|
void init_player(t_mapdata *mapdata, t_player *player)
|
||||||
{
|
{
|
||||||
player->health = 100;
|
player->health = 100;
|
||||||
player->x = mapdata->startx * SIZE;
|
player->x = mapdata->startx;
|
||||||
player->y = mapdata->starty * SIZE;
|
player->y = mapdata->starty;
|
||||||
if (mapdata->map[mapdata->starty][mapdata->startx] == 'N')
|
if (mapdata->map[mapdata->starty][mapdata->startx] == 'N')
|
||||||
player->yaw = M_PI;
|
player->yaw = M_PI;
|
||||||
else if (mapdata->map[mapdata->starty][mapdata->startx] == 'S')
|
else if (mapdata->map[mapdata->starty][mapdata->startx] == 'S')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue