summaryrefslogtreecommitdiff
path: root/include/so_long.h
diff options
context:
space:
mode:
authorDominik Kaiser2024-05-10 12:26:25 +0200
committerGitHub2024-05-10 12:26:25 +0200
commit10b5c3a64680c4dc741cb41c5950abccbf310c7e (patch)
tree4a65d2387c6964ee9357d1ad17e7f9f5094ee99e /include/so_long.h
parente206d293aa947dc56fa8408c42dccaff9cb423c3 (diff)
parent461f71e2660e6286ffc757ca6b7077c70c80b6cf (diff)
downloadso_long-10b5c3a64680c4dc741cb41c5950abccbf310c7e.tar.gz
so_long-10b5c3a64680c4dc741cb41c5950abccbf310c7e.zip
Merge migrate-to-mlx42 into master
Migrate from the old mlx to MLX42
Diffstat (limited to 'include/so_long.h')
-rw-r--r--include/so_long.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/so_long.h b/include/so_long.h
index bff3115..7365a30 100644
--- a/include/so_long.h
+++ b/include/so_long.h
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/08 14:14:02 by dkaiser #+# #+# */
-/* Updated: 2024/05/09 19:24:00 by dkaiser ### ########.fr */
+/* Updated: 2024/05/10 12:24:12 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,9 +14,8 @@
# define SO_LONG_H
# define PLAYER_MOVE_SPEED 3
-
+# include "MLX42/MLX42.h"
# include "libft.h"
-# include "mlx.h"
enum e_direction
{
@@ -36,23 +35,22 @@ typedef struct s_vector
typedef struct s_player
{
t_vector position;
- t_vector direction;
+ t_vector direction;
t_vector velocity;
- void *img;
+ mlx_image_t *img;
} t_player;
typedef struct s_game
{
- void *mlx;
+ mlx_t *mlx;
void *window;
t_player player;
int input_direction;
} t_game;
int init(t_game *game);
-int loop(t_game *game);
+void loop(void *game);
int draw(t_game *game);
-int on_key_down(int key, t_game *game);
-int on_key_up(int keycode, t_game *game);
+void on_key_input(mlx_key_data_t event, void *params);
#endif // SO_LONG_H