From 655ecba7408a84ac52116ca049fc03fb915e6768 Mon Sep 17 00:00:00 2001 From: DavidSM64 Date: Mon, 9 Jul 2018 22:30:10 -0500 Subject: [PATCH] Fixed the bug with shygoo's more letters patch --- src/ROM.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ROM.cs b/src/ROM.cs index 56cc6e2..8556812 100644 --- a/src/ROM.cs +++ b/src/ROM.cs @@ -609,7 +609,8 @@ public void findAndSetSegment02() case ROM_Region.NORTH_AMERICA: func_calls = ar.findJALsInFunction(Globals.seg02_init_NA, Globals.RAMtoROM_NA); for (int i = 0; i < func_calls.Count; i++) - if(func_calls[i].JAL_ADDRESS == Globals.seg02_alloc_NA && func_calls[i].a0 == 0x2) + { + if (func_calls[i].a0 == 0x2) { Globals.seg02_location = new[] { func_calls[i].a1, func_calls[i].a2 }; if (readWordUnsigned(func_calls[i].a1) == 0x4D494F30) @@ -624,11 +625,12 @@ public void findAndSetSegment02() seg02_uncompressedOffset = readWordUnsigned(func_calls[i].a1 + 0xC); } } + } break; case ROM_Region.EUROPE: func_calls = ar.findJALsInFunction(Globals.seg02_init_EU, Globals.RAMtoROM_EU); for (int i = 0; i < func_calls.Count; i++) - if (func_calls[i].JAL_ADDRESS == Globals.seg02_alloc_EU && func_calls[i].a0 == 0x2) + if (func_calls[i].a0 == 0x2) { Globals.seg02_location = new[] { func_calls[i].a1, func_calls[i].a2 }; if (readWordUnsigned(func_calls[i].a1) == 0x4D494F30) @@ -647,7 +649,7 @@ public void findAndSetSegment02() case ROM_Region.JAPAN: func_calls = ar.findJALsInFunction(Globals.seg02_init_JP, Globals.RAMtoROM_JP); for (int i = 0; i < func_calls.Count; i++) - if (func_calls[i].JAL_ADDRESS == Globals.seg02_alloc_JP && func_calls[i].a0 == 0x2) + if (func_calls[i].a0 == 0x2) { Globals.seg02_location = new[] { func_calls[i].a1, func_calls[i].a2 }; if (readWordUnsigned(func_calls[i].a1) == 0x4D494F30) @@ -666,7 +668,7 @@ public void findAndSetSegment02() case ROM_Region.JAPAN_SHINDOU: func_calls = ar.findJALsInFunction(Globals.seg02_init_JS, Globals.RAMtoROM_JS); for (int i = 0; i < func_calls.Count; i++) - if (func_calls[i].JAL_ADDRESS == Globals.seg02_alloc_JS && func_calls[i].a0 == 0x2) + if (func_calls[i].a0 == 0x2) { Globals.seg02_location = new[] { func_calls[i].a1, func_calls[i].a2 }; if (readWordUnsigned(func_calls[i].a1) == 0x4D494F30)