Support even more make functions

This commit is contained in:
Jaby Blubb 2023-10-03 16:18:43 +02:00
parent 1a2c03cd11
commit aebd68f633
2 changed files with 23 additions and 6 deletions

View File

@ -16,13 +16,13 @@ using namespace JabyEngine;
// Some default values for the objects // Some default values for the objects
static constexpr auto TriangleColor = GPU::Color24::from_rgb(0x0, 0xFF, 0xFF); static constexpr auto TriangleColor = GPU::Color24::from_rgb(0x0, 0xFF, 0xFF);
static constexpr auto TriangleArea = Make::AreaI16(Make::PositionI16(0, 0), Make::SizeI16(64, 64)); static constexpr auto TriangleArea = Make::AreaI16(Make::PositionI16(0, 0), Make::SizeI16(64, 64));
static constexpr auto TriangleTPage = GPU::TPage::create(320, 0, GPU::SemiTransparency::B_Half_add_F_Half, GPU::TexturePageColor::$4bit); static constexpr auto TriangleTPage = Make::TPage(320, 0, GPU::SemiTransparency::B_Half_add_F_Half, GPU::TexturePageColor::$4bit);
static constexpr auto TriangleClut = GPU::PageClut::create(320, 511); static constexpr auto TriangleClut = Make::PageClut(320, 511);
static constexpr auto RectangleColor = GPU::Color24(0x80, 0x80, 0xFF); static constexpr auto RectangleColor = GPU::Color24(0x80, 0x80, 0xFF);
static constexpr auto RectangleArea = Make::AreaI16(Make::PositionI16(0, TriangleArea.size.height), Make::SizeI16(80, 80)); static constexpr auto RectangleArea = Make::AreaI16(Make::PositionI16(0, TriangleArea.size.height), Make::SizeI16(80, 80));
static constexpr auto RectangleTPage = GPU::TPage::create(320, 256, GPU::SemiTransparency::B_Half_add_F_Half, GPU::TexturePageColor::$4bit); static constexpr auto RectangleTPage = Make::TPage(320, 256, GPU::SemiTransparency::B_Half_add_F_Half, GPU::TexturePageColor::$4bit);
static constexpr auto RectangleClut = GPU::PageClut::create(320, 510); static constexpr auto RectangleClut = Make::PageClut(320, 510);
static constexpr auto LineColor = GPU::Color24(0xFF, 0x0, 0x0); static constexpr auto LineColor = GPU::Color24(0xFF, 0x0, 0x0);

View File

@ -89,7 +89,7 @@ namespace JabyEngine {
// ################################################################### // ###################################################################
static constexpr GPU::PagePosition PagePosition() { static constexpr GPU::PagePosition PagePosition() {
return creator_template<GPU::PagePosition>(0, 0); return creator_template<GPU::PagePosition>(0_u8, 0_u8);
} }
static constexpr GPU::PagePosition PagePosition(uint8_t u, uint8_t v) { static constexpr GPU::PagePosition PagePosition(uint8_t u, uint8_t v) {
@ -99,7 +99,7 @@ namespace JabyEngine {
// ################################################################### // ###################################################################
static constexpr GPU::PageClut PageClut() { static constexpr GPU::PageClut PageClut() {
return creator_template<GPU::PageClut>(0, 0); return creator_template<GPU::PageClut>(0_u16, 0_u16);
} }
static constexpr GPU::PageClut PageClut(uint16_t x, uint16_t y) { static constexpr GPU::PageClut PageClut(uint16_t x, uint16_t y) {
@ -108,6 +108,16 @@ namespace JabyEngine {
// ################################################################### // ###################################################################
static constexpr GPU::TPage TPage() {
return creator_template<GPU::TPage>(0_u16, 0_u16, GPU::SemiTransparency::B_add_F, GPU::TexturePageColor::$4bit);
}
static constexpr GPU::TPage TPage(uint16_t x, uint16_t y, GPU::SemiTransparency transparency, GPU::TexturePageColor clut_color) {
return creator_template<GPU::TPage>(x, y, transparency, clut_color);
}
// ###################################################################
static constexpr GPU::PagePositionClut PagePositionClut() { static constexpr GPU::PagePositionClut PagePositionClut() {
return creator_template<GPU::PagePositionClut>(PagePosition(), PageClut()); return creator_template<GPU::PagePositionClut>(PagePosition(), PageClut());
} }
@ -135,6 +145,13 @@ namespace JabyEngine {
static constexpr GPU::ColorVertex ColorVertex(GPU::Color24 color, GPU::Vertex pos) { static constexpr GPU::ColorVertex ColorVertex(GPU::Color24 color, GPU::Vertex pos) {
return creator_template<GPU::ColorVertex>(color, pos); return creator_template<GPU::ColorVertex>(color, pos);
} }
// ###################################################################
// ###################################################################
// ###################################################################
// ###################################################################
// ###################################################################
// ###################################################################
} }
} }