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.128 by root, Mon Apr 17 21:21:30 2006 UTC vs.
Revision 1.132 by root, Tue Apr 18 02:07:37 2006 UTC

1494 my $h1 = $self->{h} - $ycut * $self->{h}; 1494 my $h1 = $self->{h} - $ycut * $self->{h};
1495 my $h2 = $ycut * $self->{h}; 1495 my $h2 = $ycut * $self->{h};
1496 1496
1497 my $yp = 0; 1497 my $yp = 0;
1498 1498
1499 glBindTexture (GL_TEXTURE_2D, $t1->{name}); 1499 glBindTexture GL_TEXTURE_2D, $t1->{name};
1500 glBegin (GL_QUADS); 1500 glBegin GL_QUADS;
1501 glTexCoord (0, 0); glVertex (0 , $yp); 1501 glTexCoord 0 , 0; glVertex 0 , $yp;
1502 glTexCoord (0, (1 - $ycut)); glVertex (0 , $yp + $h1); 1502 glTexCoord 0 , $t1->{t} * (1 - $ycut); glVertex 0 , $yp + $h1;
1503 glTexCoord (1, (1 - $ycut)); glVertex (0 + $w, $yp + $h1); 1503 glTexCoord $t1->{s}, $t1->{t} * (1 - $ycut); glVertex 0 + $w, $yp + $h1;
1504 glTexCoord (1, 0); glVertex (0 + $w, $yp); 1504 glTexCoord $t1->{s}, 0; glVertex 0 + $w, $yp;
1505 glEnd (); 1505 glEnd;
1506 1506
1507 $yp += $h1; 1507 $yp += $h1;
1508 1508
1509 glBindTexture (GL_TEXTURE_2D, $t2->{name}); 1509 glBindTexture GL_TEXTURE_2D, $t2->{name};
1510 glBegin (GL_QUADS); 1510 glBegin GL_QUADS;
1511 glTexCoord (0, (1 - $ycut)); glVertex (0 , $yp); 1511 glTexCoord 0 , $t2->{t} * (1 - $ycut); glVertex 0 , $yp;
1512 glTexCoord (0, 1); glVertex (0 , $yp + $h2); 1512 glTexCoord 0 , $t2->{t}; glVertex 0 , $yp + $h2;
1513 glTexCoord (1, 1); glVertex (0 + $w, $yp + $h2); 1513 glTexCoord $t2->{s}, $t2->{t}; glVertex 0 + $w, $yp + $h2;
1514 glTexCoord (1, (1 - $ycut)); glVertex (0 + $w, $yp); 1514 glTexCoord $t2->{s}, $t2->{t} * (1 - $ycut); glVertex 0 + $w, $yp;
1515 glEnd (); 1515 glEnd;
1516 1516
1517 glDisable GL_BLEND; 1517 glDisable GL_BLEND;
1518 glDisable GL_TEXTURE_2D; 1518 glDisable GL_TEXTURE_2D;
1519} 1519}
1520 1520
1913 glTranslate $sx0 - 32, $sy0 - 32, 0; 1913 glTranslate $sx0 - 32, $sy0 - 32, 0;
1914 1914
1915 my ($w, $h, $data) = $::MAP->draw ($sx, $sy, 0, 0, $sw + 1, $sh + 1); 1915 my ($w, $h, $data) = $::MAP->draw ($sx, $sy, 0, 0, $sw + 1, $sh + 1);
1916 1916
1917 if ($::CFG->{fow_enable}) { 1917 if ($::CFG->{fow_enable}) {
1918 if ($::CFG->{fow_smooth}) { # smooth fog of war 1918 if ($::CFG->{fow_smooth} && $CFClient::GL_VERSION >= 1.2) { # smooth fog of war
1919 glConvolutionParameter GL_CONVOLUTION_2D, GL_CONVOLUTION_BORDER_MODE, GL_CONSTANT_BORDER; 1919 glConvolutionParameter (GL_CONVOLUTION_2D, GL_CONVOLUTION_BORDER_MODE, GL_CONSTANT_BORDER);
1920 glConvolutionFilter2D 1920 glConvolutionFilter2D (
1921 GL_CONVOLUTION_2D, 1921 GL_CONVOLUTION_2D,
1922 GL_ALPHA, 1922 GL_ALPHA,
1923 3, 3, 1923 3, 3,
1924 GL_ALPHA, GL_FLOAT, 1924 GL_ALPHA, GL_FLOAT,
1925 pack "f*", 1925 pack "f*",
1926 0.1, 0.1, 0.1, 1926 0.1, 0.1, 0.1,
1927 0.1, 0.2, 0.1, 1927 0.1, 0.2, 0.1,
1928 0.1, 0.1, 0.1, 1928 0.1, 0.1, 0.1,
1929 ; 1929 );
1930 glEnable GL_CONVOLUTION_2D; 1930 glEnable GL_CONVOLUTION_2D;
1931 } 1931 }
1932 1932
1933 $self->{fow_texture} = new CFClient::Texture 1933 $self->{fow_texture} = new CFClient::Texture
1934 w => $w, 1934 w => $w,
1964 $self->{mapmap_texture} = 1964 $self->{mapmap_texture} =
1965 new CFClient::Texture 1965 new CFClient::Texture
1966 w => $w, 1966 w => $w,
1967 h => $h, 1967 h => $h,
1968 data => $::MAP->mapmap ($w, $h), 1968 data => $::MAP->mapmap ($w, $h),
1969 type => GL_UNSIGNED_INT_8_8_8_8_REV; 1969 type => $CFClient::GL_VERSION >= 1.2 ? GL_UNSIGNED_INT_8_8_8_8_REV : GL_UNSIGNED_BYTE;
1970 1970
1971 $self->{mapmap_texture}->draw_quad (100, 100); 1971 $self->{mapmap_texture}->draw_quad (100, 100);
1972 1972
1973 glDisable GL_TEXTURE_2D; 1973 glDisable GL_TEXTURE_2D;
1974 glDisable GL_BLEND; 1974 glDisable GL_BLEND;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines