This commit is contained in:
Quinten Mennen 2025-05-06 19:13:23 +02:00
parent a54f811a93
commit 5433bdde72
4 changed files with 16 additions and 14 deletions

View File

@ -6,7 +6,8 @@
"mlx42.h": "c",
"glfw3.h": "c",
"vec_math.h": "c",
"texture.h": "c"
"texture.h": "c",
"libft.h": "c"
},
"cmake.ignoreCMakeListsMissing": true
}

View File

@ -6,7 +6,7 @@
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/15 12:22:29 by qmennen #+# #+# */
/* Updated: 2025/05/06 18:54:42 by qmennen ### ########.fr */
/* Updated: 2025/05/06 19:10:44 by qmennen ### ########.fr */
/* */
/* ************************************************************************** */
@ -16,8 +16,8 @@
# define FAILURE 0
# define SUCCESS 1
# define WIDTH 1280
# define HEIGHT 720
# define WIDTH 1920
# define HEIGHT 1080
# define TITLE "Cub3D"
# define RESET "\033[0m"

View File

@ -6,7 +6,7 @@
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/02 11:58:09 by whaffman #+# #+# */
/* Updated: 2025/05/06 19:01:32 by qmennen ### ########.fr */
/* Updated: 2025/05/06 19:06:09 by qmennen ### ########.fr */
/* */
/* ************************************************************************** */
@ -188,7 +188,7 @@ void draw_floor(t_game *game)
const t_vec2 left_ray = sub(game->player->dir, game->player->camera);
const t_vec2 right_ray = add(game->player->dir, game->player->camera);
y = 0;
y = game->screen->height / 2;
while (y < game->screen->height )
{
row_dist = 0.5 * game->screen->height / (y - game->screen->height / 2.0);

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* screen.c :+: :+: */
/* +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ */
/* +#+ */
/* ::: :::::::: */
/* screen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/15 15:30:27 by qmennen #+# #+# */
/* Updated: 2025/05/06 14:23:03 by whaffman ######## odam.nl */
/* Updated: 2025/05/06 19:10:12 by qmennen ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,6 +22,7 @@ int screen_create(t_game **game)
return (FAILURE);
screen->width = WIDTH;
screen->height = HEIGHT;
mlx_set_setting(MLX_FULLSCREEN, 1);
mlx = mlx_init(WIDTH, HEIGHT, TITLE, false);
if (!mlx)
return (FAILURE);