Add RomData::is_randomizer.
This commit is contained in:
parent
568360206d
commit
41be111857
|
@ -69,6 +69,29 @@ impl RomData {
|
|||
&& self.rom_data[self.asar_symbols["enemizer_info_table"] + ENEMIZER_INFO_SEED_OFFSET + 1] == b'N'
|
||||
}
|
||||
|
||||
pub fn is_randomizer(&self) -> bool {
|
||||
let acceptable = [
|
||||
// item rando
|
||||
b"VT",
|
||||
// entrance rando
|
||||
b"ER",
|
||||
// door rando
|
||||
b"DR",
|
||||
// Berserker's multiworld
|
||||
b"BM",
|
||||
// Berserker's multiworld doors
|
||||
b"BD",
|
||||
// Archipelago
|
||||
b"AP",
|
||||
// Archipelago with door rando
|
||||
b"AD",
|
||||
];
|
||||
|
||||
acceptable.iter().any(|abbr| &abbr[..] == &self.rom_data[0x7FC0..0x7Fc1]) ||
|
||||
(self.rom_data.len() >= 0x20_0000 &&
|
||||
&self.rom_data[0x7FC0..0x7FCE] == b"ZELDANODENSETSU")
|
||||
}
|
||||
|
||||
fn assert_rom_length(&self) {
|
||||
assert!(self.rom_data.len() >= ENEMIZER_FILE_LENGTH, "You need to expand the rom before you can use Enemizer features.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue