From ef37d054dfe5812efa9eefb4b9b18621fdabac25 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Mon, 21 Apr 2025 15:46:46 -0400 Subject: pke: first-pass serializing ui and font renders --- src/game.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index f00d613..fc6318a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -162,11 +162,6 @@ void Game_Main(PKEWindowProperties windowProps, const char *executablePath) { } // TODO remove me: temp stuff for testing - pk_cstr test_text = cstring_to_pk_cstr("012\n3456789\tThe quick\r\nbrown fox jumped over the lazy dog."); - // 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("+0123456\n789\tThe quick brown fox jumped over the lazy dog."); FontTypeIndex font_type_count; FontRenderSettings fr_set; FontRenderHandle fr_1; @@ -180,12 +175,12 @@ void Game_Main(PKEWindowProperties windowProps, const char *executablePath) { fr_set.surface_area_pos.y = 1080 / 3.0; fr_set.surface_area_type_flags = FONT_RENDER_SURFACE_AREA_TYPE_FLAGS_NONE; if ((FontType_GetFonts(font_type_count)); font_type_count != FontTypeIndex{0}) { - fr_1 = FontType_AddStringRender(FontTypeIndex{0}, pk_cstr_to_pk_str(&test_text), &fr_set); + fr_1 = FontType_AddStringRender(FontTypeIndex{0}, std::move(cstring_to_pk_cstr("012\n3456789\tThe quick\r\nbrown fox jumped over the lazy dog.")), &fr_set); } if ((FontType_GetFonts(font_type_count)); font_type_count > FontTypeIndex{1}) { fr_set.surface_area_pos.y *= 2; fr_set.surface_area_size.y = 1080 - fr_set.surface_area_pos.y; - fr_2 = FontType_AddStringRender(FontTypeIndex{1}, pk_cstr_to_pk_str(&test_text2), &fr_set); + fr_2 = FontType_AddStringRender(FontTypeIndex{1}, std::move(cstring_to_pk_cstr("+0123456\n789\tThe quick brown fox jumped over the lazy dog.")), &fr_set); } // TODO remove me: temp stuff for testing -- cgit v1.2.3