ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.91 by root, Wed Apr 12 23:15:39 2006 UTC vs.
Revision 1.94 by root, Thu Apr 13 23:07:57 2006 UTC

1454} 1454}
1455 1455
1456sub draw { 1456sub draw {
1457 my ($self) = @_; 1457 my ($self) = @_;
1458 1458
1459 $self->{need_update}++;#d#
1459 if (delete $self->{need_update}) { 1460 if (delete $self->{need_update}) {
1460 glNewList $self->{list}, GL_COMPILE; 1461 glNewList $self->{list}, GL_COMPILE;
1462
1463 my $sw = int $::WIDTH / 32;
1464 my $sh = int $::HEIGHT / 32;
1465
1466 $::MAP->draw (0, 0, $sw, $sh) if $::MAP;
1467
1468 if (0) {
1461 1469
1462 my $mx = $::CONN->{mapx}; 1470 my $mx = $::CONN->{mapx};
1463 my $my = $::CONN->{mapy}; 1471 my $my = $::CONN->{mapy};
1464 1472
1465 my $map = $::CONN->{map}; 1473 my $map = $::CONN->{map};
1512 $tex->draw_quad (($x + 1) * 32 - $w, ($y + 1) * 32 - $h, $w, $h); 1520 $tex->draw_quad (($x + 1) * 32 - $w, ($y + 1) * 32 - $h, $w, $h);
1513 } 1521 }
1514 } 1522 }
1515 } 1523 }
1516 1524
1517# if (1) { # higher quality darkness
1518# $lighting =~ s/(.)/$1$1$1/gs;
1519# my $pb = new_from_data Gtk2::Gdk::Pixbuf $lighting, "rgb", 0, 8, $sw4, $sh, $sw4 * 3;
1520#
1521# $pb = $pb->scale_simple ($sw4 * 0.5, $sh * 0.5, "bilinear");
1522#
1523# $lighting = $pb->get_pixels;
1524# $lighting =~ s/(.)../$1/gs;
1525# }
1526
1527 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE; 1525 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE;
1528 1526
1529 if ($::CFG->{fow_smooth}) { # smooth fog of war 1527 if ($::CFG->{fow_smooth}) { # smooth fog of war
1530 my @conv = ( 1528 my @conv = (
1531 0.05, 0.05, 0.05, 1529 0.1, 0.1, 0.1,
1532 0.05, 0.60, 0.05, 1530 0.1, 0.2, 0.1,
1533 0.05, 0.05, 0.05, 1531 0.1, 0.1, 0.1,
1534 ); 1532 );
1535 CFClient::glConvolutionParameteri GL_CONVOLUTION_2D, GL_CONVOLUTION_BORDER_MODE, GL_REPLICATE_BORDER; 1533 glConvolutionParameter GL_CONVOLUTION_2D, GL_CONVOLUTION_BORDER_MODE, GL_CONSTANT_BORDER;
1536 CFClient::glConvolutionFilter2D GL_CONVOLUTION_2D, 1534 glConvolutionFilter2D GL_CONVOLUTION_2D,
1537 GL_ALPHA, 3, 3, GL_ALPHA, GL_FLOAT, 1535 GL_ALPHA, 3, 3, GL_ALPHA, GL_FLOAT,
1538 pack "f*", @conv; 1536 pack "f*", @conv;
1539 glEnable GL_CONVOLUTION_2D; 1537 glEnable GL_CONVOLUTION_2D;
1540 } 1538 }
1541 1539
1551 1549
1552 glDisable GL_CONVOLUTION_2D if $::CFG->{fow_smooth}; 1550 glDisable GL_CONVOLUTION_2D if $::CFG->{fow_smooth};
1553 1551
1554 glDisable GL_TEXTURE_2D; 1552 glDisable GL_TEXTURE_2D;
1555 glDisable GL_BLEND; 1553 glDisable GL_BLEND;
1554 }
1556 1555
1557 glEndList; 1556 glEndList;
1558 } 1557 }
1559 1558
1560 glCallList $self->{list}; 1559 glCallList $self->{list};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines