feat: ultimate ketchup ending

This commit is contained in:
mcolonna 2024-04-21 15:52:23 +02:00
parent 840d0b31e9
commit 14bcb02d5a
48 changed files with 6101 additions and 2320 deletions

View file

@ -6,14 +6,14 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/29 17:43:01 by mcolonna #+# #+# */
/* Updated: 2024/04/20 13:20:36 by mcolonna ### ########.fr */
/* Updated: 2024/04/21 17:53:15 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef DATA_ASSETS_H
# define DATA_ASSETS_H
# define NB_ASSETS 121
# define NB_ASSETS 124
typedef struct s_assetmeta
{
@ -104,6 +104,7 @@ typedef enum e_assetsmap_id
OBJECT_FIRSK_WALK_UP_2,
OBJECT_FIRSK_WALK_UP_3,
OBJECT_FIRSK_WALK_UP_4,
OBJECT_ULTIMATEKETCHUP,
ANIM_KNIFEATTACK_1,
ANIM_KNIFEATTACK_2,
ANIM_KNIFEATTACK_3,
@ -152,6 +153,8 @@ typedef enum e_assetsmap_id
TEXT_REGULAR_IN_X_MOVES_1,
TEXT_REGULAR_IN_X_MOVES_2,
TEXT_REGULAR_YOUDED,
TEXT_REGULAR_YOUFOUNDTHEULTIMATEKETCHUP_1,
TEXT_REGULAR_YOUFOUNDTHEULTIMATEKETCHUP_2,
TEXT_BIG_YOUWIN,
TEXT_BIG_GAMEOVER,
} t_assetsmap_id;

View file

@ -6,14 +6,14 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/11 15:56:31 by mcolonna #+# #+# */
/* Updated: 2024/04/20 13:24:27 by mcolonna ### ########.fr */
/* Updated: 2024/04/21 15:25:26 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef DATA_SPRITES_H
# define DATA_SPRITES_H
# define NB_SPRITES 25
# define NB_SPRITES 26
typedef enum e_spritetype
{
@ -56,6 +56,7 @@ typedef enum e_spritesmap_id
SPR_FIRSK_WALK_UP,
SPR_FIRSK_WALK_RIGHT,
SPR_FIRSK_WALK_LEFT,
SPR_ULTIMATEKETCHUP,
SPR_KNIFEATTACK,
SPR_EXPLOSION_1,
SPR_EXPLOSION_2,

View file

@ -6,7 +6,7 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/02 17:47:01 by mcolonna #+# #+# */
/* Updated: 2024/04/21 16:06:33 by mcolonna ### ########.fr */
/* Updated: 2024/04/21 17:40:16 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -53,6 +53,7 @@ typedef struct s_exit_data
{
t_sprite spr;
bool active;
bool finalexit;
} t_exit_data;
t_object exit_init(t_memclass mc);
@ -73,4 +74,13 @@ typedef struct s_activablewall_data
t_object activablewall_init(t_memclass mc);
// ULTIMATE KETCHUP
typedef struct s_ultimateketchup_data
{
t_sprite spr;
int time;
} t_ultimateketchup_data;
t_object ultimateketchup_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/20 15:45:36 by mcolonna ### ########.fr */
/* Updated: 2024/04/21 19:27:27 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -28,6 +28,8 @@ typedef struct s_room
t_object **objects;
t_visual **visuals;
t_memclass mc;
bool ending;
int time_after_ending;
} t_room;
void room_init(t_const_string path);
@ -46,4 +48,6 @@ bool room_canwalk(
t_point room_find(t_object_init objtype);
int room_count(t_object_init objtype);
#endif