diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-08 15:28:26 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-08 15:28:26 +0100 |
commit | 3205176d60f52ce487c3e3c5efaa89e15b9dd5ca (patch) | |
tree | 4a41010a24a01be60eb11a77e3556d7643b67769 /src/ft_draw_scene.c | |
parent | Norme iksde (diff) | |
download | 42-cub3d-3205176d60f52ce487c3e3c5efaa89e15b9dd5ca.tar.gz 42-cub3d-3205176d60f52ce487c3e3c5efaa89e15b9dd5ca.tar.bz2 42-cub3d-3205176d60f52ce487c3e3c5efaa89e15b9dd5ca.tar.xz 42-cub3d-3205176d60f52ce487c3e3c5efaa89e15b9dd5ca.tar.zst 42-cub3d-3205176d60f52ce487c3e3c5efaa89e15b9dd5ca.zip |
Normed
Diffstat (limited to 'src/ft_draw_scene.c')
-rw-r--r-- | src/ft_draw_scene.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c index e7895f5..bcbf8a3 100644 --- a/src/ft_draw_scene.c +++ b/src/ft_draw_scene.c @@ -18,21 +18,22 @@ static int8_t ft_put_stage(t_cub *clist) { - const uint32_t x = 15; - const uint32_t y = clist->wlist.y_size - - (clist->mlist.map_h * clist->mlist.scale) - 20; - uint8_t len; - char *str; + uint8_t len; + char *str; + uint32_t x; + uint32_t y; + x = 15; + y = clist->wlist.y_size - (clist->mlist.map_h * clist->mlist.scale) - 20; len = 6 + ft_uintlen(clist->currlvl); if (!(str = (char*)malloc((len + 1) * sizeof(char)))) return (-1); ft_sprintf(str, "Stage %hd", clist->currlvl); mlx_string_put(clist->wlist.wlx, - clist->wlist.winptr, - x, y, - 0x00ff0000, - str); + clist->wlist.winptr, + x, y, + 0x00ff0000, + str); ft_memdel((void**)&str); return (0); } |