diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2018-01-07 22:16:52 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-07 22:16:52 -0600 |
commit | 6b38db228befa044a2cfe31ed78555e3f0bd3935 (patch) | |
tree | 4aafddc91df76b5674c47a2be3bb1b3a42a0b519 /src/rom_8077ABC.c | |
parent | 17d5ba39acb897e07e6842cbff5b1172cc6f7951 (diff) | |
parent | be36c506387648a11afe51b0f4209386947feb37 (diff) |
Merge pull request #515 from huderlem/battle_2
Decompile battle_2 and battle_util
Diffstat (limited to 'src/rom_8077ABC.c')
-rw-r--r-- | src/rom_8077ABC.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/src/rom_8077ABC.c b/src/rom_8077ABC.c index 001cd85f6..2691da859 100644 --- a/src/rom_8077ABC.c +++ b/src/rom_8077ABC.c @@ -823,7 +823,7 @@ u8 GetBankIdentity(u8 slot) return gBanksBySide[slot]; } -u8 GetBankByPlayerAI(u8 slot) +u8 GetBankByIdentity(u8 slot) { u8 i; @@ -1329,35 +1329,27 @@ u32 sub_80792C0(u8 a1, u8 a2, u8 a3, u8 a4) var |= 1 << 18; return var; } - } - else - { - if (a1) - { - if (IsAnimBankSpriteVisible(GetBankByPlayerAI(0))) - var |= 1 << (GetBankByPlayerAI(0) + 16); + } else { + if (a1) { + if (IsAnimBankSpriteVisible(GetBankByIdentity(0))) { + var |= 1 << (GetBankByIdentity(0) + 16); + } } - if (a2) - { - if (IsAnimBankSpriteVisible(GetBankByPlayerAI(2))) - { - shift = GetBankByPlayerAI(2) + 16; + if (a2) { + if (IsAnimBankSpriteVisible(GetBankByIdentity(2))) { + shift = GetBankByIdentity(2) + 16; var |= 1 << shift; } } - if (a3) - { - if (IsAnimBankSpriteVisible(GetBankByPlayerAI(1))) - { - shift = GetBankByPlayerAI(1) + 16; + if (a3) { + if (IsAnimBankSpriteVisible(GetBankByIdentity(1))) { + shift = GetBankByIdentity(1) + 16; var |= 1 << shift; } } - if (a4) - { - if (IsAnimBankSpriteVisible(GetBankByPlayerAI(3))) - { - shift = GetBankByPlayerAI(3) + 16; + if (a4) { + if (IsAnimBankSpriteVisible(GetBankByIdentity(3))) { + shift = GetBankByIdentity(3) + 16; var |= 1 << shift; } } @@ -1372,7 +1364,7 @@ u8 sub_80793A8(u8 a1) u8 unref_sub_80793B0(u8 a1) { - return GetBankByPlayerAI(a1); + return GetBankByIdentity(a1); } void sub_80793C4(struct Sprite *sprite) |