$self->{tick} = 0;
return;
}
- my $to = SDL::Rect->new(
- -x => $self->{path}[$pos],
- -y => $self->{path}[$pos+1],
- );
# $plane->blit( $plane->rect, $self->{app}, $to );
my $radian = atan2(
my $plane = SDL::Surface->new( -name => 'artwork/airplane.png' );
my $rotated = $tool->rotoZoom( $plane, $deg, 1, 1 );
+
+ my $to = SDL::Rect->new(
+ -x => $self->{path}[$pos] - $rotated->width / 2,
+ -y => $self->{path}[$pos+1] - $rotated->height / 2,
+ );
+
$rotated->blit( $rotated->rect, $self->{app}, $to );
warn "$pos $radian $deg ", $rotated->width, ' ', $rotated->height;