diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-04-21 15:46:46 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-04-21 15:46:46 -0400 |
| commit | ef37d054dfe5812efa9eefb4b9b18621fdabac25 (patch) | |
| tree | 713042c875004da0058bf5813c4b2b736b6c4ed3 /src/game.cpp | |
| parent | a066448effaa9a56c049136067a73ba0156f65d3 (diff) | |
pke: first-pass serializing ui and font renders
Diffstat (limited to 'src/game.cpp')
| -rw-r--r-- | src/game.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
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 |
