add player moves and test image

This commit is contained in:
Hugo LAMY
2022-03-30 12:55:39 +02:00
parent f645da7885
commit 00b3612c16
11 changed files with 109 additions and 236 deletions

25
srcs/draw/player_moves.c Normal file
View File

@@ -0,0 +1,25 @@
#include "cube3d.h"
void plr_posx_decrement(t_game *game)
{
(game->plr_x) -= 5;
plr_limits(game, game->plr_x, game->plr_y);
}
void plr_posy_decrement(t_game *game)
{
(game->plr_y) -= 5;
plr_limits(game, game->plr_x, game->plr_y);
}
void plr_posx_increment(t_game *game)
{
(game->plr_x) += 5;
plr_limits(game, game->plr_x, game->plr_y);
}
void plr_posy_increment(t_game *game)
{
(game->plr_y) += 5;
plr_limits(game, game->plr_x, game->plr_y);
}