diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-28 20:51:54 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-28 20:51:54 +0100 |
commit | 733fd55d384eef1c89e0ad2a44beaee066182b50 (patch) | |
tree | 494e767707cd2bcecae33519f8d89f4888f5dde3 /src/ft_warp_level.c | |
parent | GNL fix (diff) | |
download | 42-cub3d-733fd55d384eef1c89e0ad2a44beaee066182b50.tar.gz 42-cub3d-733fd55d384eef1c89e0ad2a44beaee066182b50.tar.bz2 42-cub3d-733fd55d384eef1c89e0ad2a44beaee066182b50.tar.xz 42-cub3d-733fd55d384eef1c89e0ad2a44beaee066182b50.tar.zst 42-cub3d-733fd55d384eef1c89e0ad2a44beaee066182b50.zip |
Right but not perfect
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r-- | src/ft_warp_level.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 03302bd..8739550 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -18,6 +18,24 @@ static void ft_memdel((void**)&ml); } +static void + ft_del_some(t_cub *cl) +{ + cl->plist->pos_x = 0; + cl->plist->pos_y = 0; + cl->wlist->x_size = 0; + cl->wlist->y_size = 0; + cl->f_rgb = ft_init_rgb(); + cl->c_rgb = ft_init_rgb(); + cl->plist->start_x = 0; + cl->plist->start_y = 0; + cl->plist->cam_x = 0; + cl->plist->dir_x = -1; + cl->plist->dir_y = 0; + cl->plist->plane_x = 0; + cl->plist->plane_y = 0.66666666; +} + int8_t ft_warp_level(t_cub *cl) { @@ -31,6 +49,7 @@ int8_t return (-1); ft_sprintf(next_path, "%s", cl->mlist->nlevel_path); ft_del_map(cl->mlist); + ft_del_some(cl); if (!(cl->mlist = ft_init_map())) return (-1); ft_parse_map(next_path, cl); |