Skip to content

Commit

Permalink
print time in demo widget timer in centiseconds instead of tics
Browse files Browse the repository at this point in the history
Thanks Looper and ZeroMaster010 for the suggestion.
  • Loading branch information
fabiangreffrath committed Feb 4, 2020
1 parent 1e519d4 commit b9b02a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion quickcheck
Submodule quickcheck updated 1 files
+8 −11 testrunner
6 changes: 3 additions & 3 deletions src/doom/st_stuff.c
Expand Up @@ -2376,12 +2376,12 @@ void ST_Init (void)
void ST_DrawDemoTimer (const int time)
{
char buffer[16];
const int secs = time / TICRATE;
const int mins = time / (60 * TICRATE);
const float secs = (float)(time % (60 * TICRATE)) / TICRATE;
const int w = shortnum[0]->width;
int n, x;

n = M_snprintf(buffer, sizeof(buffer), "%02i %02i %02i",
secs / 60, secs % 60, time % TICRATE);
n = M_snprintf(buffer, sizeof(buffer), "%02i %05.02f", mins, secs);

x = (viewwindowx >> crispy->hires) + (scaledviewwidth >> crispy->hires);

Expand Down

0 comments on commit b9b02a8

Please sign in to comment.