mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
feat: basic zombie movement (very bad)
This commit is contained in:
parent
6e4374dc3e
commit
742a014597
4 changed files with 52 additions and 2 deletions
27
src/sprites/move_sprites.c
Normal file
27
src/sprites/move_sprites.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* move_sprites.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/08/18 13:22:50 by kcolin #+# #+# */
|
||||
/* Updated: 2025/08/18 13:25:07 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "move_sprites.h"
|
||||
#include "sprite.h"
|
||||
|
||||
void move_sprites(t_cub3d_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (i < data->sprite_counter)
|
||||
{
|
||||
if (data->sprite_list[i]->sprite_type == ZOMBIE)
|
||||
data->sprite_list[i]->sprite_pos_x += MOVEMENT_SPEED * data->delta;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue