Improve naming

This commit is contained in:
2023-11-26 19:44:10 -05:00
parent 21649c4fe8
commit 30057d9687
8 changed files with 188 additions and 184 deletions

View File

@@ -82,8 +82,8 @@ namespace FontWriter {
}
const uint8_t char_id = cur_char - '!';
(*Pool::text_ptr)->page = GPU::PagePosition::create(((char_id & 0xF) << 4), ((char_id >> 4) << 4));
(*Pool::text_ptr)->color = font_color;
(*Pool::text_ptr)->tex_offset = GPU::PageOffset::create(((char_id & 0xF) << 4), ((char_id >> 4) << 4));
(*Pool::text_ptr)->color = font_color;
Pool::last_link = &Pool::last_link->concat(*Pool::text_ptr);
Pool::text_ptr++;

View File

@@ -24,7 +24,7 @@ namespace object {
GPU::TexturePageColor::$4bit).linked()),
sprite(GPU::SPRT::create(
GPU::AreaI16::create(GPU::PositionI16::create(0, 100), GPU::SizeI16::create(120, 128)),
GPU::PagePositionClut(GPU::PagePosition::create(0, 0), GPU::PageClut::create(TIM.get_clut_x(), TIM.get_clut_y())),
GPU::OffsetPageWithClut(GPU::PageOffset::create(0, 0), GPU::PageClut::create(TIM.get_clut_x(), TIM.get_clut_y())),
GPU::Color24::Blue()).linked()),
timer(),
color_idx(0) {}

View File

@@ -38,9 +38,9 @@ static constexpr const auto triangle2 = Make::POLY_FT3({
Make::Vertex(TriangleArea.size.width, TriangleArea.size.height)
},{
// Texture
Make::PagePosition(TriangleArea.position.x, TriangleArea.position.y),
Make::PagePosition(TriangleArea.size.width, TriangleArea.position.y),
Make::PagePosition(TriangleArea.size.width, TriangleArea.size.height)
Make::PageOffset(TriangleArea.position.x, TriangleArea.position.y),
Make::PageOffset(TriangleArea.size.width, TriangleArea.position.y),
Make::PageOffset(TriangleArea.size.width, TriangleArea.size.height)
}, TriangleTPage, TriangleClut, GPU::Color24::Grey()
);
static constexpr const auto triangle3 = Make::POLY_G3({
@@ -49,16 +49,16 @@ static constexpr const auto triangle3 = Make::POLY_G3({
{triangle1.vertex2.move(TriangleArea.size.width, 0), GPU::Color24::Blue()}}
);
static constexpr const auto triangle4 = Make::POLY_GT3({
{triangle2.vertex0.move(TriangleArea.size.width, 0), triangle2.page0, GPU::Color24::Red()},
{triangle2.vertex1.move(TriangleArea.size.width, 0), triangle2.page1, GPU::Color24::Blue()},
{triangle2.vertex2.move(TriangleArea.size.width, 0), triangle2.page2, GPU::Color24::Green()}},
{triangle2.vertex0.move(TriangleArea.size.width, 0), triangle2.tex_offset0, GPU::Color24::Red()},
{triangle2.vertex1.move(TriangleArea.size.width, 0), triangle2.tex_offset1, GPU::Color24::Blue()},
{triangle2.vertex2.move(TriangleArea.size.width, 0), triangle2.tex_offset2, GPU::Color24::Green()}},
TriangleTPage,
TriangleClut
);
static constexpr const auto rectangle1 = Make::POLY_F4(RectangleArea, RectangleColor);
static constexpr const auto rectangle2 = Make::POLY_FT4(Make::AreaI16(
RectangleArea.position.move(RectangleArea.size.width, 0), RectangleArea.size), Make::PagePosition(0, 0),
RectangleArea.position.move(RectangleArea.size.width, 0), RectangleArea.size), Make::PageOffset(0, 0),
RectangleTPage,
RectangleClut,
GPU::Color24::Grey()
@@ -70,7 +70,7 @@ static constexpr const auto rectangle3 = Make::POLY_G4(
GPU::Color24::Green(),
GPU::Color24::White()});
static constexpr const auto rectangle4 = Make::POLY_GT4(Make::AreaI16(
RectangleArea.position.move(RectangleArea.size.width*3, 0), RectangleArea.size), Make::PagePosition(0, 0),
RectangleArea.position.move(RectangleArea.size.width*3, 0), RectangleArea.size), Make::PageOffset(0, 0),
RectangleTPage,
RectangleClut, {
GPU::Color24::Red(),
@@ -79,7 +79,7 @@ static constexpr const auto rectangle4 = Make::POLY_GT4(Make::AreaI16(
GPU::Color24::White()}
);
static constexpr const auto rectangle5 = Make::POLY_GT4(Make::AreaI16(
RectangleArea.position.move(0, RectangleArea.size.height), RectangleArea.size), Make::PagePosition(0, 0),
RectangleArea.position.move(0, RectangleArea.size.height), RectangleArea.size), Make::PageOffset(0, 0),
RectangleTPage,
RectangleClut, {
GPU::Color24::Red(),
@@ -115,13 +115,13 @@ static constexpr const auto rect3 = Make::TILE_8(Make::PositionI16(GPU::Display:
static constexpr const auto rect4 = Make::TILE_1(Make::PositionI16(GPU::Display::Width - 1, GPU::Display::Height - 1), GPU::Color24::Red());
static constexpr const auto texpage = Make::TexPage(Make::PositionU16(320, 0), GPU::TexturePageColor::$4bit);
static constexpr const auto rect5 = Make::SPRT(Make::AreaI16(Make::PositionI16(0, GPU::Display::Height - 32), Make::SizeI16(32, 32)), {Make::PagePosition(0, 0), TriangleClut}, GPU::Color24::Green());
static constexpr const auto rect6 = Make::SPRT_16(Make::Vertex(0, GPU::Display::Height - 16), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Blue());
static constexpr const auto rect7 = Make::SPRT_8(Make::Vertex(0, GPU::Display::Height - 8), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Yellow());
static constexpr const auto rect8 = Make::SPRT_1(Make::Vertex(0, GPU::Display::Height - 1), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Red());
static constexpr const auto rect5 = Make::SPRT(Make::AreaI16(Make::PositionI16(0, GPU::Display::Height - 32), Make::SizeI16(32, 32)), {Make::PageOffset(0, 0), TriangleClut}, GPU::Color24::Green());
static constexpr const auto rect6 = Make::SPRT_16(Make::Vertex(0, GPU::Display::Height - 16), Make::OffsetPageWithClut(Make::PageOffset(0, 0), TriangleClut), GPU::Color24::Blue());
static constexpr const auto rect7 = Make::SPRT_8(Make::Vertex(0, GPU::Display::Height - 8), Make::OffsetPageWithClut(Make::PageOffset(0, 0), TriangleClut), GPU::Color24::Yellow());
static constexpr const auto rect8 = Make::SPRT_1(Make::Vertex(0, GPU::Display::Height - 1), Make::OffsetPageWithClut(Make::PageOffset(0, 0), TriangleClut), GPU::Color24::Red());
static auto rect9 = Make::SPRT(Make::AreaI16(Make::PositionI16(GPU::Display::Width/2, GPU::Display::Height/2), Make::SizeI16(32, 32)).centered(), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Grey()).linked();
static auto rect10 = Make::SPRT(Make::AreaI16(Make::PositionI16(GPU::Display::Width/2, GPU::Display::Height/2 - 32), Make::SizeI16(32, 32)).centered(), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Grey()).linked();
static auto rect9 = Make::SPRT(Make::AreaI16(Make::PositionI16(GPU::Display::Width/2, GPU::Display::Height/2), Make::SizeI16(32, 32)).centered(), Make::OffsetPageWithClut(Make::PageOffset(0, 0), TriangleClut), GPU::Color24::Grey()).linked();
static auto rect10 = Make::SPRT(Make::AreaI16(Make::PositionI16(GPU::Display::Width/2, GPU::Display::Height/2 - 32), Make::SizeI16(32, 32)).centered(), Make::OffsetPageWithClut(Make::PageOffset(0, 0), TriangleClut), GPU::Color24::Grey()).linked();
static void load_assets() {
static const CDFile Assets[] = {