Cub3D
Loading...
Searching...
No Matches
init_mlx_window.c
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* init_mlx_window.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/10/12 13:00:59 by kamitsui #+# #+# */
9
/* Updated: 2024/10/12 13:01:13 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "cub3d.h"
14
15
int
init_mlx_window(
t_game
*game)
16
{
17
game->mlx = (
void
*)mlx_init();
18
if
(game->mlx == NULL)
19
return
(EXIT_FAILURE);
20
game->win = (
void
*)mlx_new_window(game->mlx,
21
WIN_WIDTH, WIN_HEIGHT,
"cub3D"
);
22
if
(game->win == NULL)
23
{
24
free(game->mlx);
25
return
(EXIT_FAILURE);
26
}
27
return
(EXIT_SUCCESS);
28
}
s_game
main game
Definition
type_cub3d.h:264
srcs
init_utils
init_mlx_window.c
Generated by
1.9.8