--- deliantra/Deliantra-Client/DC/MapWidget.pm 2007/07/19 13:45:18 1.110 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2007/07/20 18:42:45 1.112 @@ -24,13 +24,6 @@ can_focus => 1, list => glGenList, tilesize => 32, - - smooth_matrix => [ - 0.30, 0.50, 0.30, - 0.50, 0.50, 0.50, - 0.30, 0.50, 0.30, - ], - @_ ); @@ -310,20 +303,24 @@ } my %DIR = ( - CFPlus::SDLK_KP5, [0, "stay fire"], - CFPlus::SDLK_KP8, [1, "north"], - CFPlus::SDLK_KP9, [2, "northeast"], - CFPlus::SDLK_KP6, [3, "east"], - CFPlus::SDLK_KP3, [4, "southeast"], - CFPlus::SDLK_KP2, [5, "south"], - CFPlus::SDLK_KP1, [6, "southwest"], - CFPlus::SDLK_KP4, [7, "west"], - CFPlus::SDLK_KP7, [8, "northwest"], - - CFPlus::SDLK_UP, [1, "north"], - CFPlus::SDLK_RIGHT, [3, "east"], - CFPlus::SDLK_DOWN, [5, "south"], - CFPlus::SDLK_LEFT, [7, "west"], + ( "," . CFPlus::SDLK_KP5 ), [0, "stay fire"], + ( "," . CFPlus::SDLK_KP8 ), [1, "north"], + ( "," . CFPlus::SDLK_KP9 ), [2, "northeast"], + ( "," . CFPlus::SDLK_KP6 ), [3, "east"], + ( "," . CFPlus::SDLK_KP3 ), [4, "southeast"], + ( "," . CFPlus::SDLK_KP2 ), [5, "south"], + ( "," . CFPlus::SDLK_KP1 ), [6, "southwest"], + ( "," . CFPlus::SDLK_KP4 ), [7, "west"], + ( "," . CFPlus::SDLK_KP7 ), [8, "northwest"], + + ( "," . CFPlus::SDLK_UP ), [1, "north"], + ("1," . CFPlus::SDLK_UP ), [2, "northeast"], + ( "," . CFPlus::SDLK_RIGHT), [3, "east"], + ("1," . CFPlus::SDLK_RIGHT), [4, "southeast"], + ( "," . CFPlus::SDLK_DOWN ), [5, "south"], + ("1," . CFPlus::SDLK_DOWN ), [6, "southwest"], + ( "," . CFPlus::SDLK_LEFT ), [7, "west"], + ("1," . CFPlus::SDLK_LEFT ), [8, "northwest"], ); sub invoke_key_down { @@ -376,18 +373,18 @@ } elsif ($uni == ord "'") { $self->{completer}->set_prefix (""); $self->{completer}->show; - } elsif (exists $DIR{$sym}) { + } elsif (my $dir = $DIR{(!!($mod & CFPlus::KMOD_ALT)) . ",$sym"}) { if ($mod & CFPlus::KMOD_SHIFT) { $self->{shft}++; - if ($DIR{$sym}[0] != $self->{fire_dir}) { - $::CONN->user_send ("fire $DIR{$sym}[0]"); + if ($dir->[0] != $self->{fire_dir}) { + $::CONN->user_send ("fire $dir->[0]"); } $self->{fire_dir} = $DIR{$sym}[0]; } elsif ($mod & CFPlus::KMOD_CTRL) { $self->{ctrl}++; - $::CONN->user_send ("run $DIR{$sym}[0]"); + $::CONN->user_send ("run $dir->[0]"); } else { - $::CONN->user_send ("$DIR{$sym}[1]"); + $::CONN->user_send ("$dir->[1]"); } } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) { $self->{completer}->inject_key_down ($ev); @@ -472,11 +469,7 @@ my $dy = $self->{dy} = CFPlus::ceil 0.5 * ($::MAP->h - $sh) - $sy; if ($::CFG->{fow_enable}) { - my ($w, $h, $data) = $::MAP->fow_texture ( - $dx, $dy, $sw, $sh, - $::CFG->{fow_smooth}, - pack "f*", @{ $self->{smooth_matrix} }, - ); + my ($w, $h, $data) = $::MAP->fow_texture ($dx, $dy, $sw, $sh); $self->{fow_texture} = new CFPlus::Texture w => $w, @@ -500,7 +493,7 @@ if (my $tex = $self->{fow_texture}) { glPushMatrix; - #glScale 1/3, 1/3 if $::CFG->{fow_smooth}; + glScale 1/3, 1/3; glEnable GL_TEXTURE_2D; glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE; @@ -577,7 +570,7 @@ use CFPlus::OpenGL; sub size_request { - ($::HEIGHT * 0.25, $::HEIGHT * 0.25) + ($::HEIGHT * 0.2, $::HEIGHT * 0.2) } sub refresh_hook {