aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-21 18:21:32 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-21 18:21:32 +0100
commitcec9b50f00a08d4c72cf4bcbb426fcfd76c8e80b (patch)
treedce83e3f9db785002b9694da4ac5e2ea43f4ad9e /src
parentGreat (diff)
download42-cub3d-cec9b50f00a08d4c72cf4bcbb426fcfd76c8e80b.tar.gz
42-cub3d-cec9b50f00a08d4c72cf4bcbb426fcfd76c8e80b.tar.bz2
42-cub3d-cec9b50f00a08d4c72cf4bcbb426fcfd76c8e80b.tar.xz
42-cub3d-cec9b50f00a08d4c72cf4bcbb426fcfd76c8e80b.tar.zst
42-cub3d-cec9b50f00a08d4c72cf4bcbb426fcfd76c8e80b.zip
Bug fix
Diffstat (limited to 'src')
-rw-r--r--src/ft_draw_life_bar.c3
-rw-r--r--src/ft_warp_level.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ft_draw_life_bar.c b/src/ft_draw_life_bar.c
index c8cf629..c81e550 100644
--- a/src/ft_draw_life_bar.c
+++ b/src/ft_draw_life_bar.c
@@ -49,7 +49,8 @@ static void
{
cl->tnum[n - 48].tex_y = ((y * y_ratio) >> 16);
x = ((cl->mlist.map_w * scl) + 20) + x_offset;
- while (x < (int16_t)((cl->mlist.map_w * scl) + 10 + ((32 * scl) / 4) + x_offset))
+ while (x < (int16_t)((cl->mlist.map_w * scl)
+ + 10 + ((32 * scl) / 4) + x_offset))
{
cl->tnum[n - 48].tex_x = ((x * x_ratio) >> 16);
if (cl->tnum[n - 48].ptr[cl->tnum[n - 48].tex_x * 4 + 4 *
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index 107e709..af05b29 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -44,7 +44,7 @@ static void
static void
ft_player_keepings(t_cub *cl)
{
- int8_t tmp_life;
+ int16_t tmp_life;
uint8_t tmp_has[2];
int8_t tmp_handles;
@@ -135,6 +135,7 @@ int8_t
char *tmp_mup;
uint8_t isoldmus;
+ ft_printf("%hd\n", cl->plist.life);
if (!(next_path = (char *)malloc((ft_strlen(path) + 1) * sizeof(char))))
return (-1);
ft_sprintf(next_path, "%s", path);
@@ -154,5 +155,6 @@ int8_t
ft_wall_tex_init(cl);
ft_weap_tex_init(cl);
ft_memdel((void*)&next_path);
+ ft_printf("%hd\n", cl->plist.life);
return (0);
}