Skip to content

Commit

Permalink
fixed start xy for different sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Iipal committed Mar 15, 2019
1 parent bf42e5b commit acdcaa8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions srcs/wolf_init_textures.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: tmaluh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/15 10:38:52 by tmaluh #+# #+# */
/* Updated: 2019/03/15 11:52:00 by tmaluh ### ########.fr */
/* Updated: 2019/03/15 12:26:51 by tmaluh ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -33,10 +33,9 @@ static bool add_init_textures_map(t_env *env)
while (++i < env->walls->max_textures)
{
env->walls->start[i] = (point){p.y, p.x};
if (i + 1 == env->walls->max_textures / env->walls->in_column)
p.x += WALLS_BLOCK_SIZE;
if (!((i + 1) % (env->walls->max_textures / env->walls->in_column)))
p = (point){p.y + WALLS_BLOCK_SIZE, 0};
else
p.x += WALLS_BLOCK_SIZE;
}
return (true);
}
Expand Down

0 comments on commit acdcaa8

Please sign in to comment.