-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,501 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: C/C++ CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: make | ||
run: make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ compile_commands.json | |
libft/build/libft.a | ||
Session.vim | ||
MLX42/build | ||
tests/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{ | ||
"files.associations": { | ||
"enemy.h": "c", | ||
"stdlib.h": "c" | ||
"stdlib.h": "c", | ||
"*.tcc": "c", | ||
"system_error": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* :::::::: */ | ||
/* meta.h :+: :+: :+: */ | ||
/* +:+ */ | ||
/* By: jboeve <[email protected]> +#+ */ | ||
/* +#+ */ | ||
/* Created: 2023/11/01 20:07:37 by jboeve #+# #+# */ | ||
/* Updated: 2023/11/09 18:54:26 by yzaim ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#ifndef PASER_H | ||
#define PASER_H | ||
|
||
# define TOO_MANY_PLAYERS "Map should not have more than one player position\n" | ||
# define INVALID_CHAR "Map has invalid characters\n" | ||
# define INVALID_WALLS "Map walls are not closed\n" | ||
# define INVALID_EXT "Map extension should be .cub\n" | ||
# define INVALID_FILE "Map file failed to open\n" | ||
# define MALLOC_FAIL "Malloc error\n" | ||
# define WRO_ARGS "Wrong number of arguments\n" | ||
# define OOB_FLOOR "There are inaccessible floors in this map\n" | ||
# define ORDER_OF_ELEMENTS "Error in map file, check that the map element is last and there are no extra characters between elements\n" | ||
# define MISSING_PATH "Texture path missing\n" | ||
# define DUPLICATES "Make sure you have only and at least one value for each element\n" | ||
# define NO_PLAYER_POS "There is no player position in the map\n" | ||
# define ELEMENT_MISSING "One or more definition of elements is missing\n" | ||
# define NO_MAP "Map element is missing\n" | ||
# define INV_COLOR_CODE "Please check color codes for F and C elements\nRGB values should be between 0-255\n" | ||
|
||
# include "meta.h" | ||
|
||
typedef enum e_err { | ||
INV_CHAR, | ||
INV_EXT, | ||
INV_WALLS, | ||
PLAY_ERR, | ||
INV_FILE, | ||
MALL_ERR, | ||
ARG_ERR, | ||
OUT_OF_BOUNDS, | ||
FILE_ORDER, | ||
M_PATH, | ||
DUP_ELEMENTS, | ||
NO_PLAYER, | ||
MISSING_ELEMENTS, | ||
MISSING_MAP, | ||
COLOR_CODE_WRONG, | ||
} t_err; | ||
|
||
// error.c | ||
int pr_err(t_err type); | ||
|
||
// check_map.c | ||
int valid_map_char(char c); | ||
int player_pos_char(char c); | ||
bool is_map_chars_valid(char *map); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* :::::::: */ | ||
/* libft.h :+: :+: */ | ||
/* libft.h :+: :+: :+: */ | ||
/* +:+ */ | ||
/* By: jboeve <[email protected]> +#+ */ | ||
/* +#+ */ | ||
/* Created: 2022/10/12 10:41:54 by jboeve #+# #+# */ | ||
/* Updated: 2023/08/20 23:16:51 by joppe ######## odam.nl */ | ||
/* Updated: 2023/11/09 18:53:50 by yzaim ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -43,8 +43,8 @@ void *ft_calloc(size_t nmemb, size_t size); | |
char *ft_strdup(const char *s); | ||
int ft_atoi(const char *nptr); | ||
char *ft_substr(char const *s, unsigned int start, size_t len); | ||
char *ft_strjoin(char const *s1, char const *s2); | ||
char *ft_strjoin_free(char *s1, char const *s2); | ||
char *ft_strjoin(char *s1, char const *s2); | ||
char *ft_strjoin_free(char *s1, char *s2); | ||
char *ft_strtrim(char const *s1, char const *set); | ||
char **ft_split(char const *s, char c); | ||
void ft_putstr_fd(char *s, int fd); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* :::::::: */ | ||
/* ft_strjoin_free.c :+: :+: */ | ||
/* ft_strjoin.c :+: :+: */ | ||
/* +:+ */ | ||
/* By: joppe <[email protected]> +#+ */ | ||
/* +#+ */ | ||
/* Created: 2023/03/18 21:56:37 by joppe #+# #+# */ | ||
/* Updated: 2023/03/18 21:57:43 by joppe ######## odam.nl */ | ||
/* Created: 2022/10/12 19:59:09 by joppe #+# #+# */ | ||
/* Updated: 2022/11/03 15:36:43 by jboeve ######## odam.nl */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
|
||
char *ft_strjoin_free(char *s1, char const *s2) | ||
char *ft_strjoin_free(char *s1, char *s2) | ||
{ | ||
char *buf; | ||
size_t total_size; | ||
|
@@ -24,5 +24,6 @@ char *ft_strjoin_free(char *s1, char const *s2) | |
ft_strlcpy(buf, s1, ft_strlen(s1) + 1); | ||
ft_strlcat(buf, s2, total_size); | ||
free(s1); | ||
free(s2); | ||
return (buf); | ||
} |
Oops, something went wrong.