mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-30 03:40:32 +00:00
Disasm the GE blend mode better.
This commit is contained in:
parent
8f27d03af3
commit
320951a77c
@ -720,7 +720,45 @@ void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *buffer) {
|
||||
break;
|
||||
|
||||
case GE_CMD_BLENDMODE:
|
||||
sprintf(buffer, "Blend mode: %06x", data);
|
||||
{
|
||||
const char *blendModes[] = {
|
||||
"add",
|
||||
"subtract",
|
||||
"reverse subtract",
|
||||
"min",
|
||||
"max",
|
||||
"abs subtract",
|
||||
"unsupported1",
|
||||
"unsupported2",
|
||||
};
|
||||
const char *blendFactors[] = {
|
||||
"a",
|
||||
"1.0 - a",
|
||||
"src.a",
|
||||
"1.0 - src.a",
|
||||
"dst.a",
|
||||
"1.0 - dst.a",
|
||||
"2.0 * src.a",
|
||||
"1.0 - 2.0 * src.a",
|
||||
"2.0 * dst.a",
|
||||
"1.0 - 2.0 * dst.a",
|
||||
"fixed",
|
||||
"fixed2",
|
||||
"fixed3",
|
||||
"fixed4",
|
||||
"fixed5",
|
||||
"fixed6",
|
||||
};
|
||||
|
||||
const char *blendFactorA = blendFactors[(data >> 0) & 0xF];
|
||||
const char *blendFactorB = blendFactors[(data >> 4) & 0xF];
|
||||
const char *blendMode = blendModes[(data >> 8) & 0x7];
|
||||
|
||||
if (data & ~0xFF0007FF)
|
||||
sprintf(buffer, "Blend mode: %s %s, %s (extra: %06x)", blendMode, blendFactorA, blendFactorB, data & ~0xFF0007FF);
|
||||
else
|
||||
sprintf(buffer, "Blend mode: %s %s, %s", blendMode, blendFactorA, blendFactorB);
|
||||
}
|
||||
break;
|
||||
|
||||
case GE_CMD_BLENDFIXEDA:
|
||||
|
Loading…
Reference in New Issue
Block a user