aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-09 18:24:54 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-09 18:24:54 +0100
commitbb1b197934bd9bcfa15d853dd99141d0edc1c16c (patch)
treee5850ea32f61f0e7211c01ad956938d4ce0f6feb
parentin progress (diff)
download42-cub3d-bb1b197934bd9bcfa15d853dd99141d0edc1c16c.tar.gz
42-cub3d-bb1b197934bd9bcfa15d853dd99141d0edc1c16c.tar.bz2
42-cub3d-bb1b197934bd9bcfa15d853dd99141d0edc1c16c.tar.xz
42-cub3d-bb1b197934bd9bcfa15d853dd99141d0edc1c16c.tar.zst
42-cub3d-bb1b197934bd9bcfa15d853dd99141d0edc1c16c.zip
Screenres ok
-rw-r--r--Makefile7
-rw-r--r--inc/cub3d.h2
-rw-r--r--map/map_one.cub2
-rw-r--r--src/ft_key_events.c2
4 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 1234467..c2c325d 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,8 @@ MKDIR = mkdir -p
RM = rm -rf
OS = $(shell uname)
ifeq (${OS}, Darwin)
- SCR_SZE = 1980x1024
+ SCR_SZE = "$(shell osascript -e 'tell application \"Finder\" to get bounds\
+ of window of desktop' | tr ',' 'x' | tr -d '\n' | tr -d ' ' | cut -c 5-)"
else
SCR_SZE = $(shell xdpyinfo | grep dimensions | awk '{print $$2}')
endif
@@ -100,6 +101,10 @@ else
endif
#------------------------------------------------------------------------------#
all:
+ @printf "%s\n" ${SCR_SZE}
+ @printf "%s\n" ${CFLAGS}
+ @exit
+
ifeq (${OS}, Darwin)
@$(MAKE) --jobs 5 --no-print-directory -C ${MLX_DIR} all
endif
diff --git a/inc/cub3d.h b/inc/cub3d.h
index e7615e9..749e2b6 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -33,7 +33,7 @@
# define FT_ESC_KEY 53
# endif
# ifndef FT_SCR_SIZE
-# define FT_SCR_SIZE 1980x1080
+# define FT_SCR_SIZE 1920x1080
# endif
typedef struct s_win
diff --git a/map/map_one.cub b/map/map_one.cub
index 2a4c17a..8bafa8c 100644
--- a/map/map_one.cub
+++ b/map/map_one.cub
@@ -1,4 +1,4 @@
-R 1200 600
+R 1200 10070
NO ./path_to_the_north_texture
SO ./path_to_the_south_texture
diff --git a/src/ft_key_events.c b/src/ft_key_events.c
index 168d6c0..7955dc6 100644
--- a/src/ft_key_events.c
+++ b/src/ft_key_events.c
@@ -15,6 +15,7 @@
#include <cub3d.h>
#include <stdlib.h>
+#include <stdio.h>
static int
ft_w_key(t_cub *clist)
{
@@ -29,6 +30,7 @@ static int
pl->pos_y += 0.3;
else if (pl->view_side == 4)
pl->pos_x -= 0.3;
+ printf("PosX> %f\nPosY> %f\n", pl->pos_x, pl->pos_y);
ft_drawmap(clist);
return (0);
}