X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcore_surface.t;h=3fe549e435b1c9623075360069e27ee23fdee381;hb=15a6855a1873836b12bf4f67f0cb600bd4209b6f;hp=a047948483b24f9124414abaa5e325474aa13103;hpb=34a219f78b8882f5cee508265a87b4dfec27eb26;p=sdlgit%2FSDL_perl.git diff --git a/t/core_surface.t b/t/core_surface.t index a047948..3fe549e 100644 --- a/t/core_surface.t +++ b/t/core_surface.t @@ -15,6 +15,7 @@ use SDL::Surface; use SDL::App; use SDL::Rect; use SDL::Color; +use SDL::Video; use SDL::PixelFormat; use Test::More tests => 35; @@ -79,10 +80,10 @@ my $app = SDL::App->new( pass 'did this pass'; -my $image_format = $image->display; +my $image_format = SDL::DisplayFormat($image); isa_ok( $image_format, 'SDL::Surface' ); -my $image_format_alpha = $image->display_alpha; +my $image_format_alpha = SDL::DisplayFormatAlpha($image); isa_ok( $image_format_alpha, 'SDL::Surface' ); my $app_pixel_format = $app->format; @@ -91,7 +92,8 @@ 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::Video::update_rect( $app, 0, 0, 0, 0 ); +SDL::Video::update_rects( $app, $small_rect ); diag( 'This is in surface : ' . SDL::Surface::get_pixels($app) );