diff options
| author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-21 17:18:25 +0100 | 
|---|---|---|
| committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-21 17:18:25 +0100 | 
| commit | 30ace729d43da4784eb22bd93e962e09805a26b6 (patch) | |
| tree | 7220c9c2444fd6140a5adf500d961c5dd82108eb | |
| parent | Well well well (diff) | |
| download | 42-cub3d-30ace729d43da4784eb22bd93e962e09805a26b6.tar.gz 42-cub3d-30ace729d43da4784eb22bd93e962e09805a26b6.tar.bz2 42-cub3d-30ace729d43da4784eb22bd93e962e09805a26b6.tar.xz 42-cub3d-30ace729d43da4784eb22bd93e962e09805a26b6.tar.zst 42-cub3d-30ace729d43da4784eb22bd93e962e09805a26b6.zip  | |
Trying the float method
Diffstat (limited to '')
| -rw-r--r-- | src/ft_draw_life_bar.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ft_draw_life_bar.c b/src/ft_draw_life_bar.c index 436b13a..42127d4 100644 --- a/src/ft_draw_life_bar.c +++ b/src/ft_draw_life_bar.c @@ -27,8 +27,8 @@  static void  	ft_put_percent_image(uint16_t h, uint16_t w, t_cub *cl)  { -	int32_t	x_ratio; -	int32_t	y_ratio; +	float	x_ratio; +	float	y_ratio;  	int16_t	x;  	int16_t	y;  	const int16_t	scl = cl->mlist.scale; @@ -78,7 +78,7 @@ static void  			x++;  		y++;  	} -	/* y -= cl->wlist.y_size - (cl->mlist.map_h * scl); */ +	y -= cl->wlist.y_size - (cl->mlist.map_h * scl) - 10;  	x -= ((cl->mlist.map_w * scl) + 20) + (32 * scl) - ((32 * scl) / 4);  	ft_printf("h %hu | w %hu\n", y, x);  	ft_put_percent_image(y, x, cl);  | 
