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.10 by root, Tue Apr 8 20:26:32 2008 UTC vs.
Revision 1.11 by elmex, Tue Jan 13 12:49:24 2009 UTC

7use XML::Writer; 7use XML::Writer;
8use Cwd; 8use Cwd;
9use File::Spec::Functions; 9use File::Spec::Functions;
10use strict; 10use strict;
11 11
12our $DEBUG = 0; 12our $DEBUG = 1;
13 13
14sub slurp { open FO, $_[0] or die "Couldn't open $_[0]: $!"; return join '', <FO> } 14sub slurp { open FO, $_[0] or die "Couldn't open $_[0]: $!"; return join '', <FO> }
15 15
16sub read_scene_cfg { 16sub read_scene_cfg {
17 my ($file) = @_; 17 my ($file) = @_;
186 8 => 315 186 8 => 315
187 ); 187 );
188 $a = $dir_to_degree{$dir_n}; 188 $a = $dir_to_degree{$dir_n};
189 $a = deg2rad - $a; # -$a because we want a clockwise rotation 189 $a = deg2rad - $a; # -$a because we want a clockwise rotation
190 190
191 remove_tags ($tree, qw/light render camera background/); 191 remove_tags ($tree, qw/render camera background/);
192 if (!$cfg->{preserve_light}) {
193 remove_tags ($tree, qw/light/);
194 }
192 filter_tags ($tree, 195 filter_tags ($tree,
193 object => sub { 196 object => sub {
194 my ($tag, $con) = @_; 197 my ($tag, $con) = @_;
195 my $ot = 'transform'; 198 my $ot = 'transform';
196 my $om = { 199 my $om = {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines