Mercurial > sdl-ios-xcode
comparison src/video/directfb/SDL_DirectFB_video.c @ 219:f928da36f0e9
Updated SDL DirectFB backend for DirectFB version 0.9.7
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 01 Nov 2001 16:21:40 +0000 |
parents | cb384ef627f6 |
children | e8157fcb3114 |
comparison
equal
deleted
inserted
replaced
218:91a5db3e930a | 219:f928da36f0e9 |
---|---|
599 surface = dst->hwdata->surface; | 599 surface = dst->hwdata->surface; |
600 | 600 |
601 if (src->flags & SDL_SRCCOLORKEY) | 601 if (src->flags & SDL_SRCCOLORKEY) |
602 { | 602 { |
603 flags |= DSBLIT_SRC_COLORKEY; | 603 flags |= DSBLIT_SRC_COLORKEY; |
604 surface->SetSrcColorKey (surface, src->format->colorkey); | 604 DirectFB_SetHWColorKey (NULL, src, src->format->colorkey); |
605 } | 605 } |
606 | 606 |
607 if (src->flags & SDL_SRCALPHA) | 607 if (src->flags & SDL_SRCALPHA) |
608 { | 608 { |
609 flags |= DSBLIT_BLEND_COLORALPHA; | 609 flags |= DSBLIT_BLEND_COLORALPHA; |
633 surface->FillRectangle (surface, dstrect->x, dstrect->y, dstrect->w, dstrect->h); | 633 surface->FillRectangle (surface, dstrect->x, dstrect->y, dstrect->w, dstrect->h); |
634 | 634 |
635 return 0; | 635 return 0; |
636 } | 636 } |
637 | 637 |
638 static int DirectFB_SetHWColorKey(_THIS, SDL_Surface *surface, Uint32 key) | 638 static int DirectFB_SetHWColorKey(_THIS, SDL_Surface *src, Uint32 key) |
639 { | 639 { |
640 SDL_PixelFormat *fmt = src->format; | |
641 IDirectFBSurface *surface = src->hwdata->surface; | |
642 | |
643 /* ugly */ | |
644 surface->SetSrcColorKey (surface, | |
645 (key & fmt->Rmask) >> (fmt->Rshift - fmt->Rloss), | |
646 (key & fmt->Gmask) >> (fmt->Gshift - fmt->Gloss), | |
647 (key & fmt->Bmask) << (fmt->Bloss - fmt->Bshift)); | |
648 | |
640 return 0; | 649 return 0; |
641 } | 650 } |
642 | 651 |
643 static int DirectFB_SetHWAlpha(_THIS, SDL_Surface *surface, Uint8 alpha) | 652 static int DirectFB_SetHWAlpha(_THIS, SDL_Surface *surface, Uint8 alpha) |
644 { | 653 { |