1 #include <inttypes.h> 2 typedef uint32_t mpers_ptr_t; 3 typedef 4 struct { 5 uint16_t type; 6 int16_t id; 7 uint16_t direction; 8 struct { 9 uint16_t button; 10 uint16_t interval; 11 } ATTRIBUTE_PACKED trigger; 12 struct { 13 uint16_t length; 14 uint16_t delay; 15 } ATTRIBUTE_PACKED replay; 16 unsigned char mpers_filler_1[2]; 17 union { 18 struct { 19 int16_t level; 20 struct { 21 uint16_t attack_length; 22 uint16_t attack_level; 23 uint16_t fade_length; 24 uint16_t fade_level; 25 } ATTRIBUTE_PACKED envelope; 26 } ATTRIBUTE_PACKED constant; 27 struct { 28 int16_t start_level; 29 int16_t end_level; 30 struct { 31 uint16_t attack_length; 32 uint16_t attack_level; 33 uint16_t fade_length; 34 uint16_t fade_level; 35 } ATTRIBUTE_PACKED envelope; 36 } ATTRIBUTE_PACKED ramp; 37 struct { 38 uint16_t waveform; 39 uint16_t period; 40 int16_t magnitude; 41 int16_t offset; 42 uint16_t phase; 43 struct { 44 uint16_t attack_length; 45 uint16_t attack_level; 46 uint16_t fade_length; 47 uint16_t fade_level; 48 } ATTRIBUTE_PACKED envelope; 49 unsigned char mpers_filler_2[2]; 50 uint32_t custom_len; 51 mpers_ptr_t custom_data; 52 } ATTRIBUTE_PACKED periodic; 53 struct { 54 uint16_t right_saturation; 55 uint16_t left_saturation; 56 int16_t right_coeff; 57 int16_t left_coeff; 58 uint16_t deadband; 59 int16_t center; 60 } ATTRIBUTE_PACKED condition[2]; 61 struct { 62 uint16_t strong_magnitude; 63 uint16_t weak_magnitude; 64 } ATTRIBUTE_PACKED rumble; 65 } u; 66 } ATTRIBUTE_PACKED mx32_struct_ff_effect; 67 #define MPERS_mx32_struct_ff_effect mx32_struct_ff_effect 68