Skip to content

Commit

Permalink
Merge pull request #630 from ab9rf/future
Browse files Browse the repository at this point in the history
update some viewscreens to use `std::future`
  • Loading branch information
myk002 authored Aug 5, 2023
2 parents 1ab1458 + 3baf5d6 commit ce973e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions StructFields.pm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ my %custom_primitive_handlers = (
'stl-fstream' => sub { header_ref("fstream"); return "std::fstream"; },
'stl-mutex' => sub { header_ref("mutex"); return "std::mutex"; },
'stl-condition-variable' => sub { header_ref("condition_variable"); return "std::condition_variable"; },
'stl-future' => sub { header_ref("future"); return "std::future<void>"; },
);

my %custom_primitive_inits = (
Expand Down
1 change: 1 addition & 0 deletions data-definition.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
<xs:element name="stl-fstream" type="OpaqueField" />
<xs:element name="stl-mutex" type="OpaqueField" />
<xs:element name="stl-condition-variable" type="OpaqueField" />
<xs:element name="stl-future" type="OpaqueField" />
<xs:element name="df-linked-list" type="DfLinkedListField" />
<xs:element name="df-array" type="DfArrayField" />
<xs:element name="df-flagarray" type="DfFlagArrayField" />
Expand Down
7 changes: 3 additions & 4 deletions df.viewscreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@
<class-type type-name='viewscreen_initial_prepst' inherits-from='viewscreen'>
<int32_t name='render_count'/>
<int32_t name='logic_step'/>
<stl-future name='unk_90'/>
</class-type>

<class-type type-name='world_gen_param_basest'>
Expand Down Expand Up @@ -845,10 +846,8 @@
<stl-vector pointer-type='legend_pagest' name='page'/>
<int32_t name='active_page_index'/>
<int32_t name='page_scroll'/>
<pointer name='unk_338'/>
<int32_t name='unk_340'/>
<int32_t name='unk_344'/>
<int32_t name='unk_348'/>
<stl-future name='unk_338'/>
<int8_t name='unk_348'/>
</class-type>

<struct-type type-name='loadgame_save_info'>
Expand Down
3 changes: 2 additions & 1 deletion lower-1.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,10 @@ Error: field <xsl:value-of select='$enum-key'/> corresponds to an enum value of
<prim-type ld:meta='primitive' ld:subtype='stl-fstream'/>
<prim-type ld:meta='primitive' ld:subtype='stl-mutex'/>
<prim-type ld:meta='primitive' ld:subtype='stl-condition-variable'/>
<prim-type ld:meta='primitive' ld:subtype='stl-future'/>
</ld:primitive-types>

<xsl:template match='int8_t|uint8_t|int16_t|uint16_t|int32_t|uint32_t|int64_t|uint64_t|size_t|ssize_t|long|ulong|bool|flag-bit|s-float|d-float|padding|static-string|ptr-string|stl-string|stl-fstream|stl-mutex|stl-condition-variable'>
<xsl:template match='int8_t|uint8_t|int16_t|uint16_t|int32_t|uint32_t|int64_t|uint64_t|size_t|ssize_t|long|ulong|bool|flag-bit|s-float|d-float|padding|static-string|ptr-string|stl-string|stl-fstream|stl-mutex|stl-condition-variable|stl-future'>
<xsl:param name='level' select='-1'/>
<ld:field>
<xsl:apply-templates select='@*'/>
Expand Down

0 comments on commit ce973e9

Please sign in to comment.