add player moves and test image
This commit is contained in:
25
srcs/draw/player_moves.c
Normal file
25
srcs/draw/player_moves.c
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user