14 use_ok( 'SDL::Video' );
29 can_ok ('SDL::Video', @done);
31 #testing get_video_surface
32 SDL::Init(SDL_INIT_VIDEO);
34 my $display = SDL::SetVideoMode(640,480,32, SDL_SWSURFACE );
36 #diag('Testing SDL::Video');
38 isa_ok(SDL::Video::get_video_surface(), 'SDL::Surface', '[get_video_surface] Checking if we get a surface ref back');
40 isa_ok(SDL::Video::get_video_info(), 'SDL::VideoInfo', '[get_video_info] Checking if we get videoinfo ref back');
42 my $driver_name = SDL::Video::video_driver_name();
44 pass '[video_driver_name] This is your driver name: '.$driver_name;
48 is( ref( SDL::Video::list_modes( $display->format , SDL_SWSURFACE )), 'ARRAY', '[list_modes] Returned an ARRAY! ');
50 cmp_ok(SDL::Video::video_mode_ok( 100, 100, 16, SDL_SWSURFACE), '>=', 0, "[video_mode_ok] Checking if an integer was return");
52 isa_ok(SDL::Video::set_video_mode( 100, 100 ,16, SDL_SWSURFACE), 'SDL::Surface', '[set_video_more] Checking if we get a surface ref back');
55 #TODO: Write to surface and check inf pixel in that area got updated.
57 SDL::Video::update_rect($display, 0, 0, 0, 0);
59 #TODO: Write to surface and check inf pixel in that area got updated.
60 SDL::Video::update_rects($display, SDL::Rect->new(0, 10, 20, 20));
62 my $value = SDL::Video::flip($display);
63 is( ($value == 0) || ($value == -1), 1, '[flip] returns 0 or -1' );
65 $value = SDL::Video::set_colors($display, 0);
66 is( $value , 0, '[set_colors] returns 0' );
68 $value = SDL::Video::set_colors($display, SDL::Color->new(255,0,0) );
69 is( ($value == 0) || ($value == 1) , 1, '[set_colors] returns 1 or 0' );
71 #TODO: check actual color in palette with get_palette
83 create_RGB_surface_from
108 my $why = '[Percentage Completion] '.int( 100 * $#done / ($#done + $#left) ) ."\% implementation. $#done / ".($#done+$#left);
113 pass "\nThe following functions:\n".join ",", @left;
118 pass 'Are we still alive? Checkign for segfaults';