ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/gde/GCE/Util.pm
(Generate patch)

Comparing deliantra/gde/GCE/Util.pm (file contents):
Revision 1.22 by elmex, Tue Nov 28 16:26:22 2006 UTC vs.
Revision 1.23 by elmex, Fri Jan 5 14:17:12 2007 UTC

20use File::Spec::Functions; 20use File::Spec::Functions;
21use File::Basename; 21use File::Basename;
22use File::Path; 22use File::Path;
23use HTTP::Request::Common; 23use HTTP::Request::Common;
24use Cwd 'abs_path'; 24use Cwd 'abs_path';
25use strict;
25 26
26our @EXPORT = qw(insert_arch_stack_layer replace_arch_stack_layer new_arch_pb 27our @EXPORT = qw(insert_arch_stack_layer replace_arch_stack_layer new_arch_pb
27 fill_pb_from_arch arch_is_floor stack_find_floor stack_find_wall 28 fill_pb_from_arch arch_is_floor stack_find_floor stack_find_wall
28 stack_find arch_is_wall arch_is_monster add_table_widget quick_msg 29 stack_find arch_is_wall arch_is_monster add_table_widget quick_msg
29 def arch_is_exit map2abs exit_paths pseudohtml2txt arch_is_connector); 30 def arch_is_exit map2abs exit_paths pseudohtml2txt arch_is_connector);
71} 72}
72 73
73sub map2abs { 74sub map2abs {
74 my ($dest, $mape) = @_; 75 my ($dest, $mape) = @_;
75 76
76 $mappath = abs_path $mappath; 77 $dest = abs_path $dest;
77 my $dir; 78 my $dir;
78 if (File::Spec->file_name_is_absolute($dest)) { 79 if (File::Spec->file_name_is_absolute($dest)) {
79 $dir = catdir ($::MAPDIR, $dest); 80 $dir = catdir ($::MAPDIR, $dest);
80 } else { 81 } else {
81 my ($v, $p, $f) = File::Spec->splitpath ($mape->{path}); 82 my ($v, $p, $f) = File::Spec->splitpath ($mape->{path});
119 120
120sub fill_pb_from_arch { 121sub fill_pb_from_arch {
121 my ($pb, $a) = @_; 122 my ($pb, $a) = @_;
122 123
123 my $o = $Crossfire::ARCH{$a->{_name}}; 124 my $o = $Crossfire::ARCH{$a->{_name}};
124 my $face = $Crossfire::FACE{$a->{face} || $o->{face} || "blank.111"} 125 my $face = $Crossfire::FACE{$a->{face} || $o->{face} || "blank.111"};
126 unless ($face) {
127 $face = $Crossfire::FACE{"blank.x11"}
125 or warn "no gfx found for arch '$a->{_name}' at ($x|$y)\n"; 128 or warn "no gfx found for arch '$a->{_name}'\n";
129 }
126 130
127 $face or return; 131 $face or return;
128 132
129 $pb->fill (0x00000000); 133 $pb->fill (0x00000000);
130 $TILE->composite ($pb, 134 $TILE->composite ($pb,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines