better struct and files organization, and still only half raycast on map but no view created

This commit is contained in:
hugogogo
2022-04-22 17:38:29 +02:00
parent 00c9dfd6b8
commit fac1f78230
17 changed files with 602 additions and 505 deletions

19
srcs/draw/raycast.c Normal file
View File

@@ -0,0 +1,19 @@
#include "cube3d.h"
void raycast(t_game *game, t_rcast *rcast)
{
t_vec ray;
rcast->ray_nb = 0;
while (rcast->ray_nb <= SCREEN_DEF)
{
ray_intersect(game, rcast, &ray);
// tmp, to draw the map
draw_line(game, ray, 0x00FF00FF);
// tmp end
// draw_column();
(rcast->ray_nb)++;
}
}