mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
Software: Fix some if-statement body placements
This commit is contained in:
parent
34eb0c6e1c
commit
f9f46f33d6
2 changed files with 27 additions and 10 deletions
|
@ -91,12 +91,25 @@ namespace Clipper
|
|||
{
|
||||
int cmask = 0;
|
||||
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.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;
|
||||
|
||||
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.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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue