diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 22:06:00 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 22:06:00 +0100 |
commit | c786ace26fb4a041a43b2149b61c11b1c75ba1ca (patch) | |
tree | 69f33f8a7e67a5f6214a38b15eea3541b317d7d4 /src/ft_draw_ammo_bar.c | |
parent | now pthread (diff) | |
download | 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.gz 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.bz2 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.xz 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.zst 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.zip |
Some threads
Diffstat (limited to 'src/ft_draw_ammo_bar.c')
-rw-r--r-- | src/ft_draw_ammo_bar.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ft_draw_ammo_bar.c b/src/ft_draw_ammo_bar.c index bf8dbda..febeb55 100644 --- a/src/ft_draw_ammo_bar.c +++ b/src/ft_draw_ammo_bar.c @@ -22,18 +22,18 @@ static void cl->img.ptr[(x + 10) * 4 + (cl->img.sizeline * (int)(y + ((cl->wlist.y_size - 10) - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 40)))] = - (uint8_t)cl->tnum[id].ptr[cl->tnum[id].tex_x * 4 + 4 * - cl->tnum[id].img_w * cl->tnum[id].tex_y]; + (uint8_t)cl->tnum[id].ptr[cl->tnum[id].tex_x_alt * 4 + 4 * + cl->tnum[id].img_w * cl->tnum[id].tex_y_alt]; cl->img.ptr[(x + 10) * 4 + (cl->img.sizeline * (int)(y + ((cl->wlist.y_size - 10) - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 40))) + 1] = - (uint8_t)cl->tnum[id].ptr[cl->tnum[id].tex_x * 4 + 4 * - cl->tnum[id].img_w * cl->tnum[id].tex_y + 1]; + (uint8_t)cl->tnum[id].ptr[cl->tnum[id].tex_x_alt * 4 + 4 * + cl->tnum[id].img_w * cl->tnum[id].tex_y_alt + 1]; cl->img.ptr[(x + 10) * 4 + (cl->img.sizeline * (int)(y + ((cl->wlist.y_size - 10) - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 40))) + 2] = - (uint8_t)cl->tnum[id].ptr[cl->tnum[id].tex_x * 4 + 4 * - cl->tnum[id].img_w * cl->tnum[id].tex_y + 2]; + (uint8_t)cl->tnum[id].ptr[cl->tnum[id].tex_x_alt * 4 + 4 * + cl->tnum[id].img_w * cl->tnum[id].tex_y_alt + 2]; } static void @@ -49,13 +49,13 @@ static void y = 0; while (y < cl->ammo_num_h) { - cl->tnum[n - 48].tex_y = ((y * y_ratio) >> 16); + cl->tnum[n - 48].tex_y_alt = ((y * y_ratio) >> 16); x = 0; while (x < cl->ammo_num_w) { - cl->tnum[n - 48].tex_x = ((x * x_ratio) >> 16); - if (cl->tnum[n - 48].ptr[cl->tnum[n - 48].tex_x * 4 + 4 * - cl->tnum[n - 48].img_h * cl->tnum[n - 48].tex_y]) + cl->tnum[n - 48].tex_x_alt = ((x * x_ratio) >> 16); + if (cl->tnum[n - 48].ptr[cl->tnum[n - 48].tex_x_alt * 4 + 4 * + cl->tnum[n - 48].img_h * cl->tnum[n - 48].tex_y_alt]) ft_draw_tnum(n - 48, y, x + x_offset, cl); x++; } |