diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
commit | d4f853942aa2031c4bd85539ef9f3470967ffdc5 (patch) | |
tree | d2c5ffb0027860722185bf26b526757360ff1584 /src/ft_key_loop.c | |
parent | tweaks (diff) | |
parent | Going full stack is bav (diff) | |
download | 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.gz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.bz2 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.xz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.zst 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.zip |
Merge branch 'bmp'
Diffstat (limited to 'src/ft_key_loop.c')
-rw-r--r-- | src/ft_key_loop.c | 10 |
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)); |