better struct and files organization, and still only half raycast on map but no view created
This commit is contained in:
19
srcs/draw/raycast.c
Normal file
19
srcs/draw/raycast.c
Normal 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)++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user