| 1 |
#!/usr/bin/env perl |
| 2 |
|
| 3 |
use warnings; |
| 4 |
|
| 5 |
for (grep /\.des$/, `git ls-files`) |
| 6 |
{ |
| 7 |
chomp; |
| 8 |
open IN, "<", $_ or die "Can't read $_\n"; |
| 9 |
{ undef local $/; $_ = <IN>; } |
| 10 |
close IN; |
| 11 |
|
| 12 |
$ptile{"\U$_"}=1 for /\b(?:tile|dbname):([^ \n"']+)/mg; #" |
| 13 |
} |
| 14 |
|
| 15 |
for my $file (qw(mon-data.h tilepick.cc tilemcache.cc)) { |
| 16 |
open IN, "<", $file or die "Can't read $file\n"; |
| 17 |
{ undef local $/; $_ = <IN>; } |
| 18 |
close IN; |
| 19 |
$ptile{$_}=1 for /TILEP_(MONS_[A-Z0-9_]+)/mg; |
| 20 |
} |
| 21 |
|
| 22 |
$ptile{$_}=1 for split "\n", <<___; |
| 23 |
MONS_UNKNOWN |
| 24 |
___ |
| 25 |
|
| 26 |
my @tent = qw(E N S W NE NW SE SW); |
| 27 |
for my $i (0..7) |
| 28 |
{ |
| 29 |
for my $mon (qw(MONS_ELDRITCH_TENTACLE MONS_STARSPAWN_TENTACLE MONS_VINE)) |
| 30 |
{ |
| 31 |
$ptile{"${mon}_$tent[$i]"}=1; |
| 32 |
$ptile{"${mon}_SEGMENT_$tent[$i]_$tent[$_]"}=1 for ($i+1..7); |
| 33 |
} |
| 34 |
$ptile{"MONS_ELDRITCH_TENTACLE_PORTAL_$tent[$i]"}=1; |
| 35 |
} |
| 36 |
|
| 37 |
print "$_\n" for sort keys %ptile; |