feat: game over and win screens *

feat:
- win screen
- "press enter to retry" in both screens
- reset moves only when winning the game

change:
- game over screen display
- display top-left move a little differently

dev:
- scripts to import different text sizes
This commit is contained in:
mcolonna 2024-04-19 13:19:53 +02:00
parent bc9cee22d7
commit 30a935cf70
53 changed files with 4140 additions and 2163 deletions

View file

@ -6,7 +6,7 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/26 15:26:13 by mcolonna #+# #+# */
/* Updated: 2024/04/18 18:21:35 by mcolonna ### ########.fr */
/* Updated: 2024/04/19 12:29:10 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,6 +17,7 @@
# define WINDOW_HEIGHT 400
# define WINDOW_TITLE "undretale"
# define FPS 20
# define TEXT_SPACE 9
typedef struct s_env
{
@ -25,6 +26,7 @@ typedef struct s_env
void *win;
t_room room;
bool input[4];
bool enter;
int ketchup;
int max_ketchup;
int moves;

View file

@ -6,13 +6,15 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/18 17:45:16 by mcolonna #+# #+# */
/* Updated: 2024/04/18 18:00:50 by mcolonna ### ########.fr */
/* Updated: 2024/04/19 12:48:33 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LEVELS_H
# define LEVELS_H
void init_level(void);
void ask_retry(bool current);
void init_levels(int count, t_const_string *srcs);
void win(void);