start project with header, struct, mlx functionnal, and basic key event action
This commit is contained in:
18
srcs/cube3d.c
Normal file
18
srcs/cube3d.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "cube3d.h"
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
t_game *game;
|
||||
|
||||
game = init_game();
|
||||
init_parsing(ac, av, game);
|
||||
|
||||
// receive a keypress event
|
||||
mlx_hook(game->win_ptr, 2, 1L << 0, keypress, game);
|
||||
// receive event when clicking the red button to close the window
|
||||
mlx_hook(game->win_ptr, 17, 1L << 17, shut_down, game);
|
||||
// infinite loop that waits for events to occurs
|
||||
mlx_loop(game->mlx_ptr);
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user