#include "cube3d.h" int shut_down(t_game *game) { mlx_destroy_window(game->mlx_ptr, game->win_ptr); gexit(B_RED"close windows"RESET"\n"); exit(0); return (0); } // temp, to test keypress hook void keypress_do_action(t_game *game) { if (is_esc(game->k_hook)) shut_down(game); if (is_go_left(game->k_hook)) (game->plr_x) -= 5; if (is_go_right(game->k_hook)) (game->plr_x) += 5; if (is_go_forward(game->k_hook)) (game->plr_y) -= 5; if (is_go_backward(game->k_hook)) (game->plr_y) += 5; mlx_pixel_put(game->mlx_ptr, game->win_ptr, game->plr_x, game->plr_y, 0x74db74); }