The Dink Network

Hard.dat tile stamping data

January 22nd 2014, 01:37 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
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?
January 22nd 2014, 09:34 AM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
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.
January 22nd 2014, 07:20 PM
peasantmb.gif
yEoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
>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.
January 22nd 2014, 07:27 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
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.
January 22nd 2014, 08:26 PM
peasantmb.gif
yEoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
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.