diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2020-02-19 20:22:27 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2020-02-19 20:22:27 +0100 |
commit | 4984514d2bab3b04790cba631dc7ef8bd8399eff (patch) | |
tree | b8c2c1bae9377f7aa2fdcf3c685834f7002b05c0 /src | |
parent | Commit (diff) | |
download | 42-cub3d-4984514d2bab3b04790cba631dc7ef8bd8399eff.tar.gz 42-cub3d-4984514d2bab3b04790cba631dc7ef8bd8399eff.tar.bz2 42-cub3d-4984514d2bab3b04790cba631dc7ef8bd8399eff.tar.xz 42-cub3d-4984514d2bab3b04790cba631dc7ef8bd8399eff.tar.zst 42-cub3d-4984514d2bab3b04790cba631dc7ef8bd8399eff.zip |
asdasdasd :^)
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_draw_verline.c | 2 | ||||
-rw-r--r-- | src/ft_get_player_spawn.c | 2 | ||||
-rw-r--r-- | src/ft_init_lists.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c index 6cbdc00..d144d87 100644 --- a/src/ft_draw_verline.c +++ b/src/ft_draw_verline.c @@ -53,9 +53,11 @@ int8_t d = (d <= 0) ? (-d) : (d); tex_y = ((d * cl->tlist[cl->w_side].img_h) / cl->rlist.line_h) / 256; (tex_y < 0) ? (tex_y = 0) : 0; + /*if (!(tex_x % 2))*/ ft_draw_texture(cl, x, y, tex_y); y++; } + /*printf("%d\n", cl->tlist[cl->w_side].tex_x);*/ ft_draw_floor(cl, y, x); return (0); } diff --git a/src/ft_get_player_spawn.c b/src/ft_get_player_spawn.c index f5d2c87..e1f313e 100644 --- a/src/ft_get_player_spawn.c +++ b/src/ft_get_player_spawn.c @@ -84,6 +84,8 @@ void { 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); return ; } diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index b8d7c7c..6917db2 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -38,6 +38,8 @@ static t_player return (NULL); plist->pos_x = 0; plist->pos_y = 0; + plist->start_x = 0; + plist->start_y = 0; plist->cam_x = 0; plist->dir_x = -1; plist->dir_y = 0; |