Skip to content

Commit

Permalink
Window title is scene file name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joppe Boeve committed Jan 18, 2024
1 parent ac24f1a commit 6bb09aa
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions include/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: jboeve <[email protected]>+#+ */
/* +#+ */
/* 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 */
/**/
/* ************************************************************************** */

Expand Down Expand Up @@ -56,8 +56,6 @@
#define WINDOW_WIDTH 1280
#define WINDOW_HEIGHT 720

#define WINDOW_TITLE "Gammoe"



// Game
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/cub3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: yzaim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/game/raycaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: yzaim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down
3 changes: 1 addition & 2 deletions src/game/render_viewport.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: yzaim <[email protected]> +#+ */
/* +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -62,4 +62,3 @@ void render_viewport(mlx_image_t *image, t_player *p)
col++;
}
}

5 changes: 3 additions & 2 deletions src/parser/parser.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* ************************************************************************** */
/**/
/*::: :::::::: */
/* parser.c :+::+: */
/* parser.c :+: :+: */
/*+:+ +:+ +:+ */
/* By: yzaim <[email protected]> +#+ +:+ +#+*/
/*+#+#+#+#+#+ +#+ */
/* 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 */
/**/
/* ************************************************************************** */

Expand Down Expand Up @@ -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);
Expand Down
Binary file added texture_examples/wood.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bb09aa

Please sign in to comment.