Improve naming
This commit is contained in:
@@ -60,37 +60,37 @@ namespace JabyEngine {
|
||||
|
||||
struct POLY_FT3 : public internal::RenderPrimitive<POLY_FT3>, public internal::PolyCodeInterface<POLY_FT3>, public internal::LinkedElementCreator<POLY_FT3> {
|
||||
struct VertexEx {
|
||||
Vertex position;
|
||||
PagePosition page;
|
||||
Vertex position;
|
||||
PageOffset tex_offset;
|
||||
};
|
||||
static constexpr auto IdentityCode = Code(POLY_F3::IdentityCode).set(Code::Textured);
|
||||
|
||||
Color24 color; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PagePosition page0; // c
|
||||
PageClut page_clut; // c
|
||||
Vertex vertex1; // d
|
||||
PagePosition page1; // e
|
||||
TPage tpage; // e
|
||||
Vertex vertex2; // f
|
||||
PagePosition page2; // g
|
||||
uint16_t padded2; // g
|
||||
Color24 color; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PageOffset tex_offset0; // c
|
||||
PageClut page_clut; // c
|
||||
Vertex vertex1; // d
|
||||
PageOffset tex_offset1; // e
|
||||
TPage tpage; // e
|
||||
Vertex vertex2; // f
|
||||
PageOffset tex_offset2; // g
|
||||
uint16_t padded2; // g
|
||||
|
||||
static constexpr POLY_FT3 create(const Vertex (&verticies)[3], const PagePosition (&page_pos)[3], TPage tpage, PageClut clut, Color24 color = Color24::Grey()) {
|
||||
return POLY_FT3::create(
|
||||
{{verticies[0], page_pos[0]},
|
||||
{verticies[1], page_pos[1]},
|
||||
{verticies[2], page_pos[2]}
|
||||
static constexpr POLY_FT3 create(const Vertex (&verticies)[3], const PageOffset (&tex_offsets)[3], TPage tpage, PageClut clut, Color24 color = Color24::Grey()) {
|
||||
return POLY_FT3::create({
|
||||
{verticies[0], tex_offsets[0]},
|
||||
{verticies[1], tex_offsets[1]},
|
||||
{verticies[2], tex_offsets[2]}
|
||||
}, tpage, clut, color);
|
||||
}
|
||||
|
||||
static constexpr POLY_FT3 create(const VertexEx (&vertices_ex)[3], TPage tpage, PageClut clut, Color24 color) {
|
||||
return POLY_FT3 {
|
||||
.color = color, .code = IdentityCode,
|
||||
.vertex0 = vertices_ex[0].position, .page0 = vertices_ex[0].page, .page_clut = clut,
|
||||
.vertex1 = vertices_ex[1].position, .page1 = vertices_ex[1].page, .tpage = tpage,
|
||||
.vertex2 = vertices_ex[2].position, .page2 = vertices_ex[2].page};
|
||||
.vertex0 = vertices_ex[0].position, .tex_offset0 = vertices_ex[0].tex_offset, .page_clut = clut,
|
||||
.vertex1 = vertices_ex[1].position, .tex_offset1 = vertices_ex[1].tex_offset, .tpage = tpage,
|
||||
.vertex2 = vertices_ex[2].position, .tex_offset2 = vertices_ex[2].tex_offset};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -126,41 +126,41 @@ namespace JabyEngine {
|
||||
|
||||
struct POLY_GT3 : public internal::RenderPrimitive<POLY_GT3>, public internal::PolyCodeInterface<POLY_GT3>, public internal::LinkedElementCreator<POLY_GT3> {
|
||||
struct VertexEx {
|
||||
Vertex position;
|
||||
PagePosition page;
|
||||
Color24 color;
|
||||
Vertex position;
|
||||
PageOffset tex_offset;
|
||||
Color24 color;
|
||||
};
|
||||
static constexpr auto IdentityCode = Code(POLY_G3::IdentityCode).set(Code::Textured);
|
||||
|
||||
Color24 color0; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PagePosition page0; // c
|
||||
PageClut page_clut; // c
|
||||
Color24 color1; // d
|
||||
uint8_t pad1; // d
|
||||
Vertex vertex1; // e
|
||||
PagePosition page1; // f
|
||||
TPage tpage; // f
|
||||
Color24 color2; // g
|
||||
uint8_t pad2; // g
|
||||
Vertex vertex2; // h
|
||||
PagePosition page2; // i
|
||||
uint16_t pad3; // i
|
||||
Color24 color0; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PageOffset tex_offset0; // c
|
||||
PageClut page_clut; // c
|
||||
Color24 color1; // d
|
||||
uint8_t pad1; // d
|
||||
Vertex vertex1; // e
|
||||
PageOffset tex_offset1; // f
|
||||
TPage tpage; // f
|
||||
Color24 color2; // g
|
||||
uint8_t pad2; // g
|
||||
Vertex vertex2; // h
|
||||
PageOffset tex_offset2; // i
|
||||
uint16_t pad3; // i
|
||||
|
||||
static constexpr POLY_GT3 create(const Vertex (&verticies)[3], const PagePosition (&page_pos)[3], const Color24 (&color)[3], TPage tpage, PageClut clut) {
|
||||
static constexpr POLY_GT3 create(const Vertex (&verticies)[3], const PageOffset (&tex_offsets)[3], const Color24 (&color)[3], TPage tpage, PageClut clut) {
|
||||
return POLY_GT3::create({
|
||||
{verticies[0], page_pos[0], color[0]},
|
||||
{verticies[1], page_pos[1], color[1]},
|
||||
{verticies[2], page_pos[2], color[2]}
|
||||
{verticies[0], tex_offsets[0], color[0]},
|
||||
{verticies[1], tex_offsets[1], color[1]},
|
||||
{verticies[2], tex_offsets[2], color[2]}
|
||||
}, tpage, clut);
|
||||
}
|
||||
|
||||
static constexpr POLY_GT3 create(const VertexEx (&verticies_ex)[3], TPage tpage, PageClut clut) {
|
||||
return POLY_GT3 {
|
||||
.color0 = verticies_ex[0].color, .code = IdentityCode, .vertex0 = verticies_ex[0].position, .page0 = verticies_ex[0].page, .page_clut = clut,
|
||||
.color1 = verticies_ex[1].color, .pad1 = 0, .vertex1 = verticies_ex[1].position, .page1 = verticies_ex[1].page, .tpage = tpage,
|
||||
.color2 = verticies_ex[2].color, .pad2 = 0, .vertex2 = verticies_ex[2].position, .page2 = verticies_ex[2].page, .pad3 = 0
|
||||
.color0 = verticies_ex[0].color, .code = IdentityCode, .vertex0 = verticies_ex[0].position, .tex_offset0 = verticies_ex[0].tex_offset, .page_clut = clut,
|
||||
.color1 = verticies_ex[1].color, .pad1 = 0, .vertex1 = verticies_ex[1].position, .tex_offset1 = verticies_ex[1].tex_offset, .tpage = tpage,
|
||||
.color2 = verticies_ex[2].color, .pad2 = 0, .vertex2 = verticies_ex[2].position, .tex_offset2 = verticies_ex[2].tex_offset, .pad3 = 0
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -204,46 +204,46 @@ namespace JabyEngine {
|
||||
typedef POLY_FT3::VertexEx VertexEx;
|
||||
static constexpr auto IdentityCode = Code(POLY_FT3::IdentityCode).set(Code::QuadVertics);
|
||||
|
||||
Color24 color; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PagePosition page0; // c
|
||||
PageClut page_clut; // c
|
||||
Vertex vertex1; // d
|
||||
PagePosition page1; // e
|
||||
TPage tpage; // e
|
||||
Vertex vertex2; // f
|
||||
PagePosition page2; // g
|
||||
uint16_t pad2; // g
|
||||
Vertex vertex3; // h
|
||||
PagePosition page3; // i
|
||||
uint16_t pad3; // i
|
||||
Color24 color; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PageOffset tex_offset0; // c
|
||||
PageClut page_clut; // c
|
||||
Vertex vertex1; // d
|
||||
PageOffset tex_offset1; // e
|
||||
TPage tpage; // e
|
||||
Vertex vertex2; // f
|
||||
PageOffset tex_offset2; // g
|
||||
uint16_t pad2; // g
|
||||
Vertex vertex3; // h
|
||||
PageOffset tex_offset3; // i
|
||||
uint16_t pad3; // i
|
||||
|
||||
static constexpr POLY_FT4 create(const Vertex (&verticies)[4], const PagePosition (&page_pos)[4], TPage tpage, PageClut clut, Color24 color) {
|
||||
static constexpr POLY_FT4 create(const Vertex (&verticies)[4], const PageOffset (&tex_offsets)[4], TPage tpage, PageClut clut, Color24 color) {
|
||||
return POLY_FT4::create({
|
||||
{verticies[0], page_pos[0]},
|
||||
{verticies[1], page_pos[1]},
|
||||
{verticies[2], page_pos[2]},
|
||||
{verticies[3], page_pos[3]}
|
||||
{verticies[0], tex_offsets[0]},
|
||||
{verticies[1], tex_offsets[1]},
|
||||
{verticies[2], tex_offsets[2]},
|
||||
{verticies[3], tex_offsets[3]}
|
||||
}, tpage, clut, color);
|
||||
}
|
||||
|
||||
static constexpr POLY_FT4 create(const VertexEx (&vertices_ex)[4], TPage tpage, PageClut clut, Color24 color = Color24::Grey()) {
|
||||
return POLY_FT4 {
|
||||
.color = color, .code = IdentityCode,
|
||||
.vertex0 = vertices_ex[0].position, .page0 = vertices_ex[0].page, .page_clut = clut,
|
||||
.vertex1 = vertices_ex[1].position, .page1 = vertices_ex[1].page, .tpage = tpage,
|
||||
.vertex2 = vertices_ex[2].position, .page2 = vertices_ex[2].page, .pad2 = 0,
|
||||
.vertex3 = vertices_ex[3].position, .page3 = vertices_ex[3].page, .pad3 = 0
|
||||
.vertex0 = vertices_ex[0].position, .tex_offset0 = vertices_ex[0].tex_offset, .page_clut = clut,
|
||||
.vertex1 = vertices_ex[1].position, .tex_offset1 = vertices_ex[1].tex_offset, .tpage = tpage,
|
||||
.vertex2 = vertices_ex[2].position, .tex_offset2 = vertices_ex[2].tex_offset, .pad2 = 0,
|
||||
.vertex3 = vertices_ex[3].position, .tex_offset3 = vertices_ex[3].tex_offset, .pad3 = 0
|
||||
};
|
||||
}
|
||||
|
||||
static constexpr POLY_FT4 create(const AreaI16& area, const PagePosition& texture_pos, TPage tpage, PageClut clut, Color24 color) {
|
||||
static constexpr POLY_FT4 create(const AreaI16& area, const PageOffset& tex_offset, TPage tpage, PageClut clut, Color24 color) {
|
||||
return POLY_FT4::create({
|
||||
{area.position, texture_pos},
|
||||
{area.position.move(area.size.width, 0), texture_pos.move(area.size.width, 0)},
|
||||
{area.position.move(0, area.size.height), texture_pos.move(0, area.size.height)},
|
||||
{area.position.move(area.size.width, area.size.height), texture_pos.move(area.size.width, area.size.height)}
|
||||
{area.position, tex_offset},
|
||||
{area.position.move(area.size.width, 0), tex_offset.move(area.size.width, 0)},
|
||||
{area.position.move(0, area.size.height), tex_offset.move(0, area.size.height)},
|
||||
{area.position.move(area.size.width, area.size.height), tex_offset.move(area.size.width, area.size.height)}
|
||||
}, tpage, clut, color);
|
||||
}
|
||||
};
|
||||
@@ -296,51 +296,51 @@ namespace JabyEngine {
|
||||
typedef POLY_GT3::VertexEx VertexEx;
|
||||
static constexpr auto IdentityCode = Code(POLY_GT3::IdentityCode).set(Code::QuadVertics);
|
||||
|
||||
Color24 color0; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PagePosition page0; // c
|
||||
PageClut page_clut; // c
|
||||
Color24 color1; // d
|
||||
uint8_t pad1; // d
|
||||
Vertex vertex1; // e
|
||||
PagePosition page1; // f
|
||||
TPage tpage; // f
|
||||
Color24 color2; // g
|
||||
uint8_t pad2; // g
|
||||
Vertex vertex2; // h
|
||||
PagePosition page2; // i
|
||||
uint16_t pad3; // i
|
||||
Color24 color3; // j
|
||||
uint8_t pad4; // j
|
||||
Vertex vertex3; // k
|
||||
PagePosition page3; // l
|
||||
uint16_t pad5; // l
|
||||
Color24 color0; // a
|
||||
Code code; // a
|
||||
Vertex vertex0; // b
|
||||
PageOffset tex_offset0; // c
|
||||
PageClut page_clut; // c
|
||||
Color24 color1; // d
|
||||
uint8_t pad1; // d
|
||||
Vertex vertex1; // e
|
||||
PageOffset tex_offset1; // f
|
||||
TPage tpage; // f
|
||||
Color24 color2; // g
|
||||
uint8_t pad2; // g
|
||||
Vertex vertex2; // h
|
||||
PageOffset tex_offset2; // i
|
||||
uint16_t pad3; // i
|
||||
Color24 color3; // j
|
||||
uint8_t pad4; // j
|
||||
Vertex vertex3; // k
|
||||
PageOffset tex_offset3; // l
|
||||
uint16_t pad5; // l
|
||||
|
||||
static constexpr POLY_GT4 create(const Vertex (&verticies)[4], const PagePosition (&page_pos)[4], const Color24 (&color)[4], TPage tpage, PageClut clut) {
|
||||
static constexpr POLY_GT4 create(const Vertex (&verticies)[4], const PageOffset (&tex_offsets)[4], const Color24 (&color)[4], TPage tpage, PageClut clut) {
|
||||
return POLY_GT4::create({
|
||||
{verticies[0], page_pos[0], color[0]},
|
||||
{verticies[1], page_pos[1], color[1]},
|
||||
{verticies[2], page_pos[2], color[2]},
|
||||
{verticies[3], page_pos[3], color[3]},
|
||||
{verticies[0], tex_offsets[0], color[0]},
|
||||
{verticies[1], tex_offsets[1], color[1]},
|
||||
{verticies[2], tex_offsets[2], color[2]},
|
||||
{verticies[3], tex_offsets[3], color[3]},
|
||||
}, tpage, clut);
|
||||
}
|
||||
|
||||
static constexpr POLY_GT4 create(const VertexEx (&verticies_ex)[4], TPage tpage, PageClut clut) {
|
||||
return POLY_GT4 {
|
||||
.color0 = verticies_ex[0].color, .code = IdentityCode, .vertex0 = verticies_ex[0].position, .page0 = verticies_ex[0].page, .page_clut = clut,
|
||||
.color1 = verticies_ex[1].color, .pad1 = 0, .vertex1 = verticies_ex[1].position, .page1 = verticies_ex[1].page, .tpage = tpage,
|
||||
.color2 = verticies_ex[2].color, .pad2 = 0, .vertex2 = verticies_ex[2].position, .page2 = verticies_ex[2].page, .pad3 = 0,
|
||||
.color3 = verticies_ex[3].color, .pad4 = 0, .vertex3 = verticies_ex[3].position, .page3 = verticies_ex[3].page, .pad5 = 0
|
||||
.color0 = verticies_ex[0].color, .code = IdentityCode, .vertex0 = verticies_ex[0].position, .tex_offset0 = verticies_ex[0].tex_offset, .page_clut = clut,
|
||||
.color1 = verticies_ex[1].color, .pad1 = 0, .vertex1 = verticies_ex[1].position, .tex_offset1 = verticies_ex[1].tex_offset, .tpage = tpage,
|
||||
.color2 = verticies_ex[2].color, .pad2 = 0, .vertex2 = verticies_ex[2].position, .tex_offset2 = verticies_ex[2].tex_offset, .pad3 = 0,
|
||||
.color3 = verticies_ex[3].color, .pad4 = 0, .vertex3 = verticies_ex[3].position, .tex_offset3 = verticies_ex[3].tex_offset, .pad5 = 0
|
||||
};
|
||||
}
|
||||
|
||||
static constexpr POLY_GT4 create(const AreaI16& area, const PagePosition& texture_pos, TPage tpage, PageClut clut, const Color24 (&color)[4]) {
|
||||
static constexpr POLY_GT4 create(const AreaI16& area, const PageOffset& tex_offset, TPage tpage, PageClut clut, const Color24 (&color)[4]) {
|
||||
return POLY_GT4::create({
|
||||
{area.position, texture_pos, color[0]},
|
||||
{area.position.move(area.size.width, 0), texture_pos.move(area.size.width, 0), color[1]},
|
||||
{area.position.move(0, area.size.height), texture_pos.move(0, area.size.height), color[2]},
|
||||
{area.position.move(area.size.width, area.size.height), texture_pos.move(area.size.width, area.size.height), color[3]}
|
||||
{area.position, tex_offset, color[0]},
|
||||
{area.position.move(area.size.width, 0), tex_offset.move(area.size.width, 0), color[1]},
|
||||
{area.position.move(0, area.size.height), tex_offset.move(0, area.size.height), color[2]},
|
||||
{area.position.move(area.size.width, area.size.height), tex_offset.move(area.size.width, area.size.height), color[3]}
|
||||
}, tpage, clut);
|
||||
}
|
||||
};
|
||||
|
@@ -4,12 +4,12 @@
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace GPU {
|
||||
struct PagePositionClut {
|
||||
PagePosition page;
|
||||
PageClut clut;
|
||||
struct OffsetPageWithClut {
|
||||
PageOffset tex_offset;
|
||||
PageClut clut;
|
||||
|
||||
static constexpr PagePositionClut create(PagePosition page, PageClut clut) {
|
||||
return PagePositionClut{page, clut};
|
||||
static constexpr OffsetPageWithClut create(PageOffset tex_offset, PageClut clut) {
|
||||
return OffsetPageWithClut{tex_offset, clut};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -61,15 +61,15 @@ namespace JabyEngine {
|
||||
typedef RectCodeInterface<RECT_BASE_T<Size>>::Code Code;
|
||||
static constexpr auto IdentityCode = Code(RECT_BASE_F<Size>::IdentityCode).set(Code::Textured);
|
||||
|
||||
Color24 color;
|
||||
Code code;
|
||||
Vertex position;
|
||||
PagePosition page;
|
||||
PageClut clut;
|
||||
Color24 color;
|
||||
Code code;
|
||||
Vertex position;
|
||||
PageOffset tex_offset;
|
||||
PageClut clut;
|
||||
|
||||
static constexpr RECT_BASE_T create(const Vertex& position, const PagePositionClut& page, const Color24& color = Color24::Grey()) {
|
||||
static constexpr RECT_BASE_T create(const Vertex& position, const OffsetPageWithClut& tex_offset_w_clut, const Color24& color = Color24::Grey()) {
|
||||
return RECT_BASE_T {
|
||||
.color = color, .code = IdentityCode, .position = position, .page = page.page, .clut = page.clut
|
||||
.color = color, .code = IdentityCode, .position = position, .tex_offset = tex_offset_w_clut.tex_offset, .clut = tex_offset_w_clut.clut
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -86,10 +86,10 @@ namespace JabyEngine {
|
||||
|
||||
template<typename RectCode::SizeType Size>
|
||||
struct RECT_T : public RECT_BASE_T<Size>, public internal::RenderPrimitive<RECT_T<Size>>, public internal::LinkedElementCreator<RECT_T<Size>> {
|
||||
static constexpr RECT_T create(const Vertex& position, const PagePositionClut& page, const Color24& color = Color24::Grey()) {
|
||||
static constexpr RECT_T create(const Vertex& position, const OffsetPageWithClut& tex_offset_w_clut, const Color24& color = Color24::Grey()) {
|
||||
RECT_T rect;
|
||||
|
||||
static_cast<RECT_BASE_T<Size>&>(rect) = RECT_BASE_T<Size>::create(position, page, color);
|
||||
static_cast<RECT_BASE_T<Size>&>(rect) = RECT_BASE_T<Size>::create(position, tex_offset_w_clut, color);
|
||||
return rect;
|
||||
}
|
||||
};
|
||||
@@ -116,7 +116,7 @@ namespace JabyEngine {
|
||||
struct SPRT : public internal::RECT_BASE_T<internal::RectCode::SizeType::Variable>, public internal::RenderPrimitive<SPRT>, public internal::LinkedElementCreator<SPRT> {
|
||||
SizeI16 size;
|
||||
|
||||
static constexpr SPRT create(const AreaI16& area, const PagePositionClut& page, const Color24& color = Color24::Grey()) {
|
||||
static constexpr SPRT create(const AreaI16& area, const OffsetPageWithClut& page, const Color24& color = Color24::Grey()) {
|
||||
SPRT sprt;
|
||||
|
||||
static_cast<RECT_BASE_T&>(sprt) = RECT_BASE_T::create(area.position, page, color);
|
||||
|
@@ -86,11 +86,11 @@ namespace JabyEngine {
|
||||
|
||||
// ###################################################################
|
||||
|
||||
static constexpr GPU::PagePosition PagePosition() {
|
||||
return creator_template<GPU::PagePosition>(0_u8, 0_u8);
|
||||
static constexpr GPU::PageOffset PageOffset() {
|
||||
return creator_template<GPU::PageOffset>(0_u8, 0_u8);
|
||||
}
|
||||
static constexpr GPU::PagePosition PagePosition(uint8_t u, uint8_t v) {
|
||||
return creator_template<GPU::PagePosition>(u, v);
|
||||
static constexpr GPU::PageOffset PageOffset(uint8_t u, uint8_t v) {
|
||||
return creator_template<GPU::PageOffset>(u, v);
|
||||
}
|
||||
|
||||
// ###################################################################
|
||||
@@ -101,6 +101,9 @@ namespace JabyEngine {
|
||||
static constexpr GPU::PageClut PageClut(uint16_t x, uint16_t y) {
|
||||
return creator_template<GPU::PageClut>(x, y);
|
||||
}
|
||||
static constexpr GPU::PageClut PageClut(const GPU::PositionU16& clut_pos) {
|
||||
return creator_template<GPU::PageClut>(clut_pos);
|
||||
}
|
||||
|
||||
// ###################################################################
|
||||
|
||||
@@ -122,11 +125,11 @@ namespace JabyEngine {
|
||||
|
||||
// ###################################################################
|
||||
|
||||
static constexpr GPU::PagePositionClut PagePositionClut() {
|
||||
return creator_template<GPU::PagePositionClut>(PagePosition(), PageClut());
|
||||
static constexpr GPU::OffsetPageWithClut OffsetPageWithClut() {
|
||||
return creator_template<GPU::OffsetPageWithClut>(PageOffset(), PageClut());
|
||||
}
|
||||
static constexpr GPU::PagePositionClut PagePositionClut(GPU::PagePosition page, GPU::PageClut clut) {
|
||||
return creator_template<GPU::PagePositionClut>(page, clut);
|
||||
static constexpr GPU::OffsetPageWithClut OffsetPageWithClut(GPU::PageOffset tex_offset, GPU::PageClut clut) {
|
||||
return creator_template<GPU::OffsetPageWithClut>(tex_offset, clut);
|
||||
}
|
||||
|
||||
// ###################################################################
|
||||
@@ -175,8 +178,8 @@ namespace JabyEngine {
|
||||
return creator_template<GPU::POLY_F3>(verticies, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_FT3 POLY_FT3(const GPU::Vertex (&verticies)[3], const GPU::PagePosition (&page_pos)[3], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::POLY_FT3>(verticies, page_pos, tpage, clut, color);
|
||||
static constexpr GPU::POLY_FT3 POLY_FT3(const GPU::Vertex (&verticies)[3], const GPU::PageOffset (&tex_offset)[3], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::POLY_FT3>(verticies, tex_offset, tpage, clut, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_FT3 POLY_FT3(const GPU::POLY_FT3::VertexEx (&vertices_ex)[3], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) {
|
||||
@@ -191,8 +194,8 @@ namespace JabyEngine {
|
||||
return creator_template<GPU::POLY_G3>(verticies_ex);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_GT3 POLY_GT3(const GPU::Vertex (&verticies)[3], const GPU::PagePosition (&page_pos)[3], const GPU::Color24 (&color)[3], GPU::TPage tpage, GPU::PageClut clut) {
|
||||
return creator_template<GPU::POLY_GT3>(verticies, page_pos, color, tpage, clut);
|
||||
static constexpr GPU::POLY_GT3 POLY_GT3(const GPU::Vertex (&verticies)[3], const GPU::PageOffset (&tex_offset)[3], const GPU::Color24 (&color)[3], GPU::TPage tpage, GPU::PageClut clut) {
|
||||
return creator_template<GPU::POLY_GT3>(verticies, tex_offset, color, tpage, clut);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_GT3 POLY_GT3(const GPU::POLY_GT3::VertexEx (&verticies_ex)[3], GPU::TPage tpage, GPU::PageClut clut) {
|
||||
@@ -207,16 +210,16 @@ namespace JabyEngine {
|
||||
return creator_template<GPU::POLY_F4>(area, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::Vertex (&verticies)[4], const GPU::PagePosition (&page_pos)[4], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) {
|
||||
return creator_template<GPU::POLY_FT4>(verticies, page_pos, tpage, clut, color);
|
||||
static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::Vertex (&verticies)[4], const GPU::PageOffset (&tex_offset)[4], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) {
|
||||
return creator_template<GPU::POLY_FT4>(verticies, tex_offset, tpage, clut, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::POLY_FT4::VertexEx (&vertices_ex)[4], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::POLY_FT4>(vertices_ex, tpage, clut, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::AreaI16& area, const GPU::PagePosition& texture_pos, GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) {
|
||||
return creator_template<GPU::POLY_FT4>(area, texture_pos, tpage, clut, color);
|
||||
static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::AreaI16& area, const GPU::PageOffset& tex_offset, GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) {
|
||||
return creator_template<GPU::POLY_FT4>(area, tex_offset, tpage, clut, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_G4 POLY_G4(const GPU::Vertex (&verticies)[4], const GPU::Color24 (&color)[4]) {
|
||||
@@ -231,16 +234,16 @@ namespace JabyEngine {
|
||||
return creator_template<GPU::POLY_G4>(area, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::Vertex (&verticies)[4], const GPU::PagePosition (&page_pos)[4], const GPU::Color24 (&color)[4], GPU::TPage tpage, GPU::PageClut clut) {
|
||||
return creator_template<GPU::POLY_GT4>(verticies, page_pos, color, tpage, clut);
|
||||
static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::Vertex (&verticies)[4], const GPU::PageOffset (&tex_offset)[4], const GPU::Color24 (&color)[4], GPU::TPage tpage, GPU::PageClut clut) {
|
||||
return creator_template<GPU::POLY_GT4>(verticies, tex_offset, color, tpage, clut);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::POLY_GT4::VertexEx (&verticies_ex)[4], GPU::TPage tpage, GPU::PageClut clut) {
|
||||
return creator_template<GPU::POLY_GT4>(verticies_ex, tpage, clut);
|
||||
}
|
||||
|
||||
static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::AreaI16& area, const GPU::PagePosition& texture_pos, GPU::TPage tpage, GPU::PageClut clut, const GPU::Color24 (&color)[4]) {
|
||||
return creator_template<GPU::POLY_GT4>(area, texture_pos, tpage, clut, color);
|
||||
static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::AreaI16& area, const GPU::PageOffset& tex_offset, GPU::TPage tpage, GPU::PageClut clut, const GPU::Color24 (&color)[4]) {
|
||||
return creator_template<GPU::POLY_GT4>(area, tex_offset, tpage, clut, color);
|
||||
}
|
||||
|
||||
// ###################################################################
|
||||
@@ -280,35 +283,35 @@ namespace JabyEngine {
|
||||
// ###################################################################
|
||||
|
||||
static constexpr GPU::SPRT_1 SPRT_1() {
|
||||
return creator_template<GPU::SPRT_1>(Vertex(), PagePositionClut(), GPU::Color24::Black());
|
||||
return creator_template<GPU::SPRT_1>(Vertex(), OffsetPageWithClut(), GPU::Color24::Black());
|
||||
}
|
||||
|
||||
static constexpr GPU::SPRT_1 SPRT_1(const GPU::Vertex& position, const GPU::PagePositionClut& page, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT_1>(position, page, color);
|
||||
static constexpr GPU::SPRT_1 SPRT_1(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT_1>(position, tex_offset_w_clut, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::SPRT_8 SPRT_8() {
|
||||
return creator_template<GPU::SPRT_8>(Vertex(), PagePositionClut(), GPU::Color24::Black());
|
||||
return creator_template<GPU::SPRT_8>(Vertex(), OffsetPageWithClut(), GPU::Color24::Black());
|
||||
}
|
||||
|
||||
static constexpr GPU::SPRT_8 SPRT_8(const GPU::Vertex& position, const GPU::PagePositionClut& page, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT_8>(position, page, color);
|
||||
static constexpr GPU::SPRT_8 SPRT_8(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT_8>(position, tex_offset_w_clut, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::SPRT_16 SPRT_16() {
|
||||
return creator_template<GPU::SPRT_16>(Vertex(), PagePositionClut(), GPU::Color24::Black());
|
||||
return creator_template<GPU::SPRT_16>(Vertex(), OffsetPageWithClut(), GPU::Color24::Black());
|
||||
}
|
||||
|
||||
static constexpr GPU::SPRT_16 SPRT_16(const GPU::Vertex& position, const GPU::PagePositionClut& page, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT_16>(position, page, color);
|
||||
static constexpr GPU::SPRT_16 SPRT_16(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT_16>(position, tex_offset_w_clut, color);
|
||||
}
|
||||
|
||||
static constexpr GPU::SPRT SPRT() {
|
||||
return creator_template<GPU::SPRT>(AreaI16(), PagePositionClut(), GPU::Color24::Black());
|
||||
return creator_template<GPU::SPRT>(AreaI16(), OffsetPageWithClut(), GPU::Color24::Black());
|
||||
}
|
||||
|
||||
static constexpr GPU::SPRT SPRT(const GPU::AreaI16& area, const GPU::PagePositionClut& page, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT>(area, page, color);
|
||||
static constexpr GPU::SPRT SPRT(const GPU::AreaI16& area, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) {
|
||||
return creator_template<GPU::SPRT>(area, tex_offset_w_clut, color);
|
||||
}
|
||||
}
|
||||
}
|
@@ -175,7 +175,7 @@ namespace JabyEngine {
|
||||
};
|
||||
|
||||
// Type used for primitives
|
||||
struct PagePosition : public internal::XYMovement<PagePosition, uint8_t> {
|
||||
struct PageOffset : public internal::XYMovement<PageOffset, uint8_t> {
|
||||
union {
|
||||
uint8_t x;
|
||||
uint8_t u;
|
||||
@@ -186,8 +186,8 @@ namespace JabyEngine {
|
||||
uint8_t v;
|
||||
};
|
||||
|
||||
static constexpr PagePosition create(uint8_t u, uint8_t v) {
|
||||
return PagePosition{.x = u, .y = v}; //< Activate x and y to use XYMovement during constexpr
|
||||
static constexpr PageOffset create(uint8_t u, uint8_t v) {
|
||||
return PageOffset{.x = u, .y = v}; //< Activate x and y to use XYMovement during constexpr
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user