Fixed clipping rectangle on Voodoo, Return Fire II now works.
This commit is contained in:
parent
4af811699e
commit
a1fc8da064
1 changed files with 13 additions and 13 deletions
|
|
@ -2712,8 +2712,8 @@ static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, vood
|
||||||
ystart = params->clipLowY;
|
ystart = params->clipLowY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((params->fbzMode & 1) && (yend > params->clipHighY))
|
if ((params->fbzMode & 1) && (yend >= params->clipHighY))
|
||||||
yend = params->clipHighY;
|
yend = params->clipHighY-1;
|
||||||
|
|
||||||
state->y = ystart;
|
state->y = ystart;
|
||||||
// yend--;
|
// yend--;
|
||||||
|
|
@ -2856,14 +2856,14 @@ static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, vood
|
||||||
|
|
||||||
x = params->clipLeft;
|
x = params->clipLeft;
|
||||||
}
|
}
|
||||||
if (x2 > params->clipRight)
|
if (x2 >= params->clipRight)
|
||||||
x2 = params->clipRight;
|
x2 = params->clipRight-1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (x > params->clipRight)
|
if (x >= params->clipRight)
|
||||||
{
|
{
|
||||||
int dx = params->clipRight - x;
|
int dx = (params->clipRight-1) - x;
|
||||||
|
|
||||||
state->ir += params->dRdX*dx;
|
state->ir += params->dRdX*dx;
|
||||||
state->ig += params->dGdX*dx;
|
state->ig += params->dGdX*dx;
|
||||||
|
|
@ -2878,7 +2878,7 @@ static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, vood
|
||||||
state->tmu1_w += params->tmu[1].dWdX*dx;
|
state->tmu1_w += params->tmu[1].dWdX*dx;
|
||||||
state->w += params->dWdX*dx;
|
state->w += params->dWdX*dx;
|
||||||
|
|
||||||
x = params->clipRight;
|
x = params->clipRight-1;
|
||||||
}
|
}
|
||||||
if (x2 < params->clipLeft)
|
if (x2 < params->clipLeft)
|
||||||
x2 = params->clipLeft;
|
x2 = params->clipLeft;
|
||||||
|
|
@ -3995,8 +3995,8 @@ static void blit_start(voodoo_t *voodoo)
|
||||||
|
|
||||||
if (voodoo->bltCommand & BLIT_CLIPPING_ENABLED)
|
if (voodoo->bltCommand & BLIT_CLIPPING_ENABLED)
|
||||||
{
|
{
|
||||||
if (dst_x < voodoo->bltClipLeft || dst_x > voodoo->bltClipRight ||
|
if (dst_x < voodoo->bltClipLeft || dst_x >= voodoo->bltClipRight ||
|
||||||
dst_y < voodoo->bltClipLowY || dst_y > voodoo->bltClipHighY)
|
dst_y < voodoo->bltClipLowY || dst_y >= voodoo->bltClipHighY)
|
||||||
goto skip_pixel_blit;
|
goto skip_pixel_blit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4067,8 +4067,8 @@ skip_pixel_blit:
|
||||||
{
|
{
|
||||||
if (voodoo->bltCommand & BLIT_CLIPPING_ENABLED)
|
if (voodoo->bltCommand & BLIT_CLIPPING_ENABLED)
|
||||||
{
|
{
|
||||||
if (dst_x < voodoo->bltClipLeft || dst_x > voodoo->bltClipRight ||
|
if (dst_x < voodoo->bltClipLeft || dst_x >= voodoo->bltClipRight ||
|
||||||
dst_y < voodoo->bltClipLowY || dst_y > voodoo->bltClipHighY)
|
dst_y < voodoo->bltClipLowY || dst_y >= voodoo->bltClipHighY)
|
||||||
goto skip_pixel_fill;
|
goto skip_pixel_fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4221,8 +4221,8 @@ static void blit_data(voodoo_t *voodoo, uint32_t data)
|
||||||
|
|
||||||
if (voodoo->bltCommand & BLIT_CLIPPING_ENABLED)
|
if (voodoo->bltCommand & BLIT_CLIPPING_ENABLED)
|
||||||
{
|
{
|
||||||
if (x < voodoo->bltClipLeft || x > voodoo->bltClipRight ||
|
if (x < voodoo->bltClipLeft || x >= voodoo->bltClipRight ||
|
||||||
voodoo->blt.dst_y < voodoo->bltClipLowY || voodoo->blt.dst_y > voodoo->bltClipHighY)
|
voodoo->blt.dst_y < voodoo->bltClipLowY || voodoo->blt.dst_y >= voodoo->bltClipHighY)
|
||||||
goto skip_pixel;
|
goto skip_pixel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue