aboutsummaryrefslogtreecommitdiff
path: root/cub3d.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-11-18 02:56:38 +0100
committerCharles <sircharlesaze@gmail.com>2019-11-18 02:56:38 +0100
commit542ae0113ac850e0d5216c7e2dc4543e66a1237f (patch)
tree3f51675d7d90be60f5e9e5045746325c58370566 /cub3d.h
parent975ec3edd112c1a7908c0d97dc49592a22076b71 (diff)
downloadcub3d-542ae0113ac850e0d5216c7e2dc4543e66a1237f.tar.gz
cub3d-542ae0113ac850e0d5216c7e2dc4543e66a1237f.tar.bz2
cub3d-542ae0113ac850e0d5216c7e2dc4543e66a1237f.zip
Added rotation, mlx_clear_window feelsgoodman
Diffstat (limited to 'cub3d.h')
-rw-r--r--cub3d.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/cub3d.h b/cub3d.h
index eded199..5d089bf 100644
--- a/cub3d.h
+++ b/cub3d.h
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/15 06:40:37 by cacharle #+# #+# */
-/* Updated: 2019/11/16 12:51:46 by cacharle ### ########.fr */
+/* Updated: 2019/11/18 02:43:17 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
@@ -15,11 +15,13 @@
# define CUB3D_H
# define WINDOW_TITLE "cub3D"
+# define MLXK_ESC 53
# define MLXK_W 13
# define MLXK_A 0
# define MLXK_S 1
# define MLXK_D 2
-# define MLXK_ESC 53
+# define MLXK_LEFT 123
+# define MLXK_RIGHT 124
# include <unistd.h>
# include <fcntl.h>
@@ -31,6 +33,8 @@
# define TRUE 1
# define FALSE 0
+# define SQUARE(x) ((x) * (x))
+
typedef int t_bool;
typedef struct
@@ -41,9 +45,14 @@ typedef struct
typedef struct
{
- int r;
- int g;
- int b;
+ int hexcode;
+ struct
+ {
+ t_byte b;
+ t_byte g;
+ t_byte r;
+ t_byte empty;
+ } rgb;
} t_color;
typedef enum
@@ -88,6 +97,8 @@ typedef struct s_state
t_map map;
int map_width;
int map_height;
+ t_color ceilling_color;
+ t_color floor_color;
} t_state;
typedef t_bool (*t_option_parser_func)(t_parsing *parsing, char *line);
@@ -142,5 +153,12 @@ t_vector vector_scale(t_vector v, double scalar);
*/
+/*
+** linear_algebra.c
+*/
+
+t_vector vector_add(t_vector a, t_vector b);
+t_vector vector_scale(t_vector v, double scalar);
+t_vector vector_rotate(t_vector v, double angle);
#endif