Invert gstate.getClearModeColorMask().

It makes more sense matching gstate.getColorMask().
This commit is contained in:
Unknown W. Brackets 2013-11-10 00:54:19 -08:00
parent 5817684e28
commit 21deaef35a
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ struct GPUgstate
bool isClearModeColorMask() const { return (clearmode&0x100) != 0; }
bool isClearModeAlphaMask() const { return (clearmode&0x200) != 0; }
bool isClearModeDepthMask() const { return (clearmode&0x400) != 0; }
u32 getClearModeColorMask() const { return ((clearmode&0x100) ? 0xFFFFFF : 0) | ((clearmode&0x200) ? 0xFF000000 : 0); } // TODO: Different convention than getColorMask, confusing!
u32 getClearModeColorMask() const { return ((clearmode&0x100) ? 0 : 0xFFFFFF) | ((clearmode&0x200) ? 0 : 0xFF000000); }
// Blend
GEBlendSrcFactor getBlendFuncA() const { return (GEBlendSrcFactor)(blend & 0xF); }

View File

@ -983,7 +983,7 @@ void DrawTriangle(const VertexData& v0, const VertexData& v1, const VertexData&
}
if (gstate.isModeClear()) {
new_color = (new_color & gstate.getClearModeColorMask()) | (old_color & ~gstate.getClearModeColorMask());
new_color = (new_color & ~gstate.getClearModeColorMask()) | (old_color & gstate.getClearModeColorMask());
} else {
new_color = (new_color & ~gstate.getColorMask()) | (old_color & gstate.getColorMask());
}