plants

plants.plant_flags

<bitfield-type type-name="plant_flags" base-type="uint16_t">
  <flag-bit name="watery"/>
  <flag-bit name="is_shrub">
    If it is not a shrub, then it is a tree
  </flag-bit>
</bitfield-type>

plants.plant

<struct-type type-name="plant"
    instance-vector="$global.world.plants.all">
  <compound type-name="plant_flags" name="flags"/>
  <int16_t name="material" ref-target="plant_raw"/>
  <compound name="pos" type-name="coord"/>
  <int32_t name="grow_counter"/>
  <bitfield name="damage_flags">
    <flag-bit name="is_burning"/>
    <flag-bit name="is_drowning"/>
    <flag-bit/>
  </bitfield>
  <int32_t name="hitpoints"/>
  <int16_t name="update_order"/>
  <int32_t name="site_id" ref-target="world_site"/>
  <int32_t name="srb_id" ref-target="site_realization_building"
      aux-value="$$.site_id"/>
  <stl-vector name="contaminants" pointer-type="spatter_common"/>
  <pointer name="tree_info" type-name="plant_tree_info"/>
</struct-type>

plants.plant_tree_tile

<bitfield-type type-name="plant_tree_tile" base-type="uint8_t">
  <flag-bit name="trunk"/>
  <flag-bit name="thick_branches_1"/>
  <flag-bit name="thick_branches_2"/>
  <flag-bit name="thick_branches_3"/>
  <flag-bit name="thick_branches_4"/>
  <flag-bit name="branches"/>
  <flag-bit name="twigs"/>
  <flag-bit name="blocked">
    e.g. by other tree
  </flag-bit>
</bitfield-type>

plants.plant_tree_info

<struct-type type-name="plant_tree_info">
  <pointer name="body" is-array="true">
    <pointer type-name="plant_tree_tile" is-array="true">
      dimension dim_x*dim_y
    </pointer>
    dimension body_height
  </pointer>
  <pointer name="unk1" type-name="int16_t" is-array="true">
    dimension body_height
  </pointer>
  <pointer name="unk2" type-name="int16_t" is-array="true">
    dimension body_height
  </pointer>
  <pointer name="unk3" type-name="int16_t" is-array="true">
    dimension body_height
  </pointer>
  <pointer name="unk4" type-name="int16_t" is-array="true">
    dimension body_height
  </pointer>
  <int32_t name="body_height"/>
  <int32_t name="dim_x"/>
  <int32_t name="dim_y"/>
  <pointer name="roots" is-array="true">
    <pointer type-name="plant_tree_tile" is-array="true">
      dimension dim_x*dim_y
    </pointer>
    dimension roots_depth
  </pointer>
  <int32_t name="roots_depth"/>
  <int16_t name="unk6"/>
</struct-type>