DataDefs.h can have little a documentation

develop
Ben Lubar 2020-04-07 13:46:44 -05:00
parent c8e63cf7a6
commit 6b810b97a0
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
1 changed files with 7 additions and 0 deletions

@ -68,6 +68,8 @@ namespace DFHack
IDTYPE_UNION
};
// pointer flags (bitfield), stored in the count field of struct_field_info
// if mode is POINTER.
enum pointer_identity_flags {
PTRFLAG_IS_ARRAY = 1,
PTRFLAG_HAS_BAD_POINTERS = 2,
@ -164,7 +166,12 @@ namespace DFHack
// Bitfields
struct bitfield_item_info {
// the name of the field, or null if the field is unnamed
const char *name;
// size is positive for defined fields, zero for bits past the end
// of the field, and negative for padding on multi-bit fields
//
// ex. if bits[2].size is -2, then bits[0].size is at least 3
int size;
};