Support project conversion #27

Merged
jaby merged 9 commits from topic/jb/psyfileconv-tim-prj into main 2025-04-16 20:19:59 +00:00
7 changed files with 15 additions and 17 deletions
Showing only changes of commit a686df5bf6 - Show all commits

View File

@ -4,4 +4,5 @@
*.d
*.o
*.lba
**/bin
**/bin
**/auto_gen

View File

@ -1,4 +1,5 @@
#pragma once
#include "auto_gen/vram_layout.hpp"
#include <PSX/File/cd_file_types.hpp>
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);

View File

@ -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());

View File

@ -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()
);
}

View File

@ -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()
);

View File

@ -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)),

View File

@ -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)