Skip to content

Commit

Permalink
Merge branch 'master' into 47
Browse files Browse the repository at this point in the history
  • Loading branch information
quietust authored Jun 26, 2020
2 parents 56d2d60 + b94b245 commit b1a3307
Show file tree
Hide file tree
Showing 29 changed files with 712 additions and 191 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ jobs:
echo codegen produced error
exit 1
fi
- name: Verify list.pl output
run: |
ls codegen | sort | grep -v codegen.out.xml > ls.out
perl ./list.pl | cut -d/ -f2 | sort > list.pl.out
diff ls.out list.pl.out
2 changes: 2 additions & 0 deletions data-definition.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@

<xs:attribute name="is-union" type="xs:boolean">
</xs:attribute>
<xs:attribute name="original-name">
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Expand Down
34 changes: 27 additions & 7 deletions df.advmode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,26 @@
<int32_t name='unk_47'/>

<compound name='unk_3170'>
<stl-vector name='unk_1'/>
<stl-vector name='unk_1' since='v0.44.10'>
<pointer>
<compound name='unk_0' type-name='entity_event'/>
<int32_t name='unk_28'/>
<int32_t name='unk_2c' init-value='-1'/>
<int32_t name='unk_30' init-value='-1'/>
<int32_t name='unk_34' init-value='-1'/>
<int32_t name='unk_38' init-value='-1'/>
<int32_t name='unk_3c' init-value='-1000000'/>
<int32_t name='unk_40' init-value='-1000000'/>
<int32_t name='unk_44' init-value='-1000000'/>
<int32_t name='unk_48' init-value='-1'/>
<int32_t name='unk_4c' init-value='-1'/>
<int32_t name='unk_50' init-value='-1'/>
<int32_t name='unk_54' init-value='-1'/>
<int32_t name='unk_58' init-value='-1000000'/>
<int32_t name='unk_5c' init-value='-1000000'/>
<int32_t name='unk_60' init-value='-1000000'/>
</pointer>
</stl-vector>
<static-array name='unk_2' count='17'>
<stl-vector name='unk_1'/>
<stl-vector name='unk_2'/>
Expand Down Expand Up @@ -663,11 +682,12 @@
<int32_t since='v0.47.01'/>

<compound name='interactions'>
<stl-vector name='unk_85'/>
<stl-vector type-name='int32_t' since='v0.47.01'/>
<stl-vector type-name='int32_t' since='v0.47.01'/>

<stl-vector name='unk_85' type-name='int32_t'/>
<stl-vector name='unk_86'/>

<stl-vector since='v0.47.01'/>
<stl-vector since='v0.47.01'/>
<stl-vector since='v0.47.01'/>
<int32_t name='unk_1e4'/>
<int32_t name='unk_1e8'/>
Expand Down Expand Up @@ -717,7 +737,7 @@
<int16_t name='unk_s7'/>
<int16_t name='unk_s8'/>
<int32_t name='unk_s9'/>
<int32_t name='unk_s10'/>
<int32_t name='unk_s10' since='v0.40.01'/>
</static-array>
<int32_t name='unk_v40_4b'/>
</compound>
Expand Down Expand Up @@ -931,8 +951,8 @@

<class-type type-name='adventure_item_interact_choicest'>
<virtual-methods>
<vmethod><pointer/></vmethod>
<vmethod/>
<vmethod name='getDescription'><pointer type-name='stl-string'/></vmethod>
<vmethod name='performAction'/>
<vmethod is-destructor='true'/>
</virtual-methods>
</class-type>
Expand Down
12 changes: 9 additions & 3 deletions df.announcements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@

<int32_t name='repeat_count' comment='100 => displays: x101'/>

<int32_t name='unk_4410_1' since='v0.44.10'/>
<enum base-type='int32_t' type-name='report_zoom_type' name='zoom_type' since='v0.44.10'/>
<compound name='pos' type-name='coord'/>
<int32_t name='unk_4410_2' since='v0.44.10'/>
<compound name='unit_pos' type-name='coord' since='v0.44.10'/>
<enum base-type='int32_t' type-name='report_zoom_type' name='zoom_type2' since='v0.44.10'/>
<compound name='pos2' type-name='coord' since='v0.44.10'/>

<int32_t name='id'/>
<int32_t name='year'/>
Expand All @@ -435,6 +435,12 @@
<int32_t name='speaker_id' init-value='-1' since='v0.40.01' comment='unit speaking the conversation'/>
</struct-type>

<enum-type type-name='report_zoom_type' base-type='int32_t'>
<enum-item name='Generic'/>
<enum-item name='Item'/>
<enum-item name='Unit'/>
</enum-type>

<struct-type type-name='popup_message'>
<stl-string name='text'/>

Expand Down
4 changes: 2 additions & 2 deletions df.art.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<vmethod name='write_file'> <pointer name='file' type-name='file_compressorst'/> </vmethod>
<vmethod name='read_file'>
<pointer name='file' type-name='file_compressorst'/>
<int32_t name='loadversion'/>
<enum name='loadversion' type-name='save_version'/>
</vmethod>
<vmethod ret-type='art_image_element_type' name='getType'/>
<vmethod name='setID'> <int32_t name='ID' comment='race, item type, plant ID, or shape ID'/> </vmethod>
Expand Down Expand Up @@ -83,7 +83,7 @@
<vmethod name='write_file'> <pointer name='file' type-name='file_compressorst'/> </vmethod>
<vmethod name='read_file'>
<pointer name='file' type-name='file_compressorst'/>
<int32_t name='loadversion'/>
<enum name='loadversion' type-name='save_version'/>
</vmethod>
<vmethod ret-type='art_image_property_type' name='getType'/>
<vmethod is-destructor='true'/>
Expand Down
4 changes: 2 additions & 2 deletions df.buildings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
<vmethod name='write_file'> <pointer name='file' type-name='file_compressorst'/> </vmethod>
<vmethod name='read_file'>
<pointer name='file' type-name='file_compressorst'/>
<int32_t name='loadversion'/>
<enum name='loadversion' type-name='save_version'/>
</vmethod>
<vmethod ret-type='bool' name='isImpassableAtCreation'
comment='the true set looks like things where the unit should stand aside'/>
Expand Down Expand Up @@ -675,7 +675,7 @@
<flag-bit name='gather_fallen'/>
</bitfield>
<int32_t name='unk_v4014_1' since='v0.40.14'/>
<stl-vector name='unk_v43_1' since='v0.43.01'/>
<stl-vector name='unk_v43_1' type-name='int32_t' since='v0.43.01'/>
</class-type>

-- actual --
Expand Down
28 changes: 15 additions & 13 deletions df.entities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
<flag-bit name='seized'/>
<flag-bit name='offended'/>
<flag-bit name='announce' comment='display merchantintro and merchantexit'/>
<flag-bit name='greatly_offended'/>
<flag-bit name='tribute' comment='caravan is delivering tribute (not merchant caravan)'/>
</bitfield>
<int32_t name='import_value'/>
<int32_t name='export_value_total'/>
Expand Down Expand Up @@ -350,9 +352,9 @@
<stl-vector name='unk_v47_3' type-name='int32_t' comment="some enum?"/>
<stl-vector name='agreement' type-name='int32_t' ref-target='agreement'/>
<stl-vector name='unk_v47_5' type-name='int32_t' comment="boolean?"/>
<stl-vector name='unk_v47_6' type-name='int32_t' comment="4 byte data size seen, so not pointer"/>
<stl-vector name='unk_v47_7' type-name='int32_t' comment="4 byte data size seen, so not pointer"/>
<stl-vector name='unk_v47_8' type-name='int32_t' comment="4 byte data size seen, so not pointer"/>
<stl-vector name='unk_v47_6' type-name='int32_t'/>
<stl-vector name='unk_v47_7' type-name='int32_t'/>
<stl-vector name='unk_v47_8' type-name='int32_t'/>
<int32_t name='unk_v47_9'/>
</struct-type>

Expand Down Expand Up @@ -445,7 +447,7 @@
<stl-vector name='instrument_type' type-name='int16_t' ref-target='itemdef_instrumentst'/>
<stl-vector name='siegeammo_type' type-name='int16_t' ref-target='itemdef_siegeammost'/>
<stl-vector name='tool_type' type-name='int16_t' ref-target='itemdef_toolst'/>
<stl-vector type-name='int16_t' since='v0.42.01'/>
<stl-vector type-name='int32_t' since='v0.42.01'/>

<compound name='metal'>
<compound name='pick' type-name='material_vec_ref'/>
Expand Down Expand Up @@ -601,7 +603,7 @@
<stl-vector name='historic_events' type-name='int32_t' ref-target='history_event'/>
<stl-vector name='historic_events_collection' type-name='int32_t' ref-target='history_event_collection' comment="seen with war_event_collection set"/>
<int32_t comment="0, 1, 4 seen. Non zero seen with relation 0/1"/>
<int32_t comment="0-3 seen. Non zero seen with relation 3/4"/>
<enum base-type='int32_t' type-name='season' name='tribute_season'/>
</pointer>
</stl-vector>

Expand Down Expand Up @@ -683,8 +685,8 @@
<pointer name='unk_v47_1' since='v0.47.01'>
<stl-vector name='unk_v47_1' pointer-type='entity_unk_v47_1'/>
<stl-vector name='foiled_plot_agreements' type-name='int32_t' ref-target='agreement' comment="Mostly a guess. The foiled plot agreement out of 2 appeared here"/>
<stl-vector name='unk_v47_3'/>
<int32_t name='unk_v47_4' comment="0 and 1 seen, so might be boolean"/>
<stl-vector name='unk_v47_3' type-name='int32_t'/>
<int32_t name='unk_v47_4' comment="0 and 1 seen, but definitely int32"/>
</pointer>

<stl-vector name='divination_sets' type-name='int32_t' since='v0.47.01' comment="Guess. Only on religions, but not all. start at 350 and added sequentially in Religion formation order. Last religion # = last divination set index"/>
Expand All @@ -698,10 +700,10 @@
<int16_t name='unk47' comment='in 0.23, last communicate season'/>
<int32_t name='unk48' comment='in 0.23, last communicate year'/>

<int32_t name='unk49a' comment='in 0.23, imports'/>
<int32_t name='unk49b' comment='in 0.23, exports'/>
<int32_t name='unk49c' comment='in 0.23, recent offerings'/>
<static-array name='unk49d' count='10' type-name='int32_t' comment='in 0.23, offerings history'/>
<int32_t name='imports_from'/>
<int32_t name='offerings_from'/>
<int32_t name='offerings_recent' comment='since the last migrant wave or diplomat visit'/>
<static-array name='offerings_history' count='10' type-name='int32_t' comment='rotated yearly at 15th of Timber'/>
<int32_t name='unk49e' comment='in 0.23, hostility level - determined siege size, had a chance to reset to 1'/>
<int32_t name='unk49f' comment='in 0.23, determined siege size'/>
<int32_t since='v0.40.01'/>
Expand Down Expand Up @@ -1326,8 +1328,8 @@
<pointer>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t name='year'/>
<int32_t name='tick'/>
</pointer>
</stl-vector>
</struct-type>
Expand Down
2 changes: 1 addition & 1 deletion df.entity-raws.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
<static-array name='start_biome' type-name='int8_t' count='51' index-enum='biome_type'/>
<static-array name='settlement_biome' type-name='int8_t' count='51' index-enum='biome_type'/>

<static-array name='active_season' type-name='int8_t' count='4'/>
<static-array name='active_season' type-name='int8_t' count='4' index-enum='season'/>
<!-- </compound> -->

<compound name='progress_trigger'>
Expand Down
13 changes: 9 additions & 4 deletions df.globals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,15 @@

-- .bss primitive

<global-object name='version' type-name='int32_t'/>
<global-object name='min_load_version' type-name='int32_t'/>
<global-object name='movie_version' type-name='int32_t'/>
<global-object name='version'>
<enum base-type='int32_t' type-name='save_version'/>
</global-object>
<global-object name='min_load_version'>
<enum base-type='int32_t' type-name='save_version'/>
</global-object>
<global-object name='movie_version'>
<enum base-type='int32_t' type-name='cmv_version'/>
</global-object>
<global-object name='basic_seed' type-name='int32_t'/>

<global-object name='activity_next_id' type-name='int32_t'/>
Expand Down Expand Up @@ -256,7 +262,6 @@
<global-object name='cur_season'>
<enum type-name='season_type' base-type='int8_t'/>
</global-object>
<!-- <global-object name='cur_season' type-name='int8_t'/>-->
<global-object name='cur_season_tick' type-name='int32_t'/>

<global-object name='current_weather'>
Expand Down
49 changes: 45 additions & 4 deletions df.graphics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,53 @@
<int64_t name='quad_part'/>
</struct-type>

<struct-type type-name='graphic'>
<struct-type type-name='musicsoundst'>
<int32_t name='soft_channel_number'/>
<int32_t name='song' init-value='-1' refers-to='$$._parent.mod[$]'/>
<bool name='music_active'/>
<bool name='sound_priority'/>
<int32_t name='sound_playing'/>
<bool name='on'/>
<pointer name='fmod_system'/>
<pointer name='fmod_master_channel_group'/>
<static-array name='mod' count='1000' type-name='fmod_sound' comment='songs'/>
<static-array name='samp' count='1000' type-name='fmod_sound' comment='sound effects'/>
<enum name='linux_sound_system'>
<enum-item name='ALSA'/>
<enum-item name='OSS'/>
<enum-item name='ESD'/>
</enum>
</struct-type>

<struct-type type-name='fmod_sound' original-name='fmodSound'>
<pointer name='sound'/>
<pointer name='channel'/>
</struct-type>

<enum-type type-name='curses_color' base-type='uint8_t'>
Using the color names without "dark" or "light", favoring primaries.
<enum-item name='Black'/>
<enum-item name='Blue'/>
<enum-item name='Green'/>
<enum-item name='Cyan'/>
<enum-item name='Red'/>
<enum-item name='Magenta'/>
<enum-item name='Yellow'/>
<enum-item name='White'/>
</enum-type>

<bitfield-type type-name='cmv_attribute' base-type='uint8_t'>
<flag-bit name='fg' count='3' type-name='curses_color'/>
<flag-bit name='bg' count='3' type-name='curses_color'/>
<flag-bit name='bright'/>
</bitfield-type>

<struct-type type-name='graphic' original-name='graphicst'>
<long name='screenx'/>
<long name='screeny'/>
<int8_t name='screenf'/>
<int8_t name='screenb'/>
<int8_t name='screenbright'/>
<enum name='screenf' type-name='curses_color'/>
<enum name='screenb' type-name='curses_color'/>
<bool name='screenbright'/>

<pointer type-name='uint8_t' name='screen' is-array='true'/>
<pointer type-name='long' name='screentexpos' is-array='true'/>
Expand Down
Loading

0 comments on commit b1a3307

Please sign in to comment.