Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More battle controller player decomp #203

Merged
merged 23 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
322d3a7
Update Mon Condition
adrienntindall Jul 22, 2023
f384de5
More controller functions
adrienntindall Jul 27, 2023
e862c86
Merge branch 'master' into master
adrienntindall Jul 27, 2023
d0dc751
Document battle item stuff
adrienntindall Jul 27, 2023
cf4179b
Document input commands
adrienntindall Jul 27, 2023
f9e1e8d
documentation work
adrienntindall Jul 28, 2023
eae74e7
Fix BattleSystem_GetBattleType return value
adrienntindall Jul 28, 2023
1f3256d
More battle system return functions
adrienntindall Jul 29, 2023
442d04a
More lo hanging fruit
adrienntindall Jul 29, 2023
ed04b83
Next function is long
adrienntindall Jul 30, 2023
063a81b
Recover status function
adrienntindall Jul 31, 2023
15a10f7
Minor BattleSystem struct documentation
adrienntindall Jul 31, 2023
d1f08f3
More Battle System Function Documentation
adrienntindall Aug 1, 2023
f137021
More documentation before going to bed
adrienntindall Aug 1, 2023
09b1564
Background handling function
adrienntindall Aug 5, 2023
bad15b4
Merge branch 'master' into master
adrienntindall Aug 5, 2023
0e30fb7
Add consts
adrienntindall Aug 5, 2023
868337b
red lied to me about a const existing smh
adrienntindall Aug 5, 2023
f03a634
red was feeding me misinformation smh
adrienntindall Aug 6, 2023
b0e786c
eventually red will learn that if she doesn't review my PRs she'll ju…
adrienntindall Aug 6, 2023
1cab87a
Fix BattleHpBar struct
adrienntindall Aug 8, 2023
b918a98
Up to Battle Random functions
adrienntindall Aug 10, 2023
e6bad96
Merge branch 'master' into master
red031000 Aug 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions asm/include/overlay_08.inc
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@
.public _u32_div_f
.public gSystem
.public ov08_022225D4
.public ov12_0223A7D4
.public BattleSystem_GetBgConfig
.public BattleSystem_GetBattleType
.public ov12_0223A7E4
.public BattleSystem_GetBattleContext
.public BattleSystem_GetParty
.public BattleSystem_GetPartyMon
.public ov12_0223A8E4
.public ov12_0223A938
.public ov12_0223A9F4
.public ov12_0223AA80
.public ov12_0223AA84
.public BattleSystem_GetTrainer
.public BattleSystem_GetBag
.public BattleSystem_GetBagCursor
.public ov12_0223AB0C
.public ov12_0223AB3C
.public BattleSystem_GetBattlerIdPartner
Expand Down
6 changes: 3 additions & 3 deletions asm/include/overlay_12_022378C0.inc
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@
.public ov12_02237ED0
.public ov12_022399BC
.public BattleSystem_GetBattleType
.public ov12_0223A7E4
.public BattleSystem_GetOpponentDataByBattlerId
.public BattleSystem_GetBattleContext
.public BattleSystem_GetOpponentData
.public BattleSystem_GetMaxBattlers
.public BattleSystem_GetPartySize
.public BattleSystem_GetPartyMon
.public BattleSystem_GetPlayerProfile
.public ov12_0223AA84
.public BattleSystem_GetBagCursor
.public BattleSystem_GetMonBall
.public ov12_0223AAC8
.public BattleSystem_GetFieldSide
Expand Down
6 changes: 3 additions & 3 deletions asm/include/overlay_12_02264824.inc
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
.public _ll_mul
.public _s32_div_f
.public _u32_div_f
.public ov12_0223A7D4
.public BattleSystem_GetBgConfig
.public BattleSystem_GetBattleType
.public BattleSystem_GetPartyMon
.public ov12_0223A8E4
.public ov12_0223A8EC
.public ov12_0223A920
.public ov12_0223A928
.public BattleSystem_GetHpFont
.public BattleSystem_GetLevelFont
.public ov12_0223A930
.public ov12_0223A938
.public ov12_0223A9A4
Expand Down
4 changes: 2 additions & 2 deletions asm/include/overlay_12_02266024.inc
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@
.public _s32_div_f
.public gSystem
.public ov06_0221BA1C
.public ov12_0223A7D4
.public BattleSystem_GetBgConfig
.public BattleSystem_GetBattleType
.public BattleSystem_GetOpponentDataByBattlerId
.public BattleSystem_GetOpponentData
.public BattleSystem_GetPartyMon
.public ov12_0223A8E4
.public ov12_0223A8EC
Expand Down
10 changes: 5 additions & 5 deletions asm/include/overlay_12_battle_command.inc
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@
.public ov12_02237B6C
.public ov12_02237CC4
.public ov12_02237D00
.public ov12_0223A7D4
.public ov12_0223A7D8
.public BattleSystem_GetBgConfig
.public BattleSystem_GetWindow
.public BattleSystem_GetBattleType
.public BattleSystem_GetOpponentDataByBattlerId
.public BattleSystem_GetOpponentData
.public BattleSystem_GetMaxBattlers
.public BattleSystem_GetParty
.public BattleSystem_GetPartySize
Expand All @@ -128,9 +128,9 @@
.public ov12_0223A8F4
.public ov12_0223A930
.public ov12_0223A938
.public ov12_0223A93C
.public BattleSystem_GetPokedex
.public ov12_0223A9A4
.public ov12_0223A9A8
.public BattleSystem_GetMessageBuffer
.public ov12_0223AAB8
.public ov12_0223AAD8
.public BattleSystem_GetFieldSide
Expand Down
2 changes: 1 addition & 1 deletion asm/include/overlay_12_battle_controller.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.public _s32_div_f
.public _u32_div_f
.public BattleSystem_GetBattleType
.public ov12_0223A7E4
.public BattleSystem_GetBattleContext
.public BattleSystem_GetMaxBattlers
.public BattleSystem_GetParty
.public BattleSystem_GetPartyMon
Expand Down
12 changes: 6 additions & 6 deletions asm/include/overlay_12_battle_controller_opponent.inc
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@
.public ov12_02237B0C
.public ov12_02237BB8
.public ov12_02237ED0
.public ov12_0223A7D4
.public ov12_0223A7D8
.public BattleSystem_GetBgConfig
.public BattleSystem_GetWindow
.public BattleSystem_GetBattleType
.public ov12_0223A7E4
.public BattleSystem_GetOpponentDataByBattlerId
.public BattleSystem_GetBattleContext
.public BattleSystem_GetOpponentData
.public BattleSystem_GetMaxBattlers
.public BattleSystem_GetParty
.public BattleSystem_GetPartySize
Expand All @@ -168,9 +168,9 @@
.public ov12_0223A938
.public ov12_0223A99C
.public BattleSystem_GetTrainerIndex
.public ov12_0223A9F4
.public BattleSystem_GetTrainer
.public BattleSystem_GetPlayerProfile
.public ov12_0223AA80
.public BattleSystem_GetBag
.public ov12_0223AAC8
.public ov12_0223AAD8
.public ov12_0223AB0C
Expand Down
10 changes: 5 additions & 5 deletions asm/include/overlay_12_battle_controller_player.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
.public ov10_02220AAC
.public ov12_02237ED0
.public BattleSystem_GetBattleType
.public ov12_0223A7E4
.public BattleSystem_GetOpponentDataByBattlerId
.public BattleSystem_GetBattleContext
.public BattleSystem_GetOpponentData
.public BattleSystem_GetMaxBattlers
.public BattleSystem_GetParty
.public ov12_0223A9F4
.public BattleSystem_GetTrainer
.public BattleSystem_GetPlayerProfile
.public ov12_0223AA80
.public ov12_0223AA84
.public BattleSystem_GetBag
.public BattleSystem_GetBagCursor
.public ov12_0223AB0C
.public BattleSystem_GetFieldSide
.public BattleSystem_GetBattlerIdPartner
Expand Down
22 changes: 11 additions & 11 deletions asm/include/overlay_12_battle_system.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
.public MIi_CpuCopy32
.public _s32_div_f
.public _u32_div_f
.public ov12_0223A7D4
.public ov12_0223A7D8
.public BattleSystem_GetBgConfig
.public BattleSystem_GetWindow
.public BattleSystem_GetBattleType
.public ov12_0223A7E4
.public BattleSystem_GetOpponentDataByBattlerId
.public BattleSystem_GetBattleContext
.public BattleSystem_GetOpponentData
.public BattleSystem_GetMaxBattlers
.public BattleSystem_GetParty
.public BattleSystem_GetPartySize
Expand All @@ -82,12 +82,12 @@
.public ov12_0223A900
.public ov12_0223A908
.public ov12_0223A914
.public ov12_0223A920
.public ov12_0223A928
.public BattleSystem_GetHpFont
.public BattleSystem_GetLevelFont
.public ov12_0223A930
.public ov12_0223A934
.public ov12_0223A938
.public ov12_0223A93C
.public BattleSystem_GetPokedex
.public BattleSystem_GetSendBufferPtr
.public BattleSystem_GetRecvBufferPtr
.public ov12_0223A954
Expand All @@ -98,12 +98,12 @@
.public ov12_0223A990
.public ov12_0223A99C
.public ov12_0223A9A4
.public ov12_0223A9A8
.public BattleSystem_GetMessageBuffer
.public BattleSystem_GetTrainerIndex
.public ov12_0223A9F4
.public BattleSystem_GetTrainer
.public BattleSystem_GetPlayerProfile
.public ov12_0223AA80
.public ov12_0223AA84
.public BattleSystem_GetBag
.public BattleSystem_GetBagCursor
.public BattleSystem_GetMonBall
.public ov12_0223AAB8
.public ov12_0223AAC8
Expand Down
22 changes: 11 additions & 11 deletions asm/overlay_08.s
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ _0221BE2E:
bl memset
str r5, [r4]
ldr r0, [r5, #8]
bl ov12_0223A7D4
bl BattleSystem_GetBgConfig
mov r1, #0x79
lsl r1, r1, #2
str r0, [r4, r1]
Expand Down Expand Up @@ -3461,7 +3461,7 @@ ov08_0221D91C: ; 0x0221D91C
add r1, r0, #0
ldr r0, [r5]
ldr r0, [r0, #8]
bl ov12_0223A9F4
bl BattleSystem_GetTrainer
add r2, r0, #0
ldr r0, _0221DABC ; =0x00001FAC
mov r1, #0
Expand Down Expand Up @@ -3798,14 +3798,14 @@ ov08_0221DBCC: ; 0x0221DBCC
beq _0221DBF0
cmp r4, #0x42
beq _0221DBF0
bl ov12_0223AA80
bl BattleSystem_GetBag
add r1, r4, #0
mov r2, #1
add r3, r7, #0
bl Bag_TakeItem
_0221DBF0:
add r0, r5, #0
bl ov12_0223AA84
bl BattleSystem_GetBagCursor
add r1, r4, #0
add r2, r6, #0
bl BagCursor_Battle_SetLastUsedItem
Expand Down Expand Up @@ -12728,7 +12728,7 @@ ov08_022225D4: ; 0x022225D4
bl memset
str r5, [r4]
ldr r0, [r5]
bl ov12_0223A7D4
bl BattleSystem_GetBgConfig
str r0, [r4, #4]
ldr r0, [r5]
bl ov12_0223A938
Expand All @@ -12737,7 +12737,7 @@ ov08_022225D4: ; 0x022225D4
mov r1, #0
strb r1, [r4, r0]
ldr r0, [r5]
bl ov12_0223AA84
bl BattleSystem_GetBagCursor
add r6, r0, #0
mov r5, #0
_02222614:
Expand Down Expand Up @@ -12938,7 +12938,7 @@ ov08_0222276C: ; 0x0222276C
bl FontID_Alloc
ldr r0, [r4]
ldr r0, [r0]
bl ov12_0223AA84
bl BattleSystem_GetBagCursor
bl BagCursor_Battle_GetPocket
ldr r1, _02222834 ; =0x0000114D
strb r0, [r4, r1]
Expand Down Expand Up @@ -13794,7 +13794,7 @@ _02222E40:
cmp r0, #0
beq _02222EAC
ldr r0, [r1]
bl ov12_0223AA84
bl BattleSystem_GetBagCursor
add r6, r0, #0
mov r4, #0
_02222E82:
Expand Down Expand Up @@ -14412,7 +14412,7 @@ ov08_02223374: ; 0x02223374
add r5, r0, #0
ldr r4, [r5]
ldr r0, [r4]
bl ov12_0223A7E4
bl BattleSystem_GetBattleContext
add r1, r0, #0
ldr r0, [r5]
ldr r3, [r4, #0x10]
Expand All @@ -14429,13 +14429,13 @@ ov08_02223390: ; 0x02223390
add r4, r3, #0
add r6, r0, #0
add r7, r2, #0
bl ov12_0223AA80
bl BattleSystem_GetBag
add r1, r5, #0
mov r2, #1
add r3, r4, #0
bl Bag_TakeItem
add r0, r6, #0
bl ov12_0223AA84
bl BattleSystem_GetBagCursor
add r1, r5, #0
add r2, r7, #0
bl BagCursor_Battle_SetLastUsedItem
Expand Down
6 changes: 3 additions & 3 deletions asm/overlay_12_022378C0.s
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ _02237FD8:
add r0, r4, #0
bl ov12_0223A620
add r0, r4, #0
bl ov12_0223AA84
bl BattleSystem_GetBagCursor
bl BagCursor_Battle_Init
mov r0, #5
mov r1, #4
Expand Down Expand Up @@ -1948,7 +1948,7 @@ ov12_022389B8: ; 0x022389B8
add r3, r4, #0
bl ov12_02265FD4
add r0, r5, #0
bl ov12_0223A7E4
bl BattleSystem_GetBattleContext
str r0, [sp]
ldr r0, [r5, #0x44]
mov r4, #0
Expand Down Expand Up @@ -3790,7 +3790,7 @@ _02239898:
_022398A0:
add r0, r5, #0
add r1, r4, #0
bl BattleSystem_GetOpponentDataByBattlerId
bl BattleSystem_GetOpponentData
add r7, r0, #0
bl ov12_02261264
cmp r0, #0
Expand Down
12 changes: 6 additions & 6 deletions asm/overlay_12_02264824.s
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ ov12_0226516C: ; 0x0226516C
sub sp, #0x34
add r5, r0, #0
ldr r0, [r5, #0xc]
bl ov12_0223A7D4
bl BattleSystem_GetBgConfig
add r6, r0, #0
ldr r0, [r5, #0xc]
bl ov12_0223A930
Expand Down Expand Up @@ -1471,7 +1471,7 @@ ov12_02265354: ; 0x02265354
bl MI_CpuFill8
ldr r0, [sp, #4]
ldr r0, [r0, #0xc]
bl ov12_0223A928
bl BattleSystem_GetLevelFont
ldr r1, [sp, #4]
str r4, [sp]
add r1, #0x48
Expand Down Expand Up @@ -1599,7 +1599,7 @@ ov12_02265474: ; 0x02265474
add r4, r0, #0
bl MI_CpuFill8
ldr r0, [r5, #0xc]
bl ov12_0223A920
bl BattleSystem_GetHpFont
str r4, [sp]
add r1, r6, #0
mov r2, #3
Expand Down Expand Up @@ -1660,7 +1660,7 @@ ov12_02265500: ; 0x02265500
add r4, r0, #0
bl MI_CpuFill8
ldr r0, [r5, #0xc]
bl ov12_0223A920
bl BattleSystem_GetHpFont
str r4, [sp]
ldr r1, [r5, #0x2c]
mov r2, #3
Expand Down Expand Up @@ -1770,7 +1770,7 @@ ov12_022655F0: ; 0x022655F0
add r4, r0, #0
ldr r0, [r4, #0xc]
add r5, r1, #0
bl ov12_0223A7D4
bl BattleSystem_GetBgConfig
add r6, r0, #0
ldr r0, [r4, #0xc]
bl ov12_0223A930
Expand Down Expand Up @@ -1872,7 +1872,7 @@ ov12_022656CC: ; 0x022656CC
add r4, r0, #0
ldr r0, [r4, #0xc]
add r5, r1, #0
bl ov12_0223A7D4
bl BattleSystem_GetBgConfig
str r0, [sp, #0x1c]
ldr r0, [r4, #0xc]
bl ov12_0223A930
Expand Down
Loading