Compare commits

...

No commits in common. "Alpha-0.0.0" and "main" have entirely different histories.

62 changed files with 20075 additions and 139 deletions

View File

@ -5,3 +5,4 @@
*.o
*.lba
**/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

@ -1,3 +1,4 @@
#include "../../../include/auto_gen/vram_layout.hpp"
#include "../../../include/shared.hpp"
#include "include/controller_state.hpp"
#include <PSX/Periphery/periphery.hpp>

View File

@ -1,4 +1,4 @@
#include "include/controller_test_assets.hpp"
#include "../../../include/auto_gen/vram_layout.hpp"
#include <PSX/File/Processor/cd_file_processor.hpp>
#include <PSX/AutoLBA/auto_lba_declaration.hpp>
@ -13,6 +13,6 @@ namespace ControllerTest {
__declare_lba_header(LBA);
CDFile Assets[1] = {
CDFileBuilder::simple_tim(LBA::CONT, ControllerButtonTIM),
CDFileBuilder::simple_tim(LBA::CONT, Controller_png::tim),
};
}

View File

@ -1,5 +1,5 @@
#pragma once
#include "controller_test_assets.hpp"
#include "../../../../include/auto_gen/vram_layout.hpp"
#include <FontWriter/font_writer.hpp>
#include <PSX/GPU/make_gpu_primitives.hpp>
#include <PSX/Periphery/controller.hpp>
@ -18,43 +18,43 @@ namespace ControllerTest {
ControllerState state;
for(auto& tex_page : state.tex_page) {
tex_page = Make::TexPage(ControllerButtonTIM.get_texture_position(), GPU::TextureColorMode::clut4).linked();
tex_page = Make::TexPage(Controller_png::tim.get_texture_position(), GPU::TextureColorMode::clut4).linked();
}
for(auto& buttons : state.buttons) {
// Triangle
buttons[0] = Make::SPRT_16(Make::Vertex(71, 0).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(0, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[0] = Make::SPRT_16(Make::Vertex(71, 0).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(0, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// Circle
buttons[1] = Make::SPRT_16(Make::Vertex(82, 12).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(1, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[1] = Make::SPRT_16(Make::Vertex(82, 12).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(1, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// Cross
buttons[2] = Make::SPRT_16(Make::Vertex(71, 23).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(2, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[2] = Make::SPRT_16(Make::Vertex(71, 23).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(2, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// Square
buttons[3] = Make::SPRT_16(Make::Vertex(60, 11).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(3, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[3] = Make::SPRT_16(Make::Vertex(60, 11).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(3, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// Play
buttons[4] = Make::SPRT_16(Make::Vertex(51, 21).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(4, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[4] = Make::SPRT_16(Make::Vertex(51, 21).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(4, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// Block
buttons[5] = Make::SPRT_16(Make::Vertex(24, 21).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(5, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[5] = Make::SPRT_16(Make::Vertex(24, 21).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(5, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// L1
buttons[6] = Make::SPRT_16(Make::Vertex(7, 39).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(7, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[6] = Make::SPRT_16(Make::Vertex(7, 39).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(7, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// L2
buttons[7] = Make::SPRT_16(Make::Vertex(7, 49).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(8, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[7] = Make::SPRT_16(Make::Vertex(7, 49).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(8, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// R1
buttons[8] = Make::SPRT_16(Make::Vertex(71, 39).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(7, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[8] = Make::SPRT_16(Make::Vertex(71, 39).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(7, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// R2
buttons[9] = Make::SPRT_16(Make::Vertex(71, 49).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(8, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[9] = Make::SPRT_16(Make::Vertex(71, 49).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(8, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// L3
buttons[10] = Make::SPRT_16(Make::Vertex(24, 34).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(9, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[10] = Make::SPRT_16(Make::Vertex(24, 34).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(9, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// R3
buttons[11] = Make::SPRT_16(Make::Vertex(52, 34).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(9, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[11] = Make::SPRT_16(Make::Vertex(52, 34).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(9, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
// Connection Symbol
buttons[12] = Make::SPRT_16(Make::Vertex(37, 9).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(10, Make::SizeI16(16, 16)), Make::PageClut(ControllerButtonTIM.get_clut_position()))).linked();
buttons[12] = Make::SPRT_16(Make::Vertex(37, 9).move(offset.x, offset.y), Make::OffsetPageWithClut(GPU::PageOffset::from_tile_id16(10, Make::SizeI16(16, 16)), Make::PageClut(Controller_png::tim.get_clut_position()))).linked();
}
for(auto& arrows : state.arrows) {
arrows[0] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect( Make::AreaI16(Make::PositionI16( 7, 5).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(ControllerButtonTIM.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(ControllerButtonTIM.get_clut_position())).linked();
arrows[1] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect270(Make::AreaI16(Make::PositionI16(14, 11).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(ControllerButtonTIM.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(ControllerButtonTIM.get_clut_position())).linked();
arrows[2] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect180(Make::AreaI16(Make::PositionI16( 7, 17).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(ControllerButtonTIM.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(ControllerButtonTIM.get_clut_position())).linked();
arrows[3] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect90( Make::AreaI16(Make::PositionI16( 0, 11).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(ControllerButtonTIM.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(ControllerButtonTIM.get_clut_position())).linked();
arrows[0] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect( Make::AreaI16(Make::PositionI16( 7, 5).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(Controller_png::tim.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(Controller_png::tim.get_clut_position())).linked();
arrows[1] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect270(Make::AreaI16(Make::PositionI16(14, 11).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(Controller_png::tim.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(Controller_png::tim.get_clut_position())).linked();
arrows[2] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect180(Make::AreaI16(Make::PositionI16( 7, 17).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(Controller_png::tim.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(Controller_png::tim.get_clut_position())).linked();
arrows[3] = Make::POLY_FT4(__jabyengine_polyFT4_vertex_rect90( Make::AreaI16(Make::PositionI16( 0, 11).move(offset.x, offset.y), Make::SizeI16(16, 16)), Make::PositionI16(6*16, 0)), Make::TPage(Controller_png::tim.get_texture_position(), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4), Make::PageClut(Controller_png::tim.get_clut_position())).linked();
}
return state;

View File

@ -1,8 +0,0 @@
#pragma once
#include <PSX/File/cd_file_types.hpp>
namespace ControllerTest {
using namespace JabyEngine;
static constexpr auto ControllerButtonTIM = SimpleTIM::create(384, 0, 384, 511);
}

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

@ -1,7 +1,8 @@
include $(JABY_ENGINE_DIR)/mkfile/common/ExportPath.mk
include $(JABY_ENGINE_DIR)/mkfile/common/RebuildTarget.mk
OUTPUT_DIR = bin
OUTPUT_DIR = bin
AUTO_GEN_DIR = ../application/include/auto_gen
CLUT_4_COLOR_TRANS_FLAGS = simple-tim clut4 --color-trans
# Ressources to convert
@ -22,12 +23,6 @@ IconTexture_FLAGS = simple-tim clut4 --semi-trans --color-trans
INPUT += $(OUTPUT_DIR)/Paco.img
Paco_FLAGS = $(CLUT_4_COLOR_TRANS_FLAGS)
INPUT += $(OUTPUT_DIR)/Controller.img
Controller_FLAGS = $(CLUT_4_COLOR_TRANS_FLAGS)
INPUT += $(OUTPUT_DIR)/doener_fish.img
doener_fish_FLAGS = $(CLUT_4_COLOR_TRANS_FLAGS)
INPUT += $(OUTPUT_DIR)/JabyStar.img
JabyStar_FLAGS = $(CLUT_4_COLOR_TRANS_FLAGS)
@ -60,7 +55,12 @@ $(OUTPUT_DIR)/%.tim: %.png
@mkdir -p $(OUTPUT_DIR)
psxfileconv --lz4 $< -o $@ $($*_TIM_FLAGS)
all: $(INPUT)
$(AUTO_GEN_DIR)/vram_layout.hpp: tim_example.tim_project Controller.png doener_fish.png
@mkdir -p $(AUTO_GEN_DIR)
psxfileconv tim_example.tim_project -o $(OUTPUT_DIR)/dummy.img project --hpp $(AUTO_GEN_DIR)/vram_layout.hpp
all: $(INPUT) $(AUTO_GEN_DIR)/vram_layout.hpp
clean:
rm -fr $(OUTPUT_DIR)
rm -fr $(AUTO_GEN_DIR)

View File

@ -0,0 +1 @@
{"jobs":[{"name":"doener_fish.png","file_path":"doener_fish.png","image_pos":{"x":926,"y":0},"palette_rect":{"pos":{"x":976,"y":510},"size":{"width":16,"height":1}},"settings":{"compress":true,"transparency":"FirstColor","encoding":"FourBit"}},{"name":"Controller.png","file_path":"Controller.png","image_pos":{"x":384,"y":0},"palette_rect":{"pos":{"x":384,"y":511},"size":{"width":16,"height":1}},"settings":{"compress":true,"transparency":"FirstColor","encoding":"FourBit"}}]}

View File

@ -2,8 +2,8 @@
echo "<<< Install Rust prerequisites >>>"
apt install -y curl
RUST_VERSION=1.78.0
RUST_VERSION=1.84.0
echo "<<< Install Rust $RUST_VERSION >>>"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=$RUST_VERSION -y
. "$HOME/.cargo/env"
cargo install cargo-edit --locked
cargo install cargo-edit cargo-bundle --locked

View File

@ -6,11 +6,11 @@
},
{
"name": "Include",
"path": "..\\..\\include"
"path": "../../include"
},
{
"name": "Root",
"path": "..\\.."
"path": "../.."
}
],
"tasks": {

View File

@ -1,7 +1,6 @@
**/target
Input/**
Output/**
*.lock
**/Tests/Test_*.*
**/Planschbecken.bin

View File

@ -13,6 +13,7 @@
"psxcdread all!psxcdread",
"psxfileconv all!psxfileconv",
"psxreadmap all!psxreadmap",
"tim_tool all!tim_tool",
"wslpath all!wslpath",
]
},
@ -49,7 +50,7 @@
{
"id": "cargo cmd",
"type":"pickString",
"options": ["build", "check", "upgrade", "clean", "run", "tree"],
"options": ["build", "check", "run", "upgrade", "clean", "bundle"],
"default": "build",
"description": "cargo command to run"
}

324
src/Tools/cdtypes/Cargo.lock generated Normal file
View File

@ -0,0 +1,324 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
dependencies = [
"shlex",
]
[[package]]
name = "cdtypes"
version = "1.0.0"
dependencies = [
"byteorder",
"chrono",
"paste",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

View File

@ -20,7 +20,7 @@ pub struct Reader<'a> {
impl<'a> Reader<'a> {
const CD_PREGAP_SECTORS:usize = Time::cd_pregap().as_sectors();
pub fn new(file: std::fs::File, data_type_guide: &'a Vec<DataTypeEnd>, unk_sector_behav: UnknownSectorBehavior) -> Result<Reader, Error> {
pub fn new(file: std::fs::File, data_type_guide: &Vec<DataTypeEnd>, unk_sector_behav: UnknownSectorBehavior) -> Result<Reader, Error> {
Ok(Reader{
file, data_type_guide, unk_sector_behav, lba: Self::CD_PREGAP_SECTORS, active: true
})

564
src/Tools/cpp_out/Cargo.lock generated Normal file
View File

@ -0,0 +1,564 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
"once_cell",
"windows-sys",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
dependencies = [
"shlex",
]
[[package]]
name = "cdtypes"
version = "1.0.0"
dependencies = [
"byteorder",
"chrono",
"paste",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets",
]
[[package]]
name = "clap"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "colored"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpp_out"
version = "1.0.2"
dependencies = [
"clap",
"tool_helper",
]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "envmnt"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d73999a2b8871e74c8b8bc23759ee9f3d85011b24fafc91a4b3b5c8cc8185501"
dependencies = [
"fsio",
"indexmap",
]
[[package]]
name = "fsio"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad0ce30be0cc441b325c5d705c8b613a0ca0d92b6a8953d41bd236dc09a36d0"
dependencies = [
"dunce",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hound"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "lz4"
version = "1.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4"
dependencies = [
"lz4-sys",
]
[[package]]
name = "lz4-sys"
version = "1.11.1+lz4-1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "tool_helper"
version = "1.0.0"
dependencies = [
"byteorder",
"cdtypes",
"colored",
"envmnt",
"hound",
"lz4",
"paste",
"wslpath",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wslpath"
version = "1.1.0"
dependencies = [
"clap",
]

View File

@ -7,5 +7,5 @@ edition = "2021"
panic = "abort"
[dependencies]
clap = {version = "4.5.23", features = ["derive"]}
clap = {version = "4.5.27", features = ["derive"]}
tool_helper = {path = "../tool_helper"}

615
src/Tools/mkoverlay/Cargo.lock generated Normal file
View File

@ -0,0 +1,615 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
"once_cell",
"windows-sys",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
dependencies = [
"shlex",
]
[[package]]
name = "cdtypes"
version = "1.0.0"
dependencies = [
"byteorder",
"chrono",
"paste",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets",
]
[[package]]
name = "clap"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "colored"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "envmnt"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d73999a2b8871e74c8b8bc23759ee9f3d85011b24fafc91a4b3b5c8cc8185501"
dependencies = [
"fsio",
"indexmap",
]
[[package]]
name = "fsio"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad0ce30be0cc441b325c5d705c8b613a0ca0d92b6a8953d41bd236dc09a36d0"
dependencies = [
"dunce",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hound"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itoa"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "lz4"
version = "1.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4"
dependencies = [
"lz4-sys",
]
[[package]]
name = "lz4-sys"
version = "1.11.1+lz4-1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "mkoverlay"
version = "1.6.0"
dependencies = [
"clap",
"serde_json",
"tool_helper",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "ryu"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "serde"
version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "tool_helper"
version = "1.0.0"
dependencies = [
"byteorder",
"cdtypes",
"colored",
"envmnt",
"hound",
"lz4",
"paste",
"wslpath",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wslpath"
version = "1.1.0"
dependencies = [
"clap",
]

View File

@ -7,6 +7,6 @@ edition = "2021"
panic = "abort"
[dependencies]
clap = {version = "4.5.23", features = ["derive"]}
serde_json = "1.0.134"
clap = {version = "4.5.27", features = ["derive"]}
serde_json = "1.0.137"
tool_helper = {path = "../tool_helper"}

619
src/Tools/psxcdgen_ex/Cargo.lock generated Normal file
View File

@ -0,0 +1,619 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
"once_cell",
"windows-sys",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
dependencies = [
"shlex",
]
[[package]]
name = "cdtypes"
version = "1.0.0"
dependencies = [
"byteorder",
"chrono",
"paste",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets",
]
[[package]]
name = "clap"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "colored"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys",
]
[[package]]
name = "convert_case"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "derive_more"
version = "0.99.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
dependencies = [
"convert_case",
"proc-macro2",
"quote",
"rustc_version",
"syn",
]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "envmnt"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d73999a2b8871e74c8b8bc23759ee9f3d85011b24fafc91a4b3b5c8cc8185501"
dependencies = [
"fsio",
"indexmap",
]
[[package]]
name = "fsio"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad0ce30be0cc441b325c5d705c8b613a0ca0d92b6a8953d41bd236dc09a36d0"
dependencies = [
"dunce",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hound"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "lz4"
version = "1.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4"
dependencies = [
"lz4-sys",
]
[[package]]
name = "lz4-sys"
version = "1.11.1+lz4-1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "no-comment"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ff23a789e582e05fed839d8576254d86596b9cc896783a508f658c8c55ac2ce"
dependencies = [
"derive_more",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "psxcdgen_ex"
version = "1.1.1"
dependencies = [
"cdtypes",
"clap",
"colored",
"hound",
"no-comment",
"paste",
"roxmltree",
"tool_helper",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "roxmltree"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f"
[[package]]
name = "rustc_version"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
"semver",
]
[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "semver"
version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "tool_helper"
version = "1.0.0"
dependencies = [
"byteorder",
"cdtypes",
"colored",
"envmnt",
"hound",
"lz4",
"paste",
"wslpath",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wslpath"
version = "1.1.0"
dependencies = [
"clap",
]

View File

@ -8,7 +8,7 @@ panic = "abort"
[dependencies]
cdtypes = {path = "../cdtypes"}
clap = {version = "4.5.23", features = ["derive"]}
clap = {version = "4.5.27", features = ["derive"]}
colored = "2.2.0"
hound = "3.5.1"
no-comment = "0.0.3"

331
src/Tools/psxcdread/Cargo.lock generated Normal file
View File

@ -0,0 +1,331 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
dependencies = [
"shlex",
]
[[package]]
name = "cdtypes"
version = "1.0.0"
dependencies = [
"byteorder",
"chrono",
"paste",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "psxcdread"
version = "0.7.0"
dependencies = [
"cdtypes",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

6838
src/Tools/psxfileconv/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -26,13 +26,17 @@ symphonia-pcm = ["symphonia", "symphonia/pcm"]
symphonia-vorbis = ["symphonia", "symphonia/vorbis"]
[dependencies]
bitflags = "2.6.0"
bitflags = "2.8.0"
cdtypes = {path = "../cdtypes"}
clap = {version = "4.5.23", features = ["derive"]}
cpp_out = {path = "../cpp_out"}
clap = {version = "4.5.27", features = ["derive"]}
image = "0.24.9"
hound = "3.5.1"
paste = "1.0.15"
png = "0.17.16"
rubato = "0.16.1"
serde = {version = "1.0.219", features = ["derive"]}
serde_json = "1.0"
symphonia = {version = "0.5.4", optional = true, default-features = false}
tim_tool = {path = "../tim_tool"}
tool_helper = {path = "../tool_helper"}

View File

@ -36,7 +36,8 @@ fn modify_palette(mut image: IndexedImage, clut_align: ClutAlignment, semi_trans
image
}
fn encode<T: PSXImageConverter>(header_conv: &mut dyn HeaderEncoder, image: T, tex_pos: Point, clut_pos: Point, color_depth: ColorType, clut_align: ClutAlignment, output: &mut dyn Write) -> Result<(), Error> {
fn encode<T: PSXImageConverter>(header_conv: &mut dyn HeaderEncoder, image: T, tex_pos: Point, clut_pos: Point, color_depth: ColorType, clut_align: ClutAlignment, output: &mut dyn Write) -> Result<(u16, u16), Error> {
let image_size = (image.width(), image.height());
let (width, height) = {
fn return_error(clut_type: u32, div: u32, width: u16, height: u16) -> Result<(u16, u16), Error> {
return Err(Error::from_callback(|| {format!("CLUT {} images require a width divideable by {} (found width: {}/{}={}, height: {})", clut_type, div, width, div, (width as f32/div as f32), height)}));
@ -115,10 +116,10 @@ fn encode<T: PSXImageConverter>(header_conv: &mut dyn HeaderEncoder, image: T, t
tool_helper::raw::write_raw(output, &color)?;
}
Ok(())
Ok(image_size)
}
fn convert_full16(header_conv: &mut dyn HeaderEncoder, input: Input, output: &mut dyn Write, tex_pos: Point) -> Result<(), Error> {
fn convert_full16(header_conv: &mut dyn HeaderEncoder, input: Input, output: &mut dyn Write, tex_pos: Point) -> Result<(u16, u16), Error> {
match ImageReader::new(Cursor::new(tool_helper::input_to_vec(input)?)).with_guessed_format()?.decode() {
Ok(image) => {
match image {
@ -132,7 +133,7 @@ fn convert_full16(header_conv: &mut dyn HeaderEncoder, input: Input, output: &mu
}
}
fn convert_palette_based(header_conv: &mut dyn HeaderEncoder, input: Input, output: &mut dyn Write, tex_pos: Point, clut_pos: Point, color_type: ColorType, clut_align: ClutAlignment, semi_transparent: bool, transparent_palette: bool) -> Result<(), Error> {
fn convert_palette_based(header_conv: &mut dyn HeaderEncoder, input: Input, output: &mut dyn Write, tex_pos: Point, clut_pos: Point, color_type: ColorType, clut_align: ClutAlignment, semi_transparent: bool, transparent_palette: bool) -> Result<(u16, u16), Error> {
match png::Decoder::new(input).read_info() {
Ok(reader) => {
let output_type = {

View File

@ -7,7 +7,7 @@ use tool_helper::{Error, Input};
pub type Arguments = super::args::Arguments;
pub fn convert(args: Arguments, input: Input, output: &mut dyn Write) -> Result<(), Error> {
pub fn convert(args: Arguments, input: Input, output: &mut dyn Write) -> Result<(u16, u16), Error> {
let mut header_conv = Header::default();
match args.color_depth {
ColorType::Full16 => super::convert_full16(&mut header_conv, input, output, Point::default()),

View File

@ -9,16 +9,16 @@ use tool_helper::{Error, Input};
#[derive(Args)]
pub struct Arguments {
#[clap(flatten)]
global: super::args::Arguments,
pub(crate) global: super::args::Arguments,
#[clap(long, value_parser, default_value_t, value_name = Point::POINT_VALUE_NAME)]
clut_pos: Point,
pub(crate) clut_pos: Point,
#[clap(long, value_parser, default_value_t, value_name = Point::POINT_VALUE_NAME)]
tex_pos: Point,
pub(crate) tex_pos: Point,
}
pub fn convert(args: Arguments, input: Input, output: &mut dyn Write) -> Result<(), Error> {
pub fn convert(args: Arguments, input: Input, output: &mut dyn Write) -> Result<(u16, u16), Error> {
let global_args = args.global;
let mut header_conv = Header::default();

View File

@ -1,3 +1,88 @@
pub mod audio;
pub mod images;
pub mod nothing;
pub mod project;
use crate::audio::*;
use crate::images::*;
use clap::Subcommand;
use std::path::PathBuf;
use tool_helper::Error;
#[derive(Subcommand)]
pub enum SubCommands {
Nothing,
SimpleTIM(reduced_tim::Arguments),
TIM(tim::Arguments),
VAG(vag::Arguments),
XA(xa::Arguments),
Project(project::Arguments),
}
pub fn run_subcommand(compress_lz4: bool, input_path: Option<PathBuf>, output_path: Option<PathBuf>, sub_command: SubCommands) -> Result<Option<(u16, u16)>, Error> {
let mut input = tool_helper::open_input(&input_path)?;
let mut buffer = Vec::<u8>::new();
let mut output_file = tool_helper::open_output(&output_path)?;
let dst_buffer = {
if compress_lz4 {
&mut buffer as &mut dyn std::io::Write
}
else {
&mut output_file as &mut dyn std::io::Write
}
};
let cmd_result: Result<Option<(u16, u16)>, Error> = {
match sub_command {
SubCommands::Nothing => {
nothing::copy(&mut input, dst_buffer)?;
Ok(None)
},
SubCommands::SimpleTIM(args) => {
Ok(Some(reduced_tim::convert(args, input, dst_buffer)?))
},
SubCommands::TIM(args) => {
Ok(Some(tim::convert(args, input, dst_buffer)?))
},
SubCommands::VAG(args) => {
audio::vag::convert(args, &output_path, input, dst_buffer)?;
Ok(None)
}
SubCommands::XA(args) => {
audio::xa::convert(args, input, dst_buffer)?;
Ok(None)
}
SubCommands::Project(args) => {
project::run_project(input, args, input_path, &output_path)?;
if let Some(file_path) = &output_path {
let _result = std::fs::remove_file(file_path);
}
Ok(None)
},
}
};
match cmd_result {
Ok(cmd_result) => {
// We encoded the file to a temporary buffer and now need to write it
if compress_lz4 {
let buffer = tool_helper::compress::psx_default::lz4(&buffer)?;
output_file.write(&buffer)?;
}
Ok(cmd_result)
}
Err(cmd_error) => {
if let Some(file_path) = output_path {
let _result = std::fs::remove_file(file_path);
}
else {
tool_helper::print_warning("Open stream detected! Incomplete file can not be deleted".to_owned());
}
Err(cmd_error)
}
}
}

View File

@ -1,11 +1,11 @@
use clap::{Parser, Subcommand};
use psxfileconv::{audio::{self, *}, images::*, nothing};
use clap::Parser;
use std::path::PathBuf;
use tool_helper::{exit_with_error, Error};
use psxfileconv::{SubCommands, run_subcommand};
use tool_helper::exit_with_error;
#[derive(Parser)]
#[clap(about = "Converts files to various JabyEngine related file formats", long_about = None)]
struct CommandLine {
pub struct CommandLine {
#[clap(long="lz4", default_value_t=false)]
compress_lz4: bool,
@ -19,64 +19,10 @@ struct CommandLine {
sub_command: SubCommands,
}
#[derive(Subcommand)]
enum SubCommands {
Nothing,
SimpleTIM(reduced_tim::Arguments),
TIM(tim::Arguments),
VAG(vag::Arguments),
XA(xa::Arguments),
}
fn run_main(cmd: CommandLine) -> Result<(), Error> {
let mut input = tool_helper::open_input(&cmd.input_file)?;
let mut buffer = Vec::<u8>::new();
let mut output_file = tool_helper::open_output(&cmd.output_file)?;
let dst_buffer = {
if cmd.compress_lz4 {
&mut buffer as &mut dyn std::io::Write
}
else {
&mut output_file as &mut dyn std::io::Write
}
};
let cmd_result: Result<(), Error> = {
match cmd.sub_command {
SubCommands::Nothing => nothing::copy(&mut input, dst_buffer),
SubCommands::SimpleTIM(args) => reduced_tim::convert(args, input, dst_buffer),
SubCommands::TIM(args) => tim::convert(args, input, dst_buffer),
SubCommands::VAG(args) => audio::vag::convert(args, &cmd.output_file, input, dst_buffer),
SubCommands::XA(args) => audio::xa::convert(args, input, dst_buffer),
}
};
if let Err(cmd_error) = cmd_result {
if let Some(file_path) = cmd.output_file {
let _result = std::fs::remove_file(file_path);
}
else {
tool_helper::print_warning("Open stream detected! Incomplete file can not be deleted".to_owned());
}
return Err(cmd_error);
}
// We encoded the file to a temporary buffer and now need to write it
if cmd.compress_lz4 {
let buffer = tool_helper::compress::psx_default::lz4(&buffer)?;
output_file.write(&buffer)?;
}
Ok(())
}
fn main() {
match CommandLine::try_parse() {
Ok(cmd) => {
if let Err(error) = run_main(cmd) {
if let Err(error) = run_subcommand(cmd.compress_lz4, cmd.input_file, cmd.output_file, cmd.sub_command) {
exit_with_error(error);
}
},

View File

@ -0,0 +1,39 @@
use std::path::PathBuf;
use tim_tool::logic::project::Job;
use tool_helper::{Error, Output};
pub struct CppHeader {
file_out: Output,
}
impl CppHeader {
pub fn new(file_path: &Option<PathBuf>) -> Result<CppHeader, Error> {
let mut file_out = tool_helper::open_output(file_path)?;
writeln!(file_out, "#pragma once")?;
writeln!(file_out, "#include <PSX/File/cd_file_types.hpp>")?;
writeln!(file_out, "")?;
Ok(CppHeader{file_out})
}
pub fn push_job(&mut self, job: &Job, size: (u16, u16)) -> Result<(), Error> {
let name = job.name.replace('.', "_");
let (clut_x, clut_y) = if let Some(palette_rect) = &job.palette_rect {(palette_rect.pos.x, palette_rect.pos.y)} else {(0, 0)};
writeln!(self.file_out, "namespace {} {{", name)?;
writeln!(self.file_out, "\tusing namespace JabyEngine;")?;
writeln!(self.file_out, "")?;
writeln!(self.file_out, "\tstatic constexpr auto tim = SimpleTIM::create({}, {}, {}, {});", job.image_pos.x, job.image_pos.y, clut_x, clut_y)?;
writeln!(self.file_out, "\tstatic constexpr auto size = GPU::SizeI16::create({}, {});", size.0, size.1)?;
writeln!(self.file_out, "}}")?;
Ok(())
}
}
impl Drop for CppHeader {
fn drop(&mut self) {
}
}

View File

@ -0,0 +1,90 @@
mod hpp_out;
use crate::images::args::{Arguments as IMGArguments, ClutAlignment, ColorType};
use clap::Args;
use hpp_out::CppHeader;
use std::path::PathBuf;
use tool_helper::{Error, Input};
use tim_tool::logic::{tim::types::Encoding, project::*};
#[derive(Args)]
pub struct Arguments {
#[clap(long="hpp", value_parser)]
hpp_out_path: Option<PathBuf>
}
pub fn run_project(input: Input, args: Arguments, input_path: Option<PathBuf>, output_path: &Option<PathBuf>) -> Result<(), Error> {
let location_path = if let Some(input_path) = input_path {input_path} else {PathBuf::from(".")};
let output_path = if let Some(output_path) = &output_path {
let mut output_path = output_path.clone();
if output_path.is_file() {
output_path.pop();
}
output_path
} else {PathBuf::from(".")};
let project = serde_json::from_reader::<Input, Project>(input).map_err(|error|{Error::from_text(format!("Reading project failed: {}", error))})?;
let mut hpp_out = CppHeader::new(&args.hpp_out_path)?;
for mut job in project.jobs {
let args = to_arguments(&job)?;
let output_path = {
let mut path = output_path.clone();
path.push(&job.name);
path.set_extension("img");
path
};
let sub_command = crate::SubCommands::SimpleTIM(args);
let org_img_size = crate::run_subcommand(job.settings.compress, Some(Job::create_file_path(job.file_path, &location_path)), Some(output_path), sub_command)?;
job.file_path = PathBuf::new();
hpp_out.push_job(&job, org_img_size.unwrap_or((0, 0)))?;
}
Ok(())
}
fn to_arguments(job: &Job) -> Result<IMGArguments, Error> {
let (semi_transparent, transparent_palette) = get_transparency(&job.settings.transparency);
return Ok(IMGArguments {
color_depth: get_encoding(&job.settings.encoding),
clut_align: get_palette_rect(&job.palette_rect)?,
semi_transparent,
transparent_palette,
});
fn get_transparency(transparency: &Transparency) -> (bool, bool) {
match transparency {
Transparency::None => (false, false),
Transparency::FirstColor => (false, true),
Transparency::PSXSemi => (true, false),
Transparency::Both => (true, true),
}
}
fn get_encoding(encoding: &Encoding) -> ColorType {
match encoding {
Encoding::FourBit => ColorType::Clut4,
Encoding::EightBit => ColorType::Clut8,
Encoding::FullColor => ColorType::Full16,
}
}
fn get_palette_rect(rect: &Option<PaletteRect>) -> Result<ClutAlignment, Error> {
if let Some(rect) = rect {
if rect.size.height == 1 {
return Ok(ClutAlignment::Linear);
}
if rect.size.width%16 == 0 {
return Ok(ClutAlignment::Block);
}
return Err(Error::from_text(format!("psxfileconv currently only supports linear or block CLUTs with a width of 16px")));
}
Ok(ClutAlignment::None)
}
}

941
src/Tools/psxreadmap/Cargo.lock generated Normal file
View File

@ -0,0 +1,941 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "allocator-api2"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
"once_cell",
"windows-sys 0.59.0",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bitflags"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cassowary"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
[[package]]
name = "cc"
version = "1.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
dependencies = [
"shlex",
]
[[package]]
name = "cdtypes"
version = "1.0.0"
dependencies = [
"byteorder",
"chrono",
"paste",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets 0.52.6",
]
[[package]]
name = "clap"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.96",
]
[[package]]
name = "clap_lex"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "colored"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.48.0",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "crossterm"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df"
dependencies = [
"bitflags",
"crossterm_winapi",
"libc",
"mio",
"parking_lot",
"signal-hook",
"signal-hook-mio",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
dependencies = [
"winapi",
]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "either"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "envmnt"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d73999a2b8871e74c8b8bc23759ee9f3d85011b24fafc91a4b3b5c8cc8185501"
dependencies = [
"fsio",
"indexmap",
]
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "foldhash"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
[[package]]
name = "fsio"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad0ce30be0cc441b325c5d705c8b613a0ca0d92b6a8953d41bd236dc09a36d0"
dependencies = [
"dunce",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "hashbrown"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
dependencies = [
"allocator-api2",
"equivalent",
"foldhash",
]
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hound"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown 0.12.3",
]
[[package]]
name = "indoc"
version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itertools"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
dependencies = [
"either",
]
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "lock_api"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
"autocfg",
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "lru"
version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
dependencies = [
"hashbrown 0.15.2",
]
[[package]]
name = "lz4"
version = "1.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4"
dependencies = [
"lz4-sys",
]
[[package]]
name = "lz4-sys"
version = "1.11.1+lz4-1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "mio"
version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"log",
"wasi",
"windows-sys 0.48.0",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "parking_lot"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-targets 0.52.6",
]
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "psxreadmap"
version = "1.0.0"
dependencies = [
"clap",
"crossterm",
"ratatui",
"readmap",
"tool_helper",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "ratatui"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5659e52e4ba6e07b2dad9f1158f578ef84a73762625ddb51536019f34d180eb"
dependencies = [
"bitflags",
"cassowary",
"crossterm",
"indoc",
"itertools",
"lru",
"paste",
"stability",
"strum",
"unicode-segmentation",
"unicode-width",
]
[[package]]
name = "readmap"
version = "1.0.0"
dependencies = [
"num-traits",
"tool_helper",
]
[[package]]
name = "redox_syscall"
version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
dependencies = [
"bitflags",
]
[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "signal-hook"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
dependencies = [
"libc",
"signal-hook-registry",
]
[[package]]
name = "signal-hook-mio"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
dependencies = [
"libc",
"mio",
"signal-hook",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
dependencies = [
"libc",
]
[[package]]
name = "smallvec"
version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "stability"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebd1b177894da2a2d9120208c3386066af06a488255caabc5de8ddca22dbc3ce"
dependencies = [
"quote",
"syn 1.0.109",
]
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "strum"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
dependencies = [
"strum_macros",
]
[[package]]
name = "strum_macros"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
dependencies = [
"heck 0.4.1",
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.96",
]
[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "tool_helper"
version = "1.0.0"
dependencies = [
"byteorder",
"cdtypes",
"colored",
"envmnt",
"hound",
"lz4",
"paste",
"wslpath",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "unicode-segmentation"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode-width"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn 2.0.96",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.96",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets 0.48.5",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
"windows_aarch64_gnullvm 0.48.5",
"windows_aarch64_msvc 0.48.5",
"windows_i686_gnu 0.48.5",
"windows_i686_msvc 0.48.5",
"windows_x86_64_gnu 0.48.5",
"windows_x86_64_gnullvm 0.48.5",
"windows_x86_64_msvc 0.48.5",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wslpath"
version = "1.1.0"
dependencies = [
"clap",
]

View File

@ -7,7 +7,7 @@ edition = "2021"
panic = "abort"
[dependencies]
clap = {version = "4.5.23", features = ["derive"]}
clap = {version = "4.5.27", features = ["derive"]}
crossterm = "0.27.0"
ratatui = "0.25.0"
readmap = {version = "*", path = "readmap"}

6503
src/Tools/tim_tool/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
[package]
name = "tim_tool"
version = "1.0.0"
edition = "2021"
[profile.release]
panic = "abort"
[dependencies]
pathdiff = "0.2.3"
png = "0.17.16"
rfd = "0.15.3"
slint = "1.10.0"
serde = {version = "1.0.219", features = ["derive"]}
serde_json = "1.0"
tiny-skia = "0.11.4"
tool_helper = {path = "../tool_helper"}
[build-dependencies]
slint-build = "1.10.0"
[package.metadata.bundle]
name = "TIMTOOL"
identifier = "zone.jabyengine.timtool"
icon = ["ui/assets/TimTool64x64.png"]
copyright = "Copyright (c) 2025 Jaby MIT License"
category = "Developer Tool"
short_description = "TIM Tool for JabyEngine"
long_description = """
A new interpetation of the TIM Tool from Sony, for use with PSYQ and the JabyEngine
"""

View File

@ -0,0 +1,13 @@
include ../Common.mk
ARTIFACT = tim_tool
.PHONY: $(WINDOWS_ARTIFACT) $(UNIX_ARTIFACT)
$(WINDOWS_ARTIFACT):
$(call cargo_windows_default)
$(UNIX_ARTIFACT):
$(call cargo_unix_default)
all-windows: $(WINDOWS_ARTIFACT)
all: $(UNIX_ARTIFACT)

View File

@ -0,0 +1,3 @@
fn main() {
slint_build::compile("ui/app-window.slint").expect("Slint build failed");
}

View File

@ -0,0 +1,252 @@
use std::{fs::File, io::Write, path::PathBuf};
use crate::{gui::{self, main_tab::{MainTab, NewVRAMImageInfo}, MutexTIMManager, VRAM_HEIGHT, VRAM_WIDTH}, MainWindow};
use super::FileTab;
use rfd::FileDialog;
use slint::SharedString;
use tim_tool::logic::{project::{FileSettings, ImagePosition, Job, PaletteRect, Project, Transparency}, tim::types::Encoding, TIMManager};
use tool_helper::Error;
pub(super) fn on_browse_file(tim_manager: MutexTIMManager) -> impl FnMut(&mut FileTab, &MainWindow) -> Result<(), Error> + 'static {
return move |file_tab, main_window| -> Result<(), Error> {
let file = FileDialog::new()
.add_filter("PNG image (.png)", &["png"])
.set_title("PNG image file")
.pick_file();
if let Some(file) = file {
if let Some(file_path) = file.to_str() {
main_window.set_file_tab_browse_path(SharedString::from(file_path));
}
let file_name = if let Some(name) = file.file_name() {Some(name.to_string_lossy().to_string())} else {None};
let (image, palette) = tim_manager.lock().expect("VRAM already locked").load_unadded_tim(&file)?;
let img_size = image.size();
if img_size.width > VRAM_WIDTH as u32 || img_size.height > VRAM_HEIGHT as u32 {
return Err(Error::from_text(format!("Image size ({}; {}) is to big for VRAM ({}, {})", img_size.width, img_size.height, VRAM_WIDTH, VRAM_HEIGHT)));
}
return file_tab.update_new_loaded_file(file_name, image, palette);
}
Ok(())
};
}
pub(super) fn on_update_palette_size(tim_manager: MutexTIMManager) -> impl FnMut(&mut FileTab, &MainWindow, u16, u16) -> Result<(), Error> + 'static {
return move |file_tab, _main_window, width, height| -> Result<(), Error> {
file_tab.update_palette(tim_manager.lock().expect("VRAM already locked").change_unadded_tim_palette_size(width, height)?);
Ok(())
};
}
pub(super) fn on_add_image(tim_manager: MutexTIMManager) -> impl FnMut(&mut FileTab, &mut MainTab, &MainWindow) -> Result<(), Error> + 'static {
return move |file_tab, main_tab, main_window| {
let file_name = file_tab.get_file_name();
let encoding = file_tab.get_encoding()?;
add_unadded_tim(main_tab, &mut tim_manager.lock().expect("VRAM already locked"), UnaddedTIM::new(&file_name, encoding), FileSettings::from_encoding(encoding))?;
file_tab.clear_load();
main_window.invoke_change_to_main();
Ok(())
};
}
pub(super) fn on_load_project_clicked(tim_manager: MutexTIMManager) -> impl FnMut(&mut FileTab, &mut MainTab, &MainWindow) -> Result<(), Error> + 'static {
move |_file_tab, main_tab, main_window| {
let open_location = main_window.get_project_widget_open_project_path();
if open_location.is_empty() {
return Err(Error::from_str("Please specify location for project file to open"));
}
let file_content = tool_helper::read_file_to_string(&PathBuf::from(open_location.as_str()))?;
let new_project = match serde_json::from_str::<Project>(&file_content) {
Ok(project) => project,
Err(error) => {
return Err(Error::from_error(error));
}
};
let mut tim_manager = tim_manager.lock().expect("VRAM already locked");
if !main_window.get_project_widget_append_project_elements() {
clear_all_vram_images(main_tab, &mut tim_manager);
main_window.invoke_clear_file_tab_current_selected_file();
}
for job in new_project.jobs {
let file_path = Job::create_file_path(job.file_path, open_location.as_str());
let (_, _) = tim_manager.load_unadded_tim(&file_path)?;
let (pal_x, pal_y, pal_width, pal_height) = if let Some(palette_rect) = job.palette_rect {palette_rect.into()} else {(0, 0, 0, 0)};
tim_manager.change_unadded_tim_palette_size(pal_width, pal_height)?;
let unadded_tim = UnaddedTIM{
file_name: &job.name,
image_x: job.image_pos.x,
image_y: job.image_pos.y,
palette_x: pal_x,
palette_y: pal_y,
encoding: job.settings.encoding
};
add_unadded_tim(main_tab, &mut tim_manager, unadded_tim, job.settings)?;
}
main_window.invoke_change_to_main();
Ok(())
}
}
pub(super) fn on_save_project_clicked(tim_manager: MutexTIMManager) -> impl FnMut(&mut FileTab, &MainTab, &MainWindow) -> Result<(), Error> + 'static {
move |_file_tab, main_tab, main_window| {
let save_location = main_window.get_project_widget_save_project_path();
if save_location.is_empty() {
return Err(Error::from_str("Please specify save location for project file"));
}
let tim_info = tim_manager.lock().expect("VRAM already locked").clone_added_tims();
let vram_info = main_tab.clone_vram_info();
let use_rel_path = main_window.get_project_widget_use_rel_paths();
if tim_info.len() != vram_info.len() {
return Err(Error::from_str("TIM and VRAM info not in sync! Please close program"));
}
let mut cur_job:Option<Job> = None;
let mut cur_palette:Option<PaletteRect> = None;
let mut map_result = Ok(());
let mut project = Project::new(tim_info.into_iter().zip(vram_info.into_iter()).filter_map(|(tim, (name, vram))| {
if map_result.is_err() {
return None;
}
if vram.is_palette {
let cur_palette = std::mem::replace(&mut cur_palette, None);
if let Some(mut cur_palette) = cur_palette {
cur_palette.pos = ImagePosition::new(vram.x as u16, vram.y as u16);
if let Some(cur_job) = &mut cur_job {
cur_job.palette_rect = Some(cur_palette);
}
}
None
}
else {
// We are done with the old job
let prev_job = std::mem::replace(&mut cur_job, None);
if let Some(tim) = tim {
if let Some((width, height)) = tim.get_palette_size() {
cur_palette = Some(PaletteRect::new(0, 0, width, height));
}
let file_path = if use_rel_path {
match tim.get_path_rel_to(PathBuf::from(save_location.as_str())) {
Ok(file_path) => file_path,
Err(error) => {
map_result = Err(error);
PathBuf::new()
}
}
} else {tim.get_path()};
cur_job = Some(Job::new(name, file_path, (vram.x as u16, vram.y as u16), FileSettings::new(
vram.use_compression,
Transparency::from(vram.trans_setting),
Encoding::from_str(vram.encoding_str.as_str())
)));
}
prev_job
}
}).collect());
map_result?;
if let Some(cur_job) = cur_job {
project.jobs.push(cur_job);
}
let json_content = match serde_json::to_string(&project) {
Ok(json_content) => json_content,
Err(error) => {
return Err(Error::from_error(error));
}
};
let mut file = File::create(save_location)?;
file.write_all(json_content.as_bytes())?;
gui::display_information("Saving project", "Project saved successfully");
Ok(())
}
}
pub(super) fn on_browse_open_project_clicked() -> impl FnMut(&mut FileTab, &MainWindow) -> Result<(), Error> + 'static {
move |_file_tab, main_window| {
let file_path = create_project_file_dialog()
.set_title("Save location for TIM project file")
.pick_file();
if let Some(file_path) = file_path {
if let Some(file_path) = file_path.to_str() {
main_window.set_project_widget_open_project_path(SharedString::from(file_path));
}
}
Ok(())
}
}
pub(super) fn on_browse_save_project_clicked() -> impl FnMut(&mut FileTab, &MainWindow) -> Result<(), Error> + 'static {
move |_file_tab, main_window| {
let file_path = create_project_file_dialog()
.set_title("Save location for TIM project file")
.save_file();
if let Some(file_path) = file_path {
if let Some(file_path) = file_path.to_str() {
main_window.set_project_widget_save_project_path(SharedString::from(file_path));
}
}
Ok(())
}
}
struct UnaddedTIM<'a> {
pub file_name: &'a String,
pub image_x: u16,
pub image_y: u16,
pub palette_x: u16,
pub palette_y: u16,
pub encoding: Encoding,
}
impl<'a> UnaddedTIM<'a> {
pub fn new(file_name: &String, encoding: Encoding,) -> UnaddedTIM {
UnaddedTIM{file_name, image_x: 0, image_y: 0, palette_x: 0, palette_y: 0, encoding}
}
}
fn add_unadded_tim(main_tab: &mut MainTab, tim_manager: &mut TIMManager, unadded_tim: UnaddedTIM, settings: FileSettings) -> Result<(), Error> {
let (image, palette_image) = tim_manager.get_converted_unadded_tim_image(unadded_tim.encoding)?;
let (full_image, _) = tim_manager.get_converted_unadded_tim_image(Encoding::FullColor)?;
let image = NewVRAMImageInfo::new(image, unadded_tim.image_x, unadded_tim.image_y, settings);
let palette_image = if let Some(palette_image) = palette_image { Some(NewVRAMImageInfo::new(palette_image, unadded_tim.palette_x, unadded_tim.palette_y, FileSettings::from_encoding(Encoding::FullColor))) } else { None };
let images_created = main_tab.add_new_vram_file(unadded_tim.file_name, full_image, image, palette_image);
if let Err(error) = tim_manager.add_unadded_tim(images_created) {
main_tab.pop_vram_files(images_created);
return Err(error);
}
Ok(())
}
fn clear_all_vram_images(main_tab: &mut MainTab, tim_manager: &mut TIMManager) {
tim_manager.clear();
main_tab.clear();
}
fn create_project_file_dialog() -> FileDialog {
FileDialog::new()
.add_filter("TIM project file (.tim_project)", &["tim_project"])
.add_filter("JSON file (.json; .jsn)", &["json", "jsn"])
.add_filter("All", &["*"])
}

View File

@ -0,0 +1,188 @@
mod callbacks;
use crate::gui::MutexTIMManager;
use super::{main_tab::SharedMainTab, MainWindowRef, display_error};
use slint::{Image, SharedString};
use std::{cell::RefCell, rc::Rc};
use tim_tool::logic::tim::types::Encoding;
use tool_helper::Error;
pub struct FileTab {
main_window: MainWindowRef,
encoding_options: Rc<slint::VecModel<SharedString>>
}
pub type SharedFileTab = Rc<RefCell<FileTab>>;
impl FileTab {
fn update_encoding_options(&self, width: u32, height: u32, has_palette: bool) -> Result<&str, Error> {
self.encoding_options.clear();
if has_palette {
let mut selected_str = Encoding::EightBit.to_str();
let has_4bit = width%4 == 0;
let has_8bit = width%2 == 0;
if !has_4bit && !has_8bit {
return Err(Error::from_text(format!("Image width must be multiple of 2 and or 4 ({}/{})", width, height)));
}
if has_4bit {
self.encoding_options.push(SharedString::from(format!("{} ({}/{})", Encoding::FourBit.to_str(), width/4, height)));
selected_str = Encoding::FourBit.to_str();
}
if has_8bit {
self.encoding_options.push(SharedString::from(format!("{} ({}/{})", Encoding::EightBit.to_str(), width/2, height)));
}
Ok(selected_str)
}
else {
self.encoding_options.push(SharedString::from(format!("{} ({}/{})", Encoding::FullColor.to_str(), width, height)));
Ok(Encoding::FullColor.to_str())
}
}
pub fn new(main_window: MainWindowRef, main_tab: SharedMainTab, tim_manager: MutexTIMManager) -> SharedFileTab {
let encoding_options = Rc::new(slint::VecModel::from(Vec::<SharedString>::new()));
main_window.borrow().set_file_tab_encoding_options(encoding_options.clone().into());
let object = Rc::new(RefCell::new(FileTab{main_window: main_window.clone(), encoding_options}));
// Image conv functions
let (cloned_object, cloned_main_window, mut function) = (object.clone(), main_window.clone(), callbacks::on_browse_file(tim_manager.clone()));
main_window.borrow().on_file_tab_browse_convert_image(move || {
if let Err(error) = function(&mut cloned_object.borrow_mut(), &cloned_main_window.borrow()) {
display_error("Loading file failed", &error.to_string());
}
});
let (cloned_object, cloned_main_window, mut function) = (object.clone(), main_window.clone(), callbacks::on_update_palette_size(tim_manager.clone()));
main_window.borrow().on_file_tab_update_palette_size(move |width, height| {
if let Err(error) = function(&mut cloned_object.borrow_mut(), &cloned_main_window.borrow(), width as u16, height as u16) {
display_error("Updating palette failed", &error.to_string());
}
});
let (cloned_object, cloned_main_tab, cloned_main_window, mut function) = (object.clone(), main_tab.clone(), main_window.clone(), callbacks::on_add_image(tim_manager.clone()));
main_window.borrow().on_file_tab_add_convert_image(move || {
if let Err(error) = function(&mut cloned_object.borrow_mut(), &mut cloned_main_tab.borrow_mut(), &cloned_main_window.borrow()) {
display_error("Adding file failed", &error.to_string());
}
});
// Project functions
let (cloned_object, cloned_main_tab, cloned_main_window, mut function) = (object.clone(), main_tab.clone(), main_window.clone(), callbacks::on_load_project_clicked(tim_manager.clone()));
main_window.borrow().on_project_widget_load_project_clicked(move || {
if let Err(error) = function(&mut cloned_object.borrow_mut(), &mut cloned_main_tab.borrow_mut(), &cloned_main_window.borrow()) {
display_error("Loading project failed", &error.to_string());
}
});
let (cloned_object, cloned_main_tab, cloned_main_window, mut function) = (object.clone(), main_tab.clone(), main_window.clone(), callbacks::on_save_project_clicked(tim_manager.clone()));
main_window.borrow().on_project_widget_save_project_clicked (move || {
if let Err(error) = function(&mut cloned_object.borrow_mut(), &cloned_main_tab.borrow(), &cloned_main_window.borrow()) {
display_error("Saving project failed", &error.to_string());
}
});
let (cloned_object, cloned_main_window, mut function) = (object.clone(), main_window.clone(), callbacks::on_browse_open_project_clicked());
main_window.borrow().on_project_widget_browse_open_project_clicked (move || {
if let Err(error) = function(&mut cloned_object.borrow_mut(), &cloned_main_window.borrow()) {
display_error("Browsing project failed", &error.to_string());
}
});
let (cloned_object, cloned_main_window, mut function) = (object.clone(), main_window.clone(), callbacks::on_browse_save_project_clicked());
main_window.borrow().on_project_widget_browse_save_project_clicked(move || {
if let Err(error) = function(&mut cloned_object.borrow_mut(), &cloned_main_window.borrow()) {
display_error("Browsing save location failed", &error.to_string());
}
});
object
}
pub fn clear_load(&self) {
let main_window = self.main_window.borrow();
self.encoding_options.clear();
main_window.set_file_tab_browse_path("".into());
main_window.set_file_tab_image_data(Image::default());
main_window.set_file_tab_image_width(0);
main_window.set_file_tab_image_height(0);
main_window.set_file_tab_palette_data(Image::default());
main_window.set_file_tab_palette_width(0);
main_window.set_file_tab_palette_height(0);
main_window.set_file_tab_image_name("".into());
main_window.set_file_tab_enable(false);
}
pub fn update_new_loaded_file(&self, file_name: Option<String>, image: Image, palette: Option<Image>) -> Result<(), Error> {
let has_palette = palette.is_some();
self.update_palette(palette);
let main_window = self.main_window.borrow();
let image_size = image.size();
main_window.set_file_tab_image_data(image);
main_window.set_file_tab_image_width(image_size.width as i32);
main_window.set_file_tab_image_height(image_size.height as i32);
if let Some(file_name) = file_name {
main_window.set_file_tab_image_name(file_name.into());
}
else {
main_window.set_file_tab_image_name("".into());
}
main_window.set_file_tab_selected_encoding(SharedString::from(self.update_encoding_options(image_size.width, image_size.height, has_palette)?));
main_window.set_file_tab_enable(true);
Ok(())
}
pub fn update_palette(&self, palette: Option<Image>) {
let main_window = self.main_window.borrow();
if let Some(palette) = palette {
let size = palette.size();
main_window.set_file_tab_palette_data(palette);
main_window.set_file_tab_palette_width(size.width as i32);
main_window.set_file_tab_palette_height(size.height as i32);
main_window.set_file_tab_palette_visible(true);
}
else {
main_window.set_file_tab_palette_width(0);
main_window.set_file_tab_palette_height(0);
main_window.set_file_tab_palette_visible(false);
}
}
pub fn get_file_name(&self) -> String {
self.main_window.borrow().get_file_tab_image_name().to_string()
}
pub fn get_encoding(&self) -> Result<Encoding, Error> {
let selected_encoding = self.main_window.borrow().get_file_tab_selected_encoding();
if selected_encoding.starts_with(Encoding::FourBit.to_str()) {
Ok(Encoding::FourBit)
}
else if selected_encoding.starts_with(Encoding::EightBit.to_str()) {
Ok(Encoding::EightBit)
}
else if selected_encoding.starts_with(Encoding::FullColor.to_str()) {
Ok(Encoding::FullColor)
}
else {
Err(Error::from_str("Failed to obtain encoding"))
}
}
}

View File

@ -0,0 +1,19 @@
use crate::{gui::MutexTIMManager, MainWindow, display_information};
use super::MainTab;
pub fn on_move_vram_image() -> impl FnMut(&mut MainTab, &MainWindow, i32, i32, i32) + 'static {
return move |main_tab, _main_window, idx, dx, dy| {
main_tab.move_vram_image(idx as usize, dx, dy);
}
}
pub fn on_remove_file(tim_manager: MutexTIMManager) -> impl FnMut(&mut MainTab, &MainWindow, i32) + 'static {
return move |main_tab, _main_window, idx| {
if idx >= 0 {
match main_tab.remove_vram_file(idx as usize) {
Ok(range) => tim_manager.lock().expect("VRAM already locked").remove_added_tim(range),
Err(error) => display_information("Removing VRAM file", error)
}
}
}
}

View File

@ -0,0 +1,189 @@
mod callbacks;
use crate::{gui::{MutexTIMManager, VRAM_HEIGHT, VRAM_WIDTH}, VRAMImgData, VRAMInfo, VRAMData};
use super::MainWindowRef;
use slint::{Model, SharedString};
use std::{cell::RefCell, ops::RangeInclusive, rc::Rc, sync::{Arc, Mutex}};
use tim_tool::logic::project::FileSettings;
pub struct NewVRAMImageInfo {
pub image: slint::Image,
pub x: u16,
pub y: u16,
pub settings: FileSettings,
}
impl NewVRAMImageInfo {
pub fn new(image: slint::Image, x: u16, y: u16, settings: FileSettings) -> NewVRAMImageInfo {
NewVRAMImageInfo{image, x, y, settings}
}
}
struct VRAM {
count: usize,
file_list: Rc<slint::VecModel<slint::StandardListViewItem>>,
info: Rc<slint::VecModel<VRAMData>>
}
impl VRAM {
pub fn push(&mut self, name: slint::StandardListViewItem, image: VRAMData) {
self.file_list.push(name);
self.info.push(image);
self.count += 1;
}
pub fn remove(&mut self, idx: usize) {
self.count -= 1;
self.file_list.remove(idx);
self.info.remove(idx);
}
pub fn pop(&mut self) {
self.remove(self.count - 1);
}
}
pub struct MainTab {
vram: Arc<Mutex<VRAM>>,
}
pub type SharedMainTab = Rc<RefCell<MainTab>>;
impl MainTab {
pub fn new(main_window: MainWindowRef, tim_manager: MutexTIMManager) -> SharedMainTab {
let vram_file_list:Vec<slint::StandardListViewItem> = main_window.borrow().get_main_tab_vram_file_list().iter().collect();
let vram_file_list = Rc::new(slint::VecModel::from(vram_file_list));
let info = Rc::new(slint::VecModel::from(Vec::<VRAMData>::new()));
main_window.borrow().set_main_tab_vram_file_list(vram_file_list.clone().into());
main_window.borrow().set_main_tab_vram_data(info.clone().into());
let object = SharedMainTab::new(MainTab{vram: Arc::new(Mutex::new(VRAM{count: 0, file_list: vram_file_list, info}))}.into());
let (cloned_object, cloned_main_window, mut function) = (object.clone(), main_window.clone(), callbacks::on_move_vram_image());
main_window.borrow().on_move_vram_image(move |idx, dx, dy| {
function(&mut cloned_object.borrow_mut(), &cloned_main_window.borrow(), idx, dx, dy);
});
let (cloned_object, cloned_main_window, mut function) = (object.clone(), main_window.clone(), callbacks::on_remove_file(tim_manager));
main_window.borrow().on_main_tab_remove_file_clicked(move |idx| {
function(&mut cloned_object.borrow_mut(), &cloned_main_window.borrow(), idx);
});
object
}
pub fn clear(&mut self) {
let mut vram_data = self.vram.lock().expect("VRAM already locked");
let count = vram_data.count;
for _ in 0..count {
vram_data.pop();
}
}
pub fn add_new_vram_file(&mut self, file_name: &String, full_image: slint::Image, texture: NewVRAMImageInfo, image_palette: Option<NewVRAMImageInfo>) -> usize {
let mut vram_data = self.vram.lock().expect("VRAM already locked");
let mut add_new_image = |file_name: &String, full_image: slint::Image, vram_image: NewVRAMImageInfo, palette_count: i32, is_palette: bool| {
let encoding_str = if is_palette {"<Palette>"} else {vram_image.settings.encoding.to_str()};
let vram_image = VRAMData {
images: VRAMImgData {
full_image,
image: vram_image.image,
},
info: VRAMInfo {
x: vram_image.x as i32,
y: vram_image.y as i32,
encoding_str: SharedString::from(encoding_str),
use_compression: vram_image.settings.compress,
trans_setting: vram_image.settings.transparency.as_idx(),
palette_count,
is_palette,
}
};
vram_data.push(slint::StandardListViewItem::from(file_name.as_str()), vram_image);
};
let mut images_added = 1;
add_new_image(file_name, full_image, texture, if image_palette.is_some() {1} else {0}, false);
if let Some(image_palette) = image_palette {
let file_name = " => ".to_owned() + file_name.as_str() + " (Palette)";
images_added += 1;
add_new_image(&file_name, image_palette.image.clone(), image_palette, 0, true);
}
images_added
}
pub fn remove_vram_file(&mut self, idx: usize) -> Result<RangeInclusive<usize>, &'static str> {
let mut vram_data = self.vram.lock().expect("VRAM already locked");
let extras = {
if let Some(element) = vram_data.info.iter().skip(idx).next() {
if element.info.is_palette {
return Err("Can not remove palette. Delete image instead");
}
else {
element.info.palette_count as usize
}
}
else {
0
}
};
let range = idx..=idx+extras;
let mut remove_image = |idx: usize| {
vram_data.remove(idx);
};
for _ in range.clone() {
remove_image(idx);
}
return Ok(range);
}
pub fn pop_vram_files(&mut self, count: usize) {
let mut vram_data = self.vram.lock().expect("VRAM already locked");
for _ in 0..count {
vram_data.pop();
}
}
pub fn move_vram_image(&mut self, idx: usize, dx: i32, dy: i32) {
let vram_data = self.vram.lock().expect("VRAM already locked");
if let Some(mut vram_info) = vram_data.info.row_data(idx) {
vram_info.info.x += dx;
vram_info.info.y += dy;
if vram_info.info.x < 0 {
vram_info.info.x = 0;
}
if vram_info.info.y < 0 {
vram_info.info.y = 0;
}
let (vram_img_width, vram_img_height) = (vram_info.images.image.size().width as i32, vram_info.images.image.size().height as i32);
if (vram_info.info.x + vram_img_width) > VRAM_WIDTH as i32 {
vram_info.info.x = VRAM_WIDTH as i32 - vram_img_width;
}
if (vram_info.info.y + vram_img_height) > VRAM_HEIGHT as i32 {
vram_info.info.y = VRAM_HEIGHT as i32 - vram_img_height;
}
vram_data.info.set_row_data(idx, vram_info);
}
}
pub fn clone_vram_info(&self) -> Vec<(String, VRAMInfo)> {
let vram_data = self.vram.lock().expect("VRAM already locked");
vram_data.info.iter().zip(vram_data.file_list.iter()).map(|(vram_data, file_name)| {
(file_name.text.to_string(), vram_data.info.clone())
}).collect()
}
}

View File

@ -0,0 +1,73 @@
mod file_tab;
mod main_tab;
use crate::MainWindow;
use file_tab::{FileTab, SharedFileTab};
use main_tab::{MainTab, SharedMainTab};
use rfd::MessageDialog;
use std::{cell::RefCell, rc::Rc, sync::Mutex};
use slint::{Rgba8Pixel, SharedPixelBuffer};
use tim_tool::logic::TIMManager;
use tiny_skia::{Rect, Transform};
type MainWindowRef = Rc<RefCell<MainWindow>>;
pub type MutexTIMManager = Rc<Mutex<TIMManager>>;
pub const VRAM_WIDTH:usize = 1024;
pub const VRAM_HEIGHT:usize = 512;
pub struct GUIElements {
_file_tab: SharedFileTab,
_main_tab: SharedMainTab,
}
impl GUIElements {
pub fn new(main_window: MainWindowRef, tim_manager: MutexTIMManager) -> Result<GUIElements, slint::PlatformError> {
main_window.borrow().set_main_tab_vram_bg(GUIElements::create_bg()?);
let _main_tab = MainTab::new(main_window.clone(), tim_manager.clone());
let _file_tab = FileTab::new(main_window.clone(), _main_tab.clone(), tim_manager);
Ok(GUIElements{_file_tab, _main_tab})
}
fn create_bg() -> Result<slint::Image, slint::PlatformError> {
Ok(slint::Image::from_rgba8_premultiplied(create_vram_bg(320, 256).ok_or(slint::PlatformError::Other("Failed creating VRAM background image".to_string()))?))
}
}
pub fn display_information(title: impl Into<String>, text: impl Into<String>) {
MessageDialog::new().set_title(title).set_level(rfd::MessageLevel::Info).set_description(text).show();
}
pub fn display_error(title: impl Into<String>, text: impl Into<String>) {
MessageDialog::new().set_title(title).set_level(rfd::MessageLevel::Error).set_description(text).show();
}
fn create_vram_bg(rect_width: u32, rect_height: u32) -> Option<SharedPixelBuffer<Rgba8Pixel>> {
let mut pixel_buffer = SharedPixelBuffer::<Rgba8Pixel>::new(VRAM_WIDTH as u32, VRAM_HEIGHT as u32);
let width = pixel_buffer.width();
let height = pixel_buffer.height();
if let Some(mut pixmap) = tiny_skia::PixmapMut::from_bytes(pixel_buffer.make_mut_bytes(), width, height) {
let vram_color = tiny_skia::Color::from_rgba8(0x0, 0x80, 0x80, 0xFF);
let display_buffer_color = tiny_skia::Color::from_rgba8(0x0, 0x80, 0x0, 0xFF);
let draw_area_color = tiny_skia::Color::from_rgba8(0x80, 0x80, 0x0, 0xFF);
let mut paint = tiny_skia::Paint::default();
pixmap.fill(vram_color);
paint.set_color(display_buffer_color);
pixmap.fill_rect(Rect::from_xywh(0.0, 0.0, rect_width as f32, rect_height as f32).unwrap(), &paint, Transform::identity(), None);
paint.set_color(draw_area_color);
pixmap.fill_rect(Rect::from_xywh(0.0, rect_height as f32, rect_width as f32, rect_height as f32).unwrap(), &paint, Transform::identity(), None);
Some(pixel_buffer)
}
else {
None
}
}

View File

@ -0,0 +1 @@
pub mod logic;

View File

@ -0,0 +1,5 @@
pub mod project;
pub mod tim;
pub mod tim_mgr;
pub use tim_mgr::TIMManager;

View File

@ -0,0 +1,164 @@
use super::tim::types::Encoding;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
#[derive(Serialize, Deserialize)]
pub struct FileSettings {
pub compress: bool,
pub transparency: Transparency,
pub encoding: Encoding,
}
impl FileSettings {
pub fn new(compress: bool, transparency: Transparency, encoding: Encoding) -> FileSettings {
FileSettings{compress, transparency, encoding}
}
pub fn from_encoding(encoding: Encoding) -> FileSettings {
let mut new_type = FileSettings::default();
new_type.encoding = encoding;
new_type
}
}
impl std::default::Default for FileSettings {
fn default() -> Self {
Self{compress: Default::default(), transparency: Transparency::None, encoding: Encoding::FullColor}
}
}
#[derive(Serialize, Deserialize)]
pub struct Job {
pub name: String,
pub file_path: PathBuf,
pub image_pos: ImagePosition,
pub palette_rect: Option<PaletteRect>,
pub settings: FileSettings,
}
impl Job {
pub fn new(name: String, file_path: PathBuf, image_pos: (u16, u16), settings: FileSettings) -> Job {
Job{name, file_path, image_pos: ImagePosition{x: image_pos.0, y: image_pos.1}, palette_rect: None, settings}
}
pub fn create_file_path<T:?Sized + std::convert::AsRef<std::ffi::OsStr>>(file_path: PathBuf, location_path: &T) -> PathBuf {
if file_path.is_file() {
file_path
}
else {
let mut new_file_path = PathBuf::from(location_path);
new_file_path.pop();
new_file_path.push(file_path);
new_file_path
}
}
}
#[derive(Serialize, Deserialize)]
pub struct Project {
pub jobs: Vec<Job>
}
impl Project {
pub fn new(jobs: Vec<Job>) -> Project {
Project{jobs}
}
}
#[derive(Serialize, Deserialize)]
pub struct ImagePosition {
pub x: u16,
pub y: u16,
}
impl ImagePosition {
pub fn new(x: u16, y: u16) -> ImagePosition {
ImagePosition{x, y}
}
}
impl std::default::Default for ImagePosition {
fn default() -> Self {
ImagePosition::new(0, 0)
}
}
#[derive(Clone, Copy, Serialize, Deserialize)]
pub struct ImageSize {
pub width: u16,
pub height: u16,
}
impl ImageSize {
pub fn new(width: u16, height: u16) -> ImageSize {
ImageSize{width, height}
}
}
impl From<ImageSize> for (u16, u16) {
fn from(value: ImageSize) -> Self {
(value.width, value.height)
}
}
impl std::default::Default for ImageSize {
fn default() -> Self {
ImageSize::new(0, 0)
}
}
#[derive(Serialize, Deserialize)]
pub struct PaletteRect {
pub pos: ImagePosition,
pub size: ImageSize,
}
impl PaletteRect {
pub fn new(x: u16, y: u16, width: u16, height: u16) -> PaletteRect {
PaletteRect{pos: ImagePosition{x, y}, size: ImageSize{width, height}}
}
}
impl From<PaletteRect> for (u16, u16, u16, u16) {
fn from(value: PaletteRect) -> Self {
(value.pos.x, value.pos.y, value.size.width, value.size.height)
}
}
impl std::default::Default for PaletteRect {
fn default() -> Self {
PaletteRect{pos: ImagePosition::default(), size: ImageSize::default()}
}
}
#[derive(Serialize, Deserialize)]
pub enum Transparency {
None,
FirstColor,
PSXSemi,
Both,
}
impl Transparency {
pub fn from(selection: i32) -> Transparency {
match selection {
0 => Transparency::None,
1 => Transparency::FirstColor,
2 => Transparency::PSXSemi,
3 => Transparency::Both,
_ => Transparency::None,
}
}
pub fn as_idx(&self) -> i32 {
match self {
Transparency::None => 0,
Transparency::FirstColor => 1,
Transparency::PSXSemi => 2,
Transparency::Both => 3,
}
}
}

View File

@ -0,0 +1,170 @@
pub mod types;
use pathdiff::diff_paths;
use std::{fs::File, path::PathBuf};
use slint::{Rgba8Pixel, SharedPixelBuffer};
use tool_helper::Error;
use types::Encoding;
#[derive(Clone)]
pub struct TIMInfo {
path: PathBuf,
image_data: SharedPixelBuffer<Rgba8Pixel>,
palette: Option<PaletteInfo>,
}
impl TIMInfo {
pub fn from_image(path: &PathBuf) -> Result<TIMInfo, Error> {
fn make_color(iter: &mut dyn std::iter::Iterator<Item = &u8>, load_alpha: bool) -> Option<Rgba8Pixel> {
Some(Rgba8Pixel::new(
*iter.next()?, *iter.next()?, *iter.next()?,
if load_alpha {*iter.next()?} else {0xFF}))
}
let mut reader = png::Decoder::new(File::open(path).map_err(|error| Error::from_text(format!("Failed loading \"{}\" with {}", path.to_string_lossy().as_ref(), error)))?).read_info().or_else(|error| {Err(Error::from_error(error))})?;
let info = reader.info().clone();
let mut buffer = vec![0; reader.output_buffer_size()];
let frame_info = reader.next_frame(&mut buffer).or_else(|error| {Err(Error::from_error(error))})?;
let bytes_per_pixel = info.bytes_per_pixel();
let bit_depth = frame_info.bit_depth;
let mut image_data = SharedPixelBuffer::new(frame_info.width, frame_info.height);
let mut dst_pixels = image_data.make_mut_slice();
if info.color_type == png::ColorType::Indexed {
let palette = info.palette.ok_or(Error::from_str("Found indexed PNG without palette"))?;
let mut palette_colors = Vec::new();
let mut iter = palette.iter();
while let Some(color) = make_color(&mut iter, false) {
palette_colors.push(color);
}
for byte in buffer.into_iter() {
match bit_depth {
png::BitDepth::Four => {
dst_pixels[0] = palette_colors[(byte >> 4) as usize];
dst_pixels[1] = palette_colors[(byte & 0xF) as usize];
dst_pixels = &mut dst_pixels[2..];
},
png::BitDepth::Eight => {
dst_pixels[0] = palette_colors[byte as usize];
dst_pixels = &mut dst_pixels[1..];
},
_ => {return Err(Error::from_str("Only 4 and 8bit color depth are supported for indexed color images"));}
}
}
Ok(TIMInfo{path: path.clone(), image_data, palette: Some(PaletteInfo::new(palette_colors))})
}
else {
if bytes_per_pixel != 3 && bytes_per_pixel != 4 {
return Err(Error::from_text(format!("Image has {} bytes per pixel, but only 3 and 4 bytes per pixel are supported", bytes_per_pixel)));
}
let mut byte_iter = buffer.iter();
while let Some(color) = make_color(&mut byte_iter, bytes_per_pixel == 4) {
match bit_depth {
png::BitDepth::Eight => {
dst_pixels[0] = color;
dst_pixels = &mut dst_pixels[1..];
}
_ => {return Err(Error::from_str("Only 8bit color depth are supported for direct color images"));}
}
}
Ok(TIMInfo{path: path.clone(), image_data, palette: None})
}
}
pub fn change_palette_size(&mut self, width: u16, height: u16) -> Result<Option<slint::Image>, Error> {
if let Some(palette) = &mut self.palette {
if width == 0 || height == 0 {
return Err(Error::from_text(format!("{}px x {}px is not a valid size for palette", width, height)));
}
palette.width = width;
palette.height = height;
Ok(Some(palette.get_image()))
}
else {
Ok(None)
}
}
pub fn get_slint_images(&self, encoding: Encoding) -> (slint::Image, Option<slint::Image>) {
fn scaled_copy(src: &SharedPixelBuffer<Rgba8Pixel>, factor: u32) -> SharedPixelBuffer<Rgba8Pixel> {
let mut image_data = SharedPixelBuffer::<Rgba8Pixel>::new(src.width()/factor, src.height());
let mut dst_pixel = image_data.make_mut_slice();
let src_pixel = src.as_slice();
for (idx, pixel) in src_pixel.into_iter().enumerate() {
if idx%factor as usize == 0 {
dst_pixel[0] = *pixel;
dst_pixel = &mut dst_pixel[1..];
}
}
image_data
}
let image_data = match encoding {
Encoding::FourBit => scaled_copy(&self.image_data, 4),
Encoding::EightBit => scaled_copy(&self.image_data, 2),
Encoding::FullColor => self.image_data.clone()
};
(slint::Image::from_rgba8_premultiplied(image_data), if let Some(palette) = &self.palette {
Some(palette.get_image())
} else {
None
})
}
pub fn get_palette_size(&self) -> Option<(u16, u16)> {
if let Some(palette_info) = &self.palette {
Some((palette_info.width, palette_info.height))
}
else {
None
}
}
pub fn get_path(&self) -> std::path::PathBuf {
self.path.clone()
}
pub fn get_path_rel_to(&self, mut reference_path: std::path::PathBuf) -> Result<std::path::PathBuf, Error> {
let file_path = self.path.clone();
reference_path.pop();
diff_paths(&file_path, &reference_path).ok_or_else(|| {
Error::from_text(format!("Can not create relative path from {} to {}", file_path.to_string_lossy().as_ref(), reference_path.to_string_lossy().as_ref()))
})
}
}
#[derive(Clone)]
struct PaletteInfo {
data: Vec<Rgba8Pixel>,
width: u16,
height: u16,
}
impl PaletteInfo {
pub fn new(data: Vec<Rgba8Pixel>) -> PaletteInfo {
let width = if data.len() <= 16 {16} else {256};
PaletteInfo{data, width, height: 1}
}
pub fn get_image(&self) -> slint::Image {
let mut image_data = SharedPixelBuffer::new(self.width as u32, self.height as u32);
let dst_pixels = image_data.make_mut_slice();
for (idx, byte) in dst_pixels.iter_mut().enumerate() {
*byte = if idx < self.data.len() {self.data[idx]} else {Rgba8Pixel::new(0, 0, 0, 0xFF)};
}
slint::Image::from_rgba8_premultiplied(image_data.clone())
}
}

View File

@ -0,0 +1,31 @@
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Deserialize, Serialize)]
pub enum Encoding {
FourBit,
EightBit,
FullColor,
}
impl Encoding {
const FOUR_BIT_NAME:&str = "4 bit";
const EIGHT_BIT_NAME:&str = "8 bit";
const FULL_COLOR_NAME:&str = "Full color";
pub const fn to_str(&self) -> &str {
match self {
Encoding::FourBit => Self::FOUR_BIT_NAME,
Encoding::EightBit => Self::EIGHT_BIT_NAME,
Encoding::FullColor => Self::FULL_COLOR_NAME,
}
}
pub fn from_str(str: &str) -> Encoding {
match str {
Self::FOUR_BIT_NAME => Encoding::FourBit,
Self::EIGHT_BIT_NAME => Encoding::EightBit,
Self::FULL_COLOR_NAME => Encoding::FullColor,
_ => Encoding::FullColor,
}
}
}

View File

@ -0,0 +1,80 @@
use slint::Image;
use std::{ops::RangeInclusive, path::PathBuf};
use super::tim::{types::Encoding, TIMInfo};
use tool_helper::Error;
pub struct TIMManager {
added_tims: Vec<Option<TIMInfo>>,
unadded_tim: Option<TIMInfo>,
}
impl TIMManager {
pub fn new() -> TIMManager {
TIMManager{added_tims: Default::default(), unadded_tim: None}
}
pub fn clear(&mut self) {
self.added_tims.clear();
}
pub fn remove_added_tim(&mut self, range: RangeInclusive<usize>) {
let idx = *range.start();
for _ in range {
self.added_tims.remove(idx);
}
}
pub fn load_unadded_tim(&mut self, path: &PathBuf) -> Result<(Image, Option<Image>), Error> {
let tim_info = TIMInfo::from_image(path)?;
let image = tim_info.get_slint_images(Encoding::FullColor);
self.unadded_tim = Some(tim_info);
Ok(image)
}
pub fn get_converted_unadded_tim_image(&self, encoding: Encoding) -> Result<(Image, Option<Image>), Error> {
if let Some(unadded_tim) = &self.unadded_tim {
let (image, palette) = unadded_tim.get_slint_images(encoding);
Ok((image, palette))
}
else {
Err(Error::from_str("No data found for loaded image"))
}
}
pub fn add_unadded_tim(&mut self, images_added: usize) -> Result<(), Error> {
if let Some(_) = &self.unadded_tim {
if images_added >= 1 {
self.added_tims.push(std::mem::replace(&mut self.unadded_tim, None));
for _ in 0..(images_added - 1) {
self.added_tims.push(None);
}
Ok(())
}
else {
Err(Error::from_str("Can not add 0 images"))
}
}
else {
Err(Error::from_str("No data found for loaded image"))
}
}
pub fn change_unadded_tim_palette_size(&mut self, width: u16, height: u16) -> Result<Option<Image>, Error> {
if let Some(unadded_tim) = &mut self.unadded_tim {
unadded_tim.change_palette_size(width, height)
}
else {
Ok(None)
}
}
pub fn clone_added_tims(&self) -> Vec<Option<TIMInfo>> {
self.added_tims.clone()
}
}

View File

@ -0,0 +1,51 @@
// Prevent console window in addition to Slint window in Windows release builds when, e.g., starting the app via file manager. Ignored on other platforms.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
mod gui;
use gui::{GUIElements, display_information};
use std::{cell::RefCell, rc::Rc, sync::Mutex};
use slint::SharedString;
use tim_tool::logic::TIMManager;
slint::include_modules!();
struct Application {
main_window: Rc<RefCell<MainWindow>>,
_gui_elements: Rc<RefCell<GUIElements>>,
_tim_manager: Rc<Mutex<TIMManager>>,
}
impl Application {
fn new() -> Result<Application, slint::PlatformError> {
let main_window = Rc::new(RefCell::new(MainWindow::new()?));
let _tim_manager = Rc::new(Mutex::new(TIMManager::new()));
Ok(Application{
main_window: main_window.clone(),
_gui_elements: Rc::new(RefCell::new(GUIElements::new(main_window.clone(), _tim_manager.clone())?)),
_tim_manager,
})
}
fn setup(&self) {
self.setup_about_tab();
}
fn run(&self) -> Result<(), slint::PlatformError> {
let main_window = self.main_window.borrow();
main_window.run()
}
fn setup_about_tab(&self) {
const VERSION: &str = env!("CARGO_PKG_VERSION");
self.main_window.borrow().invoke_set_version(SharedString::from(VERSION));
}
}
fn main() -> Result<(), slint::PlatformError> {
let application = Application::new()?;
application.setup();
application.run()
}

View File

@ -0,0 +1,90 @@
import { AboutTab } from "./tab/about-tab.slint";
import { FileTab, State } from "./tab/file-tab.slint";
import { MainTab } from "./tab/main-tab.slint";
import { TabWidget } from "std-widgets.slint";
export component MainWindow inherits Window {
// Main Tab values
in-out property main_tab_vram_bg <=> main_tab.vram_bg;
in-out property main_tab_vram_file_list <=> main_tab.vram_files;
in-out property main_tab_vram_data <=> main_tab.vram_data;
callback main_tab_remove_file_clicked <=> main_tab.remove_file_clicked;
callback move_vram_image <=> main_tab.move_vram_image;
// Project widget values
in-out property project_widget-open_project_path <=> file_tab.project_widget-open_project_path;
in-out property project_widget-save_project_path <=> file_tab.project_widget-save_project_path;
in-out property project_widget-append_project_elements <=> file_tab.project_widget-append_project_elements;
in-out property project_widget-use_rel_paths <=> file_tab.project_widget-use_rel_paths;
callback project_widget-load_project_clicked <=> file_tab.project_widget-load_project_clicked;
callback project_widget-save_project_clicked <=> file_tab.project_widget-save_project_clicked;
callback project_widget-browse_open_project_clicked <=> file_tab.project_widget-browse_open_project_clicked;
callback project_widget-browse_save_project_clicked <=> file_tab.project_widget-browse_save_project_clicked;
// Convert Image values
in-out property file_tab-encoding_options <=> file_tab.conv-encoding_options;
in-out property file_tab-browse_path <=> file_tab.conv-image_path;
in-out property file_tab-image_data <=> file_tab.conv-image_data;
in-out property file_tab-image_width <=> file_tab.conv-image_width;
in-out property file_tab-image_height <=> file_tab.conv-image_height;
in-out property file_tab-palette_data <=> file_tab.conv-palette_data;
in-out property file_tab-palette_width <=> file_tab.conv-palette_width;
in-out property file_tab-palette_height <=> file_tab.conv-palette_height;
in-out property file_tab-palette_visible <=> file_tab.conv-palette_enable;
in-out property file_tab-selected_encoding <=> file_tab.conv-selected_encoding;
in-out property file_tab-image_name <=> file_tab.conv-image_name;
in-out property file_tab-enable <=> file_tab.conv-enable_view;
callback file_tab-update_palette_size <=> file_tab.conv-image_update_palette_size;
callback file_tab-browse_convert_image <=> file_tab.conv-image_browse_clicked;
callback file_tab-add_convert_image <=> file_tab.conv-image_add_clicked;
title: "TIM Tool 0.1.0";
width: tab_widget.width;
height: tab_widget.height;
tab_widget := TabWidget {
x: 0px;
y: 0px;
width: main_tab.width;
height: main_tab.height;
current-index: 1;
Tab {
title: "File";
file_tab := FileTab {
x: 0px;
y: 0px;
}
}
Tab {
title: "VRAM Layout";
main_tab := MainTab {
x: 0px;
y: 0px;
add_file_clicked => {root.change_to_load_file()}
}
}
Tab {
title: "About";
about_tab := AboutTab {}
}
}
public function set_version(version: string) {
about_tab.version = version;
}
public function change_to_load_file() {
file_tab.state = State.ConvertImage;
tab_widget.current-index = 0;
}
public function change_to_main() {
tab_widget.current-index = 1;
main_tab.set_active();
}
public function clear_file_tab-current_selected_file() {
main_tab.clear_current_selection();
}
}

BIN
src/Tools/tim_tool/ui/assets/TimTool64x64.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,33 @@
import { AboutSlint } from "std-widgets.slint";
export component AboutTab {
in property <string> version;
y: 0px;
VerticalLayout {
padding: 8px;
alignment: start;
Text {
font-size: 24pt;
text: "TIM_Tool Version " + root.version;
horizontal-alignment: center;
}
Image {
source: @image-url("../assets/TimTool64x64.png");
image-rendering: pixelated;
}
Text {
font-size: 20pt;
text: "Part of JabyEngine";
horizontal-alignment: center;
}
Text {
font-size: 16pt;
text: "MIT License";
horizontal-alignment: center;
}
Text {
font-size: 16pt;
text: " ";
}
AboutSlint {}
}
}

View File

@ -0,0 +1,397 @@
import { Button, TabWidget, LineEdit, GroupBox, ComboBox, CheckBox } from "std-widgets.slint";
export enum State {
Project,
ConvertImage,
}
component ProjectWidget inherits Rectangle {
in-out property <string> open_project_path;
in-out property <string> save_project_path;
in-out property <bool> append_project_elements;
in-out property <bool> use_rel_paths;
callback load_project_clicked();
callback save_project_clicked();
callback browse_open_project_clicked();
callback browse_save_project_clicked();
background: #D0D0D0;
VerticalLayout {
alignment: start;
padding: 4px;
GroupBox {
title: "Open Project";
VerticalLayout {
alignment: start;
Text {
text: "Select a project to open.";
}
HorizontalLayout {
alignment: start;
LineEdit {
width: 300pt;
text: root.open_project_path;
}
Button {
text: "Browse";
clicked => {
root.browse_open_project_clicked();
}
}
}
HorizontalLayout {
alignment: start;
CheckBox {
text: "Append elements from project to existing elements";
checked <=> root.append_project_elements;
}
}
HorizontalLayout {
alignment: start;
Button {
text: "Load";
clicked => {
root.load_project_clicked();
}
}
}
}
}
GroupBox {
title: "Save Project";
VerticalLayout {
alignment: start;
padding: 4px;
Text {
text: "Save the current project";
}
HorizontalLayout {
alignment: start;
LineEdit {
width: 300pt;
text: root.save_project_path;
}
Button {
text: "Browse";
clicked => {
root.browse_save_project_clicked();
}
}
}
CheckBox {
text: "Use relative path for files";
checked <=> root.use_rel_paths;
}
HorizontalLayout {
alignment: start;
Button {
text: "Save";
clicked => {
root.save_project_clicked();
}
}
}
}
}
}
}
component ConvertImageWidget inherits Rectangle {
in-out property <[string]> encoding_options: [];
in-out property <string> image_path;
in-out property <string> image_name;
in-out property <image> image_data;
in-out property <int> image-width;
in-out property <int> image-height;
in-out property <image> palette_data;
in-out property <int> palette_width: 0;
in-out property <int> palette_height: 0;
in-out property <string> selected_encoding;
in-out property <bool> enable_view: false;
in-out property <bool> palette_visible: false;
callback browse_clicked();
callback add_clicked();
callback update_palette_size(int, int);
background: #D0D0D0;
VerticalLayout {
alignment: start;
GroupBox {
title: "Add image file";
VerticalLayout {
alignment: start;
padding: 4px;
Text {
text: "Select image file to convert to be used with TIM Tool";
}
HorizontalLayout {
alignment: start;
padding: 4px;
LineEdit {
width: 300pt;
text: image_path;
}
Button {
text: "Browse";
clicked => {browse_clicked();}
}
}
}
}
GroupBox {
title: "Loaded image and palette";
VerticalLayout {
alignment: start;
padding: 4px;
HorizontalLayout {
alignment: center;
VerticalLayout {
Rectangle {
width: 256px + 2*4px; // < Because of border
height: 256px + 2*4px; // < Because of border
background: #404040;
border-color: #808080;
border-width: 4px;
Image {
width: 256px;
height: 256px;
source: root.image_data;
image-fit: contain;
image-rendering: pixelated;
}
}
VerticalLayout {
alignment: center;
Text {
text: "Width: " + root.image-width;
}
}
VerticalLayout {
alignment: center;
Text {
text: "Height: " + root.image-height;
}
}
VerticalLayout {
alignment: center;
ComboBox {
model: root.encoding_options;
enabled: root.enable_view;
selected(current-value) => {
root.selected_encoding = current-value;
}
}
}
}
Rectangle {
// Fake padding because the padding setting for the HorizontalLayout would not work
width: 4px;
height: 1px;
}
VerticalLayout {
Rectangle {
width: 256px + 2*4px; // < Because of border
height: 256px + 2*4px; // < Because of border
background: #404040;
border-color: #808080;
border-width: 4px;
palette_image := Image {
width: 256px;
height: 256px;
source: root.palette_data;
visible: root.palette_visible;
image-fit: contain;
image-rendering: pixelated;
}
}
HorizontalLayout {
alignment: start;
VerticalLayout {
VerticalLayout {
alignment: center;
Text {
text: "Width: ";
}
}
VerticalLayout {
alignment: center;
Text {
text: "Height: ";
}
}
}
VerticalLayout {
palette_width_edit := LineEdit {
width: 40pt;
input-type: number;
enabled: root.palette_visible;
text: root.palette_width;
accepted(text) => {
update_palette_size(palette_width_edit.text.to-float(), palette_height_edit.text.to-float());
}
}
palette_height_edit := LineEdit {
width: 40pt;
input-type: number;
enabled: root.palette_visible;
text: root.palette_height;
accepted(text) => {
update_palette_size(palette_width_edit.text.to-float(), palette_height_edit.text.to-float());
}
}
}
}
}
}
HorizontalLayout {
alignment: start;
padding: 4px;
VerticalLayout {
alignment: center;
Text {
text: "Name: ";
}
}
LineEdit {
text <=> root.image_name;
}
}
HorizontalLayout {
alignment: start;
padding: 4px;
Button {
text: "Add Image";
enabled: root.enable_view;
clicked => {root.add_clicked();}
}
}
}
}
}
public function set_palette_image(image: image) {
palette_image.source = image;
palette_image.visible = true;
}
public function clear_palette_image() {
palette_image.visible = false;
}
}
export component FileTab inherits Rectangle {
in-out property <State> state;
// For project widget
in-out property <string> project_widget-open_project_path;
in-out property <string> project_widget-save_project_path;
in-out property <bool> project_widget-append_project_elements;
in-out property <bool> project_widget-use_rel_paths;
callback project_widget-load_project_clicked();
callback project_widget-save_project_clicked();
callback project_widget-browse_open_project_clicked();
callback project_widget-browse_save_project_clicked();
// For image conversion widget
in-out property <[string]> conv-encoding_options;
in-out property <string> conv-image_path;
in-out property <string> conv-image_name;
in-out property <image> conv-image_data;
in-out property <int> conv-image_width;
in-out property <int> conv-image_height;
in-out property <image> conv-palette_data;
in-out property <int> conv-palette_width;
in-out property <int> conv-palette_height;
in-out property <string> conv-selected_encoding;
in-out property <bool> conv-palette_enable;
in-out property <bool> conv-enable_view;
callback conv-image_update_palette_size(int, int);
callback conv-image_browse_clicked;
callback conv-image_add_clicked;
x: 0px;
y: 0px;
HorizontalLayout {
padding: 4px;
VerticalLayout {
padding: 4px;
width: 20%;
alignment: start;
Button {
text: "Projects";
clicked => {
root.state = State.Project;
}
}
Button {
text: "Add Image";
clicked => {
root.state = State.ConvertImage;
}
}
}
VerticalLayout {
padding: 4px;
alignment: start;
if root.state == State.Project : ProjectWidget {
open_project_path <=> root.project_widget-open_project_path;
save_project_path <=> root.project_widget-save_project_path;
append_project_elements <=> root.project_widget-append_project_elements;
use_rel_paths <=> root.project_widget-use_rel_paths;
load_project_clicked() => {
root.project_widget-load_project_clicked();
}
save_project_clicked() => {
root.project_widget-save_project_clicked();
}
browse_open_project_clicked() => {
root.project_widget-browse_open_project_clicked();
}
browse_save_project_clicked() => {
root.project_widget-browse_save_project_clicked();
}
}
if root.state == State.ConvertImage : ConvertImageWidget {
encoding_options <=> root.conv-encoding_options;
image_path <=> root.conv-image_path;
image_data <=> root.conv-image_data;
image-width <=> root.conv-image_width;
image-height <=> root.conv-image_height;
palette_data <=> root.conv-palette_data;
palette_width <=> root.conv-palette_width;
palette_height <=> root.conv-palette_height;
palette_visible <=> root.conv-palette_enable;
selected_encoding <=> root.conv-selected_encoding;
image_name <=> root.conv-image_name;
enable_view <=> root.conv-enable_view;
update_palette_size(width, height) => {
root.conv-image_update_palette_size(width, height);
}
browse_clicked => {
root.conv-image_browse_clicked();
}
add_clicked => {
root.conv-image_add_clicked();
}
}
}
}
}

View File

@ -0,0 +1,404 @@
import { VRAMArea } from "../vram-components.slint";
import { Button, CheckBox, ComboBox, GroupBox, StandardListView, LineEdit, ScrollView, Slider } from "std-widgets.slint";
struct VRAMImgData {
full_image: image,
image: image,
}
struct VRAMInfo {
x: int,
y: int,
encoding_str: string,
use_compression: bool,
trans_setting: int,
palette_count: int,
is_palette: bool, // < Can we combine the palette into this, instead of having it separate?
}
struct VRAMData {
images: VRAMImgData,
info: VRAMInfo,
}
export component MainTab inherits Rectangle {
property <float> scale: 1.0;
in-out property <image> vram_bg;
in-out property <[StandardListViewItem]> vram_files: [];
in-out property <[VRAMData]> vram_data: [];
callback add_file_clicked();
callback remove_file_clicked(int);
callback move_vram_image(int, int, int);
width: group.width + group.x*2;
height: group.height + group.y*2 + 32px;
forward-focus: key_focus;
group := GroupBox {
title: "VRAM Layout";
x: 4px;
y: 4px;
width: main_view.width + 2*main_view.x;
VerticalLayout {
main_view := ScrollView {
width: rect.width/root.scale;
height: rect.height/root.scale;
viewport-x: 0;
viewport-y: 0;
viewport-width: rect.width;
viewport-height: rect.height;
rect := Rectangle {
width: background_image.width + root.get_border_width()*2px;
height: background_image.height + root.get_border_width()*2px;
border-width: root.get_border_width()*1px;
border-color: #404040;
background: #A0A0A0;
background_image := VRAMArea {
x: root.get_border_width()*1px;
y: root.get_border_width()*1px;
img: vram_bg;
img_x: 0;
img_y: 0;
scale: scale;
}
for vram_data[i] in root.vram_data: VRAMArea {
x: root.get_border_width()*1px;
y: root.get_border_width()*1px;
img: vram_data.images.image;
img_x: vram_data.info.x;
img_y: vram_data.info.y;
scale: scale;
TouchArea {
x: ((parent.img_x + self.lines_crossed_x())*1px)*scale;
y: ((parent.img_y + self.lines_crossed_y())*1px)*scale;
width: ((parent.img.width + self.lines_crossed_width())*1px)*scale;
height: ((parent.img.height + self.lines_crossed_height())*1px)*scale;
mouse-cursor: grab;
moved => {
self.mouse-cursor = MouseCursor.grabbing;
root.move_vram_image(i, ((self.mouse-x - self.pressed-x)/scale)/1px, ((self.mouse-y - self.pressed-y)/scale)/1px);
cur_sel_x.text = parent.img_x;
cur_sel_y.text = parent.img_y;
}
pointer-event(event) => {
if event.kind == PointerEventKind.up {
self.mouse-cursor = MouseCursor.grab;
}
if event.kind == PointerEventKind.down {
cur_sel_x.text = parent.img_x;
cur_sel_y.text = parent.img_y;
cur_sel_width.text = "Width: " + vram_data.images.image.width;
cur_sel_height.text = "Height: " + vram_data.images.image.height;
cur_sel_img.source = vram_data.images.full_image;
encoding_text.encoding_str = vram_data.info.encoding_str;
cur_sel_img.visible = true;
if !vram-data.info.is_palette {
file_settings_box.set_active(i);
}
else {
file_settings_box.set_inactive();
}
vram_files_list.current-item = i;
}
}
// Thanks to Cody the white tiger
function lines_crossed_x() -> int {
return parent.img_x/64;
}
function lines_crossed_y() -> int {
return parent.img_y/256;
}
function lines_crossed_width() -> int {
return ((parent.img_x + parent.img.width)/64) - self.lines_crossed_x();
}
function lines_crossed_height() -> int {
return ((parent.img_y + parent.img.height)/256) - self.lines_crossed_y();
}
}
}
}
function update_viewport() {
// If this value is positive, then the image moved so much to the right, that we do not use the full display area anymore
if self.viewport-x > 0 {
self.viewport-x = 0;
}
if abs(self.viewport-x) + self.width > self.viewport-width {
self.viewport-x += (self.width + abs(self.viewport-x)) - self.viewport-width;
}
if self.viewport-y > 0 {
self.viewport-y = 0;
}
// If this value is positive, then the image moved so much down, that we do not use the full display area anymore
if abs(self.viewport-y) + self.height > self.viewport-height {
self.viewport-y += (self.height + abs(self.viewport-y)) - self.viewport-height;
}
}
}
HorizontalLayout {
padding: 4px;
VerticalLayout {
alignment: center;
padding-right: 4px;
Text {
text: "Scale: " + round(slider.value) + "%";
}
}
slider := Slider {
minimum: 100.0;
maximum: 800.0;
step: 1.0;
value: 100.0;
changed(value) => {
root.scale = round(value)/100.0;
main_view.update_viewport();
}
}
}
HorizontalLayout {
padding: 4px;
GroupBox {
title: "Added files";
VerticalLayout {
alignment: start;
padding: 4px;
vram_files_list := StandardListView {
width: background_image.width/root.scale/2;
height: 128px;
model: root.vram_files;
current-item-changed(current-item) => {
cur_sel_x.text = root.vram_data[current-item].info.x;
cur_sel_y.text = root.vram_data[current-item].info.y;
cur_sel_width.text = "Width: " + root.vram_data[current-item].images.image.width;
cur_sel_height.text = "Height: " + root.vram_data[current-item].images.image.height;
cur_sel_img.source = root.vram_data[current-item].images.full_image;
encoding_text.encoding_str = root.vram_data[current-item].info.encoding_str;
cur_sel_img.visible = true;
if !root.vram_data[current-item].info.is_palette {
file_settings_box.set_active(current-item);
}
else {
file_settings_box.set_inactive();
}
}
item-pointer-event(item, event, position) => {
if event.button == PointerEventButton.right && event.kind == PointerEventKind.down {
main_view.viewport-x = -(root.vram_data[item].info.x + (root.vram_data[item].info.x/64))*root.scale*1px + (main_view.width/4);
main_view.viewport-y = -(root.vram_data[item].info.y + (root.vram_data[item].info.y/256))*root.scale*1px + (main_view.height/4);
main_view.update_viewport();
}
}
}
HorizontalLayout {
padding: 4px;
alignment: center;
Text {
text: "Right click to focus element on screen";
}
}
HorizontalLayout {
padding: 4px;
Button {
text: "Add file";
clicked => {root.add_file_clicked();}
}
Button {
text: "Remove file";
clicked => {
root.remove_file_clicked(vram_files_list.current_item);
root.clear_current_selection();
}
}
}
}
}
GroupBox {
title: "Current File";
VerticalLayout {
padding: 4px;
Rectangle {
width: 128px;
height: 128px;
background: #A0A0A0;
cur_sel_img := Image {
width: 128px;
height: 128px;
image-fit: contain;
image-rendering: pixelated;
}
}
HorizontalLayout {
alignment: start;
VerticalLayout {
alignment: center;
Text {
text: "X: ";
}
}
cur_sel_x := LineEdit {
input-type: number;
text: 0;
width: 48pt;
accepted(text) => {
if(vram_files_list.current-item != -1) {
root.move_vram_image(vram_files_list.current-item, text.to-float() - vram_data[vram_files_list.current-item].info.x, 0);
self.text = vram_data[vram_files_list.current-item].info.x;
}
}
}
VerticalLayout {
alignment: center;
cur_sel_width := Text {
text: "Width: 0";
}
}
}
HorizontalLayout {
alignment: start;
VerticalLayout {
alignment: center;
Text {
text: "Y: ";
}
}
cur_sel_y := LineEdit {
input-type: number;
text: 0;
width: 48pt;
accepted(text) => {
if(vram_files_list.current-item != -1) {
root.move_vram_image(vram_files_list.current-item, 0, text.to-float() - vram_data[vram_files_list.current-item].info.y);
self.text = vram_data[vram_files_list.current-item].info.y;
}
}
}
VerticalLayout {
alignment: center;
cur_sel_height := Text {
text: "Height: 0";
}
}
}
encoding_text := Text {
in-out property <string> encoding_str;
text: "Encoding: " + encoding_str;
}
}
}
file_settings_box := GroupBox {
title: "File settings";
enabled: false;
VerticalLayout {
alignment: start;
lz4_check_box := CheckBox {
text: "Compress (lz4)";
enabled: file_settings_box.enabled;
toggled => {
if(vram_files_list.current-item != -1) {
root.vram_data[vram_files_list.current-item].info.use_compression = self.checked;
}
}
}
GroupBox {
title: "Transparency:";
enabled: file_settings_box.enabled;
VerticalLayout {
alignment: start;
trans_combo_box := ComboBox {
model: ["No transparency", "First color transparent", "PSX semi-transparency", "Both"];
enabled: file_settings_box.enabled;
selected(current-value) => {
if(vram_files_list.current-item != -1) {
root.vram_data[vram_files_list.current-item].info.trans_setting = self.current-index;
}
}
}
}
}
}
public function set_active(current-item: int) {
lz4_check_box.checked = root.vram_data[current-item].info.use_compression;
trans_combo_box.current-index = root.vram_data[current-item].info.trans_setting;
self.enabled = true;
}
public function set_inactive() {
lz4_check_box.checked = false;
trans_combo_box.current-index = 0;
self.enabled = false;
}
}
}
}
}
key_focus := FocusScope {
key-pressed(event) => {
if(vram_files_list.current-item != -1) {
if(event.text == Key.LeftArrow) {
root.move_vram_image(vram_files_list.current-item, -1, 0);
cur_sel_x.text = vram_data[vram_files_list.current-item].info.x;
}
if(event.text == Key.RightArrow) {
root.move_vram_image(vram_files_list.current-item, 1, 0);
cur_sel_x.text = vram_data[vram_files_list.current-item].info.x;
}
if(event.text == Key.UpArrow) {
root.move_vram_image(vram_files_list.current-item, 0, -1);
cur_sel_y.text = vram_data[vram_files_list.current-item].info.y;
}
if(event.text == Key.DownArrow) {
root.move_vram_image(vram_files_list.current-item, 0, 1);
cur_sel_y.text = vram_data[vram_files_list.current-item].info.y;
}
}
accept
}
}
function get_border_width() -> int {
return 4;
}
public function clear_current_selection() {
vram_files_list.current-item = -1;
cur_sel_x.text = 0;
cur_sel_y.text = 0;
cur_sel_img.visible = false;
}
public function set_active() {
key_focus.focus();
}
}

View File

@ -0,0 +1,47 @@
// TODO: Maybe make them inherit Windows...?
component VRAMSegment inherits Rectangle {
in property <image> img;
in property <int> clip_x;
in property <int> clip_y;
in property <float> scale: 1.0;
width: 64px*scale;
height: 256px*scale;
clip: true;
Image {
source: img;
x: -root.clip_x*1px*scale;
y: -root.clip_y*1px*scale;
width: img.width*1px*scale;
height: img.height*1px*scale;
image-rendering: pixelated;
}
}
export component VRAMArea inherits Rectangle {
in property <image> img;
in property <int> img_x;
in property <int> img_y;
in property <float> scale: 1.0;
width: ((64*16+15)*1px)*scale;
height: ((256*2+1)*1px)*scale;
for idx in 32 : VRAMSegment {
x: (root.get_x(idx)*(64px + 1px))*scale;
y: (root.get_y(idx)*(256px + 1px))*scale;
img: img;
clip_x: (root.get_x(idx)*64) - root.img_x;
clip_y: (root.get_y(idx)*256) - root.img_y;
scale: root.scale;
}
function get_x(idx: int) -> int {
return mod(idx, 16);
}
function get_y(idx: int) -> int {
return floor(idx/16);
}
}

556
src/Tools/tool_helper/Cargo.lock generated Normal file
View File

@ -0,0 +1,556 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
"once_cell",
"windows-sys",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
dependencies = [
"shlex",
]
[[package]]
name = "cdtypes"
version = "1.0.0"
dependencies = [
"byteorder",
"chrono",
"paste",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets",
]
[[package]]
name = "clap"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "colored"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "envmnt"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d73999a2b8871e74c8b8bc23759ee9f3d85011b24fafc91a4b3b5c8cc8185501"
dependencies = [
"fsio",
"indexmap",
]
[[package]]
name = "fsio"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad0ce30be0cc441b325c5d705c8b613a0ca0d92b6a8953d41bd236dc09a36d0"
dependencies = [
"dunce",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hound"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "lz4"
version = "1.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4"
dependencies = [
"lz4-sys",
]
[[package]]
name = "lz4-sys"
version = "1.11.1+lz4-1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "tool_helper"
version = "1.0.0"
dependencies = [
"byteorder",
"cdtypes",
"colored",
"envmnt",
"hound",
"lz4",
"paste",
"wslpath",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wslpath"
version = "1.1.0"
dependencies = [
"clap",
]

244
src/Tools/wslpath/Cargo.lock generated Normal file
View File

@ -0,0 +1,244 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "anstream"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
"once_cell",
"windows-sys",
]
[[package]]
name = "clap"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wslpath"
version = "1.1.0"
dependencies = [
"clap",
]

View File

@ -7,4 +7,4 @@ edition = "2021"
panic = "abort"
[dependencies]
clap = {version = "4.5.23", features = ["derive"]}
clap = {version = "4.5.27", features = ["derive"]}