SDL
2.0
|
#include "../SDL_internal.h"
#include "SDL_video.h"
#include "SDL_sysvideo.h"
#include "SDL_blit.h"
#include "SDL_RLEaccel_c.h"
Go to the source code of this file.
Data Structures | |
struct | RLEDestFormat |
Macros | |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#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, sw_64) PIXEL_COPY(to, from, length, bpp) |
#define | ALPHA_BLIT32_888(to, from, length, bpp, sw_64) |
#define | ALPHA_BLIT16_565(to, from, length, bpp, sw_64) |
#define | ALPHA_BLIT16_555(to, from, length, bpp, sw_64) |
#define | ALPHA_BLIT_ANY(to, from, length, bpp, sw_64) |
#define | ALPHA_BLIT32_888_50(to, from, length, bpp, sw_64) |
#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, sw_64) ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7de) |
#define | ALPHA_BLIT16_555_50(to, from, length, bpp, sw_64) 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) |
Typedefs | |
typedef Uint32(* | getpix_func) (Uint8 *) |
Variables | |
static const getpix_func | getpixes [4] |
Referenced by RLEColorkeySurface().
Referenced by RLEAlphaSurface().
Referenced by RLEAlphaSurface().
Definition at line 271 of file SDL_RLEaccel.c.
Definition at line 158 of file SDL_RLEaccel.c.
#define ALPHA_BLIT16_555_50 | ( | to, | |
from, | |||
length, | |||
bpp, | |||
sw_64 | |||
) | ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbde) |
Definition at line 303 of file SDL_RLEaccel.c.
Definition at line 141 of file SDL_RLEaccel.c.
#define ALPHA_BLIT16_565_50 | ( | to, | |
from, | |||
length, | |||
bpp, | |||
sw_64 | |||
) | ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7de) |
Definition at line 300 of file SDL_RLEaccel.c.
Definition at line 117 of file SDL_RLEaccel.c.
Definition at line 243 of file SDL_RLEaccel.c.
Definition at line 178 of file SDL_RLEaccel.c.
Definition at line 262 of file SDL_RLEaccel.c.
Definition at line 604 of file SDL_RLEaccel.c.
Referenced by RLEAlphaClipBlit(), and SDL_RLEAlphaBlit().
Definition at line 592 of file SDL_RLEaccel.c.
Referenced by RLEAlphaClipBlit(), and SDL_RLEAlphaBlit().
Definition at line 574 of file SDL_RLEaccel.c.
Referenced by RLEAlphaClipBlit(), and SDL_RLEAlphaBlit().
#define CHOOSE_BLIT | ( | blitter, | |
alpha, | |||
fmt | |||
) |
Definition at line 306 of file SDL_RLEaccel.c.
Referenced by RLEClipBlit(), and SDL_RLEBlit().
#define ISOPAQUE | ( | pixel, | |
fmt | |||
) | ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255) |
Definition at line 1022 of file SDL_RLEaccel.c.
Referenced by RLEAlphaSurface().
#define ISTRANSL | ( | pixel, | |
fmt | |||
) | ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U) |
Definition at line 1024 of file SDL_RLEaccel.c.
Referenced by RLEAlphaSurface().
Definition at line 97 of file SDL_RLEaccel.c.
Referenced by RLEAlphaSurface(), and RLEColorkeySurface().
#define OPAQUE_BLIT | ( | to, | |
from, | |||
length, | |||
bpp, | |||
sw_64 | |||
) | PIXEL_COPY(to, from, length, bpp) |
Definition at line 107 of file SDL_RLEaccel.c.
#define PIXEL_COPY | ( | to, | |
from, | |||
len, | |||
bpp | |||
) | SDL_memcpy(to, from, (size_t)(len) * (bpp)) |
Definition at line 100 of file SDL_RLEaccel.c.
#define RLEALPHABLIT | ( | Ptype, | |
Ctype, | |||
do_blend | |||
) |
Referenced by SDL_RLEAlphaBlit().
#define RLEALPHACLIPBLIT | ( | Ptype, | |
Ctype, | |||
do_blend | |||
) |
Referenced by RLEAlphaClipBlit().
#define RLEBLIT | ( | bpp, | |
Type, | |||
do_blit | |||
) |
Referenced by SDL_RLEBlit().
#define RLECLIPBLIT | ( | bpp, | |
Type, | |||
do_blit | |||
) |
Referenced by RLEClipBlit().
#define RLESKIP | ( | bpp, | |
Type | |||
) |
Definition at line 1269 of file SDL_RLEaccel.c.
|
static |
Definition at line 989 of file SDL_RLEaccel.c.
References d, i, RGBA_FROM_8888, and RLEPIXEL_FROM_RGBA.
Referenced by RLEAlphaSurface().
|
static |
Definition at line 895 of file SDL_RLEaccel.c.
References d, i, PIXEL_FROM_RGB, and RGB_FROM_PIXEL.
Referenced by RLEAlphaSurface().
|
static |
Definition at line 951 of file SDL_RLEaccel.c.
References d, i, PIXEL_FROM_RGB, and RGBA_FROM_8888.
Referenced by RLEAlphaSurface().
|
static |
Definition at line 932 of file SDL_RLEaccel.c.
References d, i, PIXEL_FROM_RGB, and RGBA_FROM_8888.
Referenced by RLEAlphaSurface().
Definition at line 1248 of file SDL_RLEaccel.c.
Definition at line 1254 of file SDL_RLEaccel.c.
Definition at line 1264 of file SDL_RLEaccel.c.
Definition at line 1242 of file SDL_RLEaccel.c.
|
static |
Definition at line 638 of file SDL_RLEaccel.c.
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().
|
static |
Definition at line 1029 of file SDL_RLEaccel.c.
References ADD_OPAQUE_COUNTS, ADD_TRANSL_COUNTS, SDL_PixelFormat::Aloss, RLEDestFormat::Aloss, SDL_PixelFormat::Amask, RLEDestFormat::Amask, SDL_PixelFormat::Ashift, RLEDestFormat::Ashift, SDL_PixelFormat::BitsPerPixel, SDL_PixelFormat::Bloss, RLEDestFormat::Bloss, SDL_PixelFormat::Bmask, RLEDestFormat::Bmask, SDL_PixelFormat::Bshift, RLEDestFormat::Bshift, SDL_PixelFormat::BytesPerPixel, RLEDestFormat::BytesPerPixel, copy_32(), copy_opaque_16(), copy_transl_555(), copy_transl_565(), SDL_BlitMap::data, SDL_BlitMap::dst, SDL_Surface::flags, SDL_Surface::format, SDL_PixelFormat::Gloss, RLEDestFormat::Gloss, SDL_PixelFormat::Gmask, RLEDestFormat::Gmask, SDL_PixelFormat::Gshift, RLEDestFormat::Gshift, SDL_Surface::h, ISOPAQUE, ISTRANSL, SDL_Surface::map, MIN, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_PixelFormat::Rloss, RLEDestFormat::Rloss, SDL_PixelFormat::Rmask, RLEDestFormat::Rmask, SDL_PixelFormat::Rshift, RLEDestFormat::Rshift, SDL_free(), SDL_malloc, SDL_OutOfMemory, SDL_PREALLOC, SDL_realloc, and SDL_Surface::w.
Referenced by SDL_RLESurface().
|
static |
Definition at line 393 of file SDL_RLEaccel.c.
References CHOOSE_BLIT, SDL_Surface::format, and RLECLIPBLIT.
Referenced by SDL_RLEBlit().
|
static |
Definition at line 1276 of file SDL_RLEaccel.c.
References ADD_COUNTS, SDL_PixelFormat::Amask, SDL_PixelFormat::BytesPerPixel, SDL_BlitInfo::colorkey, SDL_BlitMap::data, SDL_Surface::flags, SDL_Surface::format, getpixes, SDL_Surface::h, SDL_BlitMap::info, SDL_Surface::map, MIN, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_free(), SDL_malloc, SDL_memcpy, SDL_OutOfMemory, SDL_PREALLOC, SDL_realloc, and SDL_Surface::w.
Referenced by SDL_RLESurface().
int SDL_RLEAlphaBlit | ( | SDL_Surface * | surf_src, |
SDL_Rect * | srcrect, | ||
SDL_Surface * | surf_dst, | ||
SDL_Rect * | dstrect | ||
) |
Definition at line 730 of file SDL_RLEaccel.c.
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().
int SDL_RLEBlit | ( | SDL_Surface * | surf_src, |
SDL_Rect * | srcrect, | ||
SDL_Surface * | surf_dst, | ||
SDL_Rect * | dstrect | ||
) |
Definition at line 452 of file SDL_RLEaccel.c.
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().
int SDL_RLESurface | ( | SDL_Surface * | surface | ) |
Definition at line 1403 of file SDL_RLEaccel.c.
References SDL_PixelFormat::Amask, SDL_PixelFormat::BitsPerPixel, SDL_BlitMap::blit, SDL_BlitInfo::flags, SDL_Surface::flags, SDL_Surface::format, SDL_BlitMap::identity, SDL_BlitMap::info, SDL_Surface::map, SDL_Surface::pixels, 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().
void SDL_UnRLESurface | ( | SDL_Surface * | surface, |
int | recode | ||
) |
Definition at line 1540 of file SDL_RLEaccel.c.
References SDL_BlitInfo::colorkey, SDL_BlitMap::data, SDL_BlitInfo::flags, SDL_Surface::flags, SDL_Rect::h, SDL_Surface::h, SDL_BlitMap::info, SDL_Surface::map, NULL, SDL_Surface::pitch, SDL_Surface::pixels, 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_Surface::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_CalculateBlit(), SDL_FreeSurface(), SDL_LockSurface(), SDL_MapSurface(), and SDL_RLESurface().
|
static |
Definition at line 1006 of file SDL_RLEaccel.c.
References i, PIXEL_FROM_RGBA, and RGB_FROM_PIXEL.
Referenced by UnRLEAlpha().
|
static |
Definition at line 912 of file SDL_RLEaccel.c.
References SDL_PixelFormat::Amask, i, PIXEL_FROM_RGBA, and RGB_FROM_PIXEL.
Referenced by UnRLEAlpha().
|
static |
Definition at line 970 of file SDL_RLEaccel.c.
References i, PIXEL_FROM_RGBA, and RGB_FROM_PIXEL.
Referenced by UnRLEAlpha().
|
static |
Definition at line 1467 of file SDL_RLEaccel.c.
References RLEDestFormat::BytesPerPixel, SDL_BlitMap::data, SDL_Surface::format, SDL_Surface::h, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, SDL_FALSE, SDL_malloc, SDL_memset, SDL_TRUE, uncopy_32(), uncopy_opaque_16(), uncopy_transl_16(), and SDL_Surface::w.
Referenced by SDL_UnRLESurface().
|
static |
Definition at line 1271 of file SDL_RLEaccel.c.
Referenced by RLEColorkeySurface().