anchor.diff:     *  0 if successful or -1 if there was an error.
      *}
   
  -extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
  -    (SDL_Surface * surface, SDL_RWops * dst, int freedst);
  +function SDL_SaveBMP_RW(surface: PSDLSurface; dst: PSDLRWops; freedst: SInt32): SInt32 cdecl external {$IFDEF GPC} name 'SDL_LoadBMP_RW' {$ELSE} SDL_LibName {$ENDIF};
   
     {**
      *  Save a surface to a file.
  
positive.code:  *  blitting works internally and how to use the other blit functions.
   *}
  
  #define SDL_BlitSurface SDL_UpperBlit
  
  /**
   *  This is the public blit function, SDL_BlitSurface(), and it performs
   *  rectangle validation and clipping before passing it to SDL_LowerBlit()
   */
  extern DECLSPEC int SDLCALL SDL_UpperBlit
      (SDL_Surface * src, const SDL_Rect * srcrect,
       SDL_Surface * dst, SDL_Rect * dstrect);
  
  /**
   *  This is a semi-private blit function and it performs low-level surface
   *  blitting only.
   */
  extern DECLSPEC int SDLCALL SDL_LowerBlit
      (SDL_Surface * src, SDL_Rect * srcrect,
       SDL_Surface * dst, SDL_Rect * dstrect);
  
  /**
   *  \brief Perform a fast, low quality, stretch blit between two surfaces of the
   *         same pixel format.
   *  
   *  \note This function uses a static buffer, and is not thread-safe.
   */
  extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
                                              const SDL_Rect * srcrect,
                                              SDL_Surface * dst,
                                              const SDL_Rect * dstrect);
  
  #define SDL_BlitScaled SDL_UpperBlitScaled
  
  /**
   *  This is the public scaled blit function, SDL_BlitScaled(), and it performs
   *  rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
   */
  extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
      (SDL_Surface * src, const SDL_Rect * srcrect,
      SDL_Surface * dst, SDL_Rect * dstrect);
  
negative.code:       ((format) && (SDL_PIXELFLAG(format) != 1))
  
    {* Note: If you modify this list, update SDL_GetPixelFormatName() *}
             
      SDL_PIXELFORMAT_UNKNOWN = 0;
      SDL_PIXELFORMAT_INDEX1LSB = (1 shl 28)                    or
                                  (SDL_PIXELTYPE_INDEX1 shl 24) or
                                  (SDL_BITMAPORDER_4321 shl 20) or
                                  (0 shl 16)                    or
                                  (1 shl 8)                     or
                                  (0 shl 0);
  
      SDL_PIXELFORMAT_INDEX1MSB = (1 shl 28)                    or
                                  (SDL_PIXELTYPE_INDEX1 shl 24) or
                                  (SDL_BITMAPORDER_1234 shl 20) or
                                  (0 shl 16)                    or
                                  (1 shl 8)                     or
                                  (0 shl 0);
  
      SDL_PIXELFORMAT_INDEX4LSB = (1 shl 28)                    or
                                  (SDL_PIXELTYPE_INDEX4 shl 24) or
                                  (SDL_BITMAPORDER_4321 shl 20) or
                                  (0 shl 16)                    or
                                  (4 shl 8)                     or
                                  (0 shl 0);
  
      SDL_PIXELFORMAT_INDEX4MSB = (1 shl 28)                    or
                                  (SDL_PIXELTYPE_INDEX4 shl 24) or
                                  (SDL_BITMAPORDER_1234 shl 20) or
                                  (0 shl 16)                    or
                                  (4 shl 8)                     or
                                  (0 shl 0);
  
      SDL_PIXELFORMAT_INDEX8 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED8 shl 24)  or
                                  (0 shl 20)                      or
                                  (0 shl 16)                      or
                                  (8 shl 8)                       or
                                  (1 shl 0);
                                  
      SDL_PIXELFORMAT_RGB332 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED8 shl 24)  or
                                  (SDL_PACKEDORDER_XRGB shl 20)   or
                                  (SDL_PACKEDLAYOUT_332 shl 16)   or
                                  (8 shl 8)                       or
                                  (1 shl 0);
  
      SDL_PIXELFORMAT_RGB444 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_XRGB shl 20)   or
                                  (SDL_PACKEDLAYOUT_4444 shl 16)  or
                                  (12 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_RGB555 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_XRGB shl 20)   or
                                  (SDL_PACKEDLAYOUT_1555 shl 16)  or
                                  (15 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_BGR555 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_XBGR shl 20)   or
                                  (SDL_PACKEDLAYOUT_1555 shl 16)  or
                                  (15 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_ARGB4444 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_ARGB shl 20)   or
                                  (SDL_PACKEDLAYOUT_4444 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_RGBA4444 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_RGBA shl 20)   or
                                  (SDL_PACKEDLAYOUT_4444 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_ABGR4444 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_ABGR shl 20)   or
                                  (SDL_PACKEDLAYOUT_4444 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_BGRA4444 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_BGRA shl 20)   or
                                  (SDL_PACKEDLAYOUT_4444 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_ARGB1555 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_ARGB shl 20)   or
                                  (SDL_PACKEDLAYOUT_1555 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_RGBA5551 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_RGBA shl 20)   or
                                  (SDL_PACKEDLAYOUT_5551 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_ABGR1555 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_ABGR shl 20)   or
                                  (SDL_PACKEDLAYOUT_1555 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_BGRA5551 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_BGRA shl 20)   or
                                  (SDL_PACKEDLAYOUT_5551 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_RGB565 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_XRGB shl 20)   or
                                  (SDL_PACKEDLAYOUT_565 shl 16)   or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_BGR565 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED16 shl 24) or
                                  (SDL_PACKEDORDER_XBGR shl 20)   or
                                  (SDL_PACKEDLAYOUT_1555 shl 16)  or
                                  (16 shl 8)                      or
                                  (2 shl 0);
  
      SDL_PIXELFORMAT_RGB24 =     (1 shl 28)                      or
                                  (SDL_PIXELTYPE_ARRAYU8 shl 24)  or
                                  (SDL_ARRAYORDER_RGB shl 20)    or
                                  (0 shl 16)                      or
                                  (24 shl 8)                      or
                                  (3 shl 0);
  
      SDL_PIXELFORMAT_BGR24 =     (1 shl 28)                      or
                                  (SDL_PIXELTYPE_ARRAYU8 shl 24)  or
                                  (SDL_ARRAYORDER_BGR shl 20)    or
                                  (0 shl 16)                      or
                                  (24 shl 8)                      or
                                  (3 shl 0);
  
      SDL_PIXELFORMAT_RGB888 =    (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED32 shl 24) or
                                  (SDL_PACKEDORDER_XRGB shl 20)   or
                                  (SDL_PACKEDLAYOUT_8888 shl 16)  or
                                  (24 shl 8)                      or
                                  (4 shl 0);
  
      SDL_PIXELFORMAT_RGBX8888 =  (1 shl 28)                      or
                                  (SDL_PIXELTYPE_PACKED32 shl 24) or
                                  (SDL_PACKEDORDER_RGBX shl 20)   or
                                  (SDL_PACKEDLAYOUT_8888 shl 16)  or
                                  (24 shl 8)                      or
                                  (4 shl 0);
                            {
      SDL_PIXELFORMAT_BGR888 =
          SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
                                 SDL_PACKEDLAYOUT_8888, 24, 4),
  