initial implementation of fog range adjust, I don't think is correct or work right but is a start.

some tweaks and fixes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6957 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2011-01-29 04:31:56 +00:00
parent 64af8abcae
commit 4c58c7ea03
9 changed files with 94 additions and 37 deletions

View File

@ -157,14 +157,10 @@ inline u32 RGBA8ToRGBA6ToRGBA8(u32 src)
inline u32 RGBA8ToRGB565ToRGBA8(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 = 0xFF000000 | (dstr8 << 16) | (dstg8 << 8) | dstb8;
u32 color = (src & 0xF8FCF8);
color |= (color >> 5) & 0x070007;
color |= (color >> 6) & 0x000300;
color |= 0xFF000000;
return color;
}