ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/bin/cfxmlrender
(Generate patch)

Comparing deliantra/Deliantra/bin/cfxmlrender (file contents):
Revision 1.7 by elmex, Fri May 18 15:58:54 2007 UTC vs.
Revision 1.8 by root, Tue Jan 15 11:54:55 2008 UTC

52 my $out; 52 my $out;
53 53
54 unless ($wr) { 54 unless ($wr) {
55 $tree = dclone $tree; 55 $tree = dclone $tree;
56 $wr = XML::Writer->new ( 56 $wr = XML::Writer->new (
57 OUTPUT => \$out, DATA_INDENT => 3, DATA_MODE => 1 57 OUTPUT => \$out,
58 ); 58 DATA_INDENT => 3,
59 DATA_MODE => 1
60 );
59 } 61 }
60 62
61 require Data::Dumper; 63 require Data::Dumper;
62 while (@$tree) { 64 while (@$tree) {
63 my $tag = shift @$tree; 65 my $tag = shift @$tree;
349 $png = "$cfg->{archname}.png"; 351 $png = "$cfg->{archname}.png";
350 } 352 }
351 } else { 353 } else {
352 $png = "${filebase}_dir_${d}.png"; 354 $png = "${filebase}_dir_${d}.png";
353 } 355 }
356
354 system ("convert ${filebase}_dir_${d}.tga $png"); 357 system "convert", "${filebase}_dir_${d}.tga", $png;
358 system "optipng", $png;
359
355 print "saved arch png to: $png\n"; 360 print "saved arch png to: $png\n";
361
356 if ($cfg->{archpath} and $ENV{CFDEV_ROOT}) { 362 if ($cfg->{archpath} and $ENV{CFDEV_ROOT}) {
357 my $archpath = $ENV{CFDEV_ROOT}.'/'.$cfg->{archpath}; 363 my $archpath = "$ENV{CFDEV_ROOT}/arch/$cfg->{archpath}";
358 system ("cp", $png, "$archpath/$png"); 364 system "cp", $png, "$archpath/$png";
359 print "copied $png to $archpath/$png\n"; 365 print "copied $png to $cfg->{archpath}/$png\n";
360 } 366 }
367
361 unlink $ofile; 368 unlink $ofile;
362 } 369 }
363} 370}
371

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines