Mercurial > sdl-ios-xcode
comparison src/video/SDL_RLEaccel.c @ 2267:c785543d1843
Okay, still some bugs, but everything builds again...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 18 Aug 2007 05:39:09 +0000 |
parents | e61ad15a205f |
children | 91e601d9df8b |
comparison
equal
deleted
inserted
replaced
2266:e61ad15a205f | 2267:c785543d1843 |
---|---|
1819 return -1; | 1819 return -1; |
1820 } | 1820 } |
1821 | 1821 |
1822 /* If we don't have colorkey or blending, nothing to do... */ | 1822 /* If we don't have colorkey or blending, nothing to do... */ |
1823 flags = surface->map->info.flags; | 1823 flags = surface->map->info.flags; |
1824 if(!(flags & (SDL_COPY_COLORKEY|SDL_COPY_BLEND))) { | 1824 if (!(flags & (SDL_COPY_COLORKEY | SDL_COPY_BLEND))) { |
1825 return -1; | 1825 return -1; |
1826 } | 1826 } |
1827 | 1827 |
1828 /* Pass on combinations not supported */ | 1828 /* Pass on combinations not supported */ |
1829 if ((flags & SDL_COPY_MODULATE_COLOR) || | 1829 if ((flags & SDL_COPY_MODULATE_COLOR) || |
1830 (flags & (SDL_COPY_ADD|SDL_COPY_MOD)) || | 1830 (flags & (SDL_COPY_ADD | SDL_COPY_MOD)) || |
1831 (flags & SDL_COPY_NEAREST)) { | 1831 (flags & SDL_COPY_NEAREST)) { |
1832 return -1; | 1832 return -1; |
1833 } | 1833 } |
1834 | 1834 |
1835 /* Encode and set up the blit */ | 1835 /* Encode and set up the blit */ |
1969 surface->flags |= SDL_RLEACCEL; | 1969 surface->flags |= SDL_RLEACCEL; |
1970 return; | 1970 return; |
1971 } | 1971 } |
1972 } | 1972 } |
1973 } | 1973 } |
1974 surface->map->info.flags &= (SDL_COPY_RLE_COLORKEY|SDL_COPY_RLE_ALPHAKEY); | 1974 surface->map->info.flags &= |
1975 (SDL_COPY_RLE_COLORKEY | SDL_COPY_RLE_ALPHAKEY); | |
1975 | 1976 |
1976 if (surface->map->data) { | 1977 if (surface->map->data) { |
1977 SDL_free(surface->map->data); | 1978 SDL_free(surface->map->data); |
1978 surface->map->data = NULL; | 1979 surface->map->data = NULL; |
1979 } | 1980 } |