mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Versus Mode intro: Two different warning patches scrolling opposite directions
Also repairs capitalisation on the opponent's subtitle, and moves everything down very slightly.
This commit is contained in:
parent
d2710aa17e
commit
5f10f4de0f
1 changed files with 57 additions and 28 deletions
|
|
@ -567,8 +567,8 @@ static patch_t *tcroundbonus;
|
||||||
static patch_t *tcactnum[10];
|
static patch_t *tcactnum[10];
|
||||||
static patch_t *tcact;
|
static patch_t *tcact;
|
||||||
|
|
||||||
static patch_t *twarn;
|
static patch_t *twarn[2];
|
||||||
static patch_t *twarn2;
|
static patch_t *ttext[2];
|
||||||
|
|
||||||
// some coordinates define to make my life easier....
|
// some coordinates define to make my life easier....
|
||||||
#define FINAL_ROUNDX (24)
|
#define FINAL_ROUNDX (24)
|
||||||
|
|
@ -625,8 +625,11 @@ static void ST_cacheLevelTitle(void)
|
||||||
|
|
||||||
tcact = (patch_t *)W_CachePatchName("TT_ACT", PU_HUDGFX);
|
tcact = (patch_t *)W_CachePatchName("TT_ACT", PU_HUDGFX);
|
||||||
|
|
||||||
twarn = (patch_t *)W_CachePatchName("K_BOSW01", PU_HUDGFX);
|
twarn[0] = (patch_t *)W_CachePatchName("K_BOSW01", PU_HUDGFX);
|
||||||
twarn2 = (patch_t *)W_CachePatchName("K_BOSW02", PU_HUDGFX);
|
twarn[1] = (patch_t *)W_CachePatchName("K_BOSW02", PU_HUDGFX);
|
||||||
|
|
||||||
|
ttext[0] = (patch_t *)W_CachePatchName("K_BOST01", PU_HUDGFX);
|
||||||
|
ttext[1] = (patch_t *)W_CachePatchName("K_BOST02", PU_HUDGFX);
|
||||||
|
|
||||||
// Cache round #
|
// Cache round #
|
||||||
for (i=1; i < 11; i++)
|
for (i=1; i < 11; i++)
|
||||||
|
|
@ -747,7 +750,20 @@ void ST_runTitleCard(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// No matter the circumstances, scroll the WARN...
|
// No matter the circumstances, scroll the WARN...
|
||||||
bannerx = -((lt_ticker*2)%((encoremode ? twarn2 : twarn)->width));
|
{
|
||||||
|
patch_t *localwarn = twarn[encoremode ? 1 : 0];
|
||||||
|
patch_t *localtext = ttext[encoremode ? 1 : 0];
|
||||||
|
|
||||||
|
if (localwarn->width)
|
||||||
|
{
|
||||||
|
bannerx = ((lt_ticker*2)%(localwarn->width));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (localtext->width)
|
||||||
|
{
|
||||||
|
bannery = -((lt_ticker*4)%(localtext->width));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (run && lt_ticker < PRELEVELTIME)
|
if (run && lt_ticker < PRELEVELTIME)
|
||||||
{
|
{
|
||||||
|
|
@ -935,27 +951,40 @@ void ST_drawTitleCard(void)
|
||||||
{
|
{
|
||||||
#define LOTIME 5
|
#define LOTIME 5
|
||||||
#define HITIME 15
|
#define HITIME 15
|
||||||
patch_t *localwarn = (encoremode ? twarn2 : twarn);
|
|
||||||
INT32 transp = (lt_ticker+HITIME) % (LOTIME+HITIME);
|
patch_t *localwarn;
|
||||||
|
INT32 transp;
|
||||||
boolean encorehack = ((levelfadecol == 0) && lt_ticker <= PRELEVELTIME+4);
|
boolean encorehack = ((levelfadecol == 0) && lt_ticker <= PRELEVELTIME+4);
|
||||||
|
|
||||||
if ((localwarn->width > 0) && (lt_ticker + (HITIME-transp) <= lt_endtime))
|
#define DRAWBOSSWARN(pat) \
|
||||||
{
|
localwarn = pat[encoremode ? 1 : 0];\
|
||||||
if (transp > HITIME-1)
|
\
|
||||||
{
|
if ((localwarn->width > 0) && (lt_ticker + (HITIME-transp) <= lt_endtime)) \
|
||||||
transp = HITIME-1;
|
{ \
|
||||||
}
|
if (transp > HITIME-1)\
|
||||||
|
{ \
|
||||||
transp = (((10*transp)/HITIME)<<V_ALPHASHIFT) | (encorehack ? V_SUBTRACT : V_ADD);
|
transp = HITIME-1; \
|
||||||
|
} \
|
||||||
while (bx > -pad)
|
\
|
||||||
bx -= localwarn->width;
|
transp = (((10*transp)/HITIME)<<V_ALPHASHIFT) | (encorehack ? V_REVERSESUBTRACT : V_ADD); \
|
||||||
while (bx < BASEVIDWIDTH+pad)
|
\
|
||||||
{
|
while (bx > -pad) \
|
||||||
V_DrawFixedPatch(bx*FRACUNIT, 55*FRACUNIT, FRACUNIT, V_SNAPTOLEFT|transp, localwarn, NULL);
|
bx -= localwarn->width; \
|
||||||
bx += localwarn->width;
|
while (bx < BASEVIDWIDTH+pad) \
|
||||||
}
|
{ \
|
||||||
|
V_DrawFixedPatch(bx*FRACUNIT, 60*FRACUNIT, FRACUNIT, V_SNAPTOLEFT|transp, localwarn, NULL); \
|
||||||
|
bx += localwarn->width; \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transp = (lt_ticker+HITIME) % (LOTIME+HITIME);
|
||||||
|
DRAWBOSSWARN(twarn);
|
||||||
|
|
||||||
|
transp = (lt_ticker+HITIME+3) % (LOTIME+HITIME);
|
||||||
|
bx = bannery;
|
||||||
|
DRAWBOSSWARN(ttext);
|
||||||
|
|
||||||
|
#undef DRAWBOSSWARN
|
||||||
#undef LOTIME
|
#undef LOTIME
|
||||||
#undef HITIME
|
#undef HITIME
|
||||||
}
|
}
|
||||||
|
|
@ -966,7 +995,7 @@ void ST_drawTitleCard(void)
|
||||||
bx = V_TitleCardStringWidth(bossinfo.enemyname, false);
|
bx = V_TitleCardStringWidth(bossinfo.enemyname, false);
|
||||||
|
|
||||||
// Name.
|
// Name.
|
||||||
V_DrawTitleCardString((BASEVIDWIDTH - bx)/2, 75, bossinfo.enemyname, 0, true, bossinfo.titleshow, lt_exitticker, false);
|
V_DrawTitleCardString((BASEVIDWIDTH - bx)/2, 80, bossinfo.enemyname, 0, true, bossinfo.titleshow, lt_exitticker, false);
|
||||||
|
|
||||||
// Under-bar.
|
// Under-bar.
|
||||||
{
|
{
|
||||||
|
|
@ -994,7 +1023,7 @@ void ST_drawTitleCard(void)
|
||||||
// Handle subtitle.
|
// Handle subtitle.
|
||||||
else if (bossinfo.subtitle && lt_ticker >= TICRATE/2)
|
else if (bossinfo.subtitle && lt_ticker >= TICRATE/2)
|
||||||
{
|
{
|
||||||
INT32 by = 75+32;
|
INT32 by = 80+32;
|
||||||
if (lt_ticker == TICRATE/2 || lt_exitticker == 1)
|
if (lt_ticker == TICRATE/2 || lt_exitticker == 1)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
|
@ -1008,15 +1037,15 @@ void ST_drawTitleCard(void)
|
||||||
by += 5;
|
by += 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawRightAlignedThinString((BASEVIDWIDTH+bx)/2, by, 0, bossinfo.subtitle);
|
V_DrawRightAlignedThinString((BASEVIDWIDTH+bx)/2, by, V_FORCEUPPERCASE, bossinfo.subtitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now draw the under-bar itself.
|
// Now draw the under-bar itself.
|
||||||
if (scalex > 0)
|
if (scalex > 0)
|
||||||
{
|
{
|
||||||
bx = FixedMul(bx, scalex);
|
bx = FixedMul(bx, scalex);
|
||||||
V_DrawFill((BASEVIDWIDTH-(bx+2))/2, 75+32, bx+2, 3, 31);
|
V_DrawFill((BASEVIDWIDTH-(bx+2))/2, 80+32, bx+2, 3, 31);
|
||||||
V_DrawFill((BASEVIDWIDTH-(bx))/2, 75+32+1, bx, 1, 0);
|
V_DrawFill((BASEVIDWIDTH-(bx))/2, 80+32+1, bx, 1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue