test ray v.final :D (if you're here again you f'ed up)

This commit is contained in:
Baptiste GOULARD 2024-11-28 12:11:31 +01:00
parent f100ccef11
commit abfb831803
3 changed files with 253 additions and 201 deletions

View file

@ -6,24 +6,37 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/27 12:07:20 by rparodi #+# #+# */
/* Updated: 2024/11/27 19:29:06 by rparodi ### ########.fr */
/* Updated: 2024/11/28 11:56:24 by bgoulard ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef TEST_H
# define TEST_H
# include "minilibx-linux/mlx.h"
# include <math.h>
# include <stdio.h>
# include <stdlib.h>
// define keys
# define XK_LATIN_1
# include <X11/keysym.h>
# define WINDOW_WIDTH 1920
# define WINDOW_HEIGHT 1080
# define MAP_WIDTH 24
# define MAP_HEIGHT 24
# define MOVE_SPEED 0.5
# define ROT_SPEED 0.5
# define ROT_SPEED 0.1
# define FOV 70
typedef struct s_2dpoint
{
double x;
double y;
} t_2dpoint;
typedef struct s_2ipoint
{
int x;
int y;
} t_2ipoint;
typedef struct s_data
{
@ -34,14 +47,12 @@ typedef struct s_data
int bits_per_pixel;
int line_length;
int endian;
double pos_x;
double pos_y;
double dir_x;
double dir_y;
double plane_x;
double plane_y;
int screen_x;
int screen_y;
t_2ipoint screen_size;
t_2dpoint pos;
t_2ipoint pos_i;
t_2dpoint dir;
t_2dpoint plane;
} t_data;
#endif