… | |
… | |
1531 | h => $sh, |
1531 | h => $sh, |
1532 | data => $darkness, |
1532 | data => $darkness, |
1533 | internalformat => GL_ALPHA, |
1533 | internalformat => GL_ALPHA, |
1534 | format => GL_ALPHA; |
1534 | format => GL_ALPHA; |
1535 | |
1535 | |
1536 | glColor 0.45, 0.45, 0.45, 1; |
1536 | glColor +($::CFG->{fow_intensity}) x 3, 1; |
1537 | $darkness->draw_quad (0, 0, $sw4 * 32, $sh * 32); |
1537 | $darkness->draw_quad (0, 0, $sw4 * 32, $sh * 32); |
1538 | |
1538 | |
1539 | glDisable GL_TEXTURE_2D; |
1539 | glDisable GL_TEXTURE_2D; |
1540 | glDisable GL_BLEND; |
1540 | glDisable GL_BLEND; |
1541 | |
1541 | |
… | |
… | |
1578 | |
1578 | |
1579 | my $mod = $ev->key_mod; |
1579 | my $mod = $ev->key_mod; |
1580 | my $sym = $ev->key_sym; |
1580 | my $sym = $ev->key_sym; |
1581 | |
1581 | |
1582 | if ($sym == SDLK_KP5) { |
1582 | if ($sym == SDLK_KP5) { |
1583 | $::CONN->send ("command stay fire"); |
1583 | $::CONN->user_send ("command stay fire"); |
1584 | } elsif ($sym == SDLK_a) { |
1584 | } elsif ($sym == SDLK_a) { |
1585 | $::CONN->send ("command apply"); |
1585 | $::CONN->user_send ("command apply"); |
1586 | } elsif (exists $DIR{$sym}) { |
1586 | } elsif (exists $DIR{$sym}) { |
1587 | if ($mod & KMOD_SHIFT) { |
1587 | if ($mod & KMOD_SHIFT) { |
1588 | $self->{shft}++; |
1588 | $self->{shft}++; |
1589 | $::CONN->send ("command fire $DIR{$sym}[0]"); |
1589 | $::CONN->user_send ("command fire $DIR{$sym}[0]"); |
1590 | } elsif ($mod & KMOD_CTRL) { |
1590 | } elsif ($mod & KMOD_CTRL) { |
1591 | $self->{ctrl}++; |
1591 | $self->{ctrl}++; |
1592 | $::CONN->send ("command run $DIR{$sym}[0]"); |
1592 | $::CONN->user_send ("command run $DIR{$sym}[0]"); |
1593 | } else { |
1593 | } else { |
1594 | $::CONN->send ("command $DIR{$sym}[1]"); |
1594 | $::CONN->user_send ("command $DIR{$sym}[1]"); |
1595 | } |
1595 | } |
1596 | } |
1596 | } |
1597 | } |
1597 | } |
1598 | |
1598 | |
1599 | sub key_up { |
1599 | sub key_up { |
… | |
… | |
1601 | |
1601 | |
1602 | my $mod = $ev->key_mod; |
1602 | my $mod = $ev->key_mod; |
1603 | my $sym = $ev->key_sym; |
1603 | my $sym = $ev->key_sym; |
1604 | |
1604 | |
1605 | if (!($mod & KMOD_SHIFT) && delete $self->{shft}) { |
1605 | if (!($mod & KMOD_SHIFT) && delete $self->{shft}) { |
1606 | $::CONN->send ("command fire_stop"); |
1606 | $::CONN->user_send ("command fire_stop"); |
1607 | } |
1607 | } |
1608 | if (!($mod & KMOD_CTRL ) && delete $self->{ctrl}) { |
1608 | if (!($mod & KMOD_CTRL ) && delete $self->{ctrl}) { |
1609 | $::CONN->send ("command run_stop"); |
1609 | $::CONN->user_send ("command run_stop"); |
1610 | } |
1610 | } |
1611 | } |
1611 | } |
1612 | |
1612 | |
1613 | ############################################################################# |
1613 | ############################################################################# |
1614 | |
1614 | |