diff --git a/examples/PoolBox/.gitignore b/examples/PoolBox/.gitignore index 32e75896..5b91bb69 100644 --- a/examples/PoolBox/.gitignore +++ b/examples/PoolBox/.gitignore @@ -4,4 +4,5 @@ *.d *.o *.lba -**/bin \ No newline at end of file +**/bin +**/auto_gen \ No newline at end of file diff --git a/examples/PoolBox/application/include/asset_mgr.hpp b/examples/PoolBox/application/include/asset_mgr.hpp index 5c50eb01..0bf624e7 100644 --- a/examples/PoolBox/application/include/asset_mgr.hpp +++ b/examples/PoolBox/application/include/asset_mgr.hpp @@ -1,4 +1,5 @@ #pragma once +#include "auto_gen/vram_layout.hpp" #include namespace Assets { @@ -11,11 +12,6 @@ namespace Assets { }; static constexpr auto PacoTIM = SimpleTIM::create(896, 0, 960, 510); - static constexpr auto DoenerFishInfo = ImageInfo{ - .tim = SimpleTIM::create(896 + 30, 0, 960 + 16, 510), - .size = GPU::SizeI16::create(128, 64) - }; - namespace JabyLoader { static constexpr auto TIMLoaction = SimpleTIM::create(PacoTIM.get_texture_x(), PacoTIM.get_texture_y() + 128, 960 + 48, 510); static constexpr auto JabyFrame = GPU::AreaI16::create(0, 0, 32, 44); diff --git a/examples/PoolBox/application/src/Overlay/GTETest/gte_test.cpp b/examples/PoolBox/application/src/Overlay/GTETest/gte_test.cpp index e96a5f8c..a6207e44 100644 --- a/examples/PoolBox/application/src/Overlay/GTETest/gte_test.cpp +++ b/examples/PoolBox/application/src/Overlay/GTETest/gte_test.cpp @@ -86,10 +86,10 @@ namespace GTETest { } static auto doener_fish = GTE_Sprite::create(Make::POLY_FT4( - Make::AreaI16(Make::PositionI16(0, 0), Assets::Main::DoenerFishInfo.size), - Assets::Main::DoenerFishInfo.tim.get_page_offset_clut4(), - Make::TPage(Assets::Main::DoenerFishInfo.tim.get_texture_position(), GPU::SemiTransparency::B_add_F, GPU::TextureColorMode::clut4), - Make::PageClut(Assets::Main::DoenerFishInfo.tim.get_clut_position()), + Make::AreaI16(Make::PositionI16(0, 0), doener_fish_png::size), + doener_fish_png::tim.get_page_offset_clut4(), + Make::TPage(doener_fish_png::tim.get_texture_position(), GPU::SemiTransparency::B_add_F, GPU::TextureColorMode::clut4), + Make::PageClut(doener_fish_png::tim.get_clut_position()), GPU::Color24::Grey() ).linked()); diff --git a/examples/PoolBox/application/src/Overlay/GTETest/include/gte_test_assets.hpp b/examples/PoolBox/application/src/Overlay/GTETest/include/gte_test_assets.hpp index 656b676b..62c45f96 100644 --- a/examples/PoolBox/application/src/Overlay/GTETest/include/gte_test_assets.hpp +++ b/examples/PoolBox/application/src/Overlay/GTETest/include/gte_test_assets.hpp @@ -6,8 +6,8 @@ namespace GTETest { using namespace JabyEngine; static constexpr auto JabySTARTim = SimpleTIM::create( - // v Doenerfisch rotates so we need some space - Assets::Main::DoenerFishInfo.tim.get_texture_x(), Assets::Main::DoenerFishInfo.tim.get_texture_y() + Assets::Main::DoenerFishInfo.size.height + 2, - Assets::Main::DoenerFishInfo.tim.get_clut_x() + 16, Assets::Main::DoenerFishInfo.tim.get_clut_y() + // v Dönerfisch rotates so we need some space + doener_fish_png::tim.get_texture_x(), doener_fish_png::tim.get_texture_y() + doener_fish_png::size.height + 2, + doener_fish_png::tim.get_clut_x() + 16, doener_fish_png::tim.get_clut_y() ); } \ No newline at end of file diff --git a/examples/PoolBox/application/src/application.cpp b/examples/PoolBox/application/src/application.cpp index b2f3b03b..365bc534 100644 --- a/examples/PoolBox/application/src/application.cpp +++ b/examples/PoolBox/application/src/application.cpp @@ -108,8 +108,9 @@ static const Menu::SimpleMenu::Entry MenuEntries[] = { }; static const auto doener_fish = Make::SPRT( - Make::AreaI16(Make::PositionI16(8, GPU::Display::Height - Assets::Main::DoenerFishInfo.size.height), Assets::Main::DoenerFishInfo.size), // v this needs to be nicer! Has to be - Make::OffsetPageWithClut(Assets::Main::DoenerFishInfo.tim.get_page_offset_clut4(), Make::PageClut(Assets::Main::DoenerFishInfo.tim.get_clut_position())), + Make::AreaI16(Make::PositionI16(8, GPU::Display::Height - doener_fish_png::size.height), doener_fish_png::size), + // v this needs to be nicer! Has to be + Make::OffsetPageWithClut(doener_fish_png::tim.get_page_offset_clut4(), Make::PageClut(doener_fish_png::tim.get_clut_position())), GPU::Color24::Grey() ); diff --git a/examples/PoolBox/application/src/asset_mgr.cpp b/examples/PoolBox/application/src/asset_mgr.cpp index 4c16542c..6ace47a0 100644 --- a/examples/PoolBox/application/src/asset_mgr.cpp +++ b/examples/PoolBox/application/src/asset_mgr.cpp @@ -68,7 +68,7 @@ namespace Assets { static const CDFile Files[] = { CDFileBuilder::simple_tim(LBA::PACO, PacoTIM), - CDFileBuilder::simple_tim(LBA::DFISH, DoenerFishInfo.tim), + CDFileBuilder::simple_tim(LBA::DFISH, doener_fish_png::tim), CDFileBuilder::simple_tim(LBA::JABY_LOAD, JabyLoader::TIMLoaction), CDFileBuilder::sony_vag(LBA::APPLE_SFX, VAG::create(0, 1.0_vol)), CDFileBuilder::sony_vag(LBA::BLUBB_SFX, VAG::create(1, 1.0_vol)), diff --git a/examples/PoolBox/assets/Makefile b/examples/PoolBox/assets/Makefile index face7237..83885f1b 100644 --- a/examples/PoolBox/assets/Makefile +++ b/examples/PoolBox/assets/Makefile @@ -45,7 +45,7 @@ $(OUTPUT_DIR)/%.vag: audio/%.wav $(OUTPUT_DIR)/doener_fish.img: doener_fish.png vram_doener_fish.tim_project @mkdir -p $(OUTPUT_DIR) - psxfileconv vram_doener_fish.tim_project -o $@ project + psxfileconv vram_doener_fish.tim_project -o $@ project --hpp ../application/include/auto_gen/vram_layout.hpp $(OUTPUT_DIR)/OnMyOwn_BailBonds.xa: audio/OnMyOwn_BailBonds.mp3 @mkdir -p $(OUTPUT_DIR)