av_push(RETVAL,newSViv(a));
OUTPUT:
RETVAL
+
+SDL_Surface*
+load_BMP ( filename )
+ char *filename
+ PREINIT:
+ char* CLASS = "SDL::Surface";
+ CODE:
+ RETVAL = SDL_LoadBMP(filename);
+ OUTPUT:
+ RETVAL
+
+int
+save_BMP ( surface, filename )
+ SDL_Surface *surface
+ char *filename
+ CODE:
+ RETVAL = SDL_SaveBMP(surface,filename);
+ OUTPUT:
+ RETVAL
Comment out for now as it does not compile
-
-int
-SaveBMP ( surface, filename )
- SDL_Surface *surface
- char *filename
- CODE:
- RETVAL = SDL_SaveBMP(surface,filename);
- OUTPUT:
- RETVAL
-
SDL_Surface*
ConvertRGB ( surface )
SDL_Surface * surface
use Test::More;
use SDL::Rect;
-plan ( tests => 30);
+plan ( tests => 32);
use_ok( 'SDL::Video' );
set_alpha
get_RGB
get_RGBA
+ load_BMP
+ save_BMP
/;
can_ok ('SDL::Video', @done);
is_deeply(SDL::Video::get_RGBA($display->format, 0), [0,0,0,255], '[get_RGBA] returns r,g,b,a');
+my $bmp = 't/core_video.bmp';
+unlink($bmp) if -f $bmp;
+SDL::Video::save_BMP($display, $bmp);
+ok(-f $bmp, '[save_BMP] creates a file');
+my $bmp_surface = SDL::Video::load_BMP($bmp);
+isa_ok($bmp_surface, 'SDL::Surface', '[load_BMP] returns an SDL::Surface');
+unlink($bmp) if -f $bmp;
+
my @left = qw/
get_gamma_ramp
- load_BMP
- save_BMP
set_clip_rect
get_clip_rect
blit_surface