summaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
authorDominik Kaiser2024-06-10 16:39:55 +0200
committerDominik Kaiser2024-06-10 16:39:55 +0200
commitff7d60ad044e98e1e2e14170b5804d141856a949 (patch)
treedd896d064a49bb399b7c942fde49ae0bf892263b /src/init.c
parent81bfaf91dedc75b758a9057a2b7c23adc5a68e93 (diff)
downloadso_long-ff7d60ad044e98e1e2e14170b5804d141856a949.tar.gz
so_long-ff7d60ad044e98e1e2e14170b5804d141856a949.zip
Cleanup
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/init.c b/src/init.c
index 524e2ab..c4600b0 100644
--- a/src/init.c
+++ b/src/init.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/09 14:50:09 by dkaiser #+# #+# */
-/* Updated: 2024/05/29 16:16:13 by dkaiser ### ########.fr */
+/* Updated: 2024/06/10 15:55:28 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,7 +20,8 @@ int init(t_game *game)
{
game->input_direction = ZERO;
game->map.tile_size = (t_ivector){48, 48};
- game->mlx = mlx_init(game->map.grid_size.x * game->map.tile_size.x, game->map.grid_size.y * game->map.tile_size.y, "so_long", false);
+ game->mlx = mlx_init(game->map.grid_size.x * game->map.tile_size.x,
+ game->map.grid_size.y * game->map.tile_size.y, "so_long", false);
init_hooks(game);
init_player(game);
return (0);
@@ -43,6 +44,8 @@ static void init_player(t_game *game)
game->map.tile_size);
player->velocity = (t_vector){0, 0};
player->size = (t_ivector){44, 44};
+ player->steps = 0;
+ ft_printf("Steps: %d\n", game->player.steps);
player->img = mlx_texture_to_image(game->mlx, texture);
mlx_resize_image(player->img, player->size.x, player->size.y);
mlx_image_to_window(game->mlx, player->img, player->position.x,