2024-03-08 01:44:57 +01:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use v5.16.3;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Path::Tiny;
|
|
|
|
|
|
|
|
my $pokemons_dir = path 'pokeemerald/graphics/pokemon/';
|
|
|
|
my $tempdir = Path::Tiny->tempdir;
|
|
|
|
my $shiny_dir = path 'resources/shiny';
|
|
|
|
$shiny_dir->mkpath;
|
|
|
|
for my $pokemon_dir ( $pokemons_dir->children ) {
|
|
|
|
my $bpp = $tempdir->child( $pokemon_dir->basename . '.4bpp' );
|
|
|
|
say $pokemon_dir->basename;
|
2024-03-08 03:54:27 +01:00
|
|
|
my $front = $pokemon_dir->child('front.png');
|
|
|
|
my $shiny = $pokemon_dir->child('shiny.pal');
|
|
|
|
if ($pokemon_dir->basename eq 'unown') {
|
|
|
|
$front = $pokemon_dir->child('z/front.png');
|
|
|
|
}
|
|
|
|
if ($pokemon_dir->basename eq 'castform') {
|
|
|
|
$front = $pokemon_dir->child('normal/front.png');
|
|
|
|
$shiny = $pokemon_dir->child('normal/shiny.pal');
|
|
|
|
}
|
2024-03-08 01:44:57 +01:00
|
|
|
system './pokeemerald/tools/gbagfx/gbagfx',
|
2024-03-08 03:54:27 +01:00
|
|
|
$front, $bpp;
|
2024-03-08 01:44:57 +01:00
|
|
|
system './pokeemerald/tools/gbagfx/gbagfx',
|
|
|
|
$bpp, $shiny_dir->child( $pokemon_dir->basename . '.png' ),
|
2024-03-08 03:54:27 +01:00
|
|
|
'-palette', $shiny, '-mwidth', 8, '-object';
|
2024-03-08 01:44:57 +01:00
|
|
|
}
|