Re: WineD3D: add rgb24 colorkey conversion
14 Aug
2006
14 Aug
'06
1:02 p.m.
"Roderick Colenbrander" <thunderbird2k(a)gmx.net> writes:
+ for (x = 0; x < len; x++) { + /* Retrieve RGB24 color */ + DWORD color = *((DWORD*)src); + /* Store the RGB portion in dest and reserve a byte for alpha */ + *Dest = color << 8; + if ((color < surf->SrcBltCKey.dwColorSpaceLowValue) || + (color > surf->SrcBltCKey.dwColorSpaceHighValue)) + *Dest |= 0xff; + src += 3;
You should avoid unaligned DWORD accesses, this doesn't work on all platforms. -- Alexandre Julliard julliard(a)winehq.org
7150
Age (days ago)
7150
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard