… | |
… | |
173 | |
173 | |
174 | (my $base = $stem) =~ s/^.*\///; |
174 | (my $base = $stem) =~ s/^.*\///; |
175 | |
175 | |
176 | my $fi = $FACEINFO{$base}; |
176 | my $fi = $FACEINFO{$base}; |
177 | unless ($fi) { |
177 | unless ($fi) { |
178 | warn "$path: <$base> not referenced by any archetype, skipping.\n"; |
178 | #warn "$path: <$base> not referenced by any archetype, skipping.\n"; |
179 | next; |
179 | #next; |
180 | } |
180 | } |
181 | |
181 | |
182 | my $arc = $FACEINFO{$base}{arc} |
182 | my $arc = $fi->{arc} || { }; |
183 | or die "FATAL: internal error <$base>, cannot continue"; |
|
|
184 | |
183 | |
185 | unless ($path =~ /~$/) { |
184 | unless ($path =~ /~$/) { |
186 | # possibly enlarge |
185 | # possibly enlarge |
187 | if (0 > aio_stat "$stem.64x64.png") { |
186 | if (0 > aio_stat "$stem.64x64.png") { |
188 | my $other = "$stem.64x64.png~"; |
187 | my $other = "$stem.64x64.png~"; |
… | |
… | |
495 | my ($dir, $file, $type) = @$job; |
494 | my ($dir, $file, $type) = @$job; |
496 | |
495 | |
497 | my $data; |
496 | my $data; |
498 | aio_load "$dir/$file", $data; |
497 | aio_load "$dir/$file", $data; |
499 | |
498 | |
500 | my $meta = load_cached "$dir/meta", sub { JSON::XS::from_json shift }; |
499 | my $meta = load_cached "$dir/meta", sub { JSON::XS->new->utf8->relaxed->decode (shift) }; |
501 | |
500 | |
502 | next if $meta && !exists $meta->{$file}; |
501 | next if $meta && !exists $meta->{$file}; |
503 | |
502 | |
504 | $meta = { |
503 | $meta = { |
505 | %{ $meta->{"" } || {} }, |
504 | %{ $meta->{"" } || {} }, |