ref_soft: Bound texcoords again, disable drawing spans on FloorDivMod overflow

This commit is contained in:
mittorn 2019-04-01 02:42:13 +07:00
parent 1c49d76fb7
commit 0c6c0003b1
2 changed files with 12 additions and 3 deletions

View File

@ -105,6 +105,11 @@ byte *skinstart;
void (*d_pdrawspans)(spanpackage_t *pspanpackage);
void R_PolysetStub (spanpackage_t *pspanpackage)
{
}
void R_PolysetDrawSpans8_33 (spanpackage_t *pspanpackage);
void R_PolysetDrawSpans8_66 (spanpackage_t *pspanpackage);
void R_PolysetDrawSpans8_Opaque (spanpackage_t *pspanpackage);
@ -308,12 +313,16 @@ void FloorDivMod (float numer, float denom, int *quotient,
}
if( q > INT_MAX / 2 || q < INT_MIN / 2 )
{
int i;
d_pdrawspans = R_PolysetStub;
gEngfuncs.Con_Printf( S_ERROR "FloorDivMod: q overflow!\n" );
q = 1;
}
if( r > INT_MAX / 2 || r < INT_MIN / 2 )
{
int i;
d_pdrawspans = R_PolysetStub;
gEngfuncs.Con_Printf( S_ERROR "FloorDivMod: r overflow!\n");
r = 1;
}

View File

@ -245,8 +245,8 @@ void TriTexCoord2f( volatile float u, volatile float v )
v1 = v1 - 1;
s = r_affinetridesc.skinwidth * bound(0,u1,1);
t = r_affinetridesc.skinheight * bound(0,v1,1);
s = r_affinetridesc.skinwidth * bound(0.01,u1,0.99);
t = r_affinetridesc.skinheight * bound(0.01,v1,0.99);
}
/*