Files
42_INT_10_cube3d/srcs/hook/key_do_action.c
2022-03-30 12:55:39 +02:00

18 lines
397 B
C

#include "cube3d.h"
// 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))
plr_posx_decrement(game);
if (is_go_right(game->k_hook))
plr_posx_increment(game);
if (is_go_forward(game->k_hook))
plr_posy_decrement(game);
if (is_go_backward(game->k_hook))
plr_posy_increment(game);
draw(game);
}