diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-08 16:01:15 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-08 16:01:15 +0100 |
commit | ecfd8650cde7c9a92c5685150df46d7a3be19900 (patch) | |
tree | 2efa1afe47807d2c28e399efc4f18cb7c7457eaa /src/ft_draw_scene.c | |
parent | Normed (diff) | |
download | 42-cub3d-ecfd8650cde7c9a92c5685150df46d7a3be19900.tar.gz 42-cub3d-ecfd8650cde7c9a92c5685150df46d7a3be19900.tar.bz2 42-cub3d-ecfd8650cde7c9a92c5685150df46d7a3be19900.tar.xz 42-cub3d-ecfd8650cde7c9a92c5685150df46d7a3be19900.tar.zst 42-cub3d-ecfd8650cde7c9a92c5685150df46d7a3be19900.zip |
Less retarded scaling and shit
Diffstat (limited to 'src/ft_draw_scene.c')
-rw-r--r-- | src/ft_draw_scene.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c index bcbf8a3..087457d 100644 --- a/src/ft_draw_scene.c +++ b/src/ft_draw_scene.c @@ -20,19 +20,19 @@ static int8_t { uint8_t len; char *str; - uint32_t x; + float x; uint32_t y; - x = 15; - y = clist->wlist.y_size - (clist->mlist.map_h * clist->mlist.scale) - 20; + x = 0.5 * clist->mlist.scale; + y = clist->wlist.y_size - (clist->mlist.map_h * clist->mlist.scale) - 25; 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, + (uint32_t)x, y, + 0x002288da, str); ft_memdel((void**)&str); return (0); |