diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-22 17:02:43 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-22 17:02:43 +0100 |
commit | 2e1956c5a647de9330925162a10c8619c19d1ce3 (patch) | |
tree | 8aff5c6b9196f03d02a74c8f48a5049c868568c0 /src | |
parent | Norm so far (diff) | |
download | 42-cub3d-2e1956c5a647de9330925162a10c8619c19d1ce3.tar.gz 42-cub3d-2e1956c5a647de9330925162a10c8619c19d1ce3.tar.bz2 42-cub3d-2e1956c5a647de9330925162a10c8619c19d1ce3.tar.xz 42-cub3d-2e1956c5a647de9330925162a10c8619c19d1ce3.tar.zst 42-cub3d-2e1956c5a647de9330925162a10c8619c19d1ce3.zip |
Reduced life number width
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_draw_hud.c | 2 | ||||
-rw-r--r-- | src/ft_draw_life_bar.c | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/ft_draw_hud.c b/src/ft_draw_hud.c index d98ff31..868d149 100644 --- a/src/ft_draw_hud.c +++ b/src/ft_draw_hud.c @@ -45,7 +45,7 @@ static void x = 0; cl->tlist[16].tex_y = (y * y_ratio) >> 16; while (x < (uint16_t)((cl->mlist.map_w - * cl->mlist.scale) + 20 + (32 * cl->mlist.scale))) + * cl->mlist.scale) + 20 + (24 * cl->mlist.scale))) { cl->tlist[16].tex_x = (x * x_ratio) >> 16; ft_put_image_back_to_ptr(y, x, cl); diff --git a/src/ft_draw_life_bar.c b/src/ft_draw_life_bar.c index 7aa5afc..c2aa68f 100644 --- a/src/ft_draw_life_bar.c +++ b/src/ft_draw_life_bar.c @@ -73,16 +73,16 @@ static void if (len == 3) { ft_put_next_number(num[0], 0, cl); - ft_put_next_number(num[1], (1 * (32 * scl) / 4), cl); - ft_put_next_number(num[2], (2 * (32 * scl) / 4), cl); + ft_put_next_number(num[1], (1 * (24 * scl) / 4), cl); + ft_put_next_number(num[2], (2 * (24 * scl) / 4), cl); } else if (len == 2) { - ft_put_next_number(num[0], (1 * (32 * scl) / 4), cl); - ft_put_next_number(num[1], (2 * (32 * scl) / 4), cl); + ft_put_next_number(num[0], (1 * (24 * scl) / 4), cl); + ft_put_next_number(num[1], (2 * (24 * scl) / 4), cl); } else - ft_put_next_number(num[0], (2 * (32 * scl) / 4), cl); + ft_put_next_number(num[0], (2 * (24 * scl) / 4), cl); } static void @@ -92,17 +92,17 @@ static void int16_t y; const int16_t scl = cl->mlist.scale; - x = ((cl->mlist.map_w * scl) + 20) + (32 * scl) - ((32 * scl) / 4); + x = ((cl->mlist.map_w * scl) + 20) + (24 * scl) - ((24 * scl) / 4); y = cl->wlist.y_size - (cl->mlist.map_h * scl) - 10; while (y < (int16_t)(cl->wlist.y_size - 10)) { - x = ((cl->mlist.map_w * scl) + 20) + (32 * scl) - ((32 * scl) / 4); - while (x < (int16_t)((cl->mlist.map_w * scl) + 10 + ((32 * scl)))) + x = ((cl->mlist.map_w * scl) + 20) + (24 * scl) - ((24 * scl) / 4); + while (x < (int16_t)((cl->mlist.map_w * scl) + 10 + ((24 * scl)))) x++; y++; } y -= cl->wlist.y_size - (cl->mlist.map_h * scl) - 10; - x -= ((cl->mlist.map_w * scl) + 20) + (32 * scl) - ((32 * scl) / 4); + x -= ((cl->mlist.map_w * scl) + 20) + (24 * scl) - ((24 * scl) / 4); y = (y == 0) ? (1) : (y); x = (x == 0) ? (1) : (x); cl->h = y; @@ -119,6 +119,6 @@ void calc = ((float)cl->plist.life / (float)FT_STRT_LIFE) * 100.0; ft_sprintf(num, "%hd", (int16_t)calc); ft_get_hw(cl); - ft_put_next_number(58, (3 * (32 * scl) / 4), cl); + ft_put_next_number(58, (3 * (24 * scl) / 4), cl); ft_put_image_from_number(num, cl); } |