Closed MetLob closed 8 years ago
For images (tiles only) image_size = Tiles.Length But if this image is tiles for compressed map, image_size > Tiles.Length
This situation initialized by incorrect Width and Height, which equals to Width and Height for MAP. But width and height of tiles for compressed map must be < W x H of map image.
PS: sorry for my very bad english...
Thanks for the report :+1: I will look into it as soon as I have some free time
I see what you mean. The problem is that we don't know when the last segment of data from the original source starts, so I was guessing with image_size
. The last segment of data should be after the tiles you are current viewing with the image editor. In this way, the user can choose it.
In the case of importing with map compression we don't know where the tile section ends. If I replace image_size
with Tiles.Length
then:
Tiles_new.Length < Tiles_old.Length
: We would write tiles from the old original data as last segment data.Tiles_new.Length > Tiles_old.Length
: We would skip data from the original data thinking they were tiles.I am not sure what to do here :worried:
Mm, good idea. Maybe we should add a warning message in the console too, just in case it doesn't work as expected in some games.
Fixed in #21 by @MetLob.
In RawData.cs, method:
override void Write(string fileOut, PaletteBase palette)
line 224:This is never be to write last data from
ori_data
Maybe???: