39 lines
1.6 KiB
C++
39 lines
1.6 KiB
C++
#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(320, 256);
|
|
static constexpr auto CLUTLoadPos = PositionU16::create(320, 511);
|
|
|
|
static constexpr TexPage get_tex_page() {
|
|
return TexPage::create(BIOS_Font::TextureLoadPos, GPU::TexturePageColor::$4bit);
|
|
}
|
|
|
|
static constexpr TPage get_tpage() {
|
|
return TPage::create(TextureLoadPos.x, TextureLoadPos.y, SemiTransparency::B_add_F, TexturePageColor::$4bit);
|
|
}
|
|
|
|
static constexpr PageOffset get_offset_page() {
|
|
return PageOffset::create(BIOS_Font::CLUTLoadPos.x & 0x3F, BIOS_Font::CLUTLoadPos.y & 0xFF);
|
|
}
|
|
|
|
static constexpr PageClut get_page_clut() {
|
|
return PageClut::create(BIOS_Font::CLUTLoadPos);
|
|
}
|
|
|
|
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);
|
|
}
|
|
};
|
|
}
|
|
} |