mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 09:51:23 +02:00
Software: Fix some if-statement body placements
This commit is contained in:
parent
34eb0c6e1c
commit
f9f46f33d6
@ -91,12 +91,25 @@ namespace Clipper
|
|||||||
{
|
{
|
||||||
int cmask = 0;
|
int cmask = 0;
|
||||||
Vec4 pos = v->projectedPosition;
|
Vec4 pos = v->projectedPosition;
|
||||||
if (pos.w - pos.x < 0) cmask |= CLIP_POS_X_BIT;
|
|
||||||
if (pos.x + pos.w < 0) cmask |= CLIP_NEG_X_BIT;
|
if (pos.w - pos.x < 0)
|
||||||
if (pos.w - pos.y < 0) cmask |= CLIP_POS_Y_BIT;
|
cmask |= CLIP_POS_X_BIT;
|
||||||
if (pos.y + pos.w < 0) cmask |= CLIP_NEG_Y_BIT;
|
|
||||||
if (pos.w * pos.z > 0) cmask |= CLIP_POS_Z_BIT;
|
if (pos.x + pos.w < 0)
|
||||||
if (pos.z + pos.w < 0) cmask |= CLIP_NEG_Z_BIT;
|
cmask |= CLIP_NEG_X_BIT;
|
||||||
|
|
||||||
|
if (pos.w - pos.y < 0)
|
||||||
|
cmask |= CLIP_POS_Y_BIT;
|
||||||
|
|
||||||
|
if (pos.y + pos.w < 0)
|
||||||
|
cmask |= CLIP_NEG_Y_BIT;
|
||||||
|
|
||||||
|
if (pos.w * pos.z > 0)
|
||||||
|
cmask |= CLIP_POS_Z_BIT;
|
||||||
|
|
||||||
|
if (pos.z + pos.w < 0)
|
||||||
|
cmask |= CLIP_NEG_Z_BIT;
|
||||||
|
|
||||||
return cmask;
|
return cmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,16 +98,20 @@ void SetScissor()
|
|||||||
int yoff = bpmem.scissorOffset.y * 2 - 342;
|
int yoff = bpmem.scissorOffset.y * 2 - 342;
|
||||||
|
|
||||||
scissorLeft = bpmem.scissorTL.x - xoff - 342;
|
scissorLeft = bpmem.scissorTL.x - xoff - 342;
|
||||||
if (scissorLeft < 0) scissorLeft = 0;
|
if (scissorLeft < 0)
|
||||||
|
scissorLeft = 0;
|
||||||
|
|
||||||
scissorTop = bpmem.scissorTL.y - yoff - 342;
|
scissorTop = bpmem.scissorTL.y - yoff - 342;
|
||||||
if (scissorTop < 0) scissorTop = 0;
|
if (scissorTop < 0)
|
||||||
|
scissorTop = 0;
|
||||||
|
|
||||||
scissorRight = bpmem.scissorBR.x - xoff - 341;
|
scissorRight = bpmem.scissorBR.x - xoff - 341;
|
||||||
if (scissorRight > EFB_WIDTH) scissorRight = EFB_WIDTH;
|
if (scissorRight > EFB_WIDTH)
|
||||||
|
scissorRight = EFB_WIDTH;
|
||||||
|
|
||||||
scissorBottom = bpmem.scissorBR.y - yoff - 341;
|
scissorBottom = bpmem.scissorBR.y - yoff - 341;
|
||||||
if (scissorBottom > EFB_HEIGHT) scissorBottom = EFB_HEIGHT;
|
if (scissorBottom > EFB_HEIGHT)
|
||||||
|
scissorBottom = EFB_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTevReg(int reg, int comp, bool konst, s16 color)
|
void SetTevReg(int reg, int comp, bool konst, s16 color)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user