diff --git a/include/meta.h b/include/meta.h index ae70eaa..7c2a36f 100644 --- a/include/meta.h +++ b/include/meta.h @@ -6,7 +6,7 @@ /* By: jboeve +#+ */ /* +#+ */ /* Created: 2023/11/01 20:07:37 by jboeve#+##+# */ -/* Updated: 2024/01/17 23:56:13 by joppe ######## odam.nl */ +/* Updated: 2024/01/18 11:13:46 by jboeve ######## odam.nl */ /**/ /* ************************************************************************** */ @@ -56,8 +56,6 @@ #define WINDOW_WIDTH 1280 #define WINDOW_HEIGHT 720 -#define WINDOW_TITLE "Gammoe" - // Game @@ -199,6 +197,7 @@ typedef struct s_meta { uint32_t fps; t_map map; t_attr attributes; + const char *scene_name; char *map_element; } t_meta; diff --git a/src/cub3d.c b/src/cub3d.c index 16fd9bd..d1cdad1 100644 --- a/src/cub3d.c +++ b/src/cub3d.c @@ -6,7 +6,7 @@ /* By: yzaim +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/08 15:24:47 by yzaim #+# #+# */ -/* Updated: 2024/01/17 16:28:16 by jboeve ######## odam.nl */ +/* Updated: 2024/01/18 10:45:29 by jboeve ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -52,7 +52,7 @@ void leaks(void) // change to create a different image for the minimap vs. main viewport int init_mlx_images(t_meta *meta) { - meta->mlx = mlx_init(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE, true); + meta->mlx = mlx_init(WINDOW_WIDTH, WINDOW_HEIGHT, meta->scene_name, true); if (!meta->mlx) { ft_error(); diff --git a/src/game/raycaster.c b/src/game/raycaster.c index a9a5d60..103e16b 100644 --- a/src/game/raycaster.c +++ b/src/game/raycaster.c @@ -6,7 +6,7 @@ /* By: yzaim +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/08 15:27:33 by yzaim #+# #+# */ -/* Updated: 2024/01/17 16:27:30 by jboeve ######## odam.nl */ +/* Updated: 2024/01/18 11:13:21 by jboeve ######## odam.nl */ /* */ /* ************************************************************************** */ diff --git a/src/game/render_viewport.c b/src/game/render_viewport.c index 5872d51..7a87e8a 100644 --- a/src/game/render_viewport.c +++ b/src/game/render_viewport.c @@ -6,7 +6,7 @@ /* By: yzaim +#+ */ /* +#+ */ /* Created: 2024/01/08 15:28:08 by yzaim #+# #+# */ -/* Updated: 2024/01/17 23:59:00 by joppe ######## odam.nl */ +/* Updated: 2024/01/18 11:14:19 by jboeve ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -62,4 +62,3 @@ void render_viewport(mlx_image_t *image, t_player *p) col++; } } - diff --git a/src/parser/parser.c b/src/parser/parser.c index 90fcc4b..25622b4 100644 --- a/src/parser/parser.c +++ b/src/parser/parser.c @@ -1,12 +1,12 @@ /* ************************************************************************** */ /**/ /*::: :::::::: */ -/* parser.c :+::+: */ +/* parser.c :+: :+: */ /*+:+ +:+ +:+ */ /* By: yzaim +#+ +:+ +#+*/ /*+#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 18:08:19 by yzaim #+##+# */ -/* Updated: 2024/01/02 18:57:56 by joppe ######## odam.nl */ +/* Updated: 2024/01/18 10:45:18 by jboeve ######## odam.nl */ /**/ /* ************************************************************************** */ @@ -91,6 +91,7 @@ int parser(t_meta *meta, char *map_file) { char *file = NULL; + meta->scene_name = map_file; file = parse_file(map_file); if (!file) return(EXIT_FAILURE); diff --git a/texture_examples/wood.png b/texture_examples/wood.png new file mode 100755 index 0000000..c30c317 Binary files /dev/null and b/texture_examples/wood.png differ