Ala-Na/cub3D

Map width may be incorrect ?

Closed this issue · 2 comments

Short exemple of parsing:

NO = ./textures/cheddar.xpm
SO = ./textures/mouse_cheese.xpm
EA = ./textures/blue.xpm
WE = ./textures/draw_cheese.xpm

F = 220,210,185
C = 196,156,63

11111111111111
10000000000001
10000000000001
100000N0000001
10000000000001
10000000000001
11111111111111

player height = 3.500000
player width = 6.500000
map width = 30
map height = 7

If height is correct, width should be 14 and not 30 ?

The width is 30 because the largest string in the file :
WE = ./textures/draw_cheese.xpm
have 30 characters in is string

It was a cheat to find a width who will always fit the size of the map.
But I find a better way to calculate the size of the map to be more accurate ;)

Ah yes ! Sorry ! I thought it was later modified to be the width of the longer line inside char **map