diff --git a/examples/PoolBox/application/src/font_writer.cpp b/examples/PoolBox/application/src/font_writer.cpp index ee791b3d..77ca0faf 100644 --- a/examples/PoolBox/application/src/font_writer.cpp +++ b/examples/PoolBox/application/src/font_writer.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include using JabyEngine::Make::PositionI8; @@ -21,10 +21,7 @@ void font_writer_setup() { JabyEngine::GlobalFontPrimitivePool::setup(font_buffer); new_font_writer.setup(LibraryFontTIM, JabyEngine::DefaultFont::Info); - bios_font_writer.setup(JabyEngine::GPU::BIOS_Font::as_simple_tim(), { - .texture_size = {64, 80}, - .font_size = {16, 16} - }); + bios_font_writer.setup(JabyEngine::BIOSFont::TIM, JabyEngine::BIOSFont::Info); timer.reset(); } @@ -34,7 +31,7 @@ void font_writer_update() { auto state = JabyEngine::State::create(JabyEngine::Make::PositionI16(8, 8), wiggle_count); new_font_writer.write(state, "012345 ABCDEFGHIJKL\nabcedfghijkl\n", JabyEngine::GPU::Color24::Blue(), &wiggle); new_font_writer.write(state, "%i (0x%p)\nWiggle (%s)\n", JabyEngine::GPU::Color24::Green(), &wiggle, wiggle_count, 0xAABBCCDD, Text[wiggle_count&0x1]); - bios_font_writer.write(state, "!!PLANSCHBECKEN!!"); + bios_font_writer.write(state, "!!PLANSCHBECKEN!!", JabyEngine::GPU::Color24::White()); if(timer.is_expired_for(50_ms)) { timer.reset(); diff --git a/include/PSX/GPU/gpu_auto_load_font.hpp b/include/PSX/GPU/gpu_auto_load_font.hpp index 02473d94..1ac3e5c7 100644 --- a/include/PSX/GPU/gpu_auto_load_font.hpp +++ b/include/PSX/GPU/gpu_auto_load_font.hpp @@ -30,10 +30,6 @@ namespace JabyEngine { static constexpr OffsetPageWithClut get_offset_page_with_clut() { return OffsetPageWithClut::create(BIOS_Font::get_offset_page(), BIOS_Font::get_page_clut()); } - - static constexpr SimpleTIM as_simple_tim() { - return SimpleTIM(BIOS_Font::TextureLoadPos.x, BIOS_Font::TextureLoadPos.y, BIOS_Font::CLUTLoadPos.x, BIOS_Font::CLUTLoadPos.y); - } }; } } \ No newline at end of file diff --git a/support/include/FontWriter/default_font.hpp b/support/include/FontWriter/default_font.hpp deleted file mode 100644 index 90771ada..00000000 --- a/support/include/FontWriter/default_font.hpp +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -#include "Type/types.hpp" - -namespace JabyEngine { - struct DefaultFont { - static constexpr auto Info = FontInfo { - .texture_size = {64, 80}, - .font_size = {12, 16} - }; - - static void load(uint32_t* work_area, SimpleTIM vram_dst); - }; -} \ No newline at end of file diff --git a/support/include/FontWriter/fonts.hpp b/support/include/FontWriter/fonts.hpp new file mode 100644 index 00000000..63dd9335 --- /dev/null +++ b/support/include/FontWriter/fonts.hpp @@ -0,0 +1,23 @@ +#pragma once +#include "Type/types.hpp" +#include + +namespace JabyEngine { + struct DefaultFont { + static constexpr auto Info = FontInfo { + .texture_size = {64, 80}, + .font_size = {12, 16} + }; + + static void load(uint32_t* work_area, SimpleTIM vram_dst); + }; + + struct BIOSFont { + static constexpr auto Info = FontInfo { + .texture_size = {64, 96}, + .font_size = {16, 16} + }; + + static constexpr auto TIM = SimpleTIM(JabyEngine::GPU::BIOS_Font::TextureLoadPos.x, JabyEngine::GPU::BIOS_Font::TextureLoadPos.y, JabyEngine::GPU::BIOS_Font::CLUTLoadPos.x, JabyEngine::GPU::BIOS_Font::CLUTLoadPos.y); + }; +} \ No newline at end of file diff --git a/support/src/FontWriter/src/default_font.cpp b/support/src/FontWriter/src/default_font.cpp index 12eac516..08a5169c 100644 --- a/support/src/FontWriter/src/default_font.cpp +++ b/support/src/FontWriter/src/default_font.cpp @@ -1,5 +1,5 @@ #include "default_font_data.hpp" -#include +#include #include #include #include