Cub3D/test/test.h
2024-12-09 14:33:53 +01:00

60 lines
1.6 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* test.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/27 12:07:20 by rparodi #+# #+# */
/* Updated: 2024/11/27 12:08:19 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef TEST_H
# define TEST_H
# include "minilibx-linux/mlx.h"
# include <math.h>
# include <stdio.h>
# include <stdlib.h>
# define WINDOW_WIDTH 1024
# define WINDOW_HEIGHT 768
# define MAP_WIDTH 24
# define MAP_HEIGHT 24
# define MOVE_SPEED 0.5
# define ROT_SPEED 0.5
typedef struct s_texture {
void *img;
char *addr;
int width;
int height;
int bits_per_pixel;
int line_length;
int endian;
} t_texture;
typedef struct s_data
{
void *mlx;
void *win;
void *img;
char *addr;
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;
t_texture wall_so;
t_texture wall_no;
t_texture wall_we;
t_texture wall_ea;
t_texture floor;
} t_data;
#endif