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.14 by root, Mon Apr 24 11:54:26 2006 UTC vs.
Revision 1.17 by root, Mon Apr 24 13:12:32 2006 UTC

81 81
82 if (delete $self->{need_update}) { 82 if (delete $self->{need_update}) {
83 glNewList $self->{list}; 83 glNewList $self->{list};
84 84
85 if ($::MAP) { 85 if ($::MAP) {
86 my $sw = int $::WIDTH / (32 * $::CFG->{map_scale}); 86 my $sw = int $::WIDTH / (32 * $::CFG->{map_scale}) + 0.99;
87 my $sh = int $::HEIGHT / (32 * $::CFG->{map_scale}); 87 my $sh = int $::HEIGHT / (32 * $::CFG->{map_scale}) + 0.99;
88 88
89 glPushMatrix;
89 glScale $::CFG->{map_scale}, $::CFG->{map_scale}; 90 glScale $::CFG->{map_scale}, $::CFG->{map_scale};
90 91
91 my $sx = $::CFG->{map_shift_x} / $::CFG->{map_scale}; my $sx0 = $sx & 31; $sx = ($sx - $sx0) / 32; 92 my $sx = $::CFG->{map_shift_x} / $::CFG->{map_scale}; my $sx0 = $sx & 31; $sx = ($sx - $sx0) / 32;
92 my $sy = $::CFG->{map_shift_y} / $::CFG->{map_scale}; my $sy0 = $sy & 31; $sy = ($sy - $sy0) / 32; 93 my $sy = $::CFG->{map_shift_y} / $::CFG->{map_scale}; my $sy0 = $sy & 31; $sy = ($sy - $sy0) / 32;
93 94
143 144
144 glEnable GL_BLEND; 145 glEnable GL_BLEND;
145 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; 146 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
146 glEnable GL_TEXTURE_2D; 147 glEnable GL_TEXTURE_2D;
147 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; 148 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE;
149
150 glPopMatrix;
148 151
149 $self->{mapmap_texture} = 152 $self->{mapmap_texture} =
150 new CFClient::Texture 153 new CFClient::Texture
151 w => $w, 154 w => $w,
152 h => $h, 155 h => $h,
320 my @found; 323 my @found;
321 324
322 for (@$command) { 325 for (@$command) {
323 if ($_->[0] =~ $search_abbrev) { 326 if ($_->[0] =~ $search_abbrev) {
324 push @found, [$_->[0], $_]; 327 push @found, [$_->[0], $_];
325 } elsif ($_[1] =~ $search_full) { 328 } elsif ($_->[1] =~ $search_full) {
326 push @found, [$_->[1], $_]; 329 push @found, [$_->[1], $_];
327 } 330 }
328 } 331 }
329 332
330 @found = sort { $a->[0] cmp $b->[0] } @found; 333 @found = sort { $a->[0] cmp $b->[0] } @found;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines