mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-24 18:21:34 +00:00
Fix credit sequence not compensating for non-green resolutions
This commit is contained in:
parent
2747e30f8c
commit
71ce173a0d
1 changed files with 6 additions and 3 deletions
|
@ -1303,6 +1303,9 @@ void F_CreditDrawer(void)
|
|||
// Dim the background
|
||||
V_DrawFadeScreen(0xFF00, 16);
|
||||
|
||||
// compensation for y on non-green resolutions, used to prevent text from disappearing before reaching the top
|
||||
int compy = vid.height - BASEVIDHEIGHT;
|
||||
|
||||
// Draw credits text on top
|
||||
for (i = 0; credits[i]; i++)
|
||||
{
|
||||
|
@ -1312,17 +1315,17 @@ void F_CreditDrawer(void)
|
|||
y += 80<<FRACBITS;
|
||||
break;
|
||||
case 1:
|
||||
if (y>>FRACBITS > -20)
|
||||
if (y>>FRACBITS > -20-compy)
|
||||
V_DrawCreditString((160 - (V_CreditStringWidth(&credits[i][1])>>1))<<FRACBITS, y, 0, &credits[i][1]);
|
||||
y += 30<<FRACBITS;
|
||||
break;
|
||||
case 2:
|
||||
if (y>>FRACBITS > -10)
|
||||
if (y>>FRACBITS > -10-compy)
|
||||
V_DrawStringAtFixed((BASEVIDWIDTH-V_StringWidth(&credits[i][1], V_ALLOWLOWERCASE|V_YELLOWMAP))<<FRACBITS>>1, y, V_ALLOWLOWERCASE|V_YELLOWMAP, &credits[i][1]);
|
||||
y += 12<<FRACBITS;
|
||||
break;
|
||||
default:
|
||||
if (y>>FRACBITS > -10)
|
||||
if (y>>FRACBITS > -10-compy)
|
||||
V_DrawStringAtFixed(32<<FRACBITS, y, V_ALLOWLOWERCASE, credits[i]);
|
||||
y += 12<<FRACBITS;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue