aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_key_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_key_loop.c')
-rw-r--r--src/ft_key_loop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index a7eaccf..e2e2b5c 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -50,10 +50,10 @@ static void
uint64_t y;
t_player *pl;
- pl = cl->plist;
+ pl = &cl->plist;
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')
+ if (cl->mlist.map[y][x] == '1' || cl->mlist.map[y][x] == '2')
{
pl->pos_y = old_y;
pl->pos_x = old_x;
@@ -64,15 +64,15 @@ int
ft_key_loop(t_cub *cl)
{
uint8_t i;
- const float old_y = cl->plist->pos_y;
- const float old_x = cl->plist->pos_x;
+ const float old_y = cl->plist.pos_y;
+ const float old_x = cl->plist.pos_x;
i = 0;
while (i < 5 && cl->key_input[i] != -1 && cl->key_input[i] <= 5)
{
cl->key_ptr[cl->key_input[i]](cl);
ft_collision(old_y, old_x, cl->key_input[i], cl);
- if (cl->mlist->isnlvl)
+ if (cl->mlist.isnlvl)
{
if (ft_warp_level(cl) < 0)
return (ft_exit(FT_RET_FAILED_STRUCTS, cl));