improve gexit with init function and add basic mlx image gestion
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
#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)
|
||||
{
|
||||
@@ -21,7 +13,7 @@ void keypress_do_action(t_game *game)
|
||||
(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);
|
||||
draw(game);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user