{
int i;
Uint16* table = (Uint16 *)safemalloc(sizeof(Uint16)*(len));
- //fprintf( stderr, "Expecting 1,2,5,6 \n Length is %d \n", len);
for ( i = 0; i < len+1 ; i++ ){
SV ** temp = av_fetch(av,i,0);
if( temp != NULL)
{
- table[i] = (Uint16 *) SvIV( *temp ) ;
- /* fprintf( stderr, "table[%d] = ", i);
- if (table[i] == NULL) { fprintf ( stderr, " NULL\n"); }
- else{ fprintf(stderr, " %d \n", table[i]); } */
+ table[i] = (Uint16 *) SvIV( *temp );
}
else { table[i] =0; }
}
-// warn("Got %d %d %d %d \n", table[0], table[1], table[2], table[3] );
-
return table;
}
return NULL;
OUTPUT:
RETVAL
+
+
+Uint32
+video_map_RGB ( pixel_format, r, g, b )
+ SDL_PixelFormat *pixel_format
+ Uint8 r
+ Uint8 g
+ Uint8 b
+ CODE:
+ RETVAL = SDL_MapRGB(pixel_format,r,g,b);
+ OUTPUT:
+ RETVAL
+
+Uint32
+video_map_RGBA ( pixel_format, r, g, b, a )
+ SDL_PixelFormat *pixel_format
+ Uint8 r
+ Uint8 g
+ Uint8 b
+ Uint8 a
+ CODE:
+ RETVAL = SDL_MapRGB(pixel_format,r,g,b);
+ OUTPUT:
+ RETVAL
+
set_palette
set_gamma
set_gamma_ramp
+ map_RGB
+ map_RGBA
/;
can_ok ('SDL::Video', @done);
is( $value , 1, '[set_palette] returns 1' );
-
-
+is( SDL::Video::map_RGB($hwdisplay->format, 10, 10 ,10) > 0, 1, '[map_RGB] maps correctly to 8-bit surface');
+is( SDL::Video::map_RGBA($hwdisplay->format, 10, 10 ,10, 10) > 0, 1, '[map_RGBA] maps correctly to 8-bit surface');
my @left = qw/
get_gamma_ramp
- map_RGB
map_RGBA
get_RGB
get_RGBA