Mercurial > sdl-ios-xcode
diff src/video/SDL_surface.c @ 5143:e743b9c3f6d6
Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 31 Jan 2011 23:23:57 -0800 |
parents | da10636e5eca |
children | d976b67150c5 |
line wrap: on
line diff
--- a/src/video/SDL_surface.c Mon Jan 31 22:53:45 2011 -0800 +++ b/src/video/SDL_surface.c Mon Jan 31 23:23:57 2011 -0800 @@ -448,23 +448,16 @@ status = 0; flags = surface->map->info.flags; - surface->map->info.flags &= - ~(SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD); + surface->map->info.flags &= ~(SDL_COPY_BLEND | SDL_COPY_ADD); switch (blendMode) { case SDL_BLENDMODE_NONE: break; - case SDL_BLENDMODE_MASK: - surface->map->info.flags |= SDL_COPY_MASK; - break; case SDL_BLENDMODE_BLEND: surface->map->info.flags |= SDL_COPY_BLEND; break; case SDL_BLENDMODE_ADD: surface->map->info.flags |= SDL_COPY_ADD; break; - case SDL_BLENDMODE_MOD: - surface->map->info.flags |= SDL_COPY_MOD; - break; default: SDL_Unsupported(); status = -1; @@ -496,21 +489,13 @@ return 0; } - switch (surface->map-> - info.flags & (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | - SDL_COPY_MOD)) { - case SDL_COPY_MASK: - *blendMode = SDL_BLENDMODE_MASK; - break; + switch (surface->map->info.flags & (SDL_COPY_BLEND | SDL_COPY_ADD)) { case SDL_COPY_BLEND: *blendMode = SDL_BLENDMODE_BLEND; break; case SDL_COPY_ADD: *blendMode = SDL_BLENDMODE_ADD; break; - case SDL_COPY_MOD: - *blendMode = SDL_BLENDMODE_MOD; - break; default: *blendMode = SDL_BLENDMODE_NONE; break;