Go to the source code of this file.
|
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
|
#define | PIXEL_COPY(to, from, len, bpp) SDL_memcpy(to, from, (size_t)(len) * (bpp)) |
|
#define | OPAQUE_BLIT(to, from, length, bpp, alpha) PIXEL_COPY(to, from, length, bpp) |
|
#define | ALPHA_BLIT32_888(to, from, length, bpp, alpha) |
|
#define | ALPHA_BLIT16_565(to, from, length, bpp, alpha) |
|
#define | ALPHA_BLIT16_555(to, from, length, bpp, alpha) |
|
#define | ALPHA_BLIT_ANY(to, from, length, bpp, alpha) |
|
#define | ALPHA_BLIT32_888_50(to, from, length, bpp, alpha) |
|
#define | BLEND16_50(dst, src, mask) |
|
#define | ALPHA_BLIT16_50(to, from, length, bpp, alpha, mask) |
|
#define | ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7deU) |
|
#define | ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbdeU) |
|
#define | CHOOSE_BLIT(blitter, alpha, fmt) |
|
#define | RLEPIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) |
|
#define | RLECLIPBLIT(bpp, Type, do_blit) |
|
#define | RLESKIP(bpp, Type) |
|
#define | RLEBLIT(bpp, Type, do_blit) |
|
#define | BLIT_TRANSL_888(src, dst) |
|
#define | BLIT_TRANSL_565(src, dst) |
|
#define | BLIT_TRANSL_555(src, dst) |
|
#define | RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) |
|
#define | RLEALPHABLIT(Ptype, Ctype, do_blend) |
|
#define | ISOPAQUE(pixel, fmt) ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255) |
|
#define | ISTRANSL(pixel, fmt) ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U) |
|
#define | ADD_OPAQUE_COUNTS(n, m) |
|
#define | ADD_TRANSL_COUNTS(n, m) (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4) |
|
#define | ADD_COUNTS(n, m) |
|
|
static void | RLEClipBlit (int w, Uint8 *srcbuf, SDL_Surface *surf_dst, Uint8 *dstbuf, SDL_Rect *srcrect, unsigned alpha) |
|
static int | SDL_RLEBlit (SDL_Surface *surf_src, SDL_Rect *srcrect, SDL_Surface *surf_dst, SDL_Rect *dstrect) |
|
static void | RLEAlphaClipBlit (int w, Uint8 *srcbuf, SDL_Surface *surf_dst, Uint8 *dstbuf, SDL_Rect *srcrect) |
|
static int | SDL_RLEAlphaBlit (SDL_Surface *surf_src, SDL_Rect *srcrect, SDL_Surface *surf_dst, SDL_Rect *dstrect) |
|
static int | copy_opaque_16 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) |
|
static int | uncopy_opaque_16 (Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt) |
|
static int | copy_transl_565 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) |
|
static int | copy_transl_555 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) |
|
static int | uncopy_transl_16 (Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt) |
|
static int | copy_32 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt) |
|
static int | uncopy_32 (Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt) |
|
static int | RLEAlphaSurface (SDL_Surface *surface) |
|
static Uint32 | getpix_8 (const Uint8 *srcbuf) |
|
static Uint32 | getpix_16 (const Uint8 *srcbuf) |
|
static Uint32 | getpix_24 (const Uint8 *srcbuf) |
|
static Uint32 | getpix_32 (const Uint8 *srcbuf) |
|
static int | RLEColorkeySurface (SDL_Surface *surface) |
|
int | SDL_RLESurface (SDL_Surface *surface) |
|
static SDL_bool | UnRLEAlpha (SDL_Surface *surface) |
|
void | SDL_UnRLESurface (SDL_Surface *surface, int recode) |
|
◆ ADD_COUNTS
#define ADD_COUNTS |
( |
|
n, |
|
|
|
m |
|
) |
| |
Value:
dst += 4; \
} else { \
dst += 2; \
}
◆ ADD_OPAQUE_COUNTS
#define ADD_OPAQUE_COUNTS |
( |
|
n, |
|
|
|
m |
|
) |
| |
Value: if(df->BytesPerPixel == 4) { \
dst += 4; \
} else { \
dst += 2; \
}
◆ ADD_TRANSL_COUNTS
◆ ALPHA_BLIT16_50
Value: do { \
\
} else { \
\
n--; \
} \
for (;
n > 1;
n -= 2) { \
src += 2; \
dst += 2; \
} \
} \
} while(0)
Definition at line 270 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT16_555
Value: do { \
Uint32 ALPHA =
alpha >> 3; \
s = (
s |
s << 16) & 0x03e07c1f; \
d = (
d |
d << 16) & 0x03e07c1f; \
d += (
s -
d) * ALPHA >> 5; \
d &= 0x03e07c1f; \
} \
} while(0)
Definition at line 157 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT16_555_50
◆ ALPHA_BLIT16_565
Value: do { \
Uint32 ALPHA =
alpha >> 3; \
s = (
s |
s << 16) & 0x07e0f81f; \
d = (
d |
d << 16) & 0x07e0f81f; \
d += (
s -
d) * ALPHA >> 5; \
d &= 0x07e0f81f; \
} \
} while(0)
Definition at line 140 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT16_565_50
◆ ALPHA_BLIT32_888
Value: do { \
Uint32
s1 =
s & 0xff00ff; \
Uint32 d1 =
d & 0xff00ff; \
d1 = (d1 + ((
s1 - d1) *
alpha >> 8)) & 0xff00ff; \
s &= 0xff00; \
d &= 0xff00; \
d = (
d + ((
s -
d) *
alpha >> 8)) & 0xff00; \
} \
} while (0)
Definition at line 116 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT32_888_50
Value: do { \
*
dst++ = (((
s & 0x00fefefe) + (
d & 0x00fefefe)) >> 1) \
+ (
s &
d & 0x00010101); \
} \
} while(0)
Definition at line 242 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT_ANY
◆ BLEND16_50
◆ BLIT_TRANSL_555
#define BLIT_TRANSL_555 |
( |
|
src, |
|
|
|
dst |
|
) |
| |
Value: do { \
unsigned
alpha = (
s & 0x3e0) >> 5; \
s &= 0x03e07c1f; \
d = (
d |
d << 16) & 0x03e07c1f; \
d &= 0x03e07c1f; \
} while(0)
Definition at line 603 of file SDL_RLEaccel.c.
◆ BLIT_TRANSL_565
#define BLIT_TRANSL_565 |
( |
|
src, |
|
|
|
dst |
|
) |
| |
Value: do { \
unsigned
alpha = (
s & 0x3e0) >> 5; \
s &= 0x07e0f81f; \
d = (
d |
d << 16) & 0x07e0f81f; \
d &= 0x07e0f81f; \
} while(0)
Definition at line 591 of file SDL_RLEaccel.c.
◆ BLIT_TRANSL_888
#define BLIT_TRANSL_888 |
( |
|
src, |
|
|
|
dst |
|
) |
| |
Value: do { \
Uint32
s1 =
s & 0xff00ff; \
Uint32 d1 =
d & 0xff00ff; \
d1 = (d1 + ((
s1 - d1) *
alpha >> 8)) & 0xff00ff; \
s &= 0xff00; \
d &= 0xff00; \
d = (
d + ((
s -
d) *
alpha >> 8)) & 0xff00; \
dst = d1 |
d | 0xff000000; \
} while(0)
Definition at line 573 of file SDL_RLEaccel.c.
◆ CHOOSE_BLIT
#define CHOOSE_BLIT |
( |
|
blitter, |
|
|
|
alpha, |
|
|
|
fmt |
|
) |
| |
◆ ISOPAQUE
#define ISOPAQUE |
( |
|
pixel, |
|
|
|
fmt |
|
) |
| ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255) |
◆ ISTRANSL
#define ISTRANSL |
( |
|
pixel, |
|
|
|
fmt |
|
) |
| ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U) |
◆ MIN
#define MIN |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < (b) ? (a) : (b)) |
◆ OPAQUE_BLIT
◆ PIXEL_COPY
◆ RLEALPHABLIT
#define RLEALPHABLIT |
( |
|
Ptype, |
|
|
|
Ctype, |
|
|
|
do_blend |
|
) |
| |
◆ RLEALPHACLIPBLIT
#define RLEALPHACLIPBLIT |
( |
|
Ptype, |
|
|
|
Ctype, |
|
|
|
do_blend |
|
) |
| |
◆ RLEBLIT
#define RLEBLIT |
( |
|
bpp, |
|
|
|
Type, |
|
|
|
do_blit |
|
) |
| |
Value: do { \
int linecount = srcrect->h; \
int ofs = 0; \
for(;;) { \
unsigned run; \
ofs += *(
Type *)srcbuf; \
run = ((
Type *)srcbuf)[1]; \
srcbuf += 2 *
sizeof(
Type); \
if(run) { \
do_blit(dstbuf + ofs *
bpp, srcbuf, run,
bpp,
alpha); \
ofs += run; \
} else if(!ofs) \
break; \
ofs = 0; \
dstbuf += surf_dst->pitch; \
if(!--linecount) \
break; \
} \
} \
} while(0)
◆ RLECLIPBLIT
#define RLECLIPBLIT |
( |
|
bpp, |
|
|
|
Type, |
|
|
|
do_blit |
|
) |
| |
◆ RLEPIXEL_FROM_RGBA
#define RLEPIXEL_FROM_RGBA |
( |
|
Pixel, |
|
|
|
fmt, |
|
|
|
r, |
|
|
|
g, |
|
|
|
b, |
|
|
|
a |
|
) |
| |
Value:{ \
Pixel = ((
r>>fmt->Rloss)<<fmt->Rshift)| \
((
g>>fmt->Gloss)<<fmt->Gshift)| \
((
b>>fmt->Bloss)<<fmt->Bshift)| \
}
Definition at line 379 of file SDL_RLEaccel.c.
◆ RLESKIP
Value: for(;;) { \
int run; \
ofs += *(
Type *)srcbuf; \
run = ((
Type *)srcbuf)[1]; \
srcbuf +=
sizeof(
Type) * 2; \
if(run) { \
ofs += run; \
} else if(!ofs) \
ofs = 0; \
if(!--vskip) \
break; \
} \
}
◆ getpix_func
◆ copy_32()
◆ copy_opaque_16()
◆ copy_transl_555()
◆ copy_transl_565()
◆ getpix_16()
◆ getpix_24()
Definition at line 1254 of file SDL_RLEaccel.c.
1256 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
1257 return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
1259 return (srcbuf[0] << 16) + (srcbuf[1] << 8) + srcbuf[2];
◆ getpix_32()
◆ getpix_8()
◆ RLEAlphaClipBlit()
Definition at line 637 of file SDL_RLEaccel.c.
646 #define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) \
648 int linecount = srcrect->h; \
649 int left = srcrect->x; \
650 int right = left + srcrect->w; \
651 dstbuf -= left * sizeof(Ptype); \
657 ofs += ((Ctype *)srcbuf)[0]; \
658 run = ((Ctype *)srcbuf)[1]; \
659 srcbuf += 2 * sizeof(Ctype); \
664 if(left - cofs > 0) { \
665 crun -= left - cofs; \
668 if(crun > right - cofs) \
669 crun = right - cofs; \
671 PIXEL_COPY(dstbuf + cofs * sizeof(Ptype), \
672 srcbuf + (cofs - ofs) * sizeof(Ptype), \
673 (unsigned)crun, sizeof(Ptype)); \
674 srcbuf += run * sizeof(Ptype); \
680 if(sizeof(Ptype) == 2) \
681 srcbuf += (uintptr_t)srcbuf & 2; \
686 ofs += ((Uint16 *)srcbuf)[0]; \
687 run = ((Uint16 *)srcbuf)[1]; \
693 if(left - cofs > 0) { \
694 crun -= left - cofs; \
697 if(crun > right - cofs) \
698 crun = right - cofs; \
700 Ptype *dst = (Ptype *)dstbuf + cofs; \
701 Uint32 *src = (Uint32 *)srcbuf + (cofs - ofs); \
703 for(i = 0; i < crun; i++) \
704 do_blend(src[i], dst[i]); \
710 dstbuf += surf_dst->pitch; \
711 } while(--linecount); \
References BLIT_TRANSL_555, BLIT_TRANSL_565, BLIT_TRANSL_888, SDL_PixelFormat::Bmask, SDL_PixelFormat::BytesPerPixel, SDL_Surface::format, SDL_PixelFormat::Gmask, RLEALPHACLIPBLIT, and SDL_PixelFormat::Rmask.
Referenced by SDL_RLEAlphaBlit().
◆ RLEAlphaSurface()
Definition at line 1028 of file SDL_RLEaccel.c.
1034 int max_transl_run = 65535;
1037 int (*copy_opaque) (
void *,
Uint32 *, int,
1039 int (*copy_transl) (
void *,
Uint32 *, int,
1046 if (
surface->format->BitsPerPixel != 32)
1057 if (df->
Gmask == 0x07e0
1058 || df->
Rmask == 0x07e0 || df->
Bmask == 0x07e0) {
1065 if (df->
Gmask == 0x03e0
1066 || df->
Rmask == 0x03e0 || df->
Bmask == 0x03e0) {
1075 max_opaque_run = 255;
1082 if (masksum != 0x00ffffff)
1086 max_opaque_run = 255;
1140 #define ADD_TRANSL_COUNTS(n, m) \
1141 (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4)
1143 for (
y = 0;
y <
h;
y++) {
1144 int runstart, skipstart;
1156 skip = runstart - skipstart;
1160 while (skip > max_opaque_run) {
1162 skip -= max_opaque_run;
1164 len =
MIN(run, max_opaque_run);
1170 len =
MIN(run, max_opaque_run);
1191 skip = runstart - skipstart;
1192 blankline &= (skip ==
w);
1194 while (skip > max_transl_run) {
1196 skip -= max_transl_run;
1198 len =
MIN(run, max_transl_run);
1204 len =
MIN(run, max_transl_run);
1220 #undef ADD_OPAQUE_COUNTS
1221 #undef ADD_TRANSL_COUNTS
References ADD_OPAQUE_COUNTS, ADD_TRANSL_COUNTS, SDL_PixelFormat::Aloss, SDL_PixelFormat::Amask, SDL_PixelFormat::Ashift, SDL_PixelFormat::Bloss, SDL_PixelFormat::Bmask, SDL_PixelFormat::Bshift, SDL_PixelFormat::BytesPerPixel, RLEDestFormat::BytesPerPixel, copy_32(), copy_opaque_16(), copy_transl_555(), copy_transl_565(), SDL_BlitMap::dst, SDL_Surface::format, SDL_PixelFormat::format, SDL_PixelFormat::Gloss, SDL_PixelFormat::Gmask, SDL_PixelFormat::Gshift, ISOPAQUE, ISTRANSL, SDL_Surface::map, MIN, NULL, SDL_PixelFormat::Rloss, SDL_PixelFormat::Rmask, SDL_PixelFormat::Rshift, SDL_malloc, SDL_OutOfMemory, SDL_PREALLOC, SDL_realloc, SDL_SIMD_ALIGNED, and SDL_SIMDFree.
Referenced by SDL_RLESurface().
◆ RLEClipBlit()
Definition at line 392 of file SDL_RLEaccel.c.
397 #define RLECLIPBLIT(bpp, Type, do_blit) \
399 int linecount = srcrect->h; \
401 int left = srcrect->x; \
402 int right = left + srcrect->w; \
403 dstbuf -= left * bpp; \
406 ofs += *(Type *)srcbuf; \
407 run = ((Type *)srcbuf)[1]; \
408 srcbuf += 2 * sizeof(Type); \
415 if (left - ofs > 0) { \
416 start = left - ofs; \
419 goto nocopy ## bpp ## do_blit; \
421 startcol = ofs + start; \
422 if (len > right - startcol) \
423 len = right - startcol; \
424 do_blit(dstbuf + startcol * bpp, srcbuf + start * bpp, \
427 nocopy ## bpp ## do_blit: \
428 srcbuf += run * bpp; \
435 dstbuf += surf_dst->pitch; \
References CHOOSE_BLIT, SDL_Surface::format, and RLECLIPBLIT.
Referenced by SDL_RLEBlit().
◆ RLEColorkeySurface()
Definition at line 1276 of file SDL_RLEaccel.c.
1281 Uint8 *srcbuf, *lastline;
1283 const int bpp =
surface->format->BytesPerPixel;
1312 if (rlebuf ==
NULL) {
1318 maxn =
bpp == 4 ? 65535 : 255;
1320 rgbmask = ~
surface->format->Amask;
1321 ckey =
surface->map->info.colorkey & rgbmask;
1338 for (
y = 0;
y <
h;
y++) {
1347 while (
x <
w && (getpix(srcbuf +
x *
bpp) & rgbmask) == ckey)
1350 while (
x <
w && (getpix(srcbuf +
x *
bpp) & rgbmask) != ckey)
1352 skip = runstart - skipstart;
1358 while (skip > maxn) {
References ADD_COUNTS, bpp, getpixes, MIN, NULL, SDL_malloc, SDL_memcpy, SDL_OutOfMemory, SDL_PREALLOC, SDL_realloc, SDL_SIMD_ALIGNED, and SDL_SIMDFree.
Referenced by SDL_RLESurface().
◆ SDL_RLEAlphaBlit()
Definition at line 729 of file SDL_RLEaccel.c.
734 Uint8 *srcbuf, *dstbuf;
751 int vskip = srcrect->
y;
778 ofs += ((
Uint16 *) srcbuf)[0];
779 run = ((
Uint16 *) srcbuf)[1];
780 srcbuf += 4 * (run + 1);
791 ofs += ((
Uint16 *) srcbuf)[0];
792 run = ((
Uint16 *) srcbuf)[1];
806 if (srcrect->
x || srcrect->
w != surf_src->
w) {
815 #define RLEALPHABLIT(Ptype, Ctype, do_blend) \
817 int linecount = srcrect->h; \
823 ofs += ((Ctype *)srcbuf)[0]; \
824 run = ((Ctype *)srcbuf)[1]; \
825 srcbuf += 2 * sizeof(Ctype); \
827 PIXEL_COPY(dstbuf + ofs * sizeof(Ptype), srcbuf, \
828 run, sizeof(Ptype)); \
829 srcbuf += run * sizeof(Ptype); \
835 if(sizeof(Ptype) == 2) \
836 srcbuf += (uintptr_t)srcbuf & 2; \
841 ofs += ((Uint16 *)srcbuf)[0]; \
842 run = ((Uint16 *)srcbuf)[1]; \
845 Ptype *dst = (Ptype *)dstbuf + ofs; \
847 for(i = 0; i < run; i++) { \
848 Uint32 src = *(Uint32 *)srcbuf; \
849 do_blend(src, *dst); \
856 dstbuf += surf_dst->pitch; \
857 } while(--linecount); \
862 if (df->
Gmask == 0x07e0 || df->
Rmask == 0x07e0
863 || df->
Bmask == 0x07e0)
References BLIT_TRANSL_555, BLIT_TRANSL_565, BLIT_TRANSL_888, SDL_PixelFormat::Bmask, SDL_PixelFormat::BytesPerPixel, SDL_BlitMap::data, done, SDL_Surface::format, SDL_PixelFormat::Gmask, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, RLEALPHABLIT, RLEAlphaClipBlit(), SDL_PixelFormat::Rmask, SDL_LockSurface, SDL_MUSTLOCK, SDL_UnlockSurface, SDL_Surface::w, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_RLESurface().
◆ SDL_RLEBlit()
Definition at line 451 of file SDL_RLEaccel.c.
476 int vskip = srcrect->
y;
480 #define RLESKIP(bpp, Type) \
483 ofs += *(Type *)srcbuf; \
484 run = ((Type *)srcbuf)[1]; \
485 srcbuf += sizeof(Type) * 2; \
487 srcbuf += run * bpp; \
520 if (srcrect->
x || srcrect->
w != surf_src->
w) {
525 #define RLEBLIT(bpp, Type, do_blit) \
527 int linecount = srcrect->h; \
531 ofs += *(Type *)srcbuf; \
532 run = ((Type *)srcbuf)[1]; \
533 srcbuf += 2 * sizeof(Type); \
535 do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, alpha); \
536 srcbuf += run * bpp; \
542 dstbuf += surf_dst->pitch; \
References SDL_BlitInfo::a, SDL_PixelFormat::BytesPerPixel, CHOOSE_BLIT, SDL_BlitMap::data, done, SDL_Surface::format, SDL_BlitMap::info, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, RLEBLIT, RLEClipBlit(), RLESKIP, SDL_LockSurface, SDL_MUSTLOCK, SDL_UnlockSurface, SDL_Surface::w, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_RLESurface(), and SDL_UnRLESurface().
◆ SDL_RLESurface()
Definition at line 1407 of file SDL_RLEaccel.c.
1417 if (
surface->format->BitsPerPixel < 8) {
1442 if (!
surface->map->identity) {
References RLEAlphaSurface(), RLEColorkeySurface(), SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_COLORKEY, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_COPY_MUL, SDL_COPY_NEAREST, SDL_COPY_RLE_ALPHAKEY, SDL_COPY_RLE_COLORKEY, SDL_RLEACCEL, SDL_RLEAlphaBlit(), SDL_RLEBlit(), and SDL_UnRLESurface().
Referenced by SDL_CalculateBlit(), and SDL_UnlockSurface().
◆ SDL_UnRLESurface()
Definition at line 1547 of file SDL_RLEaccel.c.
1569 full.
x = full.
y = 0;
References SDL_Rect::h, NULL, SDL_COPY_RLE_ALPHAKEY, SDL_COPY_RLE_COLORKEY, SDL_FillRect, SDL_free, SDL_PREALLOC, SDL_RLEACCEL, SDL_RLEBlit(), SDL_SIMD_ALIGNED, SDL_SIMDAlloc, UnRLEAlpha(), SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_CalculateBlit(), SDL_FreeSurface(), SDL_LockSurface(), SDL_MapSurface(), and SDL_RLESurface().
◆ uncopy_32()
◆ uncopy_opaque_16()
◆ uncopy_transl_16()
◆ UnRLEAlpha()
Definition at line 1471 of file SDL_RLEaccel.c.
1477 int (*uncopy_opaque) (
Uint32 *,
void *, int,
1479 int (*uncopy_transl) (
Uint32 *,
void *, int,
1488 uncopy_opaque = uncopy_transl =
uncopy_32;
1500 srcbuf = (
Uint8 *) (df + 1);
1511 ofs += ((
Uint16 *) srcbuf)[0];
1512 run = ((
Uint16 *) srcbuf)[1];
1516 srcbuf += uncopy_opaque(
dst + ofs, srcbuf, run, df, sf);
1531 ofs += ((
Uint16 *) srcbuf)[0];
1532 run = ((
Uint16 *) srcbuf)[1];
1535 srcbuf += uncopy_transl(
dst + ofs, srcbuf, run, df, sf);
References bpp, RLEDestFormat::BytesPerPixel, SDL_PixelFormat::format, SDL_FALSE, SDL_memset, SDL_SIMD_ALIGNED, SDL_SIMDAlloc, SDL_TRUE, uncopy_32(), uncopy_opaque_16(), and uncopy_transl_16().
Referenced by SDL_UnRLESurface().
◆ getpixes
#define SDL_UnlockSurface
static int uncopy_transl_16(Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
#define BLIT_TRANSL_555(src, dst)
static Uint32 getpix_32(const Uint8 *srcbuf)
A collection of pixels used in software blitting.
static Uint32 getpix_24(const Uint8 *srcbuf)
#define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend)
#define SDL_COPY_RLE_COLORKEY
#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)
static Uint32 getpix_16(const Uint8 *srcbuf)
static int SDL_RLEBlit(SDL_Surface *surf_src, SDL_Rect *srcrect, SDL_Surface *surf_dst, SDL_Rect *dstrect)
GLboolean GLboolean GLboolean b
static int uncopy_32(Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
#define CHOOSE_BLIT(blitter, alpha, fmt)
void SDL_UnRLESurface(SDL_Surface *surface, int recode)
Uint32(* getpix_func)(const Uint8 *)
static int copy_transl_565(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
GLdouble GLdouble GLdouble r
#define SDL_COPY_COLORKEY
#define ADD_OPAQUE_COUNTS(n, m)
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat GLfloat h
GLuint GLsizei GLsizei * length
#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
#define RLEPIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)
GLfloat GLfloat GLfloat alpha
GLint GLint GLint GLint GLint x
static int copy_32(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
static void RLEAlphaClipBlit(int w, Uint8 *srcbuf, SDL_Surface *surf_dst, Uint8 *dstbuf, SDL_Rect *srcrect)
#define RLESKIP(bpp, Type)
static const getpix_func getpixes[4]
#define RLECLIPBLIT(bpp, Type, do_blit)
#define BLIT_TRANSL_888(src, dst)
#define SDL_COPY_MODULATE_ALPHA
#define SDL_OutOfMemory()
static void RLEClipBlit(int w, Uint8 *srcbuf, SDL_Surface *surf_dst, Uint8 *dstbuf, SDL_Rect *srcrect, unsigned alpha)
GLint GLint GLint GLint GLint GLint y
#define SDL_COPY_RLE_ALPHAKEY
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp
#define ISTRANSL(pixel, fmt)
static int uncopy_opaque_16(Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
static int copy_opaque_16(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
static Uint32 getpix_8(const Uint8 *srcbuf)
static int SDL_RLEAlphaBlit(SDL_Surface *surf_src, SDL_Rect *srcrect, SDL_Surface *surf_dst, SDL_Rect *dstrect)
#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)
A rectangle, with the origin at the upper left (integer).
static SDL_bool UnRLEAlpha(SDL_Surface *surface)
#define ISOPAQUE(pixel, fmt)
#define BLIT_TRANSL_565(src, dst)
static int RLEColorkeySurface(SDL_Surface *surface)
#define RLEBLIT(bpp, Type, do_blit)
static int copy_transl_555(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)
#define ADD_TRANSL_COUNTS(n, m)
#define SDL_COPY_MODULATE_COLOR
#define RLEALPHABLIT(Ptype, Ctype, do_blend)
static int RLEAlphaSurface(SDL_Surface *surface)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char const char const SDL_SCANF_FORMAT_STRING char return SDL_ThreadFunction const char void return Uint32 return Uint32 SDL_AssertionHandler void SDL_SpinLock SDL_atomic_t int int return SDL_atomic_t return void void void return void return int return SDL_AudioSpec SDL_AudioSpec return int int return return int SDL_RWops int SDL_AudioSpec Uint8 ** d
GLubyte GLubyte GLubyte GLubyte w