From 9db03906fa51e348f81d8b23e8fe4f035c845843 Mon Sep 17 00:00:00 2001 From: scawful Date: Mon, 29 Sep 2025 19:53:32 -0400 Subject: [PATCH] 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. --- src/app/editor/overworld/overworld_editor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/editor/overworld/overworld_editor.cc b/src/app/editor/overworld/overworld_editor.cc index ebdf10fa..82fd34ae 100644 --- a/src/app/editor/overworld/overworld_editor.cc +++ b/src/app/editor/overworld/overworld_editor.cc @@ -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