Move display format and display format alpha out of Surface.xs
[sdlgit/SDL_perl.git] / src / SDL.xs
index 6e07fe1..7994608 100644 (file)
@@ -1284,6 +1284,34 @@ MapRGB ( pixel_format, r, g, b )
        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);
+
+SDL_Surface *
+DisplayFormat ( surface )
+       SDL_Surface *surface
+       CODE:
+               char* CLASS = "SDL::Surface";
+               RETVAL = SDL_DisplayFormat(surface);
+       OUTPUT:
+               RETVAL
+
+SDL_Surface *
+DisplayFormatAlpha ( surface )
+       SDL_Surface *surface
+       CODE:
+               char* CLASS = "SDL::Surface";
+               RETVAL = SDL_DisplayFormatAlpha(surface);
+       OUTPUT:
+               RETVAL
+
 =for comment
 
 Comment out for now as it does not compile
@@ -1327,16 +1355,6 @@ SetVideoMode ( width, height, bpp, flags )
                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:
@@ -1457,22 +1475,6 @@ SetAlpha ( surface, flag, alpha )
        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
@@ -1528,15 +1530,11 @@ ConvertRGBA ( surface )
 =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