aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_get_res.c2
-rw-r--r--src/ft_key_loop.c24
2 files changed, 3 insertions, 23 deletions
diff --git a/src/ft_get_res.c b/src/ft_get_res.c
index e7b38c9..aa1bec4 100644
--- a/src/ft_get_res.c
+++ b/src/ft_get_res.c
@@ -40,7 +40,7 @@ static void
}
static int8_t
-ft_check_res_args(char **words, t_cub *clist)
+ ft_check_res_args(char **words, t_cub *clist)
{
if (!(*words + 0) || !(*(words + 1)) ||
!(*(words + 2)) || (*(words + 3)))
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index 429628e..f72125a 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -51,28 +51,8 @@ static void
t_player *pl;
pl = cl->plist;
- x = pl->pos_x;
- y = pl->pos_y;
- if (key == 0)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
- else if (key == 1)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
- else if (key == 2)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
- else if (key == 3)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
+ x = ft_find_x(key, pl);
+ y = ft_find_y(key, pl);
if (cl->mlist->map[y][x] == '1' || cl->mlist->map[y][x] == '2')
{
pl->pos_y = old_y;