X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSDL%2FSurface.pm;h=5ba31f6e0886c1ed93d68a8bd3b6d661ac787ba9;hb=43a05747be5e7eff8cdc93e23914962f263098d9;hp=d0a53d6cf58eafcbb540fb8611960c282bef9337;hpb=a1b835c168ec184abc01edbc01862ffa15624c26;p=sdlgit%2FSDL_perl.git diff --git a/lib/SDL/Surface.pm b/lib/SDL/Surface.pm index d0a53d6..5ba31f6 100644 --- a/lib/SDL/Surface.pm +++ b/lib/SDL/Surface.pm @@ -37,7 +37,7 @@ use SDL; use SDL::SFont; use SDL::Color; use SDL::Rect; - +use Data::Dumper; sub new { my $proto = shift; my $class = ref($proto) || $proto; @@ -166,7 +166,7 @@ sub fill { if ($_[1] == 0 ) { SDL::FillRect(${$_[0]},0,${$_[2]}); } else { - SDL::FillRect(${$_[0]},${$_[1]},${$_[2]}); + SDL::FillRect(${$_[0]},$_[1],${$_[2]}); } } @@ -208,7 +208,7 @@ sub blit { croak "SDL::Surface::blit requires SDL::Surface objects" unless $_[2]->isa('SDL::Surface'); } - SDL::BlitSurface(map { (defined($_) && $_ != 0)? ${$_} : $_ } @_) if defined(@_); + SDL::BlitSurface( $_[0], $_[1], ${$_[2]}, $_[3]); } sub set_colors {