Add back options passed by ALttpDoorRandomizer.
Even though they aren't used, we have to declare them to parse them.
This commit is contained in:
parent
76ff991e8f
commit
fed38efcc4
|
@ -17,18 +17,26 @@ const ENEMIZER_BASE_PATCH: &'static str = "enemizer_base_patch.json";
|
||||||
#[clap(author, version, about)]
|
#[clap(author, version, about)]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// path to the base rom file
|
/// path to the base rom file
|
||||||
rom: PathBuf,
|
|
||||||
/// seed number
|
|
||||||
#[clap(short, long)]
|
#[clap(short, long)]
|
||||||
seed: Option<i32>,
|
rom: PathBuf,
|
||||||
/// path to the enemizerOptions.json
|
/// path to the enemizerOptions.json
|
||||||
#[clap(short, long)]
|
#[clap(short, long)]
|
||||||
enemizer: PathBuf,
|
enemizer: PathBuf,
|
||||||
|
/// seed number
|
||||||
|
#[clap(short, long)]
|
||||||
|
seed: Option<i32>,
|
||||||
/// path to the intended output file
|
/// path to the intended output file
|
||||||
|
#[clap(short, long)]
|
||||||
output: PathBuf,
|
output: PathBuf,
|
||||||
/// operate in binary mode (takes already randomized SFC and applies enemizer directly to ROM)
|
/// operate in binary mode (takes already randomized SFC and applies enemizer directly to ROM)
|
||||||
#[clap(long)]
|
#[clap(long)]
|
||||||
binary: bool,
|
binary: bool,
|
||||||
|
/// path to base2patched.json (not used)
|
||||||
|
#[clap(long)]
|
||||||
|
base: Option<PathBuf>,
|
||||||
|
/// path to the randomizerPatch.json (not used)
|
||||||
|
#[clap(long)]
|
||||||
|
randomizer: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
|
@ -36,7 +44,12 @@ fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
let stopwatch = Instant::now();
|
let stopwatch = Instant::now();
|
||||||
|
|
||||||
let options = serde_json::from_reader(File::open(args.enemizer)?)?;
|
let options = {
|
||||||
|
let mut opts_file = File::open(args.enemizer)?;
|
||||||
|
let mut json = String::new();
|
||||||
|
opts_file.read_to_string(&mut json)?;
|
||||||
|
serde_json::from_str(&json)?
|
||||||
|
};
|
||||||
let symbols = load_symbols()?;
|
let symbols = load_symbols()?;
|
||||||
|
|
||||||
let mut raw_data = vec![];
|
let mut raw_data = vec![];
|
||||||
|
|
Loading…
Reference in a new issue