… | |
… | |
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 | glPushMatrix; |
90 | glScale $::CFG->{map_scale}, $::CFG->{map_scale}; |
90 | glScale $::CFG->{map_scale}, $::CFG->{map_scale}; |
91 | |
91 | |
92 | 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; |