+ struct fx_4_numeric_type + { + uint32_t type_class : 3; + uint32_t base_type : 5; + uint32_t rows : 3; + uint32_t columns : 3; + uint32_t column_major : 1; + uint32_t unknown : 17; + }; [...] + union + { + struct fx_4_numeric_type type; + uint32_t data; + } numeric_desc; [...] + put_u32_unaligned(buffer, numeric_desc.data);
I don't think bit-field memory layout is particularly portable.