[Help] Getting Length and Width of the DMaps

08/03/2010 13:57 Basser#1
I use spatial indexing for my server, which could be optimized a little, by adding the length and width of each map.
I know it can be read from the map files, or some different file for sure, but I do not know how to do this, as I have no experience with maps.

What I want is a simple text file including:
MapID - X or Width - Y or Length
where - is a space, so:
1002 1024 1024

I need this for all maps except for special maps such as houses, ships, new maps, explaining me how to do it myself would be okay as well!

Hopefully someone can help me out, I really need this...
08/03/2010 14:23 © Haydz#2
It's the first two integers in the DMap file after the PuzzleFile string.

i.e.

Reader.ReadBytes(8);//Junk
string PuzzleFile = NTString(Encoding.ASCII.GetString(Reader.ReadBytes (260)));//Null Terminated String

MapSize = new Size(Reader.ReadInt32(), Reader.ReadInt32());//268

Of course the 4 bytes is overkill, and I reduced that to 2 bytes in my "compressed" DMap file.
08/03/2010 15:57 Basser#3
Solved.
Thanks to Haydz.
If anyone wants the list, feel free to send me a PM, as I can provide you with the list.
#request close.
08/03/2010 16:31 pro4never#4
Glad you got it solved. For the record basically all image files/files which contain sets of coords/pixels have a x/y value near their start.

Ooh the joys of image processing *vomit* That assignment may have made me drop cisc...