Crates.io | aamp |
lib.rs | aamp |
version | 0.1.6 |
source | src |
created_at | 2020-06-19 20:00:25.950312 |
updated_at | 2021-05-12 21:23:16.907646 |
description | Rust library for Nintendo parameter archive (AAMP) files |
homepage | |
repository | https://github.com/NiceneNerd/aamp-rust |
max_upload_size | |
id | 255800 |
size | 1,226,544 |
A simple to use library for reading, writing, and converting Nintendo parameter archive (AAMP) files in Rust. Supports only AAMP version 2, used in The Legend of Zelda: Breath of the Wild. Can convert from AAMP to readable, editable YAML and back.
use aamp::ParameterIO;
let mut file = std::fs::File::open("test/Enemy_Lizalfos_Electric.bchemical").unwrap();
// Read an AAMP ParameterIO from any reader that implements Seek + Read
let pio = ParameterIO::from_binary(&mut file).unwrap();
for list in pio.lists.iter() {
// Do stuff with lists
}
for obj in pio.objects.iter() {
// Do stuff with objects
}
// Dumps YAML representation to a String
let yaml_dump: String = pio.to_text().unwrap();
This software contains some edited code from yaml-rust
,
primarily the addition of support for tags on maps and sequences. The original MIT/Apache license
and code are available on the GitHub repo.