aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_scene.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_scene.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c
index c7b07a1..86009f6 100644
--- a/src/ft_draw_scene.c
+++ b/src/ft_draw_scene.c
@@ -16,6 +16,16 @@
#include <stdlib.h>
#include <stdint.h>
+static void
+ ft_put_fps(t_cub *clist)
+{
+ mlx_string_put(clist->wlist.wlx,
+ clist->wlist.winptr,
+ 10, 20,
+ 0x00eeeeee,
+ clist->fps_count);
+}
+
static int8_t
ft_put_stage(t_cub *clist)
{
@@ -61,9 +71,12 @@ void
clist->wlist.winptr, clist->img.img, 0, 0);
if (FT_OS == 2)
mlx_destroy_image(clist->wlist.wlx, clist->img.img);
- if (clist->ishud && clist->mlist.isnlvl)
- if (ft_put_stage(clist) < 0)
+ if (clist->ishud)
+ {
+ ft_put_fps(clist);
+ if (clist->mlist.isnlvl && ft_put_stage(clist) < 0)
ft_error(FT_RET_ALLOC_ERR, FT_ERR_ALLOCATE, clist);
+ }
}
void