Clean up code slightly

This commit is contained in:
2023-12-19 16:26:04 -05:00
parent f0f294ec07
commit 746a2577c0
5 changed files with 200 additions and 151 deletions

View File

@@ -0,0 +1,23 @@
#pragma once
#include "gpu_primitives.hpp"
namespace JabyEngine {
namespace GPU {
struct BIOS_Font {
// This size is by Hardware limitation
static constexpr auto Size = SizeU16::create(16, 16);
// The following two values can be easily changed
static constexpr auto TextureLoadPos = PositionU16::create(0, 0);
static constexpr auto CLUTLoadPos = PositionU16::create(0, 0);
static constexpr TexPage get_tex_page() {
return TexPage::create(BIOS_Font::TextureLoadPos, GPU::TexturePageColor::$4bit);
}
static constexpr OffsetPageWithClut get_offset_page_with_clut() {
return OffsetPageWithClut::create(PageOffset::create(BIOS_Font::CLUTLoadPos.x & 0x3F, BIOS_Font::CLUTLoadPos.y & 0xFF), PageClut::create(BIOS_Font::CLUTLoadPos));
}
};
}
}