aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_key_loop.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-31 14:29:18 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-31 14:29:18 +0200
commit137397e014be24d48ccc60e36af21ffc25229b77 (patch)
tree4cc7e8a39c7b92756efceea8ea155d5de29317f3 /src/ft_key_loop.c
parentNigga ain't gonna stop shootin me (diff)
download42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.gz
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.bz2
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.xz
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.zst
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.zip
Fixed that gangsta
Diffstat (limited to 'src/ft_key_loop.c')
-rw-r--r--src/ft_key_loop.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index dad6467..281c81e 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -16,26 +16,7 @@
#include <stddef.h>
#include <stdint.h>
#include <time.h>
-
-static void
- ft_check_bad_boy_shoot(t_cub *cl)
-{
- int8_t i;
-
- i = 0;
- while (i < cl->mlist.sprite_nbr[13])
- {
- if (cl->bad_boy[i].does == 2)
- {
- cl->sfx[11].sfx_play(cl->sfx);
- if (FT_OS == 1)
- ft_macos_suffer_animation(FT_ENMY_DAMAGE_AMOUNT, cl);
- else
- ft_linux_suffer_animation(FT_ENMY_DAMAGE_AMOUNT, cl);
- }
- i++;
- }
-}
+#include <unistd.h>
int
ft_key_loop(t_cub *cl)
@@ -56,5 +37,6 @@ int
begin_frame = clock();
ft_draw_scene(cl);
ft_timings(begin_frame, cl);
+ ft_get_fps_count(begin_frame, cl);
return (0);
}