mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Fix DeIndexTexture
This commit is contained in:
1 parent
e6df3ab23a
commit
35e0bfeacc
2 files changed
+8
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user