Mercurial > sdl-ios-xcode
changeset 2263:900c35d8e8fd
More work in progress, still doesn't compile...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 17 Aug 2007 06:40:12 +0000 |
parents | bee005ace1bf |
children | f7f80b822c1f |
files | src/video/SDL_blit.c src/video/SDL_blit.h src/video/SDL_blit_auto.c src/video/SDL_blit_auto.h src/video/sdlgenblit.pl |
diffstat | 5 files changed, 205 insertions(+), 203 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/SDL_blit.c Fri Aug 17 06:21:58 2007 +0000 +++ b/src/video/SDL_blit.c Fri Aug 17 06:40:12 2007 +0000 @@ -24,6 +24,7 @@ #include "SDL_video.h" #include "SDL_sysvideo.h" #include "SDL_blit.h" +#include "SDL_blit_auto.h" #include "SDL_blit_copy.h" #include "SDL_RLEaccel_c.h" #include "SDL_pixels_c.h" @@ -61,19 +62,20 @@ /* Set up source and destination buffer pointers, and BLIT! */ if (okay && srcrect->w && srcrect->h) { + SDL_BlitFunc RunBlit; SDL_BlitInfo *info = &src->map->info; /* Set up the blit information */ info->src = (Uint8 *) src->pixels + (Uint16) srcrect->y * src->pitch + (Uint16) srcrect->x * info->src_fmt->BytesPerPixel; - info.src_w = srcrect->w; - info.src_h = srcrect->h; - info.dst = (Uint8 *) dst->pixels + + info->src_w = srcrect->w; + info->src_h = srcrect->h; + info->dst = (Uint8 *) dst->pixels + (Uint16) dstrect->y * dst->pitch + (Uint16) dstrect->x * info->dst_fmt->BytesPerPixel; - info.dst_w = dstrect->w; - info.dst_h = dstrect->h; + info->dst_w = dstrect->w; + info->dst_h = dstrect->h; RunBlit = (SDL_BlitFunc) src->map->data; /* Run the actual software blit */ @@ -117,7 +119,7 @@ #endif /* __MACOSX__ */ static SDL_BlitFunc -SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, SDL_BlitEntry * entries) +SDL_ChooseBlitFunc(Uint32 src_format, Uint32 dst_format, int flags, SDL_BlitFuncEntry * entries) { int i; static Uint32 features = 0xffffffff; @@ -154,7 +156,7 @@ } } - for (i = 0; entries[i].blit; ++i) { + for (i = 0; entries[i].func; ++i) { if (src_format != entries[i].src_format) { continue; } @@ -177,44 +179,43 @@ SDL_CalculateBlit(SDL_Surface * surface) { SDL_BlitFunc blit = NULL; - int blit_index; + SDL_Surface *dst = surface->map->dst; + Uint32 src_format; + Uint32 dst_format; /* Clean everything out to start */ if ((surface->flags & SDL_RLEACCEL) == SDL_RLEACCEL) { SDL_UnRLESurface(surface, 1); } surface->map->blit = NULL; + surface->map->info.src_fmt = surface->format; + surface->map->info.src_pitch = surface->pitch; + surface->map->info.dst_fmt = dst->format; + surface->map->info.dst_pitch = dst->pitch; - /* Get the blit function index, based on surface mode */ - /* { 0 = nothing, 1 = colorkey, 2 = alpha, 3 = colorkey+alpha } */ - blit_index = 0; - blit_index |= (!!(surface->flags & SDL_SRCCOLORKEY)) << 0; - if (surface->flags & SDL_SRCALPHA - && ((surface->map->cmod >> 24) != SDL_ALPHA_OPAQUE - || surface->format->Amask)) { - blit_index |= 2; - } + src_format = SDL_MasksToPixelFormatEnum(surface->format->BitsPerPixel, surface->format->Rmask, surface->format->Gmask, surface->format->Bmask, surface->format->Amask); + dst_format = SDL_MasksToPixelFormatEnum(dst->format->BitsPerPixel, dst->format->Rmask, dst->format->Gmask, dst->format->Bmask, dst->format->Amask); /* Check for special "identity" case -- copy blit */ - if (surface->map->identity && blit_index == 0) { + if (surface->map->identity && !surface->map->info.flags) { /* Handle overlapping blits on the same surface */ - if (surface == surface->map->dst) { + if (surface == dst) { blit = SDL_BlitCopyOverlap; } else { blit = SDL_BlitCopy; } } else { if (surface->format->BitsPerPixel < 8) { - blit = SDL_CalculateBlit0(surface, blit_index); + blit = SDL_ChooseBlitFunc(src_format, dst_format, surface->map->info.flags, SDL_BlitFuncTable0); } else { switch (surface->format->BytesPerPixel) { case 1: - blit = SDL_CalculateBlit1(surface, blit_index); + blit = SDL_ChooseBlitFunc(src_format, dst_format, surface->map->info.flags, SDL_BlitFuncTable1); break; case 2: case 3: case 4: - blit = SDL_CalculateBlitN(surface, blit_index); + blit = SDL_ChooseBlitFunc(src_format, dst_format, surface->map->info.flags, SDL_BlitFuncTableN); break; } }
--- a/src/video/SDL_blit.h Fri Aug 17 06:21:58 2007 +0000 +++ b/src/video/SDL_blit.h Fri Aug 17 06:40:12 2007 +0000 @@ -101,6 +101,11 @@ /* Functions found in SDL_blit.c */ extern int SDL_CalculateBlit(SDL_Surface * surface); +/* Blit function tables in SDL_blit_*.c */ +extern SDL_BlitFuncEntry SDL_BlitFuncTable0[]; +extern SDL_BlitFuncEntry SDL_BlitFuncTable1[]; +extern SDL_BlitFuncEntry SDL_BlitFuncTableN[]; + /* * Useful macros for blitting routines */
--- a/src/video/SDL_blit_auto.c Fri Aug 17 06:21:58 2007 +0000 +++ b/src/video/SDL_blit_auto.c Fri Aug 17 06:40:12 2007 +0000 @@ -28,97 +28,7 @@ #include "SDL_blit.h" #include "SDL_blit_auto.h" -static SDL_BlitFuncEntry _SDL_GeneratedBlitFuncTable[] = { - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Scale }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend }, - { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Scale }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend }, - { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Scale }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend }, - { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Scale }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend }, - { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Scale }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend }, - { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Scale }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend }, - { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale }, - { 0, 0, 0, 0, NULL } -}; - -SDL_BlitFuncEntry *SDL_GeneratedBlitFuncTable = _SDL_GeneratedBlitFuncTable; - -void SDL_Blit_RGB888_RGB888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_RGB888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; int srcy, srcx; @@ -157,7 +67,7 @@ } } -void SDL_Blit_RGB888_RGB888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_RGB888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -216,7 +126,7 @@ } } -void SDL_Blit_RGB888_RGB888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_RGB888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -296,7 +206,7 @@ } } -void SDL_Blit_RGB888_RGB888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_RGB888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -331,7 +241,7 @@ } } -void SDL_Blit_RGB888_RGB888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_RGB888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -387,7 +297,7 @@ } } -void SDL_Blit_RGB888_RGB888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_RGB888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -458,7 +368,7 @@ } } -void SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -550,7 +460,7 @@ } } -void SDL_Blit_RGB888_BGR888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_BGR888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -594,7 +504,7 @@ } } -void SDL_Blit_RGB888_BGR888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_BGR888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -653,7 +563,7 @@ } } -void SDL_Blit_RGB888_BGR888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_BGR888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -733,7 +643,7 @@ } } -void SDL_Blit_RGB888_BGR888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_BGR888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -768,7 +678,7 @@ } } -void SDL_Blit_RGB888_BGR888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_BGR888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -824,7 +734,7 @@ } } -void SDL_Blit_RGB888_BGR888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_BGR888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -895,7 +805,7 @@ } } -void SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -987,7 +897,7 @@ } } -void SDL_Blit_BGR888_RGB888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_RGB888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -1031,7 +941,7 @@ } } -void SDL_Blit_BGR888_RGB888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_RGB888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -1090,7 +1000,7 @@ } } -void SDL_Blit_BGR888_RGB888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_RGB888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -1170,7 +1080,7 @@ } } -void SDL_Blit_BGR888_RGB888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_RGB888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1205,7 +1115,7 @@ } } -void SDL_Blit_BGR888_RGB888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_RGB888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1261,7 +1171,7 @@ } } -void SDL_Blit_BGR888_RGB888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_RGB888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1332,7 +1242,7 @@ } } -void SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1424,7 +1334,7 @@ } } -void SDL_Blit_BGR888_BGR888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_BGR888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; int srcy, srcx; @@ -1463,7 +1373,7 @@ } } -void SDL_Blit_BGR888_BGR888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_BGR888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -1522,7 +1432,7 @@ } } -void SDL_Blit_BGR888_BGR888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_BGR888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -1602,7 +1512,7 @@ } } -void SDL_Blit_BGR888_BGR888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_BGR888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1637,7 +1547,7 @@ } } -void SDL_Blit_BGR888_BGR888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_BGR888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1693,7 +1603,7 @@ } } -void SDL_Blit_BGR888_BGR888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_BGR888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1764,7 +1674,7 @@ } } -void SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -1856,7 +1766,7 @@ } } -void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -1900,7 +1810,7 @@ } } -void SDL_Blit_ARGB8888_RGB888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_RGB888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -1959,7 +1869,7 @@ } } -void SDL_Blit_ARGB8888_RGB888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_RGB888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -2039,7 +1949,7 @@ } } -void SDL_Blit_ARGB8888_RGB888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_RGB888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2074,7 +1984,7 @@ } } -void SDL_Blit_ARGB8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2130,7 +2040,7 @@ } } -void SDL_Blit_ARGB8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2201,7 +2111,7 @@ } } -void SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2293,7 +2203,7 @@ } } -void SDL_Blit_ARGB8888_BGR888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_BGR888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -2337,7 +2247,7 @@ } } -void SDL_Blit_ARGB8888_BGR888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_BGR888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -2396,7 +2306,7 @@ } } -void SDL_Blit_ARGB8888_BGR888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_BGR888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -2476,7 +2386,7 @@ } } -void SDL_Blit_ARGB8888_BGR888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_BGR888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2511,7 +2421,7 @@ } } -void SDL_Blit_ARGB8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2567,7 +2477,7 @@ } } -void SDL_Blit_ARGB8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2638,7 +2548,7 @@ } } -void SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2730,7 +2640,7 @@ } } -void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -2774,7 +2684,7 @@ } } -void SDL_Blit_RGBA8888_RGB888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_RGB888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -2833,7 +2743,7 @@ } } -void SDL_Blit_RGBA8888_RGB888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_RGB888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -2913,7 +2823,7 @@ } } -void SDL_Blit_RGBA8888_RGB888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_RGB888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -2948,7 +2858,7 @@ } } -void SDL_Blit_RGBA8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3004,7 +2914,7 @@ } } -void SDL_Blit_RGBA8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3075,7 +2985,7 @@ } } -void SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3167,7 +3077,7 @@ } } -void SDL_Blit_RGBA8888_BGR888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_BGR888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -3211,7 +3121,7 @@ } } -void SDL_Blit_RGBA8888_BGR888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_BGR888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -3270,7 +3180,7 @@ } } -void SDL_Blit_RGBA8888_BGR888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_BGR888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -3350,7 +3260,7 @@ } } -void SDL_Blit_RGBA8888_BGR888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_BGR888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3385,7 +3295,7 @@ } } -void SDL_Blit_RGBA8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3441,7 +3351,7 @@ } } -void SDL_Blit_RGBA8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3512,7 +3422,7 @@ } } -void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3604,7 +3514,7 @@ } } -void SDL_Blit_ABGR8888_RGB888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_RGB888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -3648,7 +3558,7 @@ } } -void SDL_Blit_ABGR8888_RGB888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_RGB888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -3707,7 +3617,7 @@ } } -void SDL_Blit_ABGR8888_RGB888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_RGB888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -3787,7 +3697,7 @@ } } -void SDL_Blit_ABGR8888_RGB888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_RGB888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3822,7 +3732,7 @@ } } -void SDL_Blit_ABGR8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3878,7 +3788,7 @@ } } -void SDL_Blit_ABGR8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -3949,7 +3859,7 @@ } } -void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4041,7 +3951,7 @@ } } -void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -4085,7 +3995,7 @@ } } -void SDL_Blit_ABGR8888_BGR888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_BGR888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -4144,7 +4054,7 @@ } } -void SDL_Blit_ABGR8888_BGR888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_BGR888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -4224,7 +4134,7 @@ } } -void SDL_Blit_ABGR8888_BGR888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_BGR888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4259,7 +4169,7 @@ } } -void SDL_Blit_ABGR8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4315,7 +4225,7 @@ } } -void SDL_Blit_ABGR8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4386,7 +4296,7 @@ } } -void SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4478,7 +4388,7 @@ } } -void SDL_Blit_BGRA8888_RGB888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_RGB888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -4522,7 +4432,7 @@ } } -void SDL_Blit_BGRA8888_RGB888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_RGB888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -4581,7 +4491,7 @@ } } -void SDL_Blit_BGRA8888_RGB888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_RGB888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -4661,7 +4571,7 @@ } } -void SDL_Blit_BGRA8888_RGB888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_RGB888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4696,7 +4606,7 @@ } } -void SDL_Blit_BGRA8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_RGB888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4752,7 +4662,7 @@ } } -void SDL_Blit_BGRA8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4823,7 +4733,7 @@ } } -void SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -4915,7 +4825,7 @@ } } -void SDL_Blit_BGRA8888_BGR888_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_BGR888_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 pixel; @@ -4959,7 +4869,7 @@ } } -void SDL_Blit_BGRA8888_BGR888_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_BGR888_Blend(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -5018,7 +4928,7 @@ } } -void SDL_Blit_BGRA8888_BGR888_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_BGR888_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; Uint32 srcpixel; @@ -5098,7 +5008,7 @@ } } -void SDL_Blit_BGRA8888_BGR888_Modulate(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_BGR888_Modulate(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -5133,7 +5043,7 @@ } } -void SDL_Blit_BGRA8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_BGR888_Modulate_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -5189,7 +5099,7 @@ } } -void SDL_Blit_BGRA8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -5260,7 +5170,7 @@ } } -void SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) +static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) { const int flags = info->flags; const Uint32 modulateR = info->r; @@ -5352,6 +5262,94 @@ } } +static SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[] = { + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Scale }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend_Scale }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Scale }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Scale }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend_Scale }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Scale }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend }, + { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Scale }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend }, + { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Scale }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend }, + { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Scale }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend }, + { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Scale }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend }, + { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Scale }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend }, + { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale }, + { 0, 0, 0, 0, NULL } +}; + /* *INDENT-ON* */ /* vi: set ts=4 sw=4 expandtab: */
--- a/src/video/SDL_blit_auto.h Fri Aug 17 06:21:58 2007 +0000 +++ b/src/video/SDL_blit_auto.h Fri Aug 17 06:40:12 2007 +0000 @@ -24,7 +24,7 @@ /* *INDENT-OFF* */ -extern SDL_BlitFuncEntry *SDL_GeneratedBlitFuncTable; +extern SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[]; /* *INDENT-ON* */
--- a/src/video/sdlgenblit.pl Fri Aug 17 06:21:58 2007 +0000 +++ b/src/video/sdlgenblit.pl Fri Aug 17 06:40:12 2007 +0000 @@ -123,7 +123,7 @@ sub output_copydefs { print FILE <<__EOF__; -extern SDL_BlitFuncEntry *SDL_GeneratedBlitFuncTable; +extern SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[]; __EOF__ } @@ -275,7 +275,7 @@ my $blend = shift; my $scale = shift; - output_copyfuncname("void", $src, $dst, $modulate, $blend, $scale, 1, "\n"); + output_copyfuncname("static void", $src, $dst, $modulate, $blend, $scale, 1, "\n"); print FILE <<__EOF__; { const int flags = info->flags; @@ -384,7 +384,7 @@ sub output_copyfunctable { print FILE <<__EOF__; -static SDL_BlitFuncEntry _SDL_GeneratedBlitFuncTable[] = { +static SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[] = { __EOF__ for (my $i = 0; $i <= $#src_formats; ++$i) { my $src = $src_formats[$i]; @@ -436,8 +436,6 @@ { 0, 0, 0, 0, NULL } }; -SDL_BlitFuncEntry *SDL_GeneratedBlitFuncTable = _SDL_GeneratedBlitFuncTable; - __EOF__ } @@ -469,10 +467,10 @@ open_file("SDL_blit_auto.c"); output_copyinc(); -output_copyfunctable(); for (my $i = 0; $i <= $#src_formats; ++$i) { for (my $j = 0; $j <= $#dst_formats; ++$j) { output_copyfunc_c($src_formats[$i], $dst_formats[$j]); } } +output_copyfunctable(); close_file("SDL_blit_auto.c");