aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 17:06:10 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 17:06:10 +0100
commitb784a3592da04ad30258b6c39fab8f233fb05098 (patch)
tree42b6064837de2364386167dab362b938ce48b1ee
parentGreat (diff)
download42-cub3d-b784a3592da04ad30258b6c39fab8f233fb05098.tar.gz
42-cub3d-b784a3592da04ad30258b6c39fab8f233fb05098.tar.bz2
42-cub3d-b784a3592da04ad30258b6c39fab8f233fb05098.tar.xz
42-cub3d-b784a3592da04ad30258b6c39fab8f233fb05098.tar.zst
42-cub3d-b784a3592da04ad30258b6c39fab8f233fb05098.zip
Good tweak
-rw-r--r--src/ft_draw_ammo_back.c10
-rw-r--r--src/ft_draw_ammo_bar.c12
-rw-r--r--src/ft_draw_ammo_caption.c12
3 files changed, 17 insertions, 17 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;
diff --git a/src/ft_draw_ammo_bar.c b/src/ft_draw_ammo_bar.c
index 667eee9..bf8dbda 100644
--- a/src/ft_draw_ammo_bar.c
+++ b/src/ft_draw_ammo_bar.c
@@ -21,17 +21,17 @@ 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)) - 5)))] =
+ (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];
cl->img.ptr[(x + 10) * 4 +
(cl->img.sizeline * (int)(y + ((cl->wlist.y_size - 10) -
- (2 * ((cl->mlist.map_h * scl) / 1.3)) - 5))) + 1] =
+ (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];
cl->img.ptr[(x + 10) * 4 +
(cl->img.sizeline * (int)(y + ((cl->wlist.y_size - 10) -
- (2 * ((cl->mlist.map_h * scl) / 1.3)) - 5))) + 2] =
+ (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];
}
@@ -99,14 +99,14 @@ static void
const int16_t scl = cl->mlist.scale;
x = 10;
- y = (cl->wlist.y_size - 10) - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 5;
- while (y < (int16_t)(cl->wlist.y_size - (cl->mlist.map_h * scl) - 30))
+ y = (cl->wlist.y_size - 10) - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 40;
+ while (y < (int16_t)(cl->wlist.y_size - (cl->mlist.map_h * scl)) - 30)
{
while (x < (int16_t)((cl->mlist.map_w * scl) / 4) + 20)
x++;
y++;
}
- y -= (cl->wlist.y_size - 10) - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 5;
+ y -= (cl->wlist.y_size - 10) - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 40;
x -= 10;
y = (y <= 0) ? (1) : (y);
x = (x <= 0) ? (1) : (x);
diff --git a/src/ft_draw_ammo_caption.c b/src/ft_draw_ammo_caption.c
index 0d35c34..96e37a2 100644
--- a/src/ft_draw_ammo_caption.c
+++ b/src/ft_draw_ammo_caption.c
@@ -20,17 +20,17 @@ static void
cl->img.ptr[(x + 20) * 4 +
(cl->img.sizeline * (y + cl->wlist.y_size -
- (2 * ((cl->mlist.map_h * scl) - 20) - 10)))] =
+ (2 * ((cl->mlist.map_h * scl)) + 20 - 10)))] =
(uint8_t)cl->tlist[22].ptr[cl->tlist[22].tex_x * 4 + 4 *
cl->tlist[22].img_w * cl->tlist[22].tex_y];
cl->img.ptr[(x + 20) * 4 +
(cl->img.sizeline * (y + cl->wlist.y_size -
- (2 * ((cl->mlist.map_h * scl) - 20) - 10))) + 1] =
+ (2 * ((cl->mlist.map_h * scl)) + 20 - 10))) + 1] =
(uint8_t)cl->tlist[22].ptr[cl->tlist[22].tex_x * 4 + 4 *
cl->tlist[22].img_w * cl->tlist[22].tex_y + 1];
cl->img.ptr[(x + 20) * 4 +
(cl->img.sizeline * (y + cl->wlist.y_size -
- (2 * ((cl->mlist.map_h * scl) - 20) - 10))) + 2] =
+ (2 * ((cl->mlist.map_h * scl)) + 20 - 10))) + 2] =
(uint8_t)cl->tlist[22].ptr[cl->tlist[22].tex_x * 4 + 4 *
cl->tlist[22].img_w * cl->tlist[22].tex_y + 2];
}
@@ -70,15 +70,15 @@ static void
const int16_t scl = cl->mlist.scale;
x = 20;
- y = cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl) - 20) - 10);
+ y = cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl)) + 20 - 10);
while (y < (int16_t)((cl->wlist.y_size - 10)
- - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 10))
+ - (2 * ((cl->mlist.map_h * scl) / 1.3)) - 40))
{
while (x < (int16_t)((cl->mlist.map_w * scl) + 5))
x++;
y++;
}
- y -= cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl) - 20) - 10);
+ y -= cl->wlist.y_size - (2 * ((cl->mlist.map_h * scl)) + 20 - 10);
x -= 20;
y = (y <= 0) ? (1) : (y);
x = (x <= 0) ? (1) : (x);