summaryrefslogtreecommitdiff
path: root/src/project.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/project.cpp')
-rw-r--r--src/project.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/project.cpp b/src/project.cpp
index 62525ef..e1c3333 100644
--- a/src/project.cpp
+++ b/src/project.cpp
@@ -452,10 +452,11 @@ void PkeProject_Save(const char *filePath) {
b = pk_bkt_arr_iter_increment(bkt_arr_ent_types, &iter_ent_type);
}
- FontTypeIndex font_count;
- FontType *fonts = FontType_GetFonts(font_count);
- for (FontTypeIndex b = FontTypeIndex{0}; b < font_count; ++b) {
- FontType *ft = &fonts[(FontTypeIndex_T)b];
+ uint64_t idx_unused;
+ FontType *fonts = FontType_GetFonts(idx_unused);
+ for (uint64_t u = 0; u < PKE_FONT_MAX_FONT_TYPES; ++u) {
+ if ((idx_unused & (1llu << u)) != 0) continue;
+ FontType *ft = &fonts[(FontTypeIndex_T)u];
if (ft->title.val == nullptr) continue;
if (PK_HAS_FLAG(ft->entity_flags, ENTITY_FLAG_DO_NOT_SERIALIZE)) continue;
stream << PKE_PROJ_FILE_OBJ_FONT << std::endl;