Deal with the SDL_*Blit functions.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 14 Feb 2019 21:57:26 -0500
changeset 649e17c11fc222
parent 63 5f62918d2819
child 65 68cb13eba09d
Deal with the SDL_*Blit functions.
src/SDL12_compat.c
src/SDL20_include_wrapper.h
src/SDL20_syms.h
     1.1 --- a/src/SDL12_compat.c	Thu Feb 14 21:57:01 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Thu Feb 14 21:57:26 2019 -0500
     1.3 @@ -97,6 +97,8 @@
     1.4  
     1.5  // !!! IMPLEMENT_ME X11_KeyToUnicode
     1.6  
     1.7 +#define SDL_BlitSurface SDL_UpperBlit
     1.8 +
     1.9  
    1.10  #if 0
    1.11  #define FIXME(x) do {} while (0)
    1.12 @@ -1932,6 +1934,18 @@
    1.13  }
    1.14  
    1.15  DECLSPEC int SDLCALL
    1.16 +SDL_UpperBlit(SDL12_Surface *src, SDL_Rect *srcrect, SDL12_Surface *dst, SDL_Rect *dstrect)
    1.17 +{
    1.18 +    return SDL20_UpperBlit(src->surface20, srcrect, dst->surface20, dstrect);
    1.19 +}
    1.20 +
    1.21 +DECLSPEC int SDLCALL
    1.22 +SDL_LowerBlit(SDL12_Surface *src, SDL_Rect *srcrect, SDL12_Surface *dst, SDL_Rect *dstrect)
    1.23 +{
    1.24 +    return SDL20_LowerBlit(src->surface20, srcrect, dst->surface20, dstrect);
    1.25 +}
    1.26 +
    1.27 +DECLSPEC int SDLCALL
    1.28  SDL_SetAlpha(SDL12_Surface * surface, Uint32 flag, Uint8 value)
    1.29  {
    1.30      FIXME("write me");
     2.1 --- a/src/SDL20_include_wrapper.h	Thu Feb 14 21:57:01 2019 -0500
     2.2 +++ b/src/SDL20_include_wrapper.h	Thu Feb 14 21:57:26 2019 -0500
     2.3 @@ -83,6 +83,8 @@
     2.4  #define SDL_LoadBMP_RW IGNORE_THIS_VERSION_OF_SDL_LoadBMP_RW
     2.5  #define SDL_SaveBMP_RW IGNORE_THIS_VERSION_OF_SDL_SaveBMP_RW
     2.6  #define SDL_LoadWAV_RW IGNORE_THIS_VERSION_OF_SDL_LoadWAV_RW
     2.7 +#define SDL_UpperBlit IGNORE_THIS_VERSION_OF_SDL_UpperBlit
     2.8 +#define SDL_LowerBlit IGNORE_THIS_VERSION_OF_SDL_LowerBlit
     2.9  
    2.10  #define BUILD_SDL 1
    2.11  #include "SDL.h"
    2.12 @@ -143,6 +145,12 @@
    2.13  #undef SDL_LoadBMP_RW
    2.14  #undef SDL_SaveBMP_RW
    2.15  #undef SDL_LoadWAV_RW
    2.16 +#undef SDL_UpperBlit
    2.17 +#undef SDL_LowerBlit
    2.18 +
    2.19 +#ifdef SDL_BlitSurface
    2.20 +#undef SDL_BlitSurface
    2.21 +#endif
    2.22  
    2.23  #ifdef SDL_malloc
    2.24  #undef SDL_malloc
     3.1 --- a/src/SDL20_syms.h	Thu Feb 14 21:57:01 2019 -0500
     3.2 +++ b/src/SDL20_syms.h	Thu Feb 14 21:57:26 2019 -0500
     3.3 @@ -87,6 +87,8 @@
     3.4  SDL20_SYM(SDL_Surface *,CreateRGBSurface,(Uint32 a, int b, int c, int d, Uint32 e, Uint32 f, Uint32 g, Uint32 h),(a,b,c,d,e,f,g,h),return)
     3.5  SDL20_SYM(SDL_Surface *,CreateRGBSurfaceFrom,(void *a, int b, int c, int d, int e, Uint32 f, Uint32 g, Uint32 h, Uint32 i),(a,b,c,d,e,f,g,h,i),return)
     3.6  SDL20_SYM(SDL_Surface *,CreateRGBSurfaceWithFormat,(Uint32 a, int b, int c, int d, Uint32 e),(a,b,c,d,e),return)
     3.7 +SDL20_SYM(int,UpperBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
     3.8 +SDL20_SYM(int,LowerBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
     3.9  SDL20_SYM(void,FreeSurface,(SDL_Surface *a),(a),)
    3.10  SDL20_SYM(SDL_Surface*,LoadBMP_RW,(SDL_RWops *a, int b),(a,b),return)
    3.11  SDL20_SYM(int,SaveBMP_RW,(SDL_Surface *a, SDL_RWops *b, int c),(a,b,c),return)