From: Leon Brocard Date: Fri, 16 Oct 2009 09:52:45 +0000 (+0100) Subject: Remove update_rect from Surface.xs, enable it in SDL.xs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=350e894348b0c3a73f203014ba6d92cdb4f7f4ee;p=sdlgit%2FSDL_perl.git Remove update_rect from Surface.xs, enable it in SDL.xs --- diff --git a/src/Core/objects/Surface.xs b/src/Core/objects/Surface.xs index 993a3eb..90e8aba 100644 --- a/src/Core/objects/Surface.xs +++ b/src/Core/objects/Surface.xs @@ -55,16 +55,6 @@ surface_format ( surface ) RETVAL void -surface_update_rect ( surface, x, y, w ,h ) - SDL_Surface *surface - int x - int y - int w - int h - CODE: - SDL_UpdateRect(surface,x,y,w,h); - -void surface_update_rects ( surface, ... ) SDL_Surface *surface CODE: diff --git a/src/SDL.xs b/src/SDL.xs index 256cb40..1dcddae 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -1284,6 +1284,16 @@ MapRGB ( pixel_format, r, g, b ) OUTPUT: RETVAL +void +UpdateRect ( surface, x, y, w ,h ) + SDL_Surface *surface + int x + int y + int w + int h + CODE: + SDL_UpdateRect(surface,x,y,w,h); + =for comment Comment out for now as it does not compile @@ -1327,16 +1337,6 @@ SetVideoMode ( width, height, bpp, flags ) RETVAL void -UpdateRect ( surface, x, y, w ,h ) - SDL_Surface *surface - int x - int y - int w - int h - CODE: - SDL_UpdateRect(surface,x,y,w,h); - -void UpdateRects ( surface, ... ) SDL_Surface *surface CODE: diff --git a/t/core_surface.t b/t/core_surface.t index a047948..d87811c 100644 --- a/t/core_surface.t +++ b/t/core_surface.t @@ -91,7 +91,7 @@ my $rect = SDL::Rect->new( 0, 0, $app->w, $app->h ); my $blue_pixel = SDL::MapRGB( $app_pixel_format, 0x00, 0x00, 0xff ); SDL::FillRect( $app, $rect, $blue_pixel ); -SDL::Surface::update_rect( $app, 0, 0, 0, 0 ); +SDL::UpdateRect( $app, 0, 0, 0, 0 ); diag( 'This is in surface : ' . SDL::Surface::get_pixels($app) ); diff --git a/t/intergation1.t b/t/intergation1.t index 9bbc491..eb9cd98 100644 --- a/t/intergation1.t +++ b/t/intergation1.t @@ -78,7 +78,7 @@ can_ok ('SDL::App', qw/ SDL::FillRect( $app, $rect, $blue_pixel ); SDL::FillRect( $app, $grect, $col_pixel ); - SDL::Surface::update_rect($app, 0, 0, 640, 480); + SDL::UpdateRect($app, 0, 0, 640, 480); SDL::Delay(10); }