Skip to content

Commit 0247c3f

Browse files
committed
bonus only for github
1 parent afd04cd commit 0247c3f

File tree

29 files changed

+29
-1015
lines changed

29 files changed

+29
-1015
lines changed

Makefile

+18-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,27 @@
11
NAME = cub3D
2-
NAME_BONUS = cub4D
32

43
LIBFT = libft
54
LIBMLX = MLX42/build/libmlx42.a
65

76
OBJS_DIR = .objs
87

9-
SRCS = mandatory/main.c \
10-
mandatory/srcs/init_and_unit/init_and_unit.c \
11-
mandatory/srcs/parsing/check_file.c \
12-
mandatory/srcs/parsing/check_map.c \
13-
mandatory/srcs/window_and_event/window.c \
14-
mandatory/srcs/window_and_event/event_hooks.c \
15-
mandatory/srcs/utils/utils.c \
16-
mandatory/srcs/rendering/raycasting.c \
17-
mandatory/srcs/rendering/raycasting_utils.c \
18-
19-
SRCS_BONUS = bonus/main.c \
20-
bonus/srcs/init_and_unit/init_and_unit.c \
21-
bonus/srcs/init_and_unit/init_and_unit2.c \
22-
bonus/srcs/parsing/check_file.c \
23-
bonus/srcs/parsing/check_map.c \
24-
bonus/srcs/window_and_event/window.c \
25-
bonus/srcs/window_and_event/event_hooks.c \
26-
bonus/srcs/utils/utils.c \
27-
bonus/srcs/utils/utils2.c \
28-
bonus/srcs/rendering/raycasting/raycasting.c \
29-
bonus/srcs/rendering/raycasting/raycasting_utils.c \
30-
bonus/srcs/rendering/minimap/minimap.c \
31-
bonus/srcs/rendering/minimap/minimap_utils.c \
32-
bonus/srcs/rendering/door/door.c \
33-
bonus/srcs/rendering/gun/gun.c
8+
SRCS = main.c \
9+
srcs/init_and_unit/init_and_unit.c \
10+
srcs/init_and_unit/init_and_unit2.c \
11+
srcs/parsing/check_file.c \
12+
srcs/parsing/check_map.c \
13+
srcs/window_and_event/window.c \
14+
srcs/window_and_event/event_hooks.c \
15+
srcs/utils/utils.c \
16+
srcs/utils/utils2.c \
17+
srcs/rendering/raycasting/raycasting.c \
18+
srcs/rendering/raycasting/raycasting_utils.c \
19+
srcs/rendering/minimap/minimap.c \
20+
srcs/rendering/minimap/minimap_utils.c \
21+
srcs/rendering/door/door.c \
22+
srcs/rendering/gun/gun.c
3423

3524
OBJS = $(addprefix $(OBJS_DIR)/, $(SRCS:%.c=%.o))
36-
OBJS_BONUS = $(addprefix $(OBJS_DIR)/, $(SRCS_BONUS:%.c=%.o))
3725

3826
OS = $(shell uname)
3927
FLAG_OPTI = -Ofast -ffast-math -O3
@@ -46,8 +34,8 @@ else
4634
$(error "Unsupported OS")
4735
endif
4836

49-
CFLAGS = -I $(LIBFT) -Wall -Werror -Wextra -g -fsanitize=address
50-
LDFLAGS = -lft -L $(LIBFT) -Wall -Werror -Wextra -g -fsanitize=address
37+
CFLAGS = -I $(LIBFT) -Wall -Werror -Wextra
38+
LDFLAGS = -lft -L $(LIBFT) -Wall -Werror -Wextra
5139

5240
RED=\033[0;31m
5341
GREEN=\033[0;32m
@@ -66,10 +54,6 @@ $(OBJS_DIR)/%.o: %.c
6654
@mkdir -p $(dir $@)
6755
@gcc $(CFLAGS) $(FLAG_OPTI) -c $< -o $@
6856

69-
bonus: $(OBJS_BONUS) $(LIBFT)/libft.a
70-
@gcc $(OBJS_BONUS) $(LDFLAGS) $(FLAG) $(PROJECT_FLAGS) -o $(NAME_BONUS)
71-
@echo "${GREEN}./${NAME_BONUS} ${RED}bonus_map${NC}"
72-
7357
clean:
7458
$(MAKE) -C $(LIBFT) clean
7559
@rm -rf $(OBJS_DIR)
@@ -82,9 +66,6 @@ fclean: clean
8266
re: fclean all
8367

8468
run: all
85-
./$(NAME) rsrcs/maps/cub.cub
86-
87-
run2: bonus
88-
./$(NAME_BONUS) rsrcs/maps/bonus.cub
69+
./$(NAME) rsrcs/maps/bonus.cub
8970

9071
.PHONY: all clean fclean re run bonus
File renamed without changes.

bonus/includes/macros.h includes/macros.h

+9-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: mvpee <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2024/06/06 13:08:32 by nechaara #+# #+# */
9-
/* Updated: 2024/07/18 14:47:50 by mvpee ### ########.fr */
9+
/* Updated: 2024/09/28 11:45:50 by mvpee ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -77,8 +77,13 @@
7777
# define MLX_KEY_SPACE 32
7878

7979
// MUSIC
80-
# define PLAY 0
81-
// # define AUDIO "mpg123"
82-
# define AUDIO "afplay"
80+
# define PLAY 1
81+
# ifdef __linux__
82+
# define AUDIO "mpg123"
83+
# elif __APPLE__
84+
# define AUDIO "afplay"
85+
# else
86+
# define AUDIO "mpg123"
87+
# endif
8388

8489
#endif

bonus/main.c main.c

File renamed without changes.

mandatory/includes/cub3d.h

-121
This file was deleted.

mandatory/includes/macros.h

-73
This file was deleted.

mandatory/main.c

-42
This file was deleted.

0 commit comments

Comments
 (0)