Integrate all the progress into master #6
|
@ -26,13 +26,13 @@ static constexpr auto RectangleClut = GPU::PageClut(320, 510);
|
|||
|
||||
static constexpr auto LineColor = GPU::Color24(0xFF, 0x0, 0x0);
|
||||
|
||||
static constexpr const auto triangle1 = GPU::POLY_F3({
|
||||
static constexpr const auto triangle1 = GPU::POLY_F3::create({
|
||||
{TriangleArea.position.x, TriangleArea.position.y},
|
||||
{TriangleArea.size.width, TriangleArea.size.height},
|
||||
{TriangleArea.position.x, TriangleArea.size.height}},
|
||||
TriangleColor
|
||||
);
|
||||
static constexpr const auto triangle2 = GPU::POLY_FT3({
|
||||
static constexpr const auto triangle2 = GPU::POLY_FT3::create({
|
||||
{TriangleArea.position.x, TriangleArea.position.y},
|
||||
{TriangleArea.size.width, TriangleArea.position.y},
|
||||
{TriangleArea.size.width, TriangleArea.size.height}},{
|
||||
|
@ -44,12 +44,12 @@ static constexpr const auto triangle2 = GPU::POLY_FT3({
|
|||
TriangleClut,
|
||||
GPU::Color24::Grey()
|
||||
);
|
||||
static constexpr const auto triangle3 = GPU::POLY_G3({
|
||||
static constexpr const auto triangle3 = GPU::POLY_G3::create({
|
||||
{triangle1.vertex0.move(TriangleArea.size.width, 0), GPU::Color24::Red()},
|
||||
{triangle1.vertex1.move(TriangleArea.size.width, 0), GPU::Color24::Green()},
|
||||
{triangle1.vertex2.move(TriangleArea.size.width, 0), GPU::Color24::Blue()}}
|
||||
);
|
||||
static constexpr const auto triangle4 = GPU::POLY_GT3({
|
||||
static constexpr const auto triangle4 = GPU::POLY_GT3::create({
|
||||
{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()}},
|
||||
|
@ -57,20 +57,20 @@ static constexpr const auto triangle4 = GPU::POLY_GT3({
|
|||
TriangleClut
|
||||
);
|
||||
|
||||
static constexpr const auto rectangle1 = GPU::POLY_F4(RectangleArea, RectangleColor);
|
||||
static constexpr const auto rectangle2 = GPU::POLY_FT4({
|
||||
static constexpr const auto rectangle1 = GPU::POLY_F4::create(RectangleArea, RectangleColor);
|
||||
static constexpr const auto rectangle2 = GPU::POLY_FT4::create({
|
||||
RectangleArea.position.move(RectangleArea.size.width, 0), RectangleArea.size}, {0, 0},
|
||||
RectangleTPage,
|
||||
RectangleClut,
|
||||
GPU::Color24::Grey()
|
||||
);
|
||||
static constexpr const auto rectangle3 = GPU::POLY_G4(
|
||||
static constexpr const auto rectangle3 = GPU::POLY_G4::create(
|
||||
{RectangleArea.position.move(RectangleArea.size.width*2, 0), RectangleArea.size}, {
|
||||
GPU::Color24::Red(),
|
||||
GPU::Color24::Blue(),
|
||||
GPU::Color24::Green(),
|
||||
GPU::Color24::White()});
|
||||
static constexpr const auto rectangle4 = GPU::POLY_GT4(
|
||||
static constexpr const auto rectangle4 = GPU::POLY_GT4::create(
|
||||
{RectangleArea.position.move(RectangleArea.size.width*3, 0), RectangleArea.size}, {0, 0},
|
||||
RectangleTPage,
|
||||
RectangleClut, {
|
||||
|
@ -79,7 +79,7 @@ static constexpr const auto rectangle4 = GPU::POLY_GT4(
|
|||
GPU::Color24::Green(),
|
||||
GPU::Color24::White()}
|
||||
);
|
||||
static constexpr const auto rectangle5 = GPU::POLY_GT4(
|
||||
static constexpr const auto rectangle5 = GPU::POLY_GT4::create(
|
||||
{RectangleArea.position.move(0, RectangleArea.size.height), RectangleArea.size}, {0, 0},
|
||||
RectangleTPage,
|
||||
RectangleClut, {
|
||||
|
|
|
@ -49,12 +49,13 @@ namespace JabyEngine {
|
|||
Vertex vertex1; // c
|
||||
Vertex vertex2; // d
|
||||
|
||||
constexpr POLY_F3() = default;
|
||||
constexpr POLY_F3(const Vertex (&verticies)[3], Color24 color) :
|
||||
color(color), code(IdentityCode),
|
||||
vertex0(verticies[0]),
|
||||
vertex1(verticies[1]),
|
||||
vertex2(verticies[2]) {
|
||||
static constexpr POLY_F3 create(const Vertex (&verticies)[3], Color24 color) {
|
||||
return POLY_F3 {
|
||||
.color = color, .code = IdentityCode,
|
||||
.vertex0 = verticies[0],
|
||||
.vertex1 = verticies[1],
|
||||
.vertex2 = verticies[2]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -77,16 +78,21 @@ namespace JabyEngine {
|
|||
PagePosition page2; // g
|
||||
uint16_t padded2; // g
|
||||
|
||||
constexpr POLY_FT3() = default;
|
||||
constexpr POLY_FT3(const Vertex (&verticies)[3], const PagePosition (&page_pos)[3], TPage tpage, PageClut clut, Color24 color = Color24::Grey()) : POLY_FT3({
|
||||
{verticies[0], page_pos[0]},
|
||||
{verticies[1], page_pos[1]},
|
||||
{verticies[2], page_pos[2]}}, tpage, clut, color) {}
|
||||
constexpr POLY_FT3(const VertexEx (&vertices_ex)[3], TPage tpage, PageClut clut, Color24 color) :
|
||||
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), padded2(0) {}
|
||||
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]}
|
||||
}, 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};
|
||||
}
|
||||
};
|
||||
|
||||
struct POLY_G3 : public internal::RenderPrimitive<POLY_G3>, public internal::PolyCodeInterface<POLY_G3>, public internal::LinkedElementCreator<POLY_G3> {
|
||||
|
@ -102,15 +108,21 @@ namespace JabyEngine {
|
|||
uint8_t pad2; // e
|
||||
Vertex vertex2; // f
|
||||
|
||||
constexpr POLY_G3() = default;
|
||||
constexpr POLY_G3(const Vertex (&verticies)[3], const Color24 (&color)[3]) : POLY_G3({
|
||||
{verticies[0], color[0]},
|
||||
{verticies[1], color[1]},
|
||||
{verticies[2], color[2]}}) {}
|
||||
constexpr POLY_G3(const VertexColor (&verticies_ex)[3]) :
|
||||
color0(verticies_ex[0].color), code(IdentityCode), vertex0(verticies_ex[0].position),
|
||||
color1(verticies_ex[1].color), pad1(0), vertex1(verticies_ex[1].position),
|
||||
color2(verticies_ex[2].color), pad2(0), vertex2(verticies_ex[2].position) {}
|
||||
static constexpr POLY_G3 create(const Vertex (&verticies)[3], const Color24 (&color)[3]) {
|
||||
return POLY_G3::create({
|
||||
{verticies[0], color[0]},
|
||||
{verticies[1], color[1]},
|
||||
{verticies[2], color[2]}
|
||||
});
|
||||
}
|
||||
|
||||
static constexpr POLY_G3 create(const VertexColor (&verticies_ex)[3]) {
|
||||
return POLY_G3 {
|
||||
.color0 = verticies_ex[0].color, .code = IdentityCode, .vertex0 = verticies_ex[0].position,
|
||||
.color1 = verticies_ex[1].color, .pad1 = 0, .vertex1 = verticies_ex[1].position,
|
||||
.color2 = verticies_ex[2].color, .pad2 = 0, .vertex2 = verticies_ex[2].position
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
struct POLY_GT3 : public internal::RenderPrimitive<POLY_GT3>, public internal::PolyCodeInterface<POLY_GT3>, public internal::LinkedElementCreator<POLY_GT3> {
|
||||
|
@ -137,15 +149,21 @@ namespace JabyEngine {
|
|||
PagePosition page2; // i
|
||||
uint16_t pad3; // i
|
||||
|
||||
constexpr POLY_GT3() = default;
|
||||
constexpr POLY_GT3(const Vertex (&verticies)[3], const PagePosition (&page_pos)[3], const Color24 (&color)[3], TPage tpage, PageClut clut) : POLY_GT3({
|
||||
{verticies[0], page_pos[0], color[0]},
|
||||
{verticies[1], page_pos[1], color[1]},
|
||||
{verticies[2], page_pos[2], color[2]}}, tpage, clut) {}
|
||||
constexpr POLY_GT3(const VertexEx (&verticies_ex)[3], TPage tpage, PageClut clut) :
|
||||
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) {}
|
||||
static constexpr POLY_GT3 create(const Vertex (&verticies)[3], const PagePosition (&page_pos)[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]}
|
||||
}, 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
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -163,19 +181,24 @@ namespace JabyEngine {
|
|||
Vertex vertex2; // d
|
||||
Vertex vertex3; // e
|
||||
|
||||
constexpr POLY_F4() = default;
|
||||
constexpr POLY_F4(const Vertex (&verticies)[4], Color24 color) :
|
||||
color(color), code(IdentityCode),
|
||||
vertex0(verticies[0]),
|
||||
vertex1(verticies[1]),
|
||||
vertex2(verticies[2]),
|
||||
vertex3(verticies[3]) {}
|
||||
constexpr POLY_F4(const AreaI16& area, Color24 color) : POLY_F4({
|
||||
area.position,
|
||||
area.position.move(area.size.width, 0),
|
||||
area.position.move(0, area.size.height),
|
||||
area.position.move(area.size.width, area.size.height)},
|
||||
color) {}
|
||||
static constexpr POLY_F4 create(const Vertex (&verticies)[4], Color24 color) {
|
||||
return POLY_F4 {
|
||||
.color = color, .code = IdentityCode,
|
||||
.vertex0 = verticies[0],
|
||||
.vertex1 = verticies[1],
|
||||
.vertex2 = verticies[2],
|
||||
.vertex3 = verticies[3]
|
||||
};
|
||||
}
|
||||
|
||||
static constexpr POLY_F4 create(const AreaI16& area, Color24 color) {
|
||||
return POLY_F4::create({
|
||||
area.position,
|
||||
area.position.move(area.size.width, 0),
|
||||
area.position.move(0, area.size.height),
|
||||
area.position.move(area.size.width, area.size.height)
|
||||
}, color);
|
||||
}
|
||||
};
|
||||
|
||||
struct POLY_FT4 : public internal::RenderPrimitive<POLY_FT4>, public internal::PolyCodeInterface<POLY_FT4>, public internal::LinkedElementCreator<POLY_FT4> {
|
||||
|
@ -197,25 +220,33 @@ namespace JabyEngine {
|
|||
PagePosition page3; // i
|
||||
uint16_t pad3; // i
|
||||
|
||||
constexpr POLY_FT4() = default;
|
||||
constexpr POLY_FT4(const Vertex (&verticies)[4], const PagePosition (&page_pos)[4], TPage tpage, PageClut clut, Color24 color) : POLY_FT4({
|
||||
{verticies[0], page_pos[0]},
|
||||
{verticies[1], page_pos[1]},
|
||||
{verticies[2], page_pos[2]},
|
||||
{verticies[3], page_pos[3]}}, tpage, clut, color) {}
|
||||
constexpr POLY_FT4(const VertexEx (&vertices_ex)[4], TPage tpage, PageClut clut, Color24 color = Color24::Grey()) :
|
||||
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) {}
|
||||
constexpr POLY_FT4(const AreaI16& area, const PagePosition& texture_pos, TPage tpage, PageClut clut, Color24 color) : POLY_FT4({
|
||||
{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)}},
|
||||
tpage, clut, color
|
||||
) {}
|
||||
static constexpr POLY_FT4 create(const Vertex (&verticies)[4], const PagePosition (&page_pos)[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]}
|
||||
}, 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
|
||||
};
|
||||
}
|
||||
|
||||
static constexpr POLY_FT4 create(const AreaI16& area, const PagePosition& texture_pos, 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)}
|
||||
}, tpage, clut, color);
|
||||
}
|
||||
};
|
||||
|
||||
struct POLY_G4 : public internal::RenderPrimitive<POLY_G4>, public internal::PolyCodeInterface<POLY_G4>, public internal::LinkedElementCreator<POLY_G4> {
|
||||
|
@ -234,24 +265,32 @@ namespace JabyEngine {
|
|||
uint8_t pad3; // g
|
||||
Vertex vertex3; // h
|
||||
|
||||
constexpr POLY_G4() = default;
|
||||
constexpr POLY_G4(const Vertex (&verticies)[4], const Color24 (&color)[4]) : POLY_G4({
|
||||
{verticies[0], color[0]},
|
||||
{verticies[1], color[1]},
|
||||
{verticies[2], color[2]},
|
||||
{verticies[3], color[3]}
|
||||
}) {}
|
||||
constexpr POLY_G4(const VertexColor (&verticies_ex)[4]) :
|
||||
color0(verticies_ex[0].color), code(IdentityCode), vertex0(verticies_ex[0].position),
|
||||
color1(verticies_ex[1].color), pad1(0), vertex1(verticies_ex[1].position),
|
||||
color2(verticies_ex[2].color), pad2(0), vertex2(verticies_ex[2].position),
|
||||
color3(verticies_ex[3].color), pad3(0), vertex3(verticies_ex[3].position) {}
|
||||
constexpr POLY_G4(const AreaI16& area, const Color24 (&color)[4]) : POLY_G4({
|
||||
{area.position, color[0]},
|
||||
{area.position.move(area.size.width, 0), color[1]},
|
||||
{area.position.move(0, area.size.height), color[2]},
|
||||
{area.position.move(area.size.width, area.size.height), color[3]}}
|
||||
) {}
|
||||
static constexpr POLY_G4 create(const Vertex (&verticies)[4], const Color24 (&color)[4]) {
|
||||
return POLY_G4::create({
|
||||
{verticies[0], color[0]},
|
||||
{verticies[1], color[1]},
|
||||
{verticies[2], color[2]},
|
||||
{verticies[3], color[3]}
|
||||
});
|
||||
}
|
||||
|
||||
static constexpr POLY_G4 create(const VertexColor (&verticies_ex)[4]) {
|
||||
return POLY_G4 {
|
||||
.color0 = verticies_ex[0].color, .code = IdentityCode, .vertex0 = verticies_ex[0].position,
|
||||
.color1 = verticies_ex[1].color, .pad1 = 0, .vertex1 = verticies_ex[1].position,
|
||||
.color2 = verticies_ex[2].color, .pad2 = 0, .vertex2 = verticies_ex[2].position,
|
||||
.color3 = verticies_ex[3].color, .pad3 = 0, .vertex3 = verticies_ex[3].position
|
||||
};
|
||||
}
|
||||
|
||||
static constexpr POLY_G4 create(const AreaI16& area, const Color24 (&color)[4]) {
|
||||
return POLY_G4::create({
|
||||
{area.position, color[0]},
|
||||
{area.position.move(area.size.width, 0), color[1]},
|
||||
{area.position.move(0, area.size.height), color[2]},
|
||||
{area.position.move(area.size.width, area.size.height), color[3]}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
struct POLY_GT4 : public internal::RenderPrimitive<POLY_GT4>, public internal::PolyCodeInterface<POLY_GT4>, public internal::LinkedElementCreator<POLY_GT4> {
|
||||
|
@ -279,24 +318,32 @@ namespace JabyEngine {
|
|||
PagePosition page3; // l
|
||||
uint16_t pad5; // l
|
||||
|
||||
constexpr POLY_GT4() = default;
|
||||
constexpr POLY_GT4(const Vertex (&verticies)[4], const PagePosition (&page_pos)[4], const Color24 (&color)[4], TPage tpage, PageClut clut) : POLY_GT4({
|
||||
{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]},
|
||||
}, tpage, clut) {}
|
||||
constexpr POLY_GT4(const VertexEx (&verticies_ex)[4], TPage tpage, PageClut clut) :
|
||||
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) {}
|
||||
constexpr POLY_GT4(const AreaI16& area, const PagePosition& texture_pos, TPage tpage, PageClut clut, const Color24 (&color)[4]) : POLY_GT4({
|
||||
{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]}
|
||||
}, tpage, clut) {}
|
||||
static constexpr POLY_GT4 create(const Vertex (&verticies)[4], const PagePosition (&page_pos)[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]},
|
||||
}, 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
|
||||
};
|
||||
}
|
||||
|
||||
static constexpr POLY_GT4 create(const AreaI16& area, const PagePosition& texture_pos, 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]}
|
||||
}, tpage, clut);
|
||||
}
|
||||
};
|
||||
|
||||
typedef POLY_F3 FlatTriangle;
|
||||
|
|
Loading…
Reference in New Issue