Issue #17 Updated datarefs for X-Plane 11.50

This commit is contained in:
Mat Sutcliffe
2020-08-12 20:08:10 +01:00
parent 3ea0c7f2a5
commit c615b45e78
2 changed files with 5506 additions and 98 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -41,6 +41,19 @@ unless (open $fh, '<', $filename)
usage();
}
our @keywords = qw(
alignas alignof and and_eq asm atomic_cancel atomic_commit atomic_noexcept
auto bitand bitor bool break case catch char char8_t char16_t char32_t class
compl concept const consteval constexpr constinit const_cast continue
co_await co_return co_yield decltype default delete do double dynamic_cast
else enum explicit export extern false float for friend goto if inline int
long mutable namespace new noexcept not not_eq nullptr operator or or_eq
private protected public reflexpr register reinterpret_cast requires return
short signed sizeof static static_assert static_cast struct switch
synchronized template this thread_local throw true try typedef typeid
typename union unsigned using virtual void volatile wchar_t while xor xor_eq
);
my %hierarchy;
while (<$fh>)
@@ -57,7 +70,7 @@ while (<$fh>)
my $size;
$type =~ m"(\w+)\[(\d+)\]" and ($type, $size) = ($1, $2);
my @namespaces = split '/', $dataref;
my @namespaces = map sanitize($_), split '/', $dataref;
my $class = pop @namespaces;
$class =~ s(\])()g;
$class =~ s(\[)(_)g;
@@ -153,4 +166,11 @@ ${in}};
EOF
}
}
}
}
sub sanitize
{
my ($name) = @_;
$name .= '_' if grep $_ eq $name, @keywords;
return $name;
}