OverworldExit updates and refactoring

This commit is contained in:
scawful
2024-01-14 11:15:34 -05:00
parent 5e025a3257
commit c9d0fb9573
4 changed files with 185 additions and 78 deletions

View File

@@ -340,6 +340,14 @@ class ROM : public core::ExperimentFlags {
return absl::OkStatus();
}
absl::Status WriteByte(int addr, uint8_t value) {
if (addr >= rom_data_.size()) {
return absl::InvalidArgumentError("Address out of range");
}
rom_data_[addr] = value;
return absl::OkStatus();
}
absl::Status WriteShort(uint32_t addr, uint16_t value) {
if (addr + 1 >= rom_data_.size()) {
return absl::InvalidArgumentError("Address out of range");