t/core_surface is failing even when t/intergration1 is passing. Why?
[sdlgit/SDL_perl.git] / src / SDL.xs
index 9c26874..4d41a37 100644 (file)
@@ -858,22 +858,9 @@ GetKeyName ( sym )
        OUTPUT:
                RETVAL
 
-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
-       CODE:
-               RETVAL = SDL_CreateRGBSurface ( flags, width, height,
-                               depth, Rmask, Gmask, Bmask, Amask );
-       OUTPUT: 
-               RETVAL
+=for comment
 
+Comment out for now as it does not compile
 
 SDL_Surface *
 CreateRGBSurfaceFrom (pixels, width, height, depth, pitch, Rmask, Gmask, Bmask, Amask )
@@ -1079,6 +1066,12 @@ SurfacePixels ( surface )
        OUTPUT:
                RETVAL
 
+=cut
+
+=for comment
+
+Comment out for now as it does not compile
+
 SDL_Color*
 SurfacePixel ( surface, x, y, ... )
        SDL_Surface *surface
@@ -1172,6 +1165,7 @@ GetVideoSurface ()
        OUTPUT:
                RETVAL
 
+=cut
 
 HV *
 VideoInfo ()
@@ -1225,68 +1219,6 @@ ListModes ( format, flags )
        OUTPUT:
                RETVAL
 
-
-SDL_Color *
-NewColor ( r, g, b )
-       Uint8 r
-       Uint8 g
-       Uint8 b
-       CODE:
-               RETVAL = (SDL_Color *) safemalloc(sizeof(SDL_Color));
-               RETVAL->r = r;
-               RETVAL->g = g;
-               RETVAL->b = b;
-       OUTPUT:
-               RETVAL
-
-Uint8
-ColorR ( color, ... )
-       SDL_Color *color
-       CODE:
-               if (items > 1 ) color->r = SvIV(ST(1)); 
-               RETVAL = color->r;
-       OUTPUT:
-               RETVAL
-
-Uint8
-ColorG ( color, ... )
-       SDL_Color *color
-       CODE:
-               if (items > 1 ) color->g = SvIV(ST(1)); 
-               RETVAL = color->g;
-       OUTPUT:
-               RETVAL
-
-Uint8
-ColorB ( color, ... )
-       SDL_Color *color
-       CODE:
-               if (items > 1 ) color->b = SvIV(ST(1)); 
-               RETVAL = color->b;
-       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);
-
-void
-FreeColor ( color )
-       SDL_Color *color
-       CODE:
-               return; safefree(color);
-
 SDL_Palette *
 NewPalette ( number )
        int number
@@ -1307,6 +1239,32 @@ PaletteNColors ( palette, ... )
        OUTPUT:
                RETVAL
 
+SDL_Surface *
+SetVideoMode ( CLASS, width, height, bpp, flags )
+        char* CLASS
+       int width
+       int height
+       int bpp
+       Uint32 flags
+
+       CODE:
+               RETVAL = SDL_SetVideoMode(width,height,bpp,flags);
+       OUTPUT:
+               RETVAL
+
+int
+Flip ( surface )
+       SDL_Surface *surface
+       CODE:
+               RETVAL = SDL_Flip(surface);
+       OUTPUT:
+               RETVAL
+
+
+=for comment
+
+Comment out for now as it does not compile
+
 SDL_Color *
 PaletteColors ( palette, index, ... )
        SDL_Palette *palette
@@ -1321,6 +1279,8 @@ PaletteColors ( palette, index, ... )
        OUTPUT:
                RETVAL
 
+
+
 int
 VideoModeOK ( width, height, bpp, flags )
        int width
@@ -1361,7 +1321,7 @@ UpdateRects ( surface, ... )
                int num_rects,i;
                if ( items < 2 ) return;
                num_rects = items - 1;
-                       
+               SDL_UpdateRects(surface,num_rects,rects);                       
                rects = (SDL_Rect *)safemalloc(sizeof(SDL_Rect)*items);
                for(i=0;i<num_rects;i++) {
                        temp = (SDL_Rect *)SvIV(ST(i+1));
@@ -1372,7 +1332,6 @@ UpdateRects ( surface, ... )
                } 
                SDL_UpdateRects(surface,num_rects,rects);
                safefree(rects);
-               
 
 int
 Flip ( surface )
@@ -1568,6 +1527,8 @@ BlitSurface ( src, src_rect, dest, dest_rect )
        OUTPUT:
                RETVAL
 
+=cut
+
 int
 FillRect ( dest, dest_rect, color )
        SDL_Surface *dest
@@ -2999,6 +2960,8 @@ TTFSizeUNICODE ( font, text )
        OUTPUT:
                RETVAL
 
+=for comment
+
 SDL_Surface*
 TTFRenderTextSolid ( font, text, fg )
        TTF_Font *font
@@ -3222,6 +3185,8 @@ TTFPutString ( font, mode, surface, x, y, fg, bg, text )
        OUTPUT:
                RETVAL
 
+=cut
+
 #endif
 
 SDL_Overlay*
@@ -3661,6 +3626,8 @@ SMPEGGetInfo ( mpeg )
 
 #ifdef HAVE_SDL_GFX
 
+=cut
+
 SDL_Surface *
 GFXRotoZoom ( src, angle, zoom, smooth)
        SDL_Surface * src
@@ -3683,6 +3650,8 @@ GFXZoom ( src, zoomx, zoomy, smooth)
        OUTPUT:
                RETVAL
 
+=cut
+
 int
 GFXPixelColor ( dst, x, y, color )
        SDL_Surface* dst