diff options
Diffstat (limited to 'src/serialization.cpp')
| -rw-r--r-- | src/serialization.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/serialization.cpp b/src/serialization.cpp index 63123fe..dbf9646 100644 --- a/src/serialization.cpp +++ b/src/serialization.cpp @@ -80,11 +80,13 @@ void pke_serialize_scene(srlztn_serialize_helper *h) { pke_serialize_input_set(h, &sets[i]); } - FontTypeIndex font_type_count; - FontType *fonts = FontType_GetFonts(font_type_count); - for (FontTypeIndex_T b = 0; b < (FontTypeIndex_T)font_type_count; ++b) { + uint64_t idx_unused; + FontType *fonts = FontType_GetFonts(idx_unused); + 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->h_render; ++i) { + 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]); } } |
