diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:14:26 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:14:26 +0100 |
commit | ce43b1cd1caa539af687425f58a6999a20807878 (patch) | |
tree | 34631aef16b6eb1d5d650fe9e900916f9810215d /src/ft_get_player_spawn.c | |
parent | Makefile update (diff) | |
download | 42-cub3d-ce43b1cd1caa539af687425f58a6999a20807878.tar.gz 42-cub3d-ce43b1cd1caa539af687425f58a6999a20807878.tar.bz2 42-cub3d-ce43b1cd1caa539af687425f58a6999a20807878.tar.xz 42-cub3d-ce43b1cd1caa539af687425f58a6999a20807878.tar.zst 42-cub3d-ce43b1cd1caa539af687425f58a6999a20807878.zip |
Going full stack is bav
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_player_spawn.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/ft_get_player_spawn.c b/src/ft_get_player_spawn.c index a4e94ea..fabcba8 100644 --- a/src/ft_get_player_spawn.c +++ b/src/ft_get_player_spawn.c @@ -21,21 +21,21 @@ static void float sav_dir_x; float sav_plane_x; - sav_dir_x = pl.dir_x; - pl.dir_x = -pl.dir_y; - pl.dir_y = sav_dir_x; - sav_plane_x = pl.plane_x; - pl.plane_x = -pl.plane_y; - pl.plane_y = sav_plane_x; + sav_dir_x = pl->dir_x; + pl->dir_x = -pl->dir_y; + pl->dir_y = sav_dir_x; + sav_plane_x = pl->plane_x; + pl->plane_x = -pl->plane_y; + pl->plane_y = sav_plane_x; } static void ft_get_s_dir(t_player *pl) { - pl.dir_x = -pl.dir_x; - pl.dir_y = -pl.dir_y; - pl.plane_x = -pl.plane_x; - pl.plane_y = -pl.plane_y; + pl->dir_x = -pl->dir_x; + pl->dir_y = -pl->dir_y; + pl->plane_x = -pl->plane_x; + pl->plane_y = -pl->plane_y; } static void @@ -44,12 +44,12 @@ static void float sav_dir_x; float sav_plane_x; - sav_dir_x = pl.dir_x; - pl.dir_x = pl.dir_y; - pl.dir_y = -sav_dir_x; - sav_plane_x = pl.plane_x; - pl.plane_x = pl.plane_y; - pl.plane_y = -sav_plane_x; + sav_dir_x = pl->dir_x; + pl->dir_x = pl->dir_y; + pl->dir_y = -sav_dir_x; + sav_plane_x = pl->plane_x; + pl->plane_x = pl->plane_y; + pl->plane_y = -sav_plane_x; } static void @@ -71,17 +71,17 @@ void x = 1; y = 1; - while (clist.mlist.map[y]) + while (clist->mlist.map[y]) { - while (clist.mlist.map[y][x]) + while (clist->mlist.map[y][x]) { - if (ft_ischarset("NSEW", clist.mlist.map[y][x])) + if (ft_ischarset("NSEW", clist->mlist.map[y][x])) { - plist.pos_x = x + 0.5; - plist.pos_y = y + 0.5; - plist.start_x = plist.pos_x; - plist.start_y = plist.pos_y; - ft_get_start_side(clist.mlist.map[y][x], clist.plist); + plist->pos_x = x + 0.5; + plist->pos_y = y + 0.5; + plist->start_x = plist->pos_x; + plist->start_y = plist->pos_y; + ft_get_start_side(clist->mlist.map[y][x], plist); return ; } x++; |