A GameCube/Wii emulator and debugger written in Rust.
screenshotter gamelist whitelist
Laylebeb4baf1ee83
diff --git a/crates/screenshotter/src/main.rs b/crates/screenshotter/src/main.rsindex aab5bc6..faae809 100644--- a/crates/screenshotter/src/main.rs+++ b/crates/screenshotter/src/main.rs@@ -55,17 +55,36 @@ fn take_screenshot(device: &wgpu::Device, queue: &wgpu::Queue, gx: &GxRenderer,}fn main() {- let path = std::env::args()- .nth(1)- .expect("Please provide a path to a folder of GameCube ISOs/RVZs");- let files = std::fs::read_dir(path)+ let input_dir = std::path::PathBuf::from(+ std::env::args()+ .nth(1)+ .expect("Please provide a path to a folder of GameCube ISOs/RVZs"),+ );+ let gamelist = std::path::PathBuf::from(+ std::env::args()+ .nth(2)+ .expect("Please provide a path to a gamelist.txt file"),+ );++ let whitelist: std::collections::HashSet<String> = std::fs::read_to_string(&gamelist)+ .expect("Failed to read gamelist.txt")+ .lines()+ .map(|l| l.trim().to_owned())+ .filter(|l| !l.is_empty())+ .collect();++ let files = std::fs::read_dir(&input_dir).expect("Failed to read the provided path")- .filter(|entry| {- let path = entry.as_ref().unwrap().path();- matches!(path.extension().and_then(|e| e.to_str()), Some("iso" | "rvz" | "zip"))+ .flatten()+ .map(|entry| entry.path())+ .filter(|path| matches!(path.extension().and_then(|e| e.to_str()), Some("iso" | "rvz" | "zip")))+ .filter(|path| {+ path.file_name()+ .and_then(|n| n.to_str())+ .is_some_and(|n| whitelist.contains(n))})- .map(|entry| entry.unwrap().path()).collect::<Vec<_>>();+println!("Found {} files to process", files.len());let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor {diff --git a/other/gamelist.txt b/other/gamelist.txtindex e69160b..4126dbb 100644--- a/other/gamelist.txt+++ b/other/gamelist.txt@@ -14,7 +14,6 @@ All-Star Baseball 2004 featuring Derek Jeter (USA).zipAmazing Island (USA).zipAmerican Chopper 2 - Full Throttle (USA).zipAnimal Crossing (USA).zip-Animal Crossing (USA, Canada).zipAnimaniacs - The Great Edgar Hunt (USA).zipAnt Bully, The (USA) (En,Fr).zipAquaman - Battle for Atlantis (USA).zip@@ -30,12 +29,10 @@ Bad Boys - Miami Takedown (USA).zipBaldur's Gate - Dark Alliance (USA).zipBaten Kaitos - Eternal Wings and the Lost Ocean (USA) (Disc 1).zipBaten Kaitos Origins (USA) (Disc 1).zip-Baten Kaitos Origins (USA, Canada) (Disc 1).zipBatman - Rise of Sin Tzu (USA) (En,Fr,Es).zipBatman - Vengeance (USA) (En,Fr,Es).zipBatman Begins (USA).zipBattalion Wars (USA).zip-Battalion Wars (USA, Canada).zipBeach Spikers - Virtua Beach Volleyball (USA).zipBeyblade VForce - Super Tournament Battle (USA).zipBeyond Good & Evil (USA) (En,Es).zip@@ -210,12 +207,9 @@ Knockout Kings 2003 (USA).zipLara Croft Tomb Raider - Legend (USA).zipLegend of Spyro, The - A New Beginning (USA).zipLegend of Zelda, The - Collector's Edition (USA).zip-Legend of Zelda, The - Collector's Edition (USA, Canada).zipLegend of Zelda, The - Four Swords Adventures (USA).zipLegend of Zelda, The - Ocarina of Time & Master Quest (USA).zip-Legend of Zelda, The - Ocarina of Time & Master Quest (USA, Canada).zipLegend of Zelda, The - The Wind Waker (USA).zip-Legend of Zelda, The - The Wind Waker (USA, Canada).zipLegend of Zelda, The - Twilight Princess (USA).zipLegends of Wrestling (USA).zipLegends of Wrestling II (USA).zip@@ -230,7 +224,6 @@ Lost Kingdoms (USA).zipLost Kingdoms II (USA).zipLotus Challenge (USA).zipLuigi's Mansion (USA).zip-Luigi's Mansion (USA, Canada).zipMadden NFL 06 (USA).zipMadden NFL 07 (USA).zipMadden NFL 08 (USA).zip@@ -253,7 +246,6 @@ Marvel Nemesis - Rise of the Imperfects (USA).zipMary-Kate and Ashley - Sweet 16 - Licensed to Drive (USA).zipMat Hoffman's Pro BMX 2 (USA).zipMC Groovz Dance Craze (USA).zip-MC Groovz Dance Craze (USA, Canada).zipMedabots Infinity (USA).zipMedal of Honor - European Assault (USA).zipMedal of Honor - Frontline (USA).zip@@ -267,7 +259,6 @@ Metal Gear Solid - The Twin Snakes (USA) (Disc 1).zipMetroid Prime (USA).zipMetroid Prime 2 - Echoes (USA) (Bonus Disc).zipMetroid Prime 2 - Echoes (USA).zip-Metroid Prime 2 - Echoes (USA, Canada) (Bonus Disc).zipMidway Arcade Treasures (USA).zipMidway Arcade Treasures 2 (USA).zipMidway Arcade Treasures 3 (USA).zip@@ -346,7 +337,6 @@ Nickelodeon The Adventures of Jimmy Neutron - Boy Genius - Jet Fusion (USA).zipNicktoons - Battle for Volcano Island (USA).zipNicktoons Unite! (USA).zipNintendo GameCube Preview Disc - May 2003 (USA).zip-Nintendo GameCube Preview Disc - May 2003 (USA, Canada).zipNintendo GameCube Service Disc Version 1.0-03 (USA).zipOpen Season (USA) (En,Fr,Es).zipOutlaw Golf (USA).zip@@ -445,7 +435,6 @@ Spirits & Spells (USA).zipSpyHunter (USA).zipSpyro - A Hero's Tail (USA).zipSpyro - Enter the Dragonfly (USA).zip-Spyro - Enter the Dragonfly (USA, Canada).zipSRS - Street Racing Syndicate (USA).zipSSX 3 (USA).zipSSX on Tour (USA).zip@@ -467,7 +456,6 @@ Summoner - A Goddess Reborn (USA).zipSuper Bubble Pop (USA).zipSuper Mario Strikers (USA).zipSuper Mario Sunshine (USA).zip-Super Mario Sunshine (USA, Canada).zipSuper Monkey Ball (USA).zipSuper Monkey Ball 2 (USA).zipSuper Monkey Ball Adventure (USA).zipdiff --git a/other/gamelist_test.txt b/other/gamelist_test.txtnew file mode 100644index 0000000..e9e8130--- /dev/null+++ b/other/gamelist_test.txt@@ -0,0 +1 @@+Legend of Zelda, The - The Wind Waker (USA).zip\ No newline at end of filediff --git a/other/screenshots.py b/other/screenshots.pyindex dc4a484..f35ae17 100644--- a/other/screenshots.py+++ b/other/screenshots.py@@ -7,7 +7,7 @@ BLACKLIST = [screenshots = []for file in ROMS_PATH.glob("*.zip"):- if "USA" in file.name and not any(x.lower() in file.name.lower() for x in BLACKLIST):+ if "(USA)" in file.name and not any(x.lower() in file.name.lower() for x in BLACKLIST):screenshots.append(file)for sc in screenshots:print(sc.name)\ No newline at end of file