Skip to content

Commit

Permalink
Added test for Overlay, updated Build.PL to add Overlay, Also made su…
Browse files Browse the repository at this point in the history
…re that right libraries are called to speed up Building time. Removed Create Overlay and Free Overlay from SDL.xs
  • Loading branch information
Kartik Thakore committed Oct 22, 2009
1 parent fcd68a9 commit 9346cc6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
15 changes: 11 additions & 4 deletions Build.PL
Expand Up @@ -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 => {
Expand All @@ -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 => {
Expand All @@ -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 )],
},
);

Expand Down
2 changes: 1 addition & 1 deletion src/Core/objects/Overlay.xs
Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions src/SDL.xs
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 18 additions & 0 deletions t/core_overlay.t
@@ -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');



0 comments on commit 9346cc6

Please sign in to comment.