Skip to content

Commit

Permalink
Change bitfield <compound>s to <bitfield>s
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed Dec 27, 2016
1 parent 8a3a366 commit 666f4c7
Show file tree
Hide file tree
Showing 24 changed files with 111 additions and 111 deletions.
2 changes: 1 addition & 1 deletion df.art.xml
Expand Up @@ -68,7 +68,7 @@
<int16_t name='item_subtype' refers-to='(item-subtype-target $$._parent.item_type $)'/>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int16_t name='mat_index'/>
<compound name='flags' type-name='item_flags'/>
<bitfield name='flags' type-name='item_flags'/>
<int32_t name='item_id' ref-target='item'/>
</class-type>

Expand Down
6 changes: 3 additions & 3 deletions df.building-raws.xml
Expand Up @@ -69,9 +69,9 @@
<stl-string name='reaction_class'/>
<stl-string name='has_material_reaction_product'/>

<compound name='flags1' type-name='job_item_flags1'/>
<compound name='flags2' type-name='job_item_flags2'/>
<compound name='flags3' type-name='job_item_flags3'/>
<bitfield name='flags1' type-name='job_item_flags1'/>
<bitfield name='flags2' type-name='job_item_flags2'/>
<bitfield name='flags3' type-name='job_item_flags3'/>
<uint32_t name='flags4'/>
<uint32_t name='flags5'/>

Expand Down
24 changes: 12 additions & 12 deletions df.buildings.xml
Expand Up @@ -234,7 +234,7 @@
<int32_t name='centery'/>
<int32_t name='z'/>

<compound name='flags' type-name='building_flags'/>
<bitfield name='flags' type-name='building_flags'/>

<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index' init-value='-1'/>
Expand Down Expand Up @@ -785,12 +785,12 @@
</class-type>

<class-type type-name='building_bars_verticalst' inherits-from='building_actual'>
<compound name='gate_flags' type-name='gate_flags' init-value='1'/>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>

<class-type type-name='building_bars_floorst' inherits-from='building_actual'>
<compound name='gate_flags' type-name='gate_flags' init-value='1'/>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>

Expand Down Expand Up @@ -820,7 +820,7 @@
</class-type>

<class-type type-name='building_bridgest' inherits-from='building_actual'>
<compound name='gate_flags' type-name='gate_flags' init-value='1'/>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
<enum name='direction' base-type='int8_t'>
<enum-item name='Retracting' value='-1'/>
Expand Down Expand Up @@ -915,7 +915,7 @@
</class-type>

<class-type type-name='building_doorst' inherits-from='building_actual'>
<compound name='door_flags' type-name='door_flags' init-value='0x50'/>
<bitfield name='door_flags' type-name='door_flags' init-value='0x50'/>
<int16_t name='close_timer'/>
</class-type>

Expand All @@ -932,22 +932,22 @@
</class-type>

<class-type type-name='building_floodgatest' inherits-from='building_actual'>
<compound name='gate_flags' type-name='gate_flags' init-value='1'/>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>

<class-type type-name='building_grate_floorst' inherits-from='building_actual'>
<compound name='gate_flags' type-name='gate_flags' init-value='1'/>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>

<class-type type-name='building_grate_wallst' inherits-from='building_actual'>
<compound name='gate_flags' type-name='gate_flags' init-value='1'/>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>

<class-type type-name='building_hatchst' inherits-from='building_actual'>
<compound name='door_flags' type-name='door_flags' init-value='0x50'/>
<bitfield name='door_flags' type-name='door_flags' init-value='0x50'/>
<int16_t name='close_timer'/>
</class-type>

Expand All @@ -958,7 +958,7 @@
</bitfield-type>

<class-type type-name='building_hivest' inherits-from='building_actual'>
<compound name='hive_flags' type-name='hive_flags'/>
<bitfield name='hive_flags' type-name='hive_flags'/>
<int32_t name='split_timer' comment='up to 100800'/>
<int32_t name='activity_timer' comment='up to 100800000; checks timer%hive_product.time[i]==0'/>
<int32_t name='install_timer' comment='down from 1200'/>
Expand Down Expand Up @@ -1115,13 +1115,13 @@
<class-type type-name='building_wagonst' inherits-from='building_actual'/>

<class-type type-name='building_weaponst' inherits-from='building_actual'>
<compound name='gate_flags' type-name='gate_flags' init-value='1'/>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>

<struct-type type-name='building_squad_use'>
<int32_t name='squad_id' ref-target='squad'/>
<compound name='mode' type-name='squad_use_flags'/>
<bitfield name='mode' type-name='squad_use_flags'/>
</struct-type>

<class-type type-name='building_weaponrackst' inherits-from='building_actual'>
Expand Down
4 changes: 2 additions & 2 deletions df.entities.xml
Expand Up @@ -951,7 +951,7 @@
<int16_t name='image_thread_color' ref-target='descriptor_color'/>
<enum base-type='int16_t' name='image_material_class' type-name='entity_material_category'/>
<int16_t name='maker_race'/>
<compound name="indiv_choice" type-name='uniform_indiv_choice'/>
<bitfield name="indiv_choice" type-name='uniform_indiv_choice'/>
<int16_t name="mattype" ref-target='material' aux-value='$$.matindex'/>
<int32_t name="matindex"/>
<enum base-type='int16_t' name="material_class" type-name='entity_material_category'/>
Expand Down Expand Up @@ -983,7 +983,7 @@

<stl-string name="name"/>

<compound name='flags' type-name='uniform_flags'/>
<bitfield name='flags' type-name='uniform_flags'/>
</struct-type>

<enum-type type-name='entity_event_type'>
Expand Down
2 changes: 1 addition & 1 deletion df.history.xml
Expand Up @@ -312,7 +312,7 @@

<int8_t name='sex' comment='-1 n/a, 0 female, 1 male'/>

<compound type-name='orientation_flags' name='orientation_flags'/>
<bitfield type-name='orientation_flags' name='orientation_flags'/>
<int32_t name='appeared_year'/>
<int32_t name='born_year'/>
<int32_t name='born_seconds'/>
Expand Down
2 changes: 1 addition & 1 deletion df.interaction.xml
Expand Up @@ -81,7 +81,7 @@

<class-type type-name='interaction_effect_cleanst' inherits-from='interaction_effect'>
<int32_t name='grime_level'/>
<compound name='syndrome_tag' type-name='syndrome_flags'/>
<bitfield name='syndrome_tag' type-name='syndrome_flags'/>
<int32_t/>
</class-type>

Expand Down
2 changes: 1 addition & 1 deletion df.itemimprovements.xml
Expand Up @@ -213,7 +213,7 @@
<enum base-type='int32_t' name="skill_rating" type-name='skill_rating'
comment='at the moment of creation'/>
<compound name='pos' type-name='coord'/>
<compound name='flags' type-name='engraving_flags'/>
<bitfield name='flags' type-name='engraving_flags'/>
<int8_t name='tile'/>
<int32_t name='art_id' ref-target='art_image_chunk'/>
<int16_t name='art_subid' ref-target='art_image' aux-value='$$.art_id'/>
Expand Down
14 changes: 7 additions & 7 deletions df.items.xml
Expand Up @@ -141,8 +141,8 @@
instance-vector='$global.world.items.all' key-field='id'>
<compound name='pos' type-name='coord'/>

<compound name='flags' type-name='item_flags'/>
<compound name='flags2' type-name='item_flags2' since='v0.34.08'/>
<bitfield name='flags' type-name='item_flags'/>
<bitfield name='flags2' type-name='item_flags2' since='v0.34.08'/>

<uint32_t name='age'/>
<int32_t name='id'/>
Expand Down Expand Up @@ -919,7 +919,7 @@

<class-type type-name='item_liquipowder' inherits-from='item_actual'
original-name='item_liquipowderst'>
<compound name='mat_state' type-name='item_matstate'/>
<bitfield name='mat_state' type-name='item_matstate'/>
<int32_t name='dimension' init-value='150'/>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
Expand Down Expand Up @@ -1009,7 +1009,7 @@
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='rot_timer'/>
<compound name='mat_state' type-name='item_matstate'/>
<bitfield name='mat_state' type-name='item_matstate'/>
<int32_t/>
</class-type>
<class-type type-name='item_remainsst' inherits-from='item_actual'>
Expand Down Expand Up @@ -1107,11 +1107,11 @@
comment='-1 if no father genes'/>
<int32_t since='v0.40.01'/>

<compound name='hatchling_flags1' type-name='unit_flags1'
<bitfield name='hatchling_flags1' type-name='unit_flags1'
comment='used primarily for bit_flag:tame'/>
<compound name='hatchling_flags2' type-name='unit_flags2'
<bitfield name='hatchling_flags2' type-name='unit_flags2'
comment='used primarily for bit_flag:roaming_wilderness_population_source'/>
<compound name='hatchling_flags3' type-name='unit_flags3'
<bitfield name='hatchling_flags3' type-name='unit_flags3'
comment='not normally used, most/all do not stick'/>

<int32_t name='unk_v42_1' since='v0.42.01'/>
Expand Down
34 changes: 17 additions & 17 deletions df.jobs.xml
Expand Up @@ -105,7 +105,7 @@

<uint32_t name='unk4' comment='garbage, but serialized'/>

<compound name='flags' type-name='job_flags'/>
<bitfield name='flags' type-name='job_flags'/>

<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index' init-value='-1'/>
Expand All @@ -114,9 +114,9 @@
<int16_t name='item_subtype' init-value='-1' comment='for StoreInStockpile: hauler_type'/>

-- For building construction, bit 0 marks if location was updated:
<compound name="item_category" type-name='stockpile_group_set'/>
<bitfield name="item_category" type-name='stockpile_group_set'/>
<int32_t name="hist_figure_id" ref-target='historical_figure'/>
<compound name='material_category' type-name='job_material_category'/>
<bitfield name='material_category' type-name='job_material_category'/>

<stl-string name='reaction_name'/>

Expand Down Expand Up @@ -256,14 +256,14 @@
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index' init-value='-1'/>

<compound name='flags1' type-name='job_item_flags1'/>
<bitfield name='flags1' type-name='job_item_flags1'/>

<int32_t name='quantity' init-value='1'/>
<enum base-type='int16_t' name='vector_id'
type-name='job_item_vector_id' init-value='IN_PLAY'/>

<compound name='flags2' type-name='job_item_flags2'/>
<compound name='flags3' type-name='job_item_flags3'/>
<bitfield name='flags2' type-name='job_item_flags2'/>
<bitfield name='flags3' type-name='job_item_flags3'/>
<uint32_t name='flags4'/>
<uint32_t name='flags5'/>

Expand Down Expand Up @@ -291,18 +291,18 @@
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index' init-value='-1'/>

<compound name="flags1" type-name='job_item_flags1'/>
<bitfield name="flags1" type-name='job_item_flags1'/>

<pointer name="item_vector">
<stl-vector pointer-type='item'/>
</pointer>

<bool name="use_mat_index"/>

<compound name="flags2" type-name='job_item_flags2'/>
<bitfield name="flags2" type-name='job_item_flags2'/>
<bool name="use_flags2"/>

<compound name="flags3" type-name='job_item_flags3'/>
<bitfield name="flags3" type-name='job_item_flags3'/>
<bool name="use_flags3"/>

<uint32_t name='flags4'/>
Expand Down Expand Up @@ -395,15 +395,15 @@
<int16_t name="mat_type" ref-target='material' aux-value='$$.mat_index' init-value='-1'/>
<int32_t name="mat_index" init-value='-1'/>

<compound name="item_category" type-name='stockpile_group_set'/>
<bitfield name="item_category" type-name='stockpile_group_set'/>
<int32_t name="hist_figure_id" ref-target='historical_figure' init-value='-1'/>
<compound name="material_category" type-name='job_material_category'/>
<bitfield name="material_category" type-name='job_material_category'/>

<compound name='art_spec' type-name='job_art_specification'/>

<int16_t name="amount_left" />
<int16_t name="amount_total" />
<compound name="status" type-name='manager_order_status'/>
<bitfield name="status" type-name='manager_order_status'/>
<enum base-type='int32_t' name="frequency">
<enum-item name='OneTime'/>
<enum-item name='Daily'/>
Expand Down Expand Up @@ -434,9 +434,9 @@
<int16_t name='item_subtype' refers-to='(item-subtype-target $$._parent.item_type $)' init-value='-1'/>
<int16_t name="mat_type" ref-target='material' aux-value='$$.mat_index' init-value='-1'/>
<int32_t name="mat_index" init-value='-1'/>
<compound name='flags1' type-name='job_item_flags1'/>
<compound name='flags2' type-name='job_item_flags2'/>
<compound name='flags3' type-name='job_item_flags3'/>
<bitfield name='flags1' type-name='job_item_flags1'/>
<bitfield name='flags2' type-name='job_item_flags2'/>
<bitfield name='flags3' type-name='job_item_flags3'/>
<uint32_t name='flags4'/>
<uint32_t name='flags5'/>
<stl-string name='reaction_class'/>
Expand Down Expand Up @@ -464,9 +464,9 @@
<int16_t name='item_subtype' refers-to='(item-subtype-target $$._parent.item_type $)'/>
<int16_t name="mat_type" ref-target='material' aux-value='$$.mat_index'/>
<int32_t name="mat_index"/>
<compound name="item_category" type-name='stockpile_group_set'/>
<bitfield name="item_category" type-name='stockpile_group_set'/>
<int32_t name="hist_figure_id" ref-target='historical_figure' init-value='-1'/>
<compound name="material_category" type-name='job_material_category'/>
<bitfield name="material_category" type-name='job_material_category'/>
<int8_t init-value='1'/>
</struct-type>

Expand Down
28 changes: 14 additions & 14 deletions df.knowledge.xml
Expand Up @@ -392,20 +392,20 @@
<!-- the compound below does not work because bitfields have constructors -->
<!--
<compound name='flags' is-union='true'>
<compound name='flags_0' type-name='knowledge_scholar_flags_0'/>
<compound name='flags_1' type-name='knowledge_scholar_flags_1'/>
<compound name='flags_2' type-name='knowledge_scholar_flags_2'/>
<compound name='flags_3' type-name='knowledge_scholar_flags_3'/>
<compound name='flags_4' type-name='knowledge_scholar_flags_4'/>
<compound name='flags_5' type-name='knowledge_scholar_flags_5'/>
<compound name='flags_6' type-name='knowledge_scholar_flags_6'/>
<compound name='flags_7' type-name='knowledge_scholar_flags_7'/>
<compound name='flags_8' type-name='knowledge_scholar_flags_8'/>
<compound name='flags_9' type-name='knowledge_scholar_flags_9'/>
<compound name='flags_10' type-name='knowledge_scholar_flags_10'/>
<compound name='flags_11' type-name='knowledge_scholar_flags_11'/>
<compound name='flags_12' type-name='knowledge_scholar_flags_12'/>
<compound name='flags_13' type-name='knowledge_scholar_flags_13'/>
<bitfield name='flags_0' type-name='knowledge_scholar_flags_0'/>
<bitfield name='flags_1' type-name='knowledge_scholar_flags_1'/>
<bitfield name='flags_2' type-name='knowledge_scholar_flags_2'/>
<bitfield name='flags_3' type-name='knowledge_scholar_flags_3'/>
<bitfield name='flags_4' type-name='knowledge_scholar_flags_4'/>
<bitfield name='flags_5' type-name='knowledge_scholar_flags_5'/>
<bitfield name='flags_6' type-name='knowledge_scholar_flags_6'/>
<bitfield name='flags_7' type-name='knowledge_scholar_flags_7'/>
<bitfield name='flags_8' type-name='knowledge_scholar_flags_8'/>
<bitfield name='flags_9' type-name='knowledge_scholar_flags_9'/>
<bitfield name='flags_10' type-name='knowledge_scholar_flags_10'/>
<bitfield name='flags_11' type-name='knowledge_scholar_flags_11'/>
<bitfield name='flags_12' type-name='knowledge_scholar_flags_12'/>
<bitfield name='flags_13' type-name='knowledge_scholar_flags_13'/>
</compound>
-->
</struct-type>
Expand Down
2 changes: 1 addition & 1 deletion df.language.xml
Expand Up @@ -175,7 +175,7 @@

<padding size='7' comment='looks like garbage'/>

<compound name='flags' type-name='language_word_flags'/>
<bitfield name='flags' type-name='language_word_flags'/>

<stl-vector pointer-type='stl-string' name='str' since='v0.40.01'/>
</struct-type>
Expand Down
2 changes: 1 addition & 1 deletion df.machines.xml
Expand Up @@ -29,7 +29,7 @@
<struct-type type-name='machine_tile_set'>
<compound name='tiles' type-name='coord_path'/>
<stl-vector name='can_connect'>
<compound type-name='machine_conn_modes'/>
<bitfield type-name='machine_conn_modes'/>
</stl-vector>
</struct-type>

Expand Down

0 comments on commit 666f4c7

Please sign in to comment.