From 264676907b55f429e65b4de523eeb729fb64e9f9 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 18 Nov 2019 19:00:53 +0100 Subject: floor and ceiling color, WIP window image buffer --- cub3d.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'cub3d.h') diff --git a/cub3d.h b/cub3d.h index 5d089bf..dfc40a1 100644 --- a/cub3d.h +++ b/cub3d.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/15 06:40:37 by cacharle #+# #+# */ -/* Updated: 2019/11/18 02:43:17 by cacharle ### ########.fr */ +/* Updated: 2019/11/18 19:00:20 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include @@ -23,6 +23,9 @@ # define MLXK_LEFT 123 # define MLXK_RIGHT 124 +# define MLX_LITTLE_ENDIAN 0 +# define MLX_BIG_ENDIAN 1 + # include # include # include @@ -43,16 +46,16 @@ typedef struct double y; } t_vector; -typedef struct +typedef union { - int hexcode; + unsigned int hexcode; struct { - t_byte b; - t_byte g; - t_byte r; - t_byte empty; - } rgb; + t_byte empty; + t_byte r; + t_byte g; + t_byte b; + } rgb; } t_color; typedef enum @@ -84,6 +87,8 @@ typedef struct int map_height; } t_parsing; +typedef unsigned int* t_image; + typedef struct s_state { t_bool running; @@ -99,6 +104,10 @@ typedef struct s_state int map_height; t_color ceilling_color; t_color floor_color; + t_image window_buf; + int window_img_depth; + int window_img_line_size; + int window_img_endian; } t_state; typedef t_bool (*t_option_parser_func)(t_parsing *parsing, char *line); -- cgit