diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-05-21 13:40:02 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-05-21 13:58:13 -0400 |
| commit | 6478cb96e5054c9146fac90bcabc4d9c780e9915 (patch) | |
| tree | 335ab93ffa98a1e6812e3963a9f4217772b34646 /src/font.cpp | |
| parent | 0c1005dae0832e52a79ae3bbb01235c8756ab8f2 (diff) | |
pke: font DynArray to pk_arr_t
Diffstat (limited to 'src/font.cpp')
| -rw-r--r-- | src/font.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/font.cpp b/src/font.cpp index 380827b..35db13f 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -1,7 +1,6 @@ #include "font.hpp" #include "asset-manager.hpp" -#include "dynamic-array.hpp" #include "pk.h" #include "window.hpp" #include "static-plane.hpp" @@ -797,8 +796,9 @@ FontRenderHandle FontType_AddStringRender(FontTypeIndex idx_ft, const pk_cstr && if (window != NULL) { // insert new characters into tmp buffer { - DynArray<uint32_t> glyph_indices; - glyph_indices.Reserve(str.length); + pk_arr_t<uint32_t> glyph_indices{}; + glyph_indices.bkt = pkeSettings.mem.bkt; + pk_arr_reserve(&glyph_indices, str.length); count = 0; for (i = 0; i < str.length;) { fgc = nullptr; @@ -829,7 +829,7 @@ FontRenderHandle FontType_AddStringRender(FontTypeIndex idx_ft, const pk_cstr && continue; } count += 1; - glyph_indices.Push(m); + pk_arr_append_t(&glyph_indices, uint32_t(m)); } // TODO specific bucket @@ -838,6 +838,7 @@ FontRenderHandle FontType_AddStringRender(FontTypeIndex idx_ft, const pk_cstr && for (i = 0; i < count; ++i) { fr->glyph_indices[i] = glyph_indices[i]; } + glyph_indices.data = nullptr; } VkDeviceSize item_count_orig = ft->bindings.instance_counter; |
