From 2007f61ef09c0b538aca2a7f20428f81175f322f Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 13 Nov 2019 15:32:02 +0100 Subject: Initial commit --- .gitignore | 3 +++ .gitmodules | 4 ++++ Makefile | 35 +++++++++++++++++++++++++++++++++++ README.md | 3 +++ header.h | 8 ++++++++ libft | 1 + main.c | 8 ++++++++ minimalist.cub | 24 ++++++++++++++++++++++++ parse.c | 0 9 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 Makefile create mode 100644 README.md create mode 100644 header.h create mode 160000 libft create mode 100644 main.c create mode 100644 minimalist.cub create mode 100644 parse.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd1c1ec --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +*.ghc +a.out diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e379e18 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "libft"] + path = libft + url = http://github.com/HappyTramp/libft + branch = rendu diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d461a2e --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +LIBFT_PATH = ./libft + +CC = gcc +CCFLAGS = -I$(LIBFT_PATH) -Wall -Wextra #-Werror +LDFLAGS = -L$(LIBFT_PATH) -lft + +NAME = cub3D +SRC = main.c +OBJ = $(SRC:.c=.o) +INCLUDE = header.h + +all: libft_all $(NAME) + +$(NAME): $(OBJ) $(INCLUDE) + $(CC) $(LDFLAGS) -o $@ $(OBJ) + +%.o: %.c + $(CC) $(CCFLAGS) -c -o $@ $< + +clean: libft_clean + rm -f $(OBJ) + +fclean: clean libft_fclean + rm -f $(NAME) + +re: fclean libft_fclean all + +libft_all: + make -C $(LIBFT_PATH) all + +libft_clean: + make -C $(LIBFT_PATH) clean + +libft_fclean: + make -C $(LIBFT_PATH) fclean diff --git a/README.md b/README.md new file mode 100644 index 0000000..8f4659f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# cub3d + +The cub3d project of school 42. diff --git a/header.h b/header.h new file mode 100644 index 0000000..6a35729 --- /dev/null +++ b/header.h @@ -0,0 +1,8 @@ +#ifndef HEADER_H +# define HEADER_H + +# include "libft.h" + + + +#endif diff --git a/libft b/libft new file mode 160000 index 0000000..b9a5e7c --- /dev/null +++ b/libft @@ -0,0 +1 @@ +Subproject commit b9a5e7c9ae556988c62dd9efeaf17060ad34bab0 diff --git a/main.c b/main.c new file mode 100644 index 0000000..c59cba5 --- /dev/null +++ b/main.c @@ -0,0 +1,8 @@ +#include "header.h" + +int main(int argc, char **argv) +{ + + + return (0); +} diff --git a/minimalist.cub b/minimalist.cub new file mode 100644 index 0000000..a2a92fe --- /dev/null +++ b/minimalist.cub @@ -0,0 +1,24 @@ +R 1920 1080 +NO ./path_to_the_north_texture +SO ./path_to_the_south_texture +WE ./path_to_the_west_texture +EA ./path_to_the_east_texture + +S ./path_to_the_sprite_texture +F 220,100,0 +C 225,30,0 + +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 2 0 0 0 0 0 1 0 0 0 1 +1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 +1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 +1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0 1 +1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 +1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 +1 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 +1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1 +1 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 N 0 1 +1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 0 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 diff --git a/parse.c b/parse.c new file mode 100644 index 0000000..e69de29 -- cgit