Fixes and optimizations to vertex decoding and lighting.

Motorcycles are now visible in MotoGP.
This commit is contained in:
Henrik Rydgard 2012-11-16 15:16:14 +01:00
parent 2bed15f122
commit e5c6cf965b
11 changed files with 308 additions and 327 deletions

View file

@ -400,18 +400,6 @@ struct DXT1Block
u16 color2;
};
inline u8 Convert5To8(u8 v)
{
// Swizzle bits: 00012345 -> 12345123
return (v << 3) | (v >> 2);
}
inline u8 Convert6To8(u8 v)
{
// Swizzle bits: 00123456 -> 12345612
return (v << 2) | (v >> 4);
}
inline u32 makecol(int r, int g, int b, int a)
{
return (a << 24)|(r << 16)|(g << 8)|b;