mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Allow Lua to stop the intermission level title strings from drawing
This commit is contained in:
parent
6c4e7e13e0
commit
aa54a04c9e
3 changed files with 43 additions and 31 deletions
|
@ -37,6 +37,7 @@ enum hud {
|
|||
hud_tabemblems,
|
||||
// Intermission
|
||||
hud_intermissiontally,
|
||||
hud_intermissiontitletext,
|
||||
hud_intermissionmessages,
|
||||
hud_intermissionemeralds,
|
||||
hud_MAX
|
||||
|
|
|
@ -63,6 +63,7 @@ static const char *const hud_disable_options[] = {
|
|||
"tabemblems",
|
||||
|
||||
"intermissiontally",
|
||||
"intermissiontitletext",
|
||||
"intermissionmessages",
|
||||
"intermissionemeralds",
|
||||
NULL};
|
||||
|
|
|
@ -471,14 +471,17 @@ void Y_IntermissionDrawer(void)
|
|||
}
|
||||
}
|
||||
|
||||
// draw the "got through act" lines and act number
|
||||
V_DrawLevelTitle(data.coop.passedx1, 49, 0, data.coop.passed1);
|
||||
if (LUA_HudEnabled(hud_intermissiontitletext))
|
||||
{
|
||||
INT32 h = V_LevelNameHeight(data.coop.passed2);
|
||||
V_DrawLevelTitle(data.coop.passedx2, 49+h+2, 0, data.coop.passed2);
|
||||
// draw the "got through act" lines and act number
|
||||
V_DrawLevelTitle(data.coop.passedx1, 49, 0, data.coop.passed1);
|
||||
{
|
||||
INT32 h = V_LevelNameHeight(data.coop.passed2);
|
||||
V_DrawLevelTitle(data.coop.passedx2, 49+h+2, 0, data.coop.passed2);
|
||||
|
||||
if (data.coop.actnum)
|
||||
V_DrawLevelActNum(244, 42+h, 0, data.coop.actnum);
|
||||
if (data.coop.actnum)
|
||||
V_DrawLevelActNum(244, 42+h, 0, data.coop.actnum);
|
||||
}
|
||||
}
|
||||
|
||||
bonusy = 150;
|
||||
|
@ -562,37 +565,44 @@ void Y_IntermissionDrawer(void)
|
|||
|
||||
if (drawsection == 1)
|
||||
{
|
||||
const char *ringtext = "\x82" "50 rings, no shield";
|
||||
const char *tut1text = "\x82" "press " "\x80" "spin";
|
||||
const char *tut2text = "\x82" "mid-" "\x80" "jump";
|
||||
ttheight = 8;
|
||||
V_DrawLevelTitle(data.spec.passedx1 + xoffset1, ttheight, 0, data.spec.passed1);
|
||||
ttheight += V_LevelNameHeight(data.spec.passed3) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx3 + xoffset2, ttheight, 0, data.spec.passed3);
|
||||
ttheight += V_LevelNameHeight(data.spec.passed4) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx4 + xoffset3, ttheight, 0, data.spec.passed4);
|
||||
if (LUA_HudEnabled(hud_intermissiontitletext))
|
||||
{
|
||||
const char *ringtext = "\x82" "50 rings, no shield";
|
||||
const char *tut1text = "\x82" "press " "\x80" "spin";
|
||||
const char *tut2text = "\x82" "mid-" "\x80" "jump";
|
||||
ttheight = 8;
|
||||
V_DrawLevelTitle(data.spec.passedx1 + xoffset1, ttheight, 0, data.spec.passed1);
|
||||
ttheight += V_LevelNameHeight(data.spec.passed3) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx3 + xoffset2, ttheight, 0, data.spec.passed3);
|
||||
ttheight += V_LevelNameHeight(data.spec.passed4) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx4 + xoffset3, ttheight, 0, data.spec.passed4);
|
||||
|
||||
ttheight = 108;
|
||||
V_DrawLevelTitle(BASEVIDWIDTH/2 + xoffset4 - (V_LevelNameWidth(ringtext)/2), ttheight, 0, ringtext);
|
||||
ttheight += V_LevelNameHeight(tut1text) + 2;
|
||||
V_DrawLevelTitle(BASEVIDWIDTH/2 + xoffset5 - (V_LevelNameWidth(tut1text)/2), ttheight, 0, tut1text);
|
||||
ttheight += V_LevelNameHeight(tut2text) + 2;
|
||||
V_DrawLevelTitle(BASEVIDWIDTH/2 + xoffset6 - (V_LevelNameWidth(tut2text)/2), ttheight, 0, tut2text);
|
||||
ttheight = 108;
|
||||
V_DrawLevelTitle(BASEVIDWIDTH/2 + xoffset4 - (V_LevelNameWidth(ringtext)/2), ttheight, 0, ringtext);
|
||||
ttheight += V_LevelNameHeight(tut1text) + 2;
|
||||
V_DrawLevelTitle(BASEVIDWIDTH/2 + xoffset5 - (V_LevelNameWidth(tut1text)/2), ttheight, 0, tut1text);
|
||||
ttheight += V_LevelNameHeight(tut2text) + 2;
|
||||
V_DrawLevelTitle(BASEVIDWIDTH/2 + xoffset6 - (V_LevelNameWidth(tut2text)/2), ttheight, 0, tut2text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT32 yoffset = 0;
|
||||
if (data.spec.passed1[0] != '\0')
|
||||
|
||||
if (LUA_HudEnabled(hud_intermissiontitletext))
|
||||
{
|
||||
ttheight = 24;
|
||||
V_DrawLevelTitle(data.spec.passedx1 + xoffset1, ttheight, 0, data.spec.passed1);
|
||||
ttheight += V_LevelNameHeight(data.spec.passed2) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx2 + xoffset2, ttheight, 0, data.spec.passed2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ttheight = 24 + (V_LevelNameHeight(data.spec.passed2)/2) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx2 + xoffset1, ttheight, 0, data.spec.passed2);
|
||||
if (data.spec.passed1[0] != '\0')
|
||||
{
|
||||
ttheight = 24;
|
||||
V_DrawLevelTitle(data.spec.passedx1 + xoffset1, ttheight, 0, data.spec.passed1);
|
||||
ttheight += V_LevelNameHeight(data.spec.passed2) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx2 + xoffset2, ttheight, 0, data.spec.passed2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ttheight = 24 + (V_LevelNameHeight(data.spec.passed2)/2) + 2;
|
||||
V_DrawLevelTitle(data.spec.passedx2 + xoffset1, ttheight, 0, data.spec.passed2);
|
||||
}
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(152 + xoffset3, 108, 0, data.spec.bonuspatches[0]);
|
||||
|
|
Loading…
Reference in a new issue