From: Leon Brocard Date: Fri, 16 Oct 2009 08:45:13 +0000 (+0100) Subject: Move blit out of Surface.xs, enable BlitSurface X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=348b98f1b3ee5169930084613f270bb491c3e139;p=sdlgit%2FSDL_perl.git Move blit out of Surface.xs, enable BlitSurface --- diff --git a/src/Core/objects/Surface.xs b/src/Core/objects/Surface.xs index b34b58b..b35484a 100644 --- a/src/Core/objects/Surface.xs +++ b/src/Core/objects/Surface.xs @@ -46,17 +46,6 @@ surface_new (CLASS, flags, width, height, depth, Rmask, Gmask, Bmask, Amask ) RETVAL int -surface_blit ( 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 - -int surface_fill_rect ( dest, dest_rect, color ) SDL_Surface *dest SDL_Color *color diff --git a/src/SDL.xs b/src/SDL.xs index 4e9f640..2577e40 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -1262,6 +1262,16 @@ Flip ( surface ) 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 @@ -1515,20 +1525,6 @@ ConvertRGBA ( surface ) 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 - =cut int diff --git a/t/core_surface.t b/t/core_surface.t index be98354..298a42d 100644 --- a/t/core_surface.t +++ b/t/core_surface.t @@ -40,7 +40,7 @@ $surface->fill_rect( SDL::Rect->new( 0, 0, 32, 32 ), ok( 1, 'Managed to fill_rect' ); my $small_rect = SDL::Rect->new( 0, 0, 64, 64 ); -$image->blit( $small_rect, $surface, $small_rect ); +SDL::BlitSurface($image, $small_rect, $surface, $small_rect ); ok( 1, 'Managed to blit' ); #my $image_format = $surface->display;