aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_fps_count.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-30 13:54:11 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-30 13:54:11 +0200
commita6dbe3b5710f719b3f02ba0044a72c64ee4155ac (patch)
treec1f64e3cfec00bd5b20d9f624370644fc8e62ef4 /src/ft_get_fps_count.c
parentBetter sword (diff)
download42-cub3d-a6dbe3b5710f719b3f02ba0044a72c64ee4155ac.tar.gz
42-cub3d-a6dbe3b5710f719b3f02ba0044a72c64ee4155ac.tar.bz2
42-cub3d-a6dbe3b5710f719b3f02ba0044a72c64ee4155ac.tar.xz
42-cub3d-a6dbe3b5710f719b3f02ba0044a72c64ee4155ac.tar.zst
42-cub3d-a6dbe3b5710f719b3f02ba0044a72c64ee4155ac.zip
Bug fix
Diffstat (limited to 'src/ft_get_fps_count.c')
-rw-r--r--src/ft_get_fps_count.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/ft_get_fps_count.c b/src/ft_get_fps_count.c
index f7f0177..1f717e8 100644
--- a/src/ft_get_fps_count.c
+++ b/src/ft_get_fps_count.c
@@ -1,7 +1,7 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
-/* ft_key_loop.c :+: :+: :+: */
+/* ft_get_fps_count.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
@@ -16,25 +16,6 @@
#include <stdint.h>
#include <time.h>
-static float
- ft_clock_to_ms(clock_t ticks)
-{
- return ((ticks / (float)CLOCKS_PER_SEC) * 1000.0);
-}
-
-static void
- ft_handle_firing(clock_t dt, t_cub *cl)
-{
- static clock_t curr_time = 0;
-
- curr_time += dt;
- if (dt > 0 && ft_clock_to_ms(curr_time) > 300.0)
- {
- cl->plist.fire = 0;
- curr_time -= CLOCKS_PER_SEC;
- }
-}
-
void
ft_get_fps_count(clock_t dt, t_cub *cl)
{