From: Kartik Thakore Date: Mon, 26 Oct 2009 00:26:56 +0000 (-0400) Subject: Merge branch 'redesign' of github.com:kthakore/SDL_perl into redesign X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=473d3fa763da18283068457753d13c4701d0e197;hp=1bc496022194190267e1c0ae87d0cd3bb1b5fa61;p=sdlgit%2FSDL_perl.git Merge branch 'redesign' of github.com:kthakore/SDL_perl into redesign --- diff --git a/Build.PL b/Build.PL index c8b3f8a..96d6217 100644 --- a/Build.PL +++ b/Build.PL @@ -84,6 +84,14 @@ my %subsystems = }, libraries => [qw( SDL )], }, + Palette => { + file => { + from => 'src/Core/objects/Palette.xs', + to => 'lib/SDL/Palette.xs', + }, + libraries => [qw( SDL )], + }, + VideoInfo => { file => { from => 'src/Core/objects/VideoInfo.xs', diff --git a/src/SDL.xs b/src/SDL.xs index 13d20c6..50e286a 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -1210,6 +1210,7 @@ ListModes ( format, flags ) } OUTPUT: RETVAL +=skip SDL_Palette * NewPalette ( number ) @@ -1221,6 +1222,7 @@ NewPalette ( number ) RETVAL->ncolors = number; OUTPUT: RETVAL +=cut int PaletteNColors ( palette, ... ) @@ -1322,22 +1324,6 @@ UpdateRects ( surface, ... ) Comment out for now as it does not compile -SDL_Color * -PaletteColors ( palette, index, ... ) - SDL_Palette *palette - int index - CODE: - if ( items > 2 ) { - palette->colors[index].r = SvUV(ST(2)); - palette->colors[index].g = SvUV(ST(3)); - palette->colors[index].b = SvUV(ST(4)); - } - RETVAL = (SDL_Color *)(palette->colors + index); - OUTPUT: - RETVAL - - - int VideoModeOK ( width, height, bpp, flags ) int width diff --git a/typemap b/typemap index b39c5d5..7b13f87 100644 --- a/typemap +++ b/typemap @@ -21,7 +21,7 @@ SDL_CDtrack * T_PTR SDL_TimerCallback T_PTR SDL_Rect * O_OBJECT SDL_Color * O_OBJECT -SDL_Palette * T_PTR +SDL_Palette * O_OBJECT SDL_PixelFormat * O_OBJECT SDL_VideoInfo * O_OBJECT SDL_Cursor * T_PTR