mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
testing with bonus rules
This commit is contained in:
parent
de740ad418
commit
34db19c1a2
2 changed files with 13 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/06 13:16:11 by tchampio #+# #+# */
|
||||
/* Updated: 2025/06/25 18:07:40 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/06/30 16:12:19 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -92,9 +92,9 @@ int main(int argc, char **argv)
|
|||
{
|
||||
t_cub3d_data data;
|
||||
|
||||
data.map = ft_calloc(sizeof(t_mapdata), 1);
|
||||
if (argc < 2)
|
||||
return (ft_printf("Error: Missing cub3d file\n"), 1);
|
||||
data.map = ft_calloc(sizeof(t_mapdata), 1);
|
||||
if (!check_cubfile(argv[1], data.map))
|
||||
return (ft_printf("Error: Wrong map file. Reason: %s\n", data.map->error), 1);
|
||||
data.mlx = mlx_init();
|
||||
|
|
@ -106,5 +106,8 @@ int main(int argc, char **argv)
|
|||
draw_map(data.map, data.mlx_data);
|
||||
mlx_key_hook(data.mlx_win, key_destroy, &data);
|
||||
mlx_put_image_to_window(data.mlx, data.mlx_win, data.mlx_data->img, 0, 0);
|
||||
#ifdef BONUS
|
||||
mlx_string_put(data.mlx, data.mlx_win, 100, 100, 0x00FFFFFF, "compiled with bonuses");
|
||||
#endif
|
||||
mlx_loop(data.mlx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue