OUTPUT:
RETVAL
+#ifdef HAVE_SDL_IMAGE
+
SDL_Surface *
-CreateRGBSurface (flags, width, height, depth, Rmask, Gmask, Bmask, Amask )
- Uint32 flags
- int width
- int height
- int depth
- Uint32 Rmask
- Uint32 Gmask
- Uint32 Bmask
- Uint32 Amask
+IMG_Load ( filename )
+ char *filename
CODE:
- RETVAL = SDL_CreateRGBSurface ( flags, width, height,
- depth, Rmask, Gmask, Bmask, Amask );
- OUTPUT:
+ char* CLASS = "SDL::Surface";
+ RETVAL = IMG_Load(filename);
+ OUTPUT:
RETVAL
+#endif
+
+=for comment
+
+Comment out for now as it does not compile
SDL_Surface *
CreateRGBSurfaceFrom (pixels, width, height, depth, pitch, Rmask, Gmask, Bmask, Amask )
OUTPUT:
RETVAL
-#ifdef HAVE_SDL_IMAGE
-
-SDL_Surface *
-IMGLoad ( fname )
- char *fname
- CODE:
- RETVAL = IMG_Load(fname);
- OUTPUT:
- RETVAL
-
-#endif
-
SDL_Surface*
SurfaceCopy ( surface )
SDL_Surface *surface
OUTPUT:
RETVAL
+=cut
+
+=for comment
+
+Comment out for now as it does not compile
+
SDL_Color*
SurfacePixel ( surface, x, y, ... )
SDL_Surface *surface
OUTPUT:
RETVAL
+=cut
HV *
VideoInfo ()
OUTPUT:
RETVAL
-
-SDL_Color *
-NewColor ( r, g, b )
- Uint8 r
- Uint8 g
- Uint8 b
+SDL_Palette *
+NewPalette ( number )
+ int number
CODE:
- RETVAL = (SDL_Color *) safemalloc(sizeof(SDL_Color));
- RETVAL->r = r;
- RETVAL->g = g;
- RETVAL->b = b;
+ RETVAL = (SDL_Palette *)safemalloc(sizeof(SDL_Palette));
+ RETVAL->colors = (SDL_Color *)safemalloc(number *
+ sizeof(SDL_Color));
+ RETVAL->ncolors = number;
OUTPUT:
RETVAL
-Uint8
-ColorR ( color, ... )
- SDL_Color *color
+int
+PaletteNColors ( palette, ... )
+ SDL_Palette *palette
CODE:
- if (items > 1 ) color->r = SvIV(ST(1));
- RETVAL = color->r;
+ if ( items > 1 ) palette->ncolors = SvIV(ST(1));
+ RETVAL = palette->ncolors;
OUTPUT:
RETVAL
-Uint8
-ColorG ( color, ... )
- SDL_Color *color
+SDL_Surface *
+SetVideoMode ( width, height, bpp, flags )
+
+ int width
+ int height
+ int bpp
+ Uint32 flags
+
CODE:
- if (items > 1 ) color->g = SvIV(ST(1));
- RETVAL = color->g;
+ char *CLASS = "SDL::Surface";
+ RETVAL = SDL_SetVideoMode(width,height,bpp,flags);
OUTPUT:
RETVAL
-Uint8
-ColorB ( color, ... )
- SDL_Color *color
+int
+Flip ( surface )
+ SDL_Surface *surface
CODE:
- if (items > 1 ) color->b = SvIV(ST(1));
- RETVAL = color->b;
+ RETVAL = SDL_Flip(surface);
OUTPUT:
RETVAL
+int
+BlitSurface ( src, src_rect, dest, dest_rect )
+ SDL_Surface *src
+ SDL_Surface *dest
+ SDL_Rect *src_rect
+ SDL_Rect *dest_rect
+ CODE:
+ RETVAL = SDL_BlitSurface(src,src_rect,dest,dest_rect);
+ OUTPUT:
+ RETVAL
-void
-ColorRGB ( color, ... )
- SDL_Color *color
- PPCODE:
- if (items > 1 ) {
- color->r = SvIV(ST(1));
- color->g = SvIV(ST(2));
- color->b = SvIV(ST(3));
- }
- mXPUSHi( color->r );
- mXPUSHi( color->g );
- mXPUSHi( color->b );
- XSRETURN(3);
+Uint32
+MapRGB ( 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
void
-FreeColor ( color )
- SDL_Color *color
+UpdateRect ( surface, x, y, w ,h )
+ SDL_Surface *surface
+ int x
+ int y
+ int w
+ int h
CODE:
- return; safefree(color);
+ SDL_UpdateRect(surface,x,y,w,h);
-SDL_Palette *
-NewPalette ( number )
- int number
+SDL_Surface *
+DisplayFormat ( surface )
+ SDL_Surface *surface
CODE:
- RETVAL = (SDL_Palette *)safemalloc(sizeof(SDL_Palette));
- RETVAL->colors = (SDL_Color *)safemalloc(number *
- sizeof(SDL_Color));
- RETVAL->ncolors = number;
+ char* CLASS = "SDL::Surface";
+ RETVAL = SDL_DisplayFormat(surface);
OUTPUT:
RETVAL
-int
-PaletteNColors ( palette, ... )
- SDL_Palette *palette
+SDL_Surface *
+DisplayFormatAlpha ( surface )
+ SDL_Surface *surface
CODE:
- if ( items > 1 ) palette->ncolors = SvIV(ST(1));
- RETVAL = palette->ncolors;
+ char* CLASS = "SDL::Surface";
+ RETVAL = SDL_DisplayFormatAlpha(surface);
OUTPUT:
RETVAL
+void
+UpdateRects ( surface, ... )
+ SDL_Surface *surface
+ CODE:
+ SDL_Rect *rects;
+ int num_rects,i;
+ if ( items < 2 ) return;
+ num_rects = items - 1;
+ rects = (SDL_Rect *)safemalloc(sizeof(SDL_Rect)*items);
+ for(i=0;i<num_rects;i++) {
+ rects[i] = *(SDL_Rect *)SvIV((SV*)SvRV( ST(i + 1) ));
+ }
+ SDL_UpdateRects(surface,num_rects,rects);
+ safefree(rects);
+
+=for comment
+
+Comment out for now as it does not compile
+
SDL_Color *
PaletteColors ( palette, index, ... )
SDL_Palette *palette
OUTPUT:
RETVAL
+
+
int
VideoModeOK ( width, height, bpp, flags )
int width
OUTPUT:
RETVAL
-void
-UpdateRect ( surface, x, y, w ,h )
- SDL_Surface *surface
- int x
- int y
- int w
- int h
- CODE:
- SDL_UpdateRect(surface,x,y,w,h);
-
-void
-UpdateRects ( surface, ... )
- SDL_Surface *surface
- CODE:
- SDL_Rect *rects, *temp;
- int num_rects,i;
- if ( items < 2 ) return;
- num_rects = items - 1;
-
- rects = (SDL_Rect *)safemalloc(sizeof(SDL_Rect)*items);
- for(i=0;i<num_rects;i++) {
- temp = (SDL_Rect *)SvIV(ST(i+1));
- rects[i].x = temp->x;
- rects[i].y = temp->y;
- rects[i].w = temp->w;
- rects[i].h = temp->h;
- }
- SDL_UpdateRects(surface,num_rects,rects);
- safefree(rects);
-
-
int
Flip ( surface )
SDL_Surface *surface
RETVAL
Uint32
-MapRGB ( surface, r, g, b )
- SDL_Surface *surface
- Uint8 r
- Uint8 g
- Uint8 b
- CODE:
- RETVAL = SDL_MapRGB(surface->format,r,g,b);
- OUTPUT:
- RETVAL
-
-Uint32
MapRGBA ( surface, r, g, b, a )
SDL_Surface *surface
Uint8 r
OUTPUT:
RETVAL
-SDL_Surface *
-DisplayFormat ( surface )
- SDL_Surface *surface
- CODE:
- RETVAL = SDL_DisplayFormat(surface);
- OUTPUT:
- RETVAL
-
-SDL_Surface*
-DisplayFormatAlpha ( surface )
- SDL_Surface *surface
- CODE:
- RETVAL = SDL_DisplayFormatAlpha(surface);
- OUTPUT:
- RETVAL
-
SDL_Surface*
ConvertRGB ( surface )
SDL_Surface * surface
OUTPUT:
RETVAL
-int
-BlitSurface ( src, src_rect, dest, dest_rect )
- SDL_Surface *src
-
- SDL_Surface *dest
-
- SDL_Rect *src_rect
-
- SDL_Rect *dest_rect
- CODE:
- RETVAL = SDL_BlitSurface(src,src_rect,dest,dest_rect);
- OUTPUT:
- RETVAL
+=cut
int
-FillRect ( dest, dest_rect, color )
+FillRect ( dest, dest_rect, pixel )
SDL_Surface *dest
-
- SDL_Color *color
-
SDL_Rect *dest_rect
-
+ Uint32 pixel
CODE:
- Uint32 pixel = SDL_MapRGB(dest->format,color->r,color->g,color->b);
RETVAL = SDL_FillRect(dest,dest_rect,pixel);
OUTPUT:
RETVAL
OUTPUT:
RETVAL
+int
+MixSetPanning ( channel, left, right )
+ int channel
+ int left
+ int right
+ CODE:
+ RETVAL = Mix_SetPanning(channel, left, right);
+ OUTPUT:
+ RETVAL
void
MixCloseAudio ()
RETVAL = newAV();
if(TTF_SizeText(font,text,&w,&h))
{
- av_push(RETVAL,newSViv(w));
- av_push(RETVAL,newSViv(h));
- sv_2mortal((SV*)RETVAL);
+ printf("TTF error at TTFSizeText: %s \n", TTF_GetError());
+ Perl_croak (aTHX_ "TTF error \n");
}
else
{
- printf("TTF error at TTFSizeText: %s \n", TTF_GetError());
- Perl_croak (aTHX_ "TTF error \n");
-
+ av_push(RETVAL,newSViv(w));
+ av_push(RETVAL,newSViv(h));
+ sv_2mortal((SV*)RETVAL);
}
OUTPUT:
RETVAL
+=for comment
+
SDL_Surface*
TTFRenderTextSolid ( font, text, fg )
TTF_Font *font
OUTPUT:
RETVAL
+=cut
+
#endif
SDL_Overlay*
#ifdef HAVE_SDL_GFX
+=cut
+
SDL_Surface *
GFXRotoZoom ( src, angle, zoom, smooth)
SDL_Surface * src
OUTPUT:
RETVAL
+=cut
+
int
GFXPixelColor ( dst, x, y, color )
SDL_Surface* dst