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

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.32 by root, Mon May 22 03:40:43 2006 UTC vs.
Revision 1.35 by root, Wed May 24 21:49:58 2006 UTC

115 0.05, 0.13, 0.05, 115 0.05, 0.13, 0.05,
116 ); 116 );
117 glEnable GL_CONVOLUTION_2D; 117 glEnable GL_CONVOLUTION_2D;
118 } 118 }
119 119
120 $self->{fow_texture_name} ||= glGenTexture;
120 # try to re-use the texture name: TODO improve texture class instead 121 # try to re-use the texture name: TODO improve texture class instead
121 my $prev_name = ((delete $self->{fow_texture}) || {})->{name};
122 122
123 $self->{fow_texture} = new CFClient::Texture 123 $self->{fow_texture} = new CFClient::Texture
124 w => $w, 124 w => $w,
125 h => $h, 125 h => $h,
126 data => $data, 126 data => $data,
127 name => $prev_name, # a bit hackish 127 name => $self->{fow_texture_name},
128 internalformat => GL_ALPHA, 128 internalformat => GL_ALPHA,
129 format => GL_ALPHA; 129 format => GL_ALPHA;
130 130
131 glDisable GL_CONVOLUTION_2D if $::CFG->{fow_smooth}; 131 glDisable GL_CONVOLUTION_2D if $::CFG->{fow_smooth};
132 132
169 my $label = new CFClient::UI::Label 169 my $label = new CFClient::UI::Label
170 x => 0, 170 x => 0,
171 y => 0, 171 y => 0,
172 z => 1, 172 z => 1,
173 ellipsise => 0, 173 ellipsise => 0,
174 text => "Map Out of Focus (click map to play)"; 174 text => "map out of focus (click map to play)";
175 175
176 $label->show; 176 $label->show;
177 $label->update; 177 $label->update;
178 178
179 $CFClient::UI::ROOT->on_post_alloc ("$self$label" => sub { 179 $CFClient::UI::ROOT->on_post_alloc ("$self$label" => sub {
480 480
481 @match = map $self->{command}{$_->[0]}, 481 @match = map $self->{command}{$_->[0]},
482 sort { 482 sort {
483 $a->[1] <=> $b->[1] 483 $a->[1] <=> $b->[1]
484 or $self->{command}{$a->[0]}[4] <=> $self->{command}{$b->[0]}[4] 484 or $self->{command}{$a->[0]}[4] <=> $self->{command}{$b->[0]}[4]
485 or (length $a->[0]) <=> (length $b->[0])
485 } @match; 486 } @match;
486 487
487 $self->{last_search} = $cmd; 488 $self->{last_search} = $cmd;
488 $self->{last_match} = \@match; 489 $self->{last_match} = \@match;
489 490

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines