From 1796d75c20538609771f3f9605e70823598daa49 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Thu, 19 Jan 2023 14:33:45 +0100 Subject: [PATCH] Made the framerate counter show 100ths of a second --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 22f0eb4..fb278dd 100644 --- a/main.c +++ b/main.c @@ -47,7 +47,8 @@ int main(int argc, const char *argv[]) display_start(); - FntPrint(-1, "Time: %d, frame: %d, delta time: %3d, fps: %d\n", (time_getRealTime() * 1000) >> 12, time_getFrameNumber(), time_getDeltaTime(), (time_getFrameRate() + 128) >> 8); + u_short fps = time_getFrameRate(); + FntPrint(-1, "Time: %d, frame: %d, delta time: %3d, fps: %d.%02d\n", (time_getRealTime() * 1000) >> 12, time_getFrameNumber(), time_getDeltaTime(), fps >> 8, ((fps & 0xFF) * 100) >> 8); FntPrint(-1, "Camera pos: (%d, %d, %d) rot: (%d, %d, %d) leaf: %d\n", cam_pos.vx, cam_pos.vy, cam_pos.vz, cam_rot.vx, cam_rot.vy, cam_rot.vz, cam_leaf); // Draw stuff