This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - TJoe

Pages: [1]
1
Miscellaneous / Hiya - new member here. Q about parsing ADTs
« on: September 12, 2011, 10:28:59 pm »
Hello guys - this seemed to be the best place to post, but if I'm in a wrong forum or website, please feel free to redirect me, as I'm quite new to this scene.
First off - I have never played WoW - not even a test-version. Nor do I plan to. But someone asked my help to make a parser for ADT files, which I did, and hence my question:

When I read the heightmap from the MCNK files (well technically MCVT), I get some odd values.
Some chunks have an all-negative heightmap (which could mean that they're off-limits or the water-level is lowered), but when placing the 256 chunks from a complete MHDR->MCIN in a 16x16 grid, they don't seem to form a complete map (regardless of water-level). Granted I only have a couple of example ADTs, that I got from the guy, I'm helping out, but they still ought to contain a complete map (or a coastline or similar).
I'm convinced that:
1) Either the 145 heightmap values aren't aligned in a 9x9+8x8 grid numbered from the top.
2) The 256 chunks aren't aligned in 16x16 order but in some other way.
3) I'm reading/parsing the floats improperly (ie. they're not little-endian 2s complement).
These are the only 3 things, I can come up with, that I could be doing wrong. The rest of the parser seems to be working, and reading objects/texture etc. is no problem. Ofc there may be something, I'm missing - the Wiki isn't exactly a plethora of information :)

If someone could shed some light on this, I'd aprreciate it.

Regards and thanks in advance
Tom

Pages: [1]