medfall

A super great game engine
Log | Files | Refs

commit cd05b758cdd5fa9e258a879ed78333da9dca2fbe
parent 606020eb4a4abb090db7e63717066c24c7b600c6
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Mon Apr 17 23:50:02 +0300

Use str for status text

Diffstat:
hm.cc | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hm.cc b/hm.cc @@ -417,11 +417,9 @@ extern "C" GAME_FRAME( game_frame ) { } { - char buf[ 128 ]; - snprintf( buf, sizeof( buf ), "Frame time: %.1fms FPS: %.1f %s", - dt * 1000.0f, - 1.0f / dt, + const str< 128 > status( "Frame time: {.1}ms FPS: {.1} {}", + dt * 1000.0f, 1.0f / dt, connected ? "connected!" : "connecting" ); - draw_text( buf, 2.0f, 2.0f, 16.0f ); + draw_text( status.c_str(), 2.0f, 2.0f, 16.0f ); } }