feat: load zombie sprites from map

This commit is contained in:
Khaïs COLIN 2025-08-18 13:21:52 +02:00 committed by Theo Champion
parent 742a014597
commit 1966892c3e
7 changed files with 92 additions and 17 deletions

View file

@ -6,12 +6,13 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/08/18 13:22:50 by kcolin #+# #+# */
/* Updated: 2025/08/18 13:25:07 by kcolin ### ########.fr */
/* Updated: 2025/08/18 13:57:39 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
#include "move_sprites.h"
#include "sprite.h"
#include "../../libft/includes/libft.h"
void move_sprites(t_cub3d_data *data)
{
@ -21,7 +22,7 @@ void move_sprites(t_cub3d_data *data)
while (i < data->sprite_counter)
{
if (data->sprite_list[i]->sprite_type == ZOMBIE)
data->sprite_list[i]->sprite_pos_x += MOVEMENT_SPEED * data->delta;
data->sprite_list[i]->x += MOVEMENT_SPEED * data->delta;
i++;
}
}