diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-11-10 12:21:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-10 12:21:05 -0800 |
commit | 9ed1584bab5d2c0676261d6419834cd9d4f7dc3c (patch) | |
tree | b451de240205ca20b9ce52bccb33d0d67adef3d8 /src/battle/battle_controller_opponent.c | |
parent | 8832b766facd48c85c1b99ac6dad555f1e2aa1c7 (diff) | |
parent | 0343a1bcd728d813a38fc3486535e962e681c094 (diff) |
Merge pull request #454 from ProjectRevoTPP/ewram
ewram refactor
Diffstat (limited to 'src/battle/battle_controller_opponent.c')
-rw-r--r-- | src/battle/battle_controller_opponent.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/battle/battle_controller_opponent.c b/src/battle/battle_controller_opponent.c index 392e80f08..823d6702a 100644 --- a/src/battle/battle_controller_opponent.c +++ b/src/battle/battle_controller_opponent.c @@ -20,6 +20,7 @@ #include "task.h" #include "text.h" #include "util.h" +#include "ewram.h" struct UnknownStruct3 { @@ -1673,7 +1674,7 @@ _0803558A:\n\ void OpponentHandleOpenBag(void) { // What is this? - Emitcmd35(1, ewram[0x160D4 + gActiveBank / 2 * 2]); + Emitcmd35(1, ewram160D4(gActiveBank)); OpponentBufferExecCompleted(); } @@ -1681,7 +1682,7 @@ void OpponentHandlecmd22(void) { s32 r4; - if (ewram[0x160C8 + GetBankIdentity(gActiveBank) / 2] == 6) + if (ewram160C8arr(GetBankIdentity(gActiveBank)) == 6) { u8 r6; u8 r5; @@ -1710,10 +1711,10 @@ void OpponentHandlecmd22(void) } else { - r4 = ewram[0x160C8 + GetBankIdentity(gActiveBank) / 2]; - ewram[0x160C8 + GetBankIdentity(gActiveBank) / 2] = 6; + r4 = ewram160C8arr(GetBankIdentity(gActiveBank)); + ewram160C8arr(GetBankIdentity(gActiveBank)) = 6; } - ewram[0x16068 + gActiveBank] = r4; + ewram16068arr(gActiveBank) = r4; Emitcmd34(1, r4, 0); OpponentBufferExecCompleted(); } |