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, 0xf7de) |
|
#define | ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbde) |
|
#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) |
|
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) |
|
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 (Uint8 *srcbuf) |
|
static Uint32 | getpix_16 (Uint8 *srcbuf) |
|
static Uint32 | getpix_24 (Uint8 *srcbuf) |
|
static Uint32 | getpix_32 (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:if(bpp == 4) { \
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 268 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT16_555
#define ALPHA_BLIT16_555 |
( |
|
to, |
|
|
|
from, |
|
|
|
length, |
|
|
|
bpp, |
|
|
|
alpha |
|
) |
| |
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 155 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT16_555_50
◆ ALPHA_BLIT16_565
#define ALPHA_BLIT16_565 |
( |
|
to, |
|
|
|
from, |
|
|
|
length, |
|
|
|
bpp, |
|
|
|
alpha |
|
) |
| |
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 138 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT16_565_50
◆ ALPHA_BLIT32_888
#define ALPHA_BLIT32_888 |
( |
|
to, |
|
|
|
from, |
|
|
|
length, |
|
|
|
bpp, |
|
|
|
alpha |
|
) |
| |
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 114 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT32_888_50
#define ALPHA_BLIT32_888_50 |
( |
|
to, |
|
|
|
from, |
|
|
|
length, |
|
|
|
bpp, |
|
|
|
alpha |
|
) |
| |
Value:do { \
*
dst++ = (((
s & 0x00fefefe) + (
d & 0x00fefefe)) >> 1) \
+ (
s &
d & 0x00010101); \
} \
} while(0)
Definition at line 240 of file SDL_RLEaccel.c.
◆ ALPHA_BLIT_ANY
#define ALPHA_BLIT_ANY |
( |
|
to, |
|
|
|
from, |
|
|
|
length, |
|
|
|
bpp, |
|
|
|
alpha |
|
) |
| |
◆ 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 601 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 589 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 571 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); \
srcbuf += run * bpp; \
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 377 of file SDL_RLEaccel.c.
◆ RLESKIP
#define RLESKIP |
( |
|
bpp, |
|
|
|
Type |
|
) |
| |
Value:for(;;) { \
int run; \
ofs += *(
Type *)srcbuf; \
run = ((
Type *)srcbuf)[1]; \
srcbuf +=
sizeof(
Type) * 2; \
if(run) { \
srcbuf += run * bpp; \
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 1252 of file SDL_RLEaccel.c.
1254 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
1255 return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
1257 return (srcbuf[0] << 16) + (srcbuf[1] << 8) + srcbuf[2];
◆ getpix_32()
◆ getpix_8()
◆ RLEAlphaClipBlit()
Definition at line 635 of file SDL_RLEaccel.c.
644 #define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) \
646 int linecount = srcrect->h; \
647 int left = srcrect->x; \
648 int right = left + srcrect->w; \
649 dstbuf -= left * sizeof(Ptype); \
655 ofs += ((Ctype *)srcbuf)[0]; \
656 run = ((Ctype *)srcbuf)[1]; \
657 srcbuf += 2 * sizeof(Ctype); \
662 if(left - cofs > 0) { \
663 crun -= left - cofs; \
666 if(crun > right - cofs) \
667 crun = right - cofs; \
669 PIXEL_COPY(dstbuf + cofs * sizeof(Ptype), \
670 srcbuf + (cofs - ofs) * sizeof(Ptype), \
671 (unsigned)crun, sizeof(Ptype)); \
672 srcbuf += run * sizeof(Ptype); \
678 if(sizeof(Ptype) == 2) \
679 srcbuf += (uintptr_t)srcbuf & 2; \
684 ofs += ((Uint16 *)srcbuf)[0]; \
685 run = ((Uint16 *)srcbuf)[1]; \
691 if(left - cofs > 0) { \
692 crun -= left - cofs; \
695 if(crun > right - cofs) \
696 crun = right - cofs; \
698 Ptype *dst = (Ptype *)dstbuf + cofs; \
699 Uint32 *src = (Uint32 *)srcbuf + (cofs - ofs); \
701 for(i = 0; i < crun; i++) \
702 do_blend(src[i], dst[i]); \
708 dstbuf += surf_dst->pitch; \
709 } 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 1026 of file SDL_RLEaccel.c.
1032 int max_transl_run = 65535;
1035 int (*copy_opaque) (
void *,
Uint32 *, int,
1037 int (*copy_transl) (
void *,
Uint32 *, int,
1044 if (
surface->format->BitsPerPixel != 32)
1055 if (df->
Gmask == 0x07e0
1056 || df->
Rmask == 0x07e0 || df->
Bmask == 0x07e0) {
1063 if (df->
Gmask == 0x03e0
1064 || df->
Rmask == 0x03e0 || df->
Bmask == 0x03e0) {
1073 max_opaque_run = 255;
1080 if (masksum != 0x00ffffff)
1084 max_opaque_run = 255;
1138 #define ADD_TRANSL_COUNTS(n, m) \
1139 (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4)
1141 for (
y = 0;
y <
h;
y++) {
1142 int runstart, skipstart;
1154 skip = runstart - skipstart;
1158 while (skip > max_opaque_run) {
1160 skip -= max_opaque_run;
1162 len =
MIN(run, max_opaque_run);
1168 len =
MIN(run, max_opaque_run);
1189 skip = runstart - skipstart;
1190 blankline &= (skip ==
w);
1192 while (skip > max_transl_run) {
1194 skip -= max_transl_run;
1196 len =
MIN(run, max_transl_run);
1202 len =
MIN(run, max_transl_run);
1218 #undef ADD_OPAQUE_COUNTS
1219 #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 390 of file SDL_RLEaccel.c.
395 #define RLECLIPBLIT(bpp, Type, do_blit) \
397 int linecount = srcrect->h; \
399 int left = srcrect->x; \
400 int right = left + srcrect->w; \
401 dstbuf -= left * bpp; \
404 ofs += *(Type *)srcbuf; \
405 run = ((Type *)srcbuf)[1]; \
406 srcbuf += 2 * sizeof(Type); \
413 if (left - ofs > 0) { \
414 start = left - ofs; \
417 goto nocopy ## bpp ## do_blit; \
419 startcol = ofs + start; \
420 if (len > right - startcol) \
421 len = right - startcol; \
422 do_blit(dstbuf + startcol * bpp, srcbuf + start * bpp, \
425 nocopy ## bpp ## do_blit: \
426 srcbuf += run * bpp; \
433 dstbuf += surf_dst->pitch; \
References CHOOSE_BLIT, SDL_Surface::format, and RLECLIPBLIT.
Referenced by SDL_RLEBlit().
◆ RLEColorkeySurface()
Definition at line 1274 of file SDL_RLEaccel.c.
1279 Uint8 *srcbuf, *lastline;
1281 const int bpp =
surface->format->BytesPerPixel;
1310 if (rlebuf ==
NULL) {
1316 maxn = bpp == 4 ? 65535 : 255;
1318 rgbmask = ~
surface->format->Amask;
1319 ckey =
surface->map->info.colorkey & rgbmask;
1336 for (
y = 0;
y <
h;
y++) {
1345 while (
x <
w && (getpix(srcbuf +
x * bpp) & rgbmask) == ckey)
1348 while (
x <
w && (getpix(srcbuf +
x * bpp) & rgbmask) != ckey)
1350 skip = runstart - skipstart;
1356 while (skip > maxn) {
References ADD_COUNTS, 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 727 of file SDL_RLEaccel.c.
732 Uint8 *srcbuf, *dstbuf;
749 int vskip = srcrect->
y;
776 ofs += ((
Uint16 *) srcbuf)[0];
777 run = ((
Uint16 *) srcbuf)[1];
778 srcbuf += 4 * (run + 1);
789 ofs += ((
Uint16 *) srcbuf)[0];
790 run = ((
Uint16 *) srcbuf)[1];
804 if (srcrect->
x || srcrect->
w != surf_src->
w) {
813 #define RLEALPHABLIT(Ptype, Ctype, do_blend) \
815 int linecount = srcrect->h; \
821 ofs += ((Ctype *)srcbuf)[0]; \
822 run = ((Ctype *)srcbuf)[1]; \
823 srcbuf += 2 * sizeof(Ctype); \
825 PIXEL_COPY(dstbuf + ofs * sizeof(Ptype), srcbuf, \
826 run, sizeof(Ptype)); \
827 srcbuf += run * sizeof(Ptype); \
833 if(sizeof(Ptype) == 2) \
834 srcbuf += (uintptr_t)srcbuf & 2; \
839 ofs += ((Uint16 *)srcbuf)[0]; \
840 run = ((Uint16 *)srcbuf)[1]; \
843 Ptype *dst = (Ptype *)dstbuf + ofs; \
845 for(i = 0; i < run; i++) { \
846 Uint32 src = *(Uint32 *)srcbuf; \
847 do_blend(src, *dst); \
854 dstbuf += surf_dst->pitch; \
855 } while(--linecount); \
860 if (df->
Gmask == 0x07e0 || df->
Rmask == 0x07e0
861 || 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 449 of file SDL_RLEaccel.c.
474 int vskip = srcrect->
y;
478 #define RLESKIP(bpp, Type) \
481 ofs += *(Type *)srcbuf; \
482 run = ((Type *)srcbuf)[1]; \
483 srcbuf += sizeof(Type) * 2; \
485 srcbuf += run * bpp; \
518 if (srcrect->
x || srcrect->
w != surf_src->
w) {
523 #define RLEBLIT(bpp, Type, do_blit) \
525 int linecount = srcrect->h; \
529 ofs += *(Type *)srcbuf; \
530 run = ((Type *)srcbuf)[1]; \
531 srcbuf += 2 * sizeof(Type); \
533 do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, alpha); \
534 srcbuf += run * bpp; \
540 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 1405 of file SDL_RLEaccel.c.
1415 if (
surface->format->BitsPerPixel < 8) {
1440 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_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 1545 of file SDL_RLEaccel.c.
1567 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 1469 of file SDL_RLEaccel.c.
1475 int (*uncopy_opaque) (
Uint32 *,
void *, int,
1477 int (*uncopy_transl) (
Uint32 *,
void *, int,
1486 uncopy_opaque = uncopy_transl =
uncopy_32;
1498 srcbuf = (
Uint8 *) (df + 1);
1509 ofs += ((
Uint16 *) srcbuf)[0];
1510 run = ((
Uint16 *) srcbuf)[1];
1514 srcbuf += uncopy_opaque(
dst + ofs, srcbuf, run, df, sf);
1529 ofs += ((
Uint16 *) srcbuf)[0];
1530 run = ((
Uint16 *) srcbuf)[1];
1533 srcbuf += uncopy_transl(
dst + ofs, srcbuf, run, df, sf);
References 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)
A collection of pixels used in software blitting.
#define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend)
#define SDL_COPY_RLE_COLORKEY
#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)
static Uint32 getpix_24(Uint8 *srcbuf)
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)
static int copy_transl_565(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
GLdouble GLdouble GLdouble r
Uint32(* getpix_func)(Uint8 *)
#define SDL_COPY_COLORKEY
#define ADD_OPAQUE_COUNTS(n, m)
GLboolean GLboolean GLboolean GLboolean a
static Uint32 getpix_16(Uint8 *srcbuf)
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)
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)
#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
#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)
#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)
A rectangle, with the origin at the upper left (integer).
int SDL_RLEAlphaBlit(SDL_Surface *surf_src, SDL_Rect *srcrect, SDL_Surface *surf_dst, SDL_Rect *dstrect)
static SDL_bool UnRLEAlpha(SDL_Surface *surface)
#define ISOPAQUE(pixel, fmt)
#define BLIT_TRANSL_565(src, dst)
static Uint32 getpix_8(Uint8 *srcbuf)
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)
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)
static int RLEAlphaSurface(SDL_Surface *surface)
static Uint32 getpix_32(Uint8 *srcbuf)
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