From: Leon Brocard Date: Mon, 2 Nov 2009 16:30:12 +0000 (+0000) Subject: Implement blit_surface X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6076ae4959ad87edfe20d5164dcaf55c8f707371;p=sdlgit%2FSDL_perl.git Implement blit_surface --- diff --git a/src/Core/Video.xs b/src/Core/Video.xs index a942519..3df52a9 100644 --- a/src/Core/Video.xs +++ b/src/Core/Video.xs @@ -393,3 +393,14 @@ fill_rect ( dest, dest_rect, pixel ) RETVAL = SDL_FillRect(dest,dest_rect,pixel); OUTPUT: RETVAL + +int +blit_surface ( src, src_rect, dest, dest_rect ) + SDL_Surface *src + SDL_Surface *dest + SDL_Rect *src_rect + SDL_Rect *dest_rect + CODE: + RETVAL = SDL_BlitSurface(src,src_rect,dest,dest_rect); + OUTPUT: + RETVAL diff --git a/src/SDL.xs b/src/SDL.xs index d041c67..3ef0b9a 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -1178,17 +1178,6 @@ PaletteNColors ( palette, ... ) OUTPUT: RETVAL -int -BlitSurface ( src, src_rect, dest, dest_rect ) - SDL_Surface *src - SDL_Surface *dest - SDL_Rect *src_rect - SDL_Rect *dest_rect - CODE: - RETVAL = SDL_BlitSurface(src,src_rect,dest,dest_rect); - OUTPUT: - RETVAL - =for comment Comment out for now as it does not compile diff --git a/t/core_surface.t b/t/core_surface.t index 65df447..b06529f 100644 --- a/t/core_surface.t +++ b/t/core_surface.t @@ -63,7 +63,7 @@ SDL::Video::fill_rect( $surface, SDL::Rect->new( 0, 0, 32, 32 ), $pixel ); ok( 1, 'Managed to fill_rect' ); my $small_rect = SDL::Rect->new( 0, 0, 64, 64 ); -SDL::BlitSurface( $image, $small_rect, $surface, $small_rect ); +SDL::Video::blit_surface( $image, $small_rect, $surface, $small_rect ); ok( 1, 'Managed to blit' ); #my $image_format = $surface->display;