diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 20:00:20 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 20:00:20 +0100 |
commit | cc8c83d66e4cfa8f3660c7fbfefc15d3b5d7aa01 (patch) | |
tree | 36dac1a0a4a1aac6e41d731d4a5fb6f7c5f7a691 /src/ft_draw_textures.c | |
parent | Almost there (diff) | |
download | 42-cub3d-cc8c83d66e4cfa8f3660c7fbfefc15d3b5d7aa01.tar.gz 42-cub3d-cc8c83d66e4cfa8f3660c7fbfefc15d3b5d7aa01.tar.bz2 42-cub3d-cc8c83d66e4cfa8f3660c7fbfefc15d3b5d7aa01.tar.xz 42-cub3d-cc8c83d66e4cfa8f3660c7fbfefc15d3b5d7aa01.tar.zst 42-cub3d-cc8c83d66e4cfa8f3660c7fbfefc15d3b5d7aa01.zip |
This is great
Diffstat (limited to 'src/ft_draw_textures.c')
-rw-r--r-- | src/ft_draw_textures.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ft_draw_textures.c b/src/ft_draw_textures.c index c7684f9..56be3ee 100644 --- a/src/ft_draw_textures.c +++ b/src/ft_draw_textures.c @@ -30,11 +30,11 @@ void if ((dist = cl->rlist.wall_dist_tab[x]) <= 0) dist = 0.0001; - rgb.r = (uint8_t)cl->tlist[cl->rlist.w_side_tab[x]].ptr[cl->tlist[cl->rlist.w_side_tab[x]].tex_x + rgb.r = (uint8_t)cl->tlist[cl->rlist.w_side_tab[x]].ptr[cl->rlist.tex_x_tab[x] * 4 + 4 * cl->tlist[cl->rlist.w_side_tab[x]].img_h * tex_y + 2]; - rgb.g = (uint8_t)cl->tlist[cl->rlist.w_side_tab[x]].ptr[cl->tlist[cl->rlist.w_side_tab[x]].tex_x + rgb.g = (uint8_t)cl->tlist[cl->rlist.w_side_tab[x]].ptr[cl->rlist.tex_x_tab[x] * 4 + 4 * cl->tlist[cl->rlist.w_side_tab[x]].img_h * tex_y + 1]; - rgb.b = (uint8_t)cl->tlist[cl->rlist.w_side_tab[x]].ptr[cl->tlist[cl->rlist.w_side_tab[x]].tex_x + rgb.b = (uint8_t)cl->tlist[cl->rlist.w_side_tab[x]].ptr[cl->rlist.tex_x_tab[x] * 4 + 4 * cl->tlist[cl->rlist.w_side_tab[x]].img_h * tex_y]; *(int*)(cl->img.ptr + ((uint16_t)x * 4 + (y * cl->img.sizeline))) = ft_rgb_to_hex(dist, rgb, cl); |