add init textures

This commit is contained in:
hugogogo
2022-05-02 16:11:54 +02:00
parent a6fd2df6d5
commit 628a0c0cad
9 changed files with 113 additions and 75 deletions

View File

@@ -22,10 +22,22 @@ void draw_floor_ceiling(t_game *game, t_rcast *rcast, t_txt *txt)
void draw_column(t_game *game, t_rcast *rcast)
{
int color;
int color_n;
int color_s;
int color_e;
int color_o;
color_n = 0x00FF00FF;
color_s = 0x0000EEEE;
color_e = 0x00DDDD00;
color_o = 0x00CCCCCC;
draw_floor_ceiling(game, rcast, &game->txt);
color = 0x00FF00FF;
if (rcast->is_x)
color = 0x00EE00EE;
draw_line(&game->img, &rcast->wall, color);
if (!rcast->is_x && rcast->slope_y > 0)
draw_line(&game->img, &rcast->wall, color_n);
if (!rcast->is_x && rcast->slope_y < 0)
draw_line(&game->img, &rcast->wall, color_s);
if (rcast->is_x && rcast->slope_x > 0)
draw_line(&game->img, &rcast->wall, color_e);
if (rcast->is_x && rcast->slope_x < 0)
draw_line(&game->img, &rcast->wall, color_o);
}