feat: loots of things!!! *
Added features: - Check if the room is valid - Pathfinding - Firsk - Camera Changes: - Borders Dev: - new test rooms - ber.vim plugin
This commit is contained in:
parent
b7a2d0494f
commit
9e81a59a7e
95 changed files with 8342 additions and 147 deletions
27
includes/utils/map.h
Normal file
27
includes/utils/map.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* map.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/12 19:14:26 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/15 16:36:45 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef MAP_H
|
||||
# define MAP_H
|
||||
|
||||
typedef struct s_map
|
||||
{
|
||||
t_point dim;
|
||||
void **cases;
|
||||
} t_map;
|
||||
|
||||
t_map map_init(t_memclass mc, t_point dim);
|
||||
void **map_at(t_map *map, t_point p);
|
||||
void map_foreach(t_map *map, void (*f)(t_point p, void **el, void *arg),
|
||||
void *arg);
|
||||
|
||||
#endif
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/15 15:05:03 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/02 14:39:41 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/04/11 18:05:53 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -20,8 +20,10 @@ typedef struct s_point
|
|||
} t_point;
|
||||
|
||||
t_point point_init(int x, int y);
|
||||
t_point point_add(t_point point, int x);
|
||||
void point_addto(t_point *dest, t_point src);
|
||||
t_point point_fromdirection(t_direction direction);
|
||||
t_point point_multiply(t_point point, int x);
|
||||
t_point point_subpoint(t_point p1, t_point p2);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue