20 lines
306 B
C
20 lines
306 B
C
#include "cube3d.h"
|
|
|
|
void raycast(t_game *game, t_rcast *rcast)
|
|
{
|
|
t_vec ray;
|
|
|
|
rcast->ray_nb = 0;
|
|
while (rcast->ray_nb <= rcast->screen_def)
|
|
{
|
|
ray_intersect(game, rcast, &ray);
|
|
|
|
// tmp, to draw the map
|
|
draw_line(game, ray, 0x00FF00FF);
|
|
// tmp end
|
|
|
|
// draw_column();
|
|
(rcast->ray_nb)++;
|
|
}
|
|
}
|