diff options
-rw-r--r-- | src/mauville_old_man.c | 3 | ||||
-rw-r--r-- | sym_ewram.txt | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index d03042ca5..c01a51091 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -288,8 +288,7 @@ void sub_80F7CF4(void) if(oldMan->oldMan2.mauvilleOldMan_ecArray[oldMan->oldMan2.unk1] != 0xFFFF) // is not the last element of the array? { - int random = (u16)Random(); - random &= 7; + u16 random = 7 % Random(); // this is a little bit closer, but the compiler prefers an AND instead of division. i assume its because the compiler wants to avoid division by zero, however using an & causes this order to not be close anymore. sub_80EB3FC(gStringVar4, oldMan->oldMan2.mauvilleOldMan_ecArray[oldMan->oldMan2.unk1]); stringPtr = StringCopy(gStringVar4, gOtherText_Is); stringPtr = StringCopy(stringPtr, (u8 *)gUnknown_083E5388[random]); diff --git a/sym_ewram.txt b/sym_ewram.txt index 001321ea7..10ebf59c9 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -486,6 +486,7 @@ gPokemonCryBGMDuckingCounter: @ 202F7A0 .include "src/battle_anim.o" + .align 2 gUnknown_0202F7D4: @ 202F7D4 .space 0x10 |