Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
5 changed files with 27 additions and 24 deletions
Showing only changes of commit f7ad811304 - Show all commits

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();

View File

@ -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);
}
};
}
}

View File

@ -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);
};
}

View File

@ -0,0 +1,23 @@
#pragma once
#include "Type/types.hpp"
#include <PSX/GPU/gpu_auto_load_font.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);
};
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);
};
}

View File

@ -1,5 +1,5 @@
#include "default_font_data.hpp"
#include <FontWriter/default_font.hpp>
#include <FontWriter/fonts.hpp>
#include <PSX/File/Processor/file_processor.hpp>
#include <PSX/Auxiliary/lz4_decompressor.hpp>
#include <stdio.h>