diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | map/map_one.cub | 2 | ||||
-rw-r--r-- | src/ft_key_events.c | 14 |
3 files changed, 18 insertions, 8 deletions
@@ -51,8 +51,8 @@ MKDIR = mkdir -p RM = rm -rf OS = $(shell uname) ifeq (${OS}, Darwin) - 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-)" + 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 @@ -106,12 +106,12 @@ all: @exit ifeq (${OS}, Darwin) - @$(MAKE) --jobs 5 --no-print-directory -C ${MLX_DIR} all + @$(MAKE) --no-print-directory -C ${MLX_DIR} all endif ifdef ASAN - @$(MAKE) --jobs 5 --no-print-directory -C ${LFT_DIR} all ASAN=1 + @$(MAKE) --no-print-directory -C ${LFT_DIR} all ASAN=1 else - @$(MAKE) --jobs 5 --no-print-directory -C ${LFT_DIR} all + @$(MAKE) --no-print-directory -C ${LFT_DIR} all endif @$(MAKE) ${NAME} #------------------------------------------------------------------------------# diff --git a/map/map_one.cub b/map/map_one.cub index 8bafa8c..2a4c17a 100644 --- a/map/map_one.cub +++ b/map/map_one.cub @@ -1,4 +1,4 @@ -R 1200 10070 +R 1200 600 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 7955dc6..4e82aa5 100644 --- a/src/ft_key_events.c +++ b/src/ft_key_events.c @@ -23,11 +23,21 @@ static int pl = clist->plist; if (pl->view_side == 1) - pl->pos_y -= 0.3; + { + if (pl->pos_y <= 0.3) + pl->pos_y = pl->pos_y; + else + pl->pos_y -= 0.3; + } else if (pl->view_side == 2) pl->pos_x += 0.3; else if (pl->view_side == 3) - pl->pos_y += 0.3; + { + if (pl->pos_y >= 13.7) + pl->pos_y = pl->pos_y; + else + 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); |