mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Introducing "antisplice" - a pair of small highlights on the Marathon bar that is based on the real time the executable has been open for and *isn't* restored with the Live Event Backup, making spliced runs basically intractable.
This commit is contained in:
parent
f06206cd5f
commit
47419ce0df
1 changed files with 14 additions and 1 deletions
15
src/screen.c
15
src/screen.c
|
@ -626,7 +626,7 @@ void SCR_ClosedCaptions(void)
|
|||
void SCR_DisplayMarathonInfo(void)
|
||||
{
|
||||
INT32 flags = V_SNAPTOBOTTOM;
|
||||
static tic_t entertic, oldentertics = 0;
|
||||
static tic_t entertic, oldentertics = 0, antisplice[2] = {48,0};
|
||||
const char *str;
|
||||
#if 0 // eh, this probably isn't going to be a problem
|
||||
if (((signed)marathontime) < 0)
|
||||
|
@ -644,6 +644,13 @@ void SCR_DisplayMarathonInfo(void)
|
|||
marathonmode &= ~MA_INIT;
|
||||
else
|
||||
marathontime += entertic - oldentertics;
|
||||
// Create a sequence of primes such that their LCM is nice and big.
|
||||
#define PRIMEV1 13
|
||||
#define PRIMEV2 17 // I can't believe it! I'm on TV!
|
||||
antisplice[0] += (entertic - oldentertics)*PRIMEV2;
|
||||
antisplice[0] %= PRIMEV1*((vid.width/vid.dupx)+1);
|
||||
antisplice[1] += (entertic - oldentertics)*PRIMEV1;
|
||||
antisplice[1] %= PRIMEV1*((vid.width/vid.dupx)+1);
|
||||
str = va("%i:%02i:%02i.%02i",
|
||||
G_TicsToHours(marathontime),
|
||||
G_TicsToMinutes(marathontime, false),
|
||||
|
@ -651,6 +658,12 @@ void SCR_DisplayMarathonInfo(void)
|
|||
G_TicsToCentiseconds(marathontime));
|
||||
oldentertics = entertic;
|
||||
}
|
||||
V_DrawFill((antisplice[0]/PRIMEV1)-1, BASEVIDHEIGHT-8, 1, 8, V_SNAPTOBOTTOM|V_SNAPTOLEFT);
|
||||
V_DrawFill((antisplice[0]/PRIMEV1), BASEVIDHEIGHT-8, 1, 8, V_SNAPTOBOTTOM|V_SNAPTOLEFT|31);
|
||||
V_DrawFill(BASEVIDWIDTH-((antisplice[1]/PRIMEV1)-1), BASEVIDHEIGHT-8, 1, 8, V_SNAPTOBOTTOM|V_SNAPTORIGHT);
|
||||
V_DrawFill(BASEVIDWIDTH-((antisplice[1]/PRIMEV1)), BASEVIDHEIGHT-8, 1, 8, V_SNAPTOBOTTOM|V_SNAPTORIGHT|31);
|
||||
#undef PRIMEV1
|
||||
#undef PRIMEV2
|
||||
V_DrawPromptBack(-8, cons_backcolor.value);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-8, flags, str);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue