diff --git a/support/include/FontWriter/Type/types.hpp b/support/include/FontWriter/Type/types.hpp index 3cbe9439..b899f473 100644 --- a/support/include/FontWriter/Type/types.hpp +++ b/support/include/FontWriter/Type/types.hpp @@ -4,7 +4,7 @@ #include namespace JabyEngine { - using FontPrimitive = GPU::SPRT_16::Linked; + using FontPrimitive = GPU::SPRT::Linked; struct FontInfo { GPU::SizeU16 texture_size; diff --git a/support/include/FontWriter/font_writer.hpp b/support/include/FontWriter/font_writer.hpp index a71554a5..b176b076 100644 --- a/support/include/FontWriter/font_writer.hpp +++ b/support/include/FontWriter/font_writer.hpp @@ -16,8 +16,6 @@ namespace JabyEngine { GPU::PageClut clut; GPU::Link* last_primitive; - void setup(const SimpleTIM& vram_dst, const GPU::SizeI16& font_size); - public: static constexpr FontWriter empty() { FontWriter instance; @@ -30,6 +28,8 @@ namespace JabyEngine { return instance; } + void setup(const SimpleTIM& vram_dst, const GPU::SizeI16& font_size); + void setup(const SimpleTIM& vram_dst, const FontInfo& font_info) { FontWriter::setup(vram_dst, Make::SizeI16(font_info.font_size.width, font_info.font_size.height)); } diff --git a/support/src/FontWriter/src/font_writer.cpp b/support/src/FontWriter/src/font_writer.cpp index 8adcf1b4..f9be16e3 100644 --- a/support/src/FontWriter/src/font_writer.cpp +++ b/support/src/FontWriter/src/font_writer.cpp @@ -70,6 +70,7 @@ namespace JabyEngine { auto& primitive = GlobalPrimitiveFactory.new_primitive(); primitive->position = state.pos; + primitive->size = this->font_size; if(wiggle) { const auto [off_x, off_y] = (*wiggle)[(state.wiggle_count++)&0x7]; primitive->position.move(off_x, off_y); diff --git a/support/src/FontWriter/src/global_primitive_buffer.cpp b/support/src/FontWriter/src/global_primitive_buffer.cpp index 72c1d820..a8513066 100644 --- a/support/src/FontWriter/src/global_primitive_buffer.cpp +++ b/support/src/FontWriter/src/global_primitive_buffer.cpp @@ -8,7 +8,7 @@ namespace JabyEngine { const auto*const buffer_end = start + length; for(auto* cur_prim = start; cur_prim < buffer_end; cur_prim++) { - *cur_prim = FontPrimitive::create(Make::SPRT_16(Make::Vertex(), Make::OffsetPageWithClut())); + *cur_prim = FontPrimitive::create(Make::SPRT(Make::AreaI16(), Make::OffsetPageWithClut())); } GlobalPrimitiveFactory = PrimitiveFactory::create(start, length);