Implement blit_surface
Leon Brocard [Mon, 2 Nov 2009 16:30:12 +0000 (16:30 +0000)]
src/Core/Video.xs
src/SDL.xs
t/core_surface.t

index a942519..3df52a9 100644 (file)
@@ -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
index d041c67..3ef0b9a 100644 (file)
@@ -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
index 65df447..b06529f 100644 (file)
@@ -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;