|
|
|
@ -15,12 +15,12 @@ using namespace JabyEngine;
|
|
|
|
|
|
|
|
|
|
// Some default values for the objects
|
|
|
|
|
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 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 TriangleClut = GPU::PageClut::create(320, 511);
|
|
|
|
|
|
|
|
|
|
static constexpr auto RectangleColor = GPU::Color24(0x80, 0x80, 0xFF);
|
|
|
|
|
static constexpr auto RectangleArea = GPU::AreaI16::create(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 RectangleClut = GPU::PageClut::create(320, 510);
|
|
|
|
|
|
|
|
|
@ -38,9 +38,9 @@ static constexpr const auto triangle2 = GPU::POLY_FT3::create({
|
|
|
|
|
Make::Vertex(TriangleArea.size.width, TriangleArea.size.height)
|
|
|
|
|
},{
|
|
|
|
|
// Texture
|
|
|
|
|
GPU::PagePosition::create(TriangleArea.position.x, TriangleArea.position.y),
|
|
|
|
|
GPU::PagePosition::create(TriangleArea.size.width, TriangleArea.position.y),
|
|
|
|
|
GPU::PagePosition::create(TriangleArea.size.width, TriangleArea.size.height)
|
|
|
|
|
Make::PagePosition(TriangleArea.position.x, TriangleArea.position.y),
|
|
|
|
|
Make::PagePosition(TriangleArea.size.width, TriangleArea.position.y),
|
|
|
|
|
Make::PagePosition(TriangleArea.size.width, TriangleArea.size.height)
|
|
|
|
|
}, TriangleTPage, TriangleClut, GPU::Color24::Grey()
|
|
|
|
|
);
|
|
|
|
|
static constexpr const auto triangle3 = GPU::POLY_G3::create({
|
|
|
|
@ -57,8 +57,8 @@ static constexpr const auto triangle4 = GPU::POLY_GT3::create({
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
static constexpr const auto rectangle1 = GPU::POLY_F4::create(RectangleArea, RectangleColor);
|
|
|
|
|
static constexpr const auto rectangle2 = GPU::POLY_FT4::create(GPU::AreaI16::create(
|
|
|
|
|
RectangleArea.position.move(RectangleArea.size.width, 0), RectangleArea.size), GPU::PagePosition::create(0, 0),
|
|
|
|
|
static constexpr const auto rectangle2 = GPU::POLY_FT4::create(Make::AreaI16(
|
|
|
|
|
RectangleArea.position.move(RectangleArea.size.width, 0), RectangleArea.size), Make::PagePosition(0, 0),
|
|
|
|
|
RectangleTPage,
|
|
|
|
|
RectangleClut,
|
|
|
|
|
GPU::Color24::Grey()
|
|
|
|
@ -69,8 +69,8 @@ static constexpr const auto rectangle3 = GPU::POLY_G4::create(
|
|
|
|
|
GPU::Color24::Blue(),
|
|
|
|
|
GPU::Color24::Green(),
|
|
|
|
|
GPU::Color24::White()});
|
|
|
|
|
static constexpr const auto rectangle4 = GPU::POLY_GT4::create(GPU::AreaI16::create(
|
|
|
|
|
RectangleArea.position.move(RectangleArea.size.width*3, 0), RectangleArea.size), GPU::PagePosition::create(0, 0),
|
|
|
|
|
static constexpr const auto rectangle4 = GPU::POLY_GT4::create(Make::AreaI16(
|
|
|
|
|
RectangleArea.position.move(RectangleArea.size.width*3, 0), RectangleArea.size), Make::PagePosition(0, 0),
|
|
|
|
|
RectangleTPage,
|
|
|
|
|
RectangleClut, {
|
|
|
|
|
GPU::Color24::Red(),
|
|
|
|
@ -78,8 +78,8 @@ static constexpr const auto rectangle4 = GPU::POLY_GT4::create(GPU::AreaI16::cre
|
|
|
|
|
GPU::Color24::Green(),
|
|
|
|
|
GPU::Color24::White()}
|
|
|
|
|
);
|
|
|
|
|
static constexpr const auto rectangle5 = GPU::POLY_GT4::create(GPU::AreaI16::create(
|
|
|
|
|
RectangleArea.position.move(0, RectangleArea.size.height), RectangleArea.size), GPU::PagePosition::create(0, 0),
|
|
|
|
|
static constexpr const auto rectangle5 = GPU::POLY_GT4::create(Make::AreaI16(
|
|
|
|
|
RectangleArea.position.move(0, RectangleArea.size.height), RectangleArea.size), Make::PagePosition(0, 0),
|
|
|
|
|
RectangleTPage,
|
|
|
|
|
RectangleClut, {
|
|
|
|
|
GPU::Color24::Red(),
|
|
|
|
@ -109,19 +109,19 @@ static constexpr const auto line4 = GPU::LINE_G::create(
|
|
|
|
|
GPU::ColorVertex{GPU::Color24::White(), Make::Vertex(0, 0)}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
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 rect1 = GPU::TILE::create(Make::AreaI16(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(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 constexpr const auto rect5 = GPU::SPRT::create(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 = GPU::SPRT_16::create(Make::Vertex(0, GPU::Display::Height - 16), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Blue());
|
|
|
|
|
static constexpr const auto rect7 = GPU::SPRT_8::create(Make::Vertex(0, GPU::Display::Height - 8), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Yellow());
|
|
|
|
|
static constexpr const auto rect8 = GPU::SPRT_1::create(Make::Vertex(0, GPU::Display::Height - 1), Make::PagePositionClut(Make::PagePosition(0, 0), TriangleClut), GPU::Color24::Red());
|
|
|
|
|
|
|
|
|
|
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 auto rect9 = GPU::SPRT::create(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 = GPU::SPRT::create(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 void load_assets() {
|
|
|
|
|
static const CDFile Assets[] = {
|
|
|
|
|