From 9aa1204378c451923b2fb2f0363579e4ce59c23a Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Wed, 19 Feb 2025 17:24:23 -0500 Subject: pke: first-pass unregister string render + cleanup --- src/game.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index f3e52ce..f34edca 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -613,9 +613,10 @@ void Game_Main(PKEWindowProperties windowProps, const char *executablePath) { pk_cstr test_text = cstring_to_pk_cstr("%+-*0123456789$"); // pk_cstr test_text = cstring_to_pk_cstr("$#"); // pk_cstr test_text = cstring_to_pk_cstr("$"); + pk_cstr test_text2 = cstring_to_pk_cstr("+0123456789 The quick brown fox jumped over the lazy dog."); FontTypeIndex font_type_count; FontRenderSettings fr_set; - fr_set.char_scale = 64.0; + fr_set.char_scale = 9 * 7.0; fr_set.line_height_scale = 1.0; fr_set.char_spacing_scale = 1.0; fr_set.surface_area_size.x = 1; @@ -626,6 +627,10 @@ void Game_Main(PKEWindowProperties windowProps, const char *executablePath) { if ((FontType_GetFonts(font_type_count)); font_type_count != FontTypeIndex{0}) { FontType_AddStringRender(FontTypeIndex{0}, pk_cstr_to_pk_str(&test_text), &fr_set); } + if ((FontType_GetFonts(font_type_count)); font_type_count > FontTypeIndex{1}) { + fr_set.surface_area_pos.y *= 2; + FontType_AddStringRender(FontTypeIndex{1}, pk_cstr_to_pk_str(&test_text2), &fr_set); + } GameTimePoint lastTimePoint = pkeSettings.steadyClock.now(); double deltaTillNextRender = pkeSettings.deltaPerFrame; -- cgit v1.2.3