aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile26
-rw-r--r--inc/cub3d_defines.h68
-rw-r--r--src/ft_init_winlx.c2
3 files changed, 48 insertions, 48 deletions
diff --git a/Makefile b/Makefile
index 82b070c..54305fb 100644
--- a/Makefile
+++ b/Makefile
@@ -117,18 +117,22 @@ ifdef OPTI
endif
#--------------------------------------------------------------------------------------------------#
CDEFS = -DFT_SCR_SIZE=\"${SCR_SZE}\"
-CDEFS += -DFT_OS=\"${OS}\"
-ifneq (${OS}, Darwin)
- CDEFS += -DFT_W_KEY=119
- CDEFS += -DFT_A_KEY=97
- CDEFS += -DFT_S_KEY=115
- CDEFS += -DFT_D_KEY=100
- CDEFS += -DFT_F1_KEY=65470
- CDEFS += -DFT_TAB_KEY=65289
- CDEFS += -DFT_L_ARR_KEY=65361
- CDEFS += -DFT_R_ARR_KEY=65363
- CDEFS += -DFT_ESC_KEY=65307
+ifeq (${OS}, Darwin)
+ CDEFS += -DFT_OS=1
+else
+ CDEFS += -DFT_OS=2
endif
+# ifneq (${OS}, Darwin)
+# CDEFS += -DFT_W_KEY=119
+# CDEFS += -DFT_A_KEY=97
+# CDEFS += -DFT_S_KEY=115
+# CDEFS += -DFT_D_KEY=100
+# CDEFS += -DFT_F1_KEY=65470
+# CDEFS += -DFT_TAB_KEY=65289
+# CDEFS += -DFT_L_ARR_KEY=65361
+# CDEFS += -DFT_R_ARR_KEY=65363
+# CDEFS += -DFT_ESC_KEY=65307
+# endif
#--------------------------------------------------------------------------------------------------#
ifeq (${OS}, Darwin)
NAME = Cub3D
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 ======
*/
diff --git a/src/ft_init_winlx.c b/src/ft_init_winlx.c
index b41dc4a..1e2e351 100644
--- a/src/ft_init_winlx.c
+++ b/src/ft_init_winlx.c
@@ -26,8 +26,6 @@ int
clist->wlist->x_size, clist->wlist->y_size, "Cub3D")))
return (-1);
clist->wlist->inited = 1;
- ft_printf("Created window of size %ux%u\nHost OS: %s\n",
- clist->wlist->x_size, clist->wlist->y_size, FT_OS);
/* ft_music(clist); */
return (0);
}