mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix DeIndexTexture
This commit is contained in:
parent
e6df3ab23a
commit
35e0bfeacc
2 changed files with 8 additions and 4 deletions
|
@ -1313,7 +1313,7 @@ static void ReverseColors(void *dstBuf, const void *srcBuf, GETextureFormat fmt,
|
|||
case GE_TFMT_4444:
|
||||
ConvertRGBA4444ToABGR4444((u16 *)dstBuf, (const u16 *)srcBuf, numPixels);
|
||||
break;
|
||||
// Final Fantasy 2 uses this heavily in animated textures.
|
||||
// Final Fantasy 2 uses this heavily in animated textures.
|
||||
case GE_TFMT_5551:
|
||||
ConvertRGBA5551ToABGR1555((u16 *)dstBuf, (const u16 *)srcBuf, numPixels);
|
||||
break;
|
||||
|
|
|
@ -109,17 +109,21 @@ inline void DeIndexTexture(/*WRITEONLY*/ ClutT *dest, const IndexT *indexed, int
|
|||
if (sizeof(IndexT) == 1) {
|
||||
for (int i = 0; i < length; ++i) {
|
||||
ClutT color = clut[*indexed++];
|
||||
alphaSum &= color;
|
||||
*dest++ = color;
|
||||
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < length; ++i) {
|
||||
*dest++ = clut[(*indexed++) & 0xFF];
|
||||
ClutT color = (*indexed++) & 0xFF;
|
||||
alphaSum &= color;
|
||||
*dest++ = color;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < length; ++i) {
|
||||
*dest++ = clut[gstate.transformClutIndex(*indexed++)];
|
||||
ClutT color = clut[gstate.transformClutIndex(*indexed++)];
|
||||
alphaSum &= color;
|
||||
*dest++ = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue