first commit
This commit is contained in:
24
BSQ/includes/Display-h/write.h
Normal file
24
BSQ/includes/Display-h/write.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* write.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: axdubois <axdubois@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/07/31 23:17:55 by axdubois #+# #+# */
|
||||
/* Updated: 2023/08/02 19:21:49 by axdubois ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef WRITE_H
|
||||
# define WRITE_H
|
||||
|
||||
#include "../../includes/utils-h/utils.h"
|
||||
#include "../../includes/utils-h/charobj.h"
|
||||
#include "../../includes/algo-h/algo.h"
|
||||
|
||||
void ft_putchar(char c);
|
||||
void ft_print(char *str);
|
||||
void ft_print_result(t_square sq,t_charobj c,t_coords *listobj,int file);
|
||||
|
||||
#endif
|
29
BSQ/includes/algo-h/algo.h
Normal file
29
BSQ/includes/algo-h/algo.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* algo.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: axdubois <axdubois@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/08/01 22:11:53 by adjoly #+# #+# */
|
||||
/* Updated: 2023/08/02 19:31:12 by axdubois ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef ALGO_H
|
||||
# define ALGO_H
|
||||
|
||||
#include "../../includes/utils-h/utils.h"
|
||||
#include "../../includes/utils-h/charobj.h"
|
||||
#include "../../includes/algo-h/algo.h"
|
||||
|
||||
typedef struct s_square
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int side;
|
||||
} t_square;
|
||||
|
||||
t_square ft_comb(t_coords *listobjsx, t_coords *listobjsy);
|
||||
|
||||
#endif
|
25
BSQ/includes/utils-h/charobj.h
Normal file
25
BSQ/includes/utils-h/charobj.h
Normal file
@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* charobj.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: axdubois <axdubois@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/08/02 11:01:47 by axdubois #+# #+# */
|
||||
/* Updated: 2023/08/02 19:10:38 by axdubois ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef CHAROBJ_H
|
||||
# define CHAROBJ_H
|
||||
|
||||
typedef struct s_charobj
|
||||
{
|
||||
char o;
|
||||
char x;
|
||||
char n;
|
||||
} t_charobj;
|
||||
|
||||
t_charobj ft_get_charobj(char *ftline,int sizeline);
|
||||
|
||||
#endif
|
20
BSQ/includes/utils-h/fst_line.h
Normal file
20
BSQ/includes/utils-h/fst_line.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* fst_line.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/08/01 18:25:47 by axdubois #+# #+# */
|
||||
/* Updated: 2023/08/02 20:30:35 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef FST_LINE_H
|
||||
# define FST_LINE_H
|
||||
|
||||
int ft_len_line(int file, int n);
|
||||
int ft_len_colum(int file);
|
||||
char *ft_get_first_line(int file);
|
||||
|
||||
#endif
|
40
BSQ/includes/utils-h/utils.h
Normal file
40
BSQ/includes/utils-h/utils.h
Normal file
@ -0,0 +1,40 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* utils.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/07/31 23:33:05 by axdubois #+# #+# */
|
||||
/* Updated: 2023/08/02 20:37:40 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef UTILS_H
|
||||
# define UTILS_H
|
||||
|
||||
# include <unistd.h>
|
||||
# include <stdlib.h>
|
||||
# include <fcntl.h>
|
||||
|
||||
typedef struct s_coords
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
} t_coords;
|
||||
|
||||
int ft_strlen(char *str);
|
||||
void ft_swap(int *a, int *b);
|
||||
void ft_sort_int_tab(int *tab, int size);
|
||||
void ft_free_coords(t_coords *coords);
|
||||
void ft_free_arr(char *arr);
|
||||
void ft_free_d_arr(char **arr);
|
||||
int ft_check_map(int file);
|
||||
int ft_write_error(int file);
|
||||
int ft_controller(int file);
|
||||
t_coords *ft_sort_x(t_coords *coords, int size);
|
||||
t_coords *ft_sort_y(t_coords *coords, int size);
|
||||
t_coords *ft_get_list_obj(int file, char o);
|
||||
int ft_get_nobj(int file, char o);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user