|
|
|
@ -14,28 +14,28 @@ enum LBA {
|
|
|
|
|
using namespace JabyEngine;
|
|
|
|
|
|
|
|
|
|
// Some default values for the objects
|
|
|
|
|
static constexpr auto TriangleColor = GPU::Color24(0x0, 0xFF, 0xFF);
|
|
|
|
|
static constexpr auto TriangleArea = GPU::AreaI16::create(GPU::PositionI16::create(0, 0), GPU::SizeI16::create(64, 64));
|
|
|
|
|
static constexpr auto TriangleColor = GPU::Color24::from_rgb(0x0, 0xFF, 0xFF);
|
|
|
|
|
static constexpr auto TriangleArea = GPU::AreaI16::create(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 TriangleClut = GPU::PageClut::create(320, 511);
|
|
|
|
|
|
|
|
|
|
static constexpr auto RectangleColor = GPU::Color24(0x80, 0x80, 0xFF);
|
|
|
|
|
static constexpr auto RectangleArea = GPU::AreaI16::create(GPU::PositionI16::create(0, TriangleArea.size.height), GPU::SizeI16::create(80, 80));
|
|
|
|
|
static constexpr auto RectangleArea = GPU::AreaI16::create(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 RectangleClut = GPU::PageClut::create(320, 510);
|
|
|
|
|
|
|
|
|
|
static constexpr auto LineColor = GPU::Color24(0xFF, 0x0, 0x0);
|
|
|
|
|
|
|
|
|
|
static constexpr const auto triangle1 = GPU::POLY_F3::create({
|
|
|
|
|
GPU::Vertex::create(TriangleArea.position.x, TriangleArea.position.y),
|
|
|
|
|
GPU::Vertex::create(TriangleArea.size.width, TriangleArea.size.height),
|
|
|
|
|
GPU::Vertex::create(TriangleArea.position.x, TriangleArea.size.height)
|
|
|
|
|
Make::Vertex(TriangleArea.position.x, TriangleArea.position.y),
|
|
|
|
|
Make::Vertex(TriangleArea.size.width, TriangleArea.size.height),
|
|
|
|
|
Make::Vertex(TriangleArea.position.x, TriangleArea.size.height)
|
|
|
|
|
}, TriangleColor
|
|
|
|
|
);
|
|
|
|
|
static constexpr const auto triangle2 = GPU::POLY_FT3::create({
|
|
|
|
|
GPU::Vertex::create(TriangleArea.position.x, TriangleArea.position.y),
|
|
|
|
|
GPU::Vertex::create(TriangleArea.size.width, TriangleArea.position.y),
|
|
|
|
|
GPU::Vertex::create(TriangleArea.size.width, TriangleArea.size.height)
|
|
|
|
|
Make::Vertex(TriangleArea.position.x, TriangleArea.position.y),
|
|
|
|
|
Make::Vertex(TriangleArea.size.width, TriangleArea.position.y),
|
|
|
|
|
Make::Vertex(TriangleArea.size.width, TriangleArea.size.height)
|
|
|
|
|
},{
|
|
|
|
|
// Texture
|
|
|
|
|
GPU::PagePosition::create(TriangleArea.position.x, TriangleArea.position.y),
|
|
|
|
@ -89,39 +89,39 @@ static constexpr const auto rectangle5 = GPU::POLY_GT4::create(GPU::AreaI16::cre
|
|
|
|
|
).set_semi_transparent(true);
|
|
|
|
|
|
|
|
|
|
static constexpr const auto line1 = GPU::LINE_F::create(LineColor,
|
|
|
|
|
GPU::Vertex::create(0, 0),
|
|
|
|
|
GPU::Vertex::create(GPU::Display::Width, GPU::Display::Height)
|
|
|
|
|
Make::Vertex(0, 0),
|
|
|
|
|
Make::Vertex(GPU::Display::Width, GPU::Display::Height)
|
|
|
|
|
);
|
|
|
|
|
static constexpr const auto line2 = GPU::LINE_F::create(LineColor.invert(),
|
|
|
|
|
GPU::Vertex::create(0, 0),
|
|
|
|
|
GPU::Vertex::create(16, 0),
|
|
|
|
|
GPU::Vertex::create(16, 16),
|
|
|
|
|
GPU::Vertex::create(0, 0)
|
|
|
|
|
Make::Vertex(0, 0),
|
|
|
|
|
Make::Vertex(16, 0),
|
|
|
|
|
Make::Vertex(16, 16),
|
|
|
|
|
Make::Vertex(0, 0)
|
|
|
|
|
);
|
|
|
|
|
static constexpr const auto line3 = GPU::LINE_G::create(
|
|
|
|
|
GPU::ColorVertex{LineColor, GPU::Vertex::create(GPU::Display::Width, 0)},
|
|
|
|
|
GPU::ColorVertex{LineColor.invert(), GPU::Vertex::create(0, GPU::Display::Height)}
|
|
|
|
|
GPU::ColorVertex{LineColor, Make::Vertex(GPU::Display::Width, 0)},
|
|
|
|
|
GPU::ColorVertex{LineColor.invert(), Make::Vertex(0, GPU::Display::Height)}
|
|
|
|
|
);
|
|
|
|
|
static constexpr const auto line4 = GPU::LINE_G::create(
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::Red(), GPU::Vertex::create(0, 0)},
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::Green(), GPU::Vertex::create(0, 16)},
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::Blue(), GPU::Vertex::create(16, 16)},
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::White(), GPU::Vertex::create(0, 0)}
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::Red(), Make::Vertex(0, 0)},
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::Green(), Make::Vertex(0, 16)},
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::Blue(), Make::Vertex(16, 16)},
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::White(), Make::Vertex(0, 0)}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
static constexpr const auto rect1 = GPU::TILE::create(GPU::AreaI16::create(GPU::PositionI16::create(GPU::Display::Width - 32, GPU::Display::Height - 32), GPU::SizeI16::create(32, 32)), GPU::Color24::Green());
|
|
|
|
|
static constexpr const auto rect2 = GPU::TILE_16::create(GPU::PositionI16::create(GPU::Display::Width - 16, GPU::Display::Height - 16), GPU::Color24::Blue());
|
|
|
|
|
static constexpr const auto rect3 = GPU::TILE_8::create(GPU::PositionI16::create(GPU::Display::Width - 8, GPU::Display::Height - 8), GPU::Color24::Yellow());
|
|
|
|
|
static constexpr const auto rect4 = GPU::TILE_1::create(GPU::PositionI16::create(GPU::Display::Width - 1, GPU::Display::Height - 1), GPU::Color24::Red());
|
|
|
|
|
static constexpr const auto rect1 = GPU::TILE::create(GPU::AreaI16::create(Make::PositionI16(GPU::Display::Width - 32, GPU::Display::Height - 32), Make::SizeI16(32, 32)), GPU::Color24::Green());
|
|
|
|
|
static constexpr const auto rect2 = GPU::TILE_16::create(Make::PositionI16(GPU::Display::Width - 16, GPU::Display::Height - 16), GPU::Color24::Blue());
|
|
|
|
|
static constexpr const auto rect3 = GPU::TILE_8::create(Make::PositionI16(GPU::Display::Width - 8, GPU::Display::Height - 8), GPU::Color24::Yellow());
|
|
|
|
|
static constexpr const auto rect4 = GPU::TILE_1::create(Make::PositionI16(GPU::Display::Width - 1, GPU::Display::Height - 1), GPU::Color24::Red());
|
|
|
|
|
|
|
|
|
|
static constexpr const auto texpage = GPU::TexPage::create(GPU::PositionU16::create(320, 0), GPU::TexturePageColor::$4bit);
|
|
|
|
|
static constexpr const auto rect5 = GPU::SPRT::create(GPU::AreaI16(GPU::PositionI16::create(0, GPU::Display::Height - 32), GPU::SizeI16(32, 32)), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Green());
|
|
|
|
|
static constexpr const auto rect6 = GPU::SPRT_16::create(GPU::Vertex::create(0, GPU::Display::Height - 16), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Blue());
|
|
|
|
|
static constexpr const auto rect7 = GPU::SPRT_8::create(GPU::Vertex::create(0, GPU::Display::Height - 8), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Yellow());
|
|
|
|
|
static constexpr const auto rect8 = GPU::SPRT_1::create(GPU::Vertex::create(0, GPU::Display::Height - 1), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Red());
|
|
|
|
|
static constexpr const auto texpage = GPU::TexPage::create(Make::PositionU16(320, 0), GPU::TexturePageColor::$4bit);
|
|
|
|
|
static constexpr const auto rect5 = GPU::SPRT::create(GPU::AreaI16(Make::PositionI16(0, GPU::Display::Height - 32), Make::SizeI16(32, 32)), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Green());
|
|
|
|
|
static constexpr const auto rect6 = GPU::SPRT_16::create(Make::Vertex(0, GPU::Display::Height - 16), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Blue());
|
|
|
|
|
static constexpr const auto rect7 = GPU::SPRT_8::create(Make::Vertex(0, GPU::Display::Height - 8), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Yellow());
|
|
|
|
|
static constexpr const auto rect8 = GPU::SPRT_1::create(Make::Vertex(0, GPU::Display::Height - 1), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Red());
|
|
|
|
|
|
|
|
|
|
static auto rect9 = GPU::SPRT::create(GPU::AreaI16(GPU::PositionI16::create(GPU::Display::Width/2, GPU::Display::Height/2), GPU::SizeI16::create(32, 32)).centered(), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Grey()).linked();
|
|
|
|
|
static auto rect10 = GPU::SPRT::create(GPU::AreaI16(GPU::PositionI16::create(GPU::Display::Width/2, GPU::Display::Height/2 - 32), GPU::SizeI16::create(32, 32)).centered(), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Grey()).linked();
|
|
|
|
|
static auto rect9 = GPU::SPRT::create(GPU::AreaI16(Make::PositionI16(GPU::Display::Width/2, GPU::Display::Height/2), Make::SizeI16(32, 32)).centered(), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Grey()).linked();
|
|
|
|
|
static auto rect10 = GPU::SPRT::create(GPU::AreaI16(Make::PositionI16(GPU::Display::Width/2, GPU::Display::Height/2 - 32), Make::SizeI16(32, 32)).centered(), {GPU::PagePosition::create(0, 0), TriangleClut}, GPU::Color24::Grey()).linked();
|
|
|
|
|
|
|
|
|
|
static void load_assets() {
|
|
|
|
|
static const CDFile Assets[] = {
|
|
|
|
|