style: remove mlx & libft headers from central includes folder

This commit is contained in:
Khaïs COLIN 2025-07-17 14:11:30 +02:00
parent d7efc43f12
commit 4ffc52b462
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
8 changed files with 20 additions and 235 deletions

View file

@ -1,75 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchampio <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/14 12:40:57 by tchampio #+# #+# */
/* Updated: 2024/12/18 04:40:53 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_H
# define LIBFT_H
# include <stddef.h>
# include <stdarg.h>
# include <stdlib.h>
# include <stdint.h>
# include <stdbool.h>
# include <unistd.h>
typedef struct s_list
{
void *content;
struct s_list *next;
} t_list;
int ft_isalpha(int c);
int ft_isdigit(int c);
int ft_isalnum(int c);
int ft_isascii(int c);
int ft_isprint(int c);
size_t ft_strlen(const char *s);
void *ft_memset(void *s, int c, size_t n);
void ft_bzero(void *s, size_t n);
void *ft_memcpy(void *dest, const void *src, size_t n);
void *ft_memmove(void *dest, const void *src, size_t n);
size_t ft_strlcpy(char *dest, const char *src, size_t n);
size_t ft_strlcat(char *dest, const char *src, size_t n);
char *ft_strchr(const char *str, int c);
char *ft_strrchr(char *str, int c);
int ft_toupper(int c);
int ft_tolower(int c);
int ft_strncmp(const char *s1, const char *s2, size_t n);
void *ft_memchr(void *s, int c, size_t n);
int ft_memcmp(const void *s1, const void *s2, size_t n);
char *ft_strnstr(const char *big, const char *little, size_t n);
int ft_atoi(const char *s);
void *ft_calloc(size_t memsize, size_t count);
char *ft_strdup(const char *s);
char *ft_substr(const char *s, unsigned int start, size_t len);
char *ft_strjoin(const char *s1, const char *s2);
char *ft_strtrim(const char *s1, const char *set);
char **ft_split(const char *s, char separator);
char *ft_itoa(int n);
char *ft_strmapi(const char *s, char (*f)(unsigned int, char));
void ft_striteri(char *s, void (*f)(unsigned int, char *));
void ft_putchar_fd(char c, int fd);
void ft_putendl_fd(char *s, int fd);
void ft_putstr_fd(char *s, int fd);
void ft_putnbr_fd(int s, int fd);
t_list *ft_lstnew(void *content);
void ft_lstadd_front(t_list **lst, t_list *new);
int ft_lstsize(t_list *lst);
t_list *ft_lstlast(t_list *lst);
void ft_lstadd_back(t_list **lst, t_list *new);
void ft_lstdelone(t_list *lst, void (*del)(void *));
void ft_lstclear(t_list **lst, void (*del)(void *));
void ft_lstiter(t_list *lst, void (*f)(void *));
t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *));
char *get_next_line(int fd);
int ft_printf(const char *format, ...);
#endif

View file

@ -1,139 +0,0 @@
/*
** mlx.h for MinilibX in
**
** Made by Charlie Root
** Login <ol@epitech.net>
**
** Started on Mon Jul 31 16:37:50 2000 Charlie Root
** Last update Tue May 15 16:23:28 2007 Olivier Crouzet
*/
/*
** MinilibX - Please report bugs
*/
/*
** FR msg - FR msg - FR msg
**
** La MinilibX utilise 2 librairies supplementaires qu'il
** est necessaire de rajouter a la compilation :
** -lmlx -lXext -lX11
**
** La MinilibX permet le chargement des images de type Xpm.
** Notez que cette implementation est incomplete.
** Merci de communiquer tout probleme de chargement d'image
** de ce type.
*/
#ifndef MLX_H
#define MLX_H
void *mlx_init();
/*
** needed before everything else.
** return (void *)0 if failed
*/
/*
** Basic actions
*/
void *mlx_new_window(void *mlx_ptr, int size_x, int size_y, char *title);
/*
** return void *0 if failed
*/
int mlx_clear_window(void *mlx_ptr, void *win_ptr);
int mlx_pixel_put(void *mlx_ptr, void *win_ptr, int x, int y, int color);
/*
** origin for x & y is top left corner of the window
** y down is positive
** color is 0x00RRGGBB
*/
/*
** Image stuff
*/
void *mlx_new_image(void *mlx_ptr,int width,int height);
/*
** return void *0 if failed
** obsolete : image2 data is stored using bit planes
** void *mlx_new_image2(void *mlx_ptr,int width,int height);
*/
char *mlx_get_data_addr(void *img_ptr, int *bits_per_pixel,
int *size_line, int *endian);
/*
** endian : 0 = sever X is little endian, 1 = big endian
** for mlx_new_image2, 2nd arg of mlx_get_data_addr is number_of_planes
*/
int mlx_put_image_to_window(void *mlx_ptr, void *win_ptr, void *img_ptr,
int x, int y);
int mlx_get_color_value(void *mlx_ptr, int color);
/*
** dealing with Events
*/
int mlx_mouse_hook (void *win_ptr, int (*funct_ptr)(), void *param);
int mlx_key_hook (void *win_ptr, int (*funct_ptr)(), void *param);
int mlx_expose_hook (void *win_ptr, int (*funct_ptr)(), void *param);
int mlx_loop_hook (void *mlx_ptr, int (*funct_ptr)(), void *param);
int mlx_loop (void *mlx_ptr);
int mlx_loop_end (void *mlx_ptr);
/*
** hook funct are called as follow :
**
** expose_hook(void *param);
** key_hook(int keycode, void *param);
** mouse_hook(int button, int x,int y, void *param);
** loop_hook(void *param);
**
*/
/*
** Usually asked...
*/
int mlx_string_put(void *mlx_ptr, void *win_ptr, int x, int y, int color,
char *string);
void mlx_set_font(void *mlx_ptr, void *win_ptr, char *name);
void *mlx_xpm_to_image(void *mlx_ptr, char **xpm_data,
int *width, int *height);
void *mlx_xpm_file_to_image(void *mlx_ptr, char *filename,
int *width, int *height);
int mlx_destroy_window(void *mlx_ptr, void *win_ptr);
int mlx_destroy_image(void *mlx_ptr, void *img_ptr);
int mlx_destroy_display(void *mlx_ptr);
/*
** generic hook system for all events, and minilibX functions that
** can be hooked. Some macro and defines from X11/X.h are needed here.
*/
int mlx_hook(void *win_ptr, int x_event, int x_mask,
int (*funct)(), void *param);
int mlx_do_key_autorepeatoff(void *mlx_ptr);
int mlx_do_key_autorepeaton(void *mlx_ptr);
int mlx_do_sync(void *mlx_ptr);
int mlx_mouse_get_pos(void *mlx_ptr, void *win_ptr, int *x, int *y);
int mlx_mouse_move(void *mlx_ptr, void *win_ptr, int x, int y);
int mlx_mouse_hide(void *mlx_ptr, void *win_ptr);
int mlx_mouse_show(void *mlx_ptr, void *win_ptr);
int mlx_get_screen_size(void *mlx_ptr, int *sizex, int *sizey);
#endif /* MLX_H */

View file

@ -3,14 +3,14 @@
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/06 13:16:11 by tchampio #+# #+# */
/* Updated: 2025/07/15 10:29:56 by tchampio ### ########.fr */
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
/* Updated: 2025/07/17 14:15:04 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
#include "../includes/libft.h"
#include "../libft/includes/libft.h"
#include "../includes/structs.h"
#include "../mlx/mlx.h"
#include "../includes/maputils.h"

View file

@ -3,15 +3,15 @@
/* ::: :::::::: */
/* checkers.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchampio <tchampio@student.42lehavre.fr> +#+ +:+ +#+ */
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/06/21 19:29:45 by tchampio #+# #+# */
/* Updated: 2025/07/04 15:04:38 by tchampio ### ########.fr */
/* Created: 2025/07/17 14:15:26 by kcolin #+# #+# */
/* Updated: 2025/07/17 14:15:26 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
#include "../../includes/maputils.h"
#include "../../includes/libft.h"
#include "../../libft/includes/libft.h"
bool check_filename(t_mapdata *map, char *file)
{

View file

@ -3,14 +3,14 @@
/* ::: :::::::: */
/* forbidden_characters.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/06/30 17:19:16 by tchampio #+# #+# */
/* Updated: 2025/07/04 14:33:49 by tchampio ### ########.fr */
/* Created: 2025/07/17 14:18:13 by kcolin #+# #+# */
/* Updated: 2025/07/17 14:18:18 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
#include "../../includes/libft.h"
#include "../../libft/includes/libft.h"
#include "../../includes/maputils.h"
#ifdef BONUS

View file

@ -3,10 +3,10 @@
/* ::: :::::::: */
/* map_checker.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/06/06 17:54:42 by tchampio #+# #+# */
/* Updated: 2025/07/04 14:40:00 by tchampio ### ########.fr */
/* Updated: 2025/07/17 14:17:06 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,7 +14,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include "../../includes/libft.h"
#include "../../libft/includes/libft.h"
void print_mapdata(const t_mapdata *data)
{

View file

@ -3,15 +3,15 @@
/* ::: :::::::: */
/* setters.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchampio <tchampio@student.42lehavre.fr> +#+ +:+ +#+ */
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/06/21 19:35:43 by tchampio #+# #+# */
/* Updated: 2025/06/21 19:39:32 by tchampio ### ########.fr */
/* Updated: 2025/07/17 14:17:39 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
#include "../../includes/maputils.h"
#include "../../includes/libft.h"
#include "../../libft/includes/libft.h"
#include "../../includes/cub3d.h"
unsigned long set_color(const char *s, t_mapdata *map)

View file

@ -6,14 +6,13 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 13:59:27 by kcolin #+# #+# */
/* Updated: 2025/07/17 14:00:01 by kcolin ### ########.fr */
/* Updated: 2025/07/17 14:18:05 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
#include "../../includes/cub3d_consts.h"
#include "../../includes/structs.h"
#include "../../mlx/mlx.h"
#include "../../includes/libft.h"
#include "../../libft/includes/libft.h"
#include <stdlib.h>
void free_tab(char **tab)