aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-02-29 00:50:02 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-02-29 00:50:02 +0100
commit7fa49f137016f188dbbc3337c772d1301409303c (patch)
tree9bab66b3aa4921cbe76192faa05bb967e03e9109 /inc
parentWorks fine, preparing small map (diff)
download42-cub3d-7fa49f137016f188dbbc3337c772d1301409303c.tar.gz
42-cub3d-7fa49f137016f188dbbc3337c772d1301409303c.tar.bz2
42-cub3d-7fa49f137016f188dbbc3337c772d1301409303c.tar.xz
42-cub3d-7fa49f137016f188dbbc3337c772d1301409303c.tar.zst
42-cub3d-7fa49f137016f188dbbc3337c772d1301409303c.zip
Better defines
Diffstat (limited to 'inc')
-rw-r--r--inc/cub3d_defines.h68
1 files changed, 33 insertions, 35 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index 619d0d4..6f9b4d7 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -39,35 +39,42 @@ enum retvals
*/
/*
-** ====== KEYS ======
+** ====== OS ======
*/
-# ifndef FT_W_KEY
-# define FT_W_KEY 13
-# endif
-# ifndef FT_A_KEY
-# define FT_A_KEY 0
-# endif
-# ifndef FT_S_KEY
-# define FT_S_KEY 1
-# endif
-# ifndef FT_D_KEY
-# define FT_D_KEY 2
-# endif
-# ifndef FT_L_ARR_KEY
-# define FT_L_ARR_KEY 123
-# endif
-# ifndef FT_R_ARR_KEY
-# define FT_R_ARR_KEY 124
-# endif
-# ifndef FT_ESC_KEY
-# define FT_ESC_KEY 53
-# endif
-# ifndef FT_F1_KEY
-# define FT_F1_KEY 122
+/*
+** 1: Darwin
+** 2: Linux
+*/
+
+# ifndef FT_OS
+# define FT_OS 1
# endif
-# ifndef FT_TAB_KEY
-# define FT_TAB_KEY 48
+
+/*
+** ====== KEYS ======
+*/
+
+# if FT_OS == 1
+# define FT_W_KEY 13
+# define FT_A_KEY 0
+# define FT_S_KEY 1
+# define FT_D_KEY 2
+# define FT_L_ARR_KEY 123
+# define FT_R_ARR_KEY 124
+# define FT_F1_KEY 122
+# define FT_TAB_KEY 48
+# define FT_ESC_KEY 53
+# else
+# define FT_W_KEY 119
+# define FT_A_KEY 97
+# define FT_S_KEY 115
+# define FT_D_KEY 100
+# define FT_L_ARR_KEY 65361
+# define FT_R_ARR_KEY 65363
+# define FT_TAB_KEY 65289
+# define FT_F1_KEY 65470
+# define FT_ESC_KEY 65307
# endif
/*
@@ -87,15 +94,6 @@ enum retvals
# endif
/*
-** ====== OTHERS ======
-*/
-
-# ifndef FT_OS
-# define FT_OS "Darwin"
-# endif
-
-
-/*
** ====== MAP ERROR MSG ======
*/