21 #include "../SDL_internal.h" 94 #define MAX(a, b) ((a) > (b) ? (a) : (b)) 97 #define MIN(a, b) ((a) < (b) ? (a) : (b)) 100 #define PIXEL_COPY(to, from, len, bpp) \ 101 SDL_memcpy(to, from, (size_t)(len) * (bpp)) 107 #define OPAQUE_BLIT(to, from, length, bpp, sw_64) \ 108 PIXEL_COPY(to, from, length, bpp) 117 #define ALPHA_BLIT32_888(to, from, length, bpp, sw_64) \ 120 Uint32 *src = (Uint32 *)(from); \ 121 Uint32 *dst = (Uint32 *)(to); \ 122 for (i = 0; i < (int)(length); i++) { \ 125 Uint32 s1 = s & 0xff00ff; \ 126 Uint32 d1 = d & 0xff00ff; \ 127 d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ 130 d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ 141 #define ALPHA_BLIT16_565(to, from, length, bpp, sw_64) \ 144 Uint16 *src = (Uint16 *)(from); \ 145 Uint16 *dst = (Uint16 *)(to); \ 146 Uint32 ALPHA = alpha >> 3; \ 147 for(i = 0; i < (int)(length); i++) { \ 150 s = (s | s << 16) & 0x07e0f81f; \ 151 d = (d | d << 16) & 0x07e0f81f; \ 152 d += (s - d) * ALPHA >> 5; \ 154 *dst++ = (Uint16)(d | d >> 16); \ 158 #define ALPHA_BLIT16_555(to, from, length, bpp, sw_64) \ 161 Uint16 *src = (Uint16 *)(from); \ 162 Uint16 *dst = (Uint16 *)(to); \ 163 Uint32 ALPHA = alpha >> 3; \ 164 for(i = 0; i < (int)(length); i++) { \ 167 s = (s | s << 16) & 0x03e07c1f; \ 168 d = (d | d << 16) & 0x03e07c1f; \ 169 d += (s - d) * ALPHA >> 5; \ 171 *dst++ = (Uint16)(d | d >> 16); \ 178 #define ALPHA_BLIT_ANY(to, from, length, bpp, sw_64) \ 183 for (i = 0; i < (int)(length); i++) { \ 185 unsigned rs, gs, bs, rd, gd, bd; \ 188 s = *(Uint16 *)src; \ 189 d = *(Uint16 *)dst; \ 192 if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ 193 s = (src[0] << 16) | (src[1] << 8) | src[2]; \ 194 d = (dst[0] << 16) | (dst[1] << 8) | dst[2]; \ 196 s = (src[2] << 16) | (src[1] << 8) | src[0]; \ 197 d = (dst[2] << 16) | (dst[1] << 8) | dst[0]; \ 201 s = *(Uint32 *)src; \ 202 d = *(Uint32 *)dst; \ 205 RGB_FROM_PIXEL(s, fmt, rs, gs, bs); \ 206 RGB_FROM_PIXEL(d, fmt, rd, gd, bd); \ 207 rd += (rs - rd) * alpha >> 8; \ 208 gd += (gs - gd) * alpha >> 8; \ 209 bd += (bs - bd) * alpha >> 8; \ 210 PIXEL_FROM_RGB(d, fmt, rd, gd, bd); \ 213 *(Uint16 *)dst = (Uint16)d; \ 216 if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ 217 dst[0] = (Uint8)(d >> 16); \ 218 dst[1] = (Uint8)(d >> 8); \ 219 dst[2] = (Uint8)(d); \ 222 dst[1] = (Uint8)(d >> 8); \ 223 dst[2] = (Uint8)(d >> 16); \ 227 *(Uint32 *)dst = d; \ 243 #define ALPHA_BLIT32_888_50(to, from, length, bpp, sw_64) \ 246 Uint32 *src = (Uint32 *)(from); \ 247 Uint32 *dst = (Uint32 *)(to); \ 248 for(i = 0; i < (int)(length); i++) { \ 251 *dst++ = (((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) \ 252 + (s & d & 0x00010101); \ 262 #define BLEND16_50(dst, src, mask) \ 266 *dst++ = (Uint16)((((s & mask) + (d & mask)) >> 1) + \ 267 (s & d & (~mask & 0xffff))); \ 271 #define ALPHA_BLIT16_50(to, from, length, bpp, alpha, mask) \ 273 unsigned n = (length); \ 274 Uint16 *src = (Uint16 *)(from); \ 275 Uint16 *dst = (Uint16 *)(to); \ 276 if (((uintptr_t)src ^ (uintptr_t)dst) & 3) { \ 279 BLEND16_50(dst, src, mask); \ 281 if ((uintptr_t)src & 3) { \ 283 BLEND16_50(dst, src, mask); \ 286 for (; n > 1; n -= 2) { \ 287 Uint32 s = *(Uint32 *)src; \ 288 Uint32 d = *(Uint32 *)dst; \ 289 *(Uint32 *)dst = ((s & (mask | mask << 16)) >> 1) \ 290 + ((d & (mask | mask << 16)) >> 1) \ 291 + (s & d & (~(mask | mask << 16))); \ 296 BLEND16_50(dst, src, mask); \ 300 #define ALPHA_BLIT16_565_50(to, from, length, bpp, sw_64) \ 301 ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7de) 303 #define ALPHA_BLIT16_555_50(to, from, length, bpp, sw_64) \ 304 ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbde) 306 #define CHOOSE_BLIT(blitter, alpha, fmt) \ 308 if (alpha == 255) { \ 309 switch (fmt->BytesPerPixel) { \ 310 case 1: blitter(1, Uint8, OPAQUE_BLIT); break; \ 311 case 2: blitter(2, Uint8, OPAQUE_BLIT); break; \ 312 case 3: blitter(3, Uint8, OPAQUE_BLIT); break; \ 313 case 4: blitter(4, Uint16, OPAQUE_BLIT); break; \ 316 switch (fmt->BytesPerPixel) { \ 322 switch (fmt->Rmask | fmt->Gmask | fmt->Bmask) { \ 324 if (fmt->Gmask == 0x07e0 \ 325 || fmt->Rmask == 0x07e0 \ 326 || fmt->Bmask == 0x07e0) { \ 327 if (alpha == 128) { \ 328 blitter(2, Uint8, ALPHA_BLIT16_565_50); \ 330 blitter(2, Uint8, ALPHA_BLIT16_565); \ 337 if (fmt->Gmask == 0x03e0 \ 338 || fmt->Rmask == 0x03e0 \ 339 || fmt->Bmask == 0x03e0) { \ 340 if (alpha == 128) { \ 341 blitter(2, Uint8, ALPHA_BLIT16_555_50); \ 343 blitter(2, Uint8, ALPHA_BLIT16_555); \ 352 blitter(2, Uint8, ALPHA_BLIT_ANY); \ 357 blitter(3, Uint8, ALPHA_BLIT_ANY); \ 361 if ((fmt->Rmask | fmt->Gmask | fmt->Bmask) == 0x00ffffff \ 362 && (fmt->Gmask == 0xff00 || fmt->Rmask == 0xff00 \ 363 || fmt->Bmask == 0xff00)) { \ 364 if (alpha == 128) { \ 365 blitter(4, Uint16, ALPHA_BLIT32_888_50); \ 367 blitter(4, Uint16, ALPHA_BLIT32_888); \ 370 blitter(4, Uint16, ALPHA_BLIT_ANY); \ 380 #define RLEPIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \ 382 Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)| \ 383 ((g>>fmt->Gloss)<<fmt->Gshift)| \ 384 ((b>>fmt->Bloss)<<fmt->Bshift)| \ 398 #define RLECLIPBLIT(bpp, Type, do_blit) \ 400 int linecount = srcrect->h; \ 402 int left = srcrect->x; \ 403 int right = left + srcrect->w; \ 404 dstbuf -= left * bpp; \ 407 ofs += *(Type *)srcbuf; \ 408 run = ((Type *)srcbuf)[1]; \ 409 srcbuf += 2 * sizeof(Type); \ 416 if (left - ofs > 0) { \ 417 start = left - ofs; \ 420 goto nocopy ## bpp ## do_blit; \ 422 startcol = ofs + start; \ 423 if (len > right - startcol) \ 424 len = right - startcol; \ 425 do_blit(dstbuf + startcol * bpp, srcbuf + start * bpp, \ 428 nocopy ## bpp ## do_blit: \ 429 srcbuf += run * bpp; \ 436 dstbuf += surf_dst->pitch; \ 477 int vskip = srcrect->
y;
481 #define RLESKIP(bpp, Type) \ 484 ofs += *(Type *)srcbuf; \ 485 run = ((Type *)srcbuf)[1]; \ 486 srcbuf += sizeof(Type) * 2; \ 488 srcbuf += run * bpp; \ 521 if (srcrect->
x || srcrect->
w != surf_src->
w) {
526 #define RLEBLIT(bpp, Type, do_blit) \ 528 int linecount = srcrect->h; \ 532 ofs += *(Type *)srcbuf; \ 533 run = ((Type *)srcbuf)[1]; \ 534 srcbuf += 2 * sizeof(Type); \ 536 do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, sw_64); \ 537 srcbuf += run * bpp; \ 543 dstbuf += surf_dst->pitch; \ 574 #define BLIT_TRANSL_888(src, dst) \ 578 unsigned alpha = s >> 24; \ 579 Uint32 s1 = s & 0xff00ff; \ 580 Uint32 d1 = d & 0xff00ff; \ 581 d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ 584 d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ 585 dst = d1 | d | 0xff000000; \ 592 #define BLIT_TRANSL_565(src, dst) \ 596 unsigned alpha = (s & 0x3e0) >> 5; \ 598 d = (d | d << 16) & 0x07e0f81f; \ 599 d += (s - d) * alpha >> 5; \ 601 dst = (Uint16)(d | d >> 16); \ 604 #define BLIT_TRANSL_555(src, dst) \ 608 unsigned alpha = (s & 0x3e0) >> 5; \ 610 d = (d | d << 16) & 0x03e07c1f; \ 611 d += (s - d) * alpha >> 5; \ 613 dst = (Uint16)(d | d >> 16); \ 647 #define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) \ 649 int linecount = srcrect->h; \ 650 int left = srcrect->x; \ 651 int right = left + srcrect->w; \ 652 dstbuf -= left * sizeof(Ptype); \ 658 ofs += ((Ctype *)srcbuf)[0]; \ 659 run = ((Ctype *)srcbuf)[1]; \ 660 srcbuf += 2 * sizeof(Ctype); \ 665 if(left - cofs > 0) { \ 666 crun -= left - cofs; \ 669 if(crun > right - cofs) \ 670 crun = right - cofs; \ 672 PIXEL_COPY(dstbuf + cofs * sizeof(Ptype), \ 673 srcbuf + (cofs - ofs) * sizeof(Ptype), \ 674 (unsigned)crun, sizeof(Ptype)); \ 675 srcbuf += run * sizeof(Ptype); \ 681 if(sizeof(Ptype) == 2) \ 682 srcbuf += (uintptr_t)srcbuf & 2; \ 687 ofs += ((Uint16 *)srcbuf)[0]; \ 688 run = ((Uint16 *)srcbuf)[1]; \ 694 if(left - cofs > 0) { \ 695 crun -= left - cofs; \ 698 if(crun > right - cofs) \ 699 crun = right - cofs; \ 701 Ptype *dst = (Ptype *)dstbuf + cofs; \ 702 Uint32 *src = (Uint32 *)srcbuf + (cofs - ofs); \ 704 for(i = 0; i < crun; i++) \ 705 do_blend(src[i], dst[i]); \ 711 dstbuf += surf_dst->pitch; \ 712 } while(--linecount); \ 735 Uint8 *srcbuf, *dstbuf;
752 int vskip = srcrect->
y;
779 ofs += ((
Uint16 *) srcbuf)[0];
780 run = ((
Uint16 *) srcbuf)[1];
781 srcbuf += 4 * (run + 1);
792 ofs += ((
Uint16 *) srcbuf)[0];
793 run = ((
Uint16 *) srcbuf)[1];
807 if (srcrect->
x || srcrect->
w != surf_src->
w) {
816 #define RLEALPHABLIT(Ptype, Ctype, do_blend) \ 818 int linecount = srcrect->h; \ 824 ofs += ((Ctype *)srcbuf)[0]; \ 825 run = ((Ctype *)srcbuf)[1]; \ 826 srcbuf += 2 * sizeof(Ctype); \ 828 PIXEL_COPY(dstbuf + ofs * sizeof(Ptype), srcbuf, \ 829 run, sizeof(Ptype)); \ 830 srcbuf += run * sizeof(Ptype); \ 836 if(sizeof(Ptype) == 2) \ 837 srcbuf += (uintptr_t)srcbuf & 2; \ 842 ofs += ((Uint16 *)srcbuf)[0]; \ 843 run = ((Uint16 *)srcbuf)[1]; \ 846 Ptype *dst = (Ptype *)dstbuf + ofs; \ 848 for(i = 0; i < run; i++) { \ 849 Uint32 src = *(Uint32 *)srcbuf; \ 850 do_blend(src, *dst); \ 857 dstbuf += surf_dst->pitch; \ 858 } while(--linecount); \ 863 if (df->
Gmask == 0x07e0 || df->
Rmask == 0x07e0
864 || df->
Bmask == 0x07e0)
900 for (i = 0; i <
n; i++) {
917 unsigned alpha = dfmt->
Amask ? 255 : 0;
918 for (i = 0; i <
n; i++) {
937 for (i = 0; i <
n; i++) {
942 *d = ((pix & 0x7e0) << 16) | (pix & 0xf81f) | ((a << 2) & 0x7e0);
956 for (i = 0; i <
n; i++) {
961 *d = ((pix & 0x3e0) << 16) | (pix & 0xfc1f) | ((a << 2) & 0x3e0);
975 for (i = 0; i <
n; i++) {
978 a = (pix & 0x3e0) >> 2;
979 pix = (pix & ~0x3e0) | pix >> 16;
994 for (i = 0; i <
n; i++) {
1011 for (i = 0; i <
n; i++) {
1012 unsigned r,
g,
b,
a;
1022 #define ISOPAQUE(pixel, fmt) ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255) 1024 #define ISTRANSL(pixel, fmt) \ 1025 ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U) 1035 int max_transl_run = 65535;
1038 int (*copy_opaque) (
void *,
Uint32 *, int,
1040 int (*copy_transl) (
void *, Uint32 *, int,
1041 SDL_PixelFormat *, SDL_PixelFormat *);
1043 dest = surface->
map->
dst;
1058 if (df->
Gmask == 0x07e0
1059 || df->
Rmask == 0x07e0 || df->
Bmask == 0x07e0) {
1066 if (df->
Gmask == 0x03e0
1067 || df->
Rmask == 0x03e0 || df->
Bmask == 0x03e0) {
1076 max_opaque_run = 255;
1080 maxsize = surface->
h * (2 + (4 + 2) * (surface->
w + 1)) + 2;
1083 if (masksum != 0x00ffffff)
1087 max_opaque_run = 255;
1090 maxsize = surface->
h * 2 * 4 * (surface->
w + 1) + 4;
1123 int h = surface->
h,
w = surface->
w;
1124 SDL_PixelFormat *sf = surface->
format;
1125 Uint32 *
src = (Uint32 *) surface->
pixels;
1126 Uint8 *lastline = dst;
1141 #define ADD_TRANSL_COUNTS(n, m) \ 1142 (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4) 1144 for (y = 0; y <
h; y++) {
1145 int runstart, skipstart;
1157 skip = runstart - skipstart;
1161 while (skip > max_opaque_run) {
1163 skip -= max_opaque_run;
1165 len =
MIN(run, max_opaque_run);
1167 dst += copy_opaque(dst, src + runstart, len, sf, df);
1171 len =
MIN(run, max_opaque_run);
1173 dst += copy_opaque(dst, src + runstart, len, sf, df);
1192 skip = runstart - skipstart;
1193 blankline &= (skip ==
w);
1195 while (skip > max_transl_run) {
1197 skip -= max_transl_run;
1199 len =
MIN(run, max_transl_run);
1201 dst += copy_transl(dst, src + runstart, len, sf, df);
1205 len =
MIN(run, max_transl_run);
1207 dst += copy_transl(dst, src + runstart, len, sf, df);
1215 src += surface->
pitch >> 2;
1221 #undef ADD_OPAQUE_COUNTS 1222 #undef ADD_TRANSL_COUNTS 1250 return *(
Uint16 *) srcbuf;
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];
1266 return *(
Uint32 *) srcbuf;
1281 Uint8 *srcbuf, *lastline;
1293 maxsize = surface->
h * 3 * (surface->
w / 2 + 1) + 2;
1298 maxsize = surface->
h * (2 * (surface->
w / 255 + 1)
1299 + surface->
w * bpp) + 2;
1303 maxsize = surface->
h * (4 * (surface->
w / 65535 + 1)
1304 + surface->
w * 4) + 4;
1309 if (rlebuf ==
NULL) {
1315 maxn = bpp == 4 ? 65535 : 255;
1335 for (y = 0; y <
h; y++) {
1344 while (x < w && (getpix(srcbuf + x * bpp) & rgbmask) == ckey)
1347 while (x < w && (getpix(srcbuf + x * bpp) & rgbmask) != ckey)
1349 skip = runstart - skipstart;
1355 while (skip > maxn) {
1359 len =
MIN(run, maxn);
1361 SDL_memcpy(dst, srcbuf + runstart * bpp, len * bpp);
1366 len =
MIN(run, maxn);
1368 SDL_memcpy(dst, srcbuf + runstart * bpp, len * bpp);
1377 srcbuf += surface->
pitch;
1473 int (*uncopy_opaque) (
Uint32 *,
void *, int,
1475 int (*uncopy_transl) (
Uint32 *,
void *, int,
1484 uncopy_opaque = uncopy_transl =
uncopy_32;
1495 srcbuf = (
Uint8 *) (df + 1);
1506 ofs += ((
Uint16 *) srcbuf)[0];
1507 run = ((
Uint16 *) srcbuf)[1];
1511 srcbuf += uncopy_opaque(dst + ofs, srcbuf, run, df, sf);
1525 ofs += ((
Uint16 *) srcbuf)[0];
1526 run = ((
Uint16 *) srcbuf)[1];
1529 srcbuf += uncopy_transl(dst + ofs, srcbuf, run, df, sf);
1533 dst += surface->
pitch >> 2;
1561 full.
x = full.
y = 0;
1562 full.
w = surface->
w;
1563 full.
h = surface->
h;
static int copy_transl_555(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
#define CHOOSE_BLIT(blitter, alpha, fmt)
#define SDL_COPY_MODULATE_COLOR
GLdouble GLdouble GLdouble r
static int copy_transl_565(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
#define SDL_UnlockSurface
#define SDL_COPY_COLORKEY
static int uncopy_transl_16(Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
#define BLIT_TRANSL_555(src, dst)
static int uncopy_32(Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
uint32_t Uint32
An unsigned 32-bit integer type.
Uint32(* getpix_func)(Uint8 *)
A collection of pixels used in software blitting.
#define RLEPIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)
static Uint32 getpix_16(Uint8 *srcbuf)
void SDL_UnRLESurface(SDL_Surface *surface, int recode)
#define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend)
#define SDL_COPY_RLE_COLORKEY
GLint GLint GLint GLint GLint x
int SDL_RLEBlit(SDL_Surface *surf_src, SDL_Rect *srcrect, SDL_Surface *surf_dst, SDL_Rect *dstrect)
#define ADD_OPAQUE_COUNTS(n, m)
static void RLEAlphaClipBlit(int w, Uint8 *srcbuf, SDL_Surface *surf_dst, Uint8 *dstbuf, SDL_Rect *srcrect)
#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const 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
uint8_t Uint8
An unsigned 8-bit integer type.
#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)
static int copy_32(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
#define RLESKIP(bpp, Type)
static const getpix_func getpixes[4]
static void RLEClipBlit(int w, Uint8 *srcbuf, SDL_Surface *surf_dst, Uint8 *dstbuf, SDL_Rect *srcrect, unsigned sw_64)
int SDL_RLEAlphaBlit(SDL_Surface *surf_src, SDL_Rect *srcrect, SDL_Surface *surf_dst, SDL_Rect *dstrect)
#define RLECLIPBLIT(bpp, Type, do_blit)
int SDL_RLESurface(SDL_Surface *surface)
static int RLEColorkeySurface(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)
#define SDL_OutOfMemory()
#define RLEALPHABLIT(Ptype, Ctype, do_blend)
#define ADD_TRANSL_COUNTS(n, m)
static SDL_bool UnRLEAlpha(SDL_Surface *surface)
GLint GLint GLint GLint GLint GLint y
static int copy_opaque_16(void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
#define SDL_COPY_MODULATE_ALPHA
#define BLIT_TRANSL_565(src, dst)
#define SDL_COPY_RLE_ALPHAKEY
static int RLEAlphaSurface(SDL_Surface *surface)
#define BLIT_TRANSL_888(src, dst)
static Uint32 getpix_32(Uint8 *srcbuf)
uint16_t Uint16
An unsigned 16-bit integer type.
static int uncopy_opaque_16(Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
GLfloat GLfloat GLfloat sw_64
#define ISTRANSL(pixel, fmt)
GLubyte GLubyte GLubyte GLubyte w
#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a)
#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)
static Uint32 getpix_8(Uint8 *srcbuf)
GLboolean GLboolean GLboolean GLboolean a
GLboolean GLboolean GLboolean b
GLfloat GLfloat GLfloat GLfloat h
#define ISOPAQUE(pixel, fmt)
A rectangle, with the origin at the upper left.
#define RLEBLIT(bpp, Type, do_blit)
static Uint32 getpix_24(Uint8 *srcbuf)