L3DT users' community
Large 3D terrain generator

DMF documentation question

Got a problem or need advice?

DMF documentation question

Postby cliff » Tue Oct 10, 2006 5:05 am

Hi, there. I'm looking at the DMF documentation here, and comparing it to the DMF file I'm trying to work with and I find that the structure of each pixel seems to not quite be exactly as described. I notice that there seems to be a byte at the beginning of the section (usually a 0) and a byte missing at the end, making me wonder if things got re-ordered and just not documented.

Here's what I'm seeing:

00000000h: 4C 33 44 54 C8 00 00 08 00 01 00 1E 02 48 31 54
00000010h: 02 00 00 00 00 8A 02 47 55 53 02 00 00 00 00 DE

So, 4 bytes for the L3DT, 2 bytes for "200", 2 bytes for 2048, 2 bytes for 256... and then an extra zero before the first height value of 1E 02 (542 - the actual height at that position) but the datablock is still 10 bytes long, it just seems like it's out of order or something.

I'd use the provided DLL, but I'm writing my app in C# and it's more trouble to get it working with a native DLL than it is to just create a simple loop to do it myself.
-----
If the truth can be told...
So as to be understood...
It will be... believed.
cliff
Member
 
Posts: 14
Joined: Sat Oct 07, 2006 5:40 pm

Postby Aaron » Tue Oct 10, 2006 9:53 am

Hi Cliff,

Well spotted. There's an extra byte at the end of the header for the wrap state, so the header is actually 11 bytes (Eleven? What was I on at the time?!). I've updated the docs accordingly.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Help and support

Who is online

Users browsing this forum: No registered users and 9 guests

cron