feat: add exit (without game over screen) *

also:
- fix: walk_through's prototype
- misc: remove ketchup debug thing
- dev: rename room_patch -> room_fromfile3
This commit is contained in:
mcolonna 2024-04-08 15:37:47 +02:00
parent 6ad613d4bb
commit 7ec3eb6841
16 changed files with 103 additions and 23 deletions

View file

@ -6,7 +6,7 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/15 14:58:25 by mcolonna #+# #+# */
/* Updated: 2024/04/03 16:11:55 by mcolonna ### ########.fr */
/* Updated: 2024/04/08 15:35:33 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -23,7 +23,7 @@ typedef struct s_objecttype
// Called when a character want to walk through this object.
// Returns false to block the character. If true, it will pass.
// If walk_through is NULL, the character is blocked.
bool (*walk_through)(t_character *, t_point pos);
bool (*walk_through)(t_object *, t_character *, t_point pos);
} t_objecttype;
typedef struct s_object

View file

@ -6,7 +6,7 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/02 17:47:01 by mcolonna #+# #+# */
/* Updated: 2024/04/03 15:25:31 by mcolonna ### ########.fr */
/* Updated: 2024/04/08 15:22:05 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -37,4 +37,13 @@ typedef struct s_ketchup_data
t_object ketchup_init(t_memclass mc);
// EXIT
typedef struct s_exit_data
{
t_sprite spr;
bool active;
} t_exit_data;
t_object exit_init(t_memclass mc);
#endif

View file

@ -6,7 +6,7 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/07 23:00:45 by mcolonna #+# #+# */
/* Updated: 2024/04/03 15:32:23 by mcolonna ### ########.fr */
/* Updated: 2024/04/08 15:17:12 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */