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