… | |
… | |
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 | |
|
|
499 | |
500 | my $meta = load_cached "$dir/meta", sub { JSON::XS::from_json shift }; |
500 | my $meta = load_cached "$dir/meta", sub { JSON::XS->new->utf8->relaxed->decode (shift) }; |
501 | |
501 | |
502 | next if $meta && !exists $meta->{$file}; |
502 | utf8::decode $dir; |
|
|
503 | utf8::decode $file; |
|
|
504 | |
|
|
505 | # a meta file for resources is now mandatory |
|
|
506 | unless (exists $meta->{$file}) { |
|
|
507 | warn "skipping $dir/$file\n" if $VERBOSE >= 3; |
|
|
508 | next; |
|
|
509 | } |
503 | |
510 | |
504 | $meta = { |
511 | $meta = { |
505 | %{ $meta->{"" } || {} }, |
512 | %{ $meta->{"" } || {} }, |
506 | %{ $meta->{$file} || {} }, |
513 | %{ $meta->{$file} || {} }, |
507 | }; |
514 | }; |