mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-02 06:06:24 +00:00
Merge pull request #1977 from raven02/patch-5
Fix incorrect CLUT in Dainiji Super Robot Taisen Z Hakaihen
This commit is contained in:
commit
d8f3bc81e0
@ -191,7 +191,10 @@ static u32 GetClutAddr() {
|
||||
}
|
||||
|
||||
static u32 GetClutIndex(u32 index) {
|
||||
return ((((gstate.clutformat >> 16) & 0x1f) + index) >> ((gstate.clutformat >> 2) & 0x1f)) & ((gstate.clutformat >> 8) & 0xff);
|
||||
const u32 clutBase = (gstate.clutformat & 0x1f0000) >> 12;
|
||||
const u32 clutMask = (gstate.clutformat >> 8) & 0xff;
|
||||
const u8 clutShift = (gstate.clutformat >> 2) & 0x1f;
|
||||
return ((index >> clutShift) & clutMask) | clutBase;
|
||||
}
|
||||
|
||||
void *TextureCache::UnswizzleFromMem(u32 texaddr, u32 bufw, u32 bytesPerPixel, u32 level) {
|
||||
|
Loading…
Reference in New Issue
Block a user