mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Minor code cleanup
This commit is contained in:
1 parent
0bf1d12053
commit
4f925fa5f2
3 files changed
+34
-35
No files matched your search
@@ -174,20 +174,22 @@ void TextureCacheGLES::UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBas
|
||||
}
|
||||
|
||||
// Special optimization: fonts typically draw clut4 with just alpha values in a single color.
|
||||
clutAlphaLinear_ = false;
|
||||
clutAlphaLinearColor_ = 0;
|
||||
bool alphaLinear = false;
|
||||
u16 alphaLinearColor = 0;
|
||||
if (clutFormat == GE_CMODE_16BIT_ABGR4444 && clutIndexIsSimple) {
|
||||
const u16_le *clut = GetCurrentClut<u16_le>();
|
||||
clutAlphaLinear_ = true;
|
||||
clutAlphaLinearColor_ = clut[15] & 0xFFF0;
|
||||
const u16 *clut = (const u16 *)(clutBuf_);
|
||||
alphaLinear = true;
|
||||
alphaLinearColor = clut[15] & 0xFFF0;
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
u16 step = clutAlphaLinearColor_ | i;
|
||||
u16 step = alphaLinearColor | i;
|
||||
if (clut[i] != step) {
|
||||
clutAlphaLinear_ = false;
|
||||
alphaLinear = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
clutProperties_.clutAlphaLinear = alphaLinear;
|
||||
clutProperties_.clutAlphaLinearColor = alphaLinearColor;
|
||||
|
||||
clutLastFormat_ = gstate.clutformat;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user