line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#Interal Module to validate SDLx types |
2
|
|
|
|
|
|
|
package SDLx::Validate; |
3
|
10
|
|
|
10
|
|
38
|
use strict; |
|
10
|
|
|
|
|
13
|
|
|
10
|
|
|
|
|
257
|
|
4
|
10
|
|
|
10
|
|
35
|
use warnings; |
|
10
|
|
|
|
|
12
|
|
|
10
|
|
|
|
|
217
|
|
5
|
10
|
|
|
10
|
|
34
|
use vars qw(@ISA @EXPORT @EXPORT_OK); |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
1156
|
|
6
|
|
|
|
|
|
|
require Exporter; |
7
|
|
|
|
|
|
|
require DynaLoader; |
8
|
|
|
|
|
|
|
our @ISA = qw(Exporter DynaLoader); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /Use of uninitialized value in subroutine entry/}; |
11
|
|
|
|
|
|
|
|
12
|
10
|
|
|
10
|
|
37
|
use Carp (); |
|
10
|
|
|
|
|
14
|
|
|
10
|
|
|
|
|
123
|
|
13
|
10
|
|
|
10
|
|
30
|
use Scalar::Util (); |
|
10
|
|
|
|
|
15
|
|
|
10
|
|
|
|
|
129
|
|
14
|
|
|
|
|
|
|
|
15
|
10
|
|
|
10
|
|
34
|
use SDL::Internal::Loader; |
|
10
|
|
|
|
|
15
|
|
|
10
|
|
|
|
|
1621
|
|
16
|
|
|
|
|
|
|
internal_load_dlls(__PACKAGE__); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub surfacex { |
19
|
20
|
|
|
20
|
0
|
28
|
my ($arg) = @_; |
20
|
20
|
50
|
|
|
|
72
|
if ( Scalar::Util::blessed($arg)) { |
21
|
20
|
100
|
|
|
|
93
|
if ( $arg->isa("SDLx::Surface") ) { |
22
|
13
|
|
|
|
|
34
|
return $arg; |
23
|
|
|
|
|
|
|
} |
24
|
7
|
50
|
|
|
|
17
|
if( $arg->isa("SDL::Surface") ) { |
25
|
7
|
|
|
|
|
24
|
require SDLx::Surface; |
26
|
7
|
|
|
|
|
20
|
return SDLx::Surface->new( surface => $arg ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
0
|
|
|
|
|
0
|
Carp::confess("Surface must be SDL::Surface or SDLx::Surface"); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub color { |
33
|
13
|
|
|
13
|
0
|
3941
|
require SDL::Color; |
34
|
13
|
|
|
|
|
15
|
return SDL::Color->new( @{ list_rgb(@_) } ); |
|
13
|
|
|
|
|
97
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
bootstrap SDLx::Validate; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|