From 98a9e58a97ffdf73620313b6941091b828a3ad69 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 14 Feb 2019 21:57:26 -0500 Subject: [PATCH] Deal with the SDL_*Blit functions. --- src/SDL12_compat.c | 14 ++++++++++++++ src/SDL20_include_wrapper.h | 8 ++++++++ src/SDL20_syms.h | 2 ++ 3 files changed, 24 insertions(+) diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c index 871ce3356..4a787786d 100644 --- a/src/SDL12_compat.c +++ b/src/SDL12_compat.c @@ -97,6 +97,8 @@ // !!! IMPLEMENT_ME X11_KeyToUnicode +#define SDL_BlitSurface SDL_UpperBlit + #if 0 #define FIXME(x) do {} while (0) @@ -1931,6 +1933,18 @@ SDL_GetVideoSurface(void) return VideoSurface12; } +DECLSPEC int SDLCALL +SDL_UpperBlit(SDL12_Surface *src, SDL_Rect *srcrect, SDL12_Surface *dst, SDL_Rect *dstrect) +{ + return SDL20_UpperBlit(src->surface20, srcrect, dst->surface20, dstrect); +} + +DECLSPEC int SDLCALL +SDL_LowerBlit(SDL12_Surface *src, SDL_Rect *srcrect, SDL12_Surface *dst, SDL_Rect *dstrect) +{ + return SDL20_LowerBlit(src->surface20, srcrect, dst->surface20, dstrect); +} + DECLSPEC int SDLCALL SDL_SetAlpha(SDL12_Surface * surface, Uint32 flag, Uint8 value) { diff --git a/src/SDL20_include_wrapper.h b/src/SDL20_include_wrapper.h index a069cbfa5..a208214df 100644 --- a/src/SDL20_include_wrapper.h +++ b/src/SDL20_include_wrapper.h @@ -83,6 +83,8 @@ #define SDL_LoadBMP_RW IGNORE_THIS_VERSION_OF_SDL_LoadBMP_RW #define SDL_SaveBMP_RW IGNORE_THIS_VERSION_OF_SDL_SaveBMP_RW #define SDL_LoadWAV_RW IGNORE_THIS_VERSION_OF_SDL_LoadWAV_RW +#define SDL_UpperBlit IGNORE_THIS_VERSION_OF_SDL_UpperBlit +#define SDL_LowerBlit IGNORE_THIS_VERSION_OF_SDL_LowerBlit #define BUILD_SDL 1 #include "SDL.h" @@ -143,6 +145,12 @@ #undef SDL_LoadBMP_RW #undef SDL_SaveBMP_RW #undef SDL_LoadWAV_RW +#undef SDL_UpperBlit +#undef SDL_LowerBlit + +#ifdef SDL_BlitSurface +#undef SDL_BlitSurface +#endif #ifdef SDL_malloc #undef SDL_malloc diff --git a/src/SDL20_syms.h b/src/SDL20_syms.h index 1ce1ef734..debf3f239 100644 --- a/src/SDL20_syms.h +++ b/src/SDL20_syms.h @@ -87,6 +87,8 @@ SDL20_SYM(void,FreeFormat,(SDL_PixelFormat *a),(a),) 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) 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) SDL20_SYM(SDL_Surface *,CreateRGBSurfaceWithFormat,(Uint32 a, int b, int c, int d, Uint32 e),(a,b,c,d,e),return) +SDL20_SYM(int,UpperBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return) +SDL20_SYM(int,LowerBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return) SDL20_SYM(void,FreeSurface,(SDL_Surface *a),(a),) SDL20_SYM(SDL_Surface*,LoadBMP_RW,(SDL_RWops *a, int b),(a,b),return) SDL20_SYM(int,SaveBMP_RW,(SDL_Surface *a, SDL_RWops *b, int c),(a,b,c),return)