feat: hex patches

This commit is contained in:
2025-04-21 22:05:37 +00:00
parent b75cc8f240
commit e569d57788
9 changed files with 96 additions and 4 deletions

View File

@ -50,6 +50,21 @@ impl PatchSelection {
} else {
log::error!("invalid number patch {:?}", patch);
}
},
PatchData::Hex(data) => {
if let PatchSelectionData::Hex(val) = sel {
res += &format!("{} F+{:X} ", filename, data.offset);
for byte in val {
res += &format!("{:02X}", byte);
}
res += " ";
for byte in &data.off {
res += &format!("{:02X}", byte);
}
} else {
log::error!("invalid number patch {:?}", patch);
}
}
}
format!("{}\n", res)