Skip to content

Commit

Permalink
Fixed the bug with shygoo's more letters patch
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSM64 committed Jul 10, 2018
1 parent a3298f7 commit 655ecba
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ROM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 655ecba

Please sign in to comment.