aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft_get_sprite_spawns.c6
-rw-r--r--src/ft_shoot.c14
2 files changed, 3 insertions, 17 deletions
diff --git a/src/ft_get_sprite_spawns.c b/src/ft_get_sprite_spawns.c
index b00ef97..c2db153 100644
--- a/src/ft_get_sprite_spawns.c
+++ b/src/ft_get_sprite_spawns.c
@@ -23,7 +23,7 @@ void
y = 0;
i = 0;
- clist->mlist.sprite_nbr[s_n] = 0;
+ clist->mlist.sprite_nbr[s_n] = 0;
while (clist->mlist.map[++y])
{
while (clist->mlist.map[y][++x])
@@ -39,7 +39,7 @@ void
x = 0;
}
if (clist->sprites[s_n][(i - 1 < 0) ? (0) : (i - 1)].s_pos_x != 0
- && s_n + 1 < 7)
+ && s_n + 1 < 7)
{
ft_get_next_sprite(clist, s_n + 1, c + 1, 0);
}
@@ -55,7 +55,7 @@ void
x = 1;
y = 1;
i = 0;
- clist->mlist.sprite_nbr[0] = 0;
+ clist->mlist.sprite_nbr[0] = 0;
while (clist->mlist.map[y])
{
while (clist->mlist.map[y][x])
diff --git a/src/ft_shoot.c b/src/ft_shoot.c
index 73a9617..084d8d2 100644
--- a/src/ft_shoot.c
+++ b/src/ft_shoot.c
@@ -15,19 +15,6 @@
#include <stdio.h>
static void
- ft_reset_sprites(t_cub *cl)
-{
- uint16_t i;
- uint16_t tmp;
-
- tmp = cl->mlist.sprite_var;
- while(++i < tmp + 1)
- {
- ft_bzero(cl->sprites[i], sizeof(t_sprite));
- }
-}
-
-static void
ft_hitscan(t_cub *cl, uint16_t hit)
{
while (hit == 0)
@@ -49,7 +36,6 @@ static void
{
hit = 1;
cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy] = '0';
- ft_reset_sprites(cl);
ft_get_sprite_spawn(cl);
}
else if (ft_ischarset("1",