--- deliantra/Deliantra-Client/DC/MapWidget.pm 2009/12/21 23:52:34 1.158 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2009/12/22 00:35:44 1.159 @@ -12,6 +12,11 @@ our @ISA = DC::UI::Base::; +our @TEX_HIDDEN = map { + new_from_resource DC::Texture # MUST be POT + "hidden-$_.png", mipmap => 1, wrap => 1 + } 0, 1, 2; + my $magicmap_tex = new_from_resource DC::Texture "magicmap.png", mipmap => 1, wrap => 0, internalformat => GL_ALPHA; @@ -520,14 +525,14 @@ glScale $self->{tilesize}, $self->{tilesize}; if (my $tex = $self->{fow_texture}) { - if ($DC::OpenGL::GL_MULTITEX && $self->{last_fow_texture}) {#d# + if ($DC::OpenGL::GL_MULTITEX && $self->{last_fow_texture}) { my $d1 = DC::distance $self->{sdx}, $self->{sdy}; my $d2 = (DC::distance $self->{lfdx}, $self->{lfdy}) * $tilesize; if ($d1 * $d2) { DC::Texture::draw_fow_texture $::CFG->{fow_intensity}, - $self->{hidden_tex}{name}, + $TEX_HIDDEN[$::CFG->{fow_texture}]{name}, @{$self->{fow_texture}}{qw(name data s t w h)}, (min 1, $d1 / $d2), $self->{lmdx} - $dx - $self->{lfdx}, @@ -541,7 +546,7 @@ unless ($self->{last_fow_texture}) { DC::Texture::draw_fow_texture $::CFG->{fow_intensity}, - $self->{hidden_tex}{name}, + $TEX_HIDDEN[$::CFG->{fow_texture}]{name}, @{$self->{fow_texture}}{qw(name data s t w h)}; } }