mirror of https://git.sr.ht/~kikoodx/crystal-tower
36 lines
821 B
C
36 lines
821 B
C
#include "results.h"
|
|
#include "conf.h"
|
|
#include "raygint/display.h"
|
|
|
|
#ifdef GINT
|
|
void
|
|
results_draw(void)
|
|
{
|
|
extern int time, deaths;
|
|
static int disp_time = -1;
|
|
static int disp_deaths = -1;
|
|
if (disp_time == -1) {
|
|
disp_time = time;
|
|
if (disp_time >= TARGET_FPS * 60 * 100)
|
|
disp_time = TARGET_FPS * 60 * 100 - 1;
|
|
}
|
|
if (disp_deaths == -1) {
|
|
disp_deaths = deaths;
|
|
if (disp_deaths > 99)
|
|
disp_deaths = 99;
|
|
}
|
|
drect(DWIDTH / 4, 24, DWIDTH * 3 / 4, 120, C_BLACK);
|
|
dprint_opt(DWIDTH / 2, 56, C_WHITE, C_BLACK, DTEXT_CENTER, DTEXT_MIDDLE,
|
|
"time %02d:%02d", disp_time / 3600, disp_time / 60 % 60);
|
|
dprint_opt(DWIDTH / 2, 88, C_WHITE, C_BLACK, DTEXT_CENTER, DTEXT_MIDDLE,
|
|
"%d death%s", disp_deaths, (disp_deaths > 1) ? "s" : "");
|
|
}
|
|
#endif
|
|
|
|
#ifdef RAYLIB
|
|
void
|
|
results_draw(void)
|
|
{
|
|
}
|
|
#endif
|