feat: esc to quit

This commit is contained in:
mcolonna 2024-04-09 13:46:14 +02:00
parent 574e012721
commit 73106395ba
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,4 @@
- Change sprites for top and bottom borders
- ESC to quit (what's the point)
- Map conditions
- 1 exit
- 1+ collectibles

View file

@ -6,7 +6,7 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/26 12:26:17 by mcolonna #+# #+# */
/* Updated: 2024/04/02 14:41:14 by mcolonna ### ########.fr */
/* Updated: 2024/04/09 13:44:46 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -53,6 +53,8 @@ static void setkey(int keycode, bool value)
int key_press_hook(int keycode)
{
if (keycode == XK_Escape)
success();
setkey(keycode, true);
return (0);
}