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:
Lyle Mantooth 2022-06-04 14:38:35 -04:00
parent 76ff991e8f
commit fed38efcc4
Signed by: IslandUsurper
GPG key ID: 6DB52EAE123A5789

View file

@ -17,18 +17,26 @@ const ENEMIZER_BASE_PATCH: &'static str = "enemizer_base_patch.json";
#[clap(author, version, about)]
struct Args {
/// path to the base rom file
rom: PathBuf,
/// seed number
#[clap(short, long)]
seed: Option<i32>,
rom: PathBuf,
/// path to the enemizerOptions.json
#[clap(short, long)]
enemizer: PathBuf,
/// seed number
#[clap(short, long)]
seed: Option<i32>,
/// path to the intended output file
#[clap(short, long)]
output: PathBuf,
/// operate in binary mode (takes already randomized SFC and applies enemizer directly to ROM)
#[clap(long)]
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<()> {
@ -36,7 +44,12 @@ fn main() -> anyhow::Result<()> {
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 mut raw_data = vec![];