Support BIOS Font

This commit is contained in:
2024-01-02 15:57:21 -06:00
parent a67a634fd8
commit 771257d813
5 changed files with 27 additions and 24 deletions

View File

@@ -3,7 +3,7 @@
#include <PSX/GPU/gpu_auto_load_font.hpp>
#include <PSX/GPU/make_gpu_primitives.hpp>
#include <PSX/Timer/frame_timer.hpp>
#include <FontWriter/default_font.hpp>
#include <FontWriter/fonts.hpp>
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();