Make clut and texture pos optional

This commit is contained in:
Jaby 2024-12-29 14:43:06 +01:00
parent 7cd008f3f4
commit c3cc4a729d
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "psxfileconv" name = "psxfileconv"
version = "0.8.5" version = "0.8.6"
edition = "2021" edition = "2021"
[profile.release] [profile.release]

View File

@ -32,6 +32,12 @@ impl std::default::Default for Point {
} }
} }
impl ToString for Point {
fn to_string(&self) -> std::string::String {
"{0,0}".to_owned()
}
}
impl FromStr for Point { impl FromStr for Point {
type Err = String; type Err = String;

View File

@ -11,10 +11,10 @@ pub struct Arguments {
#[clap(flatten)] #[clap(flatten)]
global: super::args::Arguments, global: super::args::Arguments,
#[clap(long, value_parser, value_name = Point::POINT_VALUE_NAME)] #[clap(long, value_parser, default_value_t, value_name = Point::POINT_VALUE_NAME)]
clut_pos: Point, clut_pos: Point,
#[clap(long, value_parser, value_name = Point::POINT_VALUE_NAME)] #[clap(long, value_parser, default_value_t, value_name = Point::POINT_VALUE_NAME)]
tex_pos: Point, tex_pos: Point,
} }