Merge branch 'lua-battlefullscreen-expose' into v1-lua-stuff

This commit is contained in:
Latapostrophe 2019-05-26 11:18:00 +02:00
commit 55815eb829
3 changed files with 19 additions and 3 deletions

View File

@ -8180,6 +8180,11 @@ static void K_drawBattleFullscreen(void)
INT32 y = -64+(stplyr->kartstuff[k_cardanimation]); // card animation goes from 0 to 164, 164 is the middle of the screen
INT32 splitflags = V_SNAPTOTOP; // I don't feel like properly supporting non-green resolutions, so you can have a misuse of SNAPTO instead
fixed_t scale = FRACUNIT;
boolean drawcomebacktimer = true; // lazy hack because it's cleaner in the long run.
#ifdef HAVE_BLUA
if (!LUA_HudEnabled(hud_battlecomebacktimer))
drawcomebacktimer = false;
#endif
if (splitscreen)
{
@ -8231,7 +8236,7 @@ static void K_drawBattleFullscreen(void)
else
K_drawKartFinish();
}
else if (stplyr->kartstuff[k_bumper] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback && !stplyr->spectator)
else if (stplyr->kartstuff[k_bumper] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback && !stplyr->spectator && drawcomebacktimer)
{
UINT16 t = stplyr->kartstuff[k_comebacktimer]/(10*TICRATE);
INT32 txoff, adjust = (splitscreen > 1) ? 4 : 6; // normal string is 8, kart string is 12, half of that for ease
@ -8789,8 +8794,15 @@ void K_drawKartHUD(void)
if (battlefullscreen)
{
K_drawBattleFullscreen();
return;
#ifdef HAVE_BLUA
if (LUA_HudEnabled(hud_battlefullscreen))
{
#endif
K_drawBattleFullscreen();
return;
#ifdef HAVE_BLUA
} // yes we legit checked if we had lua to close a single bracket. Not my proudest code edit tbh.
#endif
}
// Draw the item window

View File

@ -21,6 +21,8 @@ enum hud {
hud_position,
hud_minirankings, // Rankings to the left
hud_battlebumpers, // mini rankings battle bumpers.
hud_battlefullscreen, // battle huge text (WAIT, WIN, LOSE ...) + karma comeback time
hud_battlecomebacktimer, // comeback timer in battlefullscreen. separated for ease of use.
hud_wanted,
hud_speedometer,
hud_freeplay,

View File

@ -48,6 +48,8 @@ static const char *const hud_disable_options[] = {
"position",
"minirankings", // Gametype rankings to the left
"battlerankingsbumpers", // bumper drawer for battle. Useful if you want to make a custom battle gamemode without bumpers being involved.
"battlefullscreen", // battlefullscreen func (WAIT, ATTACK OR PROTECT ...)
"battlecomebacktimer", // come back timer in battlefullscreen
"wanted",
"speedometer",
"freeplay",