LZ4 for vag not supported yet

This commit is contained in:
Jaby 2024-09-28 14:02:43 +02:00
parent b37582ac5e
commit f8d94904a4
4 changed files with 8 additions and 6 deletions

View File

@ -40,7 +40,7 @@ $(OUTPUT_DIR)/fox.xa: audio/temp/fox.wav
$(OUTPUT_DIR)/%.vag: audio/temp/%.wav $(OUTPUT_DIR)/%.vag: audio/temp/%.wav
@mkdir -p $(OUTPUT_DIR) @mkdir -p $(OUTPUT_DIR)
jaby_engine_fconv $< -o $@ vag jaby_engine_fconv --lz4 $< -o $@ vag
$(OUTPUT_DIR)/%.xa: audio/%.wav $(OUTPUT_DIR)/%.xa: audio/%.wav
@mkdir -p $(OUTPUT_DIR) @mkdir -p $(OUTPUT_DIR)

View File

@ -49,8 +49,8 @@
</Directory> </Directory>
<Directory name = "SFX" hidden = "true"> <Directory name = "SFX" hidden = "true">
<!--TODO: test lz4 version--> <!--TODO: test lz4 version-->
<File name = "APPLE.VAG" lz4 = "none">../assets/bin/apple.vag</File> <File name = "APPLE.VAG" lz4 = "already">../assets/bin/apple.vag</File><!--14032-->
<File name = "BLUBB.VAG" lz4 = "none">../assets/bin/blubb.vag</File> <File name = "BLUBB.VAG" lz4 = "already">../assets/bin/blubb.vag</File>
</Directory> </Directory>
</Filesystem> </Filesystem>
<AudioTrack align = "true">../assets/audio/temp/breaking.wav</AudioTrack> <AudioTrack align = "true">../assets/audio/temp/breaking.wav</AudioTrack>

View File

@ -58,8 +58,6 @@ namespace JabyEngine {
simple_assert(1, SPU_MMU::allocate(1, 0x800), calculate_spu_adr(0x600)); simple_assert(1, SPU_MMU::allocate(1, 0x800), calculate_spu_adr(0x600));
simple_assert(2, SPU_MMU::allocate(0, 0x300), calculate_spu_adr(0x0)); simple_assert(2, SPU_MMU::allocate(0, 0x300), calculate_spu_adr(0x0));
simple_assert(3, SPU_MMU::allocate(2, 0x300), calculate_spu_adr(0x300)); simple_assert(3, SPU_MMU::allocate(2, 0x300), calculate_spu_adr(0x300));
// TODO: More tests
} }
namespace boot { namespace boot {

View File

@ -1,7 +1,7 @@
use clap::{Parser, Subcommand}; use clap::{Parser, Subcommand};
use jaby_engine_fconv::{audio::*, images::*, nothing}; use jaby_engine_fconv::{audio::*, images::*, nothing};
use std::path::PathBuf; use std::path::PathBuf;
use tool_helper::{Error, exit_with_error}; use tool_helper::{exit_with_error, print_warning, Error};
#[derive(Parser)] #[derive(Parser)]
#[clap(about = "Converts files to various JabyEngine related file formats", long_about = None)] #[clap(about = "Converts files to various JabyEngine related file formats", long_about = None)]
@ -89,6 +89,10 @@ fn run_external_conversion(cmd: CommandLine) -> Result<(), Error> {
let input_file = cmd.input_file.ok_or(Error::from_str("Input has to be a file"))?; let input_file = cmd.input_file.ok_or(Error::from_str("Input has to be a file"))?;
let output_file = cmd.output_file.ok_or(Error::from_str("Output has to be a file"))?; let output_file = cmd.output_file.ok_or(Error::from_str("Output has to be a file"))?;
if cmd.compress_lz4 {
print_warning("LZ4 compression not supported for external commands".to_owned());
}
match cmd.sub_command { match cmd.sub_command {
SubCommands::VAG(args) => vag::convert(args, input_file, output_file), SubCommands::VAG(args) => vag::convert(args, input_file, output_file),
SubCommands::XA(args) => xa::convert(args, input_file, output_file), SubCommands::XA(args) => xa::convert(args, input_file, output_file),