mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
First Experimental Commit:
make some changes to the Clear code. please test a lot , the point of this commit is to determine the correct behavior of the efb clearing so feedback is welcome git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6663 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -155,4 +155,26 @@ typedef enum
|
||||
API_NONE
|
||||
} API_TYPE;
|
||||
|
||||
inline u32 RGBA8ToRGBA6ToRGBA8(u32 src)
|
||||
{
|
||||
u32 color = src;
|
||||
color &= 0xFCFCFCFC;
|
||||
color |= (color >> 6) & 0x03030303;
|
||||
return color;
|
||||
}
|
||||
|
||||
inline u32 RGBA8ToRGB565ToRGB8(u32 src)
|
||||
{
|
||||
u32 color = src;
|
||||
u32 dstr5 = (color & 0xFF0000) >> 19;
|
||||
u32 dstg6 = (color & 0xFF00) >> 10;
|
||||
u32 dstb5 = (color & 0xFF) >> 3;
|
||||
u32 dstr8 = (dstr5 << 3) | (dstr5 >> 2);
|
||||
u32 dstg8 = (dstg6 << 2) | (dstg6 >> 4);
|
||||
u32 dstb8 = (dstb5 << 3) | (dstb5 >> 2);
|
||||
color = (dstr8 << 16) | (dstg8 << 8) | dstb8;
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
#endif // _VIDEOCOMMON_H
|
||||
|
Reference in New Issue
Block a user