feat: comic sans move number (also fix *)
fix: the limits of an asset can exceed the image dimensions
This commit is contained in:
parent
d179734202
commit
bc9cee22d7
33 changed files with 1954 additions and 51 deletions
|
|
@ -6,14 +6,14 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/29 17:43:01 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/18 17:05:31 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/04/18 20:07:12 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef DATA_ASSETS_H
|
||||
# define DATA_ASSETS_H
|
||||
|
||||
# define NB_ASSETS 97
|
||||
# define NB_ASSETS 107
|
||||
|
||||
typedef struct s_assetmeta
|
||||
{
|
||||
|
|
@ -130,6 +130,16 @@ typedef enum e_assetsmap_id
|
|||
ANIM_EXPLOSION_PART2_7,
|
||||
ANIM_EXPLOSION_PART2_8,
|
||||
ANIM_EXPLOSION_PART2_9,
|
||||
TEXT_LITTLE_0,
|
||||
TEXT_LITTLE_1,
|
||||
TEXT_LITTLE_2,
|
||||
TEXT_LITTLE_3,
|
||||
TEXT_LITTLE_4,
|
||||
TEXT_LITTLE_5,
|
||||
TEXT_LITTLE_6,
|
||||
TEXT_LITTLE_7,
|
||||
TEXT_LITTLE_8,
|
||||
TEXT_LITTLE_9,
|
||||
TEXT_GAMEOVER,
|
||||
TEXT_YOUDED,
|
||||
} t_assetsmap_id;
|
||||
|
|
|
|||
21
includes/display/text.h
Normal file
21
includes/display/text.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* text.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/18 19:54:06 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/18 20:02:12 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef TEXT_H
|
||||
# define TEXT_H
|
||||
|
||||
# include "includes.h"
|
||||
|
||||
void display_text(t_point *p, t_assetsmap_id asset);
|
||||
void display_uint(t_point *p, unsigned int n);
|
||||
|
||||
#endif
|
||||
|
|
@ -6,13 +6,14 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/02 13:53:41 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/18 17:59:26 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/04/18 21:00:20 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef INCLUDES_H
|
||||
# define INCLUDES_H
|
||||
|
||||
# include <math.h>
|
||||
# include <fcntl.h>
|
||||
# include <time.h>
|
||||
# include <stdbool.h>
|
||||
|
|
@ -35,6 +36,7 @@
|
|||
# include "display/data_sprites.h"
|
||||
# include "display/display.h"
|
||||
# include "display/sprite.h"
|
||||
# include "display/text.h"
|
||||
|
||||
# include "main/error.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue