19 lines
404 B
C
19 lines
404 B
C
#include "time.h"
|
|
#include "conf.h"
|
|
#include "stdio.h"
|
|
#include "util.h"
|
|
#include <gint/display.h>
|
|
|
|
void
|
|
time_draw(void)
|
|
{
|
|
extern int time;
|
|
const int minutes = min(99, time / TARGET_FPS / 60);
|
|
const int seconds =
|
|
(time < 100 * TARGET_FPS * 60) ? (time / TARGET_FPS % 60) : (59);
|
|
char buf[256];
|
|
|
|
sprintf(buf, "%02d : %02d", minutes, seconds);
|
|
dputs_outline(4, 2, DTEXT_LEFT, DTEXT_TOP, buf);
|
|
}
|