Skip to content

Commit

Permalink
Set platform in system info from arg in p9 tool
Browse files Browse the repository at this point in the history
  • Loading branch information
PikminGuts92 committed Mar 2, 2024
1 parent 40dd809 commit 2263335
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions apps/cli/p9_scene_tool/src/apps/project2milo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,23 @@ impl SubApp for Project2MiloApp {

// Create milos files...

// Write everything?
let sys_info = SystemInfo {
version: 25,
platform: Platform::PS3,
endian: IOEndian::Big,
};

let output_dir = PathBuf::from(&self.output_path);
if !output_dir.exists() {
// Create outout path if it doesn't exist
create_dir_all(&output_dir).expect("Failed to create output directory");
}

// Get platform ext
let platform_ext = match self.platform.to_ascii_lowercase().as_str() {
"ps3" => "ps3",
"wii" => "wii",
_ => "xbox"
let (platform, platform_ext) = match self.platform.to_ascii_lowercase().as_str() {
"ps3" => (Platform::PS3, "ps3"),
"wii" => (Platform::Wii, "wii"),
_ => (Platform::X360, "xbox")
};

let sys_info = SystemInfo {
version: 25,
platform: platform,
endian: IOEndian::Big,
};

// Name, object dir init
Expand Down

0 comments on commit 2263335

Please sign in to comment.