
Added features: - Check if the room is valid - Pathfinding - Firsk - Camera Changes: - Borders Dev: - new test rooms - ber.vim plugin
52 lines
1.6 KiB
C
52 lines
1.6 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* display.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/02/26 14:32:08 by mcolonna #+# #+# */
|
|
/* Updated: 2024/04/11 17:15:31 by mcolonna ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef DISPLAY_H
|
|
# define DISPLAY_H
|
|
|
|
typedef struct s_image
|
|
{
|
|
int width;
|
|
int height;
|
|
t_assetmeta asset;
|
|
void *img;
|
|
t_pixel *data;
|
|
} t_image;
|
|
|
|
/**
|
|
* Load all assets at the start of the program and prepare the screen buffer.
|
|
*/
|
|
void display_init(void);
|
|
|
|
/**
|
|
* Fill the buffer with black.
|
|
*/
|
|
void display_erase(void);
|
|
|
|
/**
|
|
* Draw an image somewhere in the window.
|
|
* You must call display_flush() after drawing all images.
|
|
* p is the top-left position of the image.
|
|
*/
|
|
void display_draw(t_point p, t_assetsmap_id asset);
|
|
|
|
/**
|
|
* Draw all the screen in the buffer.
|
|
*/
|
|
void display_flush(void);
|
|
|
|
/**
|
|
* Destroy all assets and the screen buffer before finishing the program.
|
|
*/
|
|
void display_destroyall(void);
|
|
|
|
#endif
|