Place stars in Jabys eyes
This commit is contained in:
@@ -8,11 +8,29 @@ namespace GTETest {
|
||||
using namespace JabyEngine;
|
||||
using namespace GTETest;
|
||||
|
||||
static auto jaby_star_base = Make::SPRT(
|
||||
// TODO: improve magic numbers
|
||||
Make::AreaI16(GPU::Display::Width - 64, GPU::Display::Height - 64, 64, 64),
|
||||
Make::OffsetPageWithClut(JabySTARTim.get_page_offset_clut4(), Make::PageClut(JabySTARTim.get_clut_position()))
|
||||
);
|
||||
namespace Jaby {
|
||||
static constexpr auto Position = Make::PositionI16(GPU::Display::Width - 64, GPU::Display::Height - 64);
|
||||
|
||||
static constexpr GPU::POLY_FT4::Linked make_star_eye(GPU::PositionI16 pos) {
|
||||
return Make::POLY_FT4(
|
||||
Make::AreaI16(pos, GPU::SizeI16(8, 8)),
|
||||
JabySTARTim.get_page_offset_clut4().add(0, 64),
|
||||
Make::TPage(JabySTARTim.get_texture_position(), GPU::SemiTransparency::B_add_F, GPU::TextureColorMode::clut4),
|
||||
Make::PageClut(JabySTARTim.get_clut_position()),
|
||||
GPU::Color24::Grey()
|
||||
).linked();
|
||||
}
|
||||
|
||||
static auto star_base = Make::SPRT(
|
||||
// TODO: improve magic numbers
|
||||
Make::AreaI16(Position, Make::SizeI16(64, 64)),
|
||||
Make::OffsetPageWithClut(JabySTARTim.get_page_offset_clut4(), Make::PageClut(JabySTARTim.get_clut_position()))
|
||||
).linked();
|
||||
|
||||
static GPU::POLY_FT4::Linked star_eyes[2] = {
|
||||
make_star_eye(Position.add(12, 31)),
|
||||
make_star_eye(Position.add(33, 33))};
|
||||
}
|
||||
|
||||
static auto doener_fish = GTE_Sprite::create(Make::POLY_FT4(
|
||||
Make::AreaI16(Make::PositionI16(0, 0), Assets::Main::DoenerFishInfo.size),
|
||||
@@ -25,6 +43,7 @@ namespace GTETest {
|
||||
static auto gbl_rotation = 0.0_deg;
|
||||
|
||||
static void setup() {
|
||||
Jaby::star_base.concat(Jaby::star_eyes[0].concat(Jaby::star_eyes[1]));
|
||||
doener_fish.area.position = GPU::PositionI16::create(100, 100);
|
||||
Shared::back_menu.reset();
|
||||
|
||||
@@ -47,8 +66,9 @@ namespace GTETest {
|
||||
|
||||
static void render() {
|
||||
doener_fish.render();
|
||||
GPU::render(jaby_star_base);
|
||||
GPU::render(Jaby::star_base);
|
||||
Shared::back_menu.render();
|
||||
GPU::wait_for_render(); //< Because we are single buffer
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
Reference in New Issue
Block a user