summaryrefslogtreecommitdiff
path: root/src/serialization.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialization.cpp')
-rw-r--r--src/serialization.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/serialization.cpp b/src/serialization.cpp
index 63415e0..a09a332 100644
--- a/src/serialization.cpp
+++ b/src/serialization.cpp
@@ -85,10 +85,11 @@ void pke_serialize_scene(srlztn_serialize_helper *h) {
for (FontTypeIndex_T b = 0; b < PKE_FONT_MAX_FONT_TYPES; ++b) {
if ((idx_unused & (1llu << b)) != 0) continue;
FontType *ft = &fonts[b];
- for (FontRenderIndex_T i = 0; i < (FontRenderIndex_T)ft->n_render; ++i) {
- if ((ft->unused_frs & (1llu << i)) != 0) continue;
- pke_serialize_font_render(h, &ft->renders[i]);
- }
+ pk_bkt_arr_t<FontRender>::FN_Iter iter_fn{};
+ iter_fn.func = [&h](FontRender *fr) {
+ pke_serialize_font_render(h, fr);
+ };
+ pk_bkt_arr_iterate(&ft->renders, iter_fn.invoke, &iter_fn);
}
pke_ui_box_count_T box_count;