mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-13 00:24:17 +00:00
Merge commit 'upstream/master~1'
This commit is contained in:
commit
7d98adf6dc
2 changed files with 41 additions and 20 deletions
|
@ -643,16 +643,34 @@ void F_CreditDrawer(void)
|
||||||
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void F_CreditTicker(void)
|
||||||
|
{
|
||||||
|
// "Simulate" the drawing of the credits so that dedicated mode doesn't get stuck
|
||||||
|
UINT16 i;
|
||||||
|
fixed_t y = (80<<FRACBITS) - 5*(animtimer<<FRACBITS)/8;
|
||||||
|
|
||||||
|
// Draw credits text on top
|
||||||
|
for (i = 0; credits[i]; i++)
|
||||||
|
{
|
||||||
|
switch(credits[i][0])
|
||||||
|
{
|
||||||
|
case 0: y += 80<<FRACBITS; break;
|
||||||
|
case 1: y += 30<<FRACBITS; break;
|
||||||
|
default: y += 12<<FRACBITS; break;
|
||||||
|
}
|
||||||
|
if (FixedMul(y,vid.dupy) > vid.height)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do this here rather than in the drawer you doofus! (this is why dedicated mode broke at credits)
|
||||||
if (!credits[i] && y <= 120<<FRACBITS && !finalecount)
|
if (!credits[i] && y <= 120<<FRACBITS && !finalecount)
|
||||||
{
|
{
|
||||||
timetonext = 5*TICRATE+1;
|
timetonext = 5*TICRATE+1;
|
||||||
finalecount = 5*TICRATE;
|
finalecount = 5*TICRATE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void F_CreditTicker(void)
|
|
||||||
{
|
|
||||||
if (timetonext)
|
if (timetonext)
|
||||||
timetonext--;
|
timetonext--;
|
||||||
else
|
else
|
||||||
|
|
37
src/r_segs.c
37
src/r_segs.c
|
@ -870,16 +870,18 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
leftheight -= viewz;
|
leftheight -= viewz;
|
||||||
rightheight -= viewz;
|
rightheight -= viewz;
|
||||||
|
|
||||||
#define OVERFLOWTEST(height, scale) \
|
#define CLAMPMAX INT32_MAX
|
||||||
overflow_test = (INT64)centeryfrac - (((INT64)height*scale)>>FRACBITS); \
|
#define CLAMPMIN (-INT32_MAX) // This is not INT32_MIN on purpose! INT32_MIN makes the drawers freak out.
|
||||||
if (overflow_test < 0) overflow_test = -overflow_test; \
|
// Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave.
|
||||||
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) continue;
|
overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS);
|
||||||
|
if (overflow_test > (INT64)CLAMPMAX) rlight->height = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->height = (fixed_t)overflow_test;
|
||||||
|
else rlight->height = CLAMPMIN;
|
||||||
|
|
||||||
OVERFLOWTEST(leftheight, ds->scale1)
|
overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS);
|
||||||
OVERFLOWTEST(rightheight, ds->scale2)
|
if (overflow_test > (INT64)CLAMPMAX) rlight->heightstep = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->heightstep = (fixed_t)overflow_test;
|
||||||
rlight->height = (centeryfrac) - FixedMul(leftheight, ds->scale1);
|
else rlight->heightstep = CLAMPMIN;
|
||||||
rlight->heightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2);
|
|
||||||
rlight->heightstep = (rlight->heightstep-rlight->height)/(range);
|
rlight->heightstep = (rlight->heightstep-rlight->height)/(range);
|
||||||
#else
|
#else
|
||||||
if (light->height < *pfloor->bottomheight)
|
if (light->height < *pfloor->bottomheight)
|
||||||
|
@ -901,12 +903,16 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
leftheight -= viewz;
|
leftheight -= viewz;
|
||||||
rightheight -= viewz;
|
rightheight -= viewz;
|
||||||
|
|
||||||
OVERFLOWTEST(leftheight, ds->scale1)
|
// Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave.
|
||||||
OVERFLOWTEST(rightheight, ds->scale2)
|
overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS);
|
||||||
#undef OVERFLOWTEST
|
if (overflow_test > (INT64)CLAMPMAX) rlight->botheight = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->botheight = (fixed_t)overflow_test;
|
||||||
|
else rlight->botheight = CLAMPMIN;
|
||||||
|
|
||||||
rlight->botheight = (centeryfrac) - FixedMul(leftheight, ds->scale1);
|
overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS);
|
||||||
rlight->botheightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2);
|
if (overflow_test > (INT64)CLAMPMAX) rlight->botheightstep = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->botheightstep = (fixed_t)overflow_test;
|
||||||
|
else rlight->botheightstep = CLAMPMIN;
|
||||||
rlight->botheightstep = (rlight->botheightstep-rlight->botheight)/(range);
|
rlight->botheightstep = (rlight->botheightstep-rlight->botheight)/(range);
|
||||||
#else
|
#else
|
||||||
lheight = *light->caster->bottomheight;// > *pfloor->topheight ? *pfloor->topheight + FRACUNIT : *light->caster->bottomheight;
|
lheight = *light->caster->bottomheight;// > *pfloor->topheight ? *pfloor->topheight + FRACUNIT : *light->caster->bottomheight;
|
||||||
|
@ -1079,9 +1085,6 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CLAMPMAX INT32_MAX
|
|
||||||
#define CLAMPMIN (-INT32_MAX) // This is not INT32_MIN on purpose! INT32_MIN makes the drawers freak out.
|
|
||||||
|
|
||||||
// draw the columns
|
// draw the columns
|
||||||
for (dc_x = x1; dc_x <= x2; dc_x++)
|
for (dc_x = x1; dc_x <= x2; dc_x++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue