From 52151b0e9840b69410ebb67ddeeb26a5897cd43c Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 22 May 2023 17:34:00 -0700 Subject: [PATCH] remove SDL functions that don't exist anymore --- library/include/modules/DFSDL.h | 2 -- library/modules/DFSDL.cpp | 12 ------------ library/modules/Textures.cpp | 2 -- 3 files changed, 16 deletions(-) diff --git a/library/include/modules/DFSDL.h b/library/include/modules/DFSDL.h index fc65fab34..626224d60 100644 --- a/library/include/modules/DFSDL.h +++ b/library/include/modules/DFSDL.h @@ -39,8 +39,6 @@ bool init(DFHack::color_ostream &out); void cleanup(); DFHACK_EXPORT SDL_Surface * DFIMG_Load(const char *file); -DFHACK_EXPORT int DFSDL_SetAlpha(SDL_Surface *surface, uint32_t flag, uint8_t alpha); -DFHACK_EXPORT SDL_Surface * DFSDL_GetVideoSurface(void); DFHACK_EXPORT SDL_Surface * DFSDL_CreateRGBSurface(uint32_t flags, int width, int height, int depth, uint32_t Rmask, uint32_t Gmask, uint32_t Bmask, uint32_t Amask); DFHACK_EXPORT SDL_Surface * DFSDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, uint32_t Rmask, uint32_t Gmask, uint32_t Bmask, uint32_t Amask); DFHACK_EXPORT int DFSDL_UpperBlit(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect); diff --git a/library/modules/DFSDL.cpp b/library/modules/DFSDL.cpp index 36e8e1a41..7aa7f36d5 100644 --- a/library/modules/DFSDL.cpp +++ b/library/modules/DFSDL.cpp @@ -27,8 +27,6 @@ static const std::vector SDL_IMAGE_LIBS { }; SDL_Surface * (*g_IMG_Load)(const char *) = nullptr; -int (*g_SDL_SetAlpha)(SDL_Surface *, uint32_t, uint8_t) = nullptr; -SDL_Surface * (*g_SDL_GetVideoSurface)(void) = nullptr; SDL_Surface * (*g_SDL_CreateRGBSurface)(uint32_t, int, int, int, uint32_t, uint32_t, uint32_t, uint32_t) = nullptr; SDL_Surface * (*g_SDL_CreateRGBSurfaceFrom)(void *pixels, int width, int height, int depth, int pitch, uint32_t Rmask, uint32_t Gmask, uint32_t Bmask, uint32_t Amask) = nullptr; int (*g_SDL_UpperBlit)(SDL_Surface *, const SDL_Rect *, SDL_Surface *, SDL_Rect *) = nullptr; @@ -65,8 +63,6 @@ bool DFSDL::init(color_ostream &out) { } bind(g_sdl_image_handle, IMG_Load); - bind(g_sdl_handle, SDL_SetAlpha); - bind(g_sdl_handle, SDL_GetVideoSurface); bind(g_sdl_handle, SDL_CreateRGBSurface); bind(g_sdl_handle, SDL_CreateRGBSurfaceFrom); bind(g_sdl_handle, SDL_UpperBlit); @@ -97,14 +93,6 @@ SDL_Surface * DFSDL::DFIMG_Load(const char *file) { return g_IMG_Load(file); } -int DFSDL::DFSDL_SetAlpha(SDL_Surface *surface, uint32_t flag, uint8_t alpha) { - return g_SDL_SetAlpha(surface, flag, alpha); -} - -SDL_Surface * DFSDL::DFSDL_GetVideoSurface(void) { - return g_SDL_GetVideoSurface(); -} - SDL_Surface * DFSDL::DFSDL_CreateRGBSurface(uint32_t flags, int width, int height, int depth, uint32_t Rmask, uint32_t Gmask, uint32_t Bmask, uint32_t Amask) { return g_SDL_CreateRGBSurface(flags, width, height, depth, Rmask, Gmask, Bmask, Amask); } diff --git a/library/modules/Textures.cpp b/library/modules/Textures.cpp index 21aadf2da..e31e37426 100644 --- a/library/modules/Textures.cpp +++ b/library/modules/Textures.cpp @@ -82,7 +82,6 @@ static size_t load_textures(color_ostream & out, const char * fname, } s = canonicalize_format(s); - DFSDL_SetAlpha(s, 0, 255); int dimx = s->w / TILE_WIDTH_PX; int dimy = s->h / TILE_HEIGHT_PX; long count = 0; @@ -92,7 +91,6 @@ static size_t load_textures(color_ostream & out, const char * fname, TILE_WIDTH_PX, TILE_HEIGHT_PX, 32, s->format->Rmask, s->format->Gmask, s->format->Bmask, s->format->Amask); - DFSDL_SetAlpha(tile, 0,255); SDL_Rect vp; vp.x = TILE_WIDTH_PX * x; vp.y = TILE_HEIGHT_PX * y;