X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2FCore%2FVideo.xs;h=87b348cab470879da669a29a9f2bc82a13676ff8;hb=HEAD;hp=a8a9a1ea586ecfb0611ea720afb3c4338db350e7;hpb=65b2187d7fca182e8689d1af3ba44f5f946dcc35;p=sdlgit%2FSDL_perl.git diff --git a/src/Core/Video.xs b/src/Core/Video.xs index a8a9a1e..87b348c 100644 --- a/src/Core/Video.xs +++ b/src/Core/Video.xs @@ -16,21 +16,15 @@ static Uint16* av_to_uint16 (AV* av) { 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; @@ -247,3 +241,42 @@ video_set_gamma_ramp( rt, gt, bt ) 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 + +int +video_lock_surface ( surface ) + SDL_Surface *surface + CODE: + RETVAL = SDL_LockSurface(surface); + OUTPUT: + RETVAL + +void +video_unlock_surface ( surface ) + SDL_Surface *surface + CODE: + SDL_UnlockSurface(surface); +