wip calcul texture image x position, and add protection when creating texture
This commit is contained in:
@@ -87,8 +87,8 @@ void draw(t_game *game);
|
||||
// raycast.c
|
||||
void raycast(t_game *game, t_rcast *rcast);
|
||||
// ray_intersect.c
|
||||
void ray_intersect(t_game *game, t_rcast *rcast, t_vec *ray);
|
||||
void ray_intersect_wall(t_game *game, t_rcast *rcast, t_vec *ray);
|
||||
// draw_column.c
|
||||
void draw_column(t_game *game, t_rcast *rcast);
|
||||
void draw_column(t_game *game, t_rcast *rcast, t_wall *wall, t_txt *txt);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,18 @@ typedef struct s_vec
|
||||
t_coord end;
|
||||
} t_vec;
|
||||
|
||||
/*
|
||||
* struct with all elements for raycasting
|
||||
*/
|
||||
|
||||
typedef struct s_wall
|
||||
{
|
||||
t_vec vec;
|
||||
int height;
|
||||
int delta;
|
||||
int posx;
|
||||
} t_wall;
|
||||
|
||||
/*
|
||||
* struct with all elements for raycasting
|
||||
*/
|
||||
@@ -34,7 +46,7 @@ typedef struct s_rcast
|
||||
{
|
||||
t_vec screen_size;
|
||||
t_vec ray;
|
||||
t_vec wall;
|
||||
t_wall wall;
|
||||
int screen_width;
|
||||
int screen_height;
|
||||
int screen_dist;
|
||||
|
||||
Reference in New Issue
Block a user