add place for game window
This commit is contained in:
@@ -11,8 +11,9 @@ void destroy_mlx(void *param)
|
||||
mlx_destroy_window(game->mlx_ptr, game->map_win.ptr);
|
||||
// tmp end
|
||||
|
||||
// mlx_destroy_image(game->mlx_ptr, game->img.ptr);
|
||||
// mlx_destroy_window(game->mlx_ptr, game->win.ptr);
|
||||
mlx_destroy_image(game->mlx_ptr, game->img.ptr);
|
||||
mlx_destroy_window(game->mlx_ptr, game->win.ptr);
|
||||
|
||||
mlx_destroy_display(game->mlx_ptr);
|
||||
}
|
||||
|
||||
@@ -33,17 +34,6 @@ int main(int ac, char **av)
|
||||
// draw game a first time before it start
|
||||
draw(game);
|
||||
|
||||
// tmp, to draw map
|
||||
// receive a keypress event
|
||||
mlx_hook(game->map_win.ptr, 2, 1L << 0, keypress, game);
|
||||
// receive a keyprelease event
|
||||
mlx_hook(game->map_win.ptr, 3, 1L << 1, keyrelease, game);
|
||||
// receive event when clicking the red button to close the window
|
||||
mlx_hook(game->map_win.ptr, 17, 1L << 17, shut_down, NULL);
|
||||
// infinite loop that waits for events to occurs
|
||||
// tmp end
|
||||
|
||||
/*
|
||||
// receive a keypress event
|
||||
mlx_hook(game->win.ptr, 2, 1L << 0, keypress, game);
|
||||
// receive a keyprelease event
|
||||
@@ -51,7 +41,6 @@ int main(int ac, char **av)
|
||||
// receive event when clicking the red button to close the window
|
||||
mlx_hook(game->win.ptr, 17, 1L << 17, shut_down, NULL);
|
||||
// infinite loop that waits for events to occurs
|
||||
*/
|
||||
|
||||
mlx_loop_hook(game->mlx_ptr, hook_action, game);
|
||||
mlx_loop(game->mlx_ptr);
|
||||
|
||||
Reference in New Issue
Block a user