/usr/share/perl5/Games/PangZero/Hexa.pm is in pangzero 1.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ##########################################################################
package Games::PangZero::Hexa;
##########################################################################
@ISA = qw(Games::PangZero::Ball);
sub new {
my $class = shift;
my $self = Games::PangZero::Ball->new(@_);
$self->{speedX} = ($Games::PangZero::Game->Rand(1.25) + 1.25) * ($self->{speedX} > 0 ? 1 : -1);
$self->{speedY} = -4 + abs($self->{speedX});
bless $self, $class;
}
sub Draw {
my $self = shift;
my ($rect, $srcx, $phase);
return if $Games::PangZero::GamePause > 0 and $Games::PangZero::GamePause < 100 and (int($Games::PangZero::GamePause / 3) % 4) < 2;
$self->TransferRect();
if ($self->{ismagic} and int($Games::PangZero::Game->{anim} / 3) % 3 == 0) {
SDL::Video::blit_surface($self->{surface}, $self->{desc}->{magicrect}, $Games::PangZero::App, $self->{rect});
} else {
$rect = $self->{desc}->{rect};
$phase = int($Games::PangZero::Game->{anim} / 5) % 3;
$phase = 2 - $phase if $self->{speedX} < 0;
$srcx = $phase * $self->{w};
$rect->x( $rect->x + $srcx );
SDL::Video::blit_surface($self->{surface}, $rect, $Games::PangZero::App, $self->{rect} );
$rect->x( $rect->x - $srcx );
}
}
sub AdjustChildren {
my ($self, $child1, $child2) = @_;
if ($self->{hasmagic}) {
$child2->GiveMagic();
}
}
1;
|