Hard.dat tile stamping data
Hi everyone. Can someone with intimate knowledge of the engine please tell me where the data for stamping hard tiles onto map screen tiles is stored? Hard.dat appears to store the individual collision tiles themselves along with the index data which suggests it's in Map.dat but in WC's guide he says:
>No knows what the alt hardness really is (from my experience, I’ve never seen it used and it always NULL), so I would just ignore it.
Is he right about this or is this just more erroneous information?
>No knows what the alt hardness really is (from my experience, I’ve never seen it used and it always NULL), so I would just ignore it.
Is he right about this or is this just more erroneous information?
This is wrong. It's not very hard: if alt hardness is 0, the default hardness tile for that map tile is used (the one in the initial part of hard.dat). If it is anything else, it is a number from 1 to 800, which is a reference to the hardness tile that is used instead. That way, it is possible to use a map tile with other than its default hardness.
>It's not very hard
Thanks for clearing that up. Most of WC's guide is either vague or just plain wrong in parts which is troubling seeing as he wrote WinDinkEdit.
Thanks for clearing that up. Most of WC's guide is either vague or just plain wrong in parts which is troubling seeing as he wrote WinDinkEdit.
Yeah, that was written back when Dink's source wasn't available yet. A lot of what he calls "junk bytes" are padding bytes for memory alignment reasons. Then again, *really* most of what he calls junk is because of Seth's irrational fear of the 0-index. Arrays would be defined as int[30], and WC would have "4 junk bytes, followed by 29 integers" in the guide.
If you can read C, it helps to have the struct definitions from the 1.08 source next to you when reading WC's guide.
If you can read C, it helps to have the struct definitions from the 1.08 source next to you when reading WC's guide.
Yes I saw your recommendation in that thread a while back regarding a map editor attempt. I've been referring to the structs in Dinkvar.h from 1.07 and Dinkvar.c in Freedink (which is nicely commented with offsets). Some of them are confusingly named and made up of sub-structs which complicates reading them, however.
It does make you wonder what was going to be in all those unused fields in Dink.dat though.
It does make you wonder what was going to be in all those unused fields in Dink.dat though.