diff options
Diffstat (limited to 'src/font.hpp')
| -rw-r--r-- | src/font.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/font.hpp b/src/font.hpp index 48a7b40..494c365 100644 --- a/src/font.hpp +++ b/src/font.hpp @@ -6,6 +6,8 @@ #include "pk.h" #include <glm/vec4.hpp> +#include <ostream> +#include <istream> /* Vert: (two triangles) @@ -36,8 +38,8 @@ struct FontRender { }; struct FontType : public Entity_Base { pk_cstr title; - AssetHandle fontTextureAssetKey; - AssetHandle glyphDetailsAssetKey; + AssetHandle fontTextureAssetHandle; + AssetHandle glyphDetailsAssetHandle; VkDeviceMemory deviceMemoryVert = VK_NULL_HANDLE; VkDeviceMemory deviceMemoryTexture = VK_NULL_HANDLE; VkDeviceMemory deviceMemoryInst = VK_NULL_HANDLE; @@ -60,13 +62,12 @@ struct FontType : public Entity_Base { } bindings; }; - void FontType_Init(); void FontType_Teardown(); -// void FontType_Serialize(FontType *ft); // TODO -// void FontType_Deserialize(FontType **ft); // TODO +void FontType_Serialize(std::ofstream &stream, FontType *ft); +void FontType_Deserialize(std::ifstream &stream); FontType* FontType_GetFonts(FontTypeIndex &count); -FontTypeIndex FontType_RegisterFont(pk_cstr title, AssetKey fontTexture, AssetKey glyphs); +FontTypeIndex FontType_RegisterFont(pk_cstr title, AssetHandle fontTexture, AssetHandle glyphs); void FontType_Unload(FontTypeIndex idx); FontRender FontType_AddStringRender(FontTypeIndex idx_ft, pk_cstr cstr); void FontType_RemoveStringRender(FontRender fr); |
