From 31bdf854a7468a922b2e82ff7c97021ffb9e7a45 Mon Sep 17 00:00:00 2001 From: jaby Date: Tue, 23 Jan 2024 11:10:04 -0500 Subject: [PATCH] =?UTF-8?q?Add=20D=C3=B6nerfisch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/PoolBox/application/include/asset_mgr.hpp | 3 ++- examples/PoolBox/application/src/application.cpp | 14 ++++++++++++-- examples/PoolBox/application/src/asset_mgr.cpp | 4 +++- examples/PoolBox/assets/Makefile | 5 ++++- examples/PoolBox/assets/doener_fish.png | 3 +++ examples/PoolBox/iso/Config.xml | 3 ++- 6 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 examples/PoolBox/assets/doener_fish.png diff --git a/examples/PoolBox/application/include/asset_mgr.hpp b/examples/PoolBox/application/include/asset_mgr.hpp index 89d9dd07..b4baa454 100644 --- a/examples/PoolBox/application/include/asset_mgr.hpp +++ b/examples/PoolBox/application/include/asset_mgr.hpp @@ -5,7 +5,8 @@ namespace Assets { using namespace JabyEngine; namespace Main { - static constexpr auto PacoTIM = SimpleTIM(896, 0, 960, 510); + static constexpr auto PacoTIM = SimpleTIM(896, 0, 960, 510); + static constexpr auto DoenerFishTIM = SimpleTIM(896 + 30, 0, 960 + 16, 510); void load(); } diff --git a/examples/PoolBox/application/src/application.cpp b/examples/PoolBox/application/src/application.cpp index 3c23641e..717e8741 100644 --- a/examples/PoolBox/application/src/application.cpp +++ b/examples/PoolBox/application/src/application.cpp @@ -38,6 +38,12 @@ static const Menu::SimpleMenu::Entry MenuEntries[] = { {"Menu 5"} }; +static const auto doener_fish = Make::SPRT( + Make::AreaI16(16, GPU::Display::Height - 64, 128, 64), // v this needs to be nicer! Has to be + Make::OffsetPageWithClut(Make::PageOffset(120, 0), Make::PageClut(Assets::Main::DoenerFishTIM.get_clut_position())), + GPU::Color24::Grey() +); + // Do we want this namespace? // Do we want Paco to be HERE?! static object::Paco paco; @@ -54,6 +60,9 @@ namespace Shared { } static void setup() { + // Use this size for the doener fish state? + // doener_fish.set_rect_size_fast(Make::SizeI16(64, 32)); + Assets::Main::load(); FontWriter::setup(); paco.setup(); @@ -86,8 +95,8 @@ static void setup() { namespace NormalScene { static void update() { - static const char Title[] = "Pool Box"; - static const char Version[] = "Ver. 0.8"; + static const char Title[] = ">> Pool Box <<"; + static const char Version[] = "Ver. 0.8.1"; static constexpr auto TitleLength = DefaultFont::Info.estimate_str_render_length(Title); static constexpr auto VersionLength = DefaultFont::Info.estimate_str_render_length(Version); @@ -105,6 +114,7 @@ namespace NormalScene { FontWriter::new_font_writer.render(); FontWriter::bios_font_writer.render(); paco.render(); + GPU::render(doener_fish); } static void run() { diff --git a/examples/PoolBox/application/src/asset_mgr.cpp b/examples/PoolBox/application/src/asset_mgr.cpp index c599278d..a4b000ed 100644 --- a/examples/PoolBox/application/src/asset_mgr.cpp +++ b/examples/PoolBox/application/src/asset_mgr.cpp @@ -13,6 +13,7 @@ namespace Assets { enum LBA { __jabyengine_start_lba_request __jabyengine_request_lba_for(PACO, "ASSETS/MAIN/PACO.BIN"), + __jabyengine_request_lba_for(DFISH, "ASSETS/MAIN/DFISH.BIN"), __jabyengine_request_lba_for(GPU_TEST_OVL, "GTO.BIN"), __jabyengine_request_lba_for(CONT_TEST_OVL, "CTO.BIN"), __jabyengine_request_lba_for(FONT_CYC_OVL, "FCO.BIN"), @@ -51,7 +52,8 @@ namespace Assets { namespace Main { static const CDFile Files[] = { - CDFileBuilder::simple_tim(LBA::PACO, PacoTIM) + CDFileBuilder::simple_tim(LBA::PACO, PacoTIM), + CDFileBuilder::simple_tim(LBA::DFISH, DoenerFishTIM) }; void load() { diff --git a/examples/PoolBox/assets/Makefile b/examples/PoolBox/assets/Makefile index 938a8ad0..2f0f0a7b 100644 --- a/examples/PoolBox/assets/Makefile +++ b/examples/PoolBox/assets/Makefile @@ -2,7 +2,7 @@ include $(JABY_ENGINE_DIR)/mkfile/ExportPath.mk include $(JABY_ENGINE_DIR)/mkfile/RebuildTarget.mk OUTPUT_DIR = bin -INPUT = $(OUTPUT_DIR)/TexturePage.bin $(OUTPUT_DIR)/IconTexture.bin $(OUTPUT_DIR)/Paco.bin $(OUTPUT_DIR)/Controller.bin +INPUT = $(OUTPUT_DIR)/TexturePage.bin $(OUTPUT_DIR)/IconTexture.bin $(OUTPUT_DIR)/Paco.bin $(OUTPUT_DIR)/Controller.bin $(OUTPUT_DIR)/doener_fish.bin $(OUTPUT_DIR)/TexturePage.bin: TexturePage.png @mkdir -p $(OUTPUT_DIR) @@ -18,6 +18,9 @@ $(OUTPUT_DIR)/Paco.bin: Paco.png $(OUTPUT_DIR)/Controller.bin: Controller.png jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 --color-trans +$(OUTPUT_DIR)/doener_fish.bin: doener_fish.png + jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 --color-trans + all: $(INPUT) clean: diff --git a/examples/PoolBox/assets/doener_fish.png b/examples/PoolBox/assets/doener_fish.png new file mode 100644 index 00000000..d524591c --- /dev/null +++ b/examples/PoolBox/assets/doener_fish.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d7a9e1c2888e552bb0e36123c371a0d9f2ca88f395dc13c3498f62991f7dad7 +size 599 diff --git a/examples/PoolBox/iso/Config.xml b/examples/PoolBox/iso/Config.xml index f8333c41..e46dcc2c 100644 --- a/examples/PoolBox/iso/Config.xml +++ b/examples/PoolBox/iso/Config.xml @@ -13,7 +13,8 @@