Added test for Overlay, updated Build.PL to add Overlay, Also made sure that right...
Kartik Thakore [Thu, 22 Oct 2009 01:26:30 +0000 (21:26 -0400)]
Build.PL
src/Core/objects/Overlay.xs
src/SDL.xs
t/core_overlay.t [new file with mode: 0644]

index a4a35b9..3bd4e70 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -46,7 +46,7 @@ my %subsystems =
                        from  => 'src/Core/objects/Rect.xs',
                        to    => 'lib/SDL/Rect.xs',
                },
-               libraries => [qw( SDL  )],
+               libraries => [qw( SDL )],
        },
        Color => {
                file      => {
@@ -60,14 +60,21 @@ my %subsystems =
                        from  => 'src/Core/objects/Surface.xs',
                        to    => 'lib/SDL/Surface.xs',
                },
-               libraries => [qw( SDL SDL_image )],
+               libraries => [qw( SDL )],
+       },
+       Overlay => {
+               file      => {
+                       from  => 'src/Core/objects/Overlay.xs',
+                       to    => 'lib/SDL/Overlay.xs',
+               },
+               libraries => [qw( SDL )],
        },
        PixelFormat => {
                file      => {
                        from  => 'src/Core/objects/PixelFormat.xs',
                        to    => 'lib/SDL/PixelFormat.xs',
                },
-               libraries => [qw( SDL SDL_image )],
+               libraries => [qw( SDL )],
        },
        TTF_Font => {
                file      => {
@@ -88,7 +95,7 @@ my %subsystems =
                        from => 'src/SFont.xs',
                        to   => 'lib/SDL/SFont.xs',
                },
-               libraries => [qw( SDL SDL_image SDL_ttf )],
+               libraries => [qw( SDL SDL_ttf )],
        },      
 );
 
index e13c1bf..fb6fe27 100644 (file)
@@ -27,7 +27,7 @@ typedef struct{
 =cut
 
 SDL_Overlay *
-overlay_new(CLASS, width, height, Uint32 format, display)
+overlay_new(CLASS, width, height, format, display)
        char* CLASS
        int width
        int height
index 630e327..13d20c6 100644 (file)
@@ -2787,17 +2787,6 @@ NetRead32 ( area )
 
 #endif 
 
-SDL_Overlay*
-CreateYUVOverlay ( width, height, format, display )
-       int width
-       int height
-       Uint32 format
-       SDL_Surface *display
-       CODE:
-               RETVAL = SDL_CreateYUVOverlay ( width, height, format, display );
-       OUTPUT:
-               RETVAL
-
 int
 LockYUVOverlay ( overlay )
        SDL_Overlay *overlay
@@ -2821,12 +2810,6 @@ DisplayYUVOverlay ( overlay, dstrect )
        OUTPUT:
                RETVAL
 
-void
-FreeYUVOverlay ( overlay )
-        SDL_Overlay *overlay
-        CODE:
-                SDL_FreeYUVOverlay ( overlay );
-
 Uint32
 OverlayFormat ( overlay, ... )
        SDL_Overlay *overlay
diff --git a/t/core_overlay.t b/t/core_overlay.t
new file mode 100644 (file)
index 0000000..2b0660b
--- /dev/null
@@ -0,0 +1,18 @@
+#!perl
+use strict;
+use warnings;
+use Test::More tests => 2;
+use SDL;
+
+use_ok('SDL::Overlay');
+
+SDL::Init(SDL_INIT_VIDEO);
+
+my $display = SDL::SetVideoMode(640,480,32,0);
+
+my $overlay = SDL::Overlay->new( 0, 0, 0, $display);
+
+isa_ok( $overlay, 'SDL::Overlay');
+
+
+