Just wondering if anyone has any information on their structure. I wrote a basic DMap reader (took about 30 minutes, DMap/ani structure is quite simple.) and I'm trying to parse the PUL files to get the tiles for the map. It's not hard at all to get it to work if you get the offsets right, but some PUL files are half the size of the arena map (the map I worked with first) and the offsets are not absolute at all. Is there something I'm missing about calculating the offset of the tile amounts (x and y)? Of course the tile information is after them, so there's no need for those offsets to be exact.
Edit: And I know that I can calculate the number of tiles by using the tile size and coordinate width/height of the map (given a simple calculation to convert the size to isometric format), but that would still leave the offset for the tile data unknown. So I'd rather just read the data from the file the right way.
Here's an example:
[Only registered and activated users can see links. Click Here To Register...]
As you can see, the highlighted byte (4) is the amount of tiles for the x axis, while the 4th byte to the right of it (3) is the amount of tiles for the y axis. So, 4x3 tiles, pretty simple. And the data follows immediately after that. The problem is the garbage before the tile amounts, it doesn't seem to be a consistent size, so skipping over it can be a pain. That's the only thing I need a nudge about. :)
Edit: Scratch that, it does seem to have some uniformity to it. Tile amount for the X axis has been at 263 for 4 maps now, and the amount for the y axis is at 267. They're both UInt16 (ushort).
Edit: And I know that I can calculate the number of tiles by using the tile size and coordinate width/height of the map (given a simple calculation to convert the size to isometric format), but that would still leave the offset for the tile data unknown. So I'd rather just read the data from the file the right way.
Here's an example:
[Only registered and activated users can see links. Click Here To Register...]
As you can see, the highlighted byte (4) is the amount of tiles for the x axis, while the 4th byte to the right of it (3) is the amount of tiles for the y axis. So, 4x3 tiles, pretty simple. And the data follows immediately after that. The problem is the garbage before the tile amounts, it doesn't seem to be a consistent size, so skipping over it can be a pain. That's the only thing I need a nudge about. :)
Edit: Scratch that, it does seem to have some uniformity to it. Tile amount for the X axis has been at 263 for 4 maps now, and the amount for the y axis is at 267. They're both UInt16 (ushort).