From: Dominik Kaiser Date: Wed, 15 May 2024 13:10:55 +0000 (+0200) Subject: Resolve some norme errors X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=98eb4ded98daf048a97c59b9bd23b0068bd4ba32;p=42%2Fso_long.git Resolve some norme errors --- diff --git a/include/so_long.h b/include/so_long.h index 585527e..4a3c924 100644 --- a/include/so_long.h +++ b/include/so_long.h @@ -6,7 +6,7 @@ /* By: dkaiser mlx, wall_texture); @@ -33,7 +33,8 @@ int draw_map(t_game *game) while (y < game->map.grid_size.y) { if (game->map.tiles[y * game->map.grid_size.x + x] == WALL) - mlx_image_to_window(game->mlx, wall_image, x * game->map.tile_size.x, y * game->map.tile_size.y); + mlx_image_to_window(game->mlx, wall_image, x + * game->map.tile_size.x, y * game->map.tile_size.y); y++; } x++; diff --git a/src/init.c b/src/init.c index 9926826..e7fedf2 100644 --- a/src/init.c +++ b/src/init.c @@ -6,7 +6,7 @@ /* By: dkaiser mlx = mlx_init(1920, 1080, "so_long", false); // TODO: make size and title dynamic game->input_direction = ZERO; @@ -36,7 +35,7 @@ static void init_hooks(t_game *game) static void init_actor(t_game *game) { mlx_texture_t *texture; - t_actor *player; + t_actor *player; player = &game->player; texture = mlx_load_png("textures/player.png"); @@ -49,5 +48,5 @@ static void init_actor(t_game *game) 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, - player->position.y); + player->position.y); } diff --git a/src/map_utils.c b/src/map_utils.c index 82acaa9..6d8fbd9 100644 --- a/src/map_utils.c +++ b/src/map_utils.c @@ -6,7 +6,7 @@ /* By: dkaiser tiles[y * map->grid_size.x + x]; + return (map->tiles[y * map->grid_size.x + x]); }