aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_ammo_back.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_draw_ammo_back.c')
-rw-r--r--src/ft_draw_ammo_back.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_draw_ammo_back.c b/src/ft_draw_ammo_back.c
index 81fd92f..b9bb408 100644
--- a/src/ft_draw_ammo_back.c
+++ b/src/ft_draw_ammo_back.c
@@ -20,17 +20,17 @@ static void
cl->img.ptr[x * 4 +
(cl->img.sizeline * (y + cl->wlist.y_size -
- (2 * ((cl->mlist.map_h * scl) - 20))))] =
+ (2 * ((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];
cl->img.ptr[x * 4 +
(cl->img.sizeline * (y + cl->wlist.y_size -
- (2 * ((cl->mlist.map_h * scl) - 20)))) + 1] =
+ (2 * ((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];
cl->img.ptr[x * 4 +
(cl->img.sizeline * (y + cl->wlist.y_size -
- (2 * ((cl->mlist.map_h * scl) - 20)))) + 2] =
+ (2 * ((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];
}
@@ -68,14 +68,14 @@ static void
const uint16_t scl = cl->mlist.scale;
x = 0;
- y = cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl) - 20));
+ y = cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl)) + 20);
while (x < (cl->mlist.map_w * scl) + 20)
{
while (y < cl->wlist.y_size - (cl->mlist.map_h * scl) - 20)
y++;
x++;
}
- y -= cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl) - 20));
+ y -= cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl)) + 20);
y = (y <= 0) ? (1) : (y);
x = (x <= 0) ? (1) : (x);
cl->amm_back_h = y;