diff options
-rw-r--r-- | src/ft_draw_life_bar.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/ft_draw_life_bar.c b/src/ft_draw_life_bar.c index 85db1ec..25d5ebe 100644 --- a/src/ft_draw_life_bar.c +++ b/src/ft_draw_life_bar.c @@ -19,19 +19,19 @@ static void { const int16_t scl = cl->mlist.scale; - cl->img.ptr[(x + (int16_t)((cl->mlist.map_w * scl) - + 10 + ((32 * scl) / 4))) * 4 + (cl->img.sizeline * (y + - cl->wlist.y_size - (cl->mlist.map_h * scl) - 10))] = + cl->img.ptr[(x + (int16_t)((cl->mlist.map_w * scl) + 10)) * 4 + + (cl->img.sizeline * (y + cl->wlist.y_size - (cl->mlist.map_h * scl) + - 10))] = (uint8_t)cl->tnum[id].ptr[cl->tnum[id].tex_x * 4 + 4 * cl->tnum[id].img_w * cl->tnum[id].tex_y]; - cl->img.ptr[(x + (int16_t)((cl->mlist.map_w * scl) - + 10 + ((32 * scl) / 4))) * 4 + (cl->img.sizeline * (y + - cl->wlist.y_size - (cl->mlist.map_h * scl) - 10)) + 1] = + cl->img.ptr[(x + (int16_t)((cl->mlist.map_w * scl) + 10)) * 4 + + (cl->img.sizeline * (y + cl->wlist.y_size - (cl->mlist.map_h * scl) + - 10)) + 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]; - cl->img.ptr[(x + (int16_t)((cl->mlist.map_w * scl) - + 10 + ((32 * scl) / 4))) * 4 + (cl->img.sizeline * (y + - cl->wlist.y_size - (cl->mlist.map_h * scl) - 10)) + 2] = + cl->img.ptr[(x + (int16_t)((cl->mlist.map_w * scl) + 10)) * 4 + + (cl->img.sizeline * (y + cl->wlist.y_size - (cl->mlist.map_h * scl) + - 10)) + 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]; } @@ -43,7 +43,6 @@ static void int32_t y_ratio; int16_t x; int16_t y; - /* const int16_t scl = cl->mlist.scale; */ x_ratio = (int)(((cl->tnum[n - 48].img_w) << 16) / cl->w) + 1; y_ratio = (int)(((cl->tnum[n - 48].img_h) << 16) / cl->h) + 1; @@ -51,10 +50,7 @@ static void while (y < cl->h) { cl->tnum[n - 48].tex_y = ((y * y_ratio) >> 16); - /* x = ((cl->mlist.map_w * scl) + 20); */ x = 0; - /* while (x < (int16_t)((cl->mlist.map_w * scl) */ - /* + 10 + ((32 * scl) / 4))) */ while (x < cl->w) { cl->tnum[n - 48].tex_x = ((x * x_ratio) >> 16); |