1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
use DDS;
use Data::Dumper;
use File::Find;
my @dds;
find({
wanted => sub {
if (/(\.svn|CVS)$/)
{
$File::Find::prune = 1;
}
else
{
push @dds, $File::Find::name if /\.dds$/;
}
},
no_chdir => 1,
}, "../../../binaries/data/mods/official/art/textures/");
=pod
for my $f (@dds)
{
my $dds = new DDS($f);
print "$f\t", $dds->getType(), "\n";
}
=cut
#=pod
my @c;
for my $f (@dds)
{
my $dds = new DDS($f);
if ($dds->getType() eq 'ARGB')
{
$f =~ /(.*).dds/ or die;
push @c, $1;
}
}
print "textureconv -tga ".(join ' ', map "$_.dds", @c)."\n";
print "textureconv -abgr ".(join ' ', map "$_.tga", @c)."\n";
=cut
=pod
my $dds = new DDS("../../../binaries/data/mods/official/art/textures/ui/session/status_pane.dds");
print Dumper $dds;
=cut
|