「🏗️」 wip: Player on minimap working
This commit is contained in:
@ -6,27 +6,33 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/11 16:38:40 by adjoly #+# #+# */
|
||||
/* Updated: 2024/09/12 17:04:59 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/09/16 13:36:04 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef GAME_H
|
||||
# define GAME_H
|
||||
|
||||
# include "parsing.h"
|
||||
# include <stdint.h>
|
||||
|
||||
typedef struct s_cub
|
||||
{
|
||||
void *mlx;
|
||||
void *win;
|
||||
void *images;
|
||||
char **map;
|
||||
t_coord p_coord;
|
||||
} t_cub;
|
||||
|
||||
#define ESCAPE_KEY 41
|
||||
#define W_KEY 26
|
||||
#define S_KEY 22
|
||||
#define A_KEY 4
|
||||
#define D_KEY 7
|
||||
#define WHITE 0xFFFFFFFF
|
||||
# define ESCAPE_KEY 41
|
||||
# define W_KEY 26
|
||||
# define S_KEY 22
|
||||
# define A_KEY 4
|
||||
# define D_KEY 7
|
||||
# define WHITE 0xFFFFFFFF
|
||||
# define WINDOW_Y 900
|
||||
# define WINDOW_X 1600
|
||||
|
||||
/**
|
||||
* @brief This function is used to handle keypress
|
||||
@ -36,6 +42,14 @@ typedef struct s_cub
|
||||
*
|
||||
* @return Minilibx go brrrr(useless always 0)
|
||||
*/
|
||||
int key_hook(int key, void *mlx);
|
||||
int key_hook(int key, void *param);
|
||||
|
||||
/**
|
||||
* @brief This function is used to create an image with the player position
|
||||
*
|
||||
* @param cub The address of a t_cub struct filled with mlx data and other thing
|
||||
*
|
||||
*/
|
||||
void *get_player_image(t_cub *cub, uint8_t key_pressed);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user