diff options
Diffstat (limited to 'src/ft_draw_map_back.c')
-rw-r--r-- | src/ft_draw_map_back.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ft_draw_map_back.c b/src/ft_draw_map_back.c index 3026687..4945b3d 100644 --- a/src/ft_draw_map_back.c +++ b/src/ft_draw_map_back.c @@ -16,24 +16,23 @@ static void ft_draw_back(uint16_t y, uint16_t x, t_cub *cl) { - const uint32_t col = 0x00d2d4d6; const uint16_t scl = cl->mlist.scale; cl->img.ptr[x * 4 + - (cl->img.sizeline * (y + cl->wlist.y_size- (cl->mlist.map_h * scl) + (cl->img.sizeline * (y + cl->wlist.y_size - (cl->mlist.map_h * scl) - 20))] = (uint8_t)cl->tlist[16].ptr[cl->tlist[16].tex_x * 4 + 4 * - cl->tlist[16].img_w * cl->tlist[16].tex_y] & col; + cl->tlist[16].img_w * cl->tlist[16].tex_y]; cl->img.ptr[x * 4 + (cl->img.sizeline * (y + cl->wlist.y_size - (cl->mlist.map_h * scl) - 20)) + 1] = (uint8_t)cl->tlist[16].ptr[cl->tlist[16].tex_x * 4 + 4 * - cl->tlist[16].img_w * cl->tlist[16].tex_y + 1] & col; + cl->tlist[16].img_w * cl->tlist[16].tex_y + 1]; cl->img.ptr[x * 4 + (cl->img.sizeline * (y + cl->wlist.y_size - (cl->mlist.map_h * scl) - 20)) + 2] = (uint8_t)cl->tlist[16].ptr[cl->tlist[16].tex_x * 4 + 4 * - cl->tlist[16].img_w * cl->tlist[16].tex_y + 2] & col; + cl->tlist[16].img_w * cl->tlist[16].tex_y + 2]; } static void @@ -70,7 +69,7 @@ static void x = 0; y = cl->wlist.y_size - (cl->mlist.map_h * scl) - 20; - while (x < (cl->mlist.map_w * scl) + 20 + (32 * scl)) + while (x < (cl->mlist.map_w * scl) + 20 + (24 * scl)) { while (y < cl->wlist.y_size) y++; |