… | |
… | |
288 | } |
288 | } |
289 | |
289 | |
290 | sub connect { |
290 | sub connect { |
291 | my ($self, $signal, $cb) = @_; |
291 | my ($self, $signal, $cb) = @_; |
292 | |
292 | |
293 | push @{ $self->{cb}{$signal} }, $cb; |
293 | push @{ $self->{signal_cb}{$signal} }, $cb; |
294 | } |
294 | } |
295 | |
295 | |
296 | sub emit { |
296 | sub emit { |
297 | my ($self, $signal, @args) = @_; |
297 | my ($self, $signal, @args) = @_; |
298 | |
298 | |
|
|
299 | for my $cb (@{$self->{signal_cb}{$signal} || []}) { |
299 | $_->($self, @args) |
300 | $cb->($self, @args); |
300 | for @{$self->{cb}{$signal} || []}; |
301 | } |
301 | } |
302 | } |
302 | |
303 | |
303 | sub DESTROY { |
304 | sub DESTROY { |
304 | my ($self) = @_; |
305 | my ($self) = @_; |
305 | |
306 | |
… | |
… | |
1913 | glTranslate $sx0 - 32, $sy0 - 32, 0; |
1914 | glTranslate $sx0 - 32, $sy0 - 32, 0; |
1914 | |
1915 | |
1915 | my ($w, $h, $data) = $::MAP->draw ($sx, $sy, 0, 0, $sw + 1, $sh + 1); |
1916 | my ($w, $h, $data) = $::MAP->draw ($sx, $sy, 0, 0, $sw + 1, $sh + 1); |
1916 | |
1917 | |
1917 | if ($::CFG->{fow_enable}) { |
1918 | if ($::CFG->{fow_enable}) { |
1918 | if ($::CFG->{fow_smooth}) { # smooth fog of war |
1919 | 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); |
1920 | glConvolutionParameter (GL_CONVOLUTION_2D, GL_CONVOLUTION_BORDER_MODE, GL_CONSTANT_BORDER); |
1920 | glConvolutionFilter2D ( |
1921 | glConvolutionFilter2D ( |
1921 | GL_CONVOLUTION_2D, |
1922 | GL_CONVOLUTION_2D, |
1922 | GL_ALPHA, |
1923 | GL_ALPHA, |
1923 | 3, 3, |
1924 | 3, 3, |