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.5 by elmex, Thu Mar 16 11:59:34 2006 UTC vs.
Revision 1.6 by elmex, Thu Mar 16 14:00:24 2006 UTC

52 my $pb = new Gtk2::Gdk::Pixbuf 'rgb', 1, 8, TILESIZE, TILESIZE; 52 my $pb = new Gtk2::Gdk::Pixbuf 'rgb', 1, 8, TILESIZE, TILESIZE;
53 return $pb; 53 return $pb;
54} 54}
55 55
56sub fill_pb_from_arch { 56sub fill_pb_from_arch {
57 my ($pb, $arch) = @_; 57 my ($pb, $a) = @_;
58
59 my $o = $Crossfire::ARCH{$a->{_name}};
60 my $face = $Crossfire::FACE{$a->{face} || $o->{face} || "blank.111"}
61 or warn "no gfx found for arch '$a->{_name}' at ($x|$y)\n";
62
63 $face or return;
58 64
59 $pb->fill (0x00000000); 65 $pb->fill (0x00000000);
60 $TILE->composite ($pb, 66 $TILE->composite ($pb,
61 0, 0, 67 0, 0,
62 TILESIZE, TILESIZE, 68 TILESIZE, TILESIZE,
63 - ($arch->{_face} % 64) * TILESIZE, - TILESIZE * int $arch->{_face} / 64, 69 - ($face->{idx} % 64) * TILESIZE, - TILESIZE * int $face->{idx} / 64,
64 1, 1, 'nearest', 255 70 1, 1, 'nearest', 255
65 ); 71 );
66} 72}
67 73
68sub classify_arch_layer { 74sub classify_arch_layer {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines