Go to the source code of this file.
◆ 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_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_RLESurface().
◆ SDL_RLEBlit()
Definition at line 449 of file SDL_RLEaccel.c.
468 dstbuf = (
Uint8 *) surf_dst->pixels
469 +
y * surf_dst->pitch +
x * surf_src->format->BytesPerPixel;
470 srcbuf = (
Uint8 *) surf_src->map->data;
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; \
496 switch (surf_src->format->BytesPerPixel) {
516 alpha = surf_src->map->info.a;
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_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_RLESurface(), and SDL_UnRLESurface().
◆ SDL_RLESurface()
Definition at line 1403 of file SDL_RLEaccel.c.
1413 if (
surface->format->BitsPerPixel < 8) {
1438 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 1540 of file SDL_RLEaccel.c.
1561 full.
x = full.
y = 0;
References SDL_Rect::h, NULL, SDL_COPY_RLE_ALPHAKEY, SDL_COPY_RLE_COLORKEY, SDL_FillRect, SDL_free, SDL_malloc, SDL_PREALLOC, SDL_RLEACCEL, SDL_RLEBlit(), UnRLEAlpha(), SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_CalculateBlit(), SDL_FreeSurface(), SDL_LockSurface(), SDL_MapSurface(), and SDL_RLESurface().
#define SDL_UnlockSurface
#define BLIT_TRANSL_555(src, dst)
#define SDL_COPY_RLE_COLORKEY
#define CHOOSE_BLIT(blitter, alpha, fmt)
void SDL_UnRLESurface(SDL_Surface *surface, int recode)
#define SDL_COPY_COLORKEY
GLfloat GLfloat GLfloat alpha
GLint GLint GLint GLint GLint x
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)
#define BLIT_TRANSL_888(src, dst)
#define SDL_COPY_MODULATE_ALPHA
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
A rectangle, with the origin at the upper left.
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 BLIT_TRANSL_565(src, dst)
static int RLEColorkeySurface(SDL_Surface *surface)
#define RLEBLIT(bpp, Type, do_blit)
#define SDL_COPY_MODULATE_COLOR
#define RLEALPHABLIT(Ptype, Ctype, do_blend)
static int RLEAlphaSurface(SDL_Surface *surface)
GLubyte GLubyte GLubyte GLubyte w