Refactor area size checks in OverworldEditor for ZSCustomOverworld v3 compatibility

- Simplified logic for determining area size usage by removing unnecessary condition for version check.
- Ensured consistent handling of area sizes across relevant methods in OverworldEditor, enhancing compatibility with different ROM versions.
This commit is contained in:
scawful
2025-09-29 19:53:32 -04:00
parent bac03ee08e
commit 9db03906fa

View File

@@ -1165,7 +1165,7 @@ absl::Status OverworldEditor::CheckForCurrentMap() {
// Check if ZSCustomOverworld v3 is present
uint8_t asm_version = (*rom_)[zelda3::OverworldCustomASMHasBeenApplied];
bool use_v3_area_sizes = (asm_version >= 3 && asm_version != 0xFF);
bool use_v3_area_sizes = (asm_version >= 3);
// Get area size for v3+ ROMs, otherwise use legacy logic
if (use_v3_area_sizes) {
@@ -2357,7 +2357,7 @@ void OverworldEditor::RefreshMapProperties() {
// Check if ZSCustomOverworld v3 is present
uint8_t asm_version = (*rom_)[zelda3::OverworldCustomASMHasBeenApplied];
bool use_v3_area_sizes = (asm_version >= 3 && asm_version != 0xFF);
bool use_v3_area_sizes = (asm_version >= 3);
if (use_v3_area_sizes) {
// Use v3 area size system