Data-Petitcom
view release on metacpan or search on metacpan
lib/Data/Petitcom/BMP.pm view on Meta::CPAN
};
sub is_valid_width { $_[0] && $_[0] <= 256 && $_[0] % CHR_WIDTH == 0 }
sub is_valid_height { $_[0] && $_[0] <= 192 && $_[0] % CHR_WIDTH == 0 }
sub is_valid_spsize {
my ($width, $height) = @_;
return unless ($width && $height);
for ( @{ SPRITE_SIZE->{$width} } ) { return 1 if ( $height == $_ ) }
}
sub _xy(&;%) {
my $code = shift;
my %opts = @_;
my $width = delete $opts{width} || 256;
my $height = delete $opts{height} || 64;
my $sp_width = delete $opts{sp_width} || 16;
my $sp_height = delete $opts{sp_height} || 16;
my $vflip = delete $opts{vflip};
my $debug = delete $opts{debug};
Carp::croak "invalid sp_width: $sp_width"
( run in 1.311 second using v1.01-cache-2.11-cpan-49f99fa48dc )