aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_heals_extra.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-29 17:38:46 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-29 17:38:46 +0200
commita07392fc219afc45000201d2f495694ad9b82763 (patch)
tree0eb3f2b9003ad7ceae4692242e46de56e55053b0 /src/ft_draw_heals_extra.c
parentRemoved skybox shit (diff)
parentNorm (diff)
download42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.gz
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.bz2
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.xz
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.zst
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.zip
Merge branch 'fix-details'
Diffstat (limited to 'src/ft_draw_heals_extra.c')
-rw-r--r--src/ft_draw_heals_extra.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/ft_draw_heals_extra.c b/src/ft_draw_heals_extra.c
deleted file mode 100644
index 1e5a775..0000000
--- a/src/ft_draw_heals_extra.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* ************************************************************************** */
-/* */
-/* ::: :::::::: */
-/* ft_draw_heals_extra.c :+: :+: :+: */
-/* +:+ +:+ +:+ */
-/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
-/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/02/24 20:22:45 by rbousset #+# #+# */
-/* Updated: 2020/03/09 18:56:01 by rbousset ### ########lyon.fr */
-/* */
-/* ************************************************************************** */
-
-#include <cub3d.h>
-#include <stdint.h>
-
-void
- ft_calc_heal(t_cub *cl)
-{
- t_sprite sprite;
- int32_t i;
-
- i = 0;
- while (i < cl->mlist.heals_nbr)
- {
- sprite = cl->heals[i];
- sprite.spritey = sprite.s_pos_x - (cl->plist.pos_x - 0.5);
- sprite.spritex = sprite.s_pos_y - (cl->plist.pos_y - 0.5);
- sprite.invdet = 1.0 / (cl->plist.plane_x * cl->plist.dir_y
- - cl->plist.dir_x * cl->plist.plane_y);
- sprite.transformx = sprite.invdet * (cl->plist.dir_y * sprite.spritex
- - cl->plist.dir_x * sprite.spritey);
- sprite.transformy = sprite.invdet * (-cl->plist.plane_y * sprite.spritex
- + cl->plist.plane_x * sprite.spritey);
- sprite.spritescreenx = (int)(cl->wlist.x_size / 2) *
- (1 + sprite.transformx / sprite.transformy);
- ft_sprite_h_w(cl, &sprite);
- ft_draw_heals(cl, &sprite);
- i++;
- }
-}