Fixed picking blit function when RLE fails
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403314
This commit is contained in:
parent
b47ba57912
commit
cc01f2a867
6 changed files with 6 additions and 5 deletions
|
@ -52,6 +52,7 @@
|
||||||
#define SDL_COPY_RLE_DESIRED 0x00001000
|
#define SDL_COPY_RLE_DESIRED 0x00001000
|
||||||
#define SDL_COPY_RLE_COLORKEY 0x00002000
|
#define SDL_COPY_RLE_COLORKEY 0x00002000
|
||||||
#define SDL_COPY_RLE_ALPHAKEY 0x00004000
|
#define SDL_COPY_RLE_ALPHAKEY 0x00004000
|
||||||
|
#define SDL_COPY_RLE_MASK (SDL_COPY_RLE_DESIRED|SDL_COPY_RLE_COLORKEY|SDL_COPY_RLE_ALPHAKEY)
|
||||||
|
|
||||||
/* SDL blit CPU flags */
|
/* SDL blit CPU flags */
|
||||||
#define SDL_CPU_ANY 0x00000000
|
#define SDL_CPU_ANY 0x00000000
|
||||||
|
|
|
@ -465,7 +465,7 @@ SDL_CalculateBlit0(SDL_Surface * surface)
|
||||||
} else {
|
} else {
|
||||||
which = surface->map->dst->format->BytesPerPixel;
|
which = surface->map->dst->format->BytesPerPixel;
|
||||||
}
|
}
|
||||||
switch (surface->map->info.flags) {
|
switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) {
|
||||||
case 0:
|
case 0:
|
||||||
return bitmap_blit[which];
|
return bitmap_blit[which];
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@ SDL_CalculateBlit1(SDL_Surface * surface)
|
||||||
} else {
|
} else {
|
||||||
which = dstfmt->BytesPerPixel;
|
which = dstfmt->BytesPerPixel;
|
||||||
}
|
}
|
||||||
switch (surface->map->info.flags) {
|
switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) {
|
||||||
case 0:
|
case 0:
|
||||||
return one_blit[which];
|
return one_blit[which];
|
||||||
|
|
||||||
|
|
|
@ -2153,7 +2153,7 @@ SDL_CalculateBlitA(SDL_Surface * surface)
|
||||||
SDL_PixelFormat *sf = surface->format;
|
SDL_PixelFormat *sf = surface->format;
|
||||||
SDL_PixelFormat *df = surface->map->dst->format;
|
SDL_PixelFormat *df = surface->map->dst->format;
|
||||||
|
|
||||||
switch (surface->map->info.flags) {
|
switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) {
|
||||||
case SDL_COPY_BLEND:
|
case SDL_COPY_BLEND:
|
||||||
/* Per-pixel alpha blits */
|
/* Per-pixel alpha blits */
|
||||||
switch (df->BytesPerPixel) {
|
switch (df->BytesPerPixel) {
|
||||||
|
|
|
@ -2430,7 +2430,7 @@ SDL_CalculateBlitN(SDL_Surface * surface)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (surface->map->info.flags) {
|
switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) {
|
||||||
case 0:
|
case 0:
|
||||||
blitfun = NULL;
|
blitfun = NULL;
|
||||||
if (dstfmt->BitsPerPixel == 8) {
|
if (dstfmt->BitsPerPixel == 8) {
|
||||||
|
|
|
@ -548,7 +548,7 @@ SDL_GetSurfaceScaleMode(SDL_Surface * surface, int *scaleMode)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (surface->map->info.flags & (SDL_COPY_NEAREST)) {
|
switch (surface->map->info.flags & SDL_COPY_NEAREST) {
|
||||||
case SDL_COPY_NEAREST:
|
case SDL_COPY_NEAREST:
|
||||||
*scaleMode = SDL_TEXTURESCALEMODE_FAST;
|
*scaleMode = SDL_TEXTURESCALEMODE_FAST;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue