SHARE
TWEET

halo_definitions.h

liquidspark Apr 7th, 2019 975 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef halo_definitions
  2. #define halo_definitions
  3.  
  4. #include "halo_bitfields.h"
  5. #include "halo_enums.h"
  6.  
  7. #pragma mark - Notes -
  8. //  Numbers are all signed unless they are used as lengths (such as string lengths), data offsets and addresses, signatures, padding/alignment byte storage, checksums, or other calculated non-negative numbers. Other numbers, if Guerilla displays it to the user, are signed numbers.
  9. //  In guerilla.txt, strings ending in "*" are calculated values. An example is the physics strings, where there are two entries for mass: "mass" and "mass*". "#" separates window interface text labels from tooltip comments.
  10. //  I'm grouping similar groups of information as structs. I'm also grouping sections as structs. Blocks are of course specified as structs.
  11. /*  UPDATE: THIS IS A WASTE OF TIME, WILL DESIST EXCEPT FOR COMMON STRUCTS. (Otherwise, I only did this approach with actr.) Sections that have padding I grouped into structs of a kind of 4-byte alignment. For example, I split some padding sections to make sectional structs have even multiples of four bytes, like this actr tag class:
  12. 24      perception
  13.  
  14. 2       padding
  15.  
  16. 8       movement
  17.  
  18. 1       padding
  19. 113     looking
  20.  
  21. 10      unopposable
  22. 2       padding
  23.  
  24. 7       panic
  25. (1)
  26.  
  27. (6)7    padding
  28. 26      defensive
  29.  
  30. 1       padding
  31. 7       pursuit
  32. 8       padding
  33.  
  34. 13      berserk
  35. 3       padding
  36.  
  37. 6       firing positions
  38. 10      padding
  39.  
  40. 64    communication
  41. For example, that panic section gets 1 group of four bytes from the 7 groups of four bytes of padding that follows it, and the defensive section following that padding gets the other 6 groups of four bytes, resulting in 8 for panic and 32 for defensive.   */
  42. // Approach: First, go through retribution.h and copy/paste structs here. Then, go through the pasted structs and revise them using the basic structs. Then, use work from infernal to complete the structs I did not paste, determining which structs are common. Then, further optimize common sections into common structs and divide structs into struct sections.
  43. // I found that when there are bitmask flags whose byte sizes I tested using Guerilla, sometimes they are actually interpreted as larger, evident by the fact that prefixing padding is not interpreted as such during map cache file compilation, when endian order is swapped from big to little. An example is struct halo_effe_events_parts_flags_bf, which in characters\cyborg\localized damage.effect appears as 0x00 (padding untouched by Guerilla) and 0x01 (8-bit flags) but in bloodgulch.map, both bytes are swapped as 0x0100 instead of recognizing that first byte as padding like Guerilla apparently does. Instead of making a different struct, I will simply account for the individual discrepancies in functionality and otherwise interpret unused padding bytes as they are interpreted when used.
  44. #pragma mark - Functional -
  45.  
  46. //struct halo_data
  47. //{
  48. //  size_t                          size;
  49. //  char*                           path;
  50. //  void*                           bytes_data;
  51. //  void*                           bytes_struct;
  52. //  enum halo_file_type             file_type;
  53. //  enum halo_data_type             data_type;
  54. //  enum halo_data_location_format  location_format;
  55. //  enum halo_data_chew_state       chew_state;
  56. //  bool                            locked;
  57. //};
  58.  
  59. //struct halo_data
  60. //{
  61. //  size_t  size;
  62. //  void*   bytes;
  63. //};
  64.  
  65. //struct halo_data_cycle
  66. //{
  67. //  struct halo_data    original;
  68. //  struct halo_data    processed;
  69. //  bool                read_ok;
  70. //  bool                write_ok;
  71. //  bool                chew_ok;
  72. //};
  73.  
  74. #pragma mark - Basics -
  75.  
  76. struct halo_ranged_int16_t
  77. {
  78.     int16_t from;
  79.     int16_t to;
  80. };
  81.  
  82. struct halo_ranged_float
  83. {
  84.     float   from;
  85.     float   to;
  86. };
  87.  
  88. struct halo_colorbyte_rgb
  89. {
  90.     uint8_t pad_1[1];
  91.     uint8_t red;
  92.     uint8_t green;
  93.     uint8_t blue;
  94. };
  95.  
  96. struct halo_colorbyte_argb
  97. {
  98.     uint8_t alpha;
  99.     uint8_t red;
  100.     uint8_t green;
  101.     uint8_t blue;
  102. };
  103.  
  104. struct halo_colorfloat_rgb  // fractional
  105. {
  106.     float   red;
  107.     float   green;
  108.     float   blue;
  109. };
  110.  
  111. struct halo_ranged_colorfloat_rgb
  112. {
  113.     struct halo_colorfloat_rgb lower_bound;
  114.     struct halo_colorfloat_rgb upper_bound;
  115. };
  116.  
  117. struct halo_colorfloat_argb // fractional
  118. {
  119.     float   alpha;
  120.     float   red;
  121.     float   green;
  122.     float   blue;
  123. };
  124.  
  125. struct halo_ranged_colorfloat_argb
  126. {
  127.     struct halo_colorfloat_argb lower_bound;
  128.     struct halo_colorfloat_argb upper_bound;
  129. };
  130.  
  131. struct halo_point_2d_int16_t
  132. {
  133.     int16_t x;
  134.     int16_t y;
  135. };
  136.  
  137. struct halo_point_2d
  138. {
  139.     float   x;
  140.     float   y;
  141. };
  142.  
  143. struct halo_point_3d_int16_t    // for prospective tests with halo_sbsp_r3_nodes
  144. {
  145.     int16_t x;
  146.     int16_t y;
  147.     int16_t z;
  148. };
  149.  
  150. struct halo_point_3d
  151. {
  152.     float   x;
  153.     float   y;
  154.     float   z;
  155. };
  156.  
  157. struct halo_angle_2d
  158. {
  159.     float   yaw;
  160.     float   pitch;
  161. };
  162.  
  163. struct halo_angle_3d
  164. {
  165.     float   yaw;
  166.     float   pitch;
  167.     float   roll;
  168. };
  169.  
  170. struct halo_angle_delta
  171. {
  172.     float   left;
  173.     float   right;
  174. };
  175.  
  176. struct halo_plane_2d
  177. {
  178.     float   i;
  179.     float   j;
  180.     float   d;
  181. };
  182.  
  183. struct halo_plane_3d
  184. {
  185.     float   i;
  186.     float   j;
  187.     float   k;
  188.     float   d;
  189. };
  190.  
  191. struct halo_quaternion
  192. {
  193.     float   i;
  194.     float   j;
  195.     float   k;
  196.     float   w;
  197. };
  198.  
  199. struct halo_vector_2d_ij
  200. {
  201.     float   i;
  202.     float   j;
  203. };
  204.  
  205. struct halo_vector_2d_ik
  206. {
  207.     float   i;
  208.     float   k;
  209. };
  210.  
  211. struct halo_vector_3d_component
  212. {
  213.     int8_t  i;
  214.     int8_t  j;
  215.     int8_t  k;
  216. };
  217.  
  218. struct halo_vector_3d
  219. {
  220.     float   i;
  221.     float   j;
  222.     float   k;
  223. };
  224.  
  225. struct halo_texture_map_axes
  226. {
  227.     float   u;
  228.     float   v;
  229. };
  230.  
  231. struct halo_texture_map_coordinate_axes
  232. {
  233.     int16_t u;
  234.     int16_t v;
  235. };
  236.  
  237. struct halo_rectangle_2d
  238. {
  239.     int16_t top;
  240.     int16_t left;
  241.     int16_t bottom;
  242.     int16_t right;
  243. };
  244.  
  245. struct halo_offset_rectangle_2d
  246. {
  247.     int16_t top;
  248.     int16_t bottom;
  249.     int16_t left;
  250.     int16_t right;
  251. };
  252.  
  253. struct halo_offset_rectangle_2d_float
  254. {
  255.     float top;
  256.     float bottom;
  257.     float left;
  258.     float right;
  259. };
  260.  
  261. struct halo_area_int16_t
  262. {
  263.     int16_t width;
  264.     int16_t height;
  265. };
  266.  
  267. struct halo_area_float
  268. {
  269.     float width;
  270.     float height;
  271. };
  272.  
  273. struct halo_cube
  274. {
  275.     struct halo_ranged_float x;
  276.     struct halo_ranged_float y;
  277.     struct halo_ranged_float z;
  278. };
  279.  
  280. struct halo_sphere
  281. {
  282.     struct halo_point_3d centroid;
  283.     float radius;
  284. };
  285.  
  286. struct halo_dependency
  287. {
  288.     char        tag_class[4];
  289.     uint32_t    tpns_location;
  290.     uint32_t    tpns_length;
  291.     int16_t     tag_index_id;
  292.     int16_t     tag_index_id_inverse;
  293.     char            *tpns;  // usually disjunct
  294.     struct halo_tag_classes_bf  supports;   // not in file
  295. };
  296.  
  297. struct halo_array
  298. {
  299.     uint32_t    count;
  300.     uint32_t    location;
  301.     uint32_t    type_le;
  302.     uint32_t    count_max;  // not in file
  303.     uint32_t    type_default;   // not in file
  304.     void        *cells; // disjunct
  305. };
  306.  
  307. struct halo_data
  308. {
  309.     uint32_t    length;
  310.     uint8_t     pad_1[4];
  311.     uint32_t    offset;
  312.     uint32_t    *location;
  313.     uint32_t    type;
  314.     uint32_t    type_default;   // not in file
  315.     uint32_t    length_max; // not in file
  316.     void        *bytes; // disjunct; unparsed bytes
  317. };
  318.  
  319. #pragma mark - Common -
  320.  
  321. struct halo_periodic_functions
  322. {
  323.     enum halo_function_behaviors function_list;
  324.     uint8_t pad_1[2];
  325.     float period;
  326.     float phase;
  327. };
  328.  
  329. struct halo_render_model_3d_node_link_hierarchy_indices
  330. {
  331.     int16_t next_sibling_node_index_sel;
  332.     int16_t first_child_node_index_sel;
  333.     int16_t parent_node_index_sel;
  334. };
  335.  
  336. struct halo_render_model_3d_node_identity
  337. {
  338.     char    name[32];
  339.     struct  halo_render_model_3d_node_link_hierarchy_indices hierarchy;
  340.     uint8_t pad_1[2];
  341. };
  342.  
  343. struct halo_collision_model_3d_node_link_hierarchy_indices
  344. {
  345.     int16_t parent_node_sel;
  346.     int16_t next_sibling_node_sel;
  347.     int16_t first_child_node_sel;
  348. };
  349.  
  350. struct halo_collision_model_3d_node_identity
  351. {
  352.     char    name[32];
  353.     int16_t region_sel;
  354.     struct  halo_collision_model_3d_node_link_hierarchy_indices hierarchy;
  355. };
  356.  
  357. struct halo_collision_bsp
  358. {
  359.     struct halo_array r1_bsp3d_nodes;   // maximum of 131072 cells 0x504DA100
  360.     struct halo_array r2_planes;    // maximum of 65536 cells 0x944DA100
  361.     struct halo_array r3_leaves;    // maximum of 65536 cells 0xFC4DA100
  362.     struct halo_array r4_bsp2d_references;  // maximum of 131072 cells 0xA84EA100
  363.     struct halo_array r5_bsp2d_nodes;   // maximum of 65535 0x584EA100
  364.     struct halo_array r6_surfaces;  // maximum of 131072 cells 0x384FA100
  365.     struct halo_array r7_edges; // maximum of 262144 cells 0xBC4FA100
  366.     struct halo_array r8_vertices;  // maximum of 131072 cells 0x0C50A100
  367. };
  368.  
  369. struct halo_collision_bsp_bsp3d_nodes
  370. {
  371.     int32_t plane;
  372.     int32_t back_child;
  373.     int32_t front_child;
  374. };
  375.  
  376. struct halo_collision_bsp_planes
  377. {
  378.     struct halo_plane_3d plane;
  379. };
  380.  
  381. struct halo_collision_bsp_leaves
  382. {
  383.     uint8_t pad_1[1];
  384.     struct halo_bsp_leaf_flags_bf flags_bf;
  385.     int16_t bsp2d_reference_count;
  386.     int32_t first_bsp2d_reference;
  387. };
  388.  
  389. struct halo_collision_bsp_bsp2d_references
  390. {
  391.     int32_t plane;
  392.     int32_t bsp2d_node;
  393. };
  394.  
  395. struct halo_collision_bsp_bsp2d_nodes
  396. {
  397.     struct halo_plane_2d plane;
  398.     int32_t left_child;
  399.     int32_t right_child;
  400. };
  401.  
  402. struct halo_collision_bsp_surfaces
  403. {
  404.     int32_t plane;
  405.     int32_t first_edge;
  406.     struct halo_bsp_surface_flags_bf flags_bf;
  407.     int8_t breakable_surface;
  408.     int16_t material;   // this is supposed to be set above -1, since every surface must be assigned a material
  409. };
  410.  
  411. struct halo_collision_bsp_edges
  412. {
  413.     int32_t start_vertex;
  414.     int32_t end_vertex;
  415.     int32_t forward_edge;
  416.     int32_t reverse_edge;
  417.     int32_t left_surface;
  418.     int32_t right_surface;
  419. };
  420.  
  421. struct halo_collision_bsp_vertices
  422. {
  423.     struct halo_point_3d point;
  424.     int32_t first_edge;
  425. };
  426.  
  427. struct halo_animation_durations
  428. {
  429.     float   transition_time;
  430.     float   acceleration_time;
  431. };
  432.  
  433. struct halo_animation_3d_screen_frame_movements
  434. {
  435.     float   right_yaw_per_frame_rad;
  436.     float   left_yaw_per_frame_rad;
  437.     int16_t right_frame_count;
  438.     int16_t left_frame_count;
  439.     float   down_pitch_per_frame_rad;
  440.     float   up_pitch_per_frame_rad;
  441.     int16_t down_pitch_frame_count;
  442.     int16_t up_pitch_frame_count;
  443. };
  444.  
  445. struct halo_2d_texture_animation_movement_translation
  446. {
  447.     enum halo_function_out_channels source_list;
  448.     enum halo_function_behaviors function_list;
  449.     float period;
  450.     float phase;
  451.     float scale;
  452. };
  453.  
  454. struct halo_2d_texture_animation_movement_rotation
  455. {
  456.     struct halo_2d_texture_animation_movement_translation translation;
  457.     struct halo_point_2d center;
  458. };
  459.  
  460. struct halo_2d_texture_animation
  461. {
  462.     struct halo_2d_texture_animation_movement_translation u_animation;
  463.     struct halo_2d_texture_animation_movement_translation v_animation;
  464.     struct halo_2d_texture_animation_movement_rotation rotation_animation;
  465. };
  466.  
  467. struct halo_particle_shader_rendering
  468. {
  469.     uint8_t pad_1[1];
  470.     struct halo_particle_shader_flags_bf shader_flags_bf;
  471.     enum halo_framebuffer_blend_functions framebuffer_blend_function_list;
  472.     enum halo_framebuffer_fade_modes framebuffer_fade_mode_list;
  473.     uint8_t pad_2[1];
  474.     struct halo_map_flags_bf map_flags_bf;
  475. };
  476.  
  477. struct halo_particle_shader_section_secondary_map
  478. {
  479.     struct halo_dependency d1_bitmap;   // bitm
  480.     enum halo_multitexture_map_anchors anchor_list;
  481.     uint8_t pad_1[1];
  482.     struct halo_map_flags_bf flags_bf;
  483.     struct halo_2d_texture_animation texture_animation;
  484.     uint8_t pad_2[4];
  485.     float zsprite_radius_scale;
  486. };
  487.  
  488. struct halo_particle_shader
  489. {
  490.     struct halo_particle_shader_rendering rendering;
  491.     uint8_t pad_1[28];
  492.     struct halo_particle_shader_section_secondary_map secondary_map;
  493.     uint8_t pad_2[20];
  494. };
  495.  
  496. struct halo_hud_screen_alignment_anchor
  497. {
  498.     enum halo_positional_alignment_anchors anchor_list;
  499.     uint8_t pad_1[34];
  500. };
  501.  
  502. struct halo_hud_orientation
  503. {
  504.     struct halo_point_2d_int16_t anchor_offset;
  505.     struct halo_area_float scale;
  506.     uint8_t pad_1[1];
  507.     struct halo_hud_scaling_flags_bf scaling_flags_bf;
  508.     uint8_t pad_2[22];
  509. };
  510.  
  511. struct halo_hud_color_and_flash
  512. {
  513.     struct halo_colorbyte_argb default_color;
  514.     struct halo_colorbyte_argb flashing_color;
  515.     float flash_period;
  516.     float flash_delay;
  517.     int16_t number_of_flashes;
  518.     uint8_t pad_1[1];
  519.     struct halo_hud_flash_flags_bf flash_flags_bf;
  520.     float flash_length;
  521.     struct halo_colorbyte_argb disabled_color;
  522. };
  523.  
  524. struct halo_hud_screen_layer
  525. {
  526.     struct halo_hud_orientation orientation;
  527.     struct halo_dependency d1_interface_bitmap; // bitm
  528.     struct halo_hud_color_and_flash color_and_flash;
  529.     uint8_t pad_1[4];
  530.     int16_t sequence_index;
  531.     uint8_t pad_2[2];
  532.     struct halo_array r_multitexture_overlay;   // maximum of 30 cells 0xCC3A9C00
  533.     uint8_t pad_3[4];
  534. };
  535.  
  536. struct halo_hud_numbers
  537. {
  538.     struct halo_hud_orientation orientation;
  539.     struct halo_hud_color_and_flash color_and_flash;
  540.     uint8_t pad_1[4];
  541.     int8_t maximum_number_of_digits;
  542.     struct halo_hud_numbers_flags_bf flags_bf;
  543.     int8_t number_of_fractional_digits;
  544. };
  545.  
  546. struct halo_hud_meter
  547. {
  548.     struct halo_hud_orientation orientation;
  549.     struct halo_dependency d1_meter_bitmap; // bitm
  550.     struct halo_colorbyte_rgb color_at_meter_minimum;
  551.     struct halo_colorbyte_rgb color_at_meter_maximum;
  552.     struct halo_colorbyte_rgb flash_color;
  553.     struct halo_colorbyte_argb empty_color;
  554.     struct halo_hud_color_flags_bf flags_bf;
  555.     int8_t minimum_meter_value;
  556.     int16_t sequence_index;
  557.     int8_t alpha_multiplier;
  558.     int8_t alpha_bias;
  559.     int16_t value_scale;
  560.     float opacity;
  561.     float translucency;
  562.     struct halo_colorbyte_argb disabled_color;
  563.     uint8_t pad_1[16];
  564. };
  565.  
  566. struct halo_hud_messaging
  567. {
  568.     int16_t sequence_index;
  569.     int16_t width_offset;
  570.     struct halo_point_2d_int16_t offset_from_reference_corner;
  571.     struct halo_colorbyte_argb override_icon_color;
  572.     int8_t frame_rate;
  573.     struct halo_hud_messaging_flags_bf flags_bf;
  574.     int16_t text_index;
  575. };
  576.  
  577. struct halo_hud_section_messaging_information
  578. {
  579.     struct halo_hud_messaging messaging;
  580.     uint8_t pad_1[48];
  581. };
  582.  
  583. struct halo_hud_section_screen_alignment
  584. {
  585.     struct halo_hud_screen_alignment_anchor anchor;
  586. };
  587.  
  588. struct halo_hud_section_background
  589. {
  590.     struct halo_hud_screen_layer screen_layer;
  591. };
  592.  
  593. struct halo_hud_section_foreground
  594. {
  595.     struct halo_hud_screen_layer screen_layer;
  596. };
  597.  
  598. struct halo_hud_section_numbers
  599. {
  600.     struct halo_hud_numbers numbers;
  601. };
  602.  
  603. struct halo_hud_anchored_screen_layer
  604. {
  605.     struct halo_hud_section_screen_alignment screen_alignment;
  606.     struct halo_hud_section_background background;
  607. };
  608.  
  609. struct halo_multitexture_overlay_orientation
  610. {
  611.     struct halo_point_2d primary;
  612.     struct halo_point_2d secondary;
  613.     struct halo_point_2d tertiary;
  614. };
  615.  
  616. struct halo_multitexture_overlay_section_anchors
  617. {
  618.     enum halo_relational_anchors primary_anchor_list;
  619.     enum halo_relational_anchors secondary_anchor_list;
  620.     enum halo_relational_anchors tertiary_anchor_list;
  621. };
  622.  
  623. struct halo_multitexture_overlay_section_blending_function
  624. {
  625.     enum halo_texture_blending_functions _0_to_1_blend_function_list;
  626.     enum halo_texture_blending_functions _1_to_2_blend_function_list;
  627. };
  628.  
  629. struct halo_multitexture_overlay_section_map_scales
  630. {
  631.     struct halo_multitexture_overlay_orientation scale;
  632. };
  633.  
  634. struct halo_multitexture_overlay_section_map_offsets
  635. {
  636.     struct halo_multitexture_overlay_orientation offset;
  637. };
  638.  
  639. struct halo_multitexture_overlay_section_map
  640. {
  641.     struct halo_dependency d1_primary;  // bitm
  642.     struct halo_dependency d2_secondary;    // bitm
  643.     struct halo_dependency d3_tertiary; // bitm
  644.     enum halo_texture_wrap_modes primary_wrap_mode_list;
  645.     enum halo_texture_wrap_modes secondary_wrap_mode_list;
  646.     enum halo_texture_wrap_modes tertiary_wrap_mode_list;
  647. };
  648.  
  649. struct halo_multitexture_overlay
  650. {
  651.     uint8_t pad_1[2];
  652.     int16_t type;
  653.     enum halo_framebuffer_blend_functions framebuffer_blend_function_list;
  654.     uint8_t pad_2[34];
  655.     struct halo_multitexture_overlay_section_anchors anchors;
  656.     struct halo_multitexture_overlay_section_blending_function blending_function;
  657.     uint8_t pad_3[2];
  658.     struct halo_multitexture_overlay_section_map_scales map_scales;
  659.     struct halo_multitexture_overlay_section_map_offsets map_offsets;
  660.     struct halo_multitexture_overlay_section_map map;
  661.     uint8_t pad_4[186];
  662.     struct halo_array r1_effectors; // maximum of 30 cells 0x10399C00
  663.     uint8_t pad_5[128];
  664. };
  665.  
  666. struct halo_multitexture_overlay_effectors_section_source_destination
  667. {
  668.     enum halo_effectors_destination_variable_types destination_type_list;
  669.     enum halo_effectors_application_destinations destination_list;
  670.     enum halo_effectors_sources source_list;
  671.     uint8_t pad_1[2];
  672. };
  673.  
  674. struct halo_multitexture_overlay_effectors_section_in_out_bounds
  675. {
  676.     struct halo_ranged_float in_bounds;
  677.     struct halo_ranged_float out_bounds;
  678. };
  679.  
  680. struct halo_multitexture_overlay_effectors_section_tint_color_bounds
  681. {
  682.     struct halo_ranged_colorfloat_rgb tint_color;
  683. };
  684.  
  685. struct halo_multitexture_overlay_effectors_section_periodic_functions
  686. {
  687.     struct halo_periodic_functions periodic_function;
  688. };
  689.  
  690. struct halo_multitexture_overlay_r1_effectors
  691. {
  692.     uint8_t pad_1[64];
  693.     struct halo_multitexture_overlay_effectors_section_source_destination source_destination;
  694.     struct halo_multitexture_overlay_effectors_section_in_out_bounds in_out_bounds;
  695.     uint8_t pad_2[64];
  696.     struct halo_multitexture_overlay_effectors_section_tint_color_bounds tint_color_bounds;
  697.     struct halo_multitexture_overlay_effectors_section_periodic_functions periodic_functions;
  698.     uint8_t pad_3[32];
  699. };
  700.  
  701. struct halo_predicted_resources
  702. {
  703.     enum halo_resource_types type_list;
  704.     int16_t resource_index;
  705.     int32_t tag_index;  // might be 16-bit id and inverse similar to dependency
  706. };
  707.  
  708. struct halo_shader_transparency
  709. {
  710.     uint8_t numeric_counter_limit;
  711.     struct halo_transparent_shader_flags_bf flags_bf;
  712.     enum halo_shader_map_types first_map_type_list;
  713.     enum halo_framebuffer_blend_functions framebuffer_blend_function_list;
  714.     enum halo_framebuffer_fade_modes framebuffer_fade_mode_list;
  715.     enum halo_function_out_channels framebuffer_fade_source_list;
  716. };
  717.  
  718. struct halo_shader_section_lens_flares
  719. {
  720.     float lens_flare_spacing;
  721.     struct halo_dependency d1_lens_flare;   // lens
  722. };
  723.  
  724. struct halo_shader_r_extra_layers
  725. {
  726.     struct halo_dependency d1_shader;   // shdr senv soso schi scex sotr sgla smet spla swat
  727. };
  728.  
  729. struct halo_shader_map_orientation
  730. {
  731.     struct halo_texture_map_axes map_scale;
  732.     struct halo_texture_map_axes map_offset;
  733.     float map_rotation;
  734.     float mipmap_bias_frac;
  735.     struct halo_dependency d1_map;  // bitm
  736. };
  737.  
  738. struct halo_shader_section_2d_texture_animation
  739. {
  740.     struct halo_2d_texture_animation texture_animation;
  741. };
  742.  
  743. struct halo_shader_scaled_map
  744. {
  745.     float scale;
  746.     struct halo_dependency d1_map;  // bitm
  747. };
  748.  
  749. struct halo_shader_directional_light
  750. {
  751.     float perpendicular_brightness_frac;
  752.     struct halo_colorfloat_rgb perpendicular_tint_color;
  753.     float parallel_brightness_frac;
  754.     struct halo_colorfloat_rgb parallel_tint_color;
  755. };
  756.  
  757. struct halo_chicago_shader_r_maps
  758. {
  759.     uint8_t pad_1[1];
  760.     struct halo_schi_map_flags_bf flags_bf;
  761.     uint8_t pad_2[42];
  762.     enum halo_stage_map_functions color_function_list;
  763.     enum halo_stage_map_functions alpha_function_list;
  764.     uint8_t pad_3[36];
  765.     struct halo_shader_map_orientation shader_map_orientation;
  766.     uint8_t pad_4[40];
  767.     struct halo_shader_section_2d_texture_animation _2d_texture_animation;
  768. };
  769.  
  770. struct halo_tag_header
  771. {
  772.     uint8_t     zeros_1[36];
  773.     char        tag_class[4];
  774.     uint32_t    crc32;
  775.     uint32_t    header_length;
  776.     uint8_t     zeros_2[8];
  777.     uint16_t    tag_version;
  778.     uint16_t    engine_version;
  779.     char        engine_class[4];
  780. };
  781.  
  782. #pragma mark - Abstract Tag Classes -
  783.  
  784. #pragma mark devi
  785. struct halo_devi
  786. {
  787.     struct halo_devi_flags_bf flags_bf;
  788.     struct halo_animation_durations power;
  789.     struct halo_animation_durations position;
  790.     struct halo_animation_durations depowered_position;
  791.     enum halo_devi_channel_usages A_in_list;
  792.     enum halo_devi_channel_usages B_in_list;
  793.     enum halo_devi_channel_usages C_in_list;
  794.     enum halo_devi_channel_usages D_in_list;
  795.     struct halo_dependency d1_open_up;  // effe snd!
  796.     struct halo_dependency d2_close_down;   // effe snd!
  797.     struct halo_dependency d3_opened;   // effe snd!
  798.     struct halo_dependency d4_closed;   // effe snd!
  799.     struct halo_dependency d5_depowered;    // effe snd!
  800.     struct halo_dependency d6_repowered;    // effe snd!
  801.     float delay_time;
  802.     uint8_t pad_1[8];
  803.     struct halo_dependency d7_delay_effect; // effe snd!
  804.     float automatic_activation_radius;
  805.     uint8_t pad_2[112];
  806. };
  807.  
  808. #pragma mark item
  809. struct halo_item_section_message_index
  810. {
  811.     int16_t message_index;
  812.     int16_t sort_order;
  813.     float scale;
  814.     int16_t hud_message_value_scale;
  815.     uint8_t pad_1[18];
  816.     enum halo_nones A_in_list;
  817.     enum halo_nones B_in_list;
  818.     enum halo_nones C_in_list;
  819.     enum halo_nones D_in_list;
  820. };
  821.  
  822. struct halo_item
  823. {
  824.     struct halo_item_flags_bf flags_bf;
  825.     struct halo_item_section_message_index message_index;
  826.     uint8_t pad_1[164];
  827.     struct halo_dependency d1_material_effects; // foot
  828.     struct halo_dependency d2_collision_sound;  // snd!
  829.     uint8_t pad_2[120];
  830.     struct halo_ranged_float detonation_delay;
  831.     struct halo_dependency d3_detonating_effect;    // effe
  832.     struct halo_dependency d4_detonation_effect;    // effe
  833. };
  834.  
  835. #pragma mark obje
  836. struct halo_obje_section_export_to_functions
  837. {
  838.     enum halo_obje_export_to_functions A_in_list;
  839.     enum halo_obje_export_to_functions B_in_list;
  840.     enum halo_obje_export_to_functions C_in_list;
  841.     enum halo_obje_export_to_functions D_in_list;
  842.     uint8_t pad_1[44];
  843.     int16_t hud_text_message_index;
  844.     int16_t forced_shader_permutation_index;
  845. };
  846.  
  847. struct halo_obje
  848. {
  849.     enum halo_obje_types obje_index_list_le;
  850.     uint8_t pad_1[1];
  851.     struct halo_obje_flags_bf flags_bf;
  852.     float bounding_radius;
  853.     struct halo_point_3d bounding_offset;
  854.     struct halo_point_3d origin_offset;
  855.     float acceleration_scale;
  856.     uint8_t pad_2[4];
  857.     struct halo_dependency d1_model;    // mod2
  858.     struct halo_dependency d2_animation_graph;  // antr
  859.     uint8_t pad_3[40];
  860.     struct halo_dependency d3_collision_model;  // coll
  861.     struct halo_dependency d4_physics;  // phys
  862.     struct halo_dependency d5_modifier_shader;  // shdr senv soso schi scex sotr sgla smet spla swat
  863.     struct halo_dependency d6_creation_effect;  // effe
  864.     uint8_t pad_4[84];
  865.     float render_bounding_radius;
  866.     struct halo_obje_section_export_to_functions export_to_functions;
  867.     struct halo_array r1_attachments;   // maximum of 8 cells 0x08479D00
  868.     struct halo_array r2_widgets;   // maximum of 4 cells 0x7C479D00
  869.     struct halo_array r3_functions; // maximum of 4 cells 0x50469D00
  870.     struct halo_array r4_change_colors; // maximum of 4 cells 0x6C489D00
  871.     struct halo_array r5_predicted_resources;   // maximum of 1024 cells 0x105FA000
  872. };
  873.  
  874. struct halo_obje_r1_attachments
  875. {
  876.     struct halo_dependency d1_type; // cont effe ligh mgs2 pctl lsnd
  877.     char marker[32];
  878.     enum halo_function_out_channels primary_scale_list;
  879.     enum halo_function_out_channels secondary_scale_list;
  880.     enum halo_function_channel_types change_color_list;
  881.     uint8_t pad_1[18];
  882. };
  883.  
  884. struct halo_obje_r2_widgets
  885. {
  886.     struct halo_dependency d1_reference;    // ant! flag glw! mgs2 elec
  887.     uint8_t pad_1[16];
  888. };
  889.  
  890. struct halo_obje_r3_functions
  891. {
  892.     struct halo_obje_functions_flags_bf flags_bf;
  893.     float period;
  894.     enum halo_function_in_out_channels scale_period_by_list;
  895.     enum halo_function_behaviors function_list;
  896.     enum halo_function_in_out_channels scale_function_by_list;
  897.     enum halo_function_behaviors wobble_function_list;
  898.     float wobble_period;
  899.     float wobble_magnitude;
  900.     float square_wave_threshold_frac;
  901.     int16_t step_count;
  902.     enum halo_function_mappings map_to_list;
  903.     int16_t sawtooth_count;
  904.     enum halo_function_in_out_channels add_list;
  905.     enum halo_function_in_out_channels scale_result_by_list;
  906.     enum halo_function_bounds bounds_mode_list;
  907.     struct halo_ranged_float bounds_frac;
  908.     uint8_t pad_1[6];
  909.     int16_t turn_off_with_sel;
  910.     float scale_by;
  911.     uint8_t pad_2[268];
  912.     char usage[32];
  913. };
  914.  
  915. struct halo_obje_r4_change_colors
  916. {
  917.     enum halo_function_in_out_channels darken_by_list;
  918.     enum halo_function_in_out_channels scale_by_list;
  919.     struct halo_color_interpolation_flags_bf scale_flags_bf;
  920.     struct halo_ranged_colorfloat_rgb color;
  921.     struct halo_array r1_permutations;  // maximum of 8 cells 0xD8479D00
  922. };
  923.  
  924. struct halo_obje_r4_r1_permutations
  925. {
  926.     float weight_frac;
  927.     struct halo_ranged_colorfloat_rgb color;
  928. };
  929.  
  930. #pragma mark shdr
  931. struct halo_shdr_section_radiosity_properties
  932. {
  933.     uint8_t pad_1[1];
  934.     struct halo_shdr_radiosity_properties_flags_bf flags_bf;
  935.     enum halo_detail_levels detail_level_list;
  936.     float power;
  937.     struct halo_colorfloat_rgb color_of_emitted_light;
  938.     struct halo_colorfloat_rgb tint_color;
  939. };
  940.  
  941. struct halo_shdr_section_physics_properties
  942. {
  943.     uint8_t pad_1[2];
  944.     enum halo_material_types material_type_list;
  945. };
  946.  
  947. struct halo_shdr
  948. {
  949.     struct halo_shdr_section_radiosity_properties radiosity_properties;
  950.     struct halo_shdr_section_physics_properties physics_properties;
  951.     enum halo_shdr_types shdr_index_list_le;
  952.     uint8_t pad_1[2];
  953. };
  954.  
  955. #pragma mark unit
  956. struct halo_unit_camera_identity
  957. {
  958.     char camera_marker_name[32];
  959.     char camera_submerged_marker_name[32];
  960.     float pitch_auto_level_rad;
  961.     struct halo_ranged_float pitch_range_rad;
  962.     struct halo_array r1_camera_tracks; // maximum of 2 cells 0xFC579D00
  963. };
  964. struct halo_unit
  965. {
  966.     struct halo_unit_flags_bf flags_bf;
  967.     enum halo_teams default_team_list;
  968.     enum halo_sound_volumes constant_sound_volume_list;
  969.     float rider_damage_fraction;
  970.     struct halo_dependency d1_integrated_light_toggle;  // effe
  971.     enum halo_unit_channel_functions A_in_list;
  972.     enum halo_unit_channel_functions B_in_list;
  973.     enum halo_unit_channel_functions C_in_list;
  974.     enum halo_unit_channel_functions D_in_list;
  975.     float camera_field_of_view_rad; // Guerilla always mis-reads this value as 0
  976.     float camera_stiffness;
  977.     struct halo_unit_camera_identity camera_identity;
  978.     struct halo_vector_3d seat_acceleration_scale;
  979.     uint8_t pad_1[12];
  980.     float soft_ping_threshold;
  981.     float soft_ping_interrupt_time;
  982.     float hard_ping_threshold;
  983.     float hard_ping_interrupt_time;
  984.     float hard_death_threshold;
  985.     float feign_death_threshold;
  986.     float feign_death_time;
  987.     float distance_of_evade_animation;
  988.     float distance_of_dive_animation;
  989.     uint8_t pad_2[4];
  990.     float stunned_movement_threshold;
  991.     float feign_death_chance;
  992.     float feign_repeat_chance;
  993.     struct halo_dependency d2_spawned_actor;    // actv
  994.     struct halo_ranged_int16_t spawned_actor_count;
  995.     float spawned_velocity;
  996.     float aiming_velocity_maximum_rad;
  997.     float aiming_acceleration_maximum_rad;
  998.     float casual_aiming_modifier_frac;
  999.     float looking_velocity_maximum_rad;
  1000.     float looking_acceleration_maximum_rad;
  1001.     uint8_t pad_3[8];
  1002.     float ai_vehicle_radius;
  1003.     float ai_danger_radius;
  1004.     struct halo_dependency d3_melee_damage; // jpt!
  1005.     enum halo_motion_sensor_blip_sizes motion_sensor_blip_size_list;
  1006.     uint8_t pad_4[14];
  1007.     struct halo_array r2_new_hud_interfaces;    // maximum of 2 cells 0xA4579D00
  1008.     struct halo_array r3_dialogue_variants; // maximum of 16 cells 0xA85A9D00
  1009.     float grenade_velocity;
  1010.     enum halo_grenade_types grenade_type_list;
  1011.     int16_t grenade_count;  // note that players have int8_t in MP games
  1012.     uint8_t pad_5[4];
  1013.     struct halo_array r4_powered_seats; // maximum of 2 cells 0x345A9D00
  1014.     struct halo_array r5_weapons;   // maximum of 4 cells 0xC4599D00
  1015.     struct halo_array r6_seats; // maximum of 16 cells 0x68599D00
  1016. };
  1017.  
  1018. struct halo_unit_r1_camera_tracks
  1019. {
  1020.     struct halo_dependency d1_track;    // trak
  1021.     uint8_t pad_1[12];
  1022. };
  1023.  
  1024. struct halo_unit_r_unit_hud_interface
  1025. {
  1026.     struct halo_dependency d1_unit_hud_interface;   // unhi
  1027.     uint8_t pad_1[32];
  1028. };
  1029.  
  1030. struct halo_unit_r3_dialogue_variants
  1031. {
  1032.     int16_t variant_number;
  1033.     uint8_t pad_1[6];
  1034.     struct halo_dependency d1_dialogue; // udlg
  1035. };
  1036.  
  1037. struct halo_unit_r4_powered_seats
  1038. {
  1039.     uint8_t pad_1[4];
  1040.     float driver_powerup_time;
  1041.     float driver_powerdown_time;
  1042.     uint8_t pad_2[56];
  1043. };
  1044.  
  1045. struct halo_unit_r5_weapons
  1046. {
  1047.     struct halo_dependency d1_weapon;   // weap
  1048.     uint8_t pad_1[20];
  1049. };
  1050.  
  1051. struct halo_unit_r6_seats
  1052. {
  1053.     struct halo_unit_seats_flags_bf flags_bf;
  1054.     char label[32];
  1055.     char marker_name[32];
  1056.     uint8_t pad_1[32];
  1057.     struct halo_vector_3d acceleration_scale;
  1058.     uint8_t pad_2[12];
  1059.     float yaw_rate;
  1060.     float pitch_rate;
  1061.     struct halo_unit_camera_identity camera_identity;
  1062.     struct halo_array r2_unit_hud_interface;    // maximum of 2 cells 0xA4579D00
  1063.     uint8_t pad_3[4];
  1064.     int16_t hud_text_message_index;
  1065.     uint8_t pad_4[2];
  1066.     float yaw_minimum_rad;
  1067.     float yaw_maximum_rad;
  1068.     struct halo_dependency d1_built_in_gunner;  // actv
  1069.     uint8_t pad_5[20];
  1070. };
  1071.  
  1072. struct halo_unit_r6_r1_camera_tracks
  1073. {
  1074.     struct halo_dependency d1_track;    // trak
  1075.     uint8_t pad_1[12];
  1076. };
  1077.  
  1078. #pragma mark - Tag Classes -
  1079. #pragma mark actr
  1080. struct halo_actr_section_perception
  1081. {
  1082.     float maximum_vision_distance;
  1083.     float central_vision_angle_rad;
  1084.     float maximum_vision_angle_rad;
  1085.     uint8_t pad_1[4];
  1086.     float peripheral_vision_angle_rad;
  1087.     float peripheral_distance;
  1088.     uint8_t pad_2[4];
  1089.     struct halo_vector_3d standing_gun_offset;
  1090.     struct halo_vector_3d crouching_gun_offset;
  1091.     float hearing_distance;
  1092.     float notice_projectile_chance;
  1093.     float notice_vehicle_chance;
  1094.     uint8_t pad_3[8];
  1095.     float combat_perception_time;
  1096.     float guard_perception_time;
  1097.     float non_combat_perception_time;
  1098.     // 3 calculated float values, 0 until compiled, compiled defaults:
  1099.     float unknown_1;   // 0.0555556
  1100.     float unknown_2;   // 0.0238095
  1101.     float unknown_3;   // 0.0166667 or 0
  1102. };
  1103.  
  1104. struct halo_actr_section_movement
  1105. {
  1106.     float dive_into_cover_chance;
  1107.     float emerge_from_cover_chance;
  1108.     float dive_from_grenade_chance;
  1109.     float path_finding_radius;
  1110.     float glass_ignorance_chance;
  1111.     float stationary_movement_distance;
  1112.     float free_flying_sidestep;
  1113.     float begin_moving_angle_rad;
  1114. };
  1115.  
  1116. struct halo_actr_section_looking
  1117. {
  1118.     uint8_t pad_1[4];
  1119.     struct halo_angle_2d maximum_aiming_deviation;
  1120.     struct halo_angle_2d maximum_looking_deviation;
  1121.     struct halo_angle_delta non_combat_look_delta;
  1122.     struct halo_angle_delta combat_look_delta;
  1123.     struct halo_angle_2d idle_aiming_range;
  1124.     struct halo_angle_2d idle_looking_range;
  1125.     struct halo_ranged_float event_look_time_modifier;
  1126.     struct halo_ranged_float non_combat_idle_facing;
  1127.     struct halo_ranged_float non_combat_idle_aiming;
  1128.     struct halo_ranged_float non_combat_idle_looking;
  1129.     struct halo_ranged_float guard_idle_facing;
  1130.     struct halo_ranged_float guard_idle_aiming;
  1131.     struct halo_ranged_float guard_idle_looking;
  1132.     struct halo_ranged_float combat_idle_facing;
  1133.     struct halo_ranged_float combat_idle_aiming;
  1134.     struct halo_ranged_float combat_idle_looking;
  1135.     uint8_t pad_2[8];
  1136.     // calculated values, 0 until compiled: 3 unknown values of the same data (0xb33bbd2e) followed by 1 float value of 0.5
  1137.     uint32_t unknown_1;
  1138.     uint32_t unknown_2;
  1139.     uint32_t unknown_3;
  1140.     float unknown_4;
  1141.     struct halo_dependency d1_do_not_use;   // weap
  1142.     uint8_t pad_3[268];
  1143.     struct halo_dependency d2_do_not_use;   // proj
  1144. };
  1145.  
  1146. struct halo_actr_section_unopposable
  1147. {
  1148.     enum halo_danger_level_triggers unreachable_danger_trigger_list;
  1149.     enum halo_danger_level_triggers vehicle_danger_trigger_list;
  1150.     enum halo_danger_level_triggers player_danger_trigger_list;
  1151.     uint8_t pad_1[2];
  1152.     struct halo_ranged_float danger_trigger_time;
  1153.     int16_t friends_killed_trigger;
  1154.     int16_t friends_retreating_trigger;
  1155.     uint8_t pad_2[12];
  1156.     struct halo_ranged_float retreat_time;
  1157.     uint8_t pad_3[8];
  1158. };
  1159.  
  1160. struct halo_actr_section_panic
  1161. {
  1162.     struct halo_ranged_float cowering_time;
  1163.     float friend_killed_panic_chance;
  1164.     enum halo_actor_types leader_type_list;
  1165.     uint8_t pad_1[2];
  1166.     float leader_killed_panic_chance;
  1167.     float panic_damage_threshold;
  1168.     float surprise_distance;
  1169.     uint8_t pad_2[4];
  1170. };
  1171.  
  1172. struct halo_actr_section_defensive
  1173. {
  1174.     uint8_t pad_1[24];
  1175.     struct halo_ranged_float hide_behind_cover_time;
  1176.     float hide_target_not_visible_time;
  1177.     float hide_shield_fraction;
  1178.     float attack_shield_fraction;
  1179.     float pursue_shield_fraction;
  1180.     uint8_t pad_2[16];
  1181.     enum halo_crouch_triggers defensive_crouch_type_list;
  1182.     uint8_t pad_3[2];
  1183.     float attacking_crouch_threshold;
  1184.     float defending_crouch_threshold;
  1185.     float minimum_stand_time;
  1186.     float minimum_crouch_time;
  1187.     float defending_hide_time_modifier;
  1188.     float attacking_evasion_threshold;
  1189.     float defending_evasion_threshold;
  1190.     float evasion_seek_cover_chance;
  1191.     float evasion_delay_time;
  1192.     float maximum_seek_cover_distance;
  1193.     float cover_damage_threshold;
  1194.     float stalking_discovery_time;
  1195.     float stalking_maximum_distance;
  1196.     float stationary_facing_angle_rad;
  1197.     float change_facing_stand_time;
  1198. };
  1199.  
  1200. struct halo_actr_section_pursuit
  1201. {
  1202.     uint8_t pad_1[4];
  1203.     struct halo_ranged_float uncover_delay_time;
  1204.     struct halo_ranged_float target_search_time;
  1205.     struct halo_ranged_float pursuit_position_time;
  1206.     int16_t num_positions_coord;
  1207.     int16_t num_positions_normal;
  1208.     uint8_t pad_2[32];
  1209. };
  1210.  
  1211. struct halo_actr_section_berserk
  1212. {
  1213.     float melee_attack_delay;
  1214.     float melee_fudge_factor;
  1215.     float melee_charge_time;
  1216.     struct halo_ranged_float melee_leap_range;
  1217.     float melee_leap_velocity;
  1218.     float melee_leap_chance;
  1219.     float melee_leap_ballistic;
  1220.     float berserk_damage_amount;
  1221.     float berserk_damage_threshold;
  1222.     float berserk_proximity;
  1223.     float suicide_sensing_distance;
  1224.     float berserk_grenade_chance;
  1225.     uint8_t pad_1[12];
  1226. };
  1227.  
  1228. struct halo_actr_section_firing_positions
  1229. {
  1230.     struct halo_ranged_float guard_position_time;
  1231.     struct halo_ranged_float combat_position_time;
  1232.     float old_position_avoid_distance;
  1233.     float friend_avoid_distance;
  1234.     uint8_t pad_1[40];
  1235. };
  1236.  
  1237. struct halo_actr_section_communication
  1238. {
  1239.     struct halo_ranged_float non_combat_idle_speech_time;
  1240.     struct halo_ranged_float combat_idle_speech_time;
  1241.     uint8_t pad_1[176];
  1242.     struct halo_dependency d1_do_not_use;   // actr
  1243.     uint8_t pad_2[48];
  1244. };
  1245.  
  1246. struct halo_actr
  1247. {
  1248.     struct halo_actr_flags_bf flags_bf;
  1249.     struct halo_actr_more_flags_bf more_flags_bf;
  1250.     uint8_t pad_1[12];
  1251.     enum halo_actor_types actor_type_list;
  1252.     uint8_t pad_2[2];
  1253.     struct halo_actr_section_perception perception;
  1254.     uint8_t pad_3[8];
  1255.     struct halo_actr_section_movement movement;
  1256.     struct halo_actr_section_looking looking;
  1257.     struct halo_actr_section_unopposable unopposable;
  1258.     struct halo_actr_section_panic panic;
  1259.     struct halo_actr_section_defensive defensive;
  1260.     struct halo_actr_section_pursuit pursuit;
  1261.     struct halo_actr_section_berserk berserk;
  1262.     struct halo_actr_section_firing_positions firing_positions;
  1263.     struct halo_actr_section_communication communication;
  1264.     // tpns 1-3
  1265. };
  1266.  
  1267. #pragma mark actv
  1268.  
  1269. struct halo_actv_section_movement_switching
  1270. {
  1271.     enum halo_movement_types movement_type_list;
  1272.     uint8_t pad_1[2];
  1273.     float initial_crouch_chance_frac;
  1274.     struct halo_ranged_float crouch_time;
  1275.     struct halo_ranged_float run_time;
  1276. };
  1277.  
  1278. struct halo_actv_section_ranged_combat
  1279. {
  1280.     struct halo_dependency d1_weapon;   // weap
  1281.     float maximum_firing_distance;
  1282.     float rate_of_fire;
  1283.     float projectile_error;
  1284.     struct halo_ranged_float fire_burst_delay_time;
  1285.     float new_target_firing_pattern_time;
  1286.     float surprise_delay_time;
  1287.     float surprise_fire_wildly_time;
  1288.     float death_fire_wildly_chance_frac;
  1289.     float death_fire_wildly_time;
  1290.     struct halo_ranged_float desired_combat_range;
  1291.     struct halo_vector_3d custom_stand_gun_offset;
  1292.     struct halo_vector_3d custom_crouch_gun_offset;
  1293.     float target_tracking_frac;
  1294.     float target_leading_frac;
  1295.     float weapon_damage_modifier;
  1296.     float damage_per_second;
  1297. };
  1298.  
  1299. struct halo_actv_section_burst_geometry
  1300. {
  1301.     float burst_origin_radius;
  1302.     float burst_origin_angle_rad;
  1303.     struct halo_ranged_float burst_return_length;
  1304.     float burst_return_angle_rad;
  1305.     struct halo_ranged_float burst_duration;
  1306.     struct halo_ranged_float burst_separation;
  1307.     float burst_angular_velocity_rad;
  1308.     uint8_t pad_1[4];
  1309.     float special_damage_modifier_frac;
  1310.     float special_projectile_error_rad;
  1311. };
  1312.  
  1313. struct halo_actv_section_firing_patterns
  1314. {
  1315.     float new_target_burst_duration;
  1316.     float new_target_burst_separation;
  1317.     float new_target_rate_of_fire;
  1318.     float new_target_projectile_error;
  1319.     uint8_t pad_1[8];
  1320.     float moving_burst_duration;
  1321.     float moving_burst_separation;
  1322.     float moving_rate_of_fire;
  1323.     float moving_projectile_error;
  1324.     uint8_t pad_2[8];
  1325.     float berserk_burst_duration;
  1326.     float berserk_burst_separation;
  1327.     float berserk_rate_of_fire;
  1328.     float berserk_projectile_error;
  1329. };
  1330.  
  1331. struct halo_actv_section_special_case_firing_properties
  1332. {
  1333.     float super_ballistic_range;
  1334.     float bombardment_range;
  1335.     float modified_vision_range;
  1336.     enum halo_special_fire_modes special_fire_mode_list;
  1337.     enum halo_special_fire_situations special_fire_situation_list;
  1338.     float special_fire_chance_frac;
  1339.     float special_fire_delay;
  1340. };
  1341.  
  1342. struct halo_actv_section_berserking_and_melee
  1343. {
  1344.     float melee_range;
  1345.     float melee_abort_range;
  1346.     struct halo_ranged_float berserk_firing_ranges;
  1347.     float berserk_melee_range;
  1348.     float berserk_melee_abort_range;
  1349. };
  1350.  
  1351. struct halo_actv_section_grenades
  1352. {
  1353.     enum halo_grenade_types grenade_type_list;
  1354.     enum halo_grenade_trajectory_types trajectory_type_list;
  1355.     enum halo_grenade_stimuli grenade_stimulus_list;
  1356.     int16_t minimum_enemy_count;
  1357.     float enemy_radius;
  1358.     uint8_t pad_1[4];
  1359.     float grenade_velocity;
  1360.     struct halo_ranged_float grenade_ranges;
  1361.     float collateral_damage_radius;
  1362.     float grenade_chance_frac;
  1363.     float grenade_check_time;
  1364.     float encounter_grenade_timeout;
  1365. };
  1366.  
  1367. struct halo_actv_section_items
  1368. {
  1369.     struct halo_dependency d1_equipment;    // eqip
  1370.     struct halo_ranged_int16_t grenade_count;
  1371.     float dont_drop_grenades_chance_frac;
  1372.     struct halo_ranged_float drop_weapon_loaded_frac;
  1373.     struct halo_ranged_int16_t drop_weapon_ammo;
  1374. };
  1375.  
  1376. struct halo_actv_section_unit
  1377. {
  1378.     float body_vitality;
  1379.     float shield_vitality;
  1380.     float shield_sapping_radius;
  1381.     int16_t forced_shader_permutation;
  1382. };
  1383.  
  1384. struct halo_actv
  1385. {
  1386.     struct halo_actv_flags_bf flags_bf;
  1387.     struct halo_dependency d1_actor_definition; // actr
  1388.     struct halo_dependency d2_unit; // bipd unit vehi
  1389.     struct halo_dependency d3_major_variant;    // actv
  1390.     uint8_t pad_1[24];
  1391.     struct halo_actv_section_movement_switching movement_switching;
  1392.     struct halo_actv_section_ranged_combat ranged_combat;
  1393.     struct halo_actv_section_burst_geometry burst_geometry;
  1394.     struct halo_actv_section_firing_patterns firing_patterns;
  1395.     uint8_t pad_2[8];
  1396.     struct halo_actv_section_special_case_firing_properties special_case_firing_properties;
  1397.     struct halo_actv_section_berserking_and_melee berserking_and_melee;
  1398.     uint8_t pad_3[8];
  1399.     struct halo_actv_section_grenades grenades;
  1400.     uint8_t pad_4[20];
  1401.     struct halo_actv_section_items items;
  1402.     uint8_t pad_5[28];
  1403.     struct halo_actv_section_unit unit;
  1404.     uint8_t pad_6[30];
  1405.     struct halo_array r1_change_colors; // maximum of 4 cells 0x4C949C00
  1406. };
  1407.  
  1408. struct halo_actv_r1_change_colors
  1409. {
  1410.     struct halo_ranged_colorfloat_rgb color;
  1411.     uint8_t pad_1[8];
  1412. };
  1413.  
  1414. #pragma mark ant!
  1415. struct halo_ant
  1416. {
  1417.     char attachment_marker_name[32];
  1418.     struct halo_dependency d1_bitmaps;  // bitm
  1419.     struct halo_dependency d2_physics;  // pphy
  1420.     uint8_t pad_1[80];
  1421.     float spring_strength_coefficient_frac;
  1422.     float falloff_pixels;
  1423.     float cutoff_pixels;
  1424.     float total_length_calc_le;   // undocumented; sum of all "length" values of r1b cells
  1425.     uint8_t pad_2[36];
  1426.     struct halo_array r1_vertices;  // maximum of 20 cells 0xE4139D00
  1427. };
  1428.  
  1429. struct halo_ant_r1_vertices
  1430. {
  1431.     float spring_strength_coefficient_frac;
  1432.     uint8_t pad_1[24];
  1433.     struct halo_angle_2d angles;
  1434.     float length;
  1435.     int16_t sequence_index;
  1436.     uint8_t pad_2[2];
  1437.     struct halo_colorfloat_argb color_frac;
  1438.     struct halo_colorfloat_argb lod_color_frac;
  1439.     uint8_t pad_3[40];
  1440.     struct halo_vector_3d coordinate_vector_calc_le;    // undocumented; possibly represents the initial direction of the antenna
  1441. };
  1442.  
  1443. #pragma mark antr
  1444. struct halo_antr
  1445. {
  1446.     struct halo_array r1_objects;   // maximum of 4 cells 0x806E9D00
  1447.     struct halo_array r2_units; // maximum of 32 cells 0x1C729D00
  1448.     struct halo_array r3_weapons;   // maximum of 1 cell 0xB0729D00
  1449.     struct halo_array r4_vehicles;  // maximum of 1 cell 0xC4749D00
  1450.     struct halo_array r5_devices;   // maximum of 1 cell 0x58759D00
  1451.     struct halo_array r6_unit_damage;   // maximum of 176 cells 0xF86F9D00
  1452.     struct halo_array r7_first_person_weapons;  // maximum of 1 cell 0x44739D00
  1453.     struct halo_array r8_sound_references;  // maximum of 257 cells 0xB06B9D00
  1454.     float limp_body_node_radius;
  1455.     uint8_t pad_1[1];
  1456.     struct halo_antr_flags_bf flags_bf;
  1457.     uint8_t pad_2[2];
  1458.     struct halo_array r9_nodes; // maximum of 64 cells 0x10769D00
  1459.     struct halo_array r10_animations;   // maximum of 256 cells 0xD86D9D00
  1460. };
  1461.  
  1462. struct halo_antr_r1_objects
  1463. {
  1464.     int16_t animation_sel;
  1465.     enum halo_animation_out_functions function_list;
  1466.     enum halo_animation_function_control_types function_controls_list;
  1467.     uint8_t pad_1[14];
  1468. };
  1469.  
  1470. struct halo_antr_section_screen_bounds
  1471. {
  1472.     struct halo_animation_3d_screen_frame_movements movements;
  1473. };
  1474.  
  1475. struct halo_antr_r2_units
  1476. {
  1477.     char label[32];
  1478.     struct halo_antr_section_screen_bounds looking_screen_bounds;
  1479.     uint8_t pad_1[8];
  1480.     struct halo_array r1_animations;    // maximum of 30 cells 0x38719D00
  1481.     struct halo_array r2_ik_points; // maximum of 4 cells 0xD06E9D00
  1482.     struct halo_array r3_weapons;   // maximum of 16 cells 0xF4709D00
  1483. };
  1484.  
  1485. struct halo_antr_r_animations
  1486. {
  1487.     int16_t animation_sel;
  1488. };
  1489.  
  1490. struct halo_antr_r_ik_points
  1491. {
  1492.     char marker[32];
  1493.     char attach_to_marker[32];
  1494. };
  1495.  
  1496. struct halo_antr_r2_r3_weapons
  1497. {
  1498.     char name[32];
  1499.     char grip_marker[32];
  1500.     char hand_marker[32];
  1501.     struct halo_antr_section_screen_bounds aiming_screen_bounds;
  1502.     uint8_t pad_1[32];
  1503.     struct halo_array r1_animations;    // maximum of 55 cells 0xB46F9D00
  1504.     struct halo_array r2_ik_points; // maximum of 4 cells 0xD06E9D00
  1505.     struct halo_array r3_weapon_types;  // maximum of 16 cells 0x706F9D00
  1506. };
  1507.  
  1508. struct halo_antr_r2_r3_r3_weapon_types
  1509. {
  1510.     char label[32];
  1511.     uint8_t pad_1[16];
  1512.     struct halo_array r1_animations;    // maximum of 10 cells 0x146F9D00
  1513. };
  1514.  
  1515. struct halo_antr_r3_weapons
  1516. {
  1517.     uint8_t pad_1[16];
  1518.     struct halo_array r1_animations;    // maximum of 11 cells 0x60729D00
  1519. };
  1520.  
  1521. struct halo_antr_r4_vehicles
  1522. {
  1523.     struct halo_antr_section_screen_bounds steering_screen;
  1524.     uint8_t pad_1[68];
  1525.     struct halo_array r1_animations;    // maximum of 8 cells 0xFC739D00
  1526.     struct halo_array r2_suspension_animations; // maximum of 8 cells 0xB8739D00
  1527. };
  1528.  
  1529. struct halo_antr_r4_r2_suspension_animations
  1530. {
  1531.     int16_t mass_point_index;
  1532.     int16_t animation_sel;
  1533.     float full_extension_ground_depth;
  1534.     float full_compression_ground_depth;
  1535.     uint8_t pad_1[8];
  1536. };
  1537.  
  1538. struct halo_antr_r5_devices
  1539. {
  1540.     uint8_t pad_1[84];
  1541.     struct halo_array r1_animations;    // maximum of 2 cells 0x08759D00
  1542. };
  1543.  
  1544. struct halo_antr_r7_first_person_weapons
  1545. {
  1546.     uint8_t pad_1[16];
  1547.     struct halo_array r1_animations;    // maximum of 28 cells 0xF4729D00
  1548. };
  1549.  
  1550. struct halo_antr_r8_sound_references
  1551. {
  1552.     struct halo_dependency d1_sound;    // snd!
  1553.     uint8_t pad_1[4];
  1554. };
  1555.  
  1556. struct halo_antr_r9_nodes
  1557. {
  1558.     struct halo_render_model_3d_node_identity identity;
  1559.     struct halo_antr_nodes_node_joint_flags_bf node_joint_flags_bf;
  1560.     struct halo_vector_3d base_vector;
  1561.     float vector_range;
  1562.     uint8_t pad_1[4];
  1563. };
  1564.  
  1565. struct halo_antr_r10_animations
  1566. {
  1567.     char name[32];
  1568.     enum halo_animation_types type_list;
  1569.     int16_t frame_count_calc;
  1570.     int16_t frame_size;
  1571.     enum halo_animation_frame_info_types frame_info_type_list;
  1572.     uint32_t node_list_checksum;
  1573.     int16_t node_count;
  1574.     int16_t loop_frame_index;
  1575.     float weight_frac;
  1576.     int16_t key_frame_index;
  1577.     int16_t second_key_frame_index;
  1578.     int16_t next_animation_sel;
  1579.     uint8_t pad_1[1];
  1580.     struct halo_antr_animations_flags_bf flags_bf;
  1581.     int16_t sound_sel;
  1582.     int16_t sound_frame_index;
  1583.     int8_t left_foot_frame_index;
  1584.     int8_t right_foot_frame_index;
  1585.     uint16_t array_entry_id_le; // incremental +1 number, starts at 0 for first animation cell
  1586.     float speed_multiplier_le; // i'm guessing this is a playback speed multiplier, because it is normally 1
  1587.     struct halo_data frame_info;    // 0xDC6A9D00
  1588.     uint32_t node_translation_flag_data1;
  1589.     uint32_t node_translation_flag_data2;
  1590.     uint8_t pad_2[8];
  1591.     uint32_t node_rotation_flag_data1;
  1592.     uint32_t node_rotation_flag_data2;
  1593.     uint8_t pad_3[8];
  1594.     uint32_t node_scale_flag_data1;
  1595.     uint32_t node_scale_flag_data2;
  1596.     uint8_t pad_4[4];
  1597.     uint32_t offset_to_compressed_data;
  1598.     struct halo_data default_data;  // 0x7C6B9D00
  1599.     struct halo_data frame_data;    // 0x6C6B9D00
  1600. };
  1601.  
  1602. #pragma mark bipd
  1603.  
  1604. struct halo_bipd_section_flying
  1605. {
  1606.     float bank_angle_rad;
  1607.     float bank_apply_time;
  1608.     float bank_decay_time;
  1609.     float pitch_ratio;
  1610.     float max_velocity;
  1611.     float max_sidestep_velocity;
  1612.     float acceleration;
  1613.     float deceleration;
  1614.     float angular_velocity_maximum_rad;
  1615.     float angular_acceleration_maximum;
  1616.     float crouch_velocity_modifier_frac;
  1617. };
  1618.  
  1619. struct halo_bipd_section_movement
  1620. {
  1621.     float maximum_slope_angle_rad;
  1622.     float downhill_falloff_angle_rad;   // possible slope struct
  1623.     float downhill_cutoff_angle_rad;
  1624.     float downhill_velocity_scale;
  1625.     float uphill_falloff_angle_rad;
  1626.     float uphill_cutoff_angle_rad;
  1627.     float uphill_velocity_scale;
  1628.     uint8_t pad_1[24];
  1629.     struct halo_dependency d1_footsteps;    // foot
  1630. };
  1631.  
  1632. struct halo_bipd_section_jumping_and_landing
  1633. {
  1634.     float jump_velocity;
  1635.     uint8_t pad_1[28];
  1636.     float maximum_soft_landing_time;
  1637.     float maximum_hard_landing_time;
  1638.     float minimum_soft_landing_velocity;
  1639.     float minimum_hard_landing_velocity;
  1640.     float death_hard_landing_velocity;
  1641. };
  1642.  
  1643. struct halo_bipd_section_camera_collision_and_autoaim
  1644. {
  1645.     float standing_camera_height;
  1646.     float crouching_camera_height;
  1647.     float crouch_transition_time;
  1648.     uint8_t pad_1[24];
  1649.     float standing_collision_height;
  1650.     float crouching_collision_height;
  1651.     float collision_radius;
  1652.     uint8_t pad_2[40];
  1653.     float autoaim_width;
  1654.     uint8_t pad_3[108];
  1655.     float unknown_1_le;
  1656.     float unknown_2_le;
  1657.     float unknown_3_le;
  1658.     float unknown_4_le;
  1659.     float unknown_5_le;
  1660.     float unknown_6_le;
  1661.     float unknown_7_le;
  1662.     int32_t unknown_8_le;
  1663. };
  1664.  
  1665.  
  1666. struct halo_bipd
  1667. {
  1668.     struct halo_obje obje;
  1669.     struct halo_unit unit;
  1670.     float moving_turning_speed_rad;
  1671.     struct halo_bipd_flags_bf flags_bf;
  1672.     float stationary_turning_threshold_rad;
  1673.     uint8_t pad_1[16];
  1674.     enum halo_bipd_channel_functions A_in_list;
  1675.     enum halo_bipd_channel_functions B_in_list;
  1676.     enum halo_bipd_channel_functions C_in_list;
  1677.     enum halo_bipd_channel_functions D_in_list;
  1678.     struct halo_dependency d1_do_not_use;   // jpt!
  1679.     struct halo_bipd_section_flying flying;
  1680.     uint8_t pad_2[8];
  1681.     struct halo_bipd_section_movement movement;
  1682.     uint8_t pad_3[24];
  1683.     struct halo_bipd_section_jumping_and_landing jumping_and_landing;
  1684.     uint8_t pad_4[20];
  1685.     struct halo_bipd_section_camera_collision_and_autoaim camera_collision_and_autoaim;
  1686.     struct halo_array r1_contact_points;    // maximum of 2 cells 0xC4539D00
  1687. };
  1688.  
  1689. struct halo_bipd_r1_contact_points
  1690. {
  1691.     uint8_t pad_1[32];
  1692.     char marker_name[32];
  1693. };
  1694.  
  1695. #pragma mark bitm
  1696.  
  1697. struct halo_bitm_section_type
  1698. {
  1699.     enum halo_bitm_geometry_types type_list;
  1700. };
  1701.  
  1702. struct halo_bitm_section_format
  1703. {
  1704.     enum halo_bitm_storage_formats format_list;
  1705. };
  1706.  
  1707. struct halo_bitm_section_usage
  1708. {
  1709.     enum halo_bitm_mipmap_usages usage_list;
  1710.     uint8_t pad_1[1];
  1711.     struct halo_bitm_usage_flags_bf flags_bf;
  1712. };
  1713.  
  1714. struct halo_bitm_section_post_processing
  1715. {
  1716.     float detail_fade_factor_frac;
  1717.     float sharpen_amount_frac;
  1718.     float bump_height_frac;
  1719. };
  1720.  
  1721. struct halo_bitm_section_sprite_processing
  1722. {
  1723.     enum halo_bitm_sprite_budget_sizes sprite_budget_size_list;
  1724.     int16_t sprite_budget_count;
  1725. };
  1726.  
  1727. struct halo_bitm_section_color_plate
  1728. {
  1729.     struct halo_area_int16_t color_plate_area;
  1730.     struct halo_data compressed_color_plate_data;   // 0x04689D00
  1731. };
  1732.  
  1733. struct halo_bitm_section_processed_pixel_data
  1734. {
  1735.     struct halo_data processed_pixel_data;  // 0xF4679D00
  1736. };
  1737.  
  1738. struct halo_bitm_section_miscellaneous
  1739. {
  1740.     float blur_filter_size;
  1741.     float alpha_bias;
  1742.     int16_t mipmap_count;
  1743. };
  1744.  
  1745. struct halo_bitm_section_more_sprite_processing
  1746. {
  1747.     enum halo_bitm_sprite_usages sprite_usage_list;
  1748.     int16_t sprite_spacing;
  1749. };
  1750.  
  1751. struct halo_bitm
  1752. {
  1753.     struct halo_bitm_section_type type;
  1754.     struct halo_bitm_section_format format;
  1755.     struct halo_bitm_section_usage usage;
  1756.     struct halo_bitm_section_post_processing post_processing;
  1757.     struct halo_bitm_section_sprite_processing sprite_processing;
  1758.     struct halo_bitm_section_color_plate color_plate;
  1759.     struct halo_bitm_section_processed_pixel_data processed_pixel_data;
  1760.     struct halo_bitm_section_miscellaneous miscellaneous;
  1761.     struct halo_bitm_section_more_sprite_processing more_sprite_processing;
  1762.     uint8_t pad_1[2];
  1763.     struct halo_array r1_sequences; // maximum of 256 cells 0x10679D00
  1764.     struct halo_array r2_bitmaps;   // maximum of 2048 cells 0x00669D00
  1765. };
  1766.  
  1767. struct halo_bitm_r1_sequences
  1768. {
  1769.     char name[32];
  1770.     int16_t first_bitmap_index;
  1771.     int16_t bitmap_count;
  1772.     uint8_t pad_1[16];
  1773.     struct halo_array r1_sprites;   // maximum of 64 cells 0x9C669D00
  1774. };
  1775.  
  1776. struct halo_bitm_r1_r1_sprites
  1777. {
  1778.     int16_t bitmap_index;
  1779.     uint8_t pad_1[6];
  1780.     float left;
  1781.     float right;
  1782.     float top;
  1783.     float bottom;
  1784.     struct halo_point_2d registration_point;
  1785. };
  1786.  
  1787. struct halo_bitm_r2_bitmaps
  1788. {
  1789.     char signature[4];  // "bitm"
  1790.     struct halo_area_int16_t area;
  1791.     int16_t depth;
  1792.     enum halo_bitm_image_types type_list;
  1793.     enum halo_bitm_image_data_formats format_list;
  1794.     struct halo_bitm_bitmaps_flags_bf flags_bf;
  1795.     struct halo_point_2d_int16_t registration_point;
  1796.     int16_t mipmap_count;
  1797.     uint16_t unknown1_le;   // example value = 8192
  1798.     int32_t pixels_offset;
  1799.     int32_t pixel_count;    // pixel count ("unknown" in Guerilla)
  1800.     int32_t unknown2;
  1801.     uint32_t unknown3_le;   // example value = -1 (0xFFFFFFFF)
  1802.     uint8_t pad_1[4];
  1803.     uint32_t base_address;
  1804. };
  1805.  
  1806. #pragma mark boom
  1807. struct halo_boom
  1808. {
  1809.     float radius;
  1810. };
  1811.  
  1812. #pragma mark cdmg
  1813.  
  1814. struct halo_cdmg_section_vibrate_parameters
  1815. {
  1816.     float low_frequency_frac;
  1817.     float high_frequency_frac;
  1818. };
  1819.  
  1820. struct halo_cdmg_section_camera_shaking
  1821. {
  1822.     float random_translation;
  1823.     float random_rotation_rad;
  1824.     uint8_t pad_1[12];
  1825.     enum halo_function_behaviors wobble_function_list;
  1826.     uint8_t pad_2[2];
  1827.     float wobble_function_period;
  1828.     float wobble_weight_frac;
  1829. };
  1830.  
  1831. struct halo_cdmg_section_damage
  1832. {
  1833.     enum halo_damage_side_effects side_effect_list;
  1834.     enum halo_damage_categories category_list;
  1835.     struct halo_damage_flags_bf flags_bf;
  1836.     uint8_t pad_1[4];
  1837.     float damage_lower_bound;
  1838.     struct halo_ranged_float damage_upper_bound;
  1839.     float vehicle_passthrough_penalty_frac;
  1840.     uint8_t pad_2[4];
  1841.     float stun_frac;
  1842.     float maximum_stun_frac;
  1843.     float stun_time;
  1844.     uint8_t pad_3[4];
  1845.     float instantaneous_acceleration;
  1846. };
  1847.  
  1848. struct halo_cdmg_section_damage_modifiers
  1849. {
  1850.     float dirt;
  1851.     float sand;
  1852.     float stone;
  1853.     float snow;
  1854.     float wood;
  1855.     float metal_hollow;
  1856.     float metal_thin;
  1857.     float metal_thick;
  1858.     float rubber;
  1859.     float glass;
  1860.     float force_field;
  1861.     float grunt;
  1862.     float hunter_armor;
  1863.     float hunter_skin;
  1864.     float elite;
  1865.     float jackal;
  1866.     float jackal_energy_shield;
  1867.     float engineer;
  1868.     float engineer_force_field;
  1869.     float flood_combat_form;
  1870.     float flood_carrier_form;
  1871.     float cyborg;
  1872.     float cyborg_energy_shield;
  1873.     float armored_human;
  1874.     float human;
  1875.     float sentinel;
  1876.     float monitor;
  1877.     float plastic;
  1878.     float water;
  1879.     float leaves;
  1880.     float elite_energy_shield;
  1881.     float ice;
  1882.     float hunter_shield;
  1883. };
  1884.  
  1885. struct halo_cdmg
  1886. {
  1887.     struct halo_ranged_float radius;
  1888.     float cutoff_scale_frac;
  1889.     uint8_t pad_1[24];
  1890.     struct halo_cdmg_section_vibrate_parameters vibrate_parameters;
  1891.     uint8_t pad_2[24];
  1892.     struct halo_cdmg_section_camera_shaking camera_shaking;
  1893.     uint8_t pad_3[192];
  1894.     struct halo_cdmg_section_damage damage;
  1895.     uint8_t pad_4[8];
  1896.     struct halo_cdmg_section_damage_modifiers damage_modifiers;
  1897.     uint8_t pad_5[28];
  1898. };
  1899.  
  1900. #pragma mark coll
  1901.  
  1902. struct halo_coll_section_body
  1903. {
  1904.     float maximum_body_vitality;
  1905.     float body_system_shock;
  1906.     uint8_t pad_1[52];
  1907.     float friendly_damage_resistance_frac;
  1908.     uint8_t pad_2[40];
  1909.     struct halo_dependency d1_localized_damage_effect;  // effe
  1910.     float area_damage_effect_threshold_frac;
  1911.     struct halo_dependency d2_area_damage_effect;   // effe
  1912.     float body_damaged_threshold;
  1913.     struct halo_dependency d3_body_damaged_effect;  // effe
  1914.     struct halo_dependency d4_body_depleted_effect; // effe
  1915.     float body_destroyed_threshold;
  1916.     struct halo_dependency d5_body_destroyed_effect;    // effe
  1917. };
  1918.  
  1919. struct halo_coll_section_shield
  1920. {
  1921.     float maximum_shield_vitality;
  1922.     uint8_t pad_1[2];
  1923.     enum halo_material_types shield_material_type_list;
  1924.     uint8_t pad_2[24];
  1925.     enum halo_function_mappings shield_failure_function_list;
  1926.     uint8_t pad_3[2];
  1927.     float shield_failure_threshold_frac;
  1928.     float failing_shield_leak_fraction_frac;
  1929.     uint8_t pad_4[16];
  1930.     float minimum_stun_damage;
  1931.     float stun_time;
  1932.     float recharge_time;
  1933.     uint8_t pad_5[112];
  1934.     float shield_damaged_threshold;
  1935.     struct halo_dependency d1_shield_damaged_effect;    // effe
  1936.     struct halo_dependency d2_shield_depleted_effect;   // effe
  1937.     struct halo_dependency d3_shield_recharging_effect; // effe
  1938. };
  1939.  
  1940. struct halo_coll_section_pathfinding_box
  1941. {
  1942.     struct halo_cube cube;
  1943. };
  1944.  
  1945. struct halo_coll
  1946. {
  1947.     struct halo_coll_flags_bf flags_bf;
  1948.     int16_t indirect_damage_material_sel;
  1949.     uint8_t pad_1[2];
  1950.     struct halo_coll_section_body body;
  1951.     struct halo_coll_section_shield shield;
  1952.     uint8_t pad_2[124];
  1953.     struct halo_array r1_materials; // maximum of 32 cells (note that the foot and matg classes specify 33 material types) 0x10F19C00
  1954.     struct halo_array r2_regions;   // maximum of 8 cells 0x10F29C00
  1955.     struct halo_array r3_modifiers; // maximum of 0 cells (this is apparently unused) 0x54F29C00
  1956.     uint8_t pad_3[16];
  1957.     struct halo_coll_section_pathfinding_box pathfinding_box;
  1958.     struct halo_array r4_pathfinding_spheres;   // maximum of 32 cells 0xA8F39C00
  1959.     struct halo_array r5_nodes; // maximum of 64 cells 0x30F39C00
  1960. };
  1961.  
  1962. struct halo_coll_r1_materials
  1963. {
  1964.     char name[32];
  1965.     struct halo_coll_materials_flags_bf flags_bf;
  1966.     enum halo_material_types material_type_list;
  1967.     uint8_t pad_1[2];
  1968.     float shield_leak_percentage_frac;
  1969.     float shield_damage_multiplier;
  1970.     uint8_t pad_2[12];
  1971.     float body_damage_multiplier;
  1972.     uint8_t pad_3[8];
  1973. };
  1974.  
  1975. struct halo_coll_r2_regions
  1976. {
  1977.     char name[32];
  1978.     struct halo_coll_regions_flags_bf flags_bf;
  1979.     uint8_t pad_1[4];
  1980.     float damage_threshold;
  1981.     uint8_t pad_2[12];
  1982.     struct halo_dependency d1_destroyed_effect; // effe
  1983.     struct halo_array r1_permutations;  // maximum of 32 cells 0x84F19C00
  1984. };
  1985.  
  1986. struct halo_coll_r2_r1_permutations
  1987. {
  1988.     char name[32];
  1989. };
  1990.  
  1991. struct halo_coll_r3_modifiers
  1992. {
  1993.     // damage modifiers is unused
  1994. };
  1995.  
  1996. struct halo_coll_r4_pathfinding_spheres
  1997. {
  1998.     int16_t node_sel;
  1999.     uint8_t pad_1[14];
  2000.     struct halo_point_3d center;
  2001.     float radius;
  2002. };
  2003.  
  2004. struct halo_coll_r5_nodes
  2005. {
  2006.     struct halo_collision_model_3d_node_identity identity;
  2007.     uint8_t pad_1[12];
  2008.     struct halo_array r1_bsps;  // maximum of 32 cells 0xA4F29C00
  2009. };
  2010.  
  2011. #pragma mark colo
  2012. struct halo_colo
  2013. {
  2014.     struct halo_array r1_colors;    // maximum of 512 cells 0xB4639D00
  2015. };
  2016.  
  2017. struct halo_colo_r1_colors
  2018. {
  2019.     char name[32];
  2020.     struct halo_colorfloat_argb color;
  2021. };
  2022.  
  2023. #pragma mark cont
  2024.  
  2025. struct halo_cont_section_point_creation
  2026. {
  2027.     float point_generation_rate;
  2028.     struct halo_ranged_float point_velocity;
  2029.     float point_velocity_cone_angle_rad;
  2030.     float inherited_velocity_fraction_frac;
  2031. };
  2032.  
  2033. struct halo_cont_section_rendering
  2034. {
  2035.     enum halo_cont_render_types render_type_list;
  2036.     uint8_t pad_1[2];
  2037.     struct halo_texture_map_axes texture_repeats;
  2038.     struct halo_texture_map_axes texture_animation;
  2039.     float animation_rate;
  2040.     struct halo_dependency d1_bitmap;   // bitm
  2041.     int16_t first_sequence_index;
  2042.     int16_t sequence_count;
  2043.     uint8_t pad_2[104];
  2044.     struct halo_particle_shader particle_shader;
  2045. };
  2046.  
  2047. struct halo_cont
  2048. {
  2049.     uint8_t pad_1[1];
  2050.     struct halo_cont_flags_bf flags_bf;
  2051.     struct halo_cont_scale_flags_bf scale_flags_bf;
  2052.     struct halo_cont_section_point_creation point_creation;
  2053.     struct halo_cont_section_rendering rendering;
  2054.     struct halo_array r1_point_states;  // maximum of 16 cells 0xBC409D00
  2055. };
  2056.  
  2057. struct halo_cont_r1_point_states_section_state_timing
  2058. {
  2059.     struct halo_ranged_float duration;
  2060.     struct halo_ranged_float transition_duration;
  2061. };
  2062.  
  2063. struct halo_cont_r1_point_states_section_point_variables
  2064. {
  2065.     struct halo_dependency d1_physics;  // pphy
  2066.     uint8_t pad_1[32];
  2067.     float width;
  2068.     struct halo_ranged_colorfloat_argb color;
  2069.     struct halo_cont_point_states_scale_flags_bf scale_flags_bf;
  2070. };
  2071.  
  2072. struct halo_cont_r1_point_states
  2073. {
  2074.     struct halo_cont_r1_point_states_section_state_timing state_timing;
  2075.     struct halo_cont_r1_point_states_section_point_variables point_variables;
  2076. };
  2077.  
  2078. #pragma mark ctrl
  2079. struct halo_ctrl
  2080. {
  2081.     struct halo_obje obje;
  2082.     struct halo_devi devi;
  2083.     enum halo_ctrl_types control_type_list;
  2084.     enum halo_ctrl_trigger_events control_triggers_when_list;
  2085.     float control_call_value_frac;
  2086.     uint8_t pad_1[80];
  2087.     struct halo_dependency d1_control_on;   // effe snd!
  2088.     struct halo_dependency d2_control_off;  // effe snd!
  2089.     struct halo_dependency d3_control_deny; // effe snd!
  2090. };
  2091.  
  2092. #pragma mark deca
  2093.  
  2094. struct halo_deca_section_decal
  2095. {
  2096.     struct halo_deca_flags_bf flags_bf;
  2097.     enum halo_deca_geometry_wrap_types type_list;
  2098.     enum halo_deca_layers layer_list;
  2099.     uint8_t pad_1[2];
  2100.     struct halo_dependency d1_next_decal_in_chain;  // deca
  2101. };
  2102.  
  2103. struct halo_deca_section_radius_and_color
  2104. {
  2105.     struct halo_ranged_float radius;
  2106.     uint8_t pad_1[12];
  2107.     struct halo_ranged_float intensity_frac;
  2108.     struct halo_ranged_colorfloat_rgb color;
  2109. };
  2110.  
  2111. struct halo_deca_section_animation
  2112. {
  2113.     int16_t animation_loop_frame;
  2114.     int16_t animation_speed;   // 1 to 120
  2115.     uint8_t pad_1[28];
  2116.     struct halo_ranged_float lifetime;
  2117.     struct halo_ranged_float decay_time;
  2118. };
  2119.  
  2120. struct halo_deca_section_shader
  2121. {
  2122.     enum halo_framebuffer_blend_functions framebuffer_blend_function_list;
  2123.     uint8_t pad_1[22];
  2124.     struct halo_dependency d1_map;  // bitm
  2125. };
  2126.  
  2127. struct halo_deca_section_sprite_info
  2128. {
  2129.     float maximum_sprite_extent;   // 16
  2130. };
  2131.  
  2132. struct halo_deca
  2133. {
  2134.     struct halo_deca_section_decal decal;
  2135.     struct halo_deca_section_radius_and_color radius_and_color;
  2136.     uint8_t pad_1[12];
  2137.     struct halo_deca_section_animation animation;
  2138.     uint8_t pad_2[56];
  2139.     struct halo_deca_section_shader shader;
  2140.     uint8_t pad_3[20];
  2141.     struct halo_deca_section_sprite_info sprite_info;
  2142.     uint8_t pad_4[12];
  2143. };
  2144.  
  2145. #pragma mark DeLa
  2146.  
  2147. struct halo_DeLa_section_game_data_input_functions
  2148. {
  2149.     struct halo_array r1_game_data_inputs;  // maximum of 64 cells 0xF0239C00
  2150. };
  2151.  
  2152. struct halo_DeLa_section_event_handlers
  2153. {
  2154.     struct halo_array r2_event_handlers;    // maximum of 32 cells 0xAC249C00
  2155. };
  2156.  
  2157. struct halo_DeLa_section_search_and_replace
  2158. {
  2159.     struct halo_array r3_search_and_replace_functions;  // maximum of 32 cells 0x18269C00
  2160. };
  2161.  
  2162. struct halo_DeLa_section_text_box
  2163. {
  2164.     struct halo_dependency d1_text_label_unicode_strings_list;  // ustr
  2165.     struct halo_dependency d2_text_font;    // font
  2166.     struct halo_colorfloat_argb text_color;
  2167.     enum halo_justifications justification_list;
  2168.     struct halo_dela_text_box_flags_bf flags_bf;
  2169. };
  2170.  
  2171. struct halo_DeLa_section_more_text_box_parameters
  2172. {
  2173.     int16_t string_list_index;
  2174.     int16_t horizontal_offset;
  2175.     int16_t vertical_offset;
  2176. };
  2177.  
  2178. struct halo_DeLa_section_list_items
  2179. {
  2180.     struct halo_dela_list_items_bf flags_bf;
  2181. };
  2182.  
  2183. struct halo_DeLa_section_spinner_list
  2184. {
  2185.     struct halo_dependency d1_list_header_bitmap;   // bitm
  2186.     struct halo_dependency d2_list_footer_bitmap;   // bitm
  2187.     struct halo_rectangle_2d header_bounds;
  2188.     struct halo_rectangle_2d footer_bounds;
  2189. };
  2190.  
  2191. struct halo_DeLa_section_column_list
  2192. {
  2193.     struct halo_dependency d1_extended_description_widget;  // DeLa
  2194. };
  2195.  
  2196. struct halo_DeLa_section_conditional_widgets
  2197. {
  2198.     struct halo_array r4_conditional_widgets;   // maximum of 32 cells 0x30259C00
  2199. };
  2200.  
  2201. struct halo_DeLa_section_child_widgets
  2202. {
  2203.     struct halo_array r5_child_widgets; // maximum of 32 cells 0xC8259C00
  2204. };
  2205.  
  2206. struct halo_DeLa
  2207. {
  2208.     enum halo_dela_widget_types widget_type_list;
  2209.     enum halo_player_controllers controller_index_list;
  2210.     char name[32];
  2211.     struct halo_rectangle_2d bounds;
  2212.     struct halo_dela_flags_bf flags_bf;
  2213.     int32_t milliseconds_to_auto_close;
  2214.     int32_t milliseconds_auto_close_fade_time;
  2215.     struct halo_dependency d1_background_bitmap;    // bitm
  2216.     struct halo_DeLa_section_game_data_input_functions game_data_input_functions;
  2217.     struct halo_DeLa_section_event_handlers event_handlers;
  2218.     struct halo_DeLa_section_search_and_replace search_and_replace;
  2219.     uint8_t pad_1[128];
  2220.     struct halo_DeLa_section_text_box text_box;
  2221.     uint8_t pad_2[12];
  2222.     struct halo_DeLa_section_more_text_box_parameters more_text_box_parameters;
  2223.     uint8_t pad_3[28];
  2224.     struct halo_DeLa_section_list_items list_items;
  2225.     struct halo_DeLa_section_spinner_list spinner_list;
  2226.     uint8_t pad_4[32];
  2227.     struct halo_DeLa_section_column_list column_list;
  2228.     uint8_t pad_5[288];
  2229.     struct halo_DeLa_section_conditional_widgets conditional_widgets;
  2230.     uint8_t pad_6[256];
  2231.     struct halo_DeLa_section_child_widgets child_widgets;
  2232. };
  2233.  
  2234. struct halo_DeLa_r1_game_data_inputs
  2235. {
  2236.     enum halo_game_data_input_functions function_list;
  2237.     uint8_t pad_1[34];
  2238. };
  2239.  
  2240. struct halo_DeLa_r2_event_handlers
  2241. {
  2242.     struct halo_dela_event_handlers_flags_bf flags_bf;
  2243.     enum halo_event_handler_event_types event_type_list;
  2244.     enum halo_event_handler_functions function_list;
  2245.     struct halo_dependency d1_widget_tag;   // DeLa
  2246.     struct halo_dependency d2_sound_effect; // snd!
  2247.     char script[32];
  2248. };
  2249.  
  2250. struct halo_DeLa_r3_search_and_replace_functions
  2251. {
  2252.     char search_string[32];
  2253.     enum halo_replace_functions replace_function_list;
  2254. };
  2255.  
  2256. struct halo_DeLa_r4_conditional_widgets
  2257. {
  2258.     struct halo_dependency d1_widget_tag; // DeLa
  2259.     char name_unused[32];
  2260.     struct halo_dela_conditional_widgets_flags_bf flags_bf;
  2261.     int16_t custom_controller_index_unused;
  2262.     uint8_t pad_1[26];
  2263. };
  2264.  
  2265. struct halo_DeLa_r5_child_widgets
  2266. {
  2267.     struct halo_dependency d1_widget_tag;   // DeLa
  2268.     char name_unused[32];
  2269.     struct halo_dela_child_widgets_flags_bf flags_bf;
  2270.     int16_t custom_controller_index;
  2271.     int16_t vertical_offset;
  2272.     int16_t horizontal_offset;
  2273.     uint8_t pad_1[22];
  2274. };
  2275.  
  2276. #pragma mark devc
  2277. struct halo_devc
  2278. {
  2279.     enum halo_device_types device_type_list;
  2280.     uint8_t pad_1[1];
  2281.     struct halo_devc_flags_bf flags_bf; // _calc if line 860 of guerilla.txt applies
  2282.     struct halo_data device_id; // 16 bytes 0x88999B00
  2283.     struct halo_data profile;   // 8188 bytes (the file data size of .sav "Halo Savegames" type profiles) 0x98999B00
  2284. };
  2285.  
  2286. #pragma mark dobc
  2287. struct halo_dobc
  2288. {
  2289.     enum halo_dobc_collection_types collection_type_list;
  2290.     uint8_t pad_1[2];
  2291.     float global_z_offset;
  2292.     uint8_t pad_2[44];
  2293.     struct halo_dependency d1_sprite_plate; // bitm
  2294.     struct halo_array r1_types; // maximum of 16 cells 0x6C2D9C00
  2295.     uint8_t pad_3[48];
  2296. };
  2297.  
  2298. struct halo_dobc_r1_types
  2299. {
  2300.     char name[32];
  2301.     int8_t sequence_index;
  2302.     struct halo_dobc_types_type_flags_bf type_flags_bf;
  2303.     uint8_t pad_1[2];
  2304.     float color_override_factor_frac;
  2305.     uint8_t pad_2[8];
  2306.     float near_fade_distance;
  2307.     float far_fade_distance;
  2308.     float size;
  2309.     uint8_t pad_3[4];
  2310.     struct halo_colorfloat_rgb minimum_color;
  2311.     struct halo_colorfloat_rgb maximum_color;
  2312.     struct halo_colorbyte_argb ambient_color;
  2313.     uint8_t pad_4[4];
  2314. };
  2315.  
  2316. #pragma mark effe
  2317. struct halo_effe
  2318. {
  2319.     struct halo_effe_flags_bf flags_bf;
  2320.     int16_t loop_start_event_sel;
  2321.     int16_t loop_stop_event_sel;
  2322.     uint8_t pad_1[32];
  2323.     struct halo_array r1_locations; // maximum of 32 cells 0x98309D00
  2324.     struct halo_array r2_events;    // maximum of 32 cells 0x58349D00
  2325. };
  2326.  
  2327. struct halo_effe_r1_locations
  2328. {
  2329.     char marker_name[32];
  2330. };
  2331.  
  2332. struct halo_effe_r2_events
  2333. {
  2334.     uint8_t pad_1[4];
  2335.     float skip_fraction_frac;
  2336.     struct halo_ranged_float delay_bounds;
  2337.     struct halo_ranged_float duration_bounds;
  2338.     uint8_t pad_2[20];
  2339.     struct halo_array r1_parts; // maximum of 32 cells 0xC8339D00
  2340.     struct halo_array r2_particles; // maximum of 32 cells 0xB0329D00
  2341. };
  2342.  
  2343. struct halo_effe_r2_r1_parts_section_scale_modifiers
  2344. {
  2345.     struct halo_effe_events_parts_scale_modifiers_bf a_scales_values_bf;
  2346.     struct halo_effe_events_parts_scale_modifiers_bf b_scales_values_bf;
  2347. };
  2348.  
  2349. struct halo_effe_r2_r1_parts
  2350. {
  2351.     enum halo_environment_media create_in_environment_list;
  2352.     enum halo_environment_violence_modes create_in_mode_list;
  2353.     int16_t location_sel;
  2354.     uint8_t pad_1[1];
  2355.     struct halo_effe_events_parts_flags_bf flags_bf;
  2356.     uint8_t pad_2[12];
  2357.     char usage_class[4];    // padding until compiled, then: obje (for all obje types), jpt!, deca, ligh, pctl, unit (?) or snd!; this is probably a shorthand for determining to which memory table it should be added
  2358.     struct halo_dependency d1_type; // bipd jpt! deca devi ctrl lifi mach eqip garb item ligh obje pctl plac proj scen snd! ssce unit vehi weap
  2359.     uint8_t pad_3[24];
  2360.     struct halo_ranged_float velocity_bounds;
  2361.     float velocity_cone_angle_rad;
  2362.     struct halo_ranged_float angular_velocity_bounds_rad;
  2363.     struct halo_ranged_float radius_modifier_bounds;
  2364.     uint8_t pad_4[4];
  2365.     struct halo_effe_r2_r1_parts_section_scale_modifiers scale_modifiers;
  2366. };
  2367.  
  2368. struct halo_effe_r2_r2_particles_section_scale_modifiers
  2369. {
  2370.     struct halo_effe_events_particles_scale_modifiers_bf a_scales_values_bf;
  2371.     struct halo_effe_events_particles_scale_modifiers_bf b_scales_values_bf;
  2372. };
  2373.  
  2374. struct halo_effe_r2_r2_particles
  2375. {
  2376.     enum halo_environment_media create_in_environment_list;
  2377.     enum halo_environment_violence_modes create_in_mode_list;
  2378.     enum halo_environment_camera_modes create_in_camera_mode_list;
  2379.     uint8_t pad_1[2];
  2380.     int16_t location_sel;
  2381.     uint8_t pad_2[2];
  2382.     struct halo_angle_2d relative_direction_rad;
  2383.     struct halo_vector_3d relative_offset;
  2384.     uint8_t pad_3[52];
  2385.     struct halo_dependency d1_particle_type;    // part
  2386.     struct halo_effe_events_particles_flags_bf flags_bf;
  2387.     enum halo_distribution_functions distribution_function_list;
  2388.     uint8_t pad_4[2];// in cell here: 2 bytes of 0
  2389.     struct halo_ranged_int16_t count;
  2390.     struct halo_ranged_float distribution_radius;
  2391.     uint8_t pad_5[12];
  2392.     struct halo_ranged_float velocity;
  2393.     float velocity_cone_angle_rad;
  2394.     struct halo_ranged_float angular_velocity_rad;
  2395.     uint8_t pad_6[8];
  2396.     struct halo_ranged_float radius;
  2397.     uint8_t pad_7[8];
  2398.     struct halo_ranged_colorfloat_argb tint;
  2399.     uint8_t pad_8[16];
  2400.     struct halo_effe_r2_r2_particles_section_scale_modifiers scale_modifiers;
  2401. };
  2402.  
  2403. #pragma mark elec
  2404. struct halo_elec
  2405. {
  2406.     int32_t count;
  2407.     uint8_t pad_1[16];
  2408.     float near_fade_distance;
  2409.     float far_fade_distance;
  2410.     uint8_t pad_2[16];
  2411.     enum halo_function_out_channels jitter_scale_source_list;
  2412.     enum halo_function_out_channels thickness_scale_source_list;
  2413.     enum halo_function_channel_types tint_modulation_source_list;
  2414.     enum halo_function_out_channels brightness_scale_source_list;
  2415.     struct halo_dependency d1_bitmap;   // bitm
  2416.     uint8_t pad_3[84];
  2417.     struct halo_array r1_markers;   // maximum of 16 cells 0x30069D00
  2418.     struct halo_array r2_shader;    // maximum of 1 cell 0xF0069D00
  2419.     uint8_t pad_4[88];
  2420. };
  2421.  
  2422. struct halo_elec_r1_markers
  2423. {
  2424.     char attachment_marker[32];
  2425.     uint8_t pad_1[1];
  2426.     struct halo_elec_markers_flags_bf flags_bf;
  2427.     uint8_t pad_2[2];
  2428.     int16_t octaves_to_next_marker;
  2429.     uint8_t pad_3[78];
  2430.     struct halo_vector_3d random_position_bounds;
  2431.     float random_jitter;
  2432.     float thickness;
  2433.     struct halo_colorfloat_argb tint;
  2434.     uint8_t pad_4[76];
  2435. };
  2436.  
  2437. struct halo_elec_r2_shader
  2438. {
  2439.     uint8_t pad_1[40];
  2440.     struct halo_particle_shader_rendering rendering;
  2441.     uint8_t pad_2[132];
  2442. };
  2443.  
  2444. #pragma mark eqip
  2445. struct halo_eqip
  2446. {
  2447.     struct halo_obje obje;
  2448.     struct halo_item item;
  2449.     enum halo_powerup_types powerup_type_list;
  2450.     enum halo_grenade_types grenade_type_list;
  2451.     float powerup_time;
  2452.     struct halo_dependency d1_pickup_sound; // snd!
  2453.     uint8_t pad_1[144];
  2454. };
  2455.  
  2456. #pragma mark flag
  2457. struct halo_flag
  2458. {
  2459.     uint8_t pad_1[4];
  2460.     enum halo_flag_trailing_edge_shapes trailing_edge_shape_list;
  2461.     int16_t trailing_edge_shape_offset;
  2462.     enum halo_flag_attached_edge_shapes attached_edge_shape_list;
  2463.     uint8_t pad_2[2];
  2464.     struct halo_area_int16_t area;
  2465.     struct halo_area_float cell_area;
  2466.     struct halo_dependency d1_red_flag_shader;  // shdr senv soso schi scex sotr sgla smet spla swat
  2467.     struct halo_dependency d2_physics;  // pphy
  2468.     float wind_noise;
  2469.     uint8_t pad_3[8];
  2470.     struct halo_dependency d3_blue_flag_shader; // shdr senv soso schi scex sotr sgla smet spla swat
  2471.     struct halo_array r1_attachment_points; // maximum of 5 cells 0x54159D00
  2472. };
  2473.  
  2474. struct halo_flag_r1_attachment_points
  2475. {
  2476.     int16_t height_to_next_attachment;
  2477.     uint8_t pad_1[18];
  2478.     char marker_name[32];
  2479. };
  2480.  
  2481. #pragma mark fog
  2482.  
  2483. struct halo_fog_section_flags
  2484. {
  2485.     struct halo_fog_flags_bf flags_bf;
  2486. };
  2487.  
  2488. struct halo_fog_section_density
  2489. {
  2490.     float maximum_density_frac;
  2491.     uint8_t pad_1[4];
  2492.     float opaque_distance;
  2493.     uint8_t pad_2[4];
  2494.     float opaque_depth;
  2495.     uint8_t pad_3[8];
  2496.     float distance_to_water_plane;
  2497. };
  2498.  
  2499. struct halo_fog_section_color
  2500. {
  2501.     struct halo_colorfloat_rgb color;
  2502. };
  2503.  
  2504. struct halo_fog_section_screen_layers
  2505. {
  2506.     struct halo_fog_screen_layers_flags_bf flags_bf;
  2507.     int16_t layer_count;
  2508.     struct halo_ranged_float distance_gradient;
  2509.     struct halo_ranged_float density_gradient_frac;
  2510.     float start_distance_from_fog_plane;
  2511.     uint8_t pad_1[4];
  2512.     struct halo_colorbyte_rgb color;
  2513.     float rotation_multiplier_frac;
  2514.     float strafing_multiplier_frac;
  2515.     float zoom_multiplier_frac;
  2516.     uint8_t pad_2[8];
  2517.     struct halo_shader_scaled_map scaled_map;
  2518. };
  2519.  
  2520. struct halo_fog_section_screen_layer_animation
  2521. {
  2522.     float animation_period;
  2523.     uint8_t pad_1[4];
  2524.     struct halo_ranged_float wind_velocity;
  2525.     struct halo_ranged_float wind_period;
  2526.     float wind_acceleration_weight_frac;
  2527.     float wind_perpendicular_weight_frac;
  2528. };
  2529.  
  2530. struct halo_fog_section_sound
  2531. {
  2532.     struct halo_dependency d1_background_sound; // lsnd
  2533.     struct halo_dependency d2_sound_environment;    // snde
  2534. };
  2535.  
  2536. struct halo_fog
  2537. {
  2538.     struct halo_fog_section_flags flags;
  2539.     uint8_t pad_1[84];
  2540.     struct halo_fog_section_density density;
  2541.     struct halo_fog_section_color color;
  2542.     uint8_t pad_2[1];
  2543.     struct halo_fog_section_screen_layers screen_layers;
  2544.     struct halo_fog_section_screen_layer_animation screen_layer_animation;
  2545.     uint8_t pad_3[8];
  2546.     struct halo_fog_section_sound sound;
  2547.     uint8_t pad_4[120];
  2548. };
  2549.  
  2550. #pragma mark font
  2551. struct halo_font
  2552. {
  2553.     uint32_t flags;
  2554.     int16_t ascending_height;
  2555.     int16_t descending_height;
  2556.     int16_t leading_height;
  2557.     int16_t leading_width_calc;
  2558.  
  2559.     uint8_t pad_1[36];
  2560.  
  2561.     struct halo_array r1_character_tables;  // maximum of 256 cells 0x1C609D00
  2562.  
  2563.     struct halo_dependency d1_bold; // font
  2564.     struct halo_dependency d2_italic;   // font
  2565.     struct halo_dependency d3_condense; // font
  2566.     struct halo_dependency d4_underline;    // font
  2567.    
  2568.     struct halo_array r2_characters;    // maximum of 32000 cells 0x785F9D00
  2569.     struct halo_data pixels;    // 0xA45F9D00
  2570. };
  2571.  
  2572. struct halo_font_r1_character_tables
  2573. {
  2574.     struct halo_array r1_character_table;   // maximum of 256 cells 0xD85F9D00
  2575. };
  2576.  
  2577. struct halo_font_r1_r1_character_table
  2578. {
  2579.     int16_t character_index_sel;
  2580. };
  2581.  
  2582. struct halo_font_r2_characters
  2583. {
  2584.     int16_t character;
  2585.     int16_t character_width;
  2586.     struct halo_area_int16_t bitmap_area;
  2587.     struct halo_point_2d_int16_t bitmap_origin;
  2588.     int16_t hardware_character_index_calc;   // -1 if no data
  2589.     uint8_t pad_1[2];
  2590.     int32_t pixels_offset;
  2591. };
  2592.  
  2593. #pragma mark foot
  2594. struct halo_foot
  2595. {
  2596.     struct halo_array r1_effects;   // maximum of 13 cells (walk, run, sliding, shuffle, jump, jump land, biped unused1, biped unused2, impact, vehicle tire slip, vehicle chassis slip, vehicle unused 1, vehicle unused 2) 0x50169C00
  2597.     uint8_t pad_1[128];
  2598. };
  2599.  
  2600. struct halo_foot_r1_effects
  2601. {
  2602.     struct halo_array r1_materials; // maximum of 33 cells (dirt, sand, stone, snow, wood, metal (hollow), metal (thin), metal (thick), rubber, glass, force field, grunt, hunter armor, hunter skin, elite, jackal, jackal energy shield, engineer skin, engineer force field, flood combat form, flood carrier form, cyborg armor, cyborg energy shield, human armor, human skin, sentinel, monitor, plastic, water, leaves, elite energy shield, ice, hunter shield) 0x00169C00
  2603.     uint8_t pad_1[16];
  2604. };
  2605.  
  2606. struct halo_foot_r1_r1_materials
  2607. {
  2608.     struct halo_dependency d1_effect;   // eff
  2609.     struct halo_dependency d2_sound;    // snd!
  2610.     uint8_t pad_1[16];
  2611. };
  2612.  
  2613. #pragma mark garb
  2614. struct halo_garb
  2615. {
  2616.     struct halo_obje obje;
  2617.     struct halo_item item;
  2618.     uint8_t pad_1[144];
  2619. };
  2620.  
  2621. #pragma mark glw!
  2622. struct halo_glw_channel_attachments
  2623. {
  2624.     enum halo_function_out_channels channel_list;
  2625.     uint8_t pad_1[2];
  2626. };
  2627. struct halo_glw_ranged_multipliers
  2628. {
  2629.     float low;
  2630.     float high;
  2631. };
  2632. struct halo_glw_movements
  2633. {
  2634.     float velocity;
  2635.     struct halo_glw_ranged_multipliers velocity_multiplier;
  2636. };
  2637. struct halo_glw
  2638. {
  2639.     char attachment_marker[32];
  2640.     int16_t number_of_particles;
  2641.     enum halo_boundary_effects boundary_effect_list;
  2642.     enum halo_particle_distributions normal_particle_distribution_list;
  2643.     enum halo_particle_emissions trailing_particle_distribution_list;
  2644.     struct halo_glw_glow_flags_bf glow_flags_bf;
  2645.     uint8_t pad_1[36];
  2646.     struct halo_glw_channel_attachments particle_rotation_attachment;
  2647.     struct halo_glw_movements particle_rotation;
  2648.     struct halo_glw_channel_attachments effect_rotation_attachment;
  2649.     struct halo_glw_movements effect_rotation;
  2650.     struct halo_glw_channel_attachments effect_translation_attachment;
  2651.     struct halo_glw_movements effect_translation;
  2652.     struct halo_glw_channel_attachments particle_distance_attachment;
  2653.     float minimum_distance_particle_to_object;
  2654.     float maximum_distance_particle_to_object;
  2655.     struct halo_glw_ranged_multipliers distance_to_object_multiplier;
  2656.     uint8_t pad_2[8];
  2657.     struct halo_glw_channel_attachments particle_size_attachment;
  2658.     struct halo_ranged_float particle_size_bounds;
  2659.     struct halo_ranged_float size_attachment_multiplier;
  2660.     struct halo_glw_channel_attachments color_attachment;
  2661.     struct halo_colorfloat_argb color_bound_0;
  2662.     struct halo_colorfloat_argb color_bound_1;
  2663.     struct halo_colorfloat_argb scale_color_0;
  2664.     struct halo_colorfloat_argb scale_color_1;
  2665.     float color_rate_of_change;
  2666.     float fading_percentage_of_glow;
  2667.     float particle_generation_frequency;
  2668.     float lifetime_of_trailing_particles;
  2669.     float velocity_of_trailing_particles;
  2670.     float trailing_particle_minimum_translation;
  2671.     float trailing_particle_maximum_translation;
  2672.     uint8_t pad_3[52];
  2673.     struct halo_dependency d1_texture;  // bitm
  2674. };
  2675.  
  2676. #pragma mark grhi
  2677.  
  2678. struct halo_grhi_section_total_grenades_overlays
  2679. {
  2680.     struct halo_dependency d1_overlay_bitmap;   // bitm
  2681.     struct halo_array r3_overlays;  // maximum of 16 cells 0x485E9C00
  2682. };
  2683.  
  2684. struct halo_grhi_section_total_grenades
  2685. {
  2686.     struct halo_hud_section_background background;
  2687.     struct halo_hud_section_numbers numbers;
  2688.     uint8_t pad_1[13];
  2689.     int16_t flash_cutoff;
  2690.     uint8_t pad_2[2];
  2691.     struct halo_grhi_section_total_grenades_overlays overlays;
  2692.     struct halo_array r4_warning_sounds;    // maximum of 12 cells 0xD05E9C00
  2693.     uint8_t pad_3[68];
  2694.     struct halo_hud_section_messaging_information messaging_information;
  2695. };
  2696.  
  2697. struct halo_grhi
  2698. {
  2699.     struct halo_hud_anchored_screen_layer grenade_hud;
  2700.     struct halo_grhi_section_total_grenades total_grenades;
  2701. };
  2702.  
  2703. struct halo_grhi_r3_overlays
  2704. {
  2705.     struct halo_hud_orientation orientation;
  2706.     struct halo_hud_color_and_flash color_and_flash;
  2707.     uint8_t pad_1[4];
  2708.     float frame_rate;   // differs from wphi which stores as int16_t
  2709.     int16_t sequence_index;
  2710.     uint8_t pad_2[1];
  2711.     struct halo_hud_overlays_type_flags_bf type_bf;
  2712.     struct halo_hud_overlays_flash_flags_bf flags_bf;
  2713.     uint8_t pad_3[56];
  2714. };
  2715.  
  2716. struct halo_grhi_r4_warning_sounds
  2717. {
  2718.     struct halo_dependency d1_sound;    // snd! lsnd
  2719.     struct halo_grhi_warning_sounds_flags_bf latched_to_bf;
  2720.     float scale;
  2721.     uint8_t pad_1[32];
  2722. };
  2723.  
  2724. #pragma mark hmt
  2725. struct halo_hmt
  2726. {
  2727.     struct halo_data text_data; // 0x302A9C00
  2728.     struct halo_array r1_message_elements;  // maximum of 8192 cells 0x642A9C00
  2729.     struct halo_array r2_messages;  // maximum of 1024 cells 0xE42A9C00
  2730.     uint8_t pad_1[84];
  2731. };
  2732.  
  2733. struct halo_hmt_r1_message_elements
  2734. {
  2735.     int8_t type;
  2736.     int8_t data;
  2737. };
  2738.  
  2739. struct halo_hmt_r2_messages
  2740. {
  2741.     char name[32];
  2742.     int16_t start_index_into_text_blob;
  2743.     int16_t start_index_of_message_block;
  2744.     int8_t panel_count;
  2745.     uint8_t pad_1[27];
  2746. };
  2747.  
  2748. #pragma mark hudg
  2749.  
  2750. struct halo_hudg_section_hud_help_text_color
  2751. {
  2752.     struct halo_hud_color_and_flash color_and_flash;
  2753.     uint8_t pad_1[4];
  2754. };
  2755.  
  2756. struct halo_hudg_section_other_hud_messaging_data
  2757. {
  2758.     struct halo_dependency d1_hud_messages; // hmt
  2759. };
  2760.  
  2761. struct halo_hudg_section_messaging_parameters
  2762. {
  2763.     struct halo_hud_screen_alignment_anchor anchor;
  2764.     struct halo_hud_orientation orientation;
  2765.     struct halo_dependency d1_single_player_font;   // font
  2766.     struct halo_dependency d2_multi_player_font;    // font
  2767.     float up_time;
  2768.     float fade_time;
  2769.     struct halo_colorfloat_argb icon_color;
  2770.     struct halo_colorfloat_argb text_color;
  2771.     float text_spacing;
  2772.     struct halo_dependency d3_item_message_text;    // ustr
  2773.     struct halo_dependency d4_icon_bitmap;  // bitm
  2774.     struct halo_dependency d5_alternate_icon_text;  // ustr
  2775.     struct halo_array r1_button_icons;  // maximum of 18 cells (a button, b button, x button, y button, black button, white button, left trigger, right trigger, dpad up, dpad down, dpad left, dpad right, start button, back button, left thumb button, right thumb button, left stick (not a button), right stick (not a button) 0xC03C9C00
  2776.     struct halo_hudg_section_hud_help_text_color hud_help_text_color;
  2777.     struct halo_hudg_section_other_hud_messaging_data other_hud_messaging_data;
  2778. };
  2779.  
  2780. struct halo_hudg_section_objective_colors
  2781. {
  2782.     struct halo_hud_color_and_flash color_and_flash;
  2783.     int16_t uptime_ticks;
  2784.     int16_t fade_ticks;
  2785. };
  2786.  
  2787. struct halo_hudg_section_waypoint_parameters
  2788. {
  2789.     struct halo_offset_rectangle_2d_float offset;
  2790.     uint8_t pad_1[32];
  2791.     struct halo_dependency d1_arrow_bitmap; // bitm
  2792.     struct halo_array r2_waypoint_arrows;   // maximum of 16 cells 0x8C3D9C00
  2793. };
  2794.  
  2795. struct halo_hudg_section_multiplayer_parameters
  2796. {
  2797.     float hud_scale_in_multiplayer;
  2798. };
  2799.  
  2800. struct halo_hudg_section_hud_globals
  2801. {
  2802.     struct halo_dependency d1_default_weapon_hud;   // wphi
  2803.     float motion_sensor_range;
  2804.     float motion_sensor_velocity_sensitivity;
  2805.     float motion_sensor_scale_dont_touch_ever;
  2806.     struct halo_rectangle_2d default_chapter_title_bounds;
  2807. };
  2808.  
  2809. struct halo_hudg_section_hud_damage_indicators
  2810. {
  2811.     struct halo_offset_rectangle_2d offset;
  2812.     uint8_t pad_1[32];
  2813.     struct halo_dependency d1_indicator_bitmap; // bitm
  2814.     int16_t sequence_index;
  2815.     int16_t multiplayer_sequence_index;
  2816.     struct halo_colorbyte_argb color;
  2817. };
  2818.  
  2819. struct halo_hudg_section_not_much_time_left_flash_color
  2820. {
  2821.     struct halo_hud_color_and_flash color_and_flash;
  2822.     uint8_t pad_1[4];
  2823. };
  2824.  
  2825. struct halo_hudg_section_time_out_flash_color
  2826. {
  2827.     struct halo_hud_color_and_flash color_and_flash;
  2828.     uint8_t pad_1[44];
  2829.     struct halo_dependency d1_carnage_report_bitmap;    // bitm
  2830. };
  2831.  
  2832. struct halo_hudg_section_hud_timer_definitions
  2833. {
  2834.     struct halo_hudg_section_not_much_time_left_flash_color not_much_time_left_flash_color;
  2835.     struct halo_hudg_section_time_out_flash_color time_out_flash_color;
  2836. };
  2837.  
  2838. struct halo_hudg_section_hud_crap_that_wouldnt_fit_anywhere_else
  2839. {
  2840.     int16_t loading_begin_text;
  2841.     int16_t loading_end_text;
  2842.     int16_t checkpoint_begin_text;
  2843.     int16_t checkpoint_end_text;
  2844.     struct halo_dependency d1_checkpoint_sound; // snd!
  2845. };
  2846.  
  2847. struct halo_hudg
  2848. {
  2849.     struct halo_hudg_section_messaging_parameters messaging_parameters;
  2850.     struct halo_hudg_section_objective_colors objective_colors;
  2851.     struct halo_hudg_section_waypoint_parameters waypoint_parameters;
  2852.     uint8_t pad_1[80];
  2853.     struct halo_hudg_section_multiplayer_parameters multiplayer_parameters;
  2854.     uint8_t pad_2[256];
  2855.     struct halo_hudg_section_hud_globals hud_globals;
  2856.     uint8_t pad_3[44];
  2857.     struct halo_hudg_section_hud_damage_indicators hud_damage_indicators;
  2858.     uint8_t pad_4[16];
  2859.     struct halo_hudg_section_hud_timer_definitions hud_timer_definitions;
  2860.     struct halo_hudg_section_hud_crap_that_wouldnt_fit_anywhere_else hud_crap_that_wouldnt_fit_anywhere_else;
  2861.     uint8_t pad_5[96];
  2862. };
  2863.  
  2864. struct halo_hudg_r1_button_icons
  2865. {
  2866.     struct halo_hud_messaging messaging;
  2867. };
  2868.  
  2869. struct halo_hudg_r2_waypoint_arrows
  2870. {
  2871.     char name[32];
  2872.     uint8_t pad_1[8];
  2873.     struct halo_colorbyte_rgb color;
  2874.     float opacity;
  2875.     float translucency;
  2876.     int16_t on_screen_sequence_index;
  2877.     int16_t off_screen_sequence_index;
  2878.     int16_t occluded_sequence_index;
  2879.     uint8_t pad_2[18];
  2880.     struct halo_hudg_waypoint_arrows_flags_bf flags_bf;
  2881.     uint8_t pad_3[24];
  2882. };
  2883.  
  2884. #pragma mark hud#
  2885. struct halo_hudn
  2886. {
  2887.     struct halo_dependency d1_digits_bitmap;    // bitm
  2888.     int8_t bitmap_digit_width;
  2889.     int8_t screen_digit_width;
  2890.     int8_t x_offset;
  2891.     int8_t y_offset;
  2892.     int8_t decimal_point_width;
  2893.     int8_t colon_width;
  2894.     uint8_t pad_1[78];
  2895. };
  2896.  
  2897. #pragma mark itmc
  2898. struct halo_itmc
  2899. {
  2900.     struct halo_array r1_item_permutations; // maximum of 32 cells 0x80659C00
  2901.     int16_t spawn_time;
  2902.     uint8_t pad_1[78];
  2903. };
  2904.  
  2905. struct halo_itmc_r1_item_permutations
  2906. {
  2907.     uint8_t pad_1[32];
  2908.     float weight_frac;
  2909.     struct halo_dependency d1_item; // eqip garb item weap
  2910.     uint8_t pad_2[32];
  2911. };
  2912.  
  2913. #pragma mark jpt!
  2914.  
  2915. struct halo_jpt_section_screen_flash
  2916. {
  2917.     enum halo_screen_flash_types type_list;
  2918.     enum halo_priorities priority_list;
  2919.     uint8_t pad_1[12];
  2920.     float duration;
  2921.     enum halo_function_mappings fade_function_list;
  2922.     uint8_t pad_2[10];
  2923.     float maximum_intensity_frac;
  2924.     uint8_t pad_3[4];
  2925.     struct halo_colorfloat_argb color;
  2926. };
  2927.  
  2928. struct halo_jpt_section_low_frequency_vibrate
  2929. {
  2930.     float frequency_frac;
  2931.     float duration;
  2932.     enum halo_function_mappings fade_function_list;
  2933. };
  2934.  
  2935. struct halo_jpt_section_high_frequency_vibrate
  2936. {
  2937.     float frequency_frac;
  2938.     float duration;
  2939.     enum halo_function_mappings fade_function_list;
  2940. };
  2941.  
  2942. struct halo_jpt_section_temporary_camera_impulse
  2943. {
  2944.     float duration;
  2945.     enum halo_function_mappings fade_function_list;
  2946.     uint8_t pad_1[2];
  2947.     float rotation_rad;
  2948.     float pushback;
  2949.     struct halo_ranged_float jitter;
  2950. };
  2951.  
  2952. struct halo_jpt_section_permanent_camera_impulse
  2953. {
  2954.     float angle_rad;
  2955. };
  2956.  
  2957. struct halo_jpt_section_camera_shaking
  2958. {
  2959.     float duration;
  2960.     enum halo_function_mappings falloff_function_list;
  2961.     uint8_t pad_1[2];
  2962.     float random_translation;
  2963.     float random_rotation_rad;
  2964.     uint8_t pad_2[12];
  2965.     enum halo_function_behaviors wobble_function_list;
  2966.     uint8_t pad_3[2];
  2967.     float wobble_function_period;
  2968.     float wobble_weight_frac;
  2969. };
  2970.  
  2971. struct halo_jpt_section_sound
  2972. {
  2973.     struct halo_dependency d1_sound;    // snd!
  2974. };
  2975.  
  2976. struct halo_jpt_section_breaking_effect
  2977. {
  2978.     float forward_velocity;
  2979.     float forward_radius;
  2980.     float forward_exponent;
  2981.     uint8_t pad_1[12];
  2982.     float outward_velocity;
  2983.     float outward_radius;
  2984.     float outward_exponent;
  2985. };
  2986.  
  2987. struct halo_jpt_section_damage
  2988. {
  2989.     enum halo_damage_side_effects side_effect_list;
  2990.     enum halo_damage_categories category_list;
  2991.     struct halo_damage_flags_bf flags_bf;
  2992.     float aoe_core_radius;
  2993.     float damage_lower_bound;
  2994.     struct halo_ranged_float damage_upper_bound;
  2995.     float vehicle_passthrough_penalty_frac;
  2996.     float active_camouflage_damage_frac;
  2997.     float stun_frac;
  2998.     float maximum_stun_frac;
  2999.     float stun_time;
  3000.     uint8_t pad_1[4];
  3001.     float instantaneous_acceleration;
  3002. };
  3003.  
  3004. struct halo_jpt_section_damage_modifiers
  3005. {
  3006.     float dirt;
  3007.     float sand;
  3008.     float stone;
  3009.     float snow;
  3010.     float wood;
  3011.     float metal_hollow;
  3012.     float metal_thin;
  3013.     float metal_thick;
  3014.     float rubber;
  3015.     float glass;
  3016.     float force_field;
  3017.     float grunt;
  3018.     float hunter_armor;
  3019.     float hunter_skin;
  3020.     float elite;
  3021.     float jackal;
  3022.     float jackal_energy_shield;
  3023.     float engineer;
  3024.     float engineer_force_field;
  3025.     float flood_combat_form;
  3026.     float flood_carrier_form;
  3027.     float cyborg;
  3028.     float cyborg_energy_shield;
  3029.     float armored_human;
  3030.     float human;
  3031.     float sentinel;
  3032.     float monitor;
  3033.     float plastic;
  3034.     float water;
  3035.     float leaves;
  3036.     float elite_energy_shield;
  3037.     float ice;
  3038.     float hunter_shield;
  3039. };
  3040.  
  3041. struct halo_jpt
  3042. {
  3043.     struct halo_ranged_float radius;
  3044.     float cutoff_scale_frac;
  3045.     struct halo_jpt_flags_bf flags_bf;
  3046.     uint8_t pad_1[20];
  3047.     struct halo_jpt_section_screen_flash screen_flash;
  3048.     struct halo_jpt_section_low_frequency_vibrate low_frequency_vibrate;
  3049.     uint8_t pad_2[10];
  3050.     struct halo_jpt_section_high_frequency_vibrate high_frequency_vibrate;
  3051.     uint8_t pad_3[30];
  3052.     struct halo_jpt_section_temporary_camera_impulse temporary_camera_impulse;
  3053.     uint8_t pad_4[8];
  3054.     struct halo_jpt_section_permanent_camera_impulse permanent_camera_impulse;
  3055.     uint8_t pad_5[16];
  3056.     struct halo_jpt_section_camera_shaking camera_shaking;
  3057.     uint8_t pad_6[32];
  3058.     struct halo_jpt_section_sound sound;
  3059.     uint8_t pad_7[112];
  3060.     struct halo_jpt_section_breaking_effect breaking_effect;
  3061.     uint8_t pad_8[12];
  3062.     struct halo_jpt_section_damage damage;
  3063.     uint8_t pad_9[8];
  3064.     struct halo_jpt_section_damage_modifiers damage_modifiers;
  3065.     uint8_t pad_10[28];
  3066. };
  3067.  
  3068. #pragma mark lens
  3069.  
  3070. struct halo_lens_section_lens_flare
  3071. {
  3072.     float falloff_angle_rad;
  3073.     float cutoff_angle_rad;
  3074.     float unknown_1_le;   // 1
  3075.     float unknown_2_le;   // 1
  3076. };
  3077.  
  3078. struct halo_lens_section_occlusion
  3079. {
  3080.     float occlusion_radius;
  3081.     enum halo_relative_rendering_directions occlusion_offset_direction_list;
  3082.     uint8_t pad_1[2];
  3083.     float near_fade_distance;
  3084.     float far_fade_distance;
  3085. };
  3086.  
  3087. struct halo_lens_section_bitmaps
  3088. {
  3089.     struct halo_dependency d1_bitmap;   // bitm
  3090.     uint8_t pad_1[1];
  3091.     struct halo_lens_bitmaps_flags_bf flags_bf;
  3092. };
  3093.  
  3094. struct halo_lens_section_corona_rotation
  3095. {
  3096.     enum halo_relative_angular_rotation_functions rotation_function_list;
  3097.     uint8_t pad_1[2];
  3098.     float rotation_function_scale_rad;
  3099. };
  3100.  
  3101. struct halo_lens_section_corona_radius_scale
  3102. {
  3103.     float horizontal_scale;
  3104.     float vertical_scale;
  3105. };
  3106.  
  3107. struct halo_lens
  3108. {
  3109.     struct halo_lens_section_lens_flare lens_flare;
  3110.     struct halo_lens_section_occlusion occlusion;
  3111.     struct halo_lens_section_bitmaps bitmaps;
  3112.     uint8_t pad_1[78];
  3113.     struct halo_lens_section_corona_rotation corona_rotation;
  3114.     uint8_t pad_2[24];
  3115.     struct halo_lens_section_corona_radius_scale corona_radius_scale;
  3116.     uint8_t pad_3[28];
  3117.     struct halo_array r1_reflections;   // maximum of 32 cells 0x5C849C00
  3118.     uint8_t pad_4[32];
  3119. };
  3120.  
  3121. struct halo_lens_r1_reflections_section_tint_color
  3122. {
  3123.     struct halo_colorfloat_argb tint_color;
  3124. };
  3125.  
  3126. struct halo_lens_r1_reflections_section_animation
  3127. {
  3128.     struct halo_ranged_colorfloat_argb color;
  3129.     uint8_t pad_1[1];
  3130.     struct halo_color_interpolation_flags_bf flags_bf;
  3131.     enum halo_function_behaviors animation_function_list;
  3132.     float animation_period;
  3133.     float animation_phase;
  3134. };
  3135.  
  3136. struct halo_lens_r1_reflections
  3137. {
  3138.     uint8_t pad_1[1];
  3139.     struct halo_lens_reflections_flags_bf flags_bf;
  3140.     uint8_t pad_2[2];
  3141.     int16_t bitmap_index;
  3142.     uint8_t pad_3[22];
  3143.     float position;
  3144.     float rotation_offset;   // not radians
  3145.     uint8_t pad_4[4];
  3146.     struct halo_ranged_float radius;
  3147.     enum halo_reflection_scaling_associations radius_scaled_by_list;
  3148.     uint8_t pad_5[2];
  3149.     struct halo_ranged_float brightness_frac;
  3150.     enum halo_reflection_scaling_associations brightness_scaled_by_list;
  3151.     uint8_t pad_6[2];
  3152.     struct halo_lens_r1_reflections_section_tint_color tint_color;
  3153.     struct halo_lens_r1_reflections_section_animation animation;
  3154.     uint8_t pad_7[4];
  3155. };
  3156.  
  3157. #pragma mark lifi
  3158. struct halo_lifi
  3159. {
  3160.     struct halo_obje obje;
  3161.     struct halo_devi devi;
  3162.     uint8_t pad_1[64];
  3163. };
  3164.  
  3165. #pragma mark ligh
  3166.  
  3167. struct halo_ligh_gel_movement_behaviors
  3168. {
  3169.     uint8_t pad_1[2];
  3170.     enum halo_function_behaviors function_list;
  3171.     float period;
  3172. };
  3173.  
  3174. struct halo_ligh_section_shape
  3175. {
  3176.     float radius;
  3177.     struct halo_ranged_float radius_modifier;
  3178.     float falloff_angle_rad;
  3179.     float cutoff_angle_rad;
  3180.     float lens_flare_only_radius;
  3181. };
  3182.  
  3183. struct halo_ligh_section_color
  3184. {
  3185.     struct halo_color_interpolation_flags_bf interpolation_flags_bf;
  3186.     struct halo_ranged_colorfloat_argb color;
  3187. };
  3188.  
  3189. struct halo_ligh_section_gel
  3190. {
  3191.     struct halo_dependency d1_primary_cube_map; // bitm
  3192.     struct halo_ligh_gel_movement_behaviors texture_animation;
  3193.     struct halo_dependency d2_secondary_cube_map;   // bitm
  3194.     struct halo_ligh_gel_movement_behaviors yaw;
  3195.     struct halo_ligh_gel_movement_behaviors roll;
  3196.     struct halo_ligh_gel_movement_behaviors pitch;
  3197. };
  3198.  
  3199. struct halo_ligh_section_lens_flare
  3200. {
  3201.     struct halo_dependency d1_lens_flare;   // lens
  3202. };
  3203.  
  3204. struct halo_ligh_section_radiosity
  3205. {
  3206.     float intensity;
  3207.     struct halo_colorfloat_rgb color;
  3208. };
  3209.  
  3210. struct halo_ligh_section_effect_parameters
  3211. {
  3212.     float duration;
  3213.     uint8_t pad_1[2];
  3214.     enum halo_function_mappings falloff_function_list;
  3215. };
  3216.  
  3217. struct halo_ligh
  3218. {
  3219.     struct halo_ligh_flags_bf flags_bf;
  3220.     struct halo_ligh_section_shape shape;
  3221.     uint8_t pad_1[24];
  3222.     struct halo_ligh_section_color color;
  3223.     uint8_t pad_2[12];
  3224.     struct halo_ligh_section_gel gel;
  3225.     uint8_t pad_3[8];
  3226.     struct halo_ligh_section_lens_flare lens_flare;
  3227.     uint8_t pad_4[24];
  3228.     struct halo_ligh_section_radiosity radiosity;
  3229.     uint8_t pad_5[16];
  3230.     struct halo_ligh_section_effect_parameters effect_parameters;
  3231.     uint8_t pad_6[100];
  3232. };
  3233.  
  3234. #pragma mark lsnd
  3235.  
  3236. struct halo_lsnd_section_when_scale_is_zero
  3237. {
  3238.     float detail_sound_period;
  3239. };
  3240.  
  3241. struct halo_lsnd_section_when_scale_is_one
  3242. {
  3243.     float detail_sound_period;
  3244. };
  3245.  
  3246. struct halo_lsnd
  3247. {
  3248.     struct halo_lsnd_flags_bf flags_bf;
  3249.     struct halo_lsnd_section_when_scale_is_zero when_scale_is_zero;
  3250.     uint8_t pad_1[8];
  3251.     struct halo_lsnd_section_when_scale_is_one when_scale_is_one;
  3252.     uint8_t pad_2[24];
  3253.     struct halo_dependency d1_continuous_damage_effect; // cdmg
  3254.     struct halo_array r1_tracks;    // maximum of 4 cells 0x9C969B00
  3255.     struct halo_array r2_detail_sounds; // maximum of 32 cells 0x5C979B00
  3256. };
  3257.  
  3258. struct halo_lsnd_r1_tracks
  3259. {
  3260.     struct halo_lsnd_tracks_flags_bf flags_bf;
  3261.     float gain_frac;
  3262.     float fade_in_duration;
  3263.     float fade_out_duration;
  3264.     uint8_t pad_1[32];
  3265.     struct halo_dependency d1_start;    // snd!
  3266.     struct halo_dependency d2_loop; // snd!
  3267.     struct halo_dependency d3_end;  // snd!
  3268.     uint8_t pad_2[32];
  3269.     struct halo_dependency d4_alternate_loop;   // snd!
  3270.     struct halo_dependency d5_alternate_end;    // snd!
  3271. };
  3272.  
  3273. struct halo_lsnd_r2_detail_sounds_section_frequency_of_play
  3274. {
  3275.     struct halo_ranged_float random_period_bounds;
  3276.     float gain_frac;
  3277.     struct halo_lsnd_detail_sounds_flags_bf flags_bf;
  3278. };
  3279.  
  3280. struct halo_lsnd_r2_detail_sounds_section_random_spatialization
  3281. {
  3282.     struct halo_ranged_float yaw_bounds_rad;
  3283.     struct halo_ranged_float pitch_bounds_rad;
  3284.     struct halo_ranged_float distance_bounds;
  3285. };
  3286.  
  3287. struct halo_lsnd_r2_detail_sounds
  3288. {
  3289.     struct halo_dependency d1_sound;    // snd!
  3290.     struct halo_lsnd_r2_detail_sounds_section_frequency_of_play frequency_of_play;
  3291.     uint8_t pad_1[48];
  3292.     struct halo_lsnd_r2_detail_sounds_section_random_spatialization random_spatialization;
  3293. };
  3294.  
  3295. #pragma mark mach
  3296.  
  3297. struct halo_mach_section_machine
  3298. {
  3299.     enum halo_mach_machine_types type_list;
  3300.     uint8_t pad_1[1];
  3301.     struct halo_mach_flags_bf flags_bf;
  3302.     float door_open_time;
  3303.     uint8_t pad_2[80];
  3304.     enum halo_mach_collision_responses collision_response_list;
  3305.     int16_t elevator_node;
  3306. };
  3307.  
  3308. struct halo_mach
  3309. {
  3310.     struct halo_obje obje;
  3311.     struct halo_devi devi;
  3312.     struct halo_mach_section_machine machine;
  3313.     uint8_t pad_1[56];
  3314. };
  3315.  
  3316. #pragma mark matg
  3317. struct halo_matg
  3318. {
  3319.     uint8_t pad_1[248];
  3320.     struct halo_array r1_sounds;    // maximum of 2 cells 0x002B9D00
  3321.     struct halo_array r2_camera;    // maximum of 1 cell 0xB42A9D00
  3322.     struct halo_array r3_player_control;    // maximum of 1 cell 0x702A9D00
  3323.     struct halo_array r4_difficulty;    // maximum of 1 cell 0x3C299D00
  3324.     struct halo_array r5_grenades;  // maximum of 2 cells 0x7C239D00
  3325.     struct halo_array r6_rasterizer_data;   // maximum of 1 cell 0x68219D00
  3326.     struct halo_array r7_interface_bitmaps; // maximum of 1 cell 0x70229D00
  3327.     struct halo_array r8_weapon_list;   // (update _weapon_list enum in game_globals.h) maximum of 20 cells 0xB4229D00
  3328.     struct halo_array r9_cheat_powerups;    // maximum of 20 cells 0xF8229D00
  3329.     struct halo_array r10_multiplayer_information;  // maximum of 1 cell 0x9C1C9D00
  3330.     struct halo_array r11_player_information;   // maximum of 1 cell 0x241E9D00
  3331.     struct halo_array r12_first_person_interface;   // maximum of 1 cell 0xD81E9D00
  3332.     struct halo_array r13_falling_damage;   // maximum of 1 cell 0x981F9D00
  3333.     struct halo_array r14_materials;    // maximum of 33 cells 0xBC1A9D00
  3334.     struct halo_array r15_playlist_members; // maximum of 20 cells 0x541B9D00
  3335. };
  3336.  
  3337. struct halo_matg_r1_sounds
  3338. {
  3339.     struct halo_dependency d1_sound;    // snd!
  3340. };
  3341.  
  3342. struct halo_matg_r2_camera
  3343. {
  3344.     struct halo_dependency d1_default_unit_camera_track;    // trak
  3345. };
  3346.  
  3347. struct halo_matg_r3_player_control
  3348. {
  3349.     float magnetism_friction_frac;
  3350.     float magnetism_adhesion_frac;
  3351.     float inconsequential_target_scale_frac;
  3352.     uint8_t pad_1[52];
  3353.     float look_acceleration_time;
  3354.     float look_acceleration_scale;
  3355.     float look_peg_threshold_frac;
  3356.     float look_default_pitch_rate;   // not radians
  3357.     float look_default_yaw_rate;      // not radians
  3358.     float look_autoleveling_scale;
  3359.     uint8_t pad_2[20];
  3360.     int16_t minimum_weapon_swap_ticks;
  3361.     int16_t minimum_autoleveling_ticks;
  3362.     float minimum_angle_for_vehicle_flipping_rad;
  3363.     struct halo_array r1_look_function; // maximum of 16 cells -- each cell is displayed with a fraction of the total cell count from 0.000 to 1.000 0x80299D00
  3364. };
  3365.  
  3366. struct halo_matg_r3_r1_look_function
  3367. {
  3368.     float scale;
  3369. };
  3370.  
  3371. struct halo_matg_difficulty_level_settings
  3372. {
  3373.     float easy;
  3374.     float normal;
  3375.     float hard;
  3376.     float impossible;
  3377. };
  3378.  
  3379. struct halo_matg_r4_difficulty_section_health
  3380. {
  3381.     struct halo_matg_difficulty_level_settings enemy_damage;
  3382.     struct halo_matg_difficulty_level_settings enemy_vitality;
  3383.     struct halo_matg_difficulty_level_settings enemy_shield;
  3384.     struct halo_matg_difficulty_level_settings enemy_recharge;
  3385.     struct halo_matg_difficulty_level_settings friend_damage;
  3386.     struct halo_matg_difficulty_level_settings friend_vitality;
  3387.     struct halo_matg_difficulty_level_settings friend_shield;
  3388.     struct halo_matg_difficulty_level_settings friend_recharge;
  3389.     struct halo_matg_difficulty_level_settings infection_forms;
  3390. };
  3391.  
  3392. struct halo_matg_r4_difficulty_section_ranged_fire
  3393. {
  3394.     struct halo_matg_difficulty_level_settings rate_of_fire;
  3395.     struct halo_matg_difficulty_level_settings projectile_error;
  3396.     struct halo_matg_difficulty_level_settings burst_error;
  3397.     struct halo_matg_difficulty_level_settings new_target_delay;
  3398.     struct halo_matg_difficulty_level_settings burst_separation;
  3399.     struct halo_matg_difficulty_level_settings target_tracking;
  3400.     struct halo_matg_difficulty_level_settings target_leading;
  3401.     struct halo_matg_difficulty_level_settings overcharge_chance;
  3402.     struct halo_matg_difficulty_level_settings special_fire_delay;
  3403.     struct halo_matg_difficulty_level_settings guidance_vs_player;
  3404.     struct halo_matg_difficulty_level_settings melee_delay_base;
  3405.     struct halo_matg_difficulty_level_settings melee_delay_scale;
  3406. };
  3407.  
  3408. struct halo_matg_r4_difficulty_section_grenades
  3409. {
  3410.     struct halo_matg_difficulty_level_settings grenade_chance_scale;
  3411.     struct halo_matg_difficulty_level_settings grenade_timer_scale;
  3412. };
  3413.  
  3414. struct halo_matg_r4_difficulty_section_placement
  3415. {
  3416.     struct halo_matg_difficulty_level_settings major_upgrade_normal;
  3417.     struct halo_matg_difficulty_level_settings major_upgrade_few;
  3418.     struct halo_matg_difficulty_level_settings major_upgrade_many;
  3419. };
  3420.  
  3421. struct halo_matg_r4_difficulty
  3422. {
  3423.     struct halo_matg_r4_difficulty_section_health health;
  3424.     uint8_t pad_1[16];
  3425.     struct halo_matg_r4_difficulty_section_ranged_fire ranged_fire;
  3426.     uint8_t pad_2[16];
  3427.     struct halo_matg_r4_difficulty_section_grenades grenades;
  3428.     uint8_t pad_3[48];
  3429.     struct halo_matg_r4_difficulty_section_placement placement;
  3430.     uint8_t pad_4[148];
  3431. };
  3432.  
  3433. struct halo_matg_r5_grenades
  3434. {
  3435.     int16_t maximum_count;
  3436.     int16_t mp_spawn_default;
  3437.     struct halo_dependency d1_throwing_effect;  // effe
  3438.     struct halo_dependency d2_hud_interface;    // grhi
  3439.     struct halo_dependency d3_equipment;    // eqip
  3440.     struct halo_dependency d4_projectile;   // proj
  3441. };
  3442.  
  3443. struct halo_matg_r6_rasterizer_data_section_function_textures
  3444. {
  3445.     struct halo_dependency d1_distance_attenuation; // bitm
  3446.     struct halo_dependency d2_vector_normalization; // bitm
  3447.     struct halo_dependency d3_atmospheric_fog_density;  // bitm
  3448.     struct halo_dependency d4_planar_fog_density;   // bitm
  3449.     struct halo_dependency d5_linear_corner_fade;   // bitm
  3450.     struct halo_dependency d6_active_camouflage_distortion; // bitm
  3451.     struct halo_dependency d7_glow; // bitm
  3452. };
  3453.  
  3454. struct halo_matg_r6_rasterizer_data_section_default_textures
  3455. {
  3456.     struct halo_dependency d1_default_2d;   // bitm
  3457.     struct halo_dependency d2_default_3d;   // bitm
  3458.     struct halo_dependency d3_default_cube_map; // bitm
  3459. };
  3460.  
  3461. struct halo_matg_r6_rasterizer_data_section_experimental_textures
  3462. {
  3463.     struct halo_dependency d1_test_0;   // bitm
  3464.     struct halo_dependency d2_test_1;   // bitm
  3465.     struct halo_dependency d3_test_2;   // bitm
  3466.     struct halo_dependency d4_test_3;   // bitm
  3467. };
  3468.  
  3469. struct halo_matg_r6_rasterizer_data_section_video_effect_textures
  3470. {
  3471.     struct halo_dependency d1_video_scanline_map;   // bitm
  3472.     struct halo_dependency d2_video_noise_map;  // bitm
  3473. };
  3474.  
  3475. struct halo_matg_r6_rasterizer_data_section_active_camouflage
  3476. {
  3477.     struct halo_matg_active_camouflage_flags_bf flags_bf;
  3478.     uint8_t pad_1[2];
  3479.     float refraction_amount;
  3480.     float distance_falloff;
  3481.     struct halo_colorfloat_rgb tint_color;
  3482.     float hyper_stealth_refraction;
  3483.     float hyper_stealth_distance_falloff;
  3484.     struct halo_colorfloat_rgb hyper_stealth_tint_color;
  3485. };
  3486.  
  3487. struct halo_matg_r6_rasterizer_data_section_pc_textures
  3488. {
  3489.     struct halo_dependency d1_distance_attenuation_2d;  // bitm
  3490. };
  3491.  
  3492. struct halo_matg_r6_rasterizer_data
  3493. {
  3494.     struct halo_matg_r6_rasterizer_data_section_function_textures function_textures;
  3495.     uint8_t pad_1[60];
  3496.     struct halo_matg_r6_rasterizer_data_section_default_textures default_textures;
  3497.     struct halo_matg_r6_rasterizer_data_section_experimental_textures experimental_textures;
  3498.     struct halo_matg_r6_rasterizer_data_section_video_effect_textures video_effect_textures;
  3499.     uint8_t pad_2[53];
  3500.     struct halo_matg_r6_rasterizer_data_section_active_camouflage active_camouflage;
  3501.     struct halo_matg_r6_rasterizer_data_section_pc_textures pc_textures;
  3502. };
  3503.  
  3504. struct halo_matg_r7_interface_bitmaps
  3505. {
  3506.     struct halo_dependency d1_font_system;  // font
  3507.     struct halo_dependency d2_font_terminal;    // font
  3508.     struct halo_dependency d3_screen_color_table;   // colo
  3509.     struct halo_dependency d4_hud_color_table;  // colo
  3510.     struct halo_dependency d5_editor_color_table;   // colo
  3511.     struct halo_dependency d6_dialog_color_table;   // colo
  3512.     struct halo_dependency d7_hud_globals;  // hudg
  3513.     struct halo_dependency d8_motion_sensor_sweep_bitmap;   // bitm
  3514.     struct halo_dependency d9_motion_sensor_sweep_bitmap_mask;  // bitm
  3515.     struct halo_dependency d10_multiplayer_hud_bitmap;  // bitm
  3516.     struct halo_dependency d11_localization;    // strn
  3517.     struct halo_dependency d12_hud_digits_definition;   // hudn
  3518.     struct halo_dependency d13_motion_sensor_blip_bitmap;   // bitm
  3519.     struct halo_dependency d14_interface_goo_map1;  // bitm
  3520.     struct halo_dependency d15_interface_goo_map2;  // bitm
  3521.     struct halo_dependency d16_interface_goo_map3;  // bitm
  3522.     uint8_t pad_1[48];
  3523. };
  3524.  
  3525. struct halo_matg_r8_weapon_list
  3526. {
  3527.     struct halo_dependency d1_weapon;   // eqip garb item weap
  3528. };
  3529.  
  3530. struct halo_matg_r9_cheat_powerups
  3531. {
  3532.     struct halo_dependency d1_powerup;  // eqip
  3533. };
  3534.  
  3535. struct halo_matg_r10_multiplayer_information
  3536. {
  3537.     struct halo_dependency d1_flag; // eqip garb item weap
  3538.     struct halo_dependency d2_unit; // bipd unit vehi
  3539.     struct halo_array r1_vehicles;  // maximum of 20 cells 0xA41B9D00
  3540.     struct halo_dependency d3_hill_shader;  // shdr senv soso schi scex sotr sgla smet spla swat
  3541.     struct halo_dependency d4_flag_shader;  // shdr senv soso schi scex sotr sgla smet spla swat
  3542.     struct halo_dependency d5_ball; // eqip garb item weap
  3543.     struct halo_array r2_sounds;    // maximum of 60 cells 0xF41B9D00
  3544.     uint8_t pad_1[56];
  3545. };
  3546.  
  3547. struct halo_matg_r10_r1_vehicles
  3548. {
  3549.     struct halo_dependency d1_vehicle;  // vehi
  3550. };
  3551.  
  3552. struct halo_matg_r10_r2_sounds
  3553. {
  3554.     struct halo_dependency d1_sound;    // snd!
  3555. };
  3556.  
  3557. struct halo_matg_player_movement_speeds
  3558. {
  3559.     float forward;
  3560.     float backward;
  3561.     float sideways;
  3562.     float acceleration;
  3563. };
  3564.  
  3565. struct halo_matg_r11_player_information
  3566. {
  3567.     struct halo_dependency d1_unit; // bipd unit vehi
  3568.     uint8_t pad_1[28];
  3569.     float walking_speed;
  3570.     float double_speed_multiplier;
  3571.     struct halo_matg_player_movement_speeds run;
  3572.     struct halo_matg_player_movement_speeds sneak;
  3573.     float airborne_acceleration;
  3574.     float speed_multiplier;
  3575.     uint8_t pad_2[12];
  3576.     struct halo_point_3d grenade_origin;
  3577.     uint8_t pad_3[12];
  3578.     float stun_movement_penalty_frac;
  3579.     float stun_turning_penalty_frac;
  3580.     float stun_jumping_penalty_frac;
  3581.     float minimum_stun_time;
  3582.     float maximum_stun_time;
  3583.     uint8_t pad_4[8];
  3584.     struct halo_ranged_float first_person_idle_time;
  3585.     float first_person_skip_fraction_frac;
  3586.     uint8_t pad_5[16];
  3587.     struct halo_dependency d2_coop_respawn_effect;  // effe
  3588.     uint8_t pad_6[44];
  3589. };
  3590.  
  3591. struct halo_matg_r12_first_person_interface
  3592. {
  3593.     struct halo_dependency d1_first_person_hands;   // mod2
  3594.     struct halo_dependency d2_base_bitmap;  // bitm
  3595.     struct halo_dependency d3_shield_meter; // metr
  3596.     struct halo_point_2d_int16_t shield_meter_origin;
  3597.     struct halo_dependency d4_body_meter;   // metr
  3598.     struct halo_point_2d_int16_t body_meter_origin;
  3599.     struct halo_dependency d5_night_vision_off_to_on_effect;    // effe
  3600.     struct halo_dependency d6_night_vision_on_to_off_effect;    // effe
  3601.     uint8_t pad_1[88];
  3602. };
  3603.  
  3604. struct halo_matg_r13_falling_damage
  3605. {
  3606.     uint8_t pad_1[8];
  3607.     struct halo_ranged_float harmful_falling_distance;
  3608.     struct halo_dependency d1_falling_damage;   // jpt!
  3609.     uint8_t pad_2[8];
  3610.     float maximum_falling_distance;
  3611.     struct halo_dependency d2_distance_damage;  // jpt!
  3612.     struct halo_dependency d3_vehicle_environment_collision_damage_effect;  // jpt!
  3613.     struct halo_dependency d4_vehicle_killed_unit_damage_effect;    // jpt!
  3614.     struct halo_dependency d5_vehicle_collision_damage; // jpt!
  3615.     struct halo_dependency d6_flaming_death_damage; // jpt!
  3616.     uint8_t pad_3[28];
  3617. };
  3618.  
  3619. struct halo_matg_r14_materials_section_vehicle_terrain_parameters
  3620. {
  3621.     float ground_friction_scale;
  3622.     float ground_friction_normal_k1_scale;
  3623.     float ground_friction_normal_k0_scale;
  3624.     float ground_depth_scale;
  3625.     float ground_damp_fraction_scale;
  3626. };
  3627.  
  3628. struct halo_matg_r14_materials_section_breakable_surface_parameters
  3629. {
  3630.     float maximum_vitality;
  3631.     uint8_t pad_1[12];
  3632.     struct halo_dependency d1_effect;   // effe
  3633.     struct halo_dependency d2_sound;    // snd!
  3634.     uint8_t pad_2[24];
  3635.     struct halo_array r1_particle_effects;  // maximum of 8 cells 0x94199D00
  3636. };
  3637.  
  3638. struct halo_matg_r14_materials
  3639. {
  3640.     uint8_t pad_1[148];
  3641.     struct halo_matg_r14_materials_section_vehicle_terrain_parameters vehicle_terrain_parameters;
  3642.     uint8_t pad_2[556];
  3643.     struct halo_matg_r14_materials_section_breakable_surface_parameters breakable_surface_parameters;
  3644.     uint8_t pad_3[60];
  3645.     struct halo_dependency d1_melee_hit_sound;  // snd!
  3646. };
  3647.  
  3648. struct halo_matg_r14_r1_particle_effects
  3649. {
  3650.     struct halo_dependency d1_particle_type;    // part
  3651.     struct halo_color_interpolation_flags_bf flags_bf;
  3652.     float density;
  3653.     struct halo_ranged_float velocity_scale;
  3654.     uint8_t pad_1[4];
  3655.     struct halo_ranged_float angular_velocity_rad;
  3656.     uint8_t pad_2[8];
  3657.     struct halo_ranged_float radius;
  3658.     uint8_t pad_3[8];
  3659.     struct halo_ranged_colorfloat_argb tint;
  3660.     uint8_t pad_4[28];
  3661. };
  3662.  
  3663. struct halo_matg_r15_playlist_members
  3664. {
  3665.     char map_name[32];
  3666.     char game_variant[32];
  3667.     int32_t minimum_experience;
  3668.     int32_t maximum_experience;
  3669.     int32_t minimum_player_count;
  3670.     int32_t maximum_player_count;
  3671.     int32_t rating;
  3672.     uint8_t pad_1[64];
  3673. };
  3674.  
  3675. #pragma mark metr
  3676. struct halo_metr
  3677. {
  3678.     uint8_t pad_1[4];
  3679.     struct halo_dependency d1_stencil_bitmaps;  // bitm
  3680.     struct halo_dependency d2_source_bitmap;    // bitm
  3681.     int16_t stencil_sequence_index;
  3682.     int16_t source_sequence_index;
  3683.     uint8_t pad_2[20];
  3684.     enum halo_metr_color_interpolations interpolate_colors_list;
  3685.     enum halo_metr_color_anchors anchor_colors_list;
  3686.     uint8_t pad_3[8];
  3687.     struct halo_colorfloat_argb empty_color;
  3688.     struct halo_colorfloat_argb full_color;
  3689.     uint8_t pad_4[20];
  3690.     float unmask_distance;
  3691.     float mask_distance;
  3692.     uint8_t pad_5[12];
  3693.     int16_t unknown_1_le;   // 64
  3694.     int16_t unknown_2_le;   // 17
  3695.     int16_t unknown_3_le;   // 128
  3696.     int16_t unknown_4_le;   // 32
  3697.     struct halo_data encoded_stencil;   // 0x387B9C00
  3698. };
  3699.  
  3700. #pragma mark mgs2
  3701.  
  3702. struct halo_mgs2_section_light_volume
  3703. {
  3704.     char attachment_marker[32];
  3705.     uint8_t pad_1[3];
  3706.     struct halo_color_interpolation_flags_bf flags_bf;
  3707. };
  3708.  
  3709. struct halo_mgs2_section_brightness_scale
  3710. {
  3711.     float near_fade_distance;
  3712.     float far_fade_distance;
  3713.     float perpendicular_brightness_scale_frac;
  3714.     float parallel_brightness_scale_frac;
  3715.     enum halo_function_out_channels source_list;
  3716. };
  3717.  
  3718. struct halo_mgs2_section_bitmaps
  3719. {
  3720.     struct halo_dependency d1_map;  // bitm
  3721.     int16_t bitmaps_sequence_index;
  3722.     int16_t bitmaps_count;
  3723. };
  3724.  
  3725. struct halo_mgs2_section_frame_animation
  3726. {
  3727.     enum halo_function_out_channels frame_animation_source_list;
  3728.     uint8_t pad_1[102];
  3729.     struct halo_array r1_frames;    // maximum of 2 cells 0x34099D00
  3730. };
  3731.  
  3732. struct halo_mgs2
  3733. {
  3734.     struct halo_mgs2_section_light_volume light_volume;
  3735.     uint8_t pad_1[16];
  3736.     struct halo_mgs2_section_brightness_scale brightness_scale;
  3737.     uint8_t pad_2[22];
  3738.     struct halo_mgs2_section_bitmaps bitmaps;
  3739.     uint8_t pad_3[72];
  3740.     struct halo_mgs2_section_frame_animation frame_animation;
  3741.     uint8_t pad_4[32];
  3742. };
  3743.  
  3744. struct halo_mgs2_r1_frames
  3745. {
  3746.     uint8_t pad_1[16];
  3747.     float offset_from_marker;
  3748.     float offset_exponent;
  3749.     float length;
  3750.     uint8_t pad_2[32];
  3751.     float radius_hither;
  3752.     float radius_yon;
  3753.     float radius_exponent;
  3754.     uint8_t pad_3[32];
  3755.     struct halo_colorfloat_argb tint_color_hither;
  3756.     struct halo_colorfloat_argb tint_color_yon;
  3757.     float tint_color_exponent;
  3758.     float brightness_exponent;
  3759.     uint8_t pad_4[32];
  3760. };
  3761.  
  3762. #pragma mark mod2 mode
  3763. // mod2 and mode use the same structures, differing only by some padding and array signatures
  3764. struct halo_mod2
  3765. {
  3766.     struct halo_model_flags_bf flags_bf;
  3767.     uint32_t node_list_checksum;
  3768.     float super_high_detail_cutoff;
  3769.     float high_detail_cutoff;
  3770.     float medium_detail_cutoff;
  3771.     float low_detail_cutoff;
  3772.     float super_low_detail_cutoff;
  3773.     int16_t super_high_detail_node_count_calc;
  3774.     int16_t high_detail_node_count_calc;
  3775.     int16_t medium_detail_node_count_calc;
  3776.     int16_t low_detail_node_count_calc;
  3777.     int16_t super_low_detail_node_count_calc;
  3778.     uint8_t pad_1[10];
  3779.     struct halo_texture_map_axes base_map_scale;
  3780.     uint8_t pad_2[116];
  3781.     struct halo_array r1_markers;   // maximum of 256 cells 0x90859D00
  3782.     struct halo_array r2_nodes; // maximum of 64 cells 0xF4819D00
  3783.     struct halo_array r3_regions;   // maximum of 32 cells mod2: 0x9C849D00 mode: 0x40849D00
  3784.     struct halo_array r4_geometries;    // maximum of 256 cells mod2: 0x44819D00 mode: 0xE8809D00
  3785.     struct halo_array r5_shaders;   // maximum of 32 cells 0x847E9D00
  3786. };
  3787.  
  3788. struct halo_mod2_r1_markers
  3789. {
  3790.     char name[32];
  3791.     uint16_t magic_identifier;
  3792.     uint8_t pad_1[18];
  3793.     struct halo_array r1_instances; // maximum of 32 cells 0x1C859D00
  3794. };
  3795.  
  3796. struct halo_mod2_r1_r1_instances
  3797. {
  3798.     int8_t region_index;
  3799.     int8_t permutation_index;
  3800.     int8_t node_index;
  3801.     uint8_t pad_1[1];
  3802.     struct halo_point_3d translation;
  3803.     struct halo_quaternion rotation;
  3804. };
  3805.  
  3806. struct halo_mod2_r2_nodes
  3807. {
  3808.     struct halo_render_model_3d_node_identity identity;
  3809.     struct halo_point_3d default_translation;
  3810.     struct halo_quaternion default_rotation;
  3811.     float node_distance_from_parent;
  3812.     uint8_t pad_1[84];
  3813. };
  3814.  
  3815. struct halo_mod2_r3_regions
  3816. {
  3817.     char name[32];
  3818.     uint8_t pad_1[32];
  3819.     struct halo_array r1_permutations;  // maximum of 32 cells mod2: 0xE4839D00 mode: 0x34839D00
  3820. };
  3821.  
  3822. struct halo_mod2_r3_r1_permutations
  3823. {
  3824.     char name[32];
  3825.     struct halo_model_region_permutation_flags_bf flags_bf;
  3826.     uint8_t pad_1[28];
  3827.     int16_t super_low_sel;
  3828.     int16_t low_sel;
  3829.     int16_t medium_sel;
  3830.     int16_t high_sel;
  3831.     int16_t super_high_sel;
  3832.     uint8_t pad_2[2];
  3833.     struct halo_array r1_markers;   // maximum of 64 cells 0x74829D00
  3834. };
  3835.  
  3836. struct halo_mod2_r3_r1_r1_markers
  3837. {
  3838.     char name[32];
  3839.     uint16_t node_index_sel;
  3840.     uint8_t pad_1[2];
  3841.     struct halo_quaternion rotation;
  3842.     struct halo_point_3d translation;
  3843.     uint8_t pad_2[16];
  3844. };
  3845.  
  3846. struct halo_mod2_r4_geometries
  3847. {
  3848.     uint8_t pad_1[36];
  3849.     struct halo_array r1_parts; // maximum of 32 cells mod2: 0x80809D00 mode: 0x647F9D00
  3850. };
  3851.  
  3852. struct halo_mod2_r4_r1_parts
  3853. {
  3854.     struct halo_model_geometry_part_flags_bf flags_bf;
  3855.     int16_t shader_index_sel;
  3856.     int8_t previous_filthy_part_index;
  3857.     int8_t next_filthy_part_index;
  3858.     int16_t centroid_primary_node;
  3859.     int16_t centroid_secondary_node;
  3860.     float centroid_primary_weight_frac;
  3861.     float centroid_secondary_weight_frac;
  3862.     struct halo_point_3d centroid;
  3863.     struct halo_array r1_uncompressed_vertices; // maximum of 65535 cells 0x087D9D00
  3864.     struct halo_array r2_compressed_vertices;   // maximum of 65535 cells 0xB07D9D00
  3865.     struct halo_array r3_triangles; // maximum of 65535 cells 0x0C7E9D00
  3866.     uint8_t pad_1[64];
  3867. };
  3868.  
  3869. struct halo_mode_r4_r1_parts
  3870. {
  3871.     struct halo_model_geometry_part_flags_bf flags_bf;
  3872.     int16_t shader_index_sel;
  3873.     int8_t previous_filthy_part_index;
  3874.     int8_t next_filthy_part_index;
  3875.     int16_t centroid_primary_node;
  3876.     int16_t centroid_secondary_node;
  3877.     float centroid_primary_weight_frac;
  3878.     float centroid_secondary_weight_frac;
  3879.     struct halo_point_3d centroid;
  3880.     struct halo_array r1_uncompressed_vertices; // maximum of 65535 cells 0x087D9D00
  3881.     struct halo_array r2_compressed_vertices;   // maximum of 65535 cells 0xB07D9D00
  3882.     struct halo_array r3_triangles; // maximum of 65535 cells 0x0C7E9D00
  3883.     uint8_t pad_1[36];
  3884. };
  3885.  
  3886. struct halo_mod2_r4_r1_r1_uncompressed_vertices
  3887. {
  3888.     struct halo_point_3d position;
  3889.     struct halo_vector_3d normal;
  3890.     struct halo_vector_3d binormal;
  3891.     struct halo_vector_3d tangent;
  3892.     struct halo_point_2d texture_coords;
  3893.     int16_t node_0_index;
  3894.     int16_t node_1_index;
  3895.     float node_0_weight;
  3896.     float node_1_weight;
  3897. };
  3898.  
  3899. struct halo_mod2_r4_r1_r2_compressed_vertices
  3900. {
  3901.     struct halo_point_3d position;
  3902.     int32_t normal;
  3903.     int32_t binormal;
  3904.     int32_t tangent;
  3905.     struct halo_texture_map_coordinate_axes texture_coordinate;
  3906.     int8_t node_0_index;
  3907.     int8_t node_1_index;
  3908.     int16_t node_0_weight;
  3909. };
  3910.  
  3911. struct halo_mod2_r4_r1_r3_triangles
  3912. {
  3913.     int16_t vertex_0_index;
  3914.     int16_t vertex_1_index;
  3915.     int16_t vertex_2_index;
  3916. };
  3917.  
  3918. struct halo_mod2_r5_shaders
  3919. {
  3920.     struct halo_dependency d1_shader;   // shdr senv soso schi scex sotr sgla smet spla swat
  3921.     int16_t permutation;
  3922.     uint8_t pad_1[14];
  3923. };
  3924.  
  3925. #pragma mark mply
  3926. struct halo_mply
  3927. {
  3928.     struct halo_array r1_multiplayer_scenarios; // maximum of 32 cells 0x88309C00
  3929. };
  3930.  
  3931. struct halo_mply_r1_multiplayer_scenarios_section_net_map_info
  3932. {
  3933.     struct halo_dependency d1_descriptive_bitmap;   // bitm
  3934.     struct halo_dependency d2_displayed_map_name;   // ustr
  3935.     char scenario_tag_directory_path[32];
  3936. };
  3937.  
  3938. struct halo_mply_r1_multiplayer_scenarios
  3939. {
  3940.     struct halo_mply_r1_multiplayer_scenarios_section_net_map_info net_map_info;
  3941.     uint8_t pad_1[4];
  3942. };
  3943.  
  3944. #pragma mark ngpr
  3945.  
  3946. struct halo_ngpr_bitmap_reference
  3947. {
  3948.     struct halo_dependency bitmap;  // bitm
  3949.     int16_t bitmap_index;
  3950.     uint8_t pad_1[2];
  3951. };
  3952.  
  3953. struct halo_ngpr
  3954. {
  3955.     char name[32];
  3956.     struct halo_colorfloat_rgb primary_color;
  3957.     struct halo_colorfloat_rgb secondary_color;
  3958.     struct halo_ngpr_bitmap_reference pattern;
  3959.     struct halo_ngpr_bitmap_reference decal;
  3960.     uint8_t pad_1[800];
  3961. };
  3962.  
  3963. #pragma mark part
  3964. struct halo_part
  3965. {
  3966.     struct halo_part_flags_bf flags_bf;
  3967.     struct halo_dependency d1_bitmap;   // bitm
  3968.     struct halo_dependency d2_physics;  // pphy
  3969.     struct halo_dependency d3_material_effects; // foot
  3970.     uint8_t pad_1[4];
  3971.     struct halo_ranged_float lifespan;
  3972.     float fade_in_time;
  3973.     float fade_out_time;
  3974.     struct halo_dependency d4_collision_effect; // effe snd!
  3975.     struct halo_dependency d5_death_effect; // effe snd!
  3976.     float minimum_size;
  3977.     uint8_t pad_2[8];
  3978.     struct halo_ranged_float radius_animation;
  3979.     uint8_t pad_3[4];
  3980.     struct halo_ranged_float animation_rate;
  3981.     float contact_deterioration;
  3982.     float fade_start_size;
  3983.     float fade_end_size;
  3984.     uint8_t pad_4[4];
  3985.     int16_t first_sequence_index;
  3986.     int16_t initial_sequence_count;
  3987.     int16_t looping_sequence_count;
  3988.     int16_t final_sequence_count;
  3989.     uint8_t pad_5[12];
  3990.     enum halo_render_orientations orientation_list;
  3991.     uint8_t pad_6[42];
  3992.     struct halo_particle_shader particle_shader;
  3993. };
  3994.  
  3995. #pragma mark pctl
  3996.  
  3997. struct halo_pctl_section_system_behavior
  3998. {
  3999.     struct halo_dependency d1_point_physics;    // pphy
  4000.     enum halo_pctl_system_origin_update_physics_behaviors system_update_physics_list;
  4001.     uint8_t pad_1[6];
  4002.     struct halo_array r1_physics_constants; // maximum of 16 cells 0x54FE9C00
  4003. };
  4004.  
  4005. struct halo_pctl
  4006. {
  4007.     uint8_t pad_1[56];
  4008.     struct halo_pctl_section_system_behavior system_behavior;
  4009.     struct halo_array r2_particle_types;    // maximum of 4 cells 0x24039D00
  4010. };
  4011.  
  4012. struct halo_pctl_r_physics_constants
  4013. {
  4014.     float k;
  4015. };
  4016.  
  4017. struct halo_pctl_r2_particle_types
  4018. {
  4019.     char name[32];
  4020.     struct halo_pctl_particle_type_flags_bf flags_bf;
  4021.     int16_t initial_particle_count;
  4022.     uint8_t pad_1[2];
  4023.     enum halo_pctl_complex_sprite_render_modes complex_sprite_render_modes_list;
  4024.     uint8_t pad_2[2];
  4025.     float radius;
  4026.     uint8_t pad_3[36];
  4027.     enum halo_pctl_particle_creation_physics_behaviors particle_creation_physics_list;
  4028.     uint8_t pad_4[6];
  4029.     struct halo_array r1_physics_constants; // maximum of 16 cells 0x54FE9C00
  4030.     struct halo_array r2_states;    // maximum of 8 cells 0x80FF9C00
  4031.     struct halo_array r3_particle_states;   // maximum of 8 cells 0xD8019D00
  4032. };
  4033.  
  4034. struct halo_pctl_particle_timing_bounds
  4035. {
  4036.     struct halo_ranged_float duration;
  4037.     struct halo_ranged_float transition_time;
  4038. };
  4039.  
  4040. struct halo_pctl_r2_r2_states
  4041. {
  4042.     char name[32];
  4043.     struct halo_pctl_particle_timing_bounds timing_bounds;
  4044.     uint8_t pad_1[4];
  4045.     float scale_multiplier;
  4046.     float animation_rate_multiplier;
  4047.     float rotation_rate_multiplier;
  4048.     struct halo_colorfloat_argb color_multiplier;
  4049.     float radius_multiplier;
  4050.     float minimum_particle_count;
  4051.     float particle_creation_rate;
  4052.     uint8_t pad_2[84];
  4053.     enum halo_pctl_particle_creation_physics_behaviors particle_creation_physics_list;
  4054.     enum halo_pctl_particle_update_physics_behaviors particle_update_physics_list;
  4055.     struct halo_array r1_physics_constants; // maximum of 16 cells 0x54FE9C00
  4056. };
  4057.  
  4058. struct halo_pctl_r2_r3_particle_states
  4059. {
  4060.     char name[32];
  4061.     struct halo_pctl_particle_timing_bounds timing_bounds;
  4062.     struct halo_dependency d1_bitmaps;  // bitm
  4063.     int16_t sequence_index;
  4064.     uint8_t pad_1[6];
  4065.     struct halo_ranged_float scale;
  4066.     struct halo_ranged_float animation_rate;
  4067.     struct halo_ranged_float rotation_rate_rad;   // does the game correctly interpret these animation and rotation rate values? (Moses of Egypt mentioned that some CMT modders said these two values, as they are stored in radians, are mis-interpreted by the game as having been degrees -- so when you type 360 degrees, it is stored as 3.14, but the game thinks it is 3.14 degrees.) The values are stored correctly as Guerilla says, but does the game mis-interpret the radians value as degrees? If so, maybe Zeus will need to improperly store the value as degrees rather than radians.
  4068.     struct halo_colorfloat_argb color_1;
  4069.     struct halo_colorfloat_argb color_2;
  4070.     float radius_multiplier;
  4071.     struct halo_dependency d2_point_physics;    // pphy
  4072.     uint8_t pad_2[76];
  4073.     struct halo_particle_shader particle_shader;
  4074.     struct halo_array r1_physics_constants; // maximum of 16 cells 0x54FE9C00
  4075. };
  4076.  
  4077. #pragma mark phys
  4078. struct halo_phys
  4079. {
  4080.     float radius;
  4081.     float moment_scale_frac;
  4082.     float mass;
  4083.     struct halo_point_3d center_of_mass;
  4084.     float density;
  4085.     float gravity_scale;
  4086.     float ground_friction;
  4087.     float ground_depth;
  4088.     float ground_damp_fraction_frac;
  4089.     float ground_normal_k1;
  4090.     float ground_normal_k0;
  4091.     uint8_t pad_1[4];
  4092.     float water_friction;
  4093.     float water_depth;
  4094.     float water_density;
  4095.     uint8_t pad_2[4];
  4096.     float air_friction_frac;
  4097.     uint8_t pad_3[4];
  4098.     float xx_moment_calc;
  4099.     float yy_moment_calc;
  4100.     float zz_moment_calc;
  4101.     struct halo_array r1_inertial_matrix_and_inverse;   // maximum of 2 cells 0x684B9D00
  4102.     struct halo_array r2_powered_mass_points;   // maximum of 32 cells 0x304C9D00
  4103.     struct halo_array r3_mass_points;   // maximum of 32 cells 0x604D9D00
  4104. };
  4105.  
  4106. struct halo_phys_r1_inertial_matrix_and_inverse
  4107. {
  4108.     struct halo_vector_3d yyzz_xy_zx_calc;
  4109.     struct halo_vector_3d xy_zzxx_yz_calc;
  4110.     struct halo_vector_3d zx_yz_xxyy_calc;
  4111. };
  4112.  
  4113. struct halo_phys_r2_powered_mass_points
  4114. {
  4115.     char name[32];
  4116.     struct halo_phys_powered_mass_points_flags_bf flags_bf;
  4117.     float antigrav_strength;
  4118.     float antigrav_offset;
  4119.     float antigrav_height;
  4120.     float antigrav_damp_fraction;
  4121.     float antigrav_normal_k1;
  4122.     float antigrav_normal_k0;
  4123.     uint8_t pad_1[68];
  4124. };
  4125.  
  4126. struct halo_phys_r3_mass_points
  4127. {
  4128.     char name[32];
  4129.     int16_t powered_mass_point_sel;
  4130.     int16_t model_node;
  4131.     struct halo_phys_mass_points_flags_bf flags_bf;
  4132.     float relative_mass;
  4133.     float mass_calc;
  4134.     float relative_density;
  4135.     float density_calc;
  4136.     struct halo_point_3d position;
  4137.     struct halo_vector_3d forward;
  4138.     struct halo_vector_3d up;
  4139.     enum halo_phys_mass_point_friction_types friction_type_list;
  4140.     uint8_t pad_1[2];
  4141.     float friction_parallel_scale;
  4142.     float friction_perpendicular_scale;
  4143.     float radius;
  4144.     uint8_t pad_2[20];
  4145. };
  4146.  
  4147. #pragma mark plac scen
  4148. struct halo_plac_scen
  4149. {
  4150.     struct halo_obje obje;
  4151.     uint8_t pad_1[128];
  4152. };
  4153.  
  4154. #pragma mark pphy
  4155. struct halo_pphy
  4156. {
  4157.     struct halo_pphy_flags_bf flags_bf;
  4158.     uint8_t pad_1[28];
  4159.     float density;
  4160.     float air_friction;
  4161.     float water_friction;
  4162.     float surface_friction;
  4163.     float elasticity;
  4164.     uint8_t pad_2[12];
  4165. };
  4166.  
  4167. #pragma mark proj
  4168.  
  4169. struct halo_proj_section_detonation
  4170. {
  4171.     float arming_time;
  4172.     float danger_radius;
  4173.     struct halo_dependency d1_effect;   // effe
  4174.     struct halo_ranged_float timer;
  4175.     float minimum_velocity;
  4176.     float maximum_range;
  4177. };
  4178.  
  4179. struct halo_proj_section_physics
  4180. {
  4181.     float air_gravity_scale;
  4182.     struct halo_ranged_float air_damage_range;
  4183.     float water_gravity_scale;
  4184.     struct halo_ranged_float water_damage_range;
  4185.     float initial_velocity;
  4186.     float final_velocity;
  4187.     float guided_angular_velocity_rad;
  4188.     enum halo_sound_volumes detonation_noise_list;
  4189.     uint8_t pad_1[2];
  4190.     struct halo_dependency d1_detonation_started;   // effe
  4191.     struct halo_dependency d2_flyby_sound;  // snd!
  4192.     struct halo_dependency d3_attached_detonation_damage;   // jpt!
  4193.     struct halo_dependency d4_impact_damage;    // jpt!
  4194.     uint8_t pad_2[12];
  4195.     struct halo_array r1_material_responses;    // maximum of 33 cells 0x5CFA9C00
  4196. };
  4197.  
  4198. // it might be nice to reorganize some of these metadata entries in the GUI
  4199. struct halo_proj
  4200. {
  4201.     struct halo_obje obje;
  4202.     struct halo_proj_flags_bf flags_bf;
  4203.     enum halo_proj_timer_triggers detonation_timer_starts_list;
  4204.     enum halo_sound_volumes impact_noise_list;
  4205.     enum halo_proj_channel_functions A_in_list;
  4206.     enum halo_proj_channel_functions B_in_list;
  4207.     enum halo_proj_channel_functions C_in_list;
  4208.     enum halo_proj_channel_functions D_in_list;
  4209.     struct halo_dependency d1_super_detonation; // effe
  4210.     float ai_perception_radius;
  4211.     float collision_radius;
  4212.     struct halo_proj_section_detonation detonation;
  4213.     struct halo_proj_section_physics physics;
  4214. };
  4215.  
  4216. struct halo_proj_r1_material_responses_section_default_result
  4217. {
  4218.     enum halo_material_responses response_list;
  4219.     struct halo_dependency d1_effect;   // effe
  4220. };
  4221.  
  4222. struct halo_proj_r1_material_responses_section_potential_result
  4223. {
  4224.     enum halo_material_responses response_list;
  4225.     uint8_t pad_1[1];
  4226.     struct halo_proj_material_response_potential_result_flags_bf flags_bf;
  4227.     float skip_fraction_frac;
  4228.     struct halo_ranged_float between_rad;
  4229.     struct halo_ranged_float _and;
  4230.     struct halo_dependency d1_effect;   // effe
  4231. };
  4232.  
  4233. struct halo_proj_r1_material_responses_section_misc
  4234. {
  4235.     enum halo_material_response_effect_scaling scale_effects_by_list;
  4236.     uint8_t pad_1[2];
  4237.     float angular_noise_rad;
  4238.     float velocity_noise;
  4239.     struct halo_dependency d1_detonation_effect;    // effe
  4240. };
  4241.  
  4242. struct halo_proj_r1_material_responses_section_penetration
  4243. {
  4244.     float initial_friction;
  4245.     float maximum_distance;
  4246. };
  4247.  
  4248. struct halo_proj_r1_material_responses_section_reflection
  4249. {
  4250.     float parallel_friction;
  4251.     float perpendicular_friction;
  4252. };
  4253.  
  4254. struct halo_proj_r1_material_responses
  4255. {
  4256.     uint8_t pad_1[1];
  4257.     struct halo_proj_material_response_flags_bf flags_bf;
  4258.     struct halo_proj_r1_material_responses_section_default_result default_result;
  4259.     uint8_t pad_2[16];
  4260.     struct halo_proj_r1_material_responses_section_potential_result potential_result;
  4261.     uint8_t pad_3[16];
  4262.     struct halo_proj_r1_material_responses_section_misc miscellaneous;
  4263.     uint8_t pad_4[24];
  4264.     struct halo_proj_r1_material_responses_section_penetration penetration;
  4265.     struct halo_proj_r1_material_responses_section_reflection reflection;
  4266. };
  4267.  
  4268. #pragma mark rain
  4269. struct halo_rain
  4270. {
  4271.     uint8_t pad_1[36];
  4272.     struct halo_array r1_particle_types;    // maximum of 8 cells 0xBC119D00
  4273. };
  4274.  
  4275. struct halo_rain_r1_particle_types_section_shader
  4276. {
  4277.     struct halo_dependency d1_sprite_bitmap;    // bitm
  4278.     enum halo_render_orientations render_mode_list;
  4279.     enum halo_render_direction_sources render_direction_source_list;
  4280.     uint8_t pad_1[40];
  4281.     struct halo_particle_shader particle_shader;
  4282. };
  4283.  
  4284. struct halo_rain_particle_fading_bounds
  4285. {
  4286.     float start;
  4287.     float end;
  4288. };
  4289.  
  4290. struct halo_rain_particle_fading
  4291. {
  4292.     struct halo_rain_particle_fading_bounds fade_in;
  4293.     struct halo_rain_particle_fading_bounds fade_out;
  4294. };
  4295.  
  4296. struct halo_rain_r1_particle_types
  4297. {
  4298.     char name[32];
  4299.     struct halo_rain_flags_bf flags_bf;
  4300.     struct halo_rain_particle_fading fading_distance;
  4301.     struct halo_rain_particle_fading fading_height;
  4302.     uint8_t pad_1[96];
  4303.     struct halo_ranged_float particle_count;
  4304.     struct halo_dependency d1_physics;  // pphy
  4305.     uint8_t pad_2[16];
  4306.     struct halo_ranged_float acceleration_magnitude;
  4307.     float acceleration_turning_rate_frac;
  4308.     float acceleration_change_rate;
  4309.     uint8_t pad_3[32];
  4310.     struct halo_ranged_float particle_radius;
  4311.     struct halo_ranged_float animation_rate;
  4312.     struct halo_ranged_float rotation_rate_rad;
  4313.     uint8_t pad_4[32];
  4314.     struct halo_ranged_colorfloat_argb color;
  4315.     uint8_t pad_5[64];
  4316.     struct halo_rain_r1_particle_types_section_shader shader;
  4317. };
  4318.  
  4319. #pragma mark sbsp
  4320. // note: all the IJKD planes are calculated normalized in Guerilla; only the D remains as entered
  4321. struct halo_sbsp
  4322. {
  4323.     struct halo_dependency d1_lightmaps;    // bitm
  4324.     float vehicle_floor;
  4325.     float vehicle_ceiling;
  4326.     uint8_t pad_1[20];
  4327.     struct halo_colorfloat_rgb default_ambient_color;
  4328.     uint8_t pad_2[4];
  4329.     struct halo_colorfloat_rgb default_distant_light_0_color;
  4330.     struct halo_vector_3d default_distant_light_0_direction;
  4331.     struct halo_colorfloat_rgb default_distant_light_1_color;
  4332.     struct halo_vector_3d default_distant_light_1_direction;
  4333.     uint8_t pad_3[12];
  4334.     struct halo_colorfloat_argb default_reflection_tint;
  4335.     struct halo_vector_3d default_shadow_vector;
  4336.     struct halo_colorfloat_rgb default_shadow_color;
  4337.     uint8_t pad_4[4];
  4338.     struct halo_array r1_collision_materials;   // maximum of 512 cells 0xBCE59C00
  4339.     struct halo_array r2_collision_bsp; // maximum of 1 cell 0x6CE59C00
  4340.     struct halo_array r3_nodes; // maximum of 131072 cells 0xD0D89C00
  4341.     struct halo_cube world_bounds;
  4342.     struct halo_array r4_leaves;    // maximum of 65536 cells 0xF0D99C00
  4343.     struct halo_array r5_leaf_surfaces; // maximum of 262144 cells 0x7CD99C00
  4344.     struct halo_array r6_surfaces;  // maximum of 131072 cells 0x2CD99C00
  4345.     struct halo_array r7_lightmaps; // maximum of 128 cells 0xF4DB9C00
  4346.     uint8_t pad_5[12];
  4347.     struct halo_array r8_lens_flares;   // maximum of 256 cells 0xCCE49C00
  4348.     struct halo_array r9_lens_flare_markers;    // maximum of 65536 cells 0x40E59C00
  4349.     struct halo_array r10_clusters; // maximum of 8192 cells 0x28E09C00
  4350.     struct halo_data cluster_data;  // max 65536 bytes 0xA8D89C00
  4351.     struct halo_array r11_cluster_portals;  // maximum of 512 cells 0x54E19C00
  4352.     uint8_t pad_6[12];
  4353.     struct halo_array r12_breakable_surfaces;   // maximum of 256 cells 0x88E49C00
  4354.     struct halo_array r13_fog_planes;   // maximum of 32 cells 0x8CE39C00
  4355.     struct halo_array r14_fog_regions;  // maximum of 32 cells 0x24E39C00
  4356.     struct halo_array r15_fog_palette;  // maximum of 32 cells 0xC8E29C00
  4357.     uint8_t pad_7[24];
  4358.     struct halo_array r16_weather_palette;  // maximum of 32 cells 0x48DE9C00
  4359.     struct halo_array r17_weather_polyhedra;    // maximum of 32 cells 0x00E29C00
  4360.     uint8_t pad_8[24];
  4361.     struct halo_array r18_pathfinding_surfaces; // maximum of 131072 cells 0xD0E39C00
  4362.     struct halo_array r19_pathfinding_edges;    // maximum of 262144 cells 0x14E49C00
  4363.     struct halo_array r20_background_sound_palette; // maximum of 64 cells 0x18DD9C00
  4364.     struct halo_array r21_sound_environment_palette;    // maximum of 64 cells 0x74DD9C00
  4365.     struct halo_data sound_PAS_data;    // max 131072 bytes 0xE8E59C00
  4366.     uint8_t pad_9[24];
  4367.     struct halo_array r22_markers;  // maximum of 1024 cells 0x28E69C00
  4368.     struct halo_array r23_detail_objects;   // maximum of 1 cell 0xA0E69C00
  4369.     struct halo_array r24_runtime_decals;   // maximum of 6144 cells 0xE4E69C00
  4370.     uint8_t pad_10[12];
  4371.     struct halo_array r25_leaf_map_leaves;  // maximum of 65536 cells 0x484CA100
  4372.     struct halo_array r26_leaf_map_portals; // maximum of 524288 cells 0xF44CA100
  4373. };
  4374.  
  4375. struct halo_sbsp_r1_collision_materials
  4376. {
  4377.     struct halo_dependency d1_shader;   // shdr senv soso schi scex sotr sgla smet spla swat
  4378.     uint8_t pad_1[4];
  4379. };
  4380.  
  4381. struct halo_sbsp_r3_nodes
  4382. {
  4383.     int16_t unknown_1;
  4384.     int16_t unknown_2;
  4385.     int16_t unknown_3;
  4386. };
  4387. // retesting required: see line 11034 in ZRL
  4388. struct halo_sbsp_r4_leaves
  4389. {
  4390.     int16_t unknown_1;
  4391.     int16_t unknown_2;
  4392.     int16_t unknown_3;
  4393.     uint8_t pad_1[2];
  4394.     int16_t cluster;
  4395.     int16_t surface_reference_count;
  4396.     int32_t surface_references_sel;
  4397. };
  4398.  
  4399. struct halo_sbsp_r5_leaf_surfaces
  4400. {
  4401.     int32_t surface_sel;
  4402.     int32_t node_sel;
  4403. };
  4404.  
  4405. struct halo_sbsp_r6_surfaces
  4406. {
  4407.     int16_t a1;
  4408.     int16_t a2;
  4409.     int16_t a3;
  4410. };
  4411.  
  4412. struct halo_sbsp_r7_lightmaps
  4413. {
  4414.     int16_t bitmap;
  4415.     uint8_t pad_1[18];
  4416.     struct halo_array r1_materials; // maximum of 2048 cells 0x8CDB9C00
  4417. };
  4418.  
  4419. struct halo_sbsp_r7_r1_materials
  4420. {
  4421.     struct halo_dependency d1_shader;   // shdr senv soso schi scex sotr sgla smet spla swat
  4422.     int16_t shader_permutation;
  4423.     uint8_t pad_1[1];
  4424.     struct halo_sbsp_lightmap_material_flags_bf flags_bf;
  4425.     int32_t surfaces_sel;
  4426.     int32_t surface_count;
  4427.     struct halo_point_3d centroid;
  4428.     struct halo_colorfloat_rgb ambient_color;
  4429.     int16_t distant_light_count;
  4430.     uint8_t pad_2[2];
  4431.     struct halo_colorfloat_rgb distant_light_0_color;
  4432.     struct halo_vector_3d distant_light_0_direction;
  4433.     struct halo_colorfloat_rgb distant_light_1_color;
  4434.     struct halo_vector_3d distant_light_1_direction;
  4435.     struct halo_colorfloat_argb  reflection_tint;
  4436.     struct halo_vector_3d shadow_vector;
  4437.     struct halo_colorfloat_rgb shadow_color;
  4438.     struct halo_plane_3d plane;
  4439.     int16_t breakable_surface;
  4440.     uint8_t pad_3[6];
  4441.     uint32_t count1;
  4442.     uint32_t offset1;
  4443.     uint32_t unknown_a1_le;
  4444.     uint32_t unknown_a2_le;
  4445.     uint32_t unknown_a3_le;
  4446.     uint32_t count2;
  4447.     uint32_t offset2;
  4448.     uint32_t unknown_b1_le;
  4449.     uint32_t unknown_b2_le;
  4450.     struct halo_data uncompressed_vertices; // max 4864000 bytes 0x88D89C00
  4451.     struct halo_data compressed_vertices;   // max 2560000 bytes 0x98D89C00
  4452. };
  4453.  
  4454. struct halo_sbsp_r8_lens_flares
  4455. {
  4456.     struct halo_dependency d1_lens_flare;   // lens
  4457. };
  4458.  
  4459. struct halo_sbsp_r9_lens_flare_markers
  4460. {
  4461.     struct halo_point_3d position;
  4462.     struct halo_vector_3d_component direction_component;
  4463.     int8_t lens_flare_index;
  4464. };
  4465.  
  4466. struct halo_sbsp_r10_clusters
  4467. {
  4468.     int16_t sky;
  4469.     int16_t fog;
  4470.     int16_t background_sound_sel;
  4471.     int16_t sound_environment_sel;
  4472.     int16_t weather_sel;
  4473.     int16_t transition_structure_bsp;
  4474.     uint8_t pad_1[28];
  4475.     struct halo_array r1_predicted_resources;   // maximum of 1024 cells 0x105FA000
  4476.     struct halo_array r2_subclusters;   // maximum of 4096 cells 0xF4DE9C00
  4477.     int16_t first_lens_flare_marker_index;
  4478.     int16_t lens_flare_marker_count;
  4479.     struct halo_array r3_surface_indices;   // maximum of 32768 cells 0x38DF9C00
  4480.     struct halo_array r4_mirrors;   // maximum of 16 cells 0xA0DC9C00
  4481.     struct halo_array r5_portals;   // maximum of 128 cells 0x6CE09C00
  4482. };
  4483.  
  4484. struct halo_sbsp_r10_r2_subclusters
  4485. {
  4486.     struct halo_cube world_bounds;
  4487.     struct halo_array r1_surface_indices;   // maximum of 128 cells 0x8CDE9C00
  4488. };
  4489.  
  4490. struct halo_sbsp_surface_indices
  4491. {
  4492.     int32_t index;
  4493. };
  4494.  
  4495. struct halo_sbsp_r10_r4_mirrors
  4496. {
  4497.     struct halo_plane_3d plane;
  4498.     uint8_t pad_1[20];
  4499.     struct halo_dependency d1_shader;   // shdr senv soso schi scex sotr sgla smet spla swat
  4500.     struct halo_array r1_vertices;  // maximum of 512 cells 0x38DC9C00
  4501. };
  4502.  
  4503. struct halo_sbsp_vertex_points
  4504. {
  4505.     struct halo_point_3d point;
  4506. };
  4507.  
  4508. struct halo_sbsp_r10_r5_portals
  4509. {
  4510.     int16_t portal;
  4511. };
  4512.  
  4513. struct halo_sbsp_r11_cluster_portals
  4514. {
  4515.     int16_t front_cluster;
  4516.     int16_t back_cluster;
  4517.     int32_t plane_index;
  4518.     struct halo_sphere bounding_sphere;
  4519.     struct halo_sbsp_cluster_portal_flags_bf flags_bf;
  4520.     uint8_t pad_1[24];
  4521.     struct halo_array r1_vertices;  // maximum of 128 cells 0xB0E09C00
  4522. };
  4523.  
  4524. struct halo_sbsp_r12_breakable_surfaces
  4525. {
  4526.     struct halo_sphere bounding_sphere;
  4527.     int32_t collision_surface_index;
  4528.     uint8_t pad_1[28];
  4529. };
  4530.  
  4531. struct halo_sbsp_r13_fog_planes
  4532. {
  4533.     int16_t front_region_sel;
  4534.     uint8_t pad_1[2];
  4535.     struct halo_plane_3d plane;
  4536.     struct halo_array r1_vertices;  // maximum of 4096 cells 0x44E29C00
  4537. };
  4538.  
  4539. struct halo_sbsp_r14_fog_regions
  4540. {
  4541.     uint8_t pad_1[36];
  4542.     int16_t fog_palette_sel;
  4543.     int16_t weather_palette_sel;
  4544. };
  4545.  
  4546. struct halo_sbsp_15_fog_palette
  4547. {
  4548.     char name[32];
  4549.     struct halo_dependency d1_fog;  // fog
  4550.     uint8_t pad_1[4];
  4551.     char fog_scale_function[32];
  4552.     uint8_t pad_2[52];
  4553. };
  4554.  
  4555. struct halo_sbsp_r16_weather_palette
  4556. {
  4557.     char name[32];
  4558.     struct halo_dependency d1_particle_system;  // rain
  4559.     uint8_t pad_1[4];
  4560.     char particle_system_scale_function[32];
  4561.     uint8_t pad_2[44];
  4562.     struct halo_dependency d2_wind; // wind
  4563.     struct halo_vector_3d wind_direction;
  4564.     float wind_magnitude;
  4565.     uint8_t pad_3[4];
  4566.     char wind_scale_function[32];
  4567.     uint8_t pad_4[44];
  4568. };
  4569.  
  4570. struct halo_sbsp_r17_weather_polyhedra
  4571. {
  4572.     struct halo_sphere bounding_sphere;
  4573.     uint8_t pad_1[4];
  4574.     struct halo_array r1_planes;    // maximum of 16 cells 0x98E19C00
  4575. };
  4576.  
  4577. struct halo_sbsp_r18_pathfinding_surfaces
  4578. {
  4579.     int8_t data;
  4580. };
  4581.  
  4582. struct halo_sbsp_r19_pathfinding_edges
  4583. {
  4584.     int8_t midpoint;
  4585. };
  4586.  
  4587. struct halo_sbsp_r20_background_sound_palette
  4588. {
  4589.     char name[32];
  4590.     struct halo_dependency d1_background_sound; // lsnd
  4591.     uint8_t pad_1[4];
  4592.     char scale_function[32];
  4593.     uint8_t pad_2[32];
  4594. };
  4595.  
  4596. struct halo_sbsp_r21_sound_environment_palette
  4597. {
  4598.     char name[32];
  4599.     struct halo_dependency d1_sound_environment;    // snde
  4600.     uint8_t pad_1[32];
  4601. };
  4602.  
  4603. struct halo_sbsp_r22_markers
  4604. {
  4605.     char name[32];
  4606.     struct halo_quaternion rotation;
  4607.     struct halo_point_3d position;
  4608. };
  4609.  
  4610. struct halo_sbsp_r23_detail_objects
  4611. {
  4612.     struct halo_array r1_cells; // maximum of 262144 cells 0xF42E9C00
  4613.     struct halo_array r2_instances; // maximum of 2097152 cells 0x682F9C00
  4614.     struct halo_array r3_counts;    // maximum of 8388608 cells 0xAC2F9C00
  4615.     struct halo_array r4_z_reference_vectors;   // maximum of 262144 cells 0x14309C00
  4616. };
  4617.  
  4618. // retesting required, see line 11739 in ZRL
  4619.  
  4620. struct halo_sbsp_r23_r1_cells
  4621. {
  4622.     int16_t q1;
  4623.     int16_t q2;
  4624.     int16_t q3;
  4625.     int16_t q4;
  4626.     int32_t q5;
  4627.     int32_t q6;
  4628.     int32_t q7;
  4629.     uint8_t pad_1[12];
  4630. };
  4631.  
  4632. struct halo_sbsp_r23_r2_instances
  4633. {
  4634.     int8_t q1;
  4635.     int8_t q2;
  4636.     int8_t q3;
  4637.     int8_t q4;
  4638.     int16_t q5;
  4639. };
  4640.  
  4641. struct halo_sbsp_r23_r3_counts
  4642. {
  4643.     int16_t q1;
  4644. };
  4645.  
  4646. struct halo_sbsp_r23_r4_z_reference_vectors
  4647. {
  4648.     float q1;
  4649.     float q2;
  4650.     float q3;
  4651.     float q4;
  4652. };
  4653.  
  4654. // line 11791 in ZRL
  4655.  
  4656. struct halo_sbsp_r25_leaf_map_leaves
  4657. {
  4658.     struct halo_array r1_faces; // maximum of 256 cells 0xF84BA100
  4659.     struct halo_array r2_portal_indices;    // maximum of 256 cells 0xA84BA100
  4660. };
  4661.  
  4662. struct halo_sbsp_r25_r1_faces
  4663. {
  4664.     int32_t node_index;
  4665.     struct halo_array r1_vertices;  // maximum of 64 cells 0x644BA100
  4666. };
  4667.  
  4668. struct halo_sbsp_r25_r1_r1_vertices
  4669. {
  4670.     struct halo_point_2d vertex;
  4671. };
  4672.  
  4673. struct halo_sbsp_r25_r2_portal_indices
  4674. {
  4675.     int32_t portal_index;
  4676. };
  4677.  
  4678. struct halo_sbsp_r26_leaf_map_portals
  4679. {
  4680.     int32_t plane_index;
  4681.     int32_t back_leaf_index;
  4682.     int32_t front_leaf_index;
  4683.     struct halo_array r1_vertices;  // maximum of 64 cells 0x8C4CA100
  4684. };
  4685.  
  4686. #pragma mark scex
  4687. struct halo_scex
  4688. {
  4689.     struct halo_shdr shdr;
  4690.     struct halo_shader_transparency chicago_shader_extended;
  4691.     uint8_t pad_1[2];
  4692.     struct halo_shader_section_lens_flares lens_flares;
  4693.     struct halo_array r1_extra_layers;  // maximum of 4 cells 0x94A59C00
  4694.     struct halo_array r2_four_stage_maps;   // maximum of 4 cells 0x78AE9C00
  4695.     struct halo_array r3_two_stage_maps;    // maximum of 4 cells 0x78AE9C00
  4696.     struct halo_schi_extra_flags_bf extra_flags_bf;
  4697.     uint8_t pad_2[8];
  4698. };
  4699.  
  4700. #pragma mark schi
  4701. struct halo_schi
  4702. {
  4703.     struct halo_shdr shdr;
  4704.     struct halo_shader_transparency chicago_shader;
  4705.     uint8_t pad_1[2];
  4706.     struct halo_shader_section_lens_flares lens_flares;
  4707.     struct halo_array r1_extra_layers;  // maximum of 4 cells 0x94A59C00
  4708.     struct halo_array r2_maps;  // maximum of 4 cells 0x78AE9C00
  4709.     struct halo_schi_extra_flags_bf extra_flags_bf;
  4710.     uint8_t pad_2[8];
  4711. };
  4712.  
  4713. #pragma mark scnr
  4714. struct halo_scnr
  4715. {
  4716.     struct halo_dependency d1_do_not_use;   // sbsp
  4717.     struct halo_dependency d2_will_not_use; // sbsp
  4718.     struct halo_dependency d3_can_not_use;  // sky
  4719.     struct halo_array r1_skies; // maximum of 8 cells 0x88D39C00
  4720.     enum halo_scnr_types type_list;
  4721.     uint8_t pad_1[1];
  4722.     struct halo_scnr_flags_bf flags_bf;
  4723.     struct halo_array r2_child_scenarios;   // maximum of 16 cells 0x38D39C00
  4724.     float local_north_rad;
  4725.     uint8_t pad_2[156];
  4726.     struct halo_array r3_predicted_resources_calc;  // maximum of 1024 cells 0x105FA000
  4727.     struct halo_array r4_functions; // maximum of 32 cells 0x74BD9C00
  4728.     struct halo_data editor_scenario_data;  // 0xD8D39C00
  4729.     struct halo_array r5_comments;  // maximum of 1024 cells 0x28D49C00
  4730.     uint8_t pad_3[224];
  4731.     struct halo_array r6_object_names;  // maximum of 512 cells 0xC4BD9C00
  4732.     struct halo_array r7_scenery;   // maximum of 2000 cells 0x94C49C00
  4733.     struct halo_array r8_scenery_palette;   // maximum of 100 cells 0xE4C39C00
  4734.     struct halo_array r9_bipeds;    // maximum of 128 cells 0x54C89C00
  4735.     struct halo_array r10_biped_palette;    // maximum of 100 cells 0x70C79C00
  4736.     struct halo_array r11_vehicles; // maximum of 80 cells 0x00CA9C00
  4737.     struct halo_array r12_vehicle_palette;  // maximum of 100 cells 0xF8C89C00
  4738.     struct halo_array r13_equipment;    // maximum of 256 cells 0xA8C59C00
  4739.     struct halo_array r14_equipment_palette;    // maximum of 100 cells 0x04C59C00
  4740.     struct halo_array r15_weapons;  // maximum of 128 cells 0x08C79C00
  4741.     struct halo_array r16_weapon_palette;   // maximum of 100 cells 0x18C69C00
  4742.     struct halo_array r17_device_groups;    // maximum of 128 cells 0x3CBE9C00
  4743.     struct halo_array r18_machines; // maximum of 400 cells 0x5CCB9C00
  4744.     struct halo_array r19_machine_palette;  // maximum of 100 cells 0x90CA9C00
  4745.     struct halo_array r20_controls; // maximum of 100 cells 0xB0CC9C00
  4746.     struct halo_array r21_control_palette;  // maximum of 100 cells 0xC4CB9C00
  4747.     struct halo_array r22_light_fixtures;   // maximum of 500 cells 0xF8CD9C00
  4748.     struct halo_array r23_light_fixtures_palette;   // maximum of 100 cells 0x0CCD9C00
  4749.     struct halo_array r24_sound_scenery;    // maximum of 256 cells 0xE0CE9C00
  4750.     struct halo_array r25_sound_scenery_palette;    // maximum of 100 cells 0x54CE9C00
  4751.     uint8_t pad_4[84];
  4752.     struct halo_array r26_player_starting_profile;  // maximum of 256 cells 0xECC19C00
  4753.     struct halo_array r27_player_starting_locations;    // maximum of 256 cells 0x90C29C00
  4754.     struct halo_array r28_trigger_volumes;  // maximum of 256 cells 0x08C39C00
  4755.     struct halo_array r29_recorded_animations;  // maximum of 1024 cells 0x2043A100
  4756.     struct halo_array r30_netgame_flags;    // maximum of 200 cells 0xFCC09C00
  4757.     struct halo_array r31_netgame_equipment;    // maximum of 200 cells 0x94BF9C00
  4758.     struct halo_array r32_starting_equipment;   // maximum of 200 cells 0x78C09C00
  4759.     struct halo_array r33_bsp_switch_trigger_volumes;   // maximum of 256 cells 0x70C39C00
  4760.     struct halo_array r34_decals;   // maximum of 65536 cells 0x38D09C00
  4761.     struct halo_array r35_decal_palette;    // maximum of 128 cells 0xD0CF9C00
  4762.     struct halo_array r36_detail_object_collection_palette; // maximum of 32 cells 0x30CF9C00
  4763.     uint8_t pad_5[84];
  4764.     struct halo_array r37_actor_palette;    // maximum of 64 cells 0x8C33A100
  4765.     struct halo_array r38_encounters;   // maximum of 128 cells 0x8C3FA100
  4766.     struct halo_array r39_command_lists;    // maximum of 256 cells 0x4C39A100
  4767.     struct halo_array r40_ai_animation_references;  // maximum of 128 cells 0x4837A100
  4768.     struct halo_array r41_ai_script_references; // maximum of 128 cells 0x9837A100
  4769.     struct halo_array r42_ai_recording_references;  // maximum of 128 cells 0xE837A100
  4770.     struct halo_array r43_ai_conversations; // maximum of 128 cells 0x6842A100
  4771.     struct halo_data script_syntax_data;    // 0x9C32A100
  4772.     struct halo_data script_string_data;    // 0xAC32A100
  4773.     struct halo_array r44_scripts;  // maximum of 512 cells 0xA830A100
  4774.     struct halo_array r45_globals;  // maximum of 128 cells 0x2C31A100
  4775.     struct halo_array r46_references;   // maximum of 256 cells 0x8831A100
  4776.     struct halo_array r47_source_files; // maximum of 8 cells 0xE831A100
  4777.     uint8_t pad_6[24];
  4778.     struct halo_array r48_cutscene_flags;   // maximum of 512 cells 0xB0D09C00
  4779.     struct halo_array r49_cutscene_camera_points;   // maximum of 512 cells 0x40D19C00
  4780.     struct halo_array r50_cutscene_titles;  // maximum of 64 cells 0x80D29C00
  4781.     uint8_t pad_7[108];
  4782.     struct halo_dependency d4_custom_object_names;  // ustr
  4783.     struct halo_dependency d5_ingame_help_text; // ustr
  4784.     struct halo_dependency d6_hud_messages; // hmt
  4785.     struct halo_array r51_structure_bsps;   // maximum of 16 cells 0xDCD29C00
  4786. };
  4787.  
  4788. struct halo_scnr_instance_orientation_2d
  4789. {
  4790.     struct halo_point_3d position;
  4791.     float facing_rad;
  4792. };
  4793.  
  4794. struct halo_scnr_instance_orientation_3d
  4795. {
  4796.     struct halo_point_3d position;
  4797.     struct halo_angle_3d rotation_rad;
  4798. };
  4799.  
  4800. struct halo_scnr_devi
  4801. {
  4802.     uint8_t pad_1[8];
  4803.     int16_t power_group_sel;
  4804.     int16_t position_group_sel;
  4805.     struct halo_scenario_device_flags_bf flags_bf;
  4806. };
  4807.  
  4808. struct halo_scnr_obje
  4809. {
  4810.     int16_t type_sel;
  4811.     int16_t name_sel;
  4812.     uint8_t pad_1[1];
  4813.     struct halo_scenario_object_not_placed_flags_bf not_placed_bf;
  4814.     int16_t desired_permutation;
  4815.     struct halo_scnr_instance_orientation_3d orientation;
  4816. };
  4817.  
  4818. struct halo_scnr_unit
  4819. {
  4820.     uint8_t pad_1[40];
  4821.     float body_vitality;
  4822.     struct halo_scenario_unit_flags_bf flags_bf;
  4823. };
  4824.  
  4825. struct halo_scnr_object_palette
  4826. {
  4827.     struct halo_dependency d1_name; // (varies)
  4828.     uint8_t pad_1[32];
  4829. };
  4830.  
  4831. struct halo_scnr_r1_skies
  4832. {
  4833.     struct halo_dependency d1_sky;  // sky
  4834. };
  4835.  
  4836. struct halo_scnr_r2_child_scenarios
  4837. {
  4838.     struct halo_dependency d1_child_scenario;   // scnr
  4839.     uint8_t pad_1[16];
  4840. };
  4841.  
  4842. struct halo_scnr_r4_functions
  4843. {
  4844.     struct halo_scnr_function_flags_bf flags_bf;
  4845.     char name[32];
  4846.     float period;
  4847.     int16_t scale_period_by_sel;
  4848.     enum halo_function_behaviors function_list;
  4849.     int16_t scale_function_by_sel;
  4850.     enum halo_function_behaviors wobble_function_list;
  4851.     float wobble_period;
  4852.     float wobble_magnitude;
  4853.     float square_wave_threshold_frac;
  4854.     int16_t step_count;
  4855.     enum halo_function_mappings map_to_list;
  4856.     int16_t sawtooth_count;
  4857.     uint8_t pad_1[2];
  4858.     int16_t scale_result_by_sel;
  4859.     enum halo_function_bounds bounds_mode_list;
  4860.     struct halo_ranged_float bounds_frac;
  4861.     uint8_t pad_2[6];
  4862.     int16_t turn_off_with_sel;
  4863.     uint8_t pad_3[32];
  4864. };
  4865.  
  4866. struct halo_scnr_r5_comments
  4867. {
  4868.     struct halo_point_3d position;
  4869.     uint8_t pad_1[16];
  4870.     struct halo_data comment;   // 0xE8D39C00
  4871. };
  4872.  
  4873. struct halo_scnr_r6_object_names
  4874. {
  4875.     char name[32];
  4876.     enum halo_obje_types obje_index_list_le;
  4877.     int16_t obje_id_le;
  4878. };
  4879.  
  4880. struct halo_scnr_r7_scenery
  4881. {
  4882.     struct halo_scnr_obje obje;
  4883.     uint32_t unknown_1;
  4884.     uint8_t pad_1[36];
  4885. };
  4886.  
  4887. struct halo_scnr_r8_scenery_palette
  4888. {
  4889.     struct halo_scnr_object_palette scen;
  4890. };
  4891.  
  4892. struct halo_scnr_r9_bipeds
  4893. {
  4894.     struct halo_scnr_obje obje;
  4895.     struct halo_scnr_unit unit;
  4896.     uint8_t pad_2[40];
  4897. };
  4898.  
  4899. struct halo_scnr_r10_biped_palette
  4900. {
  4901.     struct halo_scnr_object_palette bipd;
  4902. };
  4903.  
  4904. struct halo_scnr_r11_vehicles
  4905. {
  4906.     struct halo_scnr_obje obje;
  4907.     struct halo_scnr_unit unit;
  4908.     uint8_t pad_1[8];
  4909.     int8_t multiplayer_team_index;
  4910.     uint8_t pad_2[1];
  4911.     struct halo_scnr_vehicle_multiplayer_spawn_flags_bf multiplayer_spawn_flags_bf;
  4912.     uint8_t pad_3[28];
  4913. };
  4914.  
  4915. struct halo_scnr_r12_vehicle_palette
  4916. {
  4917.     struct halo_scnr_object_palette vehi;
  4918. };
  4919.  
  4920. struct halo_scnr_r13_equipment
  4921. {
  4922.     struct halo_scnr_obje obje;
  4923.     int16_t unknown_1;   // undocumented big endian value (first occurrence in d40 @ 57116) (ignored by Guerilla)
  4924.     uint8_t pad_1[1];
  4925.     struct halo_scnr_item_flags_bf misc_flags_bf;
  4926.     uint8_t pad_2[4];
  4927. };
  4928.  
  4929. struct halo_scnr_r14_equipment_palette
  4930. {
  4931.     struct halo_scnr_object_palette eqip;
  4932. };
  4933.  
  4934. struct halo_scnr_r15_weapons
  4935. {
  4936.     struct halo_scnr_obje obje;
  4937.     uint8_t pad_1[40];
  4938.     int16_t rounds_left;
  4939.     int16_t rounds_loaded;
  4940.     uint8_t pad_2[1];
  4941.     struct halo_scnr_item_flags_bf flags_bf;
  4942.     uint8_t pad_3[14];
  4943. };
  4944.  
  4945. struct halo_scnr_r16_weapon_palette
  4946. {
  4947.     struct halo_scnr_object_palette weap;
  4948. };
  4949.  
  4950. struct halo_scnr_r17_device_groups
  4951. {
  4952.     char name[32];
  4953.     float initial_value;
  4954.     struct halo_scnr_device_group_flags_bf flags_bf;
  4955.     uint8_t pad_1[12];
  4956. };
  4957.  
  4958. struct halo_scnr_r18_machines
  4959. {
  4960.     struct halo_scnr_obje obje;
  4961.     struct halo_scnr_devi devi;
  4962.     struct halo_scnr_machine_flags_bf flags_bf;
  4963.     uint8_t pad_1[12];
  4964. };
  4965.  
  4966. struct halo_scnr_r19_machine_palette
  4967. {
  4968.     struct halo_scnr_object_palette mach;
  4969. };
  4970.  
  4971. struct halo_scnr_r20_controls
  4972. {
  4973.     struct halo_scnr_obje obje;
  4974.     struct halo_scnr_devi devi;
  4975.     struct halo_scnr_control_flags_bf flags_bf;
  4976.     int16_t do_not_touch_this;   // a sapien-used value
  4977.     uint8_t pad_1[10];
  4978. };
  4979.  
  4980. struct halo_scnr_r21_control_palette
  4981. {
  4982.     struct halo_scnr_object_palette ctrl;
  4983. };
  4984.  
  4985. struct halo_scnr_r22_light_fixtures
  4986. {
  4987.     struct halo_scnr_obje obje;
  4988.     struct halo_scnr_devi devi;
  4989.     struct halo_colorfloat_rgb color;
  4990.     float intensity;
  4991.     float falloff_angle_rad;
  4992.     float cutoff_angle_rad;
  4993.     uint8_t pad_1[16];
  4994. };
  4995.  
  4996. struct halo_scnr_r23_light_fixtures_palette
  4997. {
  4998.     struct halo_scnr_object_palette lifi;
  4999. };
  5000.  
  5001. struct halo_scnr_r24_sound_scenery
  5002. {
  5003.     struct halo_scnr_obje obje;
  5004.     uint8_t pad_1[8];
  5005. };
  5006.  
  5007. struct halo_scnr_r25_sound_scenery_palette
  5008. {
  5009.     struct halo_scnr_object_palette ssce;
  5010. };
  5011.  
  5012. struct halo_scnr_r26_player_starting_profile
  5013. {
  5014.     char name[32];
  5015.     float starting_health_modifier_frac;
  5016.     float starting_shield_modifier_frac;
  5017.     struct halo_dependency d1_primary_weapon;   // weap
  5018.     int16_t primary_weapon_rounds_loaded;
  5019.     int16_t primary_weapon_rounds_total;
  5020.     struct halo_dependency d2_secondary_weapon; // weap
  5021.     int16_t secondary_weapon_rounds_loaded;
  5022.     int16_t secondary_weapon_rounds_total;
  5023.     int8_t starting_fragmentation_grenade_count;
  5024.     int8_t starting_plasma_grenade_count;
  5025.     int8_t starting_unknown1_grenade_count;
  5026.     int8_t starting_unknown2_grenade_count;
  5027.     uint8_t pad_1[20];
  5028. };
  5029.  
  5030. struct halo_scnr_gametypes_quad
  5031. {
  5032.     enum halo_gametypes type_0_list;
  5033.     enum halo_gametypes type_1_list;
  5034.     enum halo_gametypes type_2_list;
  5035.     enum halo_gametypes type_3_list;
  5036. };
  5037.  
  5038. struct halo_scnr_r_player_starting_locations
  5039. {
  5040.     struct halo_scnr_instance_orientation_2d orientation;
  5041.     int16_t team_index;
  5042.     int16_t bsp_index;
  5043.     struct halo_scnr_gametypes_quad gametypes;
  5044.     uint8_t pad_1[24];
  5045. };
  5046.  
  5047. struct halo_scnr_r28_trigger_volumes
  5048. {
  5049.     int32_t unknown_1_le;
  5050.     char name[32];
  5051.     uint8_t pad_1[12];
  5052.     float unknown_1;
  5053.     uint8_t pad_2[8];
  5054.     float unknown_2_rad;
  5055.     float unknown_3_rad;
  5056.     float unknown_4;
  5057.     float unknown_5;
  5058.     float unknown_6;
  5059.     float unknown_7;
  5060.     float unknown_8;
  5061.     float unknown_9;
  5062.     float unknown_10;
  5063. };
  5064.  
  5065. struct halo_scnr_r29_recorded_animations
  5066. {
  5067.     char name[32];
  5068.     int8_t version;
  5069.     int8_t raw_animation_data;
  5070.     int8_t unit_control_data_version;
  5071.     uint8_t pad_1[1];
  5072.     int16_t length_of_animation;
  5073.     uint8_t pad_2[6];
  5074.     struct halo_data recorded_animation_event_stream;   // 0x9842A100
  5075. };
  5076.  
  5077. struct halo_scnr_r30_netgame_flags
  5078. {
  5079.     struct halo_scnr_instance_orientation_2d orientation;
  5080.     enum halo_netgame_flag_types type_list;
  5081.     int16_t team_index;
  5082.     struct halo_dependency d1_weapon_group; // itmc
  5083.     uint8_t pad_1[112];
  5084. };
  5085.  
  5086. struct halo_scnr_r31_netgame_equipment
  5087. {
  5088.     struct halo_scnr_netgame_equipment_flags_bf flags_bf;
  5089.     struct halo_scnr_gametypes_quad gametypes;
  5090.     int16_t team_index;
  5091.     int16_t spawn_time;
  5092.     uint8_t pad_1[48];
  5093.     struct halo_scnr_instance_orientation_2d orientation;
  5094.     struct halo_dependency d1_item_collection;  // itmc
  5095.     uint8_t pad_2[48];
  5096. };
  5097.  
  5098. struct halo_scnr_r32_starting_equipment
  5099. {
  5100.     struct halo_scnr_starting_equipment_flags_bf flags_bf;
  5101.     struct halo_scnr_gametypes_quad gametypes;
  5102.     uint8_t pad_1[48];
  5103.     struct halo_dependency d1_item_collection_1;    // itmc
  5104.     struct halo_dependency d2_item_collection_2;    // itmc
  5105.     struct halo_dependency d3_item_collection_3;    // itmc
  5106.     struct halo_dependency d4_item_collection_4;    // itmc
  5107.     struct halo_dependency d5_item_collection_5;    // itmc
  5108.     struct halo_dependency d6_item_collection_6;    // itmc
  5109.     uint8_t pad_2[48];
  5110. };
  5111.  
  5112. struct halo_scnr_r33_bsp_switch_trigger_volumes
  5113. {
  5114.     int16_t trigger_volume_sel;
  5115.     int16_t source;
  5116.     int16_t destination;
  5117.     uint8_t pad_1[2];
  5118. };
  5119.  
  5120. struct halo_scnr_r34_decals
  5121. {
  5122.     int16_t decal_type_sel;
  5123.     int8_t yaw;
  5124.     int8_t pitch;
  5125.     struct halo_point_3d position;
  5126. };
  5127.  
  5128. struct halo_scnr_r35_decal_palette
  5129. {
  5130.     struct halo_dependency d1_reference;    // deca
  5131. };
  5132.  
  5133. struct halo_scnr_r36_detail_object_collection_palette
  5134. {
  5135.     struct halo_scnr_object_palette dobc;
  5136. };
  5137.  
  5138. struct halo_scnr_r37_actor_palette
  5139. {
  5140.     struct halo_dependency d1_reference;    // actv
  5141. };
  5142.  
  5143. struct halo_scnr_r38_encounters
  5144. {
  5145.     char name[32];
  5146.     struct halo_scnr_encounter_flags_bf flags_bf;
  5147.     enum halo_team_indices team_index_list;
  5148.     int16_t unknown_1_le;
  5149.     enum halo_search_behaviors search_behavior_list;
  5150.     int16_t manual_bsp_index;
  5151.     struct halo_ranged_float respawn_delay;
  5152.     uint8_t pad_1[74];
  5153.     int16_t unknown_2_le;
  5154.     struct halo_array r1_squads;    // maximum of 64 cells 0x543EA100
  5155.     struct halo_array r2_platoons;  // maximum of 32 cells 0x203CA100
  5156.     struct halo_array r3_firing_positions;  // maximum of 512 cells 0x003BA100
  5157.     struct halo_array r4_player_starting_locations; // maximum of 256 cells 0x90C29C00
  5158. };
  5159.  
  5160. struct halo_scnr_r38_r1_squads
  5161. {
  5162.     char name[32];
  5163.     int16_t actor_type_sel;
  5164.     int16_t platoon_sel;
  5165.     enum halo_ai_states initial_state_list;
  5166.     enum halo_ai_states return_state_list;
  5167.     struct halo_scnr_encounter_squad_flags_bf flags_bf;
  5168.     enum halo_ai_squad_leaders unique_leader_type_list;
  5169.     uint8_t pad_1[32];
  5170.     int16_t maneuver_to_squad_sel;
  5171.     float squad_delay_time;
  5172.     struct halo_scnr_encounter_squad_firing_position_group_indices_bf attacking_bf;
  5173.     struct halo_scnr_encounter_squad_firing_position_group_indices_bf attacking_search_bf;
  5174.     struct halo_scnr_encounter_squad_firing_position_group_indices_bf attacking_guard_bf;
  5175.     struct halo_scnr_encounter_squad_firing_position_group_indices_bf defending_bf;
  5176.     struct halo_scnr_encounter_squad_firing_position_group_indices_bf defending_search_bf;
  5177.     struct halo_scnr_encounter_squad_firing_position_group_indices_bf defending_guard_bf;
  5178.     struct halo_scnr_encounter_squad_firing_position_group_indices_bf pursuing_bf;
  5179.     uint8_t pad_2[12];
  5180.     int16_t normal_difficulty_count;
  5181.     int16_t insane_difficulty_count;
  5182.     enum halo_ai_major_upgrades major_upgrade_list;
  5183.     uint8_t pad_3[2];
  5184.     int16_t respawn_minimum_actors;
  5185.     int16_t respawn_maximum_actors;
  5186.     int16_t respawn_total;
  5187.     uint8_t pad_4[2];
  5188.     struct halo_ranged_float respawn_delay;
  5189.     uint8_t pad_5[48];
  5190.     struct halo_array r1_move_positions;    // maximum of 32 cells 0x983AA100
  5191.     struct halo_array r2_starting_locations;    // maximum of 32 cells 0xF039A100
  5192.     uint8_t pad_6[12];
  5193. };
  5194.  
  5195. struct halo_scnr_r38_r1_r1_move_positions
  5196. {
  5197.     struct halo_scnr_instance_orientation_2d orientation;
  5198.     float weight;
  5199.     struct halo_ranged_float time;
  5200.     int16_t animation_sel;
  5201.     int8_t sequence_id;
  5202.     uint8_t pad_1[45];
  5203.     int32_t surface_index;
  5204. };
  5205.  
  5206. struct halo_scnr_r38_r1_r2_starting_locations
  5207. {
  5208.     struct halo_scnr_instance_orientation_2d orientation;
  5209.     int16_t unknown_le;
  5210.     int8_t sequence_id;
  5211.     struct halo_scnr_encounter_squad_starting_location_flags_bf flags_bf;
  5212.     enum halo_ai_states return_state_list;
  5213.     enum halo_ai_states initial_state_list;
  5214.     int16_t actor_type_sel;
  5215.     int16_t command_list_sel;
  5216. };
  5217.  
  5218. struct halo_scnr_r38_r2_platoons
  5219. {
  5220.     char name[32];
  5221.     struct halo_scnr_encounter_platoon_flags_bf flags_bf;
  5222.     uint8_t pad_1[12];
  5223.     enum halo_ai_platoon_behavior_alteration_conditions change_attacking_defending_state_when_list;
  5224.     int16_t change_state_happens_to_sel;
  5225.     uint8_t pad_2[8];
  5226.     enum halo_ai_platoon_behavior_alteration_conditions maneuver_when_list;
  5227.     int16_t maneuver_happens_to_sel;
  5228.     uint8_t pad_3[108];
  5229. };
  5230.  
  5231. struct halo_scnr_r38_r3_firing_positions
  5232. {
  5233.     struct halo_point_3d position;
  5234.     enum halo_scnr_firing_position_groups group_index_list;
  5235.     int16_t unknown_1_le;
  5236.     uint8_t pad_1[4];
  5237.     int32_t unknown_2_be;
  5238. };
  5239.  
  5240. struct halo_scnr_r39_command_lists
  5241. {
  5242.     char name[32];
  5243.     struct halo_scnr_command_list_flags_bf flags_bf;
  5244.     uint8_t pad_1[8];
  5245.     int16_t manual_bsp_index;
  5246.     int16_t unknown_sel_le; // check endianness
  5247.     struct halo_array r1_commands;  // maximum of 64 cells 0xB438A100
  5248.     struct halo_array r2_points;    // maximum of 64 cells 0xE036A100
  5249.     uint8_t pad_2[24];
  5250. };
  5251.  
  5252. struct halo_scnr_r39_r1_commands
  5253. {
  5254.     enum halo_ai_command_atom_types atom_type_list;
  5255.     int16_t atom_modifier;
  5256.     float parameter_1;
  5257.     float parameter_2;
  5258.     int16_t point_1_sel;
  5259.     int16_t point_2_sel;
  5260.     int16_t animation_sel;
  5261.     int16_t script_sel;
  5262.     int16_t recording_sel;
  5263.     int16_t command_sel;
  5264.     int16_t object_name_sel;
  5265.     uint8_t pad_1[6];
  5266. };
  5267.  
  5268. struct halo_scnr_r39_r2_points
  5269. {
  5270.     struct halo_point_3d position;
  5271.     uint8_t pad_1[8];
  5272. };
  5273.  
  5274. struct halo_scnr_r40_ai_animation_references
  5275. {
  5276.     char animation_name[32];
  5277.     struct halo_dependency d1_animation_graph;  // antr
  5278.     uint8_t pad_1[12];
  5279. };
  5280.  
  5281. struct halo_scnr_r41_ai_script_references
  5282. {
  5283.     char script_name[32];
  5284.     uint8_t pad_1[8];
  5285. };
  5286.  
  5287. struct halo_scnr_r42_ai_recording_references
  5288. {
  5289.     char recording_name[32];
  5290.     uint8_t pad_1[8];
  5291. };
  5292.  
  5293. struct halo_scnr_r43_ai_conversations
  5294. {
  5295.     char name[32];
  5296.     uint8_t pad_1[1];
  5297.     struct halo_scnr_ai_conversation_flags_bf flags_bf;
  5298.     uint8_t pad_2[2];
  5299.     float trigger_distance;
  5300.     float run_to_player_distance;
  5301.     uint8_t pad_3[36];
  5302.     struct halo_array r1_participants;  // maximum of 8 cells 0xE840A100
  5303.     struct halo_array r2_lines; // maximum of 32 cells 0xC041A100
  5304.     uint8_t pad_4[12];
  5305. };
  5306.  
  5307. struct halo_scnr_r43_r1_participants
  5308. {
  5309.     uint8_t pad_1[3];
  5310.     struct halo_scnr_ai_conversation_participant_flags_bf flags_bf;
  5311.     enum halo_ai_conversation_participant_selection_types selection_type_list;
  5312.     enum halo_actor_types actor_type_list;
  5313.     int16_t use_this_object_sel;
  5314.     int16_t set_new_name_sel;
  5315.     uint8_t pad_2[12];
  5316.     int16_t unknown_1_sel_le;
  5317.     int16_t unknown_2_sel_le;
  5318.     int16_t unknown_3_sel_le;
  5319.     int16_t unknown_4_sel_le;
  5320.     int16_t unknown_5_sel_le;
  5321.     int16_t unknown_6_sel_le;
  5322.     char encounter_name[32];
  5323.     int32_t unknown_7_le;
  5324.     uint8_t pad_3[12];
  5325. };
  5326.  
  5327. struct halo_scnr_r43_r2_lines
  5328. {
  5329.     uint8_t pad_1[1];
  5330.     struct halo_scnr_ai_conversation_line_flags_bf flags_bf;
  5331.     int16_t participant_sel;
  5332.     enum halo_ai_conversation_lines_character_types addressee_list;
  5333.     int16_t addressee_participant_sel;
  5334.     uint8_t pad_2[4];
  5335.     float line_delay_time;
  5336.     uint8_t pad_3[12];
  5337.     struct halo_dependency d1_variant_1;    // snd!
  5338.     struct halo_dependency d2_variant_2;    // snd!
  5339.     struct halo_dependency d3_variant_3;    // snd!
  5340.     struct halo_dependency d4_variant_4;    // snd!
  5341.     struct halo_dependency d5_variant_5;    // snd!
  5342.     struct halo_dependency d6_variant_6;    // snd!
  5343. };
  5344.  
  5345. struct halo_scnr_r44_scripts
  5346. {
  5347.     char name[32];
  5348.     enum halo_script_types script_type_list;
  5349.     enum halo_script_return_types return_type_list;
  5350.     int32_t root_expression_index;
  5351.     uint8_t pad_1[52];
  5352. };
  5353.  
  5354. struct halo_scnr_r45_globals
  5355. {
  5356.     char name[32];
  5357.     enum halo_script_return_types type_list;
  5358.     uint8_t pad_1[6];
  5359.     int32_t initialization_expression_index;
  5360.     uint8_t pad_2[48];
  5361. };
  5362.  
  5363. struct halo_scnr_r46_references
  5364. {
  5365.     uint8_t pad_1[24];
  5366.     struct halo_dependency d1_reference;    // (any tag type)
  5367. };
  5368.  
  5369. struct halo_scnr_r47_source_files
  5370. {
  5371.     char name[32];
  5372.     struct halo_data source;    // 0xB431A100
  5373. };
  5374.  
  5375. struct halo_scnr_r48_cutscene_flags
  5376. {
  5377.     uint8_t pad_1[4];
  5378.     char name[32];
  5379.     struct halo_point_3d position;
  5380.     struct halo_angle_2d facing_rad;
  5381.     uint8_t pad_2[36];
  5382. };
  5383.  
  5384. struct halo_scnr_r49_cutscene_camera_points
  5385. {
  5386.     uint8_t pad_1[4];
  5387.     char name[32];
  5388.     uint8_t pad_2[4];
  5389.     struct halo_scnr_instance_orientation_3d orientation;
  5390.     float field_of_view_rad;
  5391.     uint8_t pad_3[36];
  5392. };
  5393.  
  5394. struct halo_scnr_r50_cutscene_titles
  5395. {
  5396.     uint8_t pad_1[4];
  5397.     char name[32];
  5398.     uint8_t pad_2[4];
  5399.     struct halo_rectangle_2d text_bounds_on_screen;
  5400.     int16_t string_index;
  5401.     uint8_t pad_3[2];
  5402.     enum halo_justifications justification_list;
  5403.     uint8_t pad_4[6];
  5404.     struct halo_colorbyte_argb text_color;
  5405.     struct halo_colorbyte_argb shadow_color;
  5406.     float fade_in_time;
  5407.     float up_time;
  5408.     float fade_out_time;
  5409.     uint8_t pad_5[16];
  5410. };
  5411.  
  5412. struct halo_scnr_r51_structure_bsps
  5413. {
  5414.     int32_t unknown_1_le;
  5415.     int32_t unknown_2_le;
  5416.     int32_t unknown_3_le;
  5417.     uint8_t pad_1[4];
  5418.     struct halo_dependency d1_structure_bsp;    // sbsp
  5419. };
  5420.  
  5421. #pragma mark senv
  5422.  
  5423. struct halo_senv_section_environment_shader
  5424. {
  5425.     struct halo_senv_flags_bf environment_shader_flags_bf;
  5426. };
  5427.  
  5428. struct halo_senv_section_environment_shader_type
  5429. {
  5430.     enum halo_shader_diffuse_map_combinations type_list;
  5431. };
  5432.  
  5433. struct halo_senv_section_diffuse_properties
  5434. {
  5435.     uint8_t pad_1[1];
  5436.     struct halo_senv_diffuse_flags_bf flags_bf;
  5437.     uint8_t pad_2[26];
  5438.     struct halo_dependency d1_base_map; // bitm
  5439.     float unknown_1_le; // base map texture origin x?
  5440.     float unknown_2_le; // base map texture origin y?
  5441.     uint8_t pad_3[16];
  5442.     enum halo_shader_map_functions detail_map_function_list;
  5443.     uint8_t pad_4[2];
  5444.     struct halo_shader_scaled_map primary_detail_map;
  5445.     struct halo_shader_scaled_map secondary_detail_map;
  5446.     float unknown_3_le; // detail maps origin x?
  5447.     float unknown_4_le; // detail maps origin y?
  5448.     uint8_t pad_5[16];
  5449.     enum halo_shader_map_functions micro_detail_map_function_list;
  5450.     uint8_t pad_6[2];
  5451.     struct halo_shader_scaled_map micro_detail_map;
  5452.     struct halo_colorfloat_rgb material_color;
  5453. };
  5454.  
  5455. struct halo_senv_section_bump_properties
  5456. {
  5457.     struct halo_shader_scaled_map bump_map;
  5458.     float unknown_1_le; // bump map origin x?
  5459.     float unknown_2_le; // bump map origin y?
  5460. };
  5461.  
  5462. struct halo_senv_texture_animations
  5463. {
  5464.     enum halo_function_behaviors function_list;
  5465.     uint8_t pad_1[2];
  5466.     float period;
  5467.     float scale;
  5468. };
  5469.  
  5470. struct halo_senv_section_texture_scrolling_animation
  5471. {
  5472.     struct halo_senv_texture_animations u_animation;
  5473.     struct halo_senv_texture_animations v_animation;
  5474. };
  5475.  
  5476. struct halo_senv_self_illumination_effects
  5477. {
  5478.     struct halo_colorfloat_rgb on_color;
  5479.     struct halo_colorfloat_rgb off_color;
  5480.     struct halo_periodic_functions animation;
  5481. };
  5482.  
  5483. struct halo_senv_section_self_illumination_properties
  5484. {
  5485.     uint8_t pad_1[1];
  5486.     struct halo_map_flags_bf flags_bf;
  5487.     uint8_t pad_2[26];
  5488.     struct halo_senv_self_illumination_effects primary;
  5489.     uint8_t pad_3[24];
  5490.     struct halo_senv_self_illumination_effects secondary;
  5491.     uint8_t pad_4[24];
  5492.     struct halo_senv_self_illumination_effects plasma;
  5493.     uint8_t pad_5[24];
  5494.     struct halo_shader_scaled_map scaled_map;
  5495. };
  5496.  
  5497. struct halo_senv_section_specular_properties
  5498. {
  5499.     uint8_t pad_1[1];
  5500.     struct halo_senv_specular_flags_bf flags_bf;
  5501.     uint8_t pad_2[18];
  5502.     float brightness_frac;
  5503.     uint8_t pad_3[20];
  5504.     struct halo_colorfloat_rgb perpendicular_color;
  5505.     struct halo_colorfloat_rgb parallel_color;
  5506. };
  5507.  
  5508. struct halo_senv_section_reflection_properties
  5509. {
  5510.     uint8_t pad_1[1];
  5511.     struct halo_senv_reflection_flags_bf flags_bf;
  5512.     enum halo_shader_cube_map_reflection_types type_list;
  5513.     float lightmap_brightness_scale_frac;
  5514.     uint8_t pad_2[28];
  5515.     float perpendicular_brightness_frac;
  5516.     float parallel_brightness_frac;
  5517.     uint8_t pad_3[40];
  5518.     struct halo_dependency d1_reflection_cube_map;  // bitm
  5519. };
  5520.  
  5521. struct halo_senv
  5522. {
  5523.     struct halo_shdr shdr;
  5524.     uint8_t pad_1[1];
  5525.     struct halo_senv_section_environment_shader environment_shader;
  5526.     struct halo_senv_section_environment_shader_type environment_shader_type;
  5527.     struct halo_shader_section_lens_flares lens_flares;
  5528.     uint8_t pad_2[44];
  5529.     struct halo_senv_section_diffuse_properties diffuse_properites;
  5530.     uint8_t pad_3[12];
  5531.     struct halo_senv_section_bump_properties bump_properties;
  5532.     uint8_t pad_4[16];
  5533.     struct halo_senv_section_texture_scrolling_animation texture_scrolling_animation;
  5534.     uint8_t pad_5[24];  // this might have two floats at the start
  5535.     struct halo_senv_section_self_illumination_properties self_illumination_properties;
  5536.     uint8_t pad_6[24];
  5537.     struct halo_senv_section_specular_properties specular_properties;
  5538.     uint8_t pad_7[16];
  5539.     struct halo_senv_section_reflection_properties reflection_properties;
  5540.     uint8_t pad_8[16];  // might contain two floats at start
  5541. };
  5542.  
  5543. #pragma mark sgla
  5544.  
  5545. struct halo_sgla_section_glass_shader
  5546. {
  5547.     uint8_t pad_1[1];
  5548.     struct halo_sgla_glass_flags_bf flags_bf;
  5549. };
  5550.  
  5551. struct halo_sgla_section_background_tint_properties
  5552. {
  5553.     struct halo_colorfloat_rgb background_tint_color;
  5554.     struct halo_shader_scaled_map background_tint_map;
  5555. };
  5556.  
  5557. struct halo_sgla_section_reflection_properties
  5558. {
  5559.     enum halo_shader_reflection_map_reflection_types reflection_type_list;
  5560.     struct halo_shader_directional_light directional_light;
  5561.     struct halo_dependency d1_reflection_map;   // bitm
  5562.     struct halo_shader_scaled_map bump_map;
  5563. };
  5564.  
  5565. struct halo_sgla_section_diffuse_properties
  5566. {
  5567.     struct halo_shader_scaled_map diffuse_map;
  5568.     struct halo_shader_scaled_map diffuse_detail_map;
  5569. };
  5570.  
  5571. struct halo_sgla_section_specular_properties
  5572. {
  5573.     struct halo_shader_scaled_map specular_map;
  5574.     struct halo_shader_scaled_map specular_detail_map;
  5575. };
  5576.  
  5577. struct halo_sgla
  5578. {
  5579.     struct halo_shdr shdr;
  5580.     struct halo_sgla_section_glass_shader glass_shader;
  5581.     uint8_t pad_1[42];
  5582.     struct halo_sgla_section_background_tint_properties background_tint_properties;
  5583.     uint8_t pad_2[22];
  5584.     struct halo_sgla_section_reflection_properties reflection_properites;
  5585.     uint8_t pad_3[132];
  5586.     struct halo_sgla_section_diffuse_properties diffuse_properties;
  5587.     uint8_t pad_4[32];
  5588.     struct halo_sgla_section_specular_properties specular_properties;
  5589.     uint8_t pad_5[28];
  5590. };
  5591.  
  5592. #pragma mark sky
  5593.  
  5594. struct halo_sky_fog
  5595. {
  5596.     struct halo_colorfloat_rgb color;
  5597.     uint8_t pad_1[8];
  5598.     float maximum_density_frac;
  5599.     float start_distance;
  5600.     float opaque_distance;
  5601. };
  5602.  
  5603. struct halo_sky
  5604. {
  5605.     struct halo_dependency d1_model;    // mod2
  5606.     struct halo_dependency d2_animation_graph;  // antr
  5607.     uint8_t pad_1[24];
  5608.     struct halo_colorfloat_rgb indoor_ambient_radiosity_color;
  5609.     float indoor_ambient_radiosity_power;
  5610.     struct halo_colorfloat_rgb outdoor_ambient_radiosity_color;
  5611.     float outdoor_ambient_radiosity_power;
  5612.     struct halo_sky_fog outdoor_fog;
  5613.     struct halo_sky_fog indoor_fog;
  5614.     struct halo_dependency d3_indoor_fog_screen;    // fog
  5615.     uint8_t pad_2[4];
  5616.     struct halo_array r1_shader_functions;  // maximum of 8 cells 0xA4879C00
  5617.     struct halo_array r2_animations;    // maximum of 8 cells 0x0C889C00
  5618.     struct halo_array r3_lights;    // maximum of 8 cells 0xF4889C00
  5619. };
  5620.  
  5621. struct halo_sky_r1_shader_functions
  5622. {
  5623.     uint8_t pad_1[4];
  5624.     char global_function_name[32];
  5625. };
  5626.  
  5627. struct halo_sky_r2_animations
  5628. {
  5629.     int16_t animation_index;
  5630.     uint8_t pad_1[2];
  5631.     float period;
  5632.     uint8_t pad_2[28];
  5633. };
  5634.  
  5635. struct halo_sky_r3_lights_section_lens_flare
  5636. {
  5637.     struct halo_dependency d1_lens_flare;   // lens
  5638.     char lens_flare_marker_name[32];
  5639. };
  5640.  
  5641. struct halo_sky_r3_lights_section_radiosity
  5642. {
  5643.     struct halo_sky_radiosity_flags_bf flags_bf;
  5644.     struct halo_colorfloat_rgb color;
  5645.     float power;
  5646.     float test_distance;
  5647.     uint8_t pad_1[4];
  5648.     struct halo_angle_2d direction_rad;
  5649.     float diameter_rad;
  5650. };
  5651.  
  5652. struct halo_sky_r3_lights
  5653. {
  5654.     struct halo_sky_r3_lights_section_lens_flare lens_flare;
  5655.     uint8_t pad_1[28];
  5656.     struct halo_sky_r3_lights_section_radiosity radiosity;
  5657. };
  5658.  
  5659. #pragma mark smet
  5660.  
  5661. struct halo_smet_section_meter_shader
  5662. {
  5663.     uint8_t pad_1[1];
  5664.     struct halo_smet_flags_bf flags_bf;
  5665.     uint8_t pad_2[34];
  5666.     struct halo_dependency d1_map;  // bitm
  5667. };
  5668.  
  5669. struct halo_smet_section_colors
  5670. {
  5671.     struct halo_colorfloat_rgb gradient_minimum_color;
  5672.     struct halo_colorfloat_rgb gradient_maximum_color;
  5673.     struct halo_colorfloat_rgb background_color;
  5674.     struct halo_colorfloat_rgb flash_color;
  5675.     struct halo_colorfloat_rgb tint_color;
  5676.     float meter_transparency_frac;
  5677.     float background_transparency_frac;
  5678. };
  5679.  
  5680. struct halo_smet_section_external_function_sources
  5681. {
  5682.     enum halo_function_out_channels meter_brightness_source_list;
  5683.     enum halo_function_out_channels flash_brightness_source_list;
  5684.     enum halo_function_out_channels value_source_list;
  5685.     enum halo_function_out_channels gradient_source_list;
  5686.     enum halo_function_out_channels flash_extension_source_list;
  5687. };
  5688.  
  5689. struct halo_smet
  5690. {
  5691.     struct halo_shdr shdr;
  5692.     struct halo_smet_section_meter_shader meter_shader;
  5693.     uint8_t pad_1[32];
  5694.     struct halo_smet_section_colors colors;
  5695.     uint8_t pad_2[24];
  5696.     struct halo_smet_section_external_function_sources external_function_sources;
  5697.     uint8_t pad_3[34];
  5698. };
  5699.  
  5700. #pragma mark snd!
  5701.  
  5702. struct halo_snd_section_randomization
  5703. {
  5704.     struct halo_ranged_float random_pitch_bounds;
  5705.     float inner_cone_angle_rad;
  5706.     float outer_cone_angle_rad;
  5707.     float outer_cone_gain_frac;
  5708.     float gain_modifier;
  5709.     float maximum_bend_per_second;
  5710. };
  5711.  
  5712. struct halo_snd_section_when_scale_is_zero
  5713. {
  5714.     float skip_fraction_modifier;
  5715.     float gain_modifier;
  5716.     float pitch_modifier;
  5717. };
  5718.  
  5719. struct halo_snd_section_when_scale_is_one
  5720. {
  5721.     float skip_fraction_modifier;
  5722.     float gain_modifier;
  5723.     float pitch_modifier;
  5724. };
  5725.  
  5726. struct halo_snd_section_import_properties
  5727. {
  5728.     enum halo_sound_channel_encodings encoding_list;
  5729.     enum halo_sound_compression_formats compression_list;
  5730.     struct halo_dependency d1_promotion_sound;  // snd!
  5731.     int16_t promotion_count;
  5732. };
  5733.  
  5734. struct halo_snd
  5735. {
  5736.     struct halo_snd_flags_bf flags_bf;
  5737.     enum halo_sound_classes class_list;
  5738.     enum halo_sound_sample_rates sample_rate_list;
  5739.     float minimum_distance;
  5740.     float maximum_distance;
  5741.     float skip_fraction_frac;
  5742.     struct halo_snd_section_randomization randomization;
  5743.     uint8_t pad_1[12];
  5744.     struct halo_snd_section_when_scale_is_zero when_scale_is_zero;
  5745.     uint8_t pad_2[12];
  5746.     struct halo_snd_section_when_scale_is_one when_scale_is_one;
  5747.     uint8_t pad_3[12];
  5748.     struct halo_snd_section_import_properties import_properties;
  5749.     uint8_t pad_4[22];
  5750.     struct halo_array r1_pitch_ranges;  // maximum of 8 cells 0xA4939B00
  5751. };
  5752.  
  5753. struct halo_snd_r1_pitch_ranges_section_pitch_control
  5754. {
  5755.     float natural_pitch;
  5756.     struct halo_ranged_float bend_bounds;
  5757.     uint16_t actual_permutation_count;
  5758.     uint8_t pad_1[14];
  5759.     struct halo_array r1_permutations;  // maximum of 256 cells 0x08939B00
  5760. };
  5761.  
  5762. struct halo_snd_r1_pitch_ranges
  5763. {
  5764.     char name[32];
  5765.     struct halo_snd_r1_pitch_ranges_section_pitch_control pitch_control;
  5766. };
  5767.  
  5768. struct halo_snd_r1_r1_permutations
  5769. {
  5770.     char name[32];
  5771.     float skip_fraction_frac;
  5772.     float gain_frac;
  5773.     enum halo_sound_compression_formats compression_list;
  5774.     int16_t next_permutation_index;
  5775.     uint8_t pad_1[20];
  5776.     struct halo_data samples;   // 0x60929B00
  5777.     struct halo_data mouth_data;    // 0x70929B00
  5778.     struct halo_data subtitle_data; // 0x80929B00
  5779. };
  5780.  
  5781. #pragma mark snde
  5782. struct halo_snde
  5783. {
  5784.     uint8_t pad_1[4];
  5785.     int16_t priority;
  5786.     uint8_t pad_2[2];
  5787.     float room_intensity_frac;
  5788.     float room_intensity_high_frequency_frac;
  5789.     float room_rolloff;
  5790.     float decay_time;
  5791.     float decay_high_frequency_ratio;
  5792.     float reflections_intensity_frac;
  5793.     float reflections_delay;
  5794.     float reverb_intensity_frac;
  5795.     float reverb_delay;
  5796.     float diffusion;
  5797.     float density;
  5798.     float high_frequency_reference;
  5799.     uint8_t pad_3[16];
  5800. };
  5801.  
  5802. #pragma mark soso
  5803.  
  5804. struct halo_soso_section_model_shader
  5805. {
  5806.     uint8_t pad_1[1];
  5807.     struct halo_soso_shader_bf flags_bf;
  5808.     uint8_t pad_2[14];
  5809.     float translucency_frac;
  5810. };
  5811.  
  5812. struct halo_soso_section_change_color
  5813. {
  5814.     enum halo_function_channel_types change_color_source_list;
  5815. };
  5816.  
  5817. struct halo_soso_section_self_illumination
  5818. {
  5819.     uint8_t pad_1[1];
  5820.     struct halo_soso_self_illumination_flags_bf flags_bf;
  5821.     uint8_t pad_2[2];
  5822.     enum halo_function_channel_types color_source_list;
  5823.     enum halo_function_behaviors animation_function_list;
  5824.     float animation_period;
  5825.     struct halo_ranged_colorfloat_rgb animation_color;
  5826. };
  5827.  
  5828. struct halo_soso_section_maps
  5829. {
  5830.     struct halo_texture_map_axes map_scale;
  5831.     struct halo_dependency d1_base_map; // bitm
  5832.     uint8_t pad_1[8];
  5833.     struct halo_dependency d2_multipurpose_map; // bitm
  5834.     uint8_t pad_2[8];
  5835.     enum halo_shader_map_functions detail_function_list;
  5836.     enum halo_shader_detail_map_masking detail_mask_list;
  5837.     struct halo_shader_scaled_map detail_map;
  5838.     float detail_map_v_scale;   // no "u scale" since this is "applied on top of detail map scale"
  5839. };
  5840.  
  5841. struct halo_soso_section_texture_scrolling_animation
  5842. {
  5843.     struct halo_2d_texture_animation texture_animation;
  5844. };
  5845.  
  5846. struct halo_soso_section_reflection_properties
  5847. {
  5848.     float reflection_falloff_distance;
  5849.     float reflection_cutoff_distance;
  5850.     struct halo_shader_directional_light directional_light;
  5851.     struct halo_dependency d1_reflection_cube_map;  // bitm
  5852. };
  5853.  
  5854. struct halo_soso
  5855. {
  5856.     struct halo_shdr shdr;
  5857.     struct halo_soso_section_model_shader model_shader;
  5858.     uint8_t pad_1[16];
  5859.     struct halo_soso_section_change_color change_color;
  5860.     uint8_t pad_2[30];
  5861.     struct halo_soso_section_self_illumination self_illumination;
  5862.     uint8_t pad_3[12];
  5863.     struct halo_soso_section_maps maps;
  5864.     uint8_t pad_4[12];
  5865.     struct halo_soso_section_texture_scrolling_animation texture_scrolling_animation;
  5866.     uint8_t pad_5[8];
  5867.     struct halo_soso_section_reflection_properties reflection_properties;
  5868.     uint8_t pad_6[68];
  5869. };
  5870.  
  5871. #pragma mark sotr
  5872. struct halo_sotr
  5873. {
  5874.     struct halo_shdr shdr;
  5875.     struct halo_shader_transparency generic_transparent_shader;
  5876.     uint8_t pad_1[2];
  5877.     struct halo_shader_section_lens_flares lens_flares;
  5878.     struct halo_array r1_extra_layers;  // maximum of 4 cells 0x94A59C00
  5879.     struct halo_array r2_maps;  // maximum of 4 cells 0x1CA79C00
  5880.     struct halo_array r3_stages;    // maximum of 7 cells 0xE8AA9C00
  5881. };
  5882.  
  5883. struct halo_sotr_r2_maps
  5884. {
  5885.     uint8_t pad_1[1];
  5886.     struct halo_sotr_map_flags_bf flags_bf;
  5887.     uint8_t pad_2[2];
  5888.     struct halo_shader_map_orientation shader_map_orientation;
  5889.     struct halo_shader_section_2d_texture_animation _2d_texture_animation;
  5890. };
  5891.  
  5892. struct halo_sotr_r3_stages_section_constants_and_animation
  5893. {
  5894.     enum halo_function_channel_types color_0_source_list;
  5895.     enum halo_function_behaviors color_0_animation_function_list;
  5896.     float color_0_animation_period;
  5897.     struct halo_ranged_colorfloat_argb color_0_animation;
  5898.     struct halo_colorfloat_argb color_1;
  5899. };
  5900.  
  5901. struct halo_sotr_staged_color_input
  5902. {
  5903.     enum halo_shader_stage_channel_functions input_list;
  5904.     enum halo_shader_stage_channel_mapping_functions input_mapping_list;
  5905. };
  5906.  
  5907. struct halo_sotr_r3_stages_section_color_inputs
  5908. {
  5909.     struct halo_sotr_staged_color_input A;
  5910.     struct halo_sotr_staged_color_input B;
  5911.     struct halo_sotr_staged_color_input C;
  5912.     struct halo_sotr_staged_color_input D;
  5913. };
  5914.  
  5915. struct halo_sotr_staged_color_output
  5916. {
  5917.     enum halo_shader_stage_dual_channel_functions output_list;
  5918.     enum halo_shader_stage_dual_channel_function_calculations output_function;
  5919. };
  5920.  
  5921. struct halo_sotr_r3_stages_section_color_outputs
  5922. {
  5923.     struct halo_sotr_staged_color_output AB;
  5924.     struct halo_sotr_staged_color_output CD;
  5925.     enum halo_shader_stage_dual_channel_functions output_AB_CD_mux_sum_list;
  5926.     enum halo_shader_stage_dual_channel_mappings output_mapping_list;
  5927. };
  5928.  
  5929. struct halo_sotr_staged_alpha_input
  5930. {
  5931.     enum halo_shader_stage_channel_alpha_functions input_list;
  5932.     enum halo_shader_stage_channel_mapping_functions input_mapping_list;
  5933. };
  5934.  
  5935. struct halo_sotr_r3_stages_section_alpha_inputs
  5936. {
  5937.     struct halo_sotr_staged_alpha_input A;
  5938.     struct halo_sotr_staged_alpha_input B;
  5939.     struct halo_sotr_staged_alpha_input C;
  5940.     struct halo_sotr_staged_alpha_input D;
  5941. };
  5942.  
  5943. struct halo_sotr_r3_stages_section_alpha_outputs
  5944. {
  5945.     enum halo_shader_stage_dual_channel_alpha_functions output_AB_list;
  5946.     enum halo_shader_stage_dual_channel_alpha_functions output_CD_list;
  5947.     enum halo_shader_stage_dual_channel_alpha_functions output_AB_CD_mux_sum_list;
  5948.     enum halo_shader_stage_dual_channel_mappings output_mapping_list;
  5949. };
  5950.  
  5951. struct halo_sotr_r3_stages
  5952. {
  5953.     uint8_t pad_1[1];
  5954.     struct halo_sotr_stage_flags_bf flags_bf;
  5955.     uint8_t pad_2[2];
  5956.     struct halo_sotr_r3_stages_section_constants_and_animation constants_and_animation;
  5957.     struct halo_sotr_r3_stages_section_color_inputs color_inputs;
  5958.     struct halo_sotr_r3_stages_section_color_outputs color_outputs;
  5959.     struct halo_sotr_r3_stages_section_alpha_inputs alpha_inputs;
  5960.     struct halo_sotr_r3_stages_section_alpha_outputs alpha_outputs;
  5961. };
  5962.  
  5963. #pragma mark Soul
  5964. struct halo_Soul
  5965. {
  5966.     struct halo_array r1_ui_widget_definitions; // maximum of 32 cells 0xA0269C00
  5967. };
  5968.  
  5969. struct halo_Soul_r1_ui_widget_definitions
  5970. {
  5971.     struct halo_dependency d1_ui_widget_definition; // DeLa
  5972. };
  5973.  
  5974. #pragma mark spla
  5975.  
  5976. struct halo_spla_section_plasma_shader
  5977. {
  5978.    
  5979. };
  5980.  
  5981. struct halo_spla_section_intensity
  5982. {
  5983.     enum halo_function_out_channels intensity_source_list;
  5984.     uint8_t pad_1[2];
  5985.     float intensity_exponent;
  5986. };
  5987.  
  5988. struct halo_spla_section_offset
  5989. {
  5990.     enum halo_function_out_channels offset_source_list;
  5991.     uint8_t pad_1[2];
  5992.     float offset_amount;
  5993.     float offset_exponent;
  5994. };
  5995.  
  5996. struct halo_spla_section_color
  5997. {
  5998.     struct halo_shader_directional_light directional_light;
  5999.     enum halo_function_channel_types tint_color_source_list;
  6000. };
  6001.  
  6002. struct halo_spla_maps
  6003. {
  6004.     float animation_period;
  6005.     struct halo_vector_3d animation_direction;
  6006.     struct halo_shader_scaled_map noise_map;
  6007. };
  6008.  
  6009. struct halo_spla_section_primary_noise_map
  6010. {
  6011.     struct halo_spla_maps primary;
  6012. };
  6013.  
  6014. struct halo_spla_section_secondary_noise_map
  6015. {
  6016.     struct halo_spla_maps secondary;
  6017. };
  6018.  
  6019. struct halo_spla
  6020. {
  6021.     struct halo_shdr shdr;
  6022.     struct halo_spla_section_plasma_shader plasma_shader;
  6023.     uint8_t pad_1[4];
  6024.     struct halo_spla_section_intensity intensity;
  6025.     struct halo_spla_section_offset offset;
  6026.     uint8_t pad_2[32];
  6027.     struct halo_spla_section_color color;
  6028.     uint8_t pad_3[62];
  6029.     struct halo_spla_section_primary_noise_map primary_noise_map;
  6030.     uint8_t pad_4[36];
  6031.     struct halo_spla_section_secondary_noise_map secondary_noise_map;
  6032.     uint8_t pad_5[32];
  6033. };
  6034.  
  6035. #pragma mark ssce
  6036. struct halo_ssce
  6037. {
  6038.     struct halo_obje obje;
  6039.     uint8_t pad_1[128];
  6040. };
  6041.  
  6042. #pragma mark str#
  6043. struct halo_strn
  6044. {
  6045.     struct halo_array r1_string_references; // maximum of 800 cells 0xB4619D00
  6046. };
  6047.  
  6048. struct halo_strn_r1_string_references
  6049. {
  6050.     struct halo_data string;    // 0x8C619D00
  6051. };
  6052.  
  6053. #pragma mark swat
  6054.  
  6055. struct halo_swat_section_water_shader
  6056. {
  6057.     uint8_t pad_1[1];
  6058.     struct halo_swat_flags_bf flags_bf;
  6059.     uint8_t pad_2[34];
  6060.     struct halo_dependency d1_base_map; // bitm
  6061.     uint8_t pad_3[16];
  6062.     struct halo_shader_directional_light view_directional_light;
  6063.     uint8_t pad_4[16];
  6064.     struct halo_dependency d2_reflection_map;   // bitm
  6065.     uint8_t pad_5[16];
  6066.     float ripple_animation_angle_rad;
  6067.     float ripple_animation_velocity;
  6068.     float ripple_scale;
  6069.     struct halo_dependency d3_ripple_maps;  // bitm
  6070.     int16_t ripple_mipmap_levels;
  6071.     uint8_t pad_6[2];
  6072.     float ripple_mipmap_fade_factor_frac;
  6073.     float ripple_mipmap_detail_bias;
  6074.     uint8_t pad_7[64];
  6075.     struct halo_array r1_ripples;   // maximum of 4 cells 0x24B29C00
  6076. };
  6077.  
  6078. struct halo_swat
  6079. {
  6080.     struct halo_shdr shdr;
  6081.     struct halo_swat_section_water_shader water_shader;
  6082.     uint8_t pad_1[16];
  6083. };
  6084.  
  6085. struct halo_swat_r1_ripples
  6086. {
  6087.     uint8_t pad_1[4];
  6088.     float contribution_factor_frac;
  6089.     uint8_t pad_2[32];
  6090.     float animation_angle_rad;
  6091.     float animation_velocity;
  6092.     struct halo_vector_2d_ij map_offset;
  6093.     int16_t map_repeats;
  6094.     int16_t map_index;
  6095.     uint8_t pad_3[16];
  6096. };
  6097.  
  6098. #pragma mark tagc
  6099. struct halo_tagc
  6100. {
  6101.     struct halo_array r1_tag_references;    // maximum of 200 cells 0x08149C00
  6102. };
  6103.  
  6104. struct halo_tagc_r1_tag_references
  6105. {
  6106.     struct halo_dependency d1_tag;  // (any tag class)
  6107. };
  6108.  
  6109. #pragma mark trak
  6110. struct halo_trak
  6111. {
  6112.     uint32_t unknown_1;
  6113.     struct halo_array r1_control_points;    // maximum of 16 cells 0x94049D00
  6114.     uint8_t pad_1[32];
  6115. };
  6116.  
  6117. struct halo_trak_r1_control_points
  6118. {
  6119.     struct halo_vector_3d position;
  6120.     struct halo_quaternion orientation;
  6121.     uint8_t pad_1[32];
  6122. };
  6123.  
  6124. #pragma mark udlg
  6125.  
  6126. // these are all snd! references
  6127.  
  6128. struct halo_udlg_section_idle
  6129. {
  6130.     struct halo_dependency d1_idle_noncombat;
  6131.     struct halo_dependency d2_idle_combat;
  6132.     struct halo_dependency d3_idle_flee;
  6133. };
  6134.  
  6135. struct halo_udlg_section_involuntary
  6136. {
  6137.     struct halo_dependency d1_pain_body_minor;
  6138.     struct halo_dependency d2_pain_body_major;
  6139.     struct halo_dependency d3_pain_shield;
  6140.     struct halo_dependency d4_pain_falling;
  6141.     struct halo_dependency d5_scream_fear;
  6142.     struct halo_dependency d6_scream_pain;
  6143.     struct halo_dependency d7_maimed_limb;
  6144.     struct halo_dependency d8_maimed_head;
  6145.     struct halo_dependency d9_death_quiet;
  6146.     struct halo_dependency d10_death_violent;
  6147.     struct halo_dependency d11_death_falling;
  6148.     struct halo_dependency d12_death_agonizing;
  6149.     struct halo_dependency d13_death_instant;
  6150.     struct halo_dependency d14_death_flying;
  6151. };
  6152.  
  6153. struct halo_udlg_section_hurting_people
  6154. {
  6155.     struct halo_dependency d1_damaged_friend;
  6156.     struct halo_dependency d2_damaged_friend_player;
  6157.     struct halo_dependency d3_damaged_enemy;
  6158.     struct halo_dependency d4_damaged_enemy_comment;
  6159. };
  6160.  
  6161. struct halo_udlg_section_being_hurt
  6162. {
  6163.     struct halo_dependency d1_hurt_friend;
  6164.     struct halo_dependency d2_hurt_friend_response;
  6165.     struct halo_dependency d3_hurt_friend_player;
  6166.     struct halo_dependency d4_hurt_enemy;
  6167.     struct halo_dependency d5_hurt_enemy_response;
  6168.     struct halo_dependency d6_hurt_enemy_comment;
  6169.     struct halo_dependency d7_hurt_enemy_bullet;
  6170.     struct halo_dependency d8_hurt_enemy_needler;
  6171.     struct halo_dependency d9_hurt_enemy_plasma;
  6172.     struct halo_dependency d10_hurt_enemy_sniper;
  6173.     struct halo_dependency d11_hurt_enemy_grenade;
  6174.     struct halo_dependency d12_hurt_enemy_explosion;
  6175.     struct halo_dependency d13_hurt_enemy_melee;
  6176.     struct halo_dependency d14_hurt_enemy_flame;
  6177.     struct halo_dependency d15_hurt_enemy_shotgun;
  6178.     struct halo_dependency d16_hurt_enemy_vehicle;
  6179.     struct halo_dependency d17_hurt_enemy_mounted_weapon;
  6180. };
  6181.  
  6182. struct halo_udlg_section_killing_people
  6183. {
  6184.     struct halo_dependency d1_killed_friend;
  6185.     struct halo_dependency d2_killed_friend_comment;
  6186.     struct halo_dependency d3_killed_friend_player;
  6187.     struct halo_dependency d4_killed_friend_player_comment;
  6188.     struct halo_dependency d5_killed_enemy;
  6189.     struct halo_dependency d6_killed_enemy_comment;
  6190.     struct halo_dependency d7_killed_enemy_player;
  6191.     struct halo_dependency d8_killed_enemy_player_comment;
  6192.     struct halo_dependency d9_killed_enemy_covenant;
  6193.     struct halo_dependency d10_killed_enemy_covenant_comment;
  6194.     struct halo_dependency d11_killed_enemy_flood_combat;
  6195.     struct halo_dependency d12_killed_enemy_flood_combat_comment;
  6196.     struct halo_dependency d13_killed_enemy_flood_carrier;
  6197.     struct halo_dependency d14_killed_enemy_flood_carrier_comment;
  6198.     struct halo_dependency d15_killed_enemy_sentinel;
  6199.     struct halo_dependency d16_killed_enemy_sentinel_comment;
  6200.     struct halo_dependency d17_killed_enemy_bullet;
  6201.     struct halo_dependency d18_killed_enemy_needler;
  6202.     struct halo_dependency d19_killed_enemy_plasma;
  6203.     struct halo_dependency d20_killed_enemy_sniper;
  6204.     struct halo_dependency d21_killed_enemy_grenade;
  6205.     struct halo_dependency d22_killed_enemy_explosion;
  6206.     struct halo_dependency d23_killed_enemy_melee;
  6207.     struct halo_dependency d24_killed_enemy_flame;
  6208.     struct halo_dependency d25_killed_enemy_shotgun;
  6209.     struct halo_dependency d26_killed_enemy_vehicle;
  6210.     struct halo_dependency d27_killed_enemy_mounted_weapon;
  6211.     struct halo_dependency d28_killing_spree;
  6212. };
  6213.  
  6214. struct halo_udlg_section_player_kill_responses
  6215. {
  6216.     struct halo_dependency d1_player_kill_comment;
  6217.     struct halo_dependency d2_player_kill_bullet_comment;
  6218.     struct halo_dependency d3_player_kill_needler_comment;
  6219.     struct halo_dependency d4_player_kill_plasma_comment;
  6220.     struct halo_dependency d5_player_kill_sniper_comment;
  6221.     struct halo_dependency d6_anyone_kill_grenade_comment;
  6222.     struct halo_dependency d7_player_kill_explosion_comment;
  6223.     struct halo_dependency d8_player_kill_melee_comment;
  6224.     struct halo_dependency d9_player_kill_flame_comment;
  6225.     struct halo_dependency d10_player_kill_shotgun_comment;
  6226.     struct halo_dependency d11_player_kill_vehicle_comment;
  6227.     struct halo_dependency d12_player_kill_mounted_weapon_comment;
  6228.     struct halo_dependency d13_player_killing_spree_comment;
  6229. };
  6230.  
  6231. struct halo_udlg_section_friends_dying
  6232. {
  6233.     struct halo_dependency d1_friend_died;
  6234.     struct halo_dependency d2_friend_player_died;
  6235.     struct halo_dependency d3_friend_killed_by_friend;
  6236.     struct halo_dependency d4_friend_killed_by_friendly_player;
  6237.     struct halo_dependency d5_friend_killed_by_enemy;
  6238.     struct halo_dependency d6_friend_killed_by_enemy_player;
  6239.     struct halo_dependency d7_friend_killed_by_covenant;
  6240.     struct halo_dependency d8_friend_killed_by_flood;
  6241.     struct halo_dependency d9_friend_killed_by_sentinel;
  6242.     struct halo_dependency d10_friend_betrayed;
  6243. };
  6244.  
  6245. struct halo_udlg_section_shouting
  6246. {
  6247.     struct halo_dependency d1_new_combat_alone;
  6248.     struct halo_dependency d2_new_enemy_recent_combat;
  6249.     struct halo_dependency d3_old_enemy_sighted;
  6250.     struct halo_dependency d4_unexpected_enemy;
  6251.     struct halo_dependency d5_dead_friend_found;
  6252.     struct halo_dependency d6_alliance_broken;
  6253.     struct halo_dependency d7_alliance_reformed;
  6254.     struct halo_dependency d8_grenade_throwing;
  6255.     struct halo_dependency d9_grenade_sighted;
  6256.     struct halo_dependency d10_grenade_startle;
  6257.     struct halo_dependency d11_grenade_danger_enemy;
  6258.     struct halo_dependency d12_grenade_danger_self;
  6259.     struct halo_dependency d13_grenade_danger_friend;
  6260. };
  6261.  
  6262. struct halo_udlg_section_group_communication
  6263. {
  6264.     struct halo_dependency d1_new_combat_group_response;
  6265.     struct halo_dependency d2_new_combat_nearby_response;
  6266.     struct halo_dependency d3_alert_friend;
  6267.     struct halo_dependency d4_alert_friend_response;
  6268.     struct halo_dependency d5_alert_lost_contact;
  6269.     struct halo_dependency d6_alert_lost_contact_response;
  6270.     struct halo_dependency d7_blocked;
  6271.     struct halo_dependency d8_blocked_response;
  6272.     struct halo_dependency d9_search_start;
  6273.     struct halo_dependency d10_search_query;
  6274.     struct halo_dependency d11_search_query_response;
  6275.     struct halo_dependency d12_search_report;
  6276.     struct halo_dependency d13_search_abandon;
  6277.     struct halo_dependency d14_search_group_abandon;
  6278.     struct halo_dependency d15_group_uncover;
  6279.     struct halo_dependency d16_group_uncover_response;
  6280.     struct halo_dependency d17_advance;
  6281.     struct halo_dependency d18_advance_response;
  6282.     struct halo_dependency d19_retreat;
  6283.     struct halo_dependency d20_retreat_response;
  6284.     struct halo_dependency d21_cover;
  6285. };
  6286.  
  6287. struct halo_udlg_section_actions
  6288. {
  6289.     struct halo_dependency d1_sighted_friend_player;
  6290.     struct halo_dependency d2_shooting;
  6291.     struct halo_dependency d3_shooting_vehicle;
  6292.     struct halo_dependency d4_shooting_berserk;
  6293.     struct halo_dependency d5_shooting_group;
  6294.     struct halo_dependency d6_shooting_traitor;
  6295.     struct halo_dependency d7_taunt;
  6296.     struct halo_dependency d8_taunt_response;
  6297.     struct halo_dependency d9_flee;
  6298.     struct halo_dependency d10_flee_response;
  6299.     struct halo_dependency d11_flee_leader_died;
  6300.     struct halo_dependency d12_attempted_flee;
  6301.     struct halo_dependency d13_attempted_flee_response;
  6302.     struct halo_dependency d14_lost_contact;
  6303.     struct halo_dependency d15_hiding_finished;
  6304.     struct halo_dependency d16_vehicle_entry;
  6305.     struct halo_dependency d17_vehicle_exit;
  6306.     struct halo_dependency d18_vehicle_woohoo;
  6307.     struct halo_dependency d19_vehicle_scared;
  6308.     struct halo_dependency d20_vehicle_collision;
  6309.     struct halo_dependency d21_partially_sighted;
  6310.     struct halo_dependency d22_nothing_there;
  6311.     struct halo_dependency d23_pleading;
  6312. };
  6313.  
  6314. struct halo_udlg_section_exclamations
  6315. {
  6316.     struct halo_dependency d1_surprise;
  6317.     struct halo_dependency d2_berserk;
  6318.     struct halo_dependency d3_melee_attack;
  6319.     struct halo_dependency d4_dive;
  6320.     struct halo_dependency d5_uncover_exclamation;
  6321.     struct halo_dependency d6_leap_attack;
  6322.     struct halo_dependency d7_resurrection;
  6323. };
  6324.  
  6325. struct halo_udlg_section_post_combat_actions
  6326. {
  6327.     struct halo_dependency d1_celebration;
  6328.     struct halo_dependency d2_check_body_enemy;
  6329.     struct halo_dependency d3_check_body_friend;
  6330.     struct halo_dependency d4_shooting_dead_enemy;
  6331.     struct halo_dependency d5_shooting_dead_enemy_player;
  6332. };
  6333.  
  6334. struct halo_udlg_section_post_combat_chatter
  6335. {
  6336.     struct halo_dependency d1_alone;
  6337.     struct halo_dependency d2_unscathed;
  6338.     struct halo_dependency d3_seriously_wounded;
  6339.     struct halo_dependency d4_seriously_wounded_response;
  6340.     struct halo_dependency d5_massacre;
  6341.     struct halo_dependency d6_massacre_response;
  6342.     struct halo_dependency d7_rout;
  6343.     struct halo_dependency d8_rout_response;
  6344. };
  6345.  
  6346. struct halo_udlg
  6347. {
  6348.     uint8_t pad_1[16];
  6349.     struct halo_udlg_section_idle idle;
  6350.     uint8_t pad_2[48];
  6351.     struct halo_udlg_section_involuntary involuntary;
  6352.     uint8_t pad_3[16];
  6353.     struct halo_udlg_section_hurting_people hurting_people;
  6354.     uint8_t pad_4[64];
  6355.     struct halo_udlg_section_being_hurt being_hurt;
  6356.     uint8_t pad_5[48];
  6357.     struct halo_udlg_section_killing_people killing_people;
  6358.     uint8_t pad_6[48];
  6359.     struct halo_udlg_section_player_kill_responses player_kill_responses;
  6360.     uint8_t pad_7[48];
  6361.     struct halo_udlg_section_friends_dying friends_dying;
  6362.     uint8_t pad_8[32];
  6363.     struct halo_udlg_section_shouting shouting;
  6364.     uint8_t pad_9[32];
  6365.     struct halo_udlg_section_group_communication group_communication;
  6366.     uint8_t pad_10[64];
  6367.     struct halo_udlg_section_actions actions;
  6368.     uint8_t pad_11[96];
  6369.     struct halo_udlg_section_exclamations exclamations;
  6370.     uint8_t pad_12[64];
  6371.     struct halo_udlg_section_post_combat_actions post_combat_actions;
  6372.     uint8_t pad_13[64];
  6373.     struct halo_udlg_section_post_combat_chatter post_combat_chatter;
  6374.     uint8_t pad_14[816];
  6375. };
  6376.  
  6377. #pragma mark unhi
  6378.  
  6379. struct halo_unhi_section_shield_panel_meter
  6380. {
  6381.     struct halo_hud_meter meter;
  6382.     struct halo_colorbyte_rgb overcharge_minimum_color;
  6383.     struct halo_colorbyte_rgb overcharge_maximum_color;
  6384.     struct halo_colorbyte_rgb overcharge_flash_color;
  6385.     struct halo_colorbyte_rgb overcharge_empty_color;
  6386. };
  6387.  
  6388. struct halo_unhi_section_health_panel_meter
  6389. {
  6390.     struct halo_hud_meter meter;
  6391.     struct halo_colorbyte_rgb medium_health_left_color;
  6392.     float maximum_color_health_fraction_cutoff;
  6393.     float minimum_color_health_fraction_cutoff;
  6394. };
  6395.  
  6396. struct halo_unhi_metered_shield_panel
  6397. {
  6398.     struct halo_hud_section_background background;
  6399.     struct halo_unhi_section_shield_panel_meter meter;
  6400. };
  6401.  
  6402. struct halo_unhi_metered_health_panel
  6403. {
  6404.     struct halo_hud_section_background background;
  6405.     struct halo_unhi_section_health_panel_meter meter;
  6406. };
  6407.  
  6408. struct halo_unhi_section_motion_sensor_center
  6409. {
  6410.     uint8_t pad_1[32];
  6411.     struct halo_hud_orientation orientation;
  6412. };
  6413.  
  6414. struct halo_unhi_motion_sensor
  6415. {
  6416.     struct halo_hud_section_background background;
  6417.     struct halo_hud_section_foreground foreground;
  6418.     struct halo_unhi_section_motion_sensor_center center;
  6419. };
  6420.  
  6421. struct halo_unhi_section_auxiliary_overlays
  6422. {
  6423.     struct halo_hud_screen_alignment_anchor anchor;
  6424.     struct halo_array r6_overlays;  // maximum of 16 cells 0x80459C00
  6425. };
  6426.  
  6427. struct halo_unhi_section_hud_warning_sounds
  6428. {
  6429.     struct halo_array r7_sounds;    // maximum of 12 cells 0x18449C00
  6430. };
  6431.  
  6432. struct halo_unhi_section_auxiliary_hud_meters
  6433. {
  6434.     struct halo_array r8_meters;    // maximum of 16 cells 0x14489C00
  6435. };
  6436.  
  6437. struct halo_unhi_section_vehicle_hud
  6438. {
  6439.    
  6440. };
  6441.  
  6442. struct halo_unhi
  6443. {
  6444.     struct halo_hud_anchored_screen_layer unit_hud;
  6445.     struct halo_unhi_metered_shield_panel shield_panel;
  6446.     uint8_t pad_1[16];
  6447.     struct halo_unhi_metered_health_panel health_panel;
  6448.     uint8_t pad_2[20];
  6449.     struct halo_unhi_motion_sensor motion_sensor;
  6450.     struct halo_unhi_section_auxiliary_overlays auxiliary_overlays;
  6451.     uint8_t pad_3[16];
  6452.     struct halo_unhi_section_hud_warning_sounds hud_warning_sounds;
  6453.     struct halo_unhi_section_auxiliary_hud_meters auxiliary_hud_meters;
  6454.     struct halo_unhi_section_vehicle_hud vehicle_hud;
  6455.     uint8_t pad_4[404];
  6456. };
  6457.  
  6458. struct halo_unhi_r6_overlays
  6459. {
  6460.     struct halo_hud_screen_layer screen_layer;
  6461.     enum halo_unhi_auxiliary_overlays_types type_list;
  6462.     uint8_t pad_1[1];
  6463.     struct halo_unhi_overlay_flags_bf flags_bf;
  6464.     uint8_t pad_2[24];
  6465. };
  6466.  
  6467. struct halo_unhi_r7_sounds
  6468. {
  6469.     struct halo_dependency d1_sound;    // lsnd snd!
  6470.     struct halo_unhi_hud_warning_sound_flags_bf latched_to_bf;
  6471.     float scale;
  6472.     uint8_t pad_1[32];
  6473. };
  6474.  
  6475. struct halo_unhi_r8_meters_section_meter
  6476. {
  6477.     struct halo_hud_meter meter;
  6478.     float minimum_fraction_cutoff;
  6479.     struct halo_unhi_meter_limit_flags_bf flags_bf;
  6480.     uint8_t pad_1[88];
  6481. };
  6482.  
  6483. struct halo_unhi_r8_meters
  6484. {
  6485.     enum halo_unhi_auxiliary_hud_meters_types type_list;
  6486.     uint8_t pad_1[18];
  6487.     struct halo_hud_section_background background;
  6488.     struct halo_unhi_r8_meters_section_meter meter;
  6489. };
  6490.  
  6491. #pragma mark ustr
  6492. struct halo_ustr
  6493. {
  6494.     struct halo_array r1_string_references; // maximum of 800 cells 0xBC629D00
  6495. };
  6496.  
  6497. struct halo_ustr_r1_string_references
  6498. {
  6499.     struct halo_data string;    // 0x94629D00
  6500. };
  6501.  
  6502. #pragma mark vcky
  6503. struct halo_vcky
  6504. {
  6505.     struct halo_dependency d1_display_font; // font
  6506.     struct halo_dependency d2_background_bitmap;    // bitm
  6507.     struct halo_dependency d3_special_key_labels_string_list;   // ustr
  6508.     struct halo_array r1_virtual_keys;  // maximum of 44 cells 0x20349C00
  6509. };
  6510.  
  6511. struct halo_vcky_r1_virtual_keys_section_key_codes
  6512. {
  6513.     int16_t lowercase_character;
  6514.     int16_t shift_character;
  6515.     int16_t caps_character;
  6516.     int16_t symbols_character;
  6517.     int16_t shift_caps_character;
  6518.     int16_t shift_symbols_character;
  6519.     int16_t caps_symbols_character;
  6520. };
  6521.  
  6522. struct halo_vcky_r1_virtual_keys
  6523. {
  6524.     enum halo_vcky_keyboard_keys keyboard_key_list;
  6525.     struct halo_vcky_r1_virtual_keys_section_key_codes key_codes;
  6526.     struct halo_dependency d1_unselected_background_bitmap; // bitm
  6527.     struct halo_dependency d2_selected_background_bitmap;   // bitm
  6528.     struct halo_dependency d3_active_background_bitmap; // bitm
  6529.     struct halo_dependency d4_sticky_background_bitmap; // bitm
  6530. };
  6531.  
  6532. #pragma mark vehi
  6533. struct halo_vehi
  6534. {
  6535.     struct halo_obje obje;
  6536.     struct halo_unit unit;
  6537.     struct halo_vehi_flags_bf flags_bf;
  6538.     enum halo_vehicle_types type_list;
  6539.     uint8_t pad_1[2];
  6540.     float maximum_forward_speed;
  6541.     float maximum_reverse_speed;
  6542.     float speed_acceleration;
  6543.     float speed_deceleration;
  6544.     float maximum_left_turn;
  6545.     float maximum_right_turn_negative;
  6546.     float wheel_circumference;
  6547.     float turn_rate;
  6548.     float blur_speed;
  6549.     enum halo_vehi_vehicle_channel_functions A_in_list;
  6550.     enum halo_vehi_vehicle_channel_functions B_in_list;
  6551.     enum halo_vehi_vehicle_channel_functions C_in_list;
  6552.     enum halo_vehi_vehicle_channel_functions D_in_list;
  6553.     uint8_t pad_2[12];
  6554.     float maximum_left_slide;
  6555.     float maximum_right_slide;
  6556.     float slide_acceleration;
  6557.     float slide_deceleration;
  6558.     float minimum_flipping_angular_velocity;
  6559.     float maximum_flipping_angular_velocity;
  6560.     uint8_t pad_3[24];
  6561.     float fixed_gun_yaw;
  6562.     float fixed_gun_pitch;
  6563.     uint8_t pad_4[24];
  6564.     float ai_sideslip_distance;
  6565.     float ai_destination_radius;
  6566.     float ai_avoidance_distance;
  6567.     float ai_pathfinding_radius;
  6568.     float ai_charge_repeat_timeout;
  6569.     float ai_strafing_abort_range;
  6570.     struct halo_ranged_float ai_oversteering_bounds_rad;
  6571.     float ai_steering_maximum_rad;
  6572.     float ai_throttle_maximum;
  6573.     float ai_move_position_time;
  6574.     uint8_t pad_5[4];
  6575.     struct halo_dependency d1_suspension_sound; // snd!
  6576.     struct halo_dependency d2_crash_sound;  // snd!
  6577.     struct halo_dependency d3_material_effects; // foot
  6578.     struct halo_dependency d4_effect;   // effe
  6579. };
  6580.  
  6581. #pragma mark weap
  6582.  
  6583. struct halo_weap_section_export_to_functions
  6584. {
  6585.     enum halo_weap_weapon_channel_functions A_in_list;
  6586.     enum halo_weap_weapon_channel_functions B_in_list;
  6587.     enum halo_weap_weapon_channel_functions C_in_list;
  6588.     enum halo_weap_weapon_channel_functions D_in_list;
  6589.     float ready_time;
  6590.     struct halo_dependency d1_ready_effect; // effe snd!
  6591. };
  6592.  
  6593. struct halo_weap_section_heat
  6594. {
  6595.     float heat_recovery_threshold_frac;
  6596.     float overheated_threshold_frac;
  6597.     float heat_detonation_threshold_frac;
  6598.     float heat_detonation_fraction_frac;
  6599.     float heat_loss_per_second_frac;
  6600.     float heat_illumination_frac;
  6601.     uint8_t pad_1[16];
  6602.     struct halo_dependency d1_overheated;   // effe snd!
  6603.     struct halo_dependency d2_detonation;   // effe snd!
  6604.     struct halo_dependency d3_player_melee_damage;  // jpt!
  6605.     struct halo_dependency d4_player_melee_response;    // jpt!
  6606. };
  6607.  
  6608. struct halo_weap_section_actor_firing_parameters
  6609. {
  6610.     struct halo_dependency d1_actor_firing_parameters;  // actv
  6611. };
  6612.  
  6613. struct halo_weap_section_reticle
  6614. {
  6615.     float near_reticle_range;
  6616.     float far_reticle_range;
  6617.     float intersection_reticle_range;
  6618. };
  6619.  
  6620. struct halo_weap_section_zoom
  6621. {
  6622.     uint8_t pad_1[2];
  6623.     int16_t zoom_magnification_levels;
  6624.     struct halo_ranged_float zoom_magnification_range;
  6625. };
  6626.  
  6627. struct halo_weap_section_aim_assist
  6628. {
  6629.     float autoaim_angle_rad;
  6630.     float autoaim_range;
  6631.     float magnetism_angle_rad;
  6632.     float magnetism_range;
  6633.     float deviation_angle_rad;
  6634. };
  6635.  
  6636. struct halo_weap_section_movement
  6637. {
  6638.     enum halo_movement_penalizations movement_penalized_list;
  6639.     uint8_t pad_1[2];
  6640.     float forward_movement_penalty;
  6641.     float sideways_movement_penalty;
  6642. };
  6643.  
  6644. struct halo_weap_section_ai_targeting_parameters
  6645. {
  6646.     float minimum_target_range;
  6647.     float looking_time_modifier;
  6648. };
  6649.  
  6650. struct halo_weap_section_miscellaneous
  6651. {
  6652.     float light_power_on_time;
  6653.     float light_power_off_time;
  6654.     struct halo_dependency d1_light_power_on_effect;    // effe snd!
  6655.     struct halo_dependency d2_light_power_off_effect;   // effe snd!
  6656.     float age_heat_recovery_penalty;
  6657.     float age_rate_of_fire_penalty;
  6658.     float age_misfire_start_frac;
  6659.     float age_misfire_chance_frac;
  6660. };
  6661.  
  6662. struct halo_weap_section_interface
  6663. {
  6664.     struct halo_dependency d1_first_person_model;   // mod2
  6665.     struct halo_dependency d2_first_person_animations;  // antr
  6666.     uint8_t pad_1[4];
  6667.     struct halo_dependency d3_hud_interface;    // wphi
  6668.     struct halo_dependency d4_pickup_sound; // snd!
  6669.     struct halo_dependency d5_zoom_in_sound;    // snd!
  6670.     struct halo_dependency d6_zoom_out_sound;   // snd!
  6671.     uint8_t pad_2[12];
  6672.     float interface_active_camo_ding;
  6673.     float interface_active_camo_regrowth_rate;
  6674. };
  6675.  
  6676. struct halo_weap_section_more_miscellaneous
  6677. {
  6678.     enum halo_weapon_behavior_types weapon_type_list;
  6679. };
  6680.  
  6681. struct halo_weap
  6682. {
  6683.     struct halo_obje obje;
  6684.     struct halo_item item;
  6685.     struct halo_weap_flags_bf flags_bf;
  6686.     char label[32];
  6687.     enum halo_weap_trigger_relations secondary_trigger_mode_list;
  6688.     int16_t maximum_alternate_shots_loaded;
  6689.     struct halo_weap_section_export_to_functions export_to_functions;
  6690.     struct halo_weap_section_heat heat;
  6691.     uint8_t pad_1[8];
  6692.     struct halo_weap_section_actor_firing_parameters actor_firing_parameters;
  6693.     struct halo_weap_section_reticle reticle;
  6694.     struct halo_weap_section_zoom zoom;
  6695.     struct halo_weap_section_aim_assist aim_assist;
  6696.     uint8_t pad_2[4];
  6697.     struct halo_weap_section_movement movement;
  6698.     uint8_t pad_3[4];
  6699.     struct halo_weap_section_ai_targeting_parameters ai_targeting_parameters;
  6700.     uint8_t pad_4[4];
  6701.     struct halo_weap_section_miscellaneous miscellaneous;
  6702.     uint8_t pad_5[12];
  6703.     struct halo_weap_section_interface interface;
  6704.     uint8_t pad_6[14];
  6705.     struct halo_weap_section_more_miscellaneous more_miscellaneous;
  6706.     struct halo_array r1_predicted_resources;   // maximum of 1024 cells  0x105FA000
  6707.     struct halo_array r2_magazines; // maximum of 2 cells 0xDC369D00
  6708.     struct halo_array r3_triggers;  // maximum of 2 cells 0x643A9D00
  6709. };
  6710.  
  6711. struct halo_weap_r2_magazines
  6712. {
  6713.     struct halo_weap_magazine_flags_bf flags_bf;
  6714.     int16_t rounds_recharged;
  6715.     int16_t rounds_total_initial;
  6716.     int16_t rounds_total_maximum;
  6717.     int16_t rounds_loaded_maximum;
  6718.     uint8_t pad_1[8];
  6719.     float reload_time;
  6720.     int16_t rounds_reloaded;
  6721.     uint8_t pad_2[2];
  6722.     float chamber_time;
  6723.     uint8_t pad_3[24];
  6724.     struct halo_dependency d1_reloading_effect; // effe snd!
  6725.     struct halo_dependency d2_chambering_effect;    // effe snd!
  6726.     uint8_t pad_4[12];
  6727.     struct halo_array r1_magazines; // maximum of 2 cells (Guerilla does not limit it to 2, but crashes if you try to add more than 2) 0xD0359D00
  6728. };
  6729.  
  6730. struct halo_weap_r2_r1_magazines
  6731. {
  6732.     int16_t rounds;
  6733.     uint8_t pad_1[10];
  6734.     struct halo_dependency d1_equipment;    // eqip
  6735. };
  6736.  
  6737. struct halo_weap_r8_triggers_section_firing
  6738. {
  6739.     struct halo_ranged_float rounds_per_second;
  6740.     float acceleration_time;
  6741.     float deceleration_time;
  6742.     float blurred_rate_of_fire;
  6743.     uint8_t pad_1[8];
  6744.     int16_t magazine_sel;
  6745.     int16_t rounds_per_shot;
  6746.     int16_t minimum_rounds_loaded;
  6747.     int16_t rounds_between_tracers;
  6748.     uint8_t pad_2[6];
  6749.     enum halo_sound_volumes firing_noise_list;
  6750. };
  6751.  
  6752. struct halo_weap_r8_triggers_section_error
  6753. {
  6754.     struct halo_ranged_float error;
  6755.     float acceleration_time;
  6756.     float deceleration_time;
  6757. };
  6758.  
  6759. struct halo_weap_r8_triggers_section_charging
  6760. {
  6761.     float charging_time;
  6762.     float charged_time;
  6763.     enum halo_weap_trigger_overcharge_actions overcharged_action_list;
  6764.     uint8_t pad_1[2];
  6765.     float charged_illumination;
  6766.     float spew_time;
  6767.     struct halo_dependency d1_charging_effect;  // effe snd!
  6768. };
  6769.  
  6770. struct halo_weap_r8_triggers_section_projectile
  6771. {
  6772.     enum halo_weap_trigger_projectile_distribution_functions distribution_function_list;
  6773.     int16_t projectiles_per_shot;
  6774.     float distribution_angle;
  6775.     uint8_t pad_1[4];
  6776.     float minimum_error_rad;
  6777.     struct halo_ranged_float error_angle_rad;
  6778.     struct halo_point_3d first_person_offset;
  6779.     uint8_t pad_2[4];
  6780.     struct halo_dependency d1_projectile;   // proj
  6781. };
  6782.  
  6783. struct halo_weap_r8_triggers_section_miscellaneous
  6784. {
  6785.     float ejection_port_recovery_time;
  6786.     float illumination_recovery_time;
  6787.     uint8_t pad_1[12];
  6788.     float heat_generated_per_round_frac;
  6789.     float age_generated_per_round_frac;
  6790.     uint8_t pad_2[4];
  6791.     float overload_time;
  6792. };
  6793.  
  6794. struct halo_weap_r3_triggers
  6795. {
  6796.     struct halo_weap_trigger_flags_bf flags_bf;
  6797.     struct halo_weap_r8_triggers_section_firing firing;
  6798.     struct halo_weap_r8_triggers_section_error error;
  6799.     uint8_t pad_1[8];
  6800.     struct halo_weap_r8_triggers_section_charging charging;
  6801.     struct halo_weap_r8_triggers_section_projectile projectile;
  6802.     struct halo_weap_r8_triggers_section_miscellaneous miscellaneous;
  6803.     uint8_t pad_2[64];
  6804.     struct halo_array r1_firing_effects;    // maximum of 8 cells 0x80379D00
  6805. };
  6806.  
  6807. struct halo_weap_r3_r1_firing_effects
  6808. {
  6809.     int16_t shot_count_lower_bound;
  6810.     int16_t shot_count_upper_bound;
  6811.     uint8_t pad_1[32];
  6812.     struct halo_dependency d1_firing_effect;    // effe snd!
  6813.     struct halo_dependency d2_misfire_effect;   // effe snd!
  6814.     struct halo_dependency d3_empty_effect; // effe snd!
  6815.     struct halo_dependency d4_firing_damage;    // jpt!
  6816.     struct halo_dependency d5_misfire_damage;   // jpt!
  6817.     struct halo_dependency d6_empty_damage; // jpt!
  6818. };
  6819.  
  6820. #pragma mark wind
  6821. struct halo_wind
  6822. {
  6823.     struct halo_ranged_float velocity;
  6824.     struct halo_angle_2d variation_area_rad;
  6825.     float local_variation_weight;
  6826.     float local_variation_rate;
  6827.     float damping;
  6828.     uint8_t pad_1[36];
  6829. };
  6830.  
  6831. #pragma mark wphi
  6832.  
  6833. struct halo_wphi_section_flash_cutoffs
  6834. {
  6835.     uint8_t pad_1[1];
  6836.     struct halo_wphi_flash_cutoff_flags_bf flags_bf;
  6837.     uint8_t pad_2[2];
  6838.     int16_t total_ammo_cutoff;
  6839.     int16_t loaded_ammo_cutoff;
  6840.     int16_t heat_cutoff;
  6841.     int16_t age_cutoff;
  6842.     uint8_t pad_3[32];
  6843. };
  6844.  
  6845. struct halo_wphi_section_crosshairs
  6846. {
  6847.     struct halo_array r4_crosshairs;    // maximum of 19 cells 0x945A9C00
  6848. };
  6849.  
  6850. struct halo_wphi
  6851. {
  6852.     struct halo_dependency d1_child_hud;    // wphi
  6853.     struct halo_wphi_section_flash_cutoffs flash_cutoffs;
  6854.     struct halo_hud_section_screen_alignment weapon_hud_screen_alignment;
  6855.     struct halo_array r1_static_elements;   // maximum of 16 cells 0x3C559C00
  6856.     struct halo_array r2_meter_elements;    // maximum of 16 cells 0xB8569C00
  6857.     struct halo_array r3_number_elements;   // maximum of 16 cells 0x44589C00
  6858.     struct halo_wphi_section_crosshairs crosshairs;
  6859.     struct halo_array r5_overlay_elements;  // maximum of 16 cells 0xDC589C00
  6860.     uint8_t pad_1[16];
  6861.     struct halo_array r6_screen_effect; // maximum of 1 cell 0x48379C00
  6862.     uint8_t pad_2[132];
  6863.     struct halo_hud_section_messaging_information messaging_information;
  6864. };
  6865.  
  6866. struct halo_wphi_screen_element_association
  6867. {
  6868.     enum halo_interface_element_state_attachments state_attached_to_list;
  6869.     uint8_t pad_1[2];
  6870.     enum halo_interface_element_map_type_compatibilities can_use_on_map_type_list;
  6871.     uint8_t pad_2[30];
  6872. };
  6873.  
  6874. struct halo_wphi_r1_static_elements
  6875. {
  6876.     struct halo_wphi_screen_element_association association;
  6877.     struct halo_hud_screen_layer screen_layer;
  6878.     uint8_t pad_1[40];
  6879. };
  6880.  
  6881. struct halo_wphi_r2_meter_elements
  6882. {
  6883.     struct halo_wphi_screen_element_association association;
  6884.     struct halo_hud_meter meter;
  6885.     uint8_t pad_1[40];
  6886. };
  6887.  
  6888. struct halo_wphi_r3_number_elements
  6889. {
  6890.     struct halo_wphi_screen_element_association association;
  6891.     struct halo_hud_numbers numbers;
  6892.     uint8_t pad_1[14];
  6893.     struct halo_wphi_number_weapon_flags_bf weapon_specific_flags_bf;
  6894.     uint8_t pad_2[38];
  6895. };
  6896.  
  6897. struct halo_wphi_r4_crosshairs
  6898. {
  6899.     enum halo_crosshair_types crosshair_type_list;
  6900.     uint8_t pad_1[2];
  6901.     enum halo_interface_element_map_type_compatibilities can_use_on_map_type_list;
  6902.     uint8_t pad_2[30];
  6903.     struct halo_dependency d1_crosshair_bitmap; // bitm
  6904.     struct halo_array r1_crosshair_overlays;    // maximum of 16 cells 0xF8599C00
  6905.     uint8_t pad_3[40];
  6906. };
  6907.  
  6908. struct halo_wphi_r4_r1_crosshair_overlays
  6909. {
  6910.     struct halo_hud_orientation orientation;
  6911.     struct halo_hud_color_and_flash color_and_flash;
  6912.     uint8_t pad_1[4];
  6913.     int16_t frame_rate; // differs from grhi which stores as float
  6914.     int16_t sequence_index;
  6915.     struct halo_wphi_crosshair_overlay_flags_bf flags_bf;
  6916.     uint8_t pad_2[32];
  6917. };
  6918.  
  6919. struct halo_wphi_r5_overlay_elements
  6920. {
  6921.     struct halo_wphi_screen_element_association association;
  6922.     struct halo_dependency d1_overlay_bitmap;   // bitm
  6923.     struct halo_array r1_overlays;  // maximum of 16 cells 0xCC539C00
  6924.     uint8_t pad_1[40];
  6925. };
  6926.  
  6927. struct halo_wphi_r5_r1_overlays
  6928. {
  6929.     struct halo_hud_orientation orientation;
  6930.     struct halo_hud_color_and_flash color_and_flash;
  6931.     uint8_t pad_1[4];
  6932.     int16_t frame_rate;
  6933.     uint8_t pad_2[2];
  6934.     int16_t sequence_index;
  6935.     uint8_t pad_3[1];
  6936.     struct halo_wphi_overlays_type_bf type_bf;
  6937.     struct halo_hud_overlays_flash_flags_bf flags_bf;
  6938.     uint8_t pad_4[56];
  6939. };
  6940.  
  6941. struct halo_wphi_r6_screen_effect_section_mask
  6942. {
  6943.     struct halo_wphi_screen_effect_alteration_flags_bf flags_bf;
  6944.     uint8_t pad_1[18];
  6945.     struct halo_dependency d1_mask_fullscreen;  // bitm
  6946.     struct halo_dependency d2_mask_splitscreen; // bitm
  6947. };
  6948.  
  6949. struct halo_wphi_r6_screen_effect_section_convolution
  6950. {
  6951.     struct halo_wphi_screen_effect_alteration_flags_bf flags_bf;
  6952.     uint8_t pad_1[2];
  6953.     struct halo_ranged_float fov_in_bounds_rad;
  6954.     struct halo_ranged_float radius_out_bounds;
  6955. };
  6956.  
  6957. struct halo_wphi_r6_screen_effect_section_night_vision
  6958. {
  6959.     struct halo_wphi_screen_effect_brightness_flags_bf flags_bf;
  6960.     int16_t script_source;
  6961.     float intensity_frac;
  6962. };
  6963.  
  6964. struct halo_wphi_r6_screen_effect_section_desaturation
  6965. {
  6966.     struct halo_wphi_screen_effect_color_flags_bf flags_bf;
  6967.     int16_t script_source;
  6968.     float intensity_frac;
  6969.     struct halo_colorfloat_rgb tint;
  6970. };
  6971.  
  6972. struct halo_wphi_r6_screen_effect
  6973. {
  6974.     uint8_t pad_1[5];
  6975.     struct halo_wphi_r6_screen_effect_section_mask mask;
  6976.     uint8_t pad_2[9];
  6977.     struct halo_wphi_r6_screen_effect_section_convolution convolution;
  6978.     uint8_t pad_3[25];
  6979.     struct halo_wphi_r6_screen_effect_section_night_vision night_vision;
  6980.     uint8_t pad_4[25];
  6981.     struct halo_wphi_r6_screen_effect_section_desaturation desaturation;
  6982.     uint8_t pad_5[24];
  6983. };
  6984.  
  6985. #pragma mark - Files -
  6986.  
  6987. struct halo_tag_file_actr
  6988. {
  6989.     struct halo_tag_header header;
  6990.     struct halo_actr metadata;
  6991. };
  6992.  
  6993. struct halo_tag_file_actv
  6994. {
  6995.     struct halo_tag_header header;
  6996.     struct halo_actv metadata;
  6997. };
  6998.  
  6999. struct halo_map
  7000. {
  7001.     int32_t something;
  7002. };
  7003.  
  7004. struct halo_map_tags_index_entry
  7005. {
  7006.     char        tag_class_1[4];
  7007.     char        tag_class_2[4];
  7008.     char        tag_class_3[4];
  7009.     int16_t     tag_index_id;
  7010.     int16_t     tag_index_id_inverse;
  7011.     uint32_t    *tpns;
  7012.     uint32_t    *metadata;
  7013.     uint8_t     zeros[8];
  7014. };
  7015.  
  7016. #endif
RAW Paste Data