wined3d: universal surface convertor function for unsigned integer color formats(4th attempt)
Alexandre Julliard
julliard at winehq.org
Thu Jul 24 04:03:35 CDT 2008
Victor Eremin <ErV2005 at rambler.ru> writes:
> +void mask_copy(DWORD srcMask, BYTE srcPixelSize,
> + DWORD dstMask, BYTE dstPixelSize,
> + BYTE *src, BYTE* dst, DWORD src_pitch, DWORD dst_pitch,
> + unsigned int w, unsigned int h){
> + unsigned int x, y;
> + BYTE i;
> + BYTE *dstp, *srcp, *dstmaskp, *srcmaskp, *channelValuePtr;
> + DWORD channelValue;
> + BYTE upShift, downShift;
> + dstmaskp = (BYTE*)&dstMask;
> + srcmaskp = (BYTE*)&srcMask;
> + channelValuePtr = (BYTE*)&channelValue;
You can't access DWORDs as bytes, that will break on big-endian
platforms.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list