Mercurial > sdl-ios-xcode
comparison src/video/SDL_RLEaccel.c @ 2262:bee005ace1bf
Work in progress: merging new texture features into SDL blit system
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 17 Aug 2007 06:21:58 +0000 |
parents | 340942cfda48 |
children | e61ad15a205f |
comparison
equal
deleted
inserted
replaced
2261:c20476d7d7b3 | 2262:bee005ace1bf |
---|---|
904 | 904 |
905 } | 905 } |
906 } | 906 } |
907 | 907 |
908 alpha = (src->flags & SDL_SRCALPHA) == SDL_SRCALPHA | 908 alpha = (src->flags & SDL_SRCALPHA) == SDL_SRCALPHA |
909 ? (src->map->cmod >> 24) : 255; | 909 ? src->map->info.a : 255; |
910 /* if left or right edge clipping needed, call clip blit */ | 910 /* if left or right edge clipping needed, call clip blit */ |
911 if (srcrect->x || srcrect->w != src->w) { | 911 if (srcrect->x || srcrect->w != src->w) { |
912 RLEClipBlit(w, srcbuf, dst, dstbuf, srcrect, alpha); | 912 RLEClipBlit(w, srcbuf, dst, dstbuf, srcrect, alpha); |
913 } else { | 913 } else { |
914 SDL_PixelFormat *fmt = src->format; | 914 SDL_PixelFormat *fmt = src->format; |
1713 curbuf = srcbuf; | 1713 curbuf = srcbuf; |
1714 maxn = bpp == 4 ? 65535 : 255; | 1714 maxn = bpp == 4 ? 65535 : 255; |
1715 skip = run = 0; | 1715 skip = run = 0; |
1716 dst = rlebuf; | 1716 dst = rlebuf; |
1717 rgbmask = ~surface->format->Amask; | 1717 rgbmask = ~surface->format->Amask; |
1718 ckey = surface->map->ckey & rgbmask; | 1718 ckey = surface->map->info.colorkey & rgbmask; |
1719 lastline = dst; | 1719 lastline = dst; |
1720 getpix = getpixes[bpp - 1]; | 1720 getpix = getpixes[bpp - 1]; |
1721 w = surface->w; | 1721 w = surface->w; |
1722 h = surface->h; | 1722 h = surface->h; |
1723 | 1723 |
1946 surface->flags |= SDL_RLEACCEL; | 1946 surface->flags |= SDL_RLEACCEL; |
1947 return; | 1947 return; |
1948 } | 1948 } |
1949 | 1949 |
1950 /* fill it with the background colour */ | 1950 /* fill it with the background colour */ |
1951 SDL_FillRect(surface, NULL, surface->map->ckey); | 1951 SDL_FillRect(surface, NULL, surface->map->info.colorkey); |
1952 | 1952 |
1953 /* now render the encoded surface */ | 1953 /* now render the encoded surface */ |
1954 full.x = full.y = 0; | 1954 full.x = full.y = 0; |
1955 full.w = surface->w; | 1955 full.w = surface->w; |
1956 full.h = surface->h; | 1956 full.h = surface->h; |