Merge pull request #45 from DizzyEggg/decomp_battle4

Decompile Battle 4
This commit is contained in:
Diegoisawesome 2017-09-30 03:00:10 -05:00 committed by GitHub
commit 741c99cded
77 changed files with 13441 additions and 33372 deletions

View File

@ -1548,7 +1548,7 @@ _080358E0:
.4byte _08035A70 .4byte _08035A70
_08035904: _08035904:
ldr r4, =gUnknown_0831ABA8 ldr r4, =gUnknown_0831ABA8
ldr r5, =gUnknown_02022FF0 ldr r5, =gBattleTerrain
ldrb r1, [r5] ldrb r1, [r5]
lsls r0, r1, 2 lsls r0, r1, 2
adds r0, r1 adds r0, r1
@ -1888,7 +1888,7 @@ sub_8035C4C: @ 8035C4C
bne _08035C68 bne _08035C68
ldr r0, =gText_Draw ldr r0, =gText_Draw
movs r1, 0x15 movs r1, 0x15
bl battle_show_message_maybe bl sub_814F9EC
b _08035D68 b _08035D68
.pool .pool
_08035C68: _08035C68:
@ -1964,10 +1964,10 @@ _08035CE2:
_08035CFC: _08035CFC:
ldr r0, =gText_Win ldr r0, =gText_Win
movs r1, 0x17 movs r1, 0x17
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Loss ldr r0, =gText_Loss
movs r1, 0x16 movs r1, 0x16
bl battle_show_message_maybe bl sub_814F9EC
b _08035D68 b _08035D68
.pool .pool
_08035D20: _08035D20:
@ -1985,19 +1985,19 @@ _08035D20:
_08035D36: _08035D36:
ldr r0, =gText_Win ldr r0, =gText_Win
movs r1, 0x16 movs r1, 0x16
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Loss ldr r0, =gText_Loss
movs r1, 0x17 movs r1, 0x17
bl battle_show_message_maybe bl sub_814F9EC
b _08035D68 b _08035D68
.pool .pool
_08035D58: _08035D58:
ldr r0, =gText_Win ldr r0, =gText_Win
movs r1, 0x17 movs r1, 0x17
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Loss ldr r0, =gText_Loss
movs r1, 0x16 movs r1, 0x16
bl battle_show_message_maybe bl sub_814F9EC
_08035D68: _08035D68:
pop {r0} pop {r0}
bx r0 bx r0
@ -2068,14 +2068,14 @@ _08035DDC:
_08035DE6: _08035DE6:
adds r0, r1, 0 adds r0, r1, 0
movs r1, 0x11 movs r1, 0x11
bl battle_show_message_maybe bl sub_814F9EC
ldrb r1, [r4, 0x18] ldrb r1, [r4, 0x18]
movs r0, 0x4 movs r0, 0x4
b _08035E14 b _08035E14
_08035DF4: _08035DF4:
adds r0, r1, 0 adds r0, r1, 0
movs r1, 0x12 movs r1, 0x12
bl battle_show_message_maybe bl sub_814F9EC
ldrb r1, [r4, 0x18] ldrb r1, [r4, 0x18]
movs r0, 0x4 movs r0, 0x4
str r0, [sp] str r0, [sp]
@ -2085,7 +2085,7 @@ _08035DF4:
_08035E08: _08035E08:
adds r0, r1, 0 adds r0, r1, 0
movs r1, 0x13 movs r1, 0x13
bl battle_show_message_maybe bl sub_814F9EC
ldrb r1, [r4, 0x18] ldrb r1, [r4, 0x18]
movs r0, 0x8 movs r0, 0x8
_08035E14: _08035E14:
@ -2099,7 +2099,7 @@ _08035E1A:
_08035E22: _08035E22:
adds r0, r1, 0 adds r0, r1, 0
movs r1, 0x14 movs r1, 0x14
bl battle_show_message_maybe bl sub_814F9EC
ldrb r1, [r4, 0x18] ldrb r1, [r4, 0x18]
movs r0, 0x8 movs r0, 0x8
str r0, [sp] str r0, [sp]
@ -2139,14 +2139,14 @@ _08035E66:
adds r1, r0, r4 adds r1, r0, r4
adds r0, r1, 0 adds r0, r1, 0
movs r1, 0xF movs r1, 0xF
bl battle_show_message_maybe bl sub_814F9EC
lsls r0, r6, 3 lsls r0, r6, 3
subs r0, r6 subs r0, r6
lsls r0, 2 lsls r0, 2
adds r1, r0, r4 adds r1, r0, r4
adds r0, r1, 0 adds r0, r1, 0
movs r1, 0x10 movs r1, 0x10
bl battle_show_message_maybe bl sub_814F9EC
movs r4, 0x7 movs r4, 0x7
str r4, [sp] str r4, [sp]
adds r0, r7, 0 adds r0, r7, 0
@ -2236,7 +2236,7 @@ _08035F64:
ldrsh r0, [r5, r1] ldrsh r0, [r5, r1]
cmp r0, 0 cmp r0, 0
beq _08035FCC beq _08035FCC
ldr r4, =gUnknown_02022E18 ldr r4, =gBattle_BG1_X
ldrh r0, [r5, 0xA] ldrh r0, [r5, 0xA]
bl Sin2 bl Sin2
lsls r0, 16 lsls r0, 16
@ -2251,7 +2251,7 @@ _08035F7E:
adds r0, r2, 0 adds r0, r2, 0
subs r0, r1 subs r0, r1
strh r0, [r4] strh r0, [r4]
ldr r4, =gUnknown_02022E1C ldr r4, =gBattle_BG2_X
ldrh r0, [r5, 0xC] ldrh r0, [r5, 0xC]
bl Sin2 bl Sin2
lsls r0, 16 lsls r0, 16
@ -2266,16 +2266,16 @@ _08035F9C:
adds r0, r3, 0 adds r0, r3, 0
subs r0, r1 subs r0, r1
strh r0, [r4] strh r0, [r4]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldr r2, =0x0000ffdc ldr r2, =0x0000ffdc
adds r1, r2, 0 adds r1, r2, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
b _08036038 b _08036038
.pool .pool
_08035FCC: _08035FCC:
ldr r4, =gUnknown_02022E18 ldr r4, =gBattle_BG1_X
ldrh r0, [r5, 0xA] ldrh r0, [r5, 0xA]
bl Sin2 bl Sin2
lsls r0, 16 lsls r0, 16
@ -2290,7 +2290,7 @@ _08035FDE:
adds r0, r3, 0 adds r0, r3, 0
subs r0, r1 subs r0, r1
strh r0, [r4] strh r0, [r4]
ldr r4, =gUnknown_02022E1A ldr r4, =gBattle_BG1_Y
ldrh r0, [r5, 0xA] ldrh r0, [r5, 0xA]
bl Cos2 bl Cos2
lsls r0, 16 lsls r0, 16
@ -2302,7 +2302,7 @@ _08035FFC:
asrs r0, 5 asrs r0, 5
subs r0, 0xA4 subs r0, 0xA4
strh r0, [r4] strh r0, [r4]
ldr r4, =gUnknown_02022E1C ldr r4, =gBattle_BG2_X
ldrh r0, [r5, 0xC] ldrh r0, [r5, 0xC]
bl Sin2 bl Sin2
lsls r0, 16 lsls r0, 16
@ -2317,7 +2317,7 @@ _08036014:
adds r0, r2, 0 adds r0, r2, 0
subs r0, r1 subs r0, r1
strh r0, [r4] strh r0, [r4]
ldr r4, =gUnknown_02022E1E ldr r4, =gBattle_BG2_Y
ldrh r0, [r5, 0xC] ldrh r0, [r5, 0xC]
bl Cos2 bl Cos2
lsls r0, 16 lsls r0, 16
@ -2504,11 +2504,11 @@ sub_8036154: @ 8036154
movs r0, 0x4A movs r0, 0x4A
movs r1, 0x36 movs r1, 0x36
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldr r2, =0x0000ff5c ldr r2, =0x0000ff5c
adds r1, r2, 0 adds r1, r2, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_0831AA00 ldr r0, =gUnknown_0831AA00
bl LoadCompressedObjectPicUsingHeap bl LoadCompressedObjectPicUsingHeap
@ -2633,7 +2633,7 @@ _08036350:
cmp r0, 0 cmp r0, 0
bne _0803639C bne _0803639C
ldr r4, =gUnknown_0831ABA8 ldr r4, =gUnknown_0831ABA8
ldr r5, =gUnknown_02022FF0 ldr r5, =gBattleTerrain
ldrb r1, [r5] ldrb r1, [r5]
lsls r0, r1, 2 lsls r0, r1, 2
adds r0, r1 adds r0, r1
@ -2779,7 +2779,7 @@ _080364A8:
.4byte _08036518 .4byte _08036518
_080364CC: _080364CC:
ldr r2, =gUnknown_0831ABA8 ldr r2, =gUnknown_0831ABA8
ldr r0, =gUnknown_02022FF0 ldr r0, =gBattleTerrain
ldrb r1, [r0] ldrb r1, [r0]
lsls r0, r1, 2 lsls r0, r1, 2
adds r0, r1 adds r0, r1
@ -2889,7 +2889,7 @@ _080365B4:
.4byte _08036624 .4byte _08036624
_080365D8: _080365D8:
ldr r2, =gUnknown_0831ABA8 ldr r2, =gUnknown_0831ABA8
ldr r0, =gUnknown_02022FF0 ldr r0, =gBattleTerrain
ldrb r1, [r0] ldrb r1, [r0]
lsls r0, r1, 2 lsls r0, r1, 2
adds r0, r1 adds r0, r1
@ -3004,7 +3004,7 @@ _080366C8:
.4byte _08036740 .4byte _08036740
_080366EC: _080366EC:
ldr r2, =gUnknown_0831ABA8 ldr r2, =gUnknown_0831ABA8
ldr r0, =gUnknown_02022FF0 ldr r0, =gBattleTerrain
ldrb r1, [r0] ldrb r1, [r0]
lsls r0, r1, 2 lsls r0, r1, 2
adds r0, r1 adds r0, r1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -183,8 +183,8 @@ _080570D0:
.pool .pool
thumb_func_end sub_8057028 thumb_func_end sub_8057028
thumb_func_start sub_80570F4 thumb_func_start AdjustFriendshipOnBattleFaint
sub_80570F4: @ 80570F4 AdjustFriendshipOnBattleFaint: @ 80570F4
push {r4,r5,lr} push {r4,r5,lr}
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
@ -195,11 +195,11 @@ sub_80570F4: @ 80570F4
cmp r0, 0 cmp r0, 0
beq _08057140 beq _08057140
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r3, r0, 24 lsrs r3, r0, 24
ldr r2, =gBattleMons ldr r2, =gBattleMons
@ -220,7 +220,7 @@ sub_80570F4: @ 80570F4
.pool .pool
_08057140: _08057140:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
_0805714A: _0805714A:
@ -285,7 +285,7 @@ _080571CE:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_80570F4 thumb_func_end AdjustFriendshipOnBattleFaint
thumb_func_start sub_80571DC thumb_func_start sub_80571DC
sub_80571DC: @ 80571DC sub_80571DC: @ 80571DC
@ -414,7 +414,7 @@ _0805729A:
ldr r1, =0xf7ffffff ldr r1, =0xf7ffffff
ands r0, r1 ands r0, r1
str r0, [r2] str r0, [r2]
bl b_movescr_stack_push_cursor bl BattleScriptPushCursor
movs r0, 0x1 movs r0, 0x1
mov r2, r10 mov r2, r10
strb r0, [r2, 0x5] strb r0, [r2, 0x5]
@ -474,7 +474,7 @@ _08057354:
ldr r1, =0xf7ffffff ldr r1, =0xf7ffffff
ands r0, r1 ands r0, r1
str r0, [r2] str r0, [r2]
bl b_movescr_stack_push_cursor bl BattleScriptPushCursor
ldr r0, =gBattleCommunication ldr r0, =gBattleCommunication
strb r4, [r0, 0x5] strb r4, [r0, 0x5]
ldr r1, =gBattlescriptCurrInstr ldr r1, =gBattlescriptCurrInstr
@ -523,7 +523,7 @@ _080573D4:
negs r1, r1 negs r1, r1
ands r0, r1 ands r0, r1
str r0, [r4] str r0, [r4]
bl b_movescr_stack_push_cursor bl BattleScriptPushCursor
ldr r1, =gBattlescriptCurrInstr ldr r1, =gBattlescriptCurrInstr
ldr r0, =BattleScript_MoveUsedUnfroze ldr r0, =BattleScript_MoveUsedUnfroze
str r0, [r1] str r0, [r1]
@ -562,7 +562,7 @@ _08057406:
movs r1, 0x28 movs r1, 0x28
movs r2, 0 movs r2, 0
movs r3, 0x4 movs r3, 0x4
bl EmitSetAttributes bl EmitSetMonData
ldrb r0, [r4] ldrb r0, [r4]
bl MarkBufferBankForExecution bl MarkBufferBankForExecution
_08057430: _08057430:

View File

@ -428,7 +428,7 @@ _0805D470:
movs r0, 0x1 movs r0, 0x1
ands r0, r1 ands r0, r1
eors r0, r2 eors r0, r2
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 16 lsrs r0, 16
_0805D48A: _0805D48A:
@ -579,7 +579,7 @@ sub_805D5F4: @ 805D5F4
cmp r0, 0 cmp r0, 0
bne _0805D630 bne _0805D630
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r8, r0 mov r8, r0
@ -588,13 +588,13 @@ sub_805D5F4: @ 805D5F4
.pool .pool
_0805D630: _0805D630:
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r8, r0 mov r8, r0
movs r0, 0x2 movs r0, 0x2
_0805D63E: _0805D63E:
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r7, r0, 24 lsrs r7, r0, 24
ldr r1, =gBattleMons ldr r1, =gBattleMons
@ -2937,11 +2937,11 @@ _0805EA5A:
bx r0 bx r0
thumb_func_end sub_805E990 thumb_func_end sub_805E990
thumb_func_start sub_805EA60 thumb_func_start BattleMusicStop
sub_805EA60: @ 805EA60 BattleMusicStop: @ 805EA60
push {r4-r6,lr} push {r4-r6,lr}
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
ldr r5, =gUnknown_020244D0 ldr r5, =gUnknown_020244D0
@ -2977,7 +2977,7 @@ _0805EAA2:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_805EA60 thumb_func_end BattleMusicStop
thumb_func_start sub_805EAB4 thumb_func_start sub_805EAB4
sub_805EAB4: @ 805EAB4 sub_805EAB4: @ 805EAB4
@ -3020,12 +3020,12 @@ sub_805EAE8: @ 805EAE8
cmp r0, 0 cmp r0, 0
beq _0805EB7E beq _0805EB7E
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r8, r0 mov r8, r0
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r9, r0 mov r9, r0
@ -3203,7 +3203,7 @@ sub_805EC84: @ 805EC84
ldr r0, =gUnknown_0831C6A0 ldr r0, =gUnknown_0831C6A0
bl LoadCompressedObjectPic bl LoadCompressedObjectPic
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r5, r0, 0 adds r5, r0, 0
lsls r5, 24 lsls r5, 24
lsrs r5, 24 lsrs r5, 24
@ -3252,7 +3252,7 @@ sub_805EC84: @ 805EC84
cmp r0, 0 cmp r0, 0
beq _0805ED56 beq _0805ED56
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
adds r5, r0, 0 adds r5, r0, 0
lsls r5, 24 lsls r5, 24
lsrs r5, 24 lsrs r5, 24

View File

@ -74,7 +74,7 @@ _08062C72:
lsrs r0, 24 lsrs r0, 24
mov r10, r0 mov r10, r0
ldr r4, =gBattleMons ldr r4, =gBattleMons
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
movs r1, 0x58 movs r1, 0x58
@ -87,7 +87,7 @@ _08062C72:
b _08062E2C b _08062E2C
_08062C9E: _08062C9E:
mov r0, r10 mov r0, r10
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r2, r0, 24 lsrs r2, r0, 24
movs r6, 0 movs r6, 0
@ -114,7 +114,7 @@ _08062CBA:
ldrh r1, [r4] ldrh r1, [r4]
mov r3, r9 mov r3, r9
ldrb r2, [r3] ldrb r2, [r3]
bl ai_rate_move bl AI_TypeCalc
lsls r0, 24 lsls r0, 24
lsrs r1, r0, 24 lsrs r1, r0, 24
movs r0, 0x2 movs r0, 0x2
@ -223,7 +223,7 @@ _08062D74:
movs r1, 0x2E movs r1, 0x2E
bl GetMonData bl GetMonData
mov r0, r10 mov r0, r10
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r2, r0, 24 lsrs r2, r0, 24
movs r4, 0 movs r4, 0
@ -246,7 +246,7 @@ _08062DE0:
beq _08062E1E beq _08062E1E
ldrh r1, [r5] ldrh r1, [r5]
ldrb r2, [r7] ldrb r2, [r7]
bl ai_rate_move bl AI_TypeCalc
lsls r0, 24 lsls r0, 24
lsrs r1, r0, 24 lsrs r1, r0, 24
movs r0, 0x2 movs r0, 0x2
@ -347,7 +347,7 @@ _08062EB0:
eors r0, r4 eors r0, r4
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAbsentBankFlags ldr r1, =gAbsentBankFlags
ldrb r1, [r1] ldrb r1, [r1]
ldr r2, =gBitTable ldr r2, =gBitTable
@ -367,7 +367,7 @@ _08062F04:
eors r0, r4 eors r0, r4
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r7, r0, 24 lsrs r7, r0, 24
b _08062F1E b _08062F1E
@ -705,7 +705,7 @@ ai_has_super_effective_move_on_field: @ 80631BC
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r10, r0 mov r10, r0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r3, r0, 24 lsrs r3, r0, 24
ldr r0, =gAbsentBankFlags ldr r0, =gAbsentBankFlags
@ -741,7 +741,7 @@ _0806320A:
ldrh r1, [r5] ldrh r1, [r5]
mov r3, r8 mov r3, r8
ldrb r2, [r3] ldrb r2, [r3]
bl ai_rate_move bl AI_TypeCalc
lsls r0, 24 lsls r0, 24
lsrs r1, r0, 24 lsrs r1, r0, 24
movs r0, 0x2 movs r0, 0x2
@ -779,7 +779,7 @@ _0806327C:
movs r1, 0x2 movs r1, 0x2
mov r0, r10 mov r0, r10
eors r0, r1 eors r0, r1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r3, r0, 24 lsrs r3, r0, 24
ldr r0, =gAbsentBankFlags ldr r0, =gAbsentBankFlags
@ -815,7 +815,7 @@ _080632AE:
ldrh r1, [r5] ldrh r1, [r5]
mov r3, r8 mov r3, r8
ldrb r2, [r3] ldrb r2, [r3]
bl ai_rate_move bl AI_TypeCalc
lsls r0, 24 lsls r0, 24
lsrs r1, r0, 24 lsrs r1, r0, 24
movs r0, 0x2 movs r0, 0x2
@ -951,7 +951,7 @@ _080633B8:
eors r0, r4 eors r0, r4
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAbsentBankFlags ldr r1, =gAbsentBankFlags
ldrb r1, [r1] ldrb r1, [r1]
ldr r2, =gBitTable ldr r2, =gBitTable
@ -972,7 +972,7 @@ _08063414:
eors r0, r4 eors r0, r4
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r10, r0 mov r10, r0
@ -1126,7 +1126,7 @@ _08063564:
adds r0, r1 adds r0, r1
ldrh r0, [r0] ldrh r0, [r0]
adds r1, r4, 0 adds r1, r4, 0
bl ai_rate_move bl AI_TypeCalc
ldr r1, [sp] ldr r1, [sp]
ands r1, r0 ands r1, r0
cmp r1, 0 cmp r1, 0
@ -1161,7 +1161,7 @@ _080635A2:
beq _080635DE beq _080635DE
ldrh r1, [r5] ldrh r1, [r5]
ldrb r2, [r7] ldrb r2, [r7]
bl ai_rate_move bl AI_TypeCalc
lsls r0, 24 lsls r0, 24
lsrs r1, r0, 24 lsrs r1, r0, 24
movs r0, 0x2 movs r0, 0x2
@ -1308,7 +1308,7 @@ _080636C4:
eors r0, r5 eors r0, r5
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAbsentBankFlags ldr r1, =gAbsentBankFlags
ldrb r1, [r1] ldrb r1, [r1]
ldr r2, =gBitTable ldr r2, =gBitTable
@ -1328,7 +1328,7 @@ _08063718:
eors r0, r5 eors r0, r5
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
b _08063732 b _08063732
@ -1542,7 +1542,7 @@ _080638C2:
cmp r0, 0 cmp r0, 0
bne _08063910 bne _08063910
adds r0, r6, 0 adds r0, r6, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
adds r6, r5, 0 adds r6, r5, 0
@ -1550,13 +1550,13 @@ _080638C2:
.pool .pool
_08063910: _08063910:
adds r0, r5, 0 adds r0, r5, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
movs r0, 0x2 movs r0, 0x2
eors r5, r0 eors r5, r0
adds r0, r5, 0 adds r0, r5, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
_08063928: _08063928:
@ -1688,7 +1688,7 @@ sub_8063A08: @ 8063A08
lsrs r2, 24 lsrs r2, 24
mov r8, r2 mov r8, r2
movs r7, 0 movs r7, 0
ldr r0, =gUnknown_0831ACE8 ldr r0, =gTypeEffectiveness
mov r10, r0 mov r10, r0
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0xFF cmp r0, 0xFF
@ -1789,7 +1789,7 @@ _08063AE0:
eors r0, r5 eors r0, r5
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAbsentBankFlags ldr r1, =gAbsentBankFlags
ldrb r1, [r1] ldrb r1, [r1]
ldr r2, =gBitTable ldr r2, =gBitTable
@ -1810,7 +1810,7 @@ _08063B20:
eors r0, r5 eors r0, r5
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
str r0, [sp, 0x14] str r0, [sp, 0x14]
@ -1844,7 +1844,7 @@ _08063B6C:
eors r0, r1 eors r0, r1
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
str r0, [sp, 0x4] str r0, [sp, 0x4]

View File

@ -949,17 +949,17 @@ _080A4148:
ldrsh r0, [r6, r3] ldrsh r0, [r6, r3]
cmp r0, 0 cmp r0, 0
bne _080A4190 bne _080A4190
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r1, 0xE] strh r0, [r1, 0xE]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
b _080A4198 b _080A4198
.pool .pool
_080A4190: _080A4190:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r1, 0xE] strh r0, [r1, 0xE]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
_080A4198: _080A4198:
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r1, 0x10] strh r0, [r1, 0x10]
@ -1266,7 +1266,7 @@ _080A43F8:
ldr r0, =gBankSpriteIds ldr r0, =gBankSpriteIds
adds r0, r6, r0 adds r0, r6, r0
ldrb r4, [r0] ldrb r4, [r0]
ldr r5, =gUnknown_02022E18 ldr r5, =gBattle_BG1_X
ldr r0, =gSprites ldr r0, =gSprites
lsls r1, r4, 4 lsls r1, r4, 4
adds r1, r4 adds r1, r4
@ -1294,7 +1294,7 @@ _080A43F8:
subs r0, 0x1 subs r0, 0x1
strh r0, [r5] strh r0, [r5]
_080A447A: _080A447A:
ldr r5, =gUnknown_02022E1A ldr r5, =gBattle_BG1_Y
ldr r2, =gSprites ldr r2, =gSprites
lsls r1, r4, 4 lsls r1, r4, 4
adds r1, r4 adds r1, r4
@ -1322,7 +1322,7 @@ _080A447A:
orrs r1, r2 orrs r1, r2
strb r1, [r0] strb r1, [r0]
_080A44B0: _080A44B0:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
@ -1431,7 +1431,7 @@ _080A455E:
ldr r0, =gBankSpriteIds ldr r0, =gBankSpriteIds
adds r2, r5, r0 adds r2, r5, r0
ldrb r4, [r2] ldrb r4, [r2]
ldr r5, =gUnknown_02022E1C ldr r5, =gBattle_BG2_X
ldr r3, =gSprites ldr r3, =gSprites
lsls r1, r4, 4 lsls r1, r4, 4
adds r1, r4 adds r1, r4
@ -1443,7 +1443,7 @@ _080A455E:
negs r0, r0 negs r0, r0
adds r0, 0x20 adds r0, 0x20
strh r0, [r5] strh r0, [r5]
ldr r4, =gUnknown_02022E1E ldr r4, =gBattle_BG2_Y
ldrh r0, [r1, 0x26] ldrh r0, [r1, 0x26]
ldrh r1, [r1, 0x22] ldrh r1, [r1, 0x22]
adds r0, r1 adds r0, r1
@ -1653,19 +1653,19 @@ sub_80A477C: @ 80A477C
_080A479C: _080A479C:
movs r0, 0x1 movs r0, 0x1
bl sub_80A6C68 bl sub_80A6C68
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
b _080A47C6 b _080A47C6
.pool .pool
_080A47B8: _080A47B8:
movs r0, 0x2 movs r0, 0x2
bl sub_80A6C68 bl sub_80A6C68
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r4, [r0] strh r4, [r0]
_080A47C6: _080A47C6:
add sp, 0x10 add sp, 0x10
@ -1714,13 +1714,13 @@ task_pA_ma0A_obj_to_bg_pal: @ 80A47D8
ldrsh r0, [r5, r1] ldrsh r0, [r5, r1]
cmp r0, 0 cmp r0, 0
bne _080A4870 bne _080A4870
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
lsls r0, r3, 16 lsls r0, r3, 16
asrs r0, 16 asrs r0, 16
ldrh r3, [r5, 0xE] ldrh r3, [r5, 0xE]
adds r0, r3 adds r0, r3
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
lsls r0, r2, 16 lsls r0, r2, 16
asrs r0, 16 asrs r0, 16
ldrh r5, [r5, 0x10] ldrh r5, [r5, 0x10]
@ -1740,13 +1740,13 @@ task_pA_ma0A_obj_to_bg_pal: @ 80A47D8
b _080A4896 b _080A4896
.pool .pool
_080A4870: _080A4870:
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
lsls r0, r3, 16 lsls r0, r3, 16
asrs r0, 16 asrs r0, 16
ldrh r3, [r5, 0xE] ldrh r3, [r5, 0xE]
adds r0, r3 adds r0, r3
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
lsls r0, r2, 16 lsls r0, r2, 16
asrs r0, 16 asrs r0, 16
ldrh r5, [r5, 0x10] ldrh r5, [r5, 0x10]

View File

@ -200,7 +200,7 @@ _080D5320:
_080D5324: _080D5324:
movs r0, 0x3 movs r0, 0x3
_080D5326: _080D5326:
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
adds r0, r4, 0 adds r0, r4, 0

View File

@ -12782,14 +12782,14 @@ sub_8104E74: @ 8104E74
lsrs r0, 24 lsrs r0, 24
cmp r0, 0x1 cmp r0, 0x1
bne _08104ED4 bne _08104ED4
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r5, 0x14] strh r0, [r5, 0x14]
ldr r0, =0x04000014 ldr r0, =0x04000014
b _08104EDC b _08104EDC
.pool .pool
_08104ED4: _08104ED4:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r5, 0x14] strh r0, [r5, 0x14]
ldr r0, =0x04000018 ldr r0, =0x04000018
@ -15305,10 +15305,10 @@ sub_81062E8: @ 81062E8
movs r2, 0x1 movs r2, 0x1
bl lcd_bg_operations bl lcd_bg_operations
_0810632A: _0810632A:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r4, =gUnknown_02022E1A ldr r4, =gBattle_BG1_Y
strh r1, [r4] strh r1, [r4]
movs r0, 0x14 movs r0, 0x14
movs r1, 0 movs r1, 0
@ -15540,10 +15540,10 @@ sub_81064F8: @ 81064F8
movs r2, 0x1 movs r2, 0x1
bl lcd_bg_operations bl lcd_bg_operations
_0810653A: _0810653A:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r4, =gUnknown_02022E1A ldr r4, =gBattle_BG1_Y
strh r1, [r4] strh r1, [r4]
movs r0, 0x14 movs r0, 0x14
movs r1, 0 movs r1, 0
@ -18159,11 +18159,11 @@ _08107A32:
beq _08107AB4 beq _08107AB4
ldr r1, =0x0000ffb0 ldr r1, =0x0000ffb0
adds r0, r1, 0 adds r0, r1, 0
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
strh r0, [r2] strh r0, [r2]
adds r1, 0x20 adds r1, 0x20
adds r0, r1, 0 adds r0, r1, 0
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
strh r0, [r2] strh r0, [r2]
movs r0, 0x2 movs r0, 0x2
strh r0, [r6, 0x8] strh r0, [r6, 0x8]
@ -18183,12 +18183,12 @@ _08107AB4:
bne _08107AF8 bne _08107AF8
ldr r2, =0x0000ff20 ldr r2, =0x0000ff20
adds r0, r2, 0 adds r0, r2, 0
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
strh r0, [r2] strh r0, [r2]
movs r2, 0x80 movs r2, 0x80
lsls r2, 1 lsls r2, 1
adds r0, r2, 0 adds r0, r2, 0
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
strh r0, [r2] strh r0, [r2]
movs r0, 0x2 movs r0, 0x2
strh r0, [r6, 0x8] strh r0, [r6, 0x8]
@ -18198,11 +18198,11 @@ _08107AB4:
b _08107B0E b _08107B0E
.pool .pool
_08107AF8: _08107AF8:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r4, [r0] strh r4, [r0]
ldr r1, =0x0000ffd0 ldr r1, =0x0000ffd0
adds r0, r1, 0 adds r0, r1, 0
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
strh r0, [r2] strh r0, [r2]
ldr r0, =0x0000fffe ldr r0, =0x0000fffe
strh r0, [r6, 0x8] strh r0, [r6, 0x8]
@ -18210,11 +18210,11 @@ _08107AF8:
strh r0, [r6, 0xA] strh r0, [r6, 0xA]
strh r4, [r7, 0xE] strh r4, [r7, 0xE]
_08107B0E: _08107B0E:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
ldrh r1, [r2] ldrh r1, [r2]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg
@ -18264,8 +18264,8 @@ sub_8107B84: @ 8107B84
sub sp, 0x10 sub sp, 0x10
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
ldr r0, =gTasks ldr r0, =gTasks
lsls r4, r5, 2 lsls r4, r5, 2
adds r4, r5 adds r4, r5
@ -18425,8 +18425,8 @@ sub_8107CC4: @ 8107CC4
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
adds r5, r0, 0 adds r5, r0, 0
ldr r7, =gUnknown_02022E18 ldr r7, =gBattle_BG1_X
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
mov r8, r0 mov r8, r0
ldr r6, =gTasks ldr r6, =gTasks
lsls r0, r5, 2 lsls r0, r5, 2
@ -21049,14 +21049,14 @@ sub_8109198: @ 8109198
cmp r4, r0 cmp r4, r0
bne _081091DE bne _081091DE
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
ldrb r1, [r5] ldrb r1, [r5]
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
cmp r1, r0 cmp r1, r0
beq _081091D6 beq _081091D6
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
ldrb r1, [r5] ldrb r1, [r5]
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -26948,10 +26948,10 @@ sub_810C0A0: @ 810C0A0
movs r2, 0x1 movs r2, 0x1
bl lcd_bg_operations bl lcd_bg_operations
_0810C0E2: _0810C0E2:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r4, =gUnknown_02022E1A ldr r4, =gBattle_BG1_Y
strh r1, [r4] strh r1, [r4]
movs r0, 0x14 movs r0, 0x14
movs r1, 0 movs r1, 0
@ -26999,7 +26999,7 @@ sub_810C164: @ 810C164
sub sp, 0x10 sub sp, 0x10
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r2, =0x0000ffff ldr r2, =0x0000ffff
adds r0, r2, 0 adds r0, r2, 0
ldrh r2, [r1] ldrh r2, [r1]
@ -27150,10 +27150,10 @@ _0810C29C:
movs r2, 0 movs r2, 0
bl lcd_bg_operations bl lcd_bg_operations
_0810C2B0: _0810C2B0:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0x50 movs r0, 0x50
movs r1, 0 movs r1, 0
@ -27230,10 +27230,10 @@ sub_810C324: @ 810C324
movs r2, 0x1 movs r2, 0x1
bl lcd_bg_operations bl lcd_bg_operations
_0810C366: _0810C366:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r4, =gUnknown_02022E1A ldr r4, =gBattle_BG1_Y
strh r1, [r4] strh r1, [r4]
movs r0, 0x14 movs r0, 0x14
movs r1, 0 movs r1, 0
@ -27283,7 +27283,7 @@ sub_810C3F0: @ 810C3F0
sub sp, 0x10 sub sp, 0x10
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldr r3, =gTasks ldr r3, =gTasks
lsls r1, r4, 2 lsls r1, r4, 2
adds r1, r4 adds r1, r4
@ -27422,10 +27422,10 @@ _0810C50C:
movs r2, 0 movs r2, 0
bl lcd_bg_operations bl lcd_bg_operations
_0810C520: _0810C520:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0x50 movs r0, 0x50
movs r1, 0 movs r1, 0
@ -28050,7 +28050,7 @@ sub_810C9E4: @ 810C9E4
ldrh r0, [r4, 0x2] ldrh r0, [r4, 0x2]
lsls r0, 20 lsls r0, 20
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
adds r0, r5, 0 adds r0, r5, 0
@ -30134,7 +30134,7 @@ _0810DB1A:
lsls r0, 24 lsls r0, 24
cmp r0, 0 cmp r0, 0
bne _0810DB50 bne _0810DB50
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
ldrh r0, [r4, 0x1A] ldrh r0, [r4, 0x1A]
lsls r0, 16 lsls r0, 16
asrs r0, 24 asrs r0, 24
@ -30145,7 +30145,7 @@ _0810DB1A:
b _0810DB60 b _0810DB60
.pool .pool
_0810DB50: _0810DB50:
ldr r2, =gUnknown_02022E20 ldr r2, =gBattle_BG3_X
ldrh r1, [r4, 0x1A] ldrh r1, [r4, 0x1A]
lsls r1, 16 lsls r1, 16
asrs r1, 24 asrs r1, 24
@ -33064,7 +33064,7 @@ _0810F212:
bne _0810F2B8 bne _0810F2B8
_0810F22E: _0810F22E:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
adds r7, r4, 0 adds r7, r4, 0
@ -33193,7 +33193,7 @@ sub_810F340: @ 810F340
push {r4,r5,lr} push {r4,r5,lr}
adds r5, r0, 0 adds r5, r0, 0
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
movs r1, 0x3C movs r1, 0x3C
@ -33370,7 +33370,7 @@ sub_810F46C: @ 810F46C
cmp r0, 0 cmp r0, 0
bne _0810F502 bne _0810F502
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
adds r6, r4, 0 adds r6, r4, 0
@ -33441,7 +33441,7 @@ sub_810F524: @ 810F524
cmp r0, 0 cmp r0, 0
bne _0810F57C bne _0810F57C
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
adds r4, r0, 0 adds r4, r0, 0
@ -34597,14 +34597,14 @@ _0810FE92:
lsrs r0, 24 lsrs r0, 24
cmp r0, 0x1 cmp r0, 0x1
bne _0810FEB8 bne _0810FEB8
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0x1C] strh r0, [r4, 0x1C]
ldr r0, =0x04000014 ldr r0, =0x04000014
b _0810FEC0 b _0810FEC0
.pool .pool
_0810FEB8: _0810FEB8:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0x1C] strh r0, [r4, 0x1C]
ldr r0, =0x04000018 ldr r0, =0x04000018
@ -36221,9 +36221,9 @@ sub_8110BCC: @ 8110BCC
movs r2, 0x1 movs r2, 0x1
bl lcd_bg_operations bl lcd_bg_operations
_08110C10: _08110C10:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r5, [r0] strh r5, [r0]
ldr r4, =gUnknown_02022E1A ldr r4, =gBattle_BG1_Y
strh r5, [r4] strh r5, [r4]
movs r0, 0x14 movs r0, 0x14
movs r1, 0 movs r1, 0
@ -36293,7 +36293,7 @@ sub_8110CB0: @ 8110CB0
adds r2, r1, 0 adds r2, r1, 0
cmp r0, 0 cmp r0, 0
bne _08110CE4 bne _08110CE4
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r3, =0x0000fffa ldr r3, =0x0000fffa
adds r0, r3, 0 adds r0, r3, 0
ldrh r3, [r1] ldrh r3, [r1]
@ -36301,12 +36301,12 @@ sub_8110CB0: @ 8110CB0
b _08110CEA b _08110CEA
.pool .pool
_08110CE4: _08110CE4:
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x6 adds r0, 0x6
_08110CEA: _08110CEA:
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldr r3, =0x0000ffff ldr r3, =0x0000ffff
adds r0, r3, 0 adds r0, r3, 0
ldrh r3, [r1] ldrh r3, [r1]
@ -36442,10 +36442,10 @@ _08110DFC:
movs r2, 0 movs r2, 0
bl lcd_bg_operations bl lcd_bg_operations
_08110E10: _08110E10:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0x50 movs r0, 0x50
movs r1, 0 movs r1, 0
@ -41115,13 +41115,13 @@ sub_81133E8: @ 81133E8
bne _08113424 bne _08113424
ldr r0, =0x04000014 ldr r0, =0x04000014
str r0, [sp] str r0, [sp]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
b _0811342A b _0811342A
.pool .pool
_08113424: _08113424:
ldr r0, =0x04000018 ldr r0, =0x04000018
str r0, [sp] str r0, [sp]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
_0811342A: _0811342A:
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0xC] strh r0, [r4, 0xC]
@ -42107,7 +42107,7 @@ _08113C1E:
add r4, sp, 0xC add r4, sp, 0xC
adds r0, r4, 0 adds r0, r4, 0
bl sub_80A6B30 bl sub_80A6B30
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r5, 0x1C] strh r0, [r5, 0x1C]
ldr r1, =0x00003f42 ldr r1, =0x00003f42
@ -42125,11 +42125,11 @@ _08113C1E:
lsls r0, 24 lsls r0, 24
cmp r0, 0 cmp r0, 0
bne _08113CB0 bne _08113CB0
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
b _08113CAA b _08113CAA
.pool .pool
_08113C80: _08113C80:
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r5, 0x1C] strh r0, [r5, 0x1C]
ldr r1, =0x00003f44 ldr r1, =0x00003f44
@ -42146,7 +42146,7 @@ _08113C80:
lsls r0, 24 lsls r0, 24
cmp r0, 0 cmp r0, 0
bne _08113CB0 bne _08113CB0
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
_08113CAA: _08113CAA:
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0xF0 adds r0, 0xF0
@ -42426,14 +42426,14 @@ _08113EF8:
ldr r1, =0x00003f42 ldr r1, =0x00003f42
movs r0, 0x50 movs r0, 0x50
bl SetGpuReg bl SetGpuReg
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
b _08113F2E b _08113F2E
.pool .pool
_08113F24: _08113F24:
ldr r1, =0x00003f44 ldr r1, =0x00003f44
movs r0, 0x50 movs r0, 0x50
bl SetGpuReg bl SetGpuReg
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
_08113F2E: _08113F2E:
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0xF0 adds r0, 0xF0
@ -42447,7 +42447,7 @@ _08113F40:
bne _08113F68 bne _08113F68
mov r0, sp mov r0, sp
bl sub_80A6B30 bl sub_80A6B30
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r5, 0x1C] strh r0, [r5, 0x1C]
mov r0, sp mov r0, sp
@ -42459,7 +42459,7 @@ _08113F40:
b _08113F78 b _08113F78
.pool .pool
_08113F68: _08113F68:
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r5, 0x1C] strh r0, [r5, 0x1C]
movs r0, 0 movs r0, 0
@ -43324,7 +43324,7 @@ _0811465C:
lsls r1, 4 lsls r1, 4
movs r2, 0x20 movs r2, 0x20
bl LoadCompressedPalette bl LoadCompressedPalette
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldr r0, =gSprites ldr r0, =gSprites
lsls r1, r4, 4 lsls r1, r4, 4
adds r1, r4 adds r1, r4
@ -43334,7 +43334,7 @@ _0811465C:
negs r0, r0 negs r0, r0
adds r0, 0x60 adds r0, 0x60
strh r0, [r2] strh r0, [r2]
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
ldrh r0, [r1, 0x22] ldrh r0, [r1, 0x22]
negs r0, r0 negs r0, r0
adds r0, 0x20 adds r0, 0x20
@ -43399,7 +43399,7 @@ sub_8114748: @ 8114748
adds r0, 0x4 adds r0, 0x4
movs r5, 0 movs r5, 0
strh r0, [r4, 0x1C] strh r0, [r4, 0x1C]
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldrh r3, [r2] ldrh r3, [r2]
subs r1, r3, 0x4 subs r1, r3, 0x4
strh r1, [r2] strh r1, [r2]
@ -43586,7 +43586,7 @@ _08114902:
beq _0811492E beq _0811492E
_08114908: _08114908:
adds r0, r4, 0 adds r0, r4, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
adds r0, r4, 0 adds r0, r4, 0
@ -44104,17 +44104,17 @@ _08114D3C:
strh r0, [r4, 0x1E] strh r0, [r4, 0x1E]
cmp r0, 0x1 cmp r0, 0x1
bne _08114D70 bne _08114D70
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0x20] strh r0, [r4, 0x20]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
b _08114D78 b _08114D78
.pool .pool
_08114D70: _08114D70:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0x20] strh r0, [r4, 0x20]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
_08114D78: _08114D78:
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0x22] strh r0, [r4, 0x22]
@ -44189,11 +44189,11 @@ _08114DF6:
ldrsh r0, [r4, r1] ldrsh r0, [r4, r1]
cmp r0, 0x1 cmp r0, 0x1
bne _08114E20 bne _08114E20
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
b _08114E22 b _08114E22
.pool .pool
_08114E20: _08114E20:
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
_08114E22: _08114E22:
ldrh r0, [r4, 0x22] ldrh r0, [r4, 0x22]
subs r0, r2 subs r0, r2
@ -44210,11 +44210,11 @@ _08114E22:
ldrsh r0, [r4, r3] ldrsh r0, [r4, r3]
cmp r0, 0x1 cmp r0, 0x1
bne _08114E4C bne _08114E4C
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
b _08114E4E b _08114E4E
.pool .pool
_08114E4C: _08114E4C:
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
_08114E4E: _08114E4E:
ldrh r0, [r4, 0x22] ldrh r0, [r4, 0x22]
subs r0, r2 subs r0, r2
@ -44296,11 +44296,11 @@ sub_8114EB4: @ 8114EB4
lsrs r0, 24 lsrs r0, 24
cmp r0, 0x1 cmp r0, 0x1
bne _08114F00 bne _08114F00
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
b _08114F02 b _08114F02
.pool .pool
_08114F00: _08114F00:
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
_08114F02: _08114F02:
strh r4, [r0] strh r4, [r0]
adds r0, r5, 0 adds r0, r5, 0
@ -44450,11 +44450,11 @@ _08115018:
strh r0, [r4, 0x1E] strh r0, [r4, 0x1E]
cmp r0, 0x1 cmp r0, 0x1
bne _08115044 bne _08115044
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
b _08115046 b _08115046
.pool .pool
_08115044: _08115044:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
_08115046: _08115046:
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0x20] strh r0, [r4, 0x20]
@ -44540,13 +44540,13 @@ sub_81150E0: @ 81150E0
lsrs r4, r2, 16 lsrs r4, r2, 16
cmp r0, 0x1 cmp r0, 0x1
bne _08115104 bne _08115104
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r3, [r0] ldrh r3, [r0]
ldr r0, =0x04000014 ldr r0, =0x04000014
b _0811510A b _0811510A
.pool .pool
_08115104: _08115104:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r3, [r0] ldrh r3, [r0]
ldr r0, =0x04000018 ldr r0, =0x04000018
_0811510A: _0811510A:
@ -44805,7 +44805,7 @@ _08115314:
beq _08115340 beq _08115340
cmp r0, 0x5 cmp r0, 0x5
bne _08115380 bne _08115380
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r4, 0x22] strh r0, [r4, 0x22]
ldr r0, =sub_81153AC ldr r0, =sub_81153AC
@ -44907,7 +44907,7 @@ _081153DA:
ands r0, r1 ands r0, r1
cmp r0, 0 cmp r0, 0
bne _08115404 bne _08115404
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
ldrh r0, [r3, 0x26] ldrh r0, [r3, 0x26]
ldrh r2, [r3, 0x22] ldrh r2, [r3, 0x22]
adds r0, r2 adds r0, r2
@ -44915,7 +44915,7 @@ _081153DA:
b _0811540E b _0811540E
.pool .pool
_08115404: _08115404:
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r1, [r3, 0x22] ldrh r1, [r3, 0x22]
ldrh r2, [r3, 0x26] ldrh r2, [r3, 0x26]
subs r1, r2 subs r1, r2
@ -44951,7 +44951,7 @@ _08115430:
ands r1, r0 ands r1, r0
cmp r1, 0 cmp r1, 0
bne _0811545C bne _0811545C
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
ldrh r0, [r3, 0x24] ldrh r0, [r3, 0x24]
ldrh r2, [r3, 0x22] ldrh r2, [r3, 0x22]
adds r0, r2 adds r0, r2
@ -44959,7 +44959,7 @@ _08115430:
b _08115466 b _08115466
.pool .pool
_0811545C: _0811545C:
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r1, [r3, 0x22] ldrh r1, [r3, 0x22]
ldrh r2, [r3, 0x24] ldrh r2, [r3, 0x24]
subs r1, r2 subs r1, r2
@ -44987,7 +44987,7 @@ _08115484:
b _0811549C b _0811549C
.pool .pool
_08115490: _08115490:
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
ldrh r0, [r3, 0x22] ldrh r0, [r3, 0x22]
strh r0, [r1] strh r0, [r1]
adds r0, r2, 0 adds r0, r2, 0
@ -45263,7 +45263,7 @@ _0811565A:
movs r0, 0xFF movs r0, 0xFF
ands r1, r0 ands r1, r0
strh r1, [r4, 0xC] strh r1, [r4, 0xC]
ldr r2, =gUnknown_02022E20 ldr r2, =gBattle_BG3_X
ldrh r0, [r4, 0xA] ldrh r0, [r4, 0xA]
strh r0, [r2] strh r0, [r2]
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
@ -45295,7 +45295,7 @@ sub_81156D0: @ 81156D0
ldrsh r0, [r2, r4] ldrsh r0, [r2, r4]
cmp r1, r0 cmp r1, r0
bne _08115710 bne _08115710
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
@ -45305,7 +45305,7 @@ sub_81156D0: @ 81156D0
b _0811571C b _0811571C
.pool .pool
_08115710: _08115710:
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
ldrh r0, [r2, 0xA] ldrh r0, [r2, 0xA]
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E22 ldr r1, =gUnknown_02022E22
@ -46553,7 +46553,7 @@ _081160DC:
beq _081160F4 beq _081160F4
b _08116104 b _08116104
_081160E2: _081160E2:
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
b _081160F6 b _081160F6
.pool .pool
_081160EC: _081160EC:
@ -46793,7 +46793,7 @@ sub_81162A4: @ 81162A4
strh r1, [r2, 0xE] strh r1, [r2, 0xE]
ldrh r1, [r3, 0x6] ldrh r1, [r3, 0x6]
strh r1, [r2, 0x18] strh r1, [r2, 0x18]
ldr r4, =gUnknown_02022E20 ldr r4, =gBattle_BG3_X
ldrh r1, [r3] ldrh r1, [r3]
strh r1, [r4] strh r1, [r4]
ldr r4, =gUnknown_02022E22 ldr r4, =gUnknown_02022E22
@ -46824,7 +46824,7 @@ sub_81162F8: @ 81162F8
mov r12, r1 mov r12, r1
cmp r0, 0 cmp r0, 0
bne _0811637E bne _0811637E
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r2, [r0] ldrh r2, [r0]
movs r7, 0x8 movs r7, 0x8
ldrsh r1, [r3, r7] ldrsh r1, [r3, r7]
@ -47348,7 +47348,7 @@ sub_811675C: @ 811675C
ldrsh r0, [r0, r1] ldrsh r0, [r0, r1]
bl sub_811583C bl sub_811583C
adds r2, r0, 0 adds r2, r0, 0
ldr r0, =gUnknown_02022FF0 ldr r0, =gBattleTerrain
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0x9 cmp r0, 0x9
bhi _08116832 bhi _08116832
@ -47996,7 +47996,7 @@ _08116CAC:
adds r1, 0x1 adds r1, 0x1
movs r2, 0x2 movs r2, 0x2
bl LoadPalette bl LoadPalette
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldr r0, =gSprites ldr r0, =gSprites
lsls r1, r4, 4 lsls r1, r4, 4
adds r1, r4 adds r1, r4
@ -48006,7 +48006,7 @@ _08116CAC:
negs r0, r0 negs r0, r0
adds r0, 0x20 adds r0, 0x20
strh r0, [r2] strh r0, [r2]
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
ldrh r0, [r1, 0x22] ldrh r0, [r1, 0x22]
negs r0, r0 negs r0, r0
adds r0, 0x20 adds r0, 0x20
@ -48050,7 +48050,7 @@ sub_8116D64: @ 8116D64
movs r1, 0 movs r1, 0
mov r8, r1 mov r8, r1
strh r0, [r5, 0x1C] strh r0, [r5, 0x1C]
ldr r7, =gUnknown_02022E1A ldr r7, =gBattle_BG1_Y
ldrh r2, [r7] ldrh r2, [r7]
subs r1, r2, 0x4 subs r1, r2, 0x4
strh r1, [r7] strh r1, [r7]
@ -48537,10 +48537,10 @@ _081171F8:
movs r2, 0x20 movs r2, 0x20
bl LoadCompressedPalette bl LoadCompressedPalette
_08117206: _08117206:
ldr r3, =gUnknown_02022E18 ldr r3, =gBattle_BG1_X
movs r2, 0 movs r2, 0
strh r2, [r3] strh r2, [r3]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
ldr r1, =gUnknown_0203A110 ldr r1, =gUnknown_0203A110
ldr r0, [r1] ldr r0, [r1]
@ -48645,7 +48645,7 @@ sub_81172EC: @ 81172EC
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
ldr r1, =gTasks ldr r1, =gTasks
lsls r0, r6, 2 lsls r0, r6, 2
adds r0, r6 adds r0, r6
@ -49152,7 +49152,7 @@ sub_81176D8: @ 81176D8
ldrh r7, [r1, 0x1E] ldrh r7, [r1, 0x1E]
adds r2, r7 adds r2, r7
strh r2, [r1, 0x1E] strh r2, [r1, 0x1E]
ldr r6, =gUnknown_02022E20 ldr r6, =gBattle_BG3_X
lsls r0, r3, 16 lsls r0, r3, 16
asrs r0, 24 asrs r0, 24
ldrh r4, [r6] ldrh r4, [r6]
@ -49497,10 +49497,10 @@ _081179CC:
ldr r0, [sp, 0x5C] ldr r0, [sp, 0x5C]
movs r2, 0x20 movs r2, 0x20
bl LoadCompressedPalette bl LoadCompressedPalette
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
ldr r1, =gTasks ldr r1, =gTasks
mov r2, r9 mov r2, r9
@ -49563,7 +49563,7 @@ _08117A7E:
ldrsh r0, [r3, r1] ldrsh r0, [r3, r1]
cmp r0, 0 cmp r0, 0
bge _08117AA4 bge _08117AA4
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
lsls r1, r4, 16 lsls r1, r4, 16
asrs r1, 24 asrs r1, 24
ldrh r0, [r2] ldrh r0, [r2]
@ -49572,7 +49572,7 @@ _08117A7E:
b _08117AB0 b _08117AB0
.pool .pool
_08117AA4: _08117AA4:
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
lsls r0, r4, 16 lsls r0, r4, 16
asrs r0, 24 asrs r0, 24
ldrh r2, [r1] ldrh r2, [r1]
@ -49759,7 +49759,7 @@ sub_8117C24: @ 8117C24
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
ldr r2, =gBattleAnimArgs ldr r2, =gBattleAnimArgs
ldr r1, =gUnknown_02022FF0 ldr r1, =gBattleTerrain
ldrb r1, [r1] ldrb r1, [r1]
strh r1, [r2] strh r1, [r2]
bl move_anim_task_del bl move_anim_task_del
@ -50529,14 +50529,14 @@ sub_811828C: @ 811828C
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl DestroyTask bl DestroyTask
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0x50 movs r0, 0x50
movs r1, 0 movs r1, 0
@ -50569,7 +50569,7 @@ task_battle_intro_80BC47C: @ 81182EC
sub sp, 0x4 sub sp, 0x4
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x6 adds r0, 0x6
strh r0, [r1] strh r0, [r1]
@ -50697,7 +50697,7 @@ _08118400:
ldrsh r0, [r2, r1] ldrsh r0, [r2, r1]
cmp r0, 0x1 cmp r0, 0x1
bne _08118420 bne _08118420
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
ldrh r1, [r2] ldrh r1, [r2]
ldr r0, =0x0000ffb0 ldr r0, =0x0000ffb0
cmp r1, r0 cmp r1, r0
@ -50706,7 +50706,7 @@ _08118400:
b _0811842C b _0811842C
.pool .pool
_08118420: _08118420:
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
ldrh r1, [r2] ldrh r1, [r2]
ldr r0, =0x0000ffc8 ldr r0, =0x0000ffc8
cmp r1, r0 cmp r1, r0
@ -50861,13 +50861,13 @@ _08118568:
cmp r0, 0x4 cmp r0, 0x4
bne _08118580 bne _08118580
_0811856C: _0811856C:
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x8 adds r0, 0x8
b _0811857E b _0811857E
.pool .pool
_08118578: _08118578:
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x6 adds r0, 0x6
_0811857E: _0811857E:
@ -50882,7 +50882,7 @@ _08118580:
adds r6, r0, 0 adds r6, r0, 0
cmp r1, 0x4 cmp r1, 0x4
bne _081185E4 bne _081185E4
ldr r7, =gUnknown_02022E1A ldr r7, =gBattle_BG1_Y
ldrh r0, [r4, 0x14] ldrh r0, [r4, 0x14]
bl Cos2 bl Cos2
lsls r0, 16 lsls r0, 16
@ -51202,7 +51202,7 @@ task_battle_intro_anim: @ 8118844
sub sp, 0x4 sub sp, 0x4
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x8 adds r0, 0x8
strh r0, [r1] strh r0, [r1]
@ -51505,7 +51505,7 @@ task00_battle_intro_wireless: @ 8118AC0
ldrsh r0, [r7, r2] ldrsh r0, [r7, r2]
cmp r0, 0 cmp r0, 0
bne _08118B36 bne _08118B36
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldrh r1, [r2] ldrh r1, [r2]
movs r0, 0x80 movs r0, 0x80
lsls r0, 8 lsls r0, 8
@ -51519,7 +51519,7 @@ task00_battle_intro_wireless: @ 8118AC0
_08118AFE: _08118AFE:
adds r0, r1, 0x3 adds r0, r1, 0x3
strh r0, [r2] strh r0, [r2]
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x3 subs r0, 0x3
strh r0, [r1] strh r0, [r1]
@ -51878,10 +51878,10 @@ _08118DD4:
ldr r2, =0x0000ffd0 ldr r2, =0x0000ffd0
adds r0, r2, 0 adds r0, r2, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
movs r0, 0xF0 movs r0, 0xF0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
subs r2, 0xC0 subs r2, 0xC0
adds r0, r2, 0 adds r0, r2, 0
strh r0, [r1] strh r0, [r1]
@ -51958,10 +51958,10 @@ _08118EC2:
subs r0, r1, 0x2 subs r0, r1, 0x2
strh r0, [r3, 0xC] strh r0, [r3, 0xC]
_08118ED8: _08118ED8:
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r3, 0xC] ldrh r0, [r3, 0xC]
strh r0, [r1] strh r0, [r1]
ldr r2, =gUnknown_02022E1C ldr r2, =gBattle_BG2_X
negs r1, r0 negs r1, r0
strh r1, [r2] strh r1, [r2]
lsls r0, 16 lsls r0, 16
@ -51977,7 +51977,7 @@ _08118F00:
ldrh r0, [r1] ldrh r0, [r1]
adds r3, r0, 0x2 adds r3, r0, 0x2
strh r3, [r1] strh r3, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x2 adds r0, 0x2
strh r0, [r1] strh r0, [r1]
@ -52078,7 +52078,7 @@ sub_8118FBC: @ 8118FBC
lsls r5, 16 lsls r5, 16
lsrs r5, 16 lsrs r5, 16
adds r0, r4, 0 adds r0, r4, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
ldr r1, =gBattleSpritesGfx ldr r1, =gBattleSpritesGfx

View File

@ -1655,11 +1655,11 @@ _0815AE08:
strh r2, [r5, 0x16] strh r2, [r5, 0x16]
cmp r7, 0x1 cmp r7, 0x1
bne _0815AE30 bne _0815AE30
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
b _0815AE32 b _0815AE32
.pool .pool
_0815AE30: _0815AE30:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
_0815AE32: _0815AE32:
ldrh r2, [r0] ldrh r2, [r0]
strh r2, [r5, 0x18] strh r2, [r5, 0x18]
@ -3385,7 +3385,7 @@ _0815BC02:
lsls r0, 24 lsls r0, 24
cmp r0, 0 cmp r0, 0
beq _0815BC34 beq _0815BC34
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r3, =0x0000ffc8 ldr r3, =0x0000ffc8
b _0815BC5C b _0815BC5C
.pool .pool
@ -3396,19 +3396,19 @@ _0815BC34:
lsls r0, 24 lsls r0, 24
cmp r0, 0 cmp r0, 0
beq _0815BC58 beq _0815BC58
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r2, =0x0000ff79 ldr r2, =0x0000ff79
adds r0, r2, 0 adds r0, r2, 0
b _0815BC5E b _0815BC5E
.pool .pool
_0815BC58: _0815BC58:
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r3, =0x0000fff6 ldr r3, =0x0000fff6
_0815BC5C: _0815BC5C:
adds r0, r3, 0 adds r0, r3, 0
_0815BC5E: _0815BC5E:
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
mov r0, sp mov r0, sp
@ -3428,10 +3428,10 @@ _0815BC5E:
adds r1, r4 adds r1, r4
lsls r1, 3 lsls r1, 3
adds r1, r0 adds r1, r0
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r1, 0x1C] strh r0, [r1, 0x1C]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r1, 0x1E] strh r0, [r1, 0x1E]
ldrh r0, [r1, 0x8] ldrh r0, [r1, 0x8]
@ -3507,7 +3507,7 @@ _0815BD20:
ldrsh r0, [r4, r2] ldrsh r0, [r4, r2]
cmp r0, 0 cmp r0, 0
bne _0815BDF2 bne _0815BDF2
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldr r1, =gUnknown_085CE460 ldr r1, =gUnknown_085CE460
movs r3, 0xC movs r3, 0xC
ldrsh r0, [r4, r3] ldrsh r0, [r4, r3]
@ -3577,10 +3577,10 @@ _0815BDC8:
movs r1, 0x4 movs r1, 0x4
movs r2, 0x1 movs r2, 0x1
bl lcd_bg_operations bl lcd_bg_operations
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0x50 movs r0, 0x50
movs r1, 0 movs r1, 0
@ -3990,7 +3990,7 @@ _0815C124:
lsls r0, 24 lsls r0, 24
cmp r0, 0 cmp r0, 0
beq _0815C15C beq _0815C15C
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r3, =0x0000ffc8 ldr r3, =0x0000ffc8
adds r0, r3, 0 adds r0, r3, 0
b _0815C1CA b _0815C1CA
@ -4008,48 +4008,48 @@ _0815C15C:
bne _0815C1B4 bne _0815C1B4
cmp r4, 0x1 cmp r4, 0x1
bne _0815C180 bne _0815C180
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r2, =0x0000ff65 ldr r2, =0x0000ff65
adds r0, r2, 0 adds r0, r2, 0
strh r0, [r1] strh r0, [r1]
_0815C180: _0815C180:
cmp r4, 0x3 cmp r4, 0x3
bne _0815C18C bne _0815C18C
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r3, =0x0000ff8d ldr r3, =0x0000ff8d
adds r0, r3, 0 adds r0, r3, 0
strh r0, [r1] strh r0, [r1]
_0815C18C: _0815C18C:
cmp r4, 0 cmp r4, 0
bne _0815C196 bne _0815C196
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
movs r0, 0xE movs r0, 0xE
strh r0, [r1] strh r0, [r1]
_0815C196: _0815C196:
cmp r4, 0x2 cmp r4, 0x2
bne _0815C1CC bne _0815C1CC
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r2, =0x0000ffec ldr r2, =0x0000ffec
b _0815C1C8 b _0815C1C8
.pool .pool
_0815C1B4: _0815C1B4:
cmp r4, 0x1 cmp r4, 0x1
bne _0815C1C0 bne _0815C1C0
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r3, =0x0000ff79 ldr r3, =0x0000ff79
adds r0, r3, 0 adds r0, r3, 0
strh r0, [r1] strh r0, [r1]
_0815C1C0: _0815C1C0:
cmp r4, 0 cmp r4, 0
bne _0815C1CC bne _0815C1CC
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldr r2, =0x0000fff6 ldr r2, =0x0000fff6
_0815C1C8: _0815C1C8:
adds r0, r2, 0 adds r0, r2, 0
_0815C1CA: _0815C1CA:
strh r0, [r1] strh r0, [r1]
_0815C1CC: _0815C1CC:
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
mov r0, sp mov r0, sp
@ -4069,10 +4069,10 @@ _0815C1CC:
adds r1, r6 adds r1, r6
lsls r1, 3 lsls r1, 3
adds r1, r0 adds r1, r0
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r1, 0x1C] strh r0, [r1, 0x1C]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r1, 0x1E] strh r0, [r1, 0x1E]
b _0815C2A4 b _0815C2A4
@ -4092,7 +4092,7 @@ _0815C224:
lsrs r0, 24 lsrs r0, 24
cmp r0, 0x1 cmp r0, 0x1
bne _0815C268 bne _0815C268
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldr r1, =gUnknown_085CE4A4 ldr r1, =gUnknown_085CE4A4
movs r3, 0xC movs r3, 0xC
ldrsh r0, [r5, r3] ldrsh r0, [r5, r3]
@ -4105,7 +4105,7 @@ _0815C224:
b _0815C27A b _0815C27A
.pool .pool
_0815C268: _0815C268:
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
ldr r1, =gUnknown_085CE4A4 ldr r1, =gUnknown_085CE4A4
movs r3, 0xC movs r3, 0xC
ldrsh r0, [r5, r3] ldrsh r0, [r5, r3]
@ -4235,10 +4235,10 @@ _0815C36C:
movs r1, 0x4 movs r1, 0x4
movs r2, 0x1 movs r2, 0x1
bl lcd_bg_operations bl lcd_bg_operations
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0x50 movs r0, 0x50
movs r1, 0 movs r1, 0
@ -6133,9 +6133,9 @@ _0815D2B4:
ldr r1, =0x00003f42 ldr r1, =0x00003f42
movs r0, 0x50 movs r0, 0x50
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r5, [r0] ldrh r5, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
b _0815D316 b _0815D316
.pool .pool
_0815D304: _0815D304:
@ -6144,9 +6144,9 @@ _0815D304:
ldr r1, =0x00003f44 ldr r1, =0x00003f44
movs r0, 0x50 movs r0, 0x50
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r5, [r0] ldrh r5, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
_0815D316: _0815D316:
ldrh r3, [r0] ldrh r3, [r0]
movs r7, 0 movs r7, 0
@ -6223,17 +6223,17 @@ sub_815D398: @ 815D398
lsrs r0, 24 lsrs r0, 24
cmp r0, 0x1 cmp r0, 0x1
bne _0815D3D8 bne _0815D3D8
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r0, [r0] ldrh r0, [r0]
str r0, [sp, 0x4] str r0, [sp, 0x4]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
b _0815D3E0 b _0815D3E0
.pool .pool
_0815D3D8: _0815D3D8:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r0, [r0] ldrh r0, [r0]
str r0, [sp, 0x4] str r0, [sp, 0x4]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
_0815D3E0: _0815D3E0:
ldrh r0, [r0] ldrh r0, [r0]
str r0, [sp, 0x8] str r0, [sp, 0x8]

View File

@ -168,12 +168,12 @@ sub_8170478: @ 8170478
lsls r1, 4 lsls r1, 4
movs r2, 0x20 movs r2, 0x20
bl LoadCompressedPalette bl LoadCompressedPalette
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r7, 0x20] ldrh r0, [r7, 0x20]
negs r0, r0 negs r0, r0
adds r0, 0x20 adds r0, 0x20
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldrh r0, [r7, 0x22] ldrh r0, [r7, 0x22]
negs r0, r0 negs r0, r0
subs r0, 0x20 subs r0, 0x20
@ -225,7 +225,7 @@ sub_8170660: @ 8170660
adds r1, r0 adds r1, r0
movs r3, 0 movs r3, 0
strh r1, [r5, 0x22] strh r1, [r5, 0x22]
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
lsls r0, r1, 16 lsls r0, r1, 16
lsrs r0, 24 lsrs r0, 24
ldrh r4, [r2] ldrh r4, [r2]
@ -1283,7 +1283,7 @@ _08170F54:
lsls r4, 24 lsls r4, 24
lsrs r4, 24 lsrs r4, 24
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl sub_80A82E4 bl sub_80A82E4
@ -1335,7 +1335,7 @@ _08170F54:
ldr r0, =SpriteCallbackDummy ldr r0, =SpriteCallbackDummy
str r0, [r4] str r0, [r4]
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBankSpriteIds ldr r1, =gBankSpriteIds
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -1371,7 +1371,7 @@ sub_8171030: @ 8171030
lsrs r5, r0, 24 lsrs r5, r0, 24
ldr r6, =gSprites ldr r6, =gSprites
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBankSpriteIds ldr r1, =gBankSpriteIds
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -1422,7 +1422,7 @@ sub_81710A8: @ 81710A8
lsrs r5, r0, 24 lsrs r5, r0, 24
ldr r6, =gSprites ldr r6, =gSprites
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r4, =gBankSpriteIds ldr r4, =gBankSpriteIds
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -1438,7 +1438,7 @@ sub_81710A8: @ 81710A8
cmp r0, 0 cmp r0, 0
bge _081710F4 bge _081710F4
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
adds r0, r4 adds r0, r4
@ -5575,7 +5575,7 @@ sub_817330C: @ 817330C
movs r0, 0x1E movs r0, 0x1E
strh r0, [r4, 0x2E] strh r0, [r4, 0x2E]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
movs r1, 0 movs r1, 0
@ -5587,7 +5587,7 @@ sub_817330C: @ 817330C
adds r0, r1 adds r0, r1
strh r0, [r4, 0x32] strh r0, [r4, 0x32]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
movs r1, 0x1 movs r1, 0x1
@ -5732,7 +5732,7 @@ sub_817345C: @ 817345C
.pool .pool
_08173478: _08173478:
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAnimationBankAttacker ldr r1, =gAnimationBankAttacker
strb r0, [r1] strb r0, [r1]
movs r0, 0x1 movs r0, 0x1
@ -5740,12 +5740,12 @@ _08173478:
.pool .pool
_0817348C: _0817348C:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAnimationBankAttacker ldr r1, =gAnimationBankAttacker
strb r0, [r1] strb r0, [r1]
movs r0, 0 movs r0, 0
_08173498: _08173498:
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAnimationBankTarget ldr r1, =gAnimationBankTarget
strb r0, [r1] strb r0, [r1]
_081734A0: _081734A0:

View File

@ -5045,7 +5045,7 @@ sub_8066FF4: @ 8066FF4
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r5] ldrb r0, [r5]
lsls r0, 2 lsls r0, 2
@ -5565,7 +5565,7 @@ sub_806743C: @ 806743C
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _08067478 beq _08067478
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -4354,7 +4354,7 @@ sub_814D590: @ 814D590
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r5] ldrb r0, [r5]
lsls r0, 2 lsls r0, 2
@ -4874,7 +4874,7 @@ sub_814D9D8: @ 814D9D8
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _0814DA14 beq _0814DA14
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -5185,7 +5185,7 @@ sub_8061F34: @ 8061F34
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r5] ldrb r0, [r5]
lsls r0, 2 lsls r0, 2
@ -5323,7 +5323,7 @@ _08062062:
cmp r0, 0 cmp r0, 0
beq _0806209C beq _0806209C
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r5, =gBankTarget ldr r5, =gBankTarget
strb r0, [r5] strb r0, [r5]
ldr r0, =gAbsentBankFlags ldr r0, =gAbsentBankFlags
@ -5337,7 +5337,7 @@ _08062062:
cmp r1, 0 cmp r1, 0
beq _0806209C beq _0806209C
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
strb r0, [r5] strb r0, [r5]
_0806209C: _0806209C:
ldr r0, =gBankTarget ldr r0, =gBankTarget
@ -5394,7 +5394,7 @@ _08062108:
lsls r1, 24 lsls r1, 24
lsrs r1, 24 lsrs r1, 24
adds r0, r1, 0 adds r0, r1, 0
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 16 lsrs r2, 16
@ -5406,7 +5406,7 @@ _08062108:
.pool .pool
_0806213C: _0806213C:
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 16 lsrs r2, 16
@ -5468,7 +5468,7 @@ sub_8062188: @ 8062188
cmp r0, 0 cmp r0, 0
bne _080621D4 bne _080621D4
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
adds r7, r5, 0 adds r7, r5, 0
@ -5476,11 +5476,11 @@ sub_8062188: @ 8062188
.pool .pool
_080621D4: _080621D4:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r7, r0, 24 lsrs r7, r0, 24
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
_080621E8: _080621E8:
@ -6015,7 +6015,7 @@ sub_8062630: @ 8062630
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _0806266C beq _0806266C
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -358,7 +358,7 @@ _0805775A:
cmp r0, 0x2 cmp r0, 0x2
bne _080577E8 bne _080577E8
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAbsentBankFlags ldr r1, =gAbsentBankFlags
ldrb r1, [r1] ldrb r1, [r1]
ldr r2, =gBitTable ldr r2, =gBitTable
@ -622,7 +622,7 @@ _080579F0:
mov r1, sp mov r1, sp
adds r0, r1, r4 adds r0, r1, r4
ldrb r0, [r0] ldrb r0, [r0]
bl GetBankByPlayerAI bl GetBankByIdentity
strb r0, [r5] strb r0, [r5]
ldr r1, =gNoOfAllBanks ldr r1, =gNoOfAllBanks
lsls r0, 24 lsls r0, 24
@ -750,7 +750,7 @@ _08057B14:
mov r1, sp mov r1, sp
adds r0, r1, r4 adds r0, r1, r4
ldrb r0, [r0] ldrb r0, [r0]
bl GetBankByPlayerAI bl GetBankByIdentity
strb r0, [r5] strb r0, [r5]
ldr r1, =gNoOfAllBanks ldr r1, =gNoOfAllBanks
lsls r0, 24 lsls r0, 24
@ -942,7 +942,7 @@ _08057CC4:
movs r0, 0x1 movs r0, 0x1
ands r0, r1 ands r0, r1
eors r0, r2 eors r0, r2
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gUnknown_03005D74 ldr r1, =gUnknown_03005D74
strb r0, [r1] strb r0, [r1]
_08057CDE: _08057CDE:
@ -1035,7 +1035,7 @@ _08057D80:
.pool .pool
_08057DA8: _08057DA8:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gAbsentBankFlags ldr r1, =gAbsentBankFlags
ldrb r1, [r1] ldrb r1, [r1]
ldr r2, =gBitTable ldr r2, =gBitTable
@ -1052,7 +1052,7 @@ _08057DA8:
_08057DD0: _08057DD0:
movs r0, 0x1 movs r0, 0x1
_08057DD2: _08057DD2:
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gUnknown_03005D74 ldr r1, =gUnknown_03005D74
_08057DD8: _08057DD8:
strb r0, [r1] strb r0, [r1]
@ -1247,7 +1247,7 @@ _08057F80:
bl battle_menu_cursor_related_2 bl battle_menu_cursor_related_2
ldr r0, =gText_BattleSwitchWhich ldr r0, =gText_BattleSwitchWhich
movs r1, 0xB movs r1, 0xB
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldr r0, =gActiveBank ldr r0, =gActiveBank
ldrb r0, [r0] ldrb r0, [r0]
@ -4042,7 +4042,7 @@ sub_8059828: @ 8059828
push {lr} push {lr}
ldr r0, =gMain ldr r0, =gMain
ldr r1, [r0, 0x4] ldr r1, [r0, 0x4]
ldr r0, =sub_8038420 ldr r0, =BattleMainCB2
cmp r1, r0 cmp r1, r0
bne _08059898 bne _08059898
ldr r0, =gPaletteFade ldr r0, =gPaletteFade
@ -4118,7 +4118,7 @@ sub_80598E0: @ 80598E0
push {lr} push {lr}
ldr r0, =gMain ldr r0, =gMain
ldr r1, [r0, 0x4] ldr r1, [r0, 0x4]
ldr r0, =sub_8038420 ldr r0, =BattleMainCB2
cmp r1, r0 cmp r1, r0
bne _08059906 bne _08059906
ldr r0, =gPaletteFade ldr r0, =gPaletteFade
@ -4244,11 +4244,11 @@ sub_80599D4: @ 80599D4
movs r0, 0x5 movs r0, 0x5
bl PlaySE bl PlaySE
ldrb r0, [r4] ldrb r0, [r4]
bl sub_8056BAC bl BattleDestroyCursorAt
movs r0, 0 movs r0, 0
strb r0, [r4] strb r0, [r4]
movs r0, 0 movs r0, 0
bl sub_8056B74 bl BattleCreateCursorAt
_08059A02: _08059A02:
ldr r0, =gMain ldr r0, =gMain
ldrh r1, [r0, 0x2E] ldrh r1, [r0, 0x2E]
@ -4263,11 +4263,11 @@ _08059A02:
movs r0, 0x5 movs r0, 0x5
bl PlaySE bl PlaySE
ldrb r0, [r4] ldrb r0, [r4]
bl sub_8056BAC bl BattleDestroyCursorAt
movs r0, 0x1 movs r0, 0x1
strb r0, [r4] strb r0, [r4]
movs r0, 0x1 movs r0, 0x1
bl sub_8056B74 bl BattleCreateCursorAt
_08059A2C: _08059A2C:
ldr r0, =gMain ldr r0, =gMain
ldrh r1, [r0, 0x2E] ldrh r1, [r0, 0x2E]
@ -4355,7 +4355,7 @@ _08059AC4:
lsls r1, 24 lsls r1, 24
lsrs r1, 24 lsrs r1, 24
adds r0, r7, 0 adds r0, r7, 0
bl battle_show_message_maybe bl sub_814F9EC
ldrh r0, [r4] ldrh r0, [r4]
cmp r0, 0 cmp r0, 0
beq _08059AF4 beq _08059AF4
@ -4382,7 +4382,7 @@ sub_8059B18: @ 8059B18
bl StringCopy bl StringCopy
adds r0, r4, 0 adds r0, r4, 0
movs r1, 0x7 movs r1, 0x7
bl battle_show_message_maybe bl sub_814F9EC
pop {r4} pop {r4}
pop {r0} pop {r0}
bx r0 bx r0
@ -4432,7 +4432,7 @@ sub_8059B3C: @ 8059B3C
bl ConvertIntToDecimalStringN bl ConvertIntToDecimalStringN
adds r0, r6, 0 adds r0, r6, 0
movs r1, 0x9 movs r1, 0x9
bl battle_show_message_maybe bl sub_814F9EC
_08059B98: _08059B98:
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
@ -4481,7 +4481,7 @@ sub_8059BB0: @ 8059BB0
bl StringCopy bl StringCopy
adds r0, r6, 0 adds r0, r6, 0
movs r1, 0xA movs r1, 0xA
bl battle_show_message_maybe bl sub_814F9EC
pop {r4-r6} pop {r4-r6}
pop {r0} pop {r0}
bx r0 bx r0
@ -4637,7 +4637,7 @@ sub_8059CF8: @ 8059CF8
thumb_func_start sub_8059D40 thumb_func_start sub_8059D40
sub_8059D40: @ 8059D40 sub_8059D40: @ 8059D40
push {lr} push {lr}
ldr r0, =sub_80A92F8 ldr r0, =ReshowBattleScreenAfterMenu
bl SetMainCallback2 bl SetMainCallback2
pop {r0} pop {r0}
bx r0 bx r0
@ -4647,7 +4647,7 @@ sub_8059D40: @ 8059D40
thumb_func_start sub_8059D50 thumb_func_start sub_8059D50
sub_8059D50: @ 8059D50 sub_8059D50: @ 8059D50
push {lr} push {lr}
ldr r0, =sub_80A92F8 ldr r0, =ReshowBattleScreenAfterMenu
bl SetMainCallback2 bl SetMainCallback2
pop {r0} pop {r0}
bx r0 bx r0
@ -4718,7 +4718,7 @@ b_link_standby_message: @ 8059DC0
strh r1, [r0] strh r1, [r0]
ldr r0, =gText_LinkStandby ldr r0, =gText_LinkStandby
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
_08059DE0: _08059DE0:
pop {r0} pop {r0}
bx r0 bx r0
@ -8024,7 +8024,7 @@ sub_805BBC4: @ 805BBC4
ldr r5, =gActiveBank ldr r5, =gActiveBank
ldrb r4, [r5] ldrb r4, [r5]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 24 lsrs r2, 24
@ -8063,7 +8063,7 @@ sub_805BC18: @ 805BC18
strb r0, [r1] strb r0, [r1]
ldrb r4, [r5] ldrb r4, [r5]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 24 lsrs r2, 24
@ -8458,7 +8458,7 @@ sub_805BF80: @ 805BF80
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r5] ldrb r0, [r5]
lsls r0, 2 lsls r0, 2
@ -8534,7 +8534,7 @@ dp01t_12_6_battle_menu: @ 805C044
bl sub_817F2A8 bl sub_817F2A8
ldr r0, =gText_BattleMenu ldr r0, =gText_BattleMenu
movs r1, 0x2 movs r1, 0x2
bl battle_show_message_maybe bl sub_814F9EC
movs r4, 0 movs r4, 0
_0805C062: _0805C062:
lsls r0, r4, 24 lsls r0, r4, 24
@ -8551,10 +8551,10 @@ _0805C062:
movs r1, 0 movs r1, 0
bl sub_8059CB4 bl sub_8059CB4
ldr r0, =gText_WhatWillPkmnDo ldr r0, =gText_WhatWillPkmnDo
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0x1 movs r1, 0x1
bl battle_show_message_maybe bl sub_814F9EC
pop {r4} pop {r4}
pop {r0} pop {r0}
bx r0 bx r0
@ -8580,12 +8580,12 @@ sub_805C0B0: @ 805C0B0
bl sub_8056A3C bl sub_8056A3C
ldr r0, =gText_BattleYesNoChoice ldr r0, =gText_BattleYesNoChoice
movs r1, 0xC movs r1, 0xC
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gUnknown_03005D74 ldr r1, =gUnknown_03005D74
movs r0, 0x1 movs r0, 0x1
strb r0, [r1] strb r0, [r1]
movs r0, 0x1 movs r0, 0x1
bl sub_8056B74 bl BattleCreateCursorAt
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r4] ldrb r0, [r4]
lsls r0, 2 lsls r0, 2
@ -8913,7 +8913,7 @@ _0805C3BC:
sub_805C3EC: @ 805C3EC sub_805C3EC: @ 805C3EC
push {lr} push {lr}
sub sp, 0x4 sub sp, 0x4
bl sub_805EA60 bl BattleMusicStop
movs r0, 0x1 movs r0, 0x1
negs r0, r0 negs r0, r0
movs r1, 0 movs r1, 0
@ -9595,7 +9595,7 @@ sub_805C9B0: @ 805C9B0
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _0805C9EC beq _0805C9EC
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -4966,7 +4966,7 @@ sub_81BDA4C: @ 81BDA4C
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r4] ldrb r0, [r4]
lsls r0, 2 lsls r0, 2
@ -5045,7 +5045,7 @@ _081BDB02:
cmp r0, 0 cmp r0, 0
beq _081BDB3C beq _081BDB3C
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r4, =gBankTarget ldr r4, =gBankTarget
strb r0, [r4] strb r0, [r4]
ldr r0, =gAbsentBankFlags ldr r0, =gAbsentBankFlags
@ -5059,7 +5059,7 @@ _081BDB02:
cmp r1, 0 cmp r1, 0
beq _081BDB3C beq _081BDB3C
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
strb r0, [r4] strb r0, [r4]
_081BDB3C: _081BDB3C:
ldr r0, =gBankTarget ldr r0, =gBankTarget
@ -5093,11 +5093,11 @@ sub_81BDB7C: @ 81BDB7C
cmp r4, 0x6 cmp r4, 0x6
bne _081BDBD0 bne _081BDBD0
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
movs r4, 0x3 movs r4, 0x3
@ -5661,7 +5661,7 @@ sub_81BE03C: @ 81BE03C
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _081BE078 beq _081BE078
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -4722,7 +4722,7 @@ sub_8188E90: @ 8188E90
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r4] ldrb r0, [r4]
lsls r0, 2 lsls r0, 2
@ -5304,7 +5304,7 @@ sub_818936C: @ 818936C
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _081893A8 beq _081893A8
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -4822,7 +4822,7 @@ sub_818C43C: @ 818C43C
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r4] ldrb r0, [r4]
lsls r0, 2 lsls r0, 2
@ -5455,7 +5455,7 @@ sub_818C994: @ 818C994
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _0818C9D0 beq _0818C9D0
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -387,7 +387,7 @@ sub_8159698: @ 8159698
push {lr} push {lr}
ldr r0, =gMain ldr r0, =gMain
ldr r1, [r0, 0x4] ldr r1, [r0, 0x4]
ldr r0, =sub_8038420 ldr r0, =BattleMainCB2
cmp r1, r0 cmp r1, r0
bne _081596BE bne _081596BE
ldr r0, =gPaletteFade ldr r0, =gPaletteFade
@ -700,7 +700,7 @@ sub_8159910: @ 8159910
ldr r5, =gActiveBank ldr r5, =gActiveBank
ldrb r4, [r5] ldrb r4, [r5]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 24 lsrs r2, 24
@ -739,7 +739,7 @@ sub_8159964: @ 8159964
strb r0, [r1] strb r0, [r1]
ldrb r4, [r5] ldrb r4, [r5]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 24 lsrs r2, 24
@ -792,7 +792,7 @@ dp01t_10_6_message: @ 81599DC
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r4] ldrb r0, [r4]
lsls r0, 2 lsls r0, 2
@ -862,7 +862,7 @@ sub_8159A94: @ 8159A94
str r1, [r0] str r1, [r0]
ldr r0, =gText_SafariZoneMenu ldr r0, =gText_SafariZoneMenu
movs r1, 0x2 movs r1, 0x2
bl battle_show_message_maybe bl sub_814F9EC
movs r4, 0 movs r4, 0
_08159AAE: _08159AAE:
lsls r0, r4, 24 lsls r0, r4, 24
@ -879,10 +879,10 @@ _08159AAE:
movs r1, 0 movs r1, 0
bl sub_8059CB4 bl sub_8059CB4
ldr r0, =gText_WhatWillPkmnDo2 ldr r0, =gText_WhatWillPkmnDo2
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0x1 movs r1, 0x1
bl battle_show_message_maybe bl sub_814F9EC
pop {r4} pop {r4}
pop {r0} pop {r0}
bx r0 bx r0
@ -1161,7 +1161,7 @@ dp01t_34_6_move_anim_start_t3: @ 8159CC4
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _08159D00 beq _08159D00
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -299,7 +299,7 @@ sub_8168610: @ 8168610
push {lr} push {lr}
ldr r0, =gMain ldr r0, =gMain
ldr r1, [r0, 0x4] ldr r1, [r0, 0x4]
ldr r0, =sub_8038420 ldr r0, =BattleMainCB2
cmp r1, r0 cmp r1, r0
bne _08168636 bne _08168636
ldr r0, =gPaletteFade ldr r0, =gPaletteFade
@ -3232,7 +3232,7 @@ sub_816A084: @ 816A084
ldr r5, =gActiveBank ldr r5, =gActiveBank
ldrb r4, [r5] ldrb r4, [r5]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 24 lsrs r2, 24
@ -3271,7 +3271,7 @@ sub_816A0D8: @ 816A0D8
strb r0, [r1] strb r0, [r1]
ldrb r4, [r5] ldrb r4, [r5]
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r2, r0, 0 adds r2, r0, 0
lsls r2, 24 lsls r2, 24
lsrs r2, 24 lsrs r2, 24
@ -3606,7 +3606,7 @@ sub_816A3B8: @ 816A3B8
bl BufferStringBattle bl BufferStringBattle
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gBattleBankFunc ldr r1, =gBattleBankFunc
ldrb r0, [r4] ldrb r0, [r4]
lsls r0, 2 lsls r0, 2
@ -3676,7 +3676,7 @@ dp01t_12_1_battle_menu: @ 816A470
str r1, [r0] str r1, [r0]
ldr r0, =gText_BattleMenu ldr r0, =gText_BattleMenu
movs r1, 0x2 movs r1, 0x2
bl battle_show_message_maybe bl sub_814F9EC
movs r4, 0 movs r4, 0
_0816A48A: _0816A48A:
lsls r0, r4, 24 lsls r0, r4, 24
@ -3693,10 +3693,10 @@ _0816A48A:
movs r1, 0 movs r1, 0
bl sub_8059CB4 bl sub_8059CB4
ldr r0, =gText_WhatWillWallyDo ldr r0, =gText_WhatWillWallyDo
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0x1 movs r1, 0x1
bl battle_show_message_maybe bl sub_814F9EC
pop {r4} pop {r4}
pop {r0} pop {r0}
bx r0 bx r0
@ -4150,7 +4150,7 @@ sub_816A840: @ 816A840
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0 cmp r0, 0
beq _0816A87C beq _0816A87C
bl sub_805EA60 bl BattleMusicStop
ldrb r1, [r5] ldrb r1, [r5]
lsls r1, 9 lsls r1, 9
adds r0, r4, 0x1 adds r0, r4, 0x1

View File

@ -2599,10 +2599,10 @@ _0818FFFC:
b _081900A4 b _081900A4
.pool .pool
_0819002C: _0819002C:
ldr r0, =gUnknown_0831ACE8 ldr r0, =gTypeEffectiveness
adds r1, r6, r0 adds r1, r6, r0
ldrb r0, [r1] ldrb r0, [r1]
ldr r7, =gUnknown_0831ACE8 ldr r7, =gTypeEffectiveness
cmp r0, 0xFF cmp r0, 0xFF
beq _081900A4 beq _081900A4
adds r4, r1, 0 adds r4, r1, 0
@ -2657,7 +2657,7 @@ _08190088:
_08190096: _08190096:
adds r4, 0x3 adds r4, 0x3
adds r6, 0x3 adds r6, 0x3
ldr r1, =gUnknown_0831ACE8 ldr r1, =gTypeEffectiveness
adds r0, r6, r1 adds r0, r6, r1
ldrb r0, [r0] ldrb r0, [r0]
cmp r0, 0xFF cmp r0, 0xFF
@ -3165,27 +3165,27 @@ _0819044E:
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
strh r4, [r0] strh r4, [r0]
mov r2, r9 mov r2, r9
cmp r2, 0x2 cmp r2, 0x2
bne _081904DC bne _081904DC
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r4, [r0] strh r4, [r0]
b _081904E6 b _081904E6
.pool .pool
_081904DC: _081904DC:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r4, [r0] strh r4, [r0]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
_081904E6: _081904E6:
@ -4371,9 +4371,9 @@ _08190E98:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r1, [r0] strh r1, [r0]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
b _08190EE6 b _08190EE6
@ -4384,9 +4384,9 @@ _08190ED4:
ldr r1, =gUnknown_02022E16 ldr r1, =gUnknown_02022E16
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
_08190EE6: _08190EE6:
cmp r6, 0x1 cmp r6, 0x1
@ -4396,9 +4396,9 @@ _08190EE6:
ldrb r1, [r0, 0x10] ldrb r1, [r0, 0x10]
cmp r1, 0 cmp r1, 0
bne _08190F50 bne _08190F50
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r6, 0xA0 movs r6, 0xA0
lsls r6, 1 lsls r6, 1
adds r0, r6, 0 adds r0, r6, 0
@ -4424,12 +4424,12 @@ _08190EE6:
b _08191084 b _08191084
.pool .pool
_08190F50: _08190F50:
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r6, 0x80 movs r6, 0x80
lsls r6, 1 lsls r6, 1
adds r0, r6, 0 adds r0, r6, 0
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
movs r4, 0 movs r4, 0
strh r4, [r0] strh r4, [r0]
ldr r3, =gUnknown_0860D080 ldr r3, =gUnknown_0860D080
@ -4473,9 +4473,9 @@ _08190F9C:
lsrs r0, 24 lsrs r0, 24
adds r1, 0x11 adds r1, 0x11
bl sub_8192F08 bl sub_8192F08
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r5, [r0] strh r5, [r0]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r3, 0xA0 movs r3, 0xA0
lsls r3, 1 lsls r3, 1
adds r0, r3, 0 adds r0, r3, 0
@ -4508,10 +4508,10 @@ _08190FF8:
lsrs r0, 24 lsrs r0, 24
adds r1, 0x11 adds r1, 0x11
bl sub_8192F08 bl sub_8192F08
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r2, 0xA0 movs r2, 0xA0
lsls r2, 1 lsls r2, 1
adds r0, r2, 0 adds r0, r2, 0
@ -4529,12 +4529,12 @@ _08190FF8:
b _08191084 b _08191084
.pool .pool
_0819104C: _0819104C:
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r3, 0x80 movs r3, 0x80
lsls r3, 1 lsls r3, 1
adds r0, r3, 0 adds r0, r3, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r1, =gTasks ldr r1, =gTasks
@ -4770,9 +4770,9 @@ _08191234:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r1, [r0] strh r1, [r0]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldr r2, =0x0000ff60 ldr r2, =0x0000ff60
adds r0, r2, 0 adds r0, r2, 0
strh r0, [r1] strh r0, [r1]
@ -4785,9 +4785,9 @@ _08191278:
ldr r3, =0x0000ff60 ldr r3, =0x0000ff60
adds r0, r3, 0 adds r0, r3, 0
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
_0819128C: _0819128C:
cmp r6, 0x2 cmp r6, 0x2
@ -4797,9 +4797,9 @@ _0819128C:
ldrb r1, [r0, 0x10] ldrb r1, [r0, 0x10]
cmp r1, 0 cmp r1, 0
bne _081912F4 bne _081912F4
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r3, =gUnknown_0860D080 ldr r3, =gUnknown_0860D080
@ -4823,10 +4823,10 @@ _0819128C:
b _0819141C b _0819141C
.pool .pool
_081912F4: _081912F4:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
movs r4, 0 movs r4, 0
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r4, [r0] strh r4, [r0]
ldr r3, =gUnknown_0860D080 ldr r3, =gUnknown_0860D080
ldr r2, =gTasks ldr r2, =gTasks
@ -4869,9 +4869,9 @@ _0819133C:
lsrs r0, 24 lsrs r0, 24
adds r1, 0x11 adds r1, 0x11
bl sub_8192F08 bl sub_8192F08
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r5, [r0] strh r5, [r0]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r2, [r6] ldr r2, [r6]
@ -4902,10 +4902,10 @@ _08191394:
lsrs r0, 24 lsrs r0, 24
adds r1, 0x11 adds r1, 0x11
bl sub_8192F08 bl sub_8192F08
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r2, [r6] ldr r2, [r6]
@ -4921,12 +4921,12 @@ _08191394:
b _0819141C b _0819141C
.pool .pool
_081913E4: _081913E4:
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r4, 0x80 movs r4, 0x80
lsls r4, 1 lsls r4, 1
adds r0, r4, 0 adds r0, r4, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gTasks ldr r1, =gTasks
@ -5162,12 +5162,12 @@ _081915CC:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
movs r6, 0x80 movs r6, 0x80
lsls r6, 1 lsls r6, 1
adds r0, r6, 0 adds r0, r6, 0
strh r0, [r2] strh r0, [r2]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
b _08191622 b _08191622
.pool .pool
@ -5179,9 +5179,9 @@ _0819160C:
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
_08191622: _08191622:
ldr r0, =gUnknown_0203CD78 ldr r0, =gUnknown_0203CD78
@ -5189,12 +5189,12 @@ _08191622:
ldrb r0, [r4, 0x10] ldrb r0, [r4, 0x10]
cmp r0, 0 cmp r0, 0
bne _08191688 bne _08191688
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r4, 0x80 movs r4, 0x80
lsls r4, 1 lsls r4, 1
adds r0, r4, 0 adds r0, r4, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r3, =gUnknown_0860D080 ldr r3, =gUnknown_0860D080
@ -5218,12 +5218,12 @@ _08191622:
b _081916C6 b _081916C6
.pool .pool
_08191688: _08191688:
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r6, 0x80 movs r6, 0x80
lsls r6, 1 lsls r6, 1
adds r0, r6, 0 adds r0, r6, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r3, =gUnknown_0860D15C ldr r3, =gUnknown_0860D15C
@ -5462,12 +5462,12 @@ _0819187C:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
movs r6, 0x80 movs r6, 0x80
lsls r6, 1 lsls r6, 1
adds r0, r6, 0 adds r0, r6, 0
strh r0, [r2] strh r0, [r2]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
b _081918D2 b _081918D2
.pool .pool
@ -5479,9 +5479,9 @@ _081918BC:
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
_081918D2: _081918D2:
ldr r0, =gUnknown_0203CD78 ldr r0, =gUnknown_0203CD78
@ -5489,12 +5489,12 @@ _081918D2:
ldrb r0, [r2, 0x10] ldrb r0, [r2, 0x10]
cmp r0, 0 cmp r0, 0
bne _08191924 bne _08191924
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r4, 0x80 movs r4, 0x80
lsls r4, 1 lsls r4, 1
adds r0, r4, 0 adds r0, r4, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r1, =gTasks ldr r1, =gTasks
@ -5510,10 +5510,10 @@ _081918D2:
b _08191958 b _08191958
.pool .pool
_08191924: _08191924:
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r1, =gTasks ldr r1, =gTasks
@ -5749,12 +5749,12 @@ _08191B08:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
movs r6, 0xFF movs r6, 0xFF
lsls r6, 8 lsls r6, 8
adds r0, r6, 0 adds r0, r6, 0
strh r0, [r2] strh r0, [r2]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
b _08191B5E b _08191B5E
.pool .pool
@ -5766,9 +5766,9 @@ _08191B48:
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
_08191B5E: _08191B5E:
ldr r0, =gUnknown_0203CD78 ldr r0, =gUnknown_0203CD78
@ -5776,19 +5776,19 @@ _08191B5E:
ldrb r0, [r0, 0x10] ldrb r0, [r0, 0x10]
cmp r0, 0x1 cmp r0, 0x1
bne _08191B94 bne _08191B94
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
b _08191B9E b _08191B9E
.pool .pool
_08191B94: _08191B94:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
_08191B9E: _08191B9E:
ldr r4, =gUnknown_0860D15C ldr r4, =gUnknown_0860D15C
@ -6016,12 +6016,12 @@ _08191D68:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r2, =gUnknown_02022E18 ldr r2, =gBattle_BG1_X
movs r6, 0xFF movs r6, 0xFF
lsls r6, 8 lsls r6, 8
adds r0, r6, 0 adds r0, r6, 0
strh r0, [r2] strh r0, [r2]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
b _08191DBE b _08191DBE
.pool .pool
@ -6033,9 +6033,9 @@ _08191DA8:
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
_08191DBE: _08191DBE:
ldr r0, =gUnknown_0203CD78 ldr r0, =gUnknown_0203CD78
@ -6043,12 +6043,12 @@ _08191DBE:
ldrb r0, [r2, 0x10] ldrb r0, [r2, 0x10]
cmp r0, 0x2 cmp r0, 0x2
bne _08191E10 bne _08191E10
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r4, 0x80 movs r4, 0x80
lsls r4, 1 lsls r4, 1
adds r0, r4, 0 adds r0, r4, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r1, =gTasks ldr r1, =gTasks
@ -6064,10 +6064,10 @@ _08191DBE:
b _08191E44 b _08191E44
.pool .pool
_08191E10: _08191E10:
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
ldr r1, =gTasks ldr r1, =gTasks
@ -6310,11 +6310,11 @@ _08191FF8:
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x4 subs r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x4 subs r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
b _081920A4 b _081920A4
.pool .pool
_08192038: _08192038:
@ -6335,11 +6335,11 @@ _08192038:
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x4 adds r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x4 adds r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1E ldr r1, =gBattle_BG2_Y
b _081920E8 b _081920E8
.pool .pool
_08192078: _08192078:
@ -6360,11 +6360,11 @@ _08192078:
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x4 subs r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x4 subs r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
_081920A4: _081920A4:
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x4 subs r0, 0x4
@ -6389,11 +6389,11 @@ _081920BC:
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x4 adds r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x4 adds r0, 0x4
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1C ldr r1, =gBattle_BG2_X
_081920E8: _081920E8:
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x4 adds r0, 0x4
@ -10109,7 +10109,7 @@ _08194074:
lsls r0, r4, 1 lsls r0, r4, 1
add r0, r10 add r0, r10
ldrh r0, [r0] ldrh r0, [r0]
bl ai_rate_move bl AI_TypeCalc
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
movs r0, 0x6 movs r0, 0x6
@ -10404,9 +10404,9 @@ _0819427C:
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r4, [r0] strh r4, [r0]
movs r0, 0x2 movs r0, 0x2
movs r1, 0 movs r1, 0
@ -11366,19 +11366,19 @@ sub_8194B70: @ 8194B70
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x12 movs r0, 0x12
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x18 movs r0, 0x18
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1A movs r0, 0x1A
bl SetGpuReg bl SetGpuReg
@ -11494,11 +11494,11 @@ sub_8194CE4: @ 8194CE4
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x12 movs r0, 0x12
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg

View File

@ -20578,33 +20578,33 @@ _081A5328:
negs r0, r0 negs r0, r0
strb r0, [r1, 0x1] strb r0, [r1, 0x1]
ldr r0, =gText_JapaneseHonorific ldr r0, =gText_JapaneseHonorific
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r4, =gDisplayedStringBattle ldr r4, =gDisplayedStringBattle
adds r0, r4, 0 adds r0, r4, 0
movs r1, 0xF movs r1, 0xF
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Vs ldr r0, =gText_Vs
movs r1, 0x10 movs r1, 0x10
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_RivalBuffer ldr r0, =gText_RivalBuffer
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
adds r0, r4, 0 adds r0, r4, 0
movs r1, 0x11 movs r1, 0x11
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Mind ldr r0, =gText_Mind
movs r1, 0x12 movs r1, 0x12
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Skill ldr r0, =gText_Skill
movs r1, 0x13 movs r1, 0x13
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Body ldr r0, =gText_Body
movs r1, 0x14 movs r1, 0x14
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gText_Judgement ldr r0, =gText_Judgement
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
adds r0, r4, 0 adds r0, r4, 0
movs r1, 0x15 movs r1, 0x15
bl battle_show_message_maybe bl sub_814F9EC
b _081A553E b _081A553E
.pool .pool
_081A53B4: _081A53B4:
@ -20685,10 +20685,10 @@ _081A5464:
movs r3, 0x1 movs r3, 0x1
bl sub_81A5558 bl sub_81A5558
ldr r0, =gText_Judgement ldr r0, =gText_Judgement
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0x15 movs r1, 0x15
bl battle_show_message_maybe bl sub_814F9EC
ldrb r0, [r5] ldrb r0, [r5]
adds r0, 0x1 adds r0, 0x1
strb r0, [r5] strb r0, [r5]
@ -31263,8 +31263,8 @@ _081AAA9E:
.pool .pool
thumb_func_end sub_81AAA7C thumb_func_end sub_81AAA7C
thumb_func_start CalculateBattlePyramidPickupItemId thumb_func_start GetBattlePyramidPickupItemId
CalculateBattlePyramidPickupItemId: @ 81AAAE0 GetBattlePyramidPickupItemId: @ 81AAAE0
push {r4-r6,lr} push {r4-r6,lr}
ldr r0, =gSaveBlock2Ptr ldr r0, =gSaveBlock2Ptr
ldr r1, [r0] ldr r1, [r0]
@ -31331,6 +31331,6 @@ _081AAB5A:
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end CalculateBattlePyramidPickupItemId thumb_func_end GetBattlePyramidPickupItemId
.align 2, 0 @ Don't pad with nop. .align 2, 0 @ Don't pad with nop.

View File

@ -5476,8 +5476,8 @@ _08075028:
bx r1 bx r1
thumb_func_end sub_8074FE8 thumb_func_end sub_8074FE8
thumb_func_start sub_8075034 thumb_func_start GetScaledHPFraction
sub_8075034: @ 8075034 GetScaledHPFraction: @ 8075034
push {r4,lr} push {r4,lr}
lsls r2, 24 lsls r2, 24
lsrs r2, 24 lsrs r2, 24
@ -5499,7 +5499,7 @@ _08075058:
pop {r4} pop {r4}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end sub_8075034 thumb_func_end GetScaledHPFraction
thumb_func_start sub_8075060 thumb_func_start sub_8075060
sub_8075060: @ 8075060 sub_8075060: @ 8075060
@ -5514,7 +5514,7 @@ sub_8075060: @ 8075060
b _0807508E b _0807508E
_08075072: _08075072:
movs r2, 0x30 movs r2, 0x30
bl sub_8075034 bl GetScaledHPFraction
lsls r0, 24 lsls r0, 24
lsrs r1, r0, 24 lsrs r1, r0, 24
movs r0, 0x3 movs r0, 0x3

View File

@ -687,7 +687,7 @@ _0814E6CC:
ldr r7, [r0] ldr r7, [r0]
_0814E6D8: _0814E6D8:
adds r0, r7, 0 adds r0, r7, 0
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
_0814E6DE: _0814E6DE:
pop {r3-r5} pop {r3-r5}
mov r8, r3 mov r8, r3
@ -699,15 +699,15 @@ _0814E6DE:
.pool .pool
thumb_func_end BufferStringBattle thumb_func_end BufferStringBattle
thumb_func_start StrCpyDecodeToDisplayedStringBattle thumb_func_start BattleStringExpandPlaceholdersToDisplayedString
StrCpyDecodeToDisplayedStringBattle: @ 814E6F0 BattleStringExpandPlaceholdersToDisplayedString: @ 814E6F0
push {lr} push {lr}
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
bl StrCpyDecodeBattle bl BattleStringExpandPlaceholders
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end StrCpyDecodeToDisplayedStringBattle thumb_func_end BattleStringExpandPlaceholdersToDisplayedString
thumb_func_start AppendStatusString thumb_func_start AppendStatusString
AppendStatusString: @ 814E700 AppendStatusString: @ 814E700
@ -763,8 +763,8 @@ _0814E75A:
bx r1 bx r1
thumb_func_end AppendStatusString thumb_func_end AppendStatusString
thumb_func_start StrCpyDecodeBattle thumb_func_start BattleStringExpandPlaceholders
StrCpyDecodeBattle: @ 814E764 BattleStringExpandPlaceholders: @ 814E764
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r9 mov r7, r9
mov r6, r8 mov r6, r8
@ -904,7 +904,7 @@ _0814E8EE:
adds r0, r1, 0 adds r0, r1, 0
_0814E8F0: _0814E8F0:
adds r1, r4, 0 adds r1, r4, 0
bl StrCpyDecodeBattleTextBuff bl ExpandBattleTextBuffPlaceholders
bl _0814F5C0 bl _0814F5C0
.pool .pool
_0814E904: _0814E904:
@ -924,7 +924,7 @@ _0814E920:
.pool .pool
_0814E92C: _0814E92C:
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -943,7 +943,7 @@ _0814E92C:
.pool .pool
_0814E960: _0814E960:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -962,7 +962,7 @@ _0814E960:
.pool .pool
_0814E994: _0814E994:
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -981,7 +981,7 @@ _0814E994:
.pool .pool
_0814E9C8: _0814E9C8:
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -1126,7 +1126,7 @@ _0814EB36:
adds r1, r0, 0 adds r1, r0, 0
movs r0, 0x1 movs r0, 0x1
ands r0, r1 ands r0, r1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -1147,7 +1147,7 @@ _0814EB74:
adds r1, r0, 0 adds r1, r0, 0
movs r0, 0x1 movs r0, 0x1
ands r0, r1 ands r0, r1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -1177,7 +1177,7 @@ _0814EBB0:
adds r1, r0, 0 adds r1, r0, 0
movs r0, 0x1 movs r0, 0x1
ands r0, r1 ands r0, r1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -1199,7 +1199,7 @@ _0814EBF8:
adds r1, r0, 0 adds r1, r0, 0
movs r0, 0x1 movs r0, 0x1
ands r0, r1 ands r0, r1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -2335,10 +2335,10 @@ _0814F62A:
pop {r4-r7} pop {r4-r7}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end StrCpyDecodeBattle thumb_func_end BattleStringExpandPlaceholders
thumb_func_start StrCpyDecodeBattleTextBuff thumb_func_start ExpandBattleTextBuffPlaceholders
StrCpyDecodeBattleTextBuff: @ 814F648 ExpandBattleTextBuffPlaceholders: @ 814F648
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r8 mov r7, r8
push {r7} push {r7}
@ -2652,7 +2652,7 @@ _0814F8EA:
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end StrCpyDecodeBattleTextBuff thumb_func_end ExpandBattleTextBuffPlaceholders
thumb_func_start sub_814F8F8 thumb_func_start sub_814F8F8
sub_814F8F8: @ 814F8F8 sub_814F8F8: @ 814F8F8
@ -2773,8 +2773,8 @@ _0814F9E0:
.pool .pool
thumb_func_end sub_814F950 thumb_func_end sub_814F950
thumb_func_start battle_show_message_maybe thumb_func_start sub_814F9EC
battle_show_message_maybe: @ 814F9EC sub_814F9EC: @ 814F9EC
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r9 mov r7, r9
mov r6, r8 mov r6, r8
@ -2987,7 +2987,7 @@ _0814FB9C:
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end battle_show_message_maybe thumb_func_end sub_814F9EC
thumb_func_start sub_814FBAC thumb_func_start sub_814FBAC
sub_814FBAC: @ 814FBAC sub_814FBAC: @ 814FBAC

View File

@ -50,15 +50,15 @@ sub_80D7678: @ 80D7678
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
strh r1, [r0] strh r1, [r0]
@ -611,10 +611,10 @@ _080D7BF6:
.pool .pool
_080D7C04: _080D7C04:
bl sub_80DE224 bl sub_80DE224
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0x2 movs r0, 0x2
bl BeginFastPaletteFade bl BeginFastPaletteFade
@ -1190,7 +1190,7 @@ _080D814C:
strh r0, [r4, 0x8] strh r0, [r4, 0x8]
b _080D822C b _080D822C
_080D8176: _080D8176:
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x7 adds r0, 0x7
strh r0, [r1] strh r0, [r1]
@ -1324,23 +1324,23 @@ vblank_cb_battle: @ 80D827C
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x12 movs r0, 0x12
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x18 movs r0, 0x18
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1A movs r0, 0x1A
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1C movs r0, 0x1C
bl SetGpuReg bl SetGpuReg
@ -1389,7 +1389,7 @@ sub_80D833C: @ 80D833C
bne _080D840C bne _080D840C
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
bl sub_80DCD48 bl sub_80DCD48
ldr r1, =gPlttBufferUnfaded ldr r1, =gPlttBufferUnfaded
@ -1520,7 +1520,7 @@ sub_80D8490: @ 80D8490
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
movs r1, 0xA0 movs r1, 0xA0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
movs r6, 0 movs r6, 0
ldr r0, =gUnknown_02039F25 ldr r0, =gUnknown_02039F25
@ -1773,7 +1773,7 @@ _080D86E4:
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
ldr r1, =gTasks ldr r1, =gTasks
lsls r0, r7, 2 lsls r0, r7, 2
@ -2044,7 +2044,7 @@ sub_80D895C: @ 80D895C
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
movs r0, 0 movs r0, 0
bl sub_80DC490 bl sub_80DC490
@ -5325,7 +5325,7 @@ sub_80DA5E8: @ 80DA5E8
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
ldr r4, =gUnknown_02039F34 ldr r4, =gUnknown_02039F34
movs r3, 0 movs r3, 0
@ -5404,9 +5404,9 @@ sub_80DA6B4: @ 80DA6B4
cmp r4, 0 cmp r4, 0
bne _080DA6EA bne _080DA6EA
bl sub_80DE224 bl sub_80DE224
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r4, [r0] strh r4, [r0]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
movs r0, 0x62 movs r0, 0x62
@ -5432,7 +5432,7 @@ sub_80DA700: @ 80DA700
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r3, r0, 24 lsrs r3, r0, 24
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x7 subs r0, 0x7
strh r0, [r1] strh r0, [r1]
@ -8519,7 +8519,7 @@ sub_80DBF68: @ 80DBF68
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
bl sub_80DB89C bl sub_80DB89C
ldr r0, =gUnknown_0827E8DA ldr r0, =gUnknown_0827E8DA
@ -12881,10 +12881,10 @@ sub_80DE224: @ 80DE224
ldrh r1, [r5] ldrh r1, [r5]
movs r0, 0xC movs r0, 0xC
bl SetGpuReg bl SetGpuReg
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
movs r0, 0xF0 movs r0, 0xF0
strh r0, [r1] strh r0, [r1]
ldr r4, =gUnknown_02022E1A ldr r4, =gBattle_BG1_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r4] strh r0, [r4]
movs r0, 0x14 movs r0, 0x14
@ -13004,9 +13004,9 @@ sub_80DE350: @ 80DE350
ldrh r1, [r3] ldrh r1, [r3]
movs r0, 0xA movs r0, 0xA
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r5, [r0] strh r5, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r5, [r0] strh r5, [r0]
ldr r7, =gSprites ldr r7, =gSprites
_080DE3CA: _080DE3CA:
@ -13051,10 +13051,10 @@ sub_80DE424: @ 80DE424
adds r4, r0, 0 adds r4, r0, 0
lsls r4, 24 lsls r4, 24
lsrs r4, 24 lsrs r4, 24
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
movs r0, 0xA0 movs r0, 0xA0
strh r0, [r1] strh r0, [r1]
movs r0, 0x62 movs r0, 0x62
@ -13078,7 +13078,7 @@ sub_80DE464: @ 80DE464
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r3, r0, 24 lsrs r3, r0, 24
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldrh r0, [r1] ldrh r0, [r1]
subs r0, 0x7 subs r0, 0x7
strh r0, [r1] strh r0, [r1]
@ -13233,7 +13233,7 @@ sub_80DE5C0: @ 80DE5C0
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r2, r0, 24 lsrs r2, r0, 24
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
ldrh r0, [r1] ldrh r0, [r1]
adds r0, 0x7 adds r0, 0x7
strh r0, [r1] strh r0, [r1]

View File

@ -97,15 +97,15 @@ _080F57E0:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
strh r1, [r0] strh r1, [r0]
@ -449,23 +449,23 @@ sub_80F5C24: @ 80F5C24
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x12 movs r0, 0x12
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x18 movs r0, 0x18
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1A movs r0, 0x1A
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1C movs r0, 0x1C
bl SetGpuReg bl SetGpuReg
@ -1838,7 +1838,7 @@ _080F68A8:
thumb_func_start sub_80F68B4 thumb_func_start sub_80F68B4
sub_80F68B4: @ 80F68B4 sub_80F68B4: @ 80F68B4
push {r4,r5,lr} push {r4,r5,lr}
ldr r2, =gUnknown_02022E20 ldr r2, =gBattle_BG3_X
ldrh r3, [r2] ldrh r3, [r2]
adds r0, r3, 0x2 adds r0, r3, 0x2
strh r0, [r2] strh r0, [r2]
@ -1989,7 +1989,7 @@ sub_80F69B8: @ 80F69B8
_080F69DE: _080F69DE:
adds r0, r7, 0 adds r0, r7, 0
ldr r1, [sp, 0x28] ldr r1, [sp, 0x28]
bl sub_80D2EDC bl GetMonIconPtr
adds r3, r0, 0 adds r3, r0, 0
lsls r0, r5, 9 lsls r0, r5, 9
adds r0, 0x80 adds r0, 0x80

View File

@ -170,15 +170,15 @@ evolution_cutscene: @ 813DA8C
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r2, [r0] strh r2, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r2, [r0] strh r2, [r0]
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
movs r2, 0x80 movs r2, 0x80
lsls r2, 1 lsls r2, 1
adds r0, r2, 0 adds r0, r2, 0
@ -186,7 +186,7 @@ evolution_cutscene: @ 813DA8C
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r1, =gUnknown_02022FF0 ldr r1, =gBattleTerrain
movs r0, 0x9 movs r0, 0x9
strb r0, [r1] strb r0, [r1]
bl c2_berry_program_update_menu bl c2_berry_program_update_menu
@ -464,22 +464,22 @@ sub_813DD7C: @ 813DD7C
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r4, [r0] strh r4, [r0]
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
movs r2, 0x80 movs r2, 0x80
lsls r2, 1 lsls r2, 1
adds r0, r2, 0 adds r0, r2, 0
strh r0, [r1] strh r0, [r1]
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
strh r4, [r0] strh r4, [r0]
ldr r1, =gUnknown_02022FF0 ldr r1, =gBattleTerrain
movs r0, 0x9 movs r0, 0x9
strb r0, [r1] strb r0, [r1]
bl c2_berry_program_update_menu bl c2_berry_program_update_menu
@ -634,15 +634,15 @@ _0813DFE0:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
ldr r2, =gUnknown_02022E20 ldr r2, =gBattle_BG3_X
movs r3, 0x80 movs r3, 0x80
lsls r3, 1 lsls r3, 1
adds r0, r3, 0 adds r0, r3, 0
@ -945,15 +945,15 @@ sub_813E1D4: @ 813E1D4
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r4, [r0] strh r4, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r4, [r0] strh r4, [r0]
ldr r1, =gUnknown_02022E20 ldr r1, =gBattle_BG3_X
movs r2, 0x80 movs r2, 0x80
lsls r2, 1 lsls r2, 1
adds r0, r2, 0 adds r0, r2, 0
@ -1338,7 +1338,7 @@ _0813E6E4:
bl StringExpandPlaceholders bl StringExpandPlaceholders
adds r0, r4, 0 adds r0, r4, 0
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r2, r8 mov r2, r8
adds r1, r2, r7 adds r1, r2, r7
@ -1626,7 +1626,7 @@ _0813E99E:
bl StringExpandPlaceholders bl StringExpandPlaceholders
adds r0, r4, 0 adds r0, r4, 0
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =0x00000173 ldr r0, =0x00000173
bl PlayBGM bl PlayBGM
ldr r2, =gTasks ldr r2, =gTasks
@ -1868,7 +1868,7 @@ _0813EBE4:
_0813EBEC: _0813EBEC:
ldr r0, =gStringVar4 ldr r0, =gStringVar4
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gTasks ldr r1, =gTasks
mov r2, r8 mov r2, r8
adds r0, r2, r7 adds r0, r2, r7
@ -1892,15 +1892,15 @@ _0813EC1E:
beq _0813EC2A beq _0813EC2A
b _0813F1A4 b _0813F1A4
_0813EC2A: _0813EC2A:
bl sub_804F574 bl BufferMoveToLearnIntoBattleTextBuff2
ldr r0, =0x0000016f ldr r0, =0x0000016f
bl PlayFanfare bl PlayFanfare
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0xC] ldr r0, [r0, 0xC]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r3, r8 mov r3, r8
adds r1, r3, r7 adds r1, r3, r7
@ -1991,13 +1991,13 @@ _0813ED0A:
beq _0813ED16 beq _0813ED16
b _0813F1A4 b _0813F1A4
_0813ED16: _0813ED16:
bl sub_804F574 bl BufferMoveToLearnIntoBattleTextBuff2
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x10] ldr r0, [r0, 0x10]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r2, r8 mov r2, r8
adds r1, r2, r7 adds r1, r2, r7
@ -2023,10 +2023,10 @@ _0813ED56:
_0813ED62: _0813ED62:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x14] ldr r0, [r0, 0x14]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r3, r8 mov r3, r8
adds r1, r3, r7 adds r1, r3, r7
@ -2048,10 +2048,10 @@ _0813ED90:
bne _0813EDCE bne _0813EDCE
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x18] ldr r0, [r0, 0x18]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r2, r8 mov r2, r8
adds r1, r2, r7 adds r1, r2, r7
@ -2087,7 +2087,7 @@ _0813EDEA:
bl sub_8056A3C bl sub_8056A3C
ldr r0, =gText_BattleYesNoChoice ldr r0, =gText_BattleYesNoChoice
movs r1, 0xC movs r1, 0xC
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r3, r8 mov r3, r8
adds r1, r3, r7 adds r1, r3, r7
@ -2100,7 +2100,7 @@ _0813EDEA:
ldr r0, =gBattleCommunication ldr r0, =gBattleCommunication
strb r2, [r0, 0x1] strb r2, [r0, 0x1]
movs r0, 0 movs r0, 0
bl sub_8056B74 bl BattleCreateCursorAt
b _0813F1A4 b _0813F1A4
.pool .pool
_0813EE34: _0813EE34:
@ -2117,10 +2117,10 @@ _0813EE34:
movs r0, 0x5 movs r0, 0x5
bl PlaySE bl PlaySE
ldrb r0, [r4, 0x1] ldrb r0, [r4, 0x1]
bl sub_8056BAC bl BattleDestroyCursorAt
movs r0, 0 movs r0, 0
strb r0, [r4, 0x1] strb r0, [r4, 0x1]
bl sub_8056B74 bl BattleCreateCursorAt
_0813EE5C: _0813EE5C:
ldr r0, =gMain ldr r0, =gMain
ldrh r1, [r0, 0x2E] ldrh r1, [r0, 0x2E]
@ -2135,10 +2135,10 @@ _0813EE5C:
movs r0, 0x5 movs r0, 0x5
bl PlaySE bl PlaySE
ldrb r0, [r4, 0x1] ldrb r0, [r4, 0x1]
bl sub_8056BAC bl BattleDestroyCursorAt
movs r0, 0x1 movs r0, 0x1
strb r0, [r4, 0x1] strb r0, [r4, 0x1]
bl sub_8056B74 bl BattleCreateCursorAt
_0813EE84: _0813EE84:
ldr r0, =gMain ldr r0, =gMain
ldrh r1, [r0, 0x2E] ldrh r1, [r0, 0x2E]
@ -2289,10 +2289,10 @@ _0813EFC8:
ldr r3, =0x000004cc ldr r3, =0x000004cc
adds r0, r3 adds r0, r3
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gTasks ldr r1, =gTasks
mov r2, r8 mov r2, r8
adds r0, r2, r7 adds r0, r2, r7
@ -2338,10 +2338,10 @@ _0813F05C:
lsls r1, 2 lsls r1, 2
adds r0, r1 adds r0, r1
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r2, r8 mov r2, r8
adds r1, r2, r7 adds r1, r2, r7
@ -2367,10 +2367,10 @@ _0813F09E:
_0813F0AA: _0813F0AA:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x1C] ldr r0, [r0, 0x1C]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r0, =gTasks ldr r0, =gTasks
mov r3, r8 mov r3, r8
adds r1, r3, r7 adds r1, r3, r7
@ -2395,10 +2395,10 @@ _0813F0D8:
lsls r1, 2 lsls r1, 2
adds r0, r1 adds r0, r1
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gTasks ldr r1, =gTasks
mov r2, r8 mov r2, r8
adds r0, r2, r7 adds r0, r2, r7
@ -2411,10 +2411,10 @@ _0813F0D8:
_0813F120: _0813F120:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x20] ldr r0, [r0, 0x20]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gTasks ldr r1, =gTasks
mov r3, r8 mov r3, r8
adds r0, r3, r7 adds r0, r3, r7
@ -2431,10 +2431,10 @@ _0813F120:
_0813F154: _0813F154:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x24] ldr r0, [r0, 0x24]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle ldr r0, =gDisplayedStringBattle
movs r1, 0 movs r1, 0
bl battle_show_message_maybe bl sub_814F9EC
ldr r1, =gTasks ldr r1, =gTasks
mov r2, r8 mov r2, r8
adds r0, r2, r7 adds r0, r2, r7
@ -3059,12 +3059,12 @@ _0813F756:
beq _0813F762 beq _0813F762
b _0813FCC4 b _0813FCC4
_0813F762: _0813F762:
bl sub_804F574 bl BufferMoveToLearnIntoBattleTextBuff2
ldr r0, =0x0000016f ldr r0, =0x0000016f
bl PlayFanfare bl PlayFanfare
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0xC] ldr r0, [r0, 0xC]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3160,10 +3160,10 @@ _0813F846:
beq _0813F852 beq _0813F852
b _0813FCC4 b _0813FCC4
_0813F852: _0813F852:
bl sub_804F574 bl BufferMoveToLearnIntoBattleTextBuff2
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x10] ldr r0, [r0, 0x10]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3193,7 +3193,7 @@ _0813F892:
_0813F89E: _0813F89E:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x14] ldr r0, [r0, 0x14]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3219,7 +3219,7 @@ _0813F8CC:
bne _0813F90C bne _0813F90C
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x18] ldr r0, [r0, 0x18]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3299,7 +3299,7 @@ _0813F98C:
lsls r1, 3 lsls r1, 3
adds r0, r1 adds r0, r1
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3336,7 +3336,7 @@ _0813F9E4:
lsls r1, 3 lsls r1, 3
adds r0, r1 adds r0, r1
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3441,7 +3441,7 @@ _0813FAEC:
ldr r1, =0x000004cc ldr r1, =0x000004cc
adds r0, r1 adds r0, r1
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3481,7 +3481,7 @@ _0813FB3C:
lsls r1, 2 lsls r1, 2
adds r0, r1 adds r0, r1
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3511,7 +3511,7 @@ _0813FBB2:
_0813FBBE: _0813FBBE:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x1C] ldr r0, [r0, 0x1C]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3540,7 +3540,7 @@ _0813FBEC:
lsls r1, 2 lsls r1, 2
adds r0, r1 adds r0, r1
ldr r0, [r0] ldr r0, [r0]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3557,7 +3557,7 @@ _0813FBEC:
_0813FC38: _0813FC38:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x20] ldr r0, [r0, 0x20]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3578,7 +3578,7 @@ _0813FC38:
_0813FC70: _0813FC70:
ldr r0, =gBattleStringsTable ldr r0, =gBattleStringsTable
ldr r0, [r0, 0x24] ldr r0, [r0, 0x24]
bl StrCpyDecodeToDisplayedStringBattle bl BattleStringExpandPlaceholdersToDisplayedString
ldr r1, =gDisplayedStringBattle ldr r1, =gDisplayedStringBattle
movs r0, 0 movs r0, 0
movs r2, 0x1 movs r2, 0x1
@ -3638,23 +3638,23 @@ sub_813FCDC: @ 813FCDC
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x12 movs r0, 0x12
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x18 movs r0, 0x18
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1A movs r0, 0x1A
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1C movs r0, 0x1C
bl SetGpuReg bl SetGpuReg
@ -3682,23 +3682,23 @@ sub_813FD64: @ 813FD64
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x12 movs r0, 0x12
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x14 movs r0, 0x14
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x18 movs r0, 0x18
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1A movs r0, 0x1A
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x1C movs r0, 0x1C
bl SetGpuReg bl SetGpuReg
@ -3852,9 +3852,9 @@ sub_813FEE8: @ 813FEE8
push {r6,r7} push {r6,r7}
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
mov r8, r0 mov r8, r0
ldr r1, =gUnknown_02022E1A ldr r1, =gBattle_BG1_Y
mov r9, r1 mov r9, r1
ldr r1, =gTasks ldr r1, =gTasks
lsls r0, r5, 2 lsls r0, r5, 2
@ -3865,12 +3865,12 @@ sub_813FEE8: @ 813FEE8
ldrsh r0, [r0, r2] ldrsh r0, [r0, r2]
cmp r0, 0 cmp r0, 0
bne _0813FF28 bne _0813FF28
ldr r7, =gUnknown_02022E1C ldr r7, =gBattle_BG2_X
ldr r6, =gUnknown_02022E1E ldr r6, =gBattle_BG2_Y
b _0813FF2C b _0813FF2C
.pool .pool
_0813FF28: _0813FF28:
ldr r7, =gUnknown_02022E20 ldr r7, =gBattle_BG3_X
ldr r6, =gUnknown_02022E22 ldr r6, =gUnknown_02022E22
_0813FF2C: _0813FF2C:
lsls r4, r5, 2 lsls r4, r5, 2
@ -4130,12 +4130,12 @@ sub_8140174: @ 8140174
movs r0, 0x50 movs r0, 0x50
movs r1, 0 movs r1, 0
bl SetGpuReg bl SetGpuReg
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
movs r1, 0 movs r1, 0
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
movs r0, 0x1 movs r0, 0x1
movs r1, 0x5 movs r1, 0x5

View File

@ -5201,7 +5201,7 @@ sub_819A25C: @ 819A25C
lsrs r4, 24 lsrs r4, 24
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
bl sub_80D30B0 bl GetValidMonIconPalettePtr
adds r1, r4, 0 adds r1, r4, 0
movs r2, 0x20 movs r2, 0x20
bl LoadPalette bl LoadPalette
@ -5228,7 +5228,7 @@ sub_819A27C: @ 819A27C
lsls r5, 16 lsls r5, 16
lsrs r5, 16 lsrs r5, 16
movs r2, 0x1 movs r2, 0x1
bl sub_80D2EDC bl GetMonIconPtr
adds r1, r0, 0 adds r1, r0, 0
movs r0, 0x20 movs r0, 0x20
str r0, [sp] str r0, [sp]

View File

@ -840,7 +840,7 @@ pokemon_transfer_to_pc_with_message: @ 80E34E4
bl VarGet bl VarGet
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
bl StringCopy bl StringCopy
@ -859,7 +859,7 @@ _080E3534:
bl VarGet bl VarGet
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
bl StringCopy bl StringCopy
@ -874,7 +874,7 @@ _080E3534:
bl get_unknown_box_id bl get_unknown_box_id
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
bl StringCopy bl StringCopy

View File

@ -5495,7 +5495,7 @@ _081B2F04:
asrs r1, 16 asrs r1, 16
ldr r2, [r6] ldr r2, [r6]
ldrb r2, [r2, 0x1A] ldrb r2, [r2, 0x1A]
bl sub_8075034 bl GetScaledHPFraction
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
ldrb r0, [r6, 0x8] ldrb r0, [r6, 0x8]
@ -16228,7 +16228,7 @@ _081B8CBE:
bne _081B8CFC bne _081B8CFC
movs r5, 0x1 movs r5, 0x1
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
mov r2, sp mov r2, sp
ldr r1, =gBattlePartyID ldr r1, =gBattlePartyID
lsls r0, 24 lsls r0, 24
@ -16255,7 +16255,7 @@ _081B8CF0:
_081B8CFC: _081B8CFC:
movs r5, 0x2 movs r5, 0x2
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
mov r1, sp mov r1, sp
ldr r4, =gBattlePartyID ldr r4, =gBattlePartyID
lsls r0, 24 lsls r0, 24
@ -16264,7 +16264,7 @@ _081B8CFC:
ldrh r0, [r0] ldrh r0, [r0]
strb r0, [r1] strb r0, [r1]
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
mov r1, sp mov r1, sp
lsls r0, 24 lsls r0, 24
lsrs r0, 23 lsrs r0, 23
@ -16344,19 +16344,19 @@ sub_81B8D88: @ 81B8D88
cmp r0, 0 cmp r0, 0
bne _081B8DB0 bne _081B8DB0
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
movs r0, 0x2 movs r0, 0x2
b _081B8DBC b _081B8DBC
_081B8DB0: _081B8DB0:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
movs r0, 0x3 movs r0, 0x3
_081B8DBC: _081B8DBC:
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
bl sub_81B1250 bl sub_81B1250

View File

@ -185,7 +185,7 @@ _08075548:
.pool .pool
_08075584: _08075584:
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
ldr r1, =gBankTarget ldr r1, =gBankTarget
strb r0, [r1] strb r0, [r1]
movs r0, 0x1 movs r0, 0x1
@ -1199,13 +1199,13 @@ _08075DD4:
lsrs r0, 16 lsrs r0, 16
mov r9, r0 mov r9, r0
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
cmp r5, r0 cmp r5, r0
beq _08075E00 beq _08075E00
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
cmp r5, r0 cmp r5, r0
@ -1261,13 +1261,13 @@ _08075E70:
.pool .pool
_08075E80: _08075E80:
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
cmp r5, r0 cmp r5, r0
beq _08075E9C beq _08075E9C
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
cmp r5, r0 cmp r5, r0
@ -1830,7 +1830,7 @@ _080762F8:
movs r0, 0x3A movs r0, 0x3A
ldrsh r4, [r5, r0] ldrsh r4, [r5, r0]
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
cmp r4, r0 cmp r4, r0
@ -1903,7 +1903,7 @@ sub_8076398: @ 8076398
movs r0, 0x3A movs r0, 0x3A
ldrsh r4, [r5, r0] ldrsh r4, [r5, r0]
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
cmp r4, r0 cmp r4, r0

View File

@ -8429,8 +8429,8 @@ _080BFDB4:
.pool .pool
thumb_func_end sub_80BFD7C thumb_func_end sub_80BFD7C
thumb_func_start sub_80BFDF4 thumb_func_start CreateDexDisplayMonDataTask
sub_80BFDF4: @ 80BFDF4 CreateDexDisplayMonDataTask: @ 80BFDF4
push {r4-r6,lr} push {r4-r6,lr}
adds r4, r0, 0 adds r4, r0, 0
adds r5, r1, 0 adds r5, r1, 0
@ -8460,7 +8460,7 @@ sub_80BFDF4: @ 80BFDF4
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end sub_80BFDF4 thumb_func_end CreateDexDisplayMonDataTask
thumb_func_start sub_80BFE38 thumb_func_start sub_80BFE38
sub_80BFE38: @ 80BFE38 sub_80BFE38: @ 80BFE38

View File

@ -32,7 +32,7 @@ sub_80D2CC4: @ 80D2CC4
str r0, [sp, 0x18] str r0, [sp, 0x18]
adds r0, r4, 0 adds r0, r4, 0
adds r2, r5, 0 adds r2, r5, 0
bl sub_80D2EDC bl GetMonIconPtr
str r0, [sp, 0x1C] str r0, [sp, 0x1C]
ldr r0, =gUnknown_0857C5B4 ldr r0, =gUnknown_0857C5B4
str r0, [sp, 0x20] str r0, [sp, 0x20]
@ -271,9 +271,9 @@ _080D2ED2:
bx r1 bx r1
thumb_func_end sub_80D2E84 thumb_func_end sub_80D2E84
thumb_func_start sub_80D2EDC thumb_func_start GetMonIconPtr
@ void *sub_80D2EDC(u16 speciesId, u32 personality, bool32) @ void *GetMonIconPtr(u16 speciesId, u32 personality, bool32)
sub_80D2EDC: @ 80D2EDC GetMonIconPtr: @ 80D2EDC
push {r4,lr} push {r4,lr}
adds r4, r2, 0 adds r4, r2, 0
lsls r0, 16 lsls r0, 16
@ -286,7 +286,7 @@ sub_80D2EDC: @ 80D2EDC
pop {r4} pop {r4}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end sub_80D2EDC thumb_func_end GetMonIconPtr
thumb_func_start sub_80D2EF8 thumb_func_start sub_80D2EF8
sub_80D2EF8: @ 80D2EF8 sub_80D2EF8: @ 80D2EF8
@ -534,8 +534,8 @@ sub_80D30A0: @ 80D30A0
.pool .pool
thumb_func_end sub_80D30A0 thumb_func_end sub_80D30A0
thumb_func_start sub_80D30B0 thumb_func_start GetValidMonIconPalettePtr
sub_80D30B0: @ 80D30B0 GetValidMonIconPalettePtr: @ 80D30B0
push {lr} push {lr}
lsls r0, 16 lsls r0, 16
lsrs r2, r0, 16 lsrs r2, r0, 16
@ -556,7 +556,7 @@ _080D30C2:
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end sub_80D30B0 thumb_func_end GetValidMonIconPalettePtr
thumb_func_start sub_80D30DC thumb_func_start sub_80D30DC
sub_80D30DC: @ 80D30DC sub_80D30DC: @ 80D30DC

View File

@ -1155,7 +1155,7 @@ _0806C6AE:
movs r0, 0 movs r0, 0
movs r1, 0 movs r1, 0
movs r2, 0 movs r2, 0
bl dp01_build_cmdbuf_x00_a_b_0 bl EmitGetMonData
ldrb r0, [r4] ldrb r0, [r4]
bl MarkBufferBankForExecution bl MarkBufferBankForExecution
strb r5, [r4] strb r5, [r4]

View File

@ -1019,7 +1019,7 @@ _080C777E:
_080C779E: _080C779E:
lsls r0, r5, 24 lsls r0, r5, 24
lsrs r0, 24 lsrs r0, 24
bl sav3_get_box_name bl GetBoxNamePtr
ldr r1, =gText_Box ldr r1, =gText_Box
bl StringCopy bl StringCopy
adds r4, r5, 0x1 adds r4, r5, 0x1
@ -1566,7 +1566,7 @@ sub_80C7BE4: @ 80C7BE4
lsls r4, 2 lsls r4, 2
adds r0, r4 adds r0, r4
ldrb r0, [r0] ldrb r0, [r0]
bl sav3_get_box_name bl GetBoxNamePtr
mov r10, r0 mov r10, r0
mov r1, r9 mov r1, r9
ldr r0, [r1] ldr r0, [r1]
@ -5424,7 +5424,7 @@ _080C9F1C:
bl StorageGetCurrentBox bl StorageGetCurrentBox
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
movs r0, 0 movs r0, 0
str r0, [sp] str r0, [sp]
@ -10831,7 +10831,7 @@ sub_80CCB50: @ 80CCB50
ldr r5, =0x000021b8 ldr r5, =0x000021b8
adds r4, r5 adds r4, r5
mov r0, r8 mov r0, r8
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
movs r2, 0 movs r2, 0
@ -10852,7 +10852,7 @@ sub_80CCB50: @ 80CCB50
ldr r0, [sp, 0x2C] ldr r0, [sp, 0x2C]
bl LoadSpriteSheet bl LoadSpriteSheet
mov r0, r8 mov r0, r8
bl sav3_get_box_name bl GetBoxNamePtr
bl sub_80CD00C bl sub_80CD00C
movs r4, 0 movs r4, 0
lsls r0, 16 lsls r0, 16
@ -10997,7 +10997,7 @@ _080CCDB0:
ldr r5, =0x000021b8 ldr r5, =0x000021b8
adds r4, r5 adds r4, r5
ldr r0, [sp, 0x28] ldr r0, [sp, 0x28]
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
movs r2, 0 movs r2, 0
@ -11027,7 +11027,7 @@ _080CCDB0:
movs r2, 0x4 movs r2, 0x4
bl LoadPalette bl LoadPalette
ldr r0, [sp, 0x28] ldr r0, [sp, 0x28]
bl sav3_get_box_name bl GetBoxNamePtr
bl sub_80CD00C bl sub_80CD00C
lsls r0, 16 lsls r0, 16
mov r1, r10 mov r1, r10
@ -17910,7 +17910,7 @@ sub_80D07B0: @ 80D07B0
beq _080D0828 beq _080D0828
adds r0, r5, 0 adds r0, r5, 0
movs r2, 0x1 movs r2, 0x1
bl sub_80D2EDC bl GetMonIconPtr
adds r4, r0, 0 adds r4, r0, 0
adds r0, r5, 0 adds r0, r5, 0
bl sub_80D3080 bl sub_80D3080
@ -21085,8 +21085,8 @@ _080D20CA:
bx r1 bx r1
thumb_func_end GetBoxedMonPtr thumb_func_end GetBoxedMonPtr
thumb_func_start sav3_get_box_name thumb_func_start GetBoxNamePtr
sav3_get_box_name: @ 80D20D0 GetBoxNamePtr: @ 80D20D0
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r2, r0, 24 lsrs r2, r0, 24
@ -21106,7 +21106,7 @@ _080D20EC:
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end sav3_get_box_name thumb_func_end GetBoxNamePtr
thumb_func_start sub_80D20F8 thumb_func_start sub_80D20F8
sub_80D20F8: @ 80D20F8 sub_80D20F8: @ 80D20F8

View File

@ -13136,7 +13136,7 @@ _081CD8E4:
ldr r2, =0x00006325 ldr r2, =0x00006325
adds r4, r2 adds r4, r2
adds r0, r3, 0 adds r0, r3, 0
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
_081CD8F4: _081CD8F4:
@ -24164,7 +24164,7 @@ _081D2F2C:
adds r4, r5, 0x5 adds r4, r5, 0x5
lsls r0, r7, 24 lsls r0, r7, 24
lsrs r0, 24 lsrs r0, 24
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
_081D2F3A: _081D2F3A:

View File

@ -236,8 +236,8 @@ _08184FA0:
.pool .pool
thumb_func_end sub_8184E58 thumb_func_end sub_8184E58
thumb_func_start sub_8184FBC thumb_func_start RecordedBattle_SetBankAction
sub_8184FBC: @ 8184FBC RecordedBattle_SetBankAction: @ 8184FBC
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
@ -269,7 +269,7 @@ _08184FF0:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_8184FBC thumb_func_end RecordedBattle_SetBankAction
thumb_func_start sub_8185008 thumb_func_start sub_8185008
sub_8185008: @ 8185008 sub_8185008: @ 8185008
@ -2212,7 +2212,7 @@ _081860C2:
ldr r1, [sp, 0x4C] ldr r1, [sp, 0x4C]
lsrs r0, r1, 24 lsrs r0, r1, 24
movs r1, 0x6 movs r1, 0x6
bl sub_8184FBC bl RecordedBattle_SetBankAction
movs r5, 0 movs r5, 0
ldr r2, =gUnknown_0203CC70 ldr r2, =gUnknown_0203CC70
mov r8, r2 mov r8, r2
@ -2241,7 +2241,7 @@ _081860F0:
lsrs r1, 24 lsrs r1, 24
ldr r2, [sp, 0x4C] ldr r2, [sp, 0x4C]
lsrs r0, r2, 24 lsrs r0, r2, 24
bl sub_8184FBC bl RecordedBattle_SetBankAction
b _08186118 b _08186118
.pool .pool
_08186110: _08186110:

View File

@ -10,8 +10,8 @@ nullsub_35: @ 80A92F4
bx lr bx lr
thumb_func_end nullsub_35 thumb_func_end nullsub_35
thumb_func_start sub_80A92F8 thumb_func_start ReshowBattleScreenAfterMenu
sub_80A92F8: @ 80A92F8 ReshowBattleScreenAfterMenu: @ 80A92F8
push {lr} push {lr}
ldr r2, =gPaletteFade ldr r2, =gPaletteFade
ldrb r0, [r2, 0x8] ldrb r0, [r2, 0x8]
@ -37,7 +37,7 @@ sub_80A92F8: @ 80A92F8
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_80A92F8 thumb_func_end ReshowBattleScreenAfterMenu
thumb_func_start c2_80777E8 thumb_func_start c2_80777E8
c2_80777E8: @ 80A933C c2_80777E8: @ 80A933C
@ -103,15 +103,15 @@ _080A93B0:
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E16 ldr r0, =gUnknown_02022E16
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
strh r1, [r0] strh r1, [r0]
ldr r0, =gUnknown_02022E22 ldr r0, =gUnknown_02022E22
strh r1, [r0] strh r1, [r0]
@ -223,7 +223,7 @@ _080A94F0:
_080A94F8: _080A94F8:
bl sub_805EC84 bl sub_805EC84
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
adds r4, r0, 0 adds r4, r0, 0
lsls r4, 24 lsls r4, 24
lsrs r4, 24 lsrs r4, 24
@ -247,7 +247,7 @@ _080A94F8:
cmp r0, 0 cmp r0, 0
beq _080A955C beq _080A955C
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
adds r4, r0, 0 adds r4, r0, 0
lsls r4, 24 lsls r4, 24
lsrs r4, 24 lsrs r4, 24
@ -286,7 +286,7 @@ _080A955C:
b _080A95D2 b _080A95D2
.pool .pool
_080A95A4: _080A95A4:
ldr r0, =vblank_cb_08078BB4 ldr r0, =VBlankCB_Battle
bl SetVBlankCallback bl SetVBlankCallback
bl sub_80A95F4 bl sub_80A95F4
movs r0, 0x1 movs r0, 0x1
@ -301,7 +301,7 @@ _080A95A4:
movs r0, 0x7F movs r0, 0x7F
ands r0, r1 ands r0, r1
strb r0, [r2, 0x8] strb r0, [r2, 0x8]
ldr r0, =sub_8038420 ldr r0, =BattleMainCB2
bl SetMainCallback2 bl SetMainCallback2
bl sub_805EF14 bl sub_805EF14
_080A95D2: _080A95D2:

View File

@ -2134,8 +2134,8 @@ _0803389C:
.pool .pool
thumb_func_end sub_803375C thumb_func_end sub_803375C
thumb_func_start dp01_build_cmdbuf_x00_a_b_0 thumb_func_start EmitGetMonData
dp01_build_cmdbuf_x00_a_b_0: @ 80338B4 EmitGetMonData: @ 80338B4
push {r4,lr} push {r4,lr}
adds r4, r1, 0 adds r4, r1, 0
lsls r0, 24 lsls r0, 24
@ -2152,7 +2152,7 @@ dp01_build_cmdbuf_x00_a_b_0: @ 80338B4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x00_a_b_0 thumb_func_end EmitGetMonData
thumb_func_start dp01_build_cmdbuf_x01_a_b_0 thumb_func_start dp01_build_cmdbuf_x01_a_b_0
dp01_build_cmdbuf_x01_a_b_0: @ 80338D8 dp01_build_cmdbuf_x01_a_b_0: @ 80338D8
@ -2175,8 +2175,8 @@ dp01_build_cmdbuf_x01_a_b_0: @ 80338D8
.pool .pool
thumb_func_end dp01_build_cmdbuf_x01_a_b_0 thumb_func_end dp01_build_cmdbuf_x01_a_b_0
thumb_func_start EmitSetAttributes thumb_func_start EmitSetMonData
EmitSetAttributes: @ 8033900 EmitSetMonData: @ 8033900
push {r4-r6,lr} push {r4-r6,lr}
ldr r4, [sp, 0x10] ldr r4, [sp, 0x10]
lsls r0, 24 lsls r0, 24
@ -2209,7 +2209,7 @@ _0803392E:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end EmitSetAttributes thumb_func_end EmitSetMonData
thumb_func_start sub_8033940 thumb_func_start sub_8033940
sub_8033940: @ 8033940 sub_8033940: @ 8033940
@ -2264,8 +2264,8 @@ dp01_build_cmdbuf_x04_4_4_4: @ 8033980
.pool .pool
thumb_func_end dp01_build_cmdbuf_x04_4_4_4 thumb_func_end dp01_build_cmdbuf_x04_4_4_4
thumb_func_start dp01_build_cmdbuf_x05_a_b_c thumb_func_start EmitSwitchInAnim
dp01_build_cmdbuf_x05_a_b_c: @ 80339A0 EmitSwitchInAnim: @ 80339A0
push {r4,lr} push {r4,lr}
adds r4, r1, 0 adds r4, r1, 0
lsls r0, 24 lsls r0, 24
@ -2282,10 +2282,10 @@ dp01_build_cmdbuf_x05_a_b_c: @ 80339A0
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x05_a_b_c thumb_func_end EmitSwitchInAnim
thumb_func_start dp01_build_cmdbuf_x06_a thumb_func_start EmitReturnPokeToBall
dp01_build_cmdbuf_x06_a: @ 80339C4 EmitReturnPokeToBall: @ 80339C4
push {lr} push {lr}
adds r3, r1, 0 adds r3, r1, 0
lsls r0, 24 lsls r0, 24
@ -2299,7 +2299,7 @@ dp01_build_cmdbuf_x06_a: @ 80339C4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x06_a thumb_func_end EmitReturnPokeToBall
thumb_func_start dp01_build_cmdbuf_x07_7_7_7 thumb_func_start dp01_build_cmdbuf_x07_7_7_7
dp01_build_cmdbuf_x07_7_7_7: @ 80339E4 dp01_build_cmdbuf_x07_7_7_7: @ 80339E4
@ -2319,8 +2319,8 @@ dp01_build_cmdbuf_x07_7_7_7: @ 80339E4
.pool .pool
thumb_func_end dp01_build_cmdbuf_x07_7_7_7 thumb_func_end dp01_build_cmdbuf_x07_7_7_7
thumb_func_start dp01_build_cmdbuf_x08_8_8_8 thumb_func_start EmitTrainerSlide
dp01_build_cmdbuf_x08_8_8_8: @ 8033A04 EmitTrainerSlide: @ 8033A04
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -2335,10 +2335,10 @@ dp01_build_cmdbuf_x08_8_8_8: @ 8033A04
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x08_8_8_8 thumb_func_end EmitTrainerSlide
thumb_func_start dp01_build_cmdbuf_x09_9_9_9 thumb_func_start EmitTrainerSlideBack
dp01_build_cmdbuf_x09_9_9_9: @ 8033A24 EmitTrainerSlideBack: @ 8033A24
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -2353,10 +2353,10 @@ dp01_build_cmdbuf_x09_9_9_9: @ 8033A24
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x09_9_9_9 thumb_func_end EmitTrainerSlideBack
thumb_func_start dp01_build_cmdbuf_x0A_A_A_A thumb_func_start EmitFaintAnimation
dp01_build_cmdbuf_x0A_A_A_A: @ 8033A44 EmitFaintAnimation: @ 8033A44
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -2371,7 +2371,7 @@ dp01_build_cmdbuf_x0A_A_A_A: @ 8033A44
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x0A_A_A_A thumb_func_end EmitFaintAnimation
thumb_func_start dp01_build_cmdbuf_x0B_B_B_B thumb_func_start dp01_build_cmdbuf_x0B_B_B_B
dp01_build_cmdbuf_x0B_B_B_B: @ 8033A64 dp01_build_cmdbuf_x0B_B_B_B: @ 8033A64
@ -2409,8 +2409,8 @@ dp01_build_cmdbuf_x0C_C_C_C: @ 8033A84
.pool .pool
thumb_func_end dp01_build_cmdbuf_x0C_C_C_C thumb_func_end dp01_build_cmdbuf_x0C_C_C_C
thumb_func_start dp01_build_cmdbuf_x0D_a thumb_func_start EmitBallThrow
dp01_build_cmdbuf_x0D_a: @ 8033AA4 EmitBallThrow: @ 8033AA4
push {lr} push {lr}
adds r3, r1, 0 adds r3, r1, 0
lsls r0, 24 lsls r0, 24
@ -2424,7 +2424,7 @@ dp01_build_cmdbuf_x0D_a: @ 8033AA4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x0D_a thumb_func_end EmitBallThrow
thumb_func_start sub_8033AC4 thumb_func_start sub_8033AC4
sub_8033AC4: @ 8033AC4 sub_8033AC4: @ 8033AC4
@ -2465,8 +2465,8 @@ _08033AF2:
.pool .pool
thumb_func_end sub_8033AC4 thumb_func_end sub_8033AC4
thumb_func_start dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes thumb_func_start EmitMoveAnimation
dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes: @ 8033B0C EmitMoveAnimation: @ 8033B0C
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r9 mov r7, r9
mov r6, r8 mov r6, r8
@ -2568,7 +2568,7 @@ _08033BB6:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes thumb_func_end EmitMoveAnimation
thumb_func_start dp01_build_cmdbuf_x10_TODO thumb_func_start dp01_build_cmdbuf_x10_TODO
dp01_build_cmdbuf_x10_TODO: @ 8033BE4 dp01_build_cmdbuf_x10_TODO: @ 8033BE4
@ -2596,7 +2596,7 @@ dp01_build_cmdbuf_x10_TODO: @ 8033BE4
ldr r4, =gCurrentMove ldr r4, =gCurrentMove
ldrh r0, [r4] ldrh r0, [r4]
strh r0, [r2, 0x4] strh r0, [r2, 0x4]
ldr r0, =gUnknown_020241EC ldr r0, =gLastUsedMove
ldrh r0, [r0] ldrh r0, [r0]
mov r1, r12 mov r1, r12
strh r0, [r1, 0x2] strh r0, [r1, 0x2]
@ -2687,8 +2687,8 @@ _08033C88:
.pool .pool
thumb_func_end dp01_build_cmdbuf_x10_TODO thumb_func_end dp01_build_cmdbuf_x10_TODO
thumb_func_start dp01_build_cmdbuf_x11_TODO thumb_func_start EmitPrintStringPlayerOnly
dp01_build_cmdbuf_x11_TODO: @ 8033CFC EmitPrintStringPlayerOnly: @ 8033CFC
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@ -2711,7 +2711,7 @@ dp01_build_cmdbuf_x11_TODO: @ 8033CFC
ldr r0, =gCurrentMove ldr r0, =gCurrentMove
ldrh r0, [r0] ldrh r0, [r0]
strh r0, [r2, 0x4] strh r0, [r2, 0x4]
ldr r0, =gUnknown_020241EC ldr r0, =gLastUsedMove
ldrh r0, [r0] ldrh r0, [r0]
mov r1, r12 mov r1, r12
strh r0, [r1, 0x2] strh r0, [r1, 0x2]
@ -2784,7 +2784,7 @@ _08033D7C:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x11_TODO thumb_func_end EmitPrintStringPlayerOnly
thumb_func_start dp01_build_cmdbuf_x12_a_bb thumb_func_start dp01_build_cmdbuf_x12_a_bb
dp01_build_cmdbuf_x12_a_bb: @ 8033DE4 dp01_build_cmdbuf_x12_a_bb: @ 8033DE4
@ -2809,8 +2809,8 @@ dp01_build_cmdbuf_x12_a_bb: @ 8033DE4
.pool .pool
thumb_func_end dp01_build_cmdbuf_x12_a_bb thumb_func_end dp01_build_cmdbuf_x12_a_bb
thumb_func_start sub_8033E10 thumb_func_start EmitCmd13
sub_8033E10: @ 8033E10 EmitCmd13: @ 8033E10
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -2825,7 +2825,7 @@ sub_8033E10: @ 8033E10
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_8033E10 thumb_func_end EmitCmd13
thumb_func_start sub_8033E30 thumb_func_start sub_8033E30
sub_8033E30: @ 8033E30 sub_8033E30: @ 8033E30
@ -2888,8 +2888,8 @@ _08033E7E:
.pool .pool
thumb_func_end sub_8033E6C thumb_func_end sub_8033E6C
thumb_func_start dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f thumb_func_start EmitChoosePokemon
dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f: @ 8033EA0 EmitChoosePokemon: @ 8033EA0
push {r4-r6,lr} push {r4-r6,lr}
ldr r6, [sp, 0x10] ldr r6, [sp, 0x10]
lsls r0, 24 lsls r0, 24
@ -2918,7 +2918,7 @@ _08033EBA:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f thumb_func_end EmitChoosePokemon
thumb_func_start dp01_build_cmdbuf_x17_17_17_17 thumb_func_start dp01_build_cmdbuf_x17_17_17_17
dp01_build_cmdbuf_x17_17_17_17: @ 8033EDC dp01_build_cmdbuf_x17_17_17_17: @ 8033EDC
@ -2938,8 +2938,8 @@ dp01_build_cmdbuf_x17_17_17_17: @ 8033EDC
.pool .pool
thumb_func_end dp01_build_cmdbuf_x17_17_17_17 thumb_func_end dp01_build_cmdbuf_x17_17_17_17
thumb_func_start dp01_build_cmdbuf_x18_0_aa_health_bar_update thumb_func_start EmitHealthBarUpdate
dp01_build_cmdbuf_x18_0_aa_health_bar_update: @ 8033EFC EmitHealthBarUpdate: @ 8033EFC
push {r4,lr} push {r4,lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -2965,10 +2965,10 @@ dp01_build_cmdbuf_x18_0_aa_health_bar_update: @ 8033EFC
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x18_0_aa_health_bar_update thumb_func_end EmitHealthBarUpdate
thumb_func_start dp01_build_cmdbuf_x19_a_bb thumb_func_start EmitExpUpdate
dp01_build_cmdbuf_x19_a_bb: @ 8033F34 EmitExpUpdate: @ 8033F34
push {r4,lr} push {r4,lr}
adds r4, r1, 0 adds r4, r1, 0
lsls r0, 24 lsls r0, 24
@ -2993,10 +2993,10 @@ dp01_build_cmdbuf_x19_a_bb: @ 8033F34
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x19_a_bb thumb_func_end EmitExpUpdate
thumb_func_start dp01_build_cmdbuf_x1A_aaaa_bbbb thumb_func_start EmitStatusIconUpdate
dp01_build_cmdbuf_x1A_aaaa_bbbb: @ 8033F68 EmitStatusIconUpdate: @ 8033F68
push {r4-r6,lr} push {r4-r6,lr}
adds r4, r1, 0 adds r4, r1, 0
lsls r0, 24 lsls r0, 24
@ -3036,10 +3036,10 @@ dp01_build_cmdbuf_x1A_aaaa_bbbb: @ 8033F68
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x1A_aaaa_bbbb thumb_func_end EmitStatusIconUpdate
thumb_func_start dp01_build_cmdbuf_x1B_aaaa_b thumb_func_start EmitStatusAnimation
dp01_build_cmdbuf_x1B_aaaa_b: @ 8033FBC EmitStatusAnimation: @ 8033FBC
push {r4,lr} push {r4,lr}
adds r4, r1, 0 adds r4, r1, 0
lsls r0, 24 lsls r0, 24
@ -3067,7 +3067,7 @@ dp01_build_cmdbuf_x1B_aaaa_b: @ 8033FBC
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x1B_aaaa_b thumb_func_end EmitStatusAnimation
thumb_func_start dp01_build_cmdbuf_x1C_a thumb_func_start dp01_build_cmdbuf_x1C_a
dp01_build_cmdbuf_x1C_a: @ 8033FF8 dp01_build_cmdbuf_x1C_a: @ 8033FF8
@ -3431,8 +3431,8 @@ dp01_build_cmdbuf_x28_28_28_28: @ 8034274
.pool .pool
thumb_func_end dp01_build_cmdbuf_x28_28_28_28 thumb_func_end dp01_build_cmdbuf_x28_28_28_28
thumb_func_start dp01_build_cmdbuf_x29_29_29_29 thumb_func_start EmitHitAnimation
dp01_build_cmdbuf_x29_29_29_29: @ 8034294 EmitHitAnimation: @ 8034294
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -3447,10 +3447,10 @@ dp01_build_cmdbuf_x29_29_29_29: @ 8034294
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x29_29_29_29 thumb_func_end EmitHitAnimation
thumb_func_start dp01_build_cmdbuf_x2A_2A_2A_2A thumb_func_start Emit_x2A
dp01_build_cmdbuf_x2A_2A_2A_2A: @ 80342B4 Emit_x2A: @ 80342B4
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -3465,10 +3465,10 @@ dp01_build_cmdbuf_x2A_2A_2A_2A: @ 80342B4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x2A_2A_2A_2A thumb_func_end Emit_x2A
thumb_func_start dp01_build_cmdbuf_x2B_aa_0 thumb_func_start EmitEffectivenessSound
dp01_build_cmdbuf_x2B_aa_0: @ 80342D4 EmitEffectivenessSound: @ 80342D4
push {r4,lr} push {r4,lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -3489,10 +3489,10 @@ dp01_build_cmdbuf_x2B_aa_0: @ 80342D4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x2B_aa_0 thumb_func_end EmitEffectivenessSound
thumb_func_start sub_8034300 thumb_func_start EmitPlaySound
sub_8034300: @ 8034300 EmitPlaySound: @ 8034300
push {r4,lr} push {r4,lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -3512,10 +3512,10 @@ sub_8034300: @ 8034300
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_8034300 thumb_func_end EmitPlaySound
thumb_func_start dp01_build_cmdbuf_x2D_2D_2D_2D thumb_func_start EmitFaintingCry
dp01_build_cmdbuf_x2D_2D_2D_2D: @ 803432C EmitFaintingCry: @ 803432C
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -3530,7 +3530,7 @@ dp01_build_cmdbuf_x2D_2D_2D_2D: @ 803432C
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x2D_2D_2D_2D thumb_func_end EmitFaintingCry
thumb_func_start dp01_build_cmdbuf_x2E_a thumb_func_start dp01_build_cmdbuf_x2E_a
dp01_build_cmdbuf_x2E_a: @ 803434C dp01_build_cmdbuf_x2E_a: @ 803434C
@ -3567,8 +3567,8 @@ dp01_build_cmdbuf_x2F_2F_2F_2F: @ 803436C
.pool .pool
thumb_func_end dp01_build_cmdbuf_x2F_2F_2F_2F thumb_func_end dp01_build_cmdbuf_x2F_2F_2F_2F
thumb_func_start dp01_build_cmdbuf_x30_TODO thumb_func_start EmitCmd48
dp01_build_cmdbuf_x30_TODO: @ 803438C EmitCmd48: @ 803438C
push {r4,r5,lr} push {r4,r5,lr}
adds r4, r1, 0 adds r4, r1, 0
lsls r0, 24 lsls r0, 24
@ -3604,10 +3604,10 @@ _080343B4:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x30_TODO thumb_func_end EmitCmd48
thumb_func_start dp01_build_cmdbuf_x31_31_31_31 thumb_func_start EmitCmd49
dp01_build_cmdbuf_x31_31_31_31: @ 80343D4 EmitCmd49: @ 80343D4
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -3622,7 +3622,7 @@ dp01_build_cmdbuf_x31_31_31_31: @ 80343D4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x31_31_31_31 thumb_func_end EmitCmd49
thumb_func_start dp01_build_cmdbuf_x32_32_32_32 thumb_func_start dp01_build_cmdbuf_x32_32_32_32
dp01_build_cmdbuf_x32_32_32_32: @ 80343F4 dp01_build_cmdbuf_x32_32_32_32: @ 80343F4
@ -3642,8 +3642,8 @@ dp01_build_cmdbuf_x32_32_32_32: @ 80343F4
.pool .pool
thumb_func_end dp01_build_cmdbuf_x32_32_32_32 thumb_func_end dp01_build_cmdbuf_x32_32_32_32
thumb_func_start dp01_build_cmdbuf_x33_a_33_33 thumb_func_start EmitSpriteInvisibility
dp01_build_cmdbuf_x33_a_33_33: @ 8034414 EmitSpriteInvisibility: @ 8034414
push {lr} push {lr}
adds r3, r1, 0 adds r3, r1, 0
lsls r0, 24 lsls r0, 24
@ -3659,10 +3659,10 @@ dp01_build_cmdbuf_x33_a_33_33: @ 8034414
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x33_a_33_33 thumb_func_end EmitSpriteInvisibility
thumb_func_start dp01_build_cmdbuf_x34_a_bb_aka_battle_anim thumb_func_start EmitBattleAnimation
dp01_build_cmdbuf_x34_a_bb_aka_battle_anim: @ 8034438 EmitBattleAnimation: @ 8034438
push {r4,lr} push {r4,lr}
adds r4, r1, 0 adds r4, r1, 0
lsls r0, 24 lsls r0, 24
@ -3682,10 +3682,10 @@ dp01_build_cmdbuf_x34_a_bb_aka_battle_anim: @ 8034438
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x34_a_bb_aka_battle_anim thumb_func_end EmitBattleAnimation
thumb_func_start sub_8034464 thumb_func_start EmitLinkStandbyMsg
sub_8034464: @ 8034464 EmitLinkStandbyMsg: @ 8034464
push {r4,r5,lr} push {r4,r5,lr}
lsls r0, 24 lsls r0, 24
lsrs r5, r0, 24 lsrs r5, r0, 24
@ -3716,10 +3716,10 @@ _08034490:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_8034464 thumb_func_end EmitLinkStandbyMsg
thumb_func_start dp01_build_cmdbuf_x38_a thumb_func_start EmitResetActionMoveSelection
dp01_build_cmdbuf_x38_a: @ 80344A8 EmitResetActionMoveSelection: @ 80344A8
push {lr} push {lr}
adds r3, r1, 0 adds r3, r1, 0
lsls r0, 24 lsls r0, 24
@ -3733,10 +3733,10 @@ dp01_build_cmdbuf_x38_a: @ 80344A8
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x38_a thumb_func_end EmitResetActionMoveSelection
thumb_func_start dp01_build_cmdbuf_x37_a thumb_func_start Emit_x37
dp01_build_cmdbuf_x37_a: @ 80344C8 Emit_x37: @ 80344C8
push {r4,r5,lr} push {r4,r5,lr}
adds r5, r0, 0 adds r5, r0, 0
lsls r5, 24 lsls r5, 24
@ -3770,6 +3770,6 @@ dp01_build_cmdbuf_x37_a: @ 80344C8
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end dp01_build_cmdbuf_x37_a thumb_func_end Emit_x37
.align 2, 0 @ Don't pad with nop. .align 2, 0 @ Don't pad with nop.

View File

@ -1830,8 +1830,8 @@ GetBankIdentity: @ 80A6A44
.pool .pool
thumb_func_end GetBankIdentity thumb_func_end GetBankIdentity
thumb_func_start GetBankByPlayerAI thumb_func_start GetBankByIdentity
GetBankByPlayerAI: @ 80A6A54 GetBankByIdentity: @ 80A6A54
push {r4,lr} push {r4,lr}
lsls r0, 24 lsls r0, 24
lsrs r3, r0, 24 lsrs r3, r0, 24
@ -1860,7 +1860,7 @@ _080A6A7E:
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end GetBankByPlayerAI thumb_func_end GetBankByIdentity
thumb_func_start sub_80A6A90 thumb_func_start sub_80A6A90
sub_80A6A90: @ 80A6A90 sub_80A6A90: @ 80A6A90
@ -3496,7 +3496,7 @@ _080A76F2:
cmp r5, 0 cmp r5, 0
beq _080A771A beq _080A771A
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl b_side_obj__get_some_boolean bl b_side_obj__get_some_boolean
@ -3504,7 +3504,7 @@ _080A76F2:
cmp r0, 0 cmp r0, 0
beq _080A771A beq _080A771A
movs r0, 0 movs r0, 0
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
adds r0, 0x10 adds r0, 0x10
@ -3514,7 +3514,7 @@ _080A771A:
cmp r6, 0 cmp r6, 0
beq _080A7746 beq _080A7746
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl b_side_obj__get_some_boolean bl b_side_obj__get_some_boolean
@ -3522,7 +3522,7 @@ _080A771A:
cmp r0, 0 cmp r0, 0
beq _080A7746 beq _080A7746
movs r0, 0x2 movs r0, 0x2
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
adds r1, r0, 0 adds r1, r0, 0
@ -3534,7 +3534,7 @@ _080A7746:
cmp r7, 0 cmp r7, 0
beq _080A7772 beq _080A7772
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl b_side_obj__get_some_boolean bl b_side_obj__get_some_boolean
@ -3542,7 +3542,7 @@ _080A7746:
cmp r0, 0 cmp r0, 0
beq _080A7772 beq _080A7772
movs r0, 0x1 movs r0, 0x1
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
adds r1, r0, 0 adds r1, r0, 0
@ -3555,7 +3555,7 @@ _080A7772:
cmp r0, 0 cmp r0, 0
beq _080A77A0 beq _080A77A0
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl b_side_obj__get_some_boolean bl b_side_obj__get_some_boolean
@ -3563,7 +3563,7 @@ _080A7772:
cmp r0, 0 cmp r0, 0
beq _080A77A0 beq _080A77A0
movs r0, 0x3 movs r0, 0x3
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
adds r1, r0, 0 adds r1, r0, 0
@ -3592,7 +3592,7 @@ sub_80A77B4: @ 80A77B4
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl GetBankByPlayerAI bl GetBankByIdentity
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
pop {r1} pop {r1}

View File

@ -4183,7 +4183,7 @@ sC6_load_textvar_box_label: @ 809B2C8
ldr r4, [r4] ldr r4, [r4]
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
bl sav3_get_box_name bl GetBoxNamePtr
adds r1, r0, 0 adds r1, r0, 0
adds r0, r4, 0 adds r0, r4, 0
bl StringCopy bl StringCopy

View File

@ -468,7 +468,7 @@ title_screen_vblank_callback: @ 80AA780
bl LoadOam bl LoadOam
bl ProcessSpriteCopyRequests bl ProcessSpriteCopyRequests
bl TransferPlttBuffer bl TransferPlttBuffer
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
ldrh r1, [r0] ldrh r1, [r0]
movs r0, 0x16 movs r0, 0x16
bl SetGpuReg bl SetGpuReg
@ -1156,14 +1156,14 @@ _080AAE30:
ldrh r0, [r3, 0x10] ldrh r0, [r3, 0x10]
adds r0, 0x1 adds r0, 0x1
strh r0, [r3, 0x10] strh r0, [r3, 0x10]
ldr r2, =gUnknown_02022E1A ldr r2, =gBattle_BG1_Y
movs r1, 0x10 movs r1, 0x10
ldrsh r0, [r3, r1] ldrsh r0, [r3, r1]
lsrs r1, r0, 31 lsrs r1, r0, 31
adds r0, r1 adds r0, r1
asrs r0, 1 asrs r0, 1
strh r0, [r2] strh r0, [r2]
ldr r1, =gUnknown_02022E18 ldr r1, =gBattle_BG1_X
movs r0, 0 movs r0, 0
strh r0, [r1] strh r0, [r1]
_080AAE72: _080AAE72:

View File

@ -275,23 +275,23 @@ _080BA21C:
b _080BA24E b _080BA24E
.pool .pool
_080BA224: _080BA224:
ldr r0, =gUnknown_02022E18 ldr r0, =gBattle_BG1_X
b _080BA24E b _080BA24E
.pool .pool
_080BA22C: _080BA22C:
ldr r0, =gUnknown_02022E1A ldr r0, =gBattle_BG1_Y
b _080BA24E b _080BA24E
.pool .pool
_080BA234: _080BA234:
ldr r0, =gUnknown_02022E1C ldr r0, =gBattle_BG2_X
b _080BA24E b _080BA24E
.pool .pool
_080BA23C: _080BA23C:
ldr r0, =gUnknown_02022E1E ldr r0, =gBattle_BG2_Y
b _080BA24E b _080BA24E
.pool .pool
_080BA244: _080BA244:
ldr r0, =gUnknown_02022E20 ldr r0, =gBattle_BG3_X
b _080BA24E b _080BA24E
.pool .pool
_080BA24C: _080BA24C:

View File

@ -1,134 +0,0 @@
@ the second big chunk of data
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gMoveEffectBS_Ptrs:: @ 831C224
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB386
.4byte gUnknown_082DB395
.4byte gUnknown_082DB3A4
.4byte gUnknown_082DB3B3
.4byte gUnknown_082DB3C9
.4byte gUnknown_082DB3E6
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB3C2
.4byte gUnknown_082DB3D6
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB3DD
.4byte gUnknown_082DB3F4
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB36A
.4byte gUnknown_082DB3F4
.align 2
window_template 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x003f
.align 2
gUnknown_0831C2C8:: @ 831C2C8
.incbin "graphics/battle_interface/unk_battlebox.gbapal"
.align 2
gUnknown_0831C2E8:: @ 831C2E8
.incbin "graphics/battle_interface/unk_battlebox.4bpp.lz"
.align 2
.byte 0x3A, 0x3E, 0x3B, 0x3F, 0x3C, 0x3D, 0x00, 0x00
.align 2
gUnknown_0831C3B8:: @ 831C3B8
.byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00
.align 2
gUnknown_0831C3C0:: @ 831C3C0
spr_template 0xd75a, 0xd75a, gUnknown_0831C3B8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_804F450
.align 2
sProtectSuccessRates:: @ 831C3D8
.2byte 0xffff, 0x7fff, 0x3fff, 0x1fff
.align 2
gUnknown_0831C3E0:: @ 831C3E0
.2byte MOVE_METRONOME, MOVE_STRUGGLE, MOVE_SKETCH, MOVE_MIMIC
.2byte 0xfffe, MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_PROTECT
.2byte MOVE_DETECT, MOVE_ENDURE, MOVE_DESTINY_BOND, MOVE_SLEEP_TALK
.2byte MOVE_THIEF, MOVE_FOLLOW_ME, MOVE_SNATCH, MOVE_HELPING_HAND
.2byte MOVE_COVET, MOVE_TRICK, MOVE_FOCUS_PUNCH, 0xffff
.align 2
gUnknown_0831C408:: @ 831C408
.byte 0x01, 0xc8, 0x04, 0x96, 0x09, 0x64, 0x10, 0x50
.byte 0x20, 0x28, 0x30, 0x14
.align 2
gUnknown_0831C414:: @ 831C414
.2byte 0x004e, 0x004b, 0x0059, 0x0038
.2byte 0x0039, 0x003d, 0x009d, 0x00f7
.2byte 0x0081, 0x0081
.align 2
gUnknown_0831C428:: @ 831C428
.2byte 0x0064, 0x0014, 0x00fa, 0x0028
.2byte 0x01f4, 0x003c, 0x03e8, 0x0050
.2byte 0x07d0, 0x0064, 0xffff, 0xffff
.align 2
@ 831C440
.include "data/pickup_items.inc"
sTerrainToType:: @ 831C483
.byte 0x0c, 0x0c, 0x04, 0x0b, 0x0b, 0x0b, 0x05, 0x05
.byte 0x00, 0x00
sBallCatchBonuses:: @ 831C48D
.byte 0x14, 0x0f, 0x0a, 0x0f, 0x00, 0x00, 0x00
.align 2
gUnknown_0831C494:: @ 831C494
.byte 0x3d, 0x44, 0x3d, 0x44, 0x14, 0x2d, 0x54, 0x5c
.byte 0x46, 0x55, 0x20, 0x5c, 0x26, 0x45, 0x46, 0x55
.byte 0x14, 0x5a, 0x46, 0x5c, 0x1e, 0x32, 0x20, 0x5a
.byte 0x38, 0x4e, 0x38, 0x4e, 0x19, 0x28, 0x4b, 0x5a
.byte 0x45, 0x4b, 0x1c, 0x53, 0x23, 0x2d, 0x1d, 0x23
.byte 0x3e, 0x48, 0x1e, 0x32, 0x3a, 0x5f, 0x58, 0x5e
.byte 0x22, 0x2d, 0x1d, 0x28, 0x23, 0x28, 0x23, 0x5f
.byte 0x38, 0x4e, 0x38, 0x4e, 0x23, 0x50, 0x22, 0x5e
.byte 0x2c, 0x5e, 0x22, 0x28, 0x38, 0x4e, 0x38, 0x4e
.byte 0x1e, 0x58, 0x1e, 0x58, 0x1e, 0x2b, 0x1b, 0x21
.byte 0x28, 0x5a, 0x19, 0x57, 0x12, 0x58, 0x5a, 0x5f
.byte 0x58, 0x5e, 0x16, 0x2a, 0x2a, 0x5c, 0x2a, 0x2f
.byte 0x38, 0x4e, 0x38, 0x4e
.align 2
gUnknown_0831C4F8:: @ 831C4F8
.byte 0x03, 0x00, 0x01, 0x00, 0x00, 0x01, 0x03, 0x00
.byte 0x01, 0x02, 0x02, 0x00, 0x03, 0x01, 0x03, 0x01
.byte 0x02, 0x03, 0x03, 0x02, 0x01, 0x00, 0x02, 0x02
.byte 0x03, 0x00, 0x00, 0x00

View File

@ -1659,8 +1659,11 @@ gBattleStringsTable:: @ 85CC270
.4byte gText_String49 .4byte gText_String49
.align 2 .align 2
gUnknown_085CC834:: @ 85CC834 gMissStringIds:: @ 85CC834
.2byte 0x0017, 0x0018, 0x0159, 0x001a, 0x014c, 0x00e2, 0x00e3, 0x0021 .2byte 0x0017, 0x0018, 0x0159, 0x001a, 0x014c
gUnknown_085CC83E:: @ 85CC83E
.2byte 0x00e2, 0x00e3, 0x0021
.2byte 0x0112, 0x0165, 0x00e8, 0x00e9, 0x00e5, 0x00ed, 0x00f0, 0x00f3 .2byte 0x0112, 0x0165, 0x00e8, 0x00e9, 0x00e5, 0x00ed, 0x00f0, 0x00f3
.2byte 0x00ee, 0x00f4, 0x0066, 0x0067, 0x00ef, 0x00f5, 0x00ea, 0x00eb .2byte 0x00ee, 0x00f4, 0x0066, 0x0067, 0x00ef, 0x00f5, 0x00ea, 0x00eb
.2byte 0x00ec, 0x0065, 0x0098, 0x00e5, 0x00e5, 0x004e, 0x0160, 0x004d .2byte 0x00ec, 0x0065, 0x0098, 0x00e5, 0x00e5, 0x004e, 0x0160, 0x004d
@ -1682,8 +1685,8 @@ gUnknown_085CC834:: @ 85CC834
.2byte 0x00c7, 0x0163, 0x016a, 0x00c9, 0x0163, 0x016a, 0x0166, 0x0167 .2byte 0x00c7, 0x0163, 0x016a, 0x00c9, 0x0163, 0x016a, 0x0166, 0x0167
.2byte 0x0168, 0x00cb, 0x0137, 0x0177, 0x0178, 0x0179, 0x017a .2byte 0x0168, 0x00cb, 0x0137, 0x0177, 0x0178, 0x0179, 0x017a
gUnknown_085CC982:: @ 85CC982 gTrappingMoves:: @ 85CC982
.2byte 0x0014, 0x0023, 0x0053, 0x0080, 0x00fa, 0x0148, 0xffff .2byte MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, 0xffff
gText_PkmnIsEvolving:: @ 85CC990 gText_PkmnIsEvolving:: @ 85CC990
.string "What?\n{STR_VAR_1} is evolving!$" .string "What?\n{STR_VAR_1} is evolving!$"

View File

@ -3,40 +3,40 @@
.section script_data, "aw", %progbits .section script_data, "aw", %progbits
gUnknown_082D86A8:: @ 82D86A8 gBattleScriptsForMoveEffects:: @ 82D86A8
.incbin "baserom.gba", 0x2d86a8, 0x388 .incbin "baserom.gba", 0x2d86a8, 0x388
gUnknown_082D8A30:: @ 82D8A30 BattleScript_PresentDamageTarget:: @ 82D8A30
.incbin "baserom.gba", 0x2d8a30, 0x1e .incbin "baserom.gba", 0x2d8a30, 0x1e
gUnknown_082D8A4E:: @ 82D8A4E BattleScript_MoveEnd:: @ 82D8A4E
.incbin "baserom.gba", 0x2d8a4e, 0x12 .incbin "baserom.gba", 0x2d8a4e, 0x12
gUnknown_082D8A60:: @ 82D8A60 BattleScript_PauseEffectivenessSoundResultMsgEndMove:: @ 82D8A60
.incbin "baserom.gba", 0x2d8a60, 0x274 .incbin "baserom.gba", 0x2d8a60, 0x274
gUnknown_082D8CD4:: @ 82D8CD4 BattleScript_StatUp:: @ 82D8CD4
.incbin "baserom.gba", 0x2d8cd4, 0x91 .incbin "baserom.gba", 0x2d8cd4, 0x91
gUnknown_082D8D65:: @ 82D8D65 BattleScript_StatDown:: @ 82D8D65
.incbin "baserom.gba", 0x2d8d65, 0x6fd .incbin "baserom.gba", 0x2d8d65, 0x6fd
BattleScript_MoveUsedMustRecharge:: @ 82D9462 BattleScript_MoveUsedMustRecharge:: @ 82D9462
.incbin "baserom.gba", 0x2d9462, 0xa7f .incbin "baserom.gba", 0x2d9462, 0xa7f
gUnknown_082D9EE1:: @ 82D9EE1 BattleScript_PresentHealTarget:: @ 82D9EE1
.incbin "baserom.gba", 0x2d9ee1, 0x1a .incbin "baserom.gba", 0x2d9ee1, 0x1a
gUnknown_082D9EFB:: @ 82D9EFB BattleScript_AlreadyAtFullHp:: @ 82D9EFB
.incbin "baserom.gba", 0x2d9efb, 0x21 .incbin "baserom.gba", 0x2d9efb, 0x21
gUnknown_082D9F1C:: @ 82D9F1C BattleScript_ButItFailed:: @ 82D9F1C
.incbin "baserom.gba", 0x2d9f1c, 0x88e .incbin "baserom.gba", 0x2d9f1c, 0x88e
gUnknown_082DA7AA:: @ 82DA7AA BattleScript_FaintAttacker:: @ 82DA7AA
.incbin "baserom.gba", 0x2da7aa, 0xd .incbin "baserom.gba", 0x2da7aa, 0xd
gUnknown_082DA7B7:: @ 82DA7B7 BattleScript_FaintTarget:: @ 82DA7B7
.incbin "baserom.gba", 0x2da7b7, 0xd .incbin "baserom.gba", 0x2da7b7, 0xd
gUnknown_082DA7C4:: @ 82DA7C4 gUnknown_082DA7C4:: @ 82DA7C4
@ -90,10 +90,10 @@ gUnknown_082DAB11:: @ 82DAB11
gUnknown_082DAB15:: @ 82DAB15 gUnknown_082DAB15:: @ 82DAB15
.incbin "baserom.gba", 0x2dab15, 0xa4 .incbin "baserom.gba", 0x2dab15, 0xa4
gUnknown_082DABB9:: @ 82DABB9 BattleScript_Pausex20:: @ 82DABB9
.incbin "baserom.gba", 0x2dabb9, 0x4 .incbin "baserom.gba", 0x2dabb9, 0x4
gUnknown_082DABBD:: @ 82DABBD BattleScript_LevelUp:: @ 82DABBD
.incbin "baserom.gba", 0x2dabbd, 0x6f .incbin "baserom.gba", 0x2dabbd, 0x6f
gUnknown_082DAC2C:: @ 82DAC2C gUnknown_082DAC2C:: @ 82DAC2C
@ -135,10 +135,10 @@ BattleScript_BideNoEnergyToAttack:: @ 82DADC4
gUnknown_082DADD8:: @ 82DADD8 gUnknown_082DADD8:: @ 82DADD8
.incbin "baserom.gba", 0x2dadd8, 0x2b .incbin "baserom.gba", 0x2dadd8, 0x2b
gUnknown_082DAE03:: @ 82DAE03 BattleScript_MistProtected:: @ 82DAE03
.incbin "baserom.gba", 0x2dae03, 0xa .incbin "baserom.gba", 0x2dae03, 0xa
gUnknown_082DAE0D:: @ 82DAE0D BattleScript_RageIsBuilding:: @ 82DAE0D
.incbin "baserom.gba", 0x2dae0d, 0x7 .incbin "baserom.gba", 0x2dae0d, 0x7
BattleScript_MoveUsedIsDisabled:: @ 82DAE14 BattleScript_MoveUsedIsDisabled:: @ 82DAE14
@ -156,7 +156,7 @@ gUnknown_082DAE2A:: @ 82DAE2A
BattleScript_EncoredNoMore:: @ 82DAE37 BattleScript_EncoredNoMore:: @ 82DAE37
.incbin "baserom.gba", 0x2dae37, 0x7 .incbin "baserom.gba", 0x2dae37, 0x7
gUnknown_082DAE3E:: @ 82DAE3E BattleScript_DestinyBondTakesLife:: @ 82DAE3E
.incbin "baserom.gba", 0x2dae3e, 0x1b .incbin "baserom.gba", 0x2dae3e, 0x1b
gUnknown_082DAE59:: @ 82DAE59 gUnknown_082DAE59:: @ 82DAE59
@ -174,19 +174,19 @@ gUnknown_082DAF05:: @ 82DAF05
gUnknown_082DAF20:: @ 82DAF20 gUnknown_082DAF20:: @ 82DAF20
.incbin "baserom.gba", 0x2daf20, 0x7 .incbin "baserom.gba", 0x2daf20, 0x7
gUnknown_082DAF27:: @ 82DAF27 BattleScript_AllStatsUp:: @ 82DAF27
.incbin "baserom.gba", 0x2daf27, 0x9c .incbin "baserom.gba", 0x2daf27, 0x9c
gUnknown_082DAFC3:: @ 82DAFC3 BattleScript_RapidSpinAway:: @ 82DAFC3
.incbin "baserom.gba", 0x2dafc3, 0x2 .incbin "baserom.gba", 0x2dafc3, 0x2
gUnknown_082DAFC5:: @ 82DAFC5 BattleScript_WrapFree:: @ 82DAFC5
.incbin "baserom.gba", 0x2dafc5, 0x11 .incbin "baserom.gba", 0x2dafc5, 0x11
gUnknown_082DAFD6:: @ 82DAFD6 BattleScript_LeechSeedFree:: @ 82DAFD6
.incbin "baserom.gba", 0x2dafd6, 0x7 .incbin "baserom.gba", 0x2dafd6, 0x7
gUnknown_082DAFDD:: @ 82DAFDD BattleScript_SpikesFree:: @ 82DAFDD
.incbin "baserom.gba", 0x2dafdd, 0x7 .incbin "baserom.gba", 0x2dafdd, 0x7
gUnknown_082DAFE4:: @ 82DAFE4 gUnknown_082DAFE4:: @ 82DAFE4
@ -198,7 +198,7 @@ BattleScript_NoMovesLeft:: @ 82DB072
gUnknown_082DB076:: @ 82DB076 gUnknown_082DB076:: @ 82DB076
.incbin "baserom.gba", 0x2db076, 0x4 .incbin "baserom.gba", 0x2db076, 0x4
gUnknown_082DB07A:: @ 82DB07A BattleScript_NoPPForMove:: @ 82DB07A
.incbin "baserom.gba", 0x2db07a, 0xf .incbin "baserom.gba", 0x2db07a, 0xf
gUnknown_082DB089:: @ 82DB089 gUnknown_082DB089:: @ 82DB089
@ -222,10 +222,10 @@ BattleScript_WishComesTrue:: @ 82DB0B7
BattleScript_IngrainTurnHeal:: @ 82DB0EE BattleScript_IngrainTurnHeal:: @ 82DB0EE
.incbin "baserom.gba", 0x2db0ee, 0x29 .incbin "baserom.gba", 0x2db0ee, 0x29
gUnknown_082DB117:: @ 82DB117 BattleScript_AtkDefDown:: @ 82DB117
.incbin "baserom.gba", 0x2db117, 0x51 .incbin "baserom.gba", 0x2db117, 0x51
gUnknown_082DB168:: @ 82DB168 BattleScript_KnockedOff:: @ 82DB168
.incbin "baserom.gba", 0x2db168, 0xe .incbin "baserom.gba", 0x2db168, 0xe
BattleScript_MoveUsedIsImprisoned:: @ 82DB176 BattleScript_MoveUsedIsImprisoned:: @ 82DB176
@ -237,22 +237,22 @@ gUnknown_082DB181:: @ 82DB181
gUnknown_082DB185:: @ 82DB185 gUnknown_082DB185:: @ 82DB185
.incbin "baserom.gba", 0x2db185, 0x8 .incbin "baserom.gba", 0x2db185, 0x8
gUnknown_082DB18D:: @ 82DB18D BattleScript_GrudgeTakesPp:: @ 82DB18D
.incbin "baserom.gba", 0x2db18d, 0x7 .incbin "baserom.gba", 0x2db18d, 0x7
gUnknown_082DB194:: @ 82DB194 BattleScript_MagicCoatBounce:: @ 82DB194
.incbin "baserom.gba", 0x2db194, 0x18 .incbin "baserom.gba", 0x2db194, 0x18
gUnknown_082DB1AC:: @ 82DB1AC BattleScript_SnatchedMove:: @ 82DB1AC
.incbin "baserom.gba", 0x2db1ac, 0x1b .incbin "baserom.gba", 0x2db1ac, 0x1b
gUnknown_082DB1C7:: @ 82DB1C7 BattleScript_EnduredMsg:: @ 82DB1C7
.incbin "baserom.gba", 0x2db1c7, 0x7 .incbin "baserom.gba", 0x2db1c7, 0x7
gUnknown_082DB1CE:: @ 82DB1CE BattleScript_OneHitKOMsg:: @ 82DB1CE
.incbin "baserom.gba", 0x2db1ce, 0x7 .incbin "baserom.gba", 0x2db1ce, 0x7
gUnknown_082DB1D5:: @ 82DB1D5 BattleScript_SAtkDown2:: @ 82DB1D5
.incbin "baserom.gba", 0x2db1d5, 0x2a .incbin "baserom.gba", 0x2db1d5, 0x2a
gUnknown_082DB1FF:: @ 82DB1FF gUnknown_082DB1FF:: @ 82DB1FF
@ -279,7 +279,7 @@ BattleScript_MoveUsedIsFrozen:: @ 82DB26A
BattleScript_MoveUsedUnfroze:: @ 82DB277 BattleScript_MoveUsedUnfroze:: @ 82DB277
.incbin "baserom.gba", 0x2db277, 0xb .incbin "baserom.gba", 0x2db277, 0xb
gUnknown_082DB282:: @ 82DB282 BattleScript_DefrostedViaFireMove:: @ 82DB282
.incbin "baserom.gba", 0x2db282, 0x9 .incbin "baserom.gba", 0x2db282, 0x9
BattleScript_MoveUsedIsParalyzed:: @ 82DB28B BattleScript_MoveUsedIsParalyzed:: @ 82DB28B
@ -300,7 +300,7 @@ BattleScript_MoveUsedIsConfused:: @ 82DB2BD
BattleScript_MoveUsedIsConfusedNoMore:: @ 82DB300 BattleScript_MoveUsedIsConfusedNoMore:: @ 82DB300
.incbin "baserom.gba", 0x2db300, 0x7 .incbin "baserom.gba", 0x2db300, 0x7
gUnknown_082DB307:: @ 82DB307 BattleScript_PrintPayDayMoneyString:: @ 82DB307
.incbin "baserom.gba", 0x2db307, 0x7 .incbin "baserom.gba", 0x2db307, 0x7
BattleScript_WrapTurnDmg:: @ 82DB30E BattleScript_WrapTurnDmg:: @ 82DB30E
@ -321,46 +321,46 @@ BattleScript_NightmareTurnDmg:: @ 82DB33F
BattleScript_CurseTurnDmg:: @ 82DB350 BattleScript_CurseTurnDmg:: @ 82DB350
.incbin "baserom.gba", 0x2db350, 0x11 .incbin "baserom.gba", 0x2db350, 0x11
gUnknown_082DB361:: @ 82DB361 BattleScript_TargetPRLZHeal:: @ 82DB361
.incbin "baserom.gba", 0x2db361, 0x9 .incbin "baserom.gba", 0x2db361, 0x9
gUnknown_082DB36A:: @ 82DB36A BattleScript_MoveEffectSleep:: @ 82DB36A
.incbin "baserom.gba", 0x2db36A, 0xE .incbin "baserom.gba", 0x2db36A, 0xE
BattleScript_YawnMakesAsleep:: @ 82DB378 BattleScript_YawnMakesAsleep:: @ 82DB378
.incbin "baserom.gba", 0x2db378, 0xE .incbin "baserom.gba", 0x2db378, 0xE
gUnknown_082DB386:: @ 82DB386 BattleScript_MoveEffectPoison:: @ 82DB386
.incbin "baserom.gba", 0x2db386, 0xF .incbin "baserom.gba", 0x2db386, 0xF
gUnknown_082DB395:: @ 82DB395 BattleScript_MoveEffectBurn:: @ 82DB395
.incbin "baserom.gba", 0x2db395, 0xF .incbin "baserom.gba", 0x2db395, 0xF
gUnknown_082DB3A4:: @ 82DB3A4 BattleScript_MoveEffectFreeze:: @ 82DB3A4
.incbin "baserom.gba", 0x2db3A4, 0xF .incbin "baserom.gba", 0x2db3A4, 0xF
gUnknown_082DB3B3:: @ 82DB3B3 BattleScript_MoveEffectParalysis:: @ 82DB3B3
.incbin "baserom.gba", 0x2db3B3, 0xF .incbin "baserom.gba", 0x2db3B3, 0xF
gUnknown_082DB3C2:: @ 82DB3C2 BattleScript_MoveEffectUproar:: @ 82DB3C2
.incbin "baserom.gba", 0x2db3C2, 0x7 .incbin "baserom.gba", 0x2db3C2, 0x7
gUnknown_082DB3C9:: @ 82DB3C9 BattleScript_MoveEffectToxic:: @ 82DB3C9
.incbin "baserom.gba", 0x2db3C9, 0xD .incbin "baserom.gba", 0x2db3C9, 0xD
gUnknown_082DB3D6:: @ 82DB3D6 BattleScript_MoveEffectPayDay:: @ 82DB3D6
.incbin "baserom.gba", 0x2db3D6, 0x7 .incbin "baserom.gba", 0x2db3D6, 0x7
gUnknown_082DB3DD:: @ 82DB3DD BattleScript_MoveEffectWrap:: @ 82DB3DD
.incbin "baserom.gba", 0x2db3DD, 0x9 .incbin "baserom.gba", 0x2db3DD, 0x9
gUnknown_082DB3E6:: @ 82DB3E6 BattleScript_MoveEffectConfusion:: @ 82DB3E6
.incbin "baserom.gba", 0x2db3E6, 0xE .incbin "baserom.gba", 0x2db3E6, 0xE
gUnknown_082DB3F4:: @ 82DB3F4 BattleScript_MoveEffectRecoil33:: @ 82DB3F4
.incbin "baserom.gba", 0x2db3F4, 0x2e .incbin "baserom.gba", 0x2db3F4, 0x2e
gUnknown_082DB422:: @ 82DB422 BattleScript_ItemSteal:: @ 82DB422
.incbin "baserom.gba", 0x2db422, 0xe .incbin "baserom.gba", 0x2db422, 0xe
BattleScript_DrizzleActivates:: @ 82DB430 BattleScript_DrizzleActivates:: @ 82DB430
@ -393,13 +393,13 @@ gUnknown_082DB4C1:: @ 82DB4C1
BattleScript_DroughtActivates:: @ 82DB52A BattleScript_DroughtActivates:: @ 82DB52A
.incbin "baserom.gba", 0x2db52a, 0x14 .incbin "baserom.gba", 0x2db52a, 0x14
gUnknown_082DB53E:: @ 82DB53E BattleScript_TookAttack:: @ 82DB53E
.incbin "baserom.gba", 0x2db53e, 0x14 .incbin "baserom.gba", 0x2db53e, 0x14
gUnknown_082DB552:: @ 82DB552 BattleScript_SturdyPreventsOHKO:: @ 82DB552
.incbin "baserom.gba", 0x2db552, 0xe .incbin "baserom.gba", 0x2db552, 0xe
gUnknown_082DB560:: @ 82DB560 BattleScript_DampStopsExplosion:: @ 82DB560
.incbin "baserom.gba", 0x2db560, 0xe .incbin "baserom.gba", 0x2db560, 0xe
BattleScript_MoveHPDrain_PPLoss:: @ 82DB56E BattleScript_MoveHPDrain_PPLoss:: @ 82DB56E
@ -420,31 +420,31 @@ BattleScript_FlashFireBoost_PPLoss:: @ 82DB5A7
BattleScript_FlashFireBoost:: @ 82DB5A8 BattleScript_FlashFireBoost:: @ 82DB5A8
.incbin "baserom.gba", 0x2db5a8, 0x1f .incbin "baserom.gba", 0x2db5a8, 0x1f
gUnknown_082DB5C7:: @ 82DB5C7 BattleScript_AbilityNoStatLoss:: @ 82DB5C7
.incbin "baserom.gba", 0x2db5c7, 0xa .incbin "baserom.gba", 0x2db5c7, 0xa
gUnknown_082DB5D1:: @ 82DB5D1 BattleScript_BRNPrevention:: @ 82DB5D1
.incbin "baserom.gba", 0x2db5d1, 0xc .incbin "baserom.gba", 0x2db5d1, 0xc
gUnknown_082DB5DD:: @ 82DB5DD BattleScript_PRLZPrevention:: @ 82DB5DD
.incbin "baserom.gba", 0x2db5dd, 0xc .incbin "baserom.gba", 0x2db5dd, 0xc
gUnknown_082DB5E9:: @ 82DB5E9 BattleScript_PSNPrevention:: @ 82DB5E9
.incbin "baserom.gba", 0x2db5e9, 0xc .incbin "baserom.gba", 0x2db5e9, 0xc
gUnknown_082DB5F5:: @ 82DB5F5 BattleScript_ObliviousPreventsAttraction:: @ 82DB5F5
.incbin "baserom.gba", 0x2db5f5, 0xe .incbin "baserom.gba", 0x2db5f5, 0xe
gUnknown_082DB603:: @ 82DB603 BattleScript_FlinchPrevention:: @ 82DB603
.incbin "baserom.gba", 0x2db603, 0x1c .incbin "baserom.gba", 0x2db603, 0x1c
BattleScript_SoundproofProtected:: @ 82DB61F BattleScript_SoundproofProtected:: @ 82DB61F
.incbin "baserom.gba", 0x2db61f, 0x10 .incbin "baserom.gba", 0x2db61f, 0x10
gUnknown_082DB62F:: @ 82DB62F BattleScript_AbilityNoSpecificStatLoss:: @ 82DB62F
.incbin "baserom.gba", 0x2db62f, 0x10 .incbin "baserom.gba", 0x2db62f, 0x10
gUnknown_082DB63F:: @ 82DB63F BattleScript_StickyHoldActivates:: @ 82DB63F
.incbin "baserom.gba", 0x2db63f, 0xe .incbin "baserom.gba", 0x2db63f, 0xe
BattleScript_ColorChangeActivates:: @ 82DB64D BattleScript_ColorChangeActivates:: @ 82DB64D
@ -462,7 +462,7 @@ BattleScript_ApplySecondaryEffect:: @ 82DB67C
BattleScript_SynchronizeActivates:: @ 82DB67F BattleScript_SynchronizeActivates:: @ 82DB67F
.incbin "baserom.gba", 0x2db67f, 0x3 .incbin "baserom.gba", 0x2db67f, 0x3
gUnknown_082DB682:: @ 82DB682 BattleScript_NoItemSteal:: @ 82DB682
.incbin "baserom.gba", 0x2db682, 0xa .incbin "baserom.gba", 0x2db682, 0xa
gUnknown_082DB68C:: @ 82DB68C gUnknown_082DB68C:: @ 82DB68C
@ -483,7 +483,7 @@ gUnknown_082DB6D9:: @ 82DB6D9
gUnknown_082DB6F0:: @ 82DB6F0 gUnknown_082DB6F0:: @ 82DB6F0
.incbin "baserom.gba", 0x2db6f0, 0xb .incbin "baserom.gba", 0x2db6f0, 0xb
gUnknown_082DB6FB:: @ 82DB6FB BattleScript_SubstituteFade:: @ 82DB6FB
.incbin "baserom.gba", 0x2db6fb, 0xb .incbin "baserom.gba", 0x2db6fb, 0xb
BattleScript_BerryCurePrlzEnd2:: @ 82DB706 BattleScript_BerryCurePrlzEnd2:: @ 82DB706
@ -549,7 +549,7 @@ BattleScript_ItemHealHP_Ret:: @ 82DB7F7
gUnknown_082DB812:: @ 82DB812 gUnknown_082DB812:: @ 82DB812
.incbin "baserom.gba", 0x2db812, 0x4 .incbin "baserom.gba", 0x2db812, 0x4
gUnknown_082DB816:: @ 82DB816 BattleScript_HangedOnMsg:: @ 82DB816
.incbin "baserom.gba", 0x2db816, 0xe .incbin "baserom.gba", 0x2db816, 0xe
BattleScript_BerryConfuseHealEnd2:: @ 82DB824 BattleScript_BerryConfuseHealEnd2:: @ 82DB824

View File

@ -45,16 +45,16 @@ gUnknown_082DBD68:: @ 82DBD68
gUnknown_082DBD7E:: @ 82DBD7E gUnknown_082DBD7E:: @ 82DBD7E
.incbin "baserom.gba", 0x2dbd7e, 0x6 .incbin "baserom.gba", 0x2dbd7e, 0x6
gUnknown_082DBD84:: @ 82DBD84 BattleScript_SuccessBallThrow:: @ 82DBD84
.incbin "baserom.gba", 0x2dbd84, 0x46 .incbin "baserom.gba", 0x2dbd84, 0x46
gUnknown_082DBDCA:: @ 82DBDCA BattleScript_WallyBallThrow:: @ 82DBDCA
.incbin "baserom.gba", 0x2dbdca, 0xa .incbin "baserom.gba", 0x2dbdca, 0xa
gUnknown_082DBDD4:: @ 82DBDD4 BattleScript_ShakeBallThrow:: @ 82DBDD4
.incbin "baserom.gba", 0x2dbdd4, 0x2e .incbin "baserom.gba", 0x2dbdd4, 0x2e
gUnknown_082DBE02:: @ 82DBE02 BattleScript_TrainerBallBlock:: @ 82DBE02
.incbin "baserom.gba", 0x2dbe02, 0x10 .incbin "baserom.gba", 0x2dbe02, 0x10
gUnknown_082DBE12:: @ 82DBE12 gUnknown_082DBE12:: @ 82DBE12

View File

@ -202,14 +202,14 @@ gUnknown_0831ACA0:: @ 831ACA0
gUnknown_0831ACE0:: @ 831ACE0 gUnknown_0831ACE0:: @ 831ACE0
.incbin "baserom.gba", 0x31ace0, 0x8 .incbin "baserom.gba", 0x31ace0, 0x8
gUnknown_0831ACE8:: @ 831ACE8 gTypeEffectiveness:: @ 831ACE8
.incbin "baserom.gba", 0x31ace8, 0x150 .incbin "baserom.gba", 0x31ace8, 0x150
@ 831AE38 @ 831AE38
.include "data/text/type_names.inc" .include "data/text/type_names.inc"
.align 2 .align 2
gUnknown_0831AEB8:: @ 831AEB8 gTrainerMoneyTable:: @ 831AEB8
.incbin "baserom.gba", 0x31aeb8, 0xe0 .incbin "baserom.gba", 0x31aeb8, 0xe0
@ 831AF98 @ 831AF98

View File

@ -1,45 +0,0 @@
.align 1
gPickupItems:: @ 831C440
.2byte ITEM_POTION
.2byte ITEM_ANTIDOTE
.2byte ITEM_SUPER_POTION
.2byte ITEM_GREAT_BALL
.2byte ITEM_REPEL
.2byte ITEM_ESCAPE_ROPE
.2byte ITEM_X_ATTACK
.2byte ITEM_FULL_HEAL
.2byte ITEM_ULTRA_BALL
.2byte ITEM_HYPER_POTION
.2byte ITEM_RARE_CANDY
.2byte ITEM_PROTEIN
.2byte ITEM_REVIVE
.2byte ITEM_HP_UP
.2byte ITEM_FULL_RESTORE
.2byte ITEM_MAX_REVIVE
.2byte ITEM_PP_UP
.2byte ITEM_MAX_ELIXIR
.align 1
gRarePickupItems:: @ 831C464
.2byte ITEM_HYPER_POTION
.2byte ITEM_NUGGET
.2byte ITEM_KINGS_ROCK
.2byte ITEM_FULL_RESTORE
.2byte ITEM_ETHER
.2byte ITEM_WHITE_HERB
.2byte ITEM_TM44
.2byte ITEM_ELIXIR
.2byte ITEM_TM01
.2byte ITEM_LEFTOVERS
.2byte ITEM_TM26
gPickupProbabilities:: @ 831C47A
.byte 30
.byte 40
.byte 50
.byte 60
.byte 70
.byte 80
.byte 90
.byte 94
.byte 98

View File

@ -1,8 +1,28 @@
#ifndef GUARD_BATTLE_H #ifndef GUARD_BATTLE_H
#define GUARD_BATTLE_H #define GUARD_BATTLE_H
/*
Banks are a name given to what could be called a 'battlerId' or 'monControllerId'.
Each bank has a value consisting of two bits.
0x1 bit is responsible for the side, 0 = player's side, 1 = opponent's side.
0x2 bit is responsible for the id of sent out pokemon. 0 means it's the first sent out pokemon, 1 it's the second one. (Triple battle didn't exist at the time yet.)
*/
#define BATTLE_BANKS_COUNT 4 #define BATTLE_BANKS_COUNT 4
#define IDENTITY_PLAYER_MON1 0
#define IDENTITY_OPPONENT_MON1 1
#define IDENTITY_PLAYER_MON2 2
#define IDENTITY_OPPONENT_MON2 3
#define SIDE_PLAYER 0x0
#define SIDE_OPPONENT 0x1
#define BIT_SIDE 0x1
#define BIT_MON 0x2
#define GET_BANK_SIDE(bank)((GetBankIdentity(bank) & BIT_SIDE))
#define BATTLE_TYPE_DOUBLE 0x0001 #define BATTLE_TYPE_DOUBLE 0x0001
#define BATTLE_TYPE_LINK 0x0002 #define BATTLE_TYPE_LINK 0x0002
#define BATTLE_TYPE_WILD 0x0004 #define BATTLE_TYPE_WILD 0x0004
@ -40,9 +60,6 @@
#define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_x100000 | BATTLE_TYPE_PYRAMID) #define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_x100000 | BATTLE_TYPE_PYRAMID)
#define SIDE_PLAYER 0x0
#define SIDE_OPPONENT 0x1
#define BATTLE_WON 0x1 #define BATTLE_WON 0x1
#define BATTLE_LOST 0x2 #define BATTLE_LOST 0x2
#define BATTLE_DREW 0x3 #define BATTLE_DREW 0x3
@ -66,11 +83,12 @@
#define STATUS2_CONFUSION 0x00000007 #define STATUS2_CONFUSION 0x00000007
#define STATUS2_FLINCHED 0x00000008 #define STATUS2_FLINCHED 0x00000008
#define STATUS2_UPROAR 0x00000070 #define STATUS2_UPROAR 0x00000070
#define STATUS2_BIDE 0x00000300 //two bits 0x100 0x200 #define STATUS2_BIDE 0x00000300 // two bits 0x100, 0x200
#define STATUS2_LOCK_CONFUSE 0x00000C00 #define STATUS2_LOCK_CONFUSE 0x00000C00
#define STATUS2_MULTIPLETURNS 0x00001000 #define STATUS2_MULTIPLETURNS 0x00001000
#define STATUS2_WRAPPED 0x0000E000 #define STATUS2_WRAPPED 0x0000E000
#define STATUS2_INFATUATION 0x000F0000 #define STATUS2_INFATUATION 0x000F0000 // 4 bits, one for every bank
#define STATUS2_INFATUATED_WITH(bank)((gBitTable[bank] << 16))
#define STATUS2_FOCUS_ENERGY 0x00100000 #define STATUS2_FOCUS_ENERGY 0x00100000
#define STATUS2_TRANSFORMED 0x00200000 #define STATUS2_TRANSFORMED 0x00200000
#define STATUS2_RECHARGE 0x00400000 #define STATUS2_RECHARGE 0x00400000
@ -86,7 +104,7 @@
#define STATUS3_LEECHSEED_BANK 0x3 #define STATUS3_LEECHSEED_BANK 0x3
#define STATUS3_LEECHSEED 0x4 #define STATUS3_LEECHSEED 0x4
#define STATUS3_ALWAYS_HITS 0x18 //two bits #define STATUS3_ALWAYS_HITS 0x18 // two bits
#define STATUS3_PERISH_SONG 0x20 #define STATUS3_PERISH_SONG 0x20
#define STATUS3_ON_AIR 0x40 #define STATUS3_ON_AIR 0x40
#define STATUS3_UNDERGROUND 0x80 #define STATUS3_UNDERGROUND 0x80
@ -94,7 +112,7 @@
#define STATUS3_ROOTED 0x400 #define STATUS3_ROOTED 0x400
#define STATUS3_CHARGED_UP 0x200 #define STATUS3_CHARGED_UP 0x200
#define STATUS3_YAWN 0x1800 //two bits #define STATUS3_YAWN 0x1800 //two bits
#define STATUS3_IMPRISIONED 0x2000 #define STATUS3_IMPRISONED_OTHERS 0x2000
#define STATUS3_GRUDGE 0x4000 #define STATUS3_GRUDGE 0x4000
#define STATUS3_CANT_SCORE_A_CRIT 0x8000 #define STATUS3_CANT_SCORE_A_CRIT 0x8000
#define STATUS3_MUDSPORT 0x10000 #define STATUS3_MUDSPORT 0x10000
@ -154,7 +172,7 @@
#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD #define ABILITYEFFECT_CHECK_BANK_SIDE 0xD
#define ABILITYEFFECT_FIELD_SPORT 0xE #define ABILITYEFFECT_FIELD_SPORT 0xE
#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF #define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF
#define ABILITYEFFECT_COUNT_OTHER_SIZE 0x10 #define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10
#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 #define ABILITYEFFECT_COUNT_BANK_SIDE 0x11
#define ABILITYEFFECT_COUNT_ON_FIELD 0x12 #define ABILITYEFFECT_COUNT_ON_FIELD 0x12
#define ABILITYEFFECT_CHECK_ON_FIELD 0x13 #define ABILITYEFFECT_CHECK_ON_FIELD 0x13
@ -187,27 +205,97 @@
#define WEATHER_SUN_ANY ((WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT)) #define WEATHER_SUN_ANY ((WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT))
#define WEATHER_HAIL (1 << 7) #define WEATHER_HAIL (1 << 7)
#define WEATHER_HAIL_ANY ((WEATHER_HAIL)) #define WEATHER_HAIL_ANY ((WEATHER_HAIL))
#define WEATHER_ANY ((WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY))
#define REQUEST_ALL_BATTLE 0x0 #define BATTLE_TERRAIN_GRASS 0
#define REQUEST_SPECIES_BATTLE 0x1 #define BATTLE_TERRAIN_LONG_GRASS 1
#define REQUEST_HELDITEM_BATTLE 0x2 #define BATTLE_TERRAIN_SAND 2
#define REQUEST_MOVES_PP_BATTLE 0x3 #define BATTLE_TERRAIN_UNDERWATER 3
#define REQUEST_PPMOVE1_BATTLE 0x9 #define BATTLE_TERRAIN_WATER 4
#define REQUEST_PPMOVE2_BATTLE 0xA #define BATTLE_TERRAIN_POND 5
#define REQUEST_PPMOVE3_BATTLE 0xB #define BATTLE_TERRAIN_ROCK 6
#define REQUEST_PPMOVE4_BATTLE 0xC #define BATTLE_TERRAIN_CAVE 7
#define REQUEST_STATUS_BATTLE 0x28
#define REQUEST_HP_BATTLE 0x2A
// array entries for battle communication // array entries for battle communication
#define MULTIUSE_STATE 0x0
#define CURSOR_POSITION 0x1
#define TASK_ID 0x1 // task Id and cursor position share the same field
#define MOVE_EFFECT_BYTE 0x3 #define MOVE_EFFECT_BYTE 0x3
#define MULTISTRING_CHOOSER 0x5 #define MULTISTRING_CHOOSER 0x5
#define MSG_DISPLAY 0x7 #define MSG_DISPLAY 0x7
// functions #define MOVE_TARGET_SELECTED 0x0
#define MOVE_TARGET_DEPENDS 0x1
#define MOVE_TARGET_USER 0x2
#define MOVE_TARGET_RANDOM 0x4
#define MOVE_TARGET_x10 0x10
#define MOVE_TARGET_BOTH 0x8
#define MOVE_TARGET_FOES_AND_ALLY 0x20
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
extern u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); #define TYPE_MUL_NO_EFFECT 0
extern u8 GetBankSide(u8 bank); #define TYPE_MUL_NOT_EFFECTIVE 5
#define TYPE_MUL_NORMAL 10
#define TYPE_MUL_SUPER_EFFECTIVE 20
#define BS_GET_TARGET 0
#define BS_GET_ATTACKER 1
#define BS_GET_EFFECT_BANK 2
#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update
#define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability
#define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability
#define BS_GET_SCRIPTING_BANK 10
#define BS_GET_OPPONENT1 12
#define BS_GET_PLAYER2 13
#define BS_GET_OPPONENT2 14
// for battle script commands
#define CMP_EQUAL 0x0
#define CMP_NOT_EQUAL 0x1
#define CMP_GREATER_THAN 0x2
#define CMP_LESS_THAN 0x3
#define CMP_COMMON_BITS 0x4
#define CMP_NO_COMMON_BITS 0x5
struct TrainerMonNoItemDefaultMoves
{
u16 species;
u8 lvl;
u16 evsValue;
};
struct TrainerMonItemDefaultMoves
{
u16 species;
u8 lvl;
u16 evsValue;
u16 heldItem;
};
struct TrainerMonNoItemCustomMoves
{
u16 species;
u8 lvl;
u16 evsValue;
u16 moves[4];
};
struct TrainerMonItemCustomMoves
{
u16 species;
u8 lvl;
u16 evsValue;
u16 heldItem;
u16 moves[4];
};
union TrainerMonPtr
{
struct TrainerMonNoItemDefaultMoves* NoItemDefaultMoves;
struct TrainerMonNoItemCustomMoves* NoItemCustomMoves;
struct TrainerMonItemDefaultMoves* ItemDefaultMoves;
struct TrainerMonItemCustomMoves* ItemCustomMoves;
};
struct Trainer struct Trainer
{ {
@ -220,9 +308,12 @@ struct Trainer
/*0x18*/ bool8 doubleBattle; /*0x18*/ bool8 doubleBattle;
/*0x1C*/ u32 aiFlags; /*0x1C*/ u32 aiFlags;
/*0x20*/ u8 partySize; /*0x20*/ u8 partySize;
/*0x24*/ void *party; /*0x24*/ union TrainerMonPtr party;
}; };
#define PARTY_FLAG_CUSTOM_MOVES 0x1
#define PARTY_FLAG_HAS_ITEM 0x2
extern const struct Trainer gTrainers[]; extern const struct Trainer gTrainers[];
#define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F)) #define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F))
@ -262,7 +353,8 @@ struct DisableStruct
/*0x16*/ u8 isFirstTurn; /*0x16*/ u8 isFirstTurn;
/*0x17*/ u8 unk17; /*0x17*/ u8 unk17;
/*0x18*/ u8 truantCounter : 1; /*0x18*/ u8 truantCounter : 1;
/*0x18*/ u8 unk18_a : 3; /*0x18*/ u8 truantUnknownBit : 1;
/*0x18*/ u8 unk18_a_2 : 2;
/*0x18*/ u8 unk18_b : 4; /*0x18*/ u8 unk18_b : 4;
/*0x19*/ u8 rechargeCounter; /*0x19*/ u8 rechargeCounter;
/*0x1A*/ u8 unk1A[2]; /*0x1A*/ u8 unk1A[2];
@ -312,11 +404,11 @@ extern struct ProtectStruct gProtectStructs[BATTLE_BANKS_COUNT];
struct SpecialStatus struct SpecialStatus
{ {
u8 statLowered : 1; u8 statLowered : 1; // 0x1
u8 lightningRodRedirected : 1; u8 lightningRodRedirected : 1; // 0x2
u8 restoredBankSprite: 1; u8 restoredBankSprite: 1; // 0x4
u8 intimidatedPoke : 1; u8 intimidatedPoke : 1; // 0x8
u8 traced : 1; u8 traced : 1; // 0x10
u8 flag20 : 1; u8 flag20 : 1;
u8 flag40 : 1; u8 flag40 : 1;
u8 focusBanded : 1; u8 focusBanded : 1;
@ -359,7 +451,7 @@ struct WishFutureKnock
u8 wishCounter[BATTLE_BANKS_COUNT]; u8 wishCounter[BATTLE_BANKS_COUNT];
u8 wishUserID[BATTLE_BANKS_COUNT]; u8 wishUserID[BATTLE_BANKS_COUNT];
u8 weatherDuration; u8 weatherDuration;
u16 knockedOffPokes; u8 knockedOffPokes[2];
}; };
extern struct WishFutureKnock gWishFutureKnock; extern struct WishFutureKnock gWishFutureKnock;
@ -405,13 +497,23 @@ struct BattleCallbacksStack
u8 size; u8 size;
}; };
struct StatsArray
{
u16 hp;
u16 atk;
u16 def;
u16 spd;
u16 spAtk;
u16 spDef;
};
struct BattleResources struct BattleResources
{ {
struct SecretBaseRecord* secretBase; struct SecretBaseRecord* secretBase;
struct UnknownFlags *flags; struct UnknownFlags *flags;
struct BattleScriptsStack* battleScriptsStack; struct BattleScriptsStack* battleScriptsStack;
struct BattleCallbacksStack* battleCallbackStack; struct BattleCallbacksStack* battleCallbackStack;
void* statsBeforeLvlUp; struct StatsArray* statsBeforeLvlUp;
struct AI_ThinkingStruct *ai; struct AI_ThinkingStruct *ai;
struct BattleHistory *battleHistory; struct BattleHistory *battleHistory;
struct BattleScriptsStack *AI_ScriptsStack; struct BattleScriptsStack *AI_ScriptsStack;
@ -421,16 +523,20 @@ extern struct BattleResources* gBattleResources;
#define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack) #define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack)
#define BATTLE_CALLBACKS_STACK (gBattleResources->battleCallbackStack) #define BATTLE_CALLBACKS_STACK (gBattleResources->battleCallbackStack)
#define BATTLE_LVLUP_STATS (gBattleResources->statsBeforeLvlUp)
struct BattleResults struct BattleResults
{ {
u8 playerFaintCounter; // 0x0 u8 playerFaintCounter; // 0x0
u8 opponentFaintCounter; // 0x1 u8 opponentFaintCounter; // 0x1
u8 unk2; // 0x2 u8 playerSwitchesCounter; // 0x2
u8 unk3; // 0x3 u8 unk3; // 0x3
u8 unk4; // 0x4 u8 unk4; // 0x4
u8 unk5_0:1; // 0x5 u8 unk5_0:1; // 0x5
u8 unk5_1:1; // 0x5 u8 unk5_1:1; // 0x5
u8 caughtMonBall:4; // 0x5
u8 unk5_6:1; // 0x5
u8 unk5_7:1; // 0x5
u16 poke1Species; // 0x6 u16 poke1Species; // 0x6
u8 pokeString1[10]; // 0x8 u8 pokeString1[10]; // 0x8
u8 unk12; u8 unk12;
@ -442,10 +548,10 @@ struct BattleResults
u16 lastUsedMove; // 0x22 u16 lastUsedMove; // 0x22
u16 opponentMove; // 0x24 u16 opponentMove; // 0x24
u16 opponentSpecies; // 0x26 u16 opponentSpecies; // 0x26
u16 caughtPoke; // 0x28 u16 caughtMonSpecies; // 0x28
u8 caughtNick[10]; // 0x2A u8 caughtMonNick[10]; // 0x2A
u8 filler34[2]; u8 filler34[2];
u8 unk36[10]; // usedBalls? u8 catchAttempts[10]; // 0x36
}; };
extern struct BattleResults gBattleResults; extern struct BattleResults gBattleResults;
@ -463,46 +569,7 @@ struct BattleStruct
u8 wildVictorySong; u8 wildVictorySong;
u8 dynamicMoveType; u8 dynamicMoveType;
u8 wrappedBy[4]; u8 wrappedBy[4];
u8 field_18; u16 assistPossibleMoves[5 * 4]; // 5 mons, each of them knowing 4 moves
u8 field_19;
u8 field_1A;
u8 field_1B;
u8 field_1C;
u8 field_1D;
u8 field_1E;
u8 field_1F;
u8 field_20;
u8 field_21;
u8 field_22;
u8 field_23;
u8 field_24;
u8 field_25;
u8 field_26;
u8 field_27;
u8 field_28;
u8 field_29;
u8 field_2A;
u8 field_2B;
u8 field_2C;
u8 field_2D;
u8 field_2E;
u8 field_2F;
u8 field_30;
u8 field_31;
u8 field_32;
u8 field_33;
u8 field_34;
u8 field_35;
u8 field_36;
u8 field_37;
u8 field_38;
u8 field_39;
u8 field_3A;
u8 field_3B;
u8 field_3C;
u8 field_3D;
u8 field_3E;
u8 field_3F;
u8 field_40; u8 field_40;
u8 field_41; u8 field_41;
u8 field_42; u8 field_42;
@ -519,43 +586,15 @@ struct BattleStruct
u8 field_4D; u8 field_4D;
u8 field_4E; u8 field_4E;
u8 field_4F; u8 field_4F;
u8 field_50; u16 expValue;
u8 field_51;
u8 field_52; u8 field_52;
u8 field_53; u8 sentInPokes;
u8 field_54; u8 field_54[4];
u8 field_55; u8 field_58[4];
u8 field_56;
u8 field_57;
u8 field_58;
u8 field_59;
u8 field_5A;
u8 field_5B;
u8 field_5C[4]; u8 field_5C[4];
u8 field_60; u8 field_60[4][3];
u8 field_61;
u8 field_62;
u8 field_63;
u8 field_64;
u8 field_65;
u8 field_66;
u8 field_67;
u8 field_68;
u8 field_69;
u8 field_6A;
u8 field_6B;
u8 field_6C; u8 field_6C;
u8 field_6D; u8 caughtMonNick[11];
u8 field_6E;
u8 field_6F;
u8 field_70;
u8 field_71;
u8 field_72;
u8 field_73;
u8 field_74;
u8 field_75;
u8 field_76;
u8 field_77;
u8 field_78; u8 field_78;
u8 field_79; u8 field_79;
u8 field_7A; u8 field_7A;
@ -585,14 +624,7 @@ struct BattleStruct
u8 field_95; u8 field_95;
u8 field_96; u8 field_96;
u8 field_97; u8 field_97;
u8 field_98; u8 mirrorMoves[8]; // ask gamefreak why they declared it that way
u8 field_99;
u8 field_9A;
u8 field_9B;
u8 field_9C;
u8 field_9D;
u8 field_9E;
u8 field_9F;
u8 field_A0; u8 field_A0;
u8 field_A1; u8 field_A1;
u8 field_A2; u8 field_A2;
@ -610,21 +642,29 @@ struct BattleStruct
u8 field_B5; u8 field_B5;
u8 field_B6; u8 field_B6;
u8 field_B7; u8 field_B7;
u16 usedHeldItems[4]; u16 usedHeldItems[BATTLE_BANKS_COUNT];
u8 field_C0[8]; u8 field_C0[8];
u16 choicedMove[4]; u16 choicedMove[BATTLE_BANKS_COUNT];
u8 field_D0[8]; u16 changedItems[BATTLE_BANKS_COUNT];
u8 intimidateBank; u8 intimidateBank;
u8 fillerD9[0xDA-0xD9]; u8 fillerD9[0xDA-0xD9];
u8 field_DA; u8 field_DA;
u8 turnSideTracker; u8 turnSideTracker;
u8 fillerDC[0xDF-0xDC]; u8 fillerDC[0xDF-0xDC];
u8 field_DF; u8 field_DF;
u8 fillerE0[0x1A0-0xE0]; u8 mirrorMoveArrays[32];
u16 castformPalette[4][16];
u8 field_180[32];
u8 field_1A0; u8 field_1A0;
u8 field_1A1; u8 field_1A1;
u8 filler1A2; u8 filler1A2;
u8 atkCancellerTracker; u8 atkCancellerTracker;
u8 field_1A4[240];
u8 field_294[4];
u8 field_298[8];
u8 field_2A0;
u8 field_2A1;
u8 field_2A2;
}; };
extern struct BattleStruct* gBattleStruct; extern struct BattleStruct* gBattleStruct;
@ -636,19 +676,153 @@ extern struct BattleStruct* gBattleStruct;
var2[offsetof(struct structName, offsetField)] = value; \ var2[offsetof(struct structName, offsetField)] = value; \
} }
#define GET_MOVE_TYPE(move, typeArg) \
{ \
if (gBattleStruct->dynamicMoveType) \
typeArg = gBattleStruct->dynamicMoveType & 0x3F; \
else \
typeArg = gBattleMoves[move].type; \
}
#define MOVE_EFFECT_SLEEP 0x1
#define MOVE_EFFECT_POISON 0x2
#define MOVE_EFFECT_BURN 0x3
#define MOVE_EFFECT_FREEZE 0x4
#define MOVE_EFFECT_PARALYSIS 0x5
#define MOVE_EFFECT_TOXIC 0x6
#define MOVE_EFFECT_CONFUSION 0x7
#define MOVE_EFFECT_FLINCH 0x8
#define MOVE_EFFECT_TRI_ATTACK 0x9
#define MOVE_EFFECT_UPROAR 0xA
#define MOVE_EFFECT_PAYDAY 0xB
#define MOVE_EFFECT_CHARGING 0xC
#define MOVE_EFFECT_WRAP 0xD
#define MOVE_EFFECT_RECOIL_25 0xE
#define MOVE_EFFECT_ATK_PLUS_1 0xF
#define MOVE_EFFECT_DEF_PLUS_1 0x10
#define MOVE_EFFECT_SPD_PLUS_1 0x11
#define MOVE_EFFECT_SP_ATK_PLUS_1 0x12
#define MOVE_EFFECT_SP_DEF_PLUS_1 0x13
#define MOVE_EFFECT_ACC_PLUS_1 0x14
#define MOVE_EFFECT_EVS_PLUS_1 0x15
#define MOVE_EFFECT_ATK_MINUS_1 0x16
#define MOVE_EFFECT_DEF_MINUS_1 0x17
#define MOVE_EFFECT_SPD_MINUS_1 0x18
#define MOVE_EFFECT_SP_ATK_MINUS_1 0x19
#define MOVE_EFFECT_SP_DEF_MINUS_1 0x1A
#define MOVE_EFFECT_ACC_MINUS_1 0x1B
#define MOVE_EFFECT_EVS_MINUS_1 0x1C
#define MOVE_EFFECT_RECHARGE 0x1D
#define MOVE_EFFECT_RAGE 0x1E
#define MOVE_EFFECT_STEAL_ITEM 0x1F
#define MOVE_EFFECT_PREVENT_ESCAPE 0x20
#define MOVE_EFFECT_NIGHTMARE 0x21
#define MOVE_EFFECT_ALL_STATS_UP 0x22
#define MOVE_EFFECT_RAPIDSPIN 0x23
#define MOVE_EFFECT_REMOVE_PARALYSIS 0x24
#define MOVE_EFFECT_ATK_DEF_DOWN 0x25
#define MOVE_EFFECT_RECOIL_33_PARALYSIS 0x26
#define MOVE_EFFECT_ATK_PLUS_2 0x27
#define MOVE_EFFECT_DEF_PLUS_2 0x28
#define MOVE_EFFECT_SPD_PLUS_2 0x29
#define MOVE_EFFECT_SP_ATK_PLUS_2 0x2A
#define MOVE_EFFECT_SP_DEF_PLUS_2 0x2B
#define MOVE_EFFECT_ACC_PLUS_2 0x2C
#define MOVE_EFFECT_EVS_PLUS_2 0x2D
#define MOVE_EFFECT_ATK_MINUS_2 0x2E
#define MOVE_EFFECT_DEF_MINUS_2 0x2F
#define MOVE_EFFECT_SPD_MINUS_2 0x30
#define MOVE_EFFECT_SP_ATK_MINUS_2 0x31
#define MOVE_EFFECT_SP_DEF_MINUS_2 0x32
#define MOVE_EFFECT_ACC_MINUS_2 0x33
#define MOVE_EFFECT_EVS_MINUS_2 0x34
#define MOVE_EFFECT_THRASH 0x35
#define MOVE_EFFECT_KNOCK_OFF 0x36
#define MOVE_EFFECT_NOTHING_37 0x37
#define MOVE_EFFECT_NOTHING_38 0x38
#define MOVE_EFFECT_NOTHING_39 0x39
#define MOVE_EFFECT_NOTHING_3A 0x3A
#define MOVE_EFFECT_SP_ATK_TWO_DOWN 0x3B
#define MOVE_EFFECT_NOTHING_3C 0x3C
#define MOVE_EFFECT_NOTHING_3D 0x3D
#define MOVE_EFFECT_NOTHING_3E 0x3E
#define MOVE_EFFECT_NOTHING_3F 0x3F
#define MOVE_EFFECT_AFFECTS_USER 0x40
#define MOVE_EFFECT_CERTAIN 0x80
// battle animations ids
#define B_ANIM_CASTFORM_CHANGE 0x0
#define B_ANIM_STATS_CHANGE 0x1
#define B_ANIM_SUBSTITUTE_FADE 0x2
#define B_ANIM_SUBSTITUTE_APPEAR 0x3
#define B_ANIM_x4 0x4
#define B_ANIM_ITEM_KNOCKOFF 0x5
#define B_ANIM_TURN_TRAP 0x6
#define B_ANIM_ITEM_EFFECT 0x7
#define B_ANIM_SMOKEBALL_ESCAPE 0x8
#define B_ANIM_HANGED_ON 0x9
#define B_ANIM_RAIN_CONTINUES 0xA
#define B_ANIM_SUN_CONTINUES 0xB
#define B_ANIM_SANDSTORM_CONTINUES 0xC
#define B_ANIM_HAIL_CONTINUES 0xD
#define B_ANIM_LEECH_SEED_DRAIN 0xE
#define B_ANIM_MON_HIT 0xF
#define B_ANIM_ITEM_STEAL 0x10
#define B_ANIM_SNATCH_MOVE 0x11
#define B_ANIM_FUTURE_SIGHT_HIT 0x12
#define B_ANIM_x13 0x13
#define B_ANIM_x14 0x14
#define B_ANIM_INGRAIN_HEAL 0x15
#define B_ANIM_WISH_HEAL 0x16
#define B_ANIM_x17 0x17
#define B_ANIM_x18 0x18
#define B_ANIM_x19 0x19
#define B_ANIM_x1A 0x1A
#define B_ANIM_x1B 0x1B
#define B_ANIM_x1C 0x1C
#define B_ANIM_x1D 0x1D
#define ATK48_STAT_NEGATIVE 0x1
#define ATK48_STAT_BY_TWO 0x2
#define ATK48_BIT_x4 0x4
#define ATK48_LOWER_FAIL_CHECK 0x8
#define ATK4F_DONT_CHECK_STATUSES 0x80
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
#define VARIOUS_SET_MAGIC_COAT_TARGET 1
#define VARIOUS_GET_MOVE_TARGET 3
#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6
#define VARIOUS_WAIT_CRY 18
#define VARIOUS_RETURN_OPPONENT_MON1 19
#define VARIOUS_RETURN_OPPONENT_MON2 20
#define VARIOUS_SET_TELEPORT_OUTCOME 25
#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26
#define ATK80_DMG_CHANGE_SIGN 0
#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1
#define ATK80_DMG_DOUBLED 2
#define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8
#define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40
#define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit
#define STAT_CHANGE_BS_PTR 0x1
#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20
#define STAT_CHANGE_WORKED 0
#define STAT_CHANGE_DIDNT_WORK 1
#define SET_STAT_BUFF_ID(n)((n & 0xF))
#define SET_STAT_BUFF_VALUE(n)(((s8)(((s8)(n) << 4)) & 0xF0))
struct BattleScripting struct BattleScripting
{ {
u8 field_0; s32 painSplitHp;
u8 field_1; s32 bideDmg;
u8 field_2; u8 multihitString[6];
u8 field_3;
u32 bideDmg;
u8 field_8;
u8 field_9;
u8 field_A;
u8 field_B;
u8 field_C;
u8 field_D;
u8 dmgMultiplier; u8 dmgMultiplier;
u8 field_F; u8 field_F;
u8 animArg1; u8 animArg1;
@ -659,13 +833,102 @@ struct BattleScripting
u8 field_15; u8 field_15;
u8 field_16; u8 field_16;
u8 bank; u8 bank;
u8 field_18; u8 animTurn;
u8 field_19; u8 animTargetsHit;
u8 statChanger; u8 statChanger;
u8 field_1B;
u8 atk23_state;
u8 field_1D;
u8 atk6C_state;
u8 learnMoveState;
u8 field_20;
}; };
extern struct BattleScripting gBattleScripting; extern struct BattleScripting gBattleScripting;
// functions
// battle_2
void CancelMultiTurnMoves(u8 bank);
void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move);
void PrepareStringBattle(u16 stringId, u8 bank);
u8 GetBattleBank(u8 caseId);
void UndoEffectsAfterFainting(void);
bool8 HasMoveFailed(u8 bank);
void SwitchInClearStructs(void);
void sub_803BDA0(u8 bank);
void sub_803FA70(u8 bank);
void BattleMainCB2(void);
void VBlankCB_Battle(void);
void ResetSentPokesToOpponentValue(void);
bool8 CanRunFromBattle(u8 bank);
bool8 IsRunningFromBattleImpossible(void);
void PressurePPLoseOnUsingPerishSong(u8 bankAtk);
void PressurePPLoseOnUsingImprision(u8 bankAtk);
// battle_3
#define MOVE_LIMITATION_ZEROMOVE (1 << 0)
#define MOVE_LIMITATION_PP (1 << 1)
#define MOVE_LIMITATION_DISABLED (1 << 2)
#define MOVE_LIMITATION_TORMENTED (1 << 3)
#define MOVE_LIMITATION_TAUNT (1 << 4)
#define MOVE_LIMITATION_IMPRISION (1 << 5)
void BattleScriptPush(const u8* bsPtr);
void BattleScriptPushCursor(void);
void BattleScriptPop(void);
u8 sub_803FB4C(void); // msg, can't select a move
u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check);
bool8 AreAllMovesUnusable(void);
u8 GetImprisonedMovesCount(u8 bank, u16 move);
u8 UpdateTurnCounters(void);
u8 TurnBasedEffects(void);
bool8 sub_8041364(void);
bool8 sub_8041728(void);
void b_clear_atk_up_if_hit_flag_unless_enraged(void);
u8 AtkCanceller_UnableToUseMove(void);
bool8 sub_80423F4(u8 bank, u8 r1, u8 r2);
u8 CastformDataTypeChange(u8 bank);
u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg);
void BattleScriptExecute(const u8* BS_ptr);
void BattleScriptPushCursorAndCallback(const u8* BS_ptr);
u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn);
void sub_8045868(u8 bank);
void sub_80458B4(void);
u8 GetMoveTarget(u16 move, u8 useMoveTarget);
u8 IsPokeDisobedient(void);
// battle_script_commands
void AI_CalcDmg(u8 bankAtk, u8 bankDef);
u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef);
u8 AI_TypeCalc(u16 move, u16 species, u8 ability);
u8 BankGetTurnOrder(u8 bank);
void SetMoveEffect(bool8 primary, u8 certain);
void BattleDestroyCursorAt(u8 cursorPosition);
void BattleCreateCursorAt(u8 cursorPosition);
void BufferMoveToLearnIntoBattleTextBuff2(void);
void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags);
bool8 UproarWakeUpCheck(u8 bank);
extern void (* const gBattleScriptingCommandsTable[])(void);
extern const u8 gUnknown_0831C494[];
// battle_5
void AdjustFriendshipOnBattleFaint(u8 bank);
void sub_80571DC(u8 bank, u8 arg1);
u32 sub_805725C(u8 bank);
// battle 7
void BattleMusicStop(void);
void sub_805E990(struct Pokemon* mon, u8 bank);
// rom_80A5C6C
u8 GetBankSide(u8 bank);
u8 GetBankIdentity(u8 bank);
u8 GetBankByIdentity(u8 bank);
// Move this somewhere else
#include "sprite.h" #include "sprite.h"
struct BattleSpritesGfx struct BattleSpritesGfx

View File

@ -1,5 +1,5 @@
#ifndef GUARD_BATTLE_AI_H #ifndef GUARD_BATTLE_AI_SCRIPT_COMMANDS_H
#define GUARD_BATTLE_AI_H #define GUARD_BATTLE_AI_SCRIPT_COMMANDS_H
void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves); void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves);
void BattleAI_SetupAIData(u8 defaultScoreMoves); void BattleAI_SetupAIData(u8 defaultScoreMoves);
@ -10,4 +10,4 @@ void ClearBankAbilityHistory(u8 bank);
void RecordItemEffectBattle(u8 bank, u8 itemEffect); void RecordItemEffectBattle(u8 bank, u8 itemEffect);
void ClearBankItemEffectHistory(u8 bank); void ClearBankItemEffectHistory(u8 bank);
#endif // GUARD_BATTLE_AI_H #endif // GUARD_BATTLE_AI_SCRIPT_COMMANDS_H

View File

@ -0,0 +1,73 @@
#ifndef GUARD_BATTLE_CONTROLLERS_H
#define GUARD_BATTLE_CONTROLLERS_H
struct HpAndStatus
{
u16 hp;
u32 status;
};
struct MovePpInfo
{
u16 move[4];
u8 pp[4];
u8 ppBonuses;
};
#define REQUEST_ALL_BATTLE 0x0
#define REQUEST_SPECIES_BATTLE 0x1
#define REQUEST_HELDITEM_BATTLE 0x2
#define REQUEST_MOVES_PP_BATTLE 0x3
#define REQUEST_PPMOVE1_BATTLE 0x9
#define REQUEST_PPMOVE2_BATTLE 0xA
#define REQUEST_PPMOVE3_BATTLE 0xB
#define REQUEST_PPMOVE4_BATTLE 0xC
#define REQUEST_STATUS_BATTLE 0x28
#define REQUEST_HP_BATTLE 0x2A
// rom3.s, emitters
void EmitSetMonData(u8 bufferId, u8 request, u8 c, u8 bytes, void *data);
void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct* disableStructPtr, u8 multihit);
void EmitHealthBarUpdate(u8 bufferId, u16 hpValue);
void EmitEffectivenessSound(u8 bufferId, u16 songId);
void EmitPlaySound(u8 bufferId, u16 songId, u8 arg2);
void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringId);
void EmitFaintAnimation(u8 bufferId);
void Emit_x2A(u8 bufferId);
void EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints);
void EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument);
void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible);
void EmitReturnPokeToBall(u8 bufferId, u8 arg1);
void EmitGetMonData(u8 bufferId, u8 arg1, u8 arg2);
void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit);
void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, const u8* arg4);
void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, u8 arg2);
void EmitTrainerSlide(u8 bufferId);
void EmitTrainerSlideBack(u8 bufferId);
void EmitFaintingCry(u8 bufferId);
void Emit_x37(u8 bufferId, u8 arg1);
void EmitHitAnimation(u8 bufferId);
void EmitCmd48(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2);
void EmitCmd49(u8 bufferId);
void EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status);
void EmitCmd13(u8 bufferId);
void EmitStatusIconUpdate(u8 bufferId, u32 status1, u32 status2);
#define RESET_ACTION_MOVE_SELECTION 0
#define RESET_ACTION_SELECTION 1
#define RESET_MOVE_SELECTION 2
void EmitResetActionMoveSelection(u8 bufferId, u8 caseId);
#define BALL_NO_SHAKES 0
#define BALL_1_SHAKE 1
#define BALL_2_SHAKES 2
#define BALL_3_SHAKES_FAIL 3
#define BALL_3_SHAKES_SUCCESS 4
#define BALL_TRAINER_BLOCK 5
void EmitBallThrow(u8 bufferId, u8 caseId);
void MarkBufferBankForExecution(u8 bank);
#endif // GUARD_BATTLE_CONTROLLERS_H

View File

@ -1,6 +1,191 @@
#ifndef GUARD_BATTLE_MESSAGE_H #ifndef GUARD_BATTLE_MESSAGE_H
#define GUARD_BATTLE_MESSAGE_H #define GUARD_BATTLE_MESSAGE_H
// for 0xFD
#define B_TXT_BUFF1 00
#define B_TXT_BUFF2 01
#define B_TXT_COPY_VAR_1 02
#define B_TXT_COPY_VAR_2 03
#define B_TXT_COPY_VAR_3 04
#define B_TXT_PLAYER_MON1_NAME 05
#define B_TXT_OPPONENT_MON1_NAME 06
#define B_TXT_PLAYER_MON2_NAME 07
#define B_TXT_OPPONENT_MON2_NAME 08
#define B_TXT_LINK_PLAYER_MON1_NAME 09
#define B_TXT_LINK_OPPONENT_MON1_NAME 0A
#define B_TXT_LINK_PLAYER_MON2_NAME 0B
#define B_TXT_LINK_OPPONENT_MON2_NAME 0C
#define B_TXT_ATK_NAME_WITH_PREFIX_MON1 0D
#define B_TXT_ATK_NAME 0E
#define B_TXT_ATK_NAME_WITH_PREFIX 0F
#define B_TXT_DEF_NAME_WITH_PREFIX 10
#define B_TXT_EFF_NAME_WITH_PREFIX 11 // EFF = short for gEffectBank
#define B_TXT_SCR_ACTIVE_NAME_WITH_PREFIX 12
#define B_TXT_ACTIVE_NAME_WITH_PREFIX 13
#define B_TXT_CURRENT_MOVE 14
#define B_TXT_LAST_MOVE 15
#define B_TXT_LAST_ITEM 16
#define B_TXT_LAST_ABILITY 17
#define B_TXT_ATK_ABILITY 18
#define B_TXT_DEF_ABILITY 19
#define B_TXT_SCR_ACTIVE_ABILITY 1A
#define B_TXT_EFF_ABILITY 1B
#define B_TXT_TRAINER1_CLASS 1C
#define B_TXT_TRAINER1_NAME 1D
#define B_TXT_1E 1E // trainer name for a link player
#define B_TXT_1F 1F // trainer name for a link player
#define B_TXT_20 20 // trainer name for a link player
#define B_TXT_21 21 // trainer name for a link player
#define B_TXT_22 22 // trainer name for a link player
#define B_TXT_PLAYER_NAME 23
#define B_TXT_TRAINER1_LOSE_TEXT 24
#define B_TXT_TRAINER1_WIN_TEXT 25
#define B_TXT_26 26
#define B_TXT_PC_CREATOR_NAME 27
#define B_TXT_ATK_PREFIX1 28
#define B_TXT_DEF_PREFIX1 29
#define B_TXT_ATK_PREFIX2 2A
#define B_TXT_DEF_PREFIX2 2B
#define B_TXT_ATK_PREFIX3 2C
#define B_TXT_DEF_PREFIX3 2D
#define B_TXT_TRAINER2_CLASS 2E
#define B_TXT_TRAINER2_NAME 2F
#define B_TXT_TRAINER2_LOSE_TEXT 30
#define B_TXT_TRAINER2_WIN_TEXT 31
#define B_TXT_PARTNER_CLASS 32
#define B_TXT_PARTNER_NAME 33
#define B_TXT_BUFF3 34
// for B_TXT_BUFF1, B_TXT_BUFF2 and B_TXT_BUFF3
#define B_BUFF_STRING 0
#define B_BUFF_NUMBER 1
#define B_BUFF_MOVE 2
#define B_BUFF_TYPE 3
#define B_BUFF_MON_NICK_WITH_PREFIX 4
#define B_BUFF_STAT 5
#define B_BUFF_SPECIES 6
#define B_BUFF_MON_NICK 7
#define B_BUFF_NEGATIVE_FLAVOUR 8
#define B_BUFF_ABILITY 9
#define B_BUFF_ITEM 10
#define B_BUFF_PLACEHOLDER_BEGIN 0xFD
#define B_BUFF_EOS 0xFF
#define PREPARE_STAT_BUFFER(textVar, statId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_STAT; \
textVar[2] = statId; \
textVar[3] = B_BUFF_EOS; \
}
#define PREPARE_ABILITY_BUFFER(textVar, abilityId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_ABILITY; \
textVar[2] = abilityId; \
textVar[3] = B_BUFF_EOS; \
}
#define PREPARE_TYPE_BUFFER(textVar, typeId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_TYPE; \
textVar[2] = typeId; \
textVar[3] = B_BUFF_EOS; \
}
#define PREPARE_BYTE_NUMBER_BUFFER(textVar, maxDigits, number) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_NUMBER; \
textVar[2] = 1; \
textVar[3] = maxDigits; \
textVar[4] = (number); \
textVar[5] = B_BUFF_EOS; \
}
#define PREPARE_HWORD_NUMBER_BUFFER(textVar, maxDigits, number) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_NUMBER; \
textVar[2] = 2; \
textVar[3] = maxDigits; \
textVar[4] = (number); \
textVar[5] = (number & 0x0000FF00) >> 8; \
textVar[6] = B_BUFF_EOS; \
}
#define PREPARE_WORD_NUMBER_BUFFER(textVar, maxDigits, number) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_NUMBER; \
textVar[2] = 4; \
textVar[3] = maxDigits; \
textVar[4] = (number); \
textVar[5] = (number & 0x0000FF00) >> 8; \
textVar[6] = (number & 0x00FF0000) >> 16; \
textVar[7] = (number & 0xFF000000) >> 24; \
textVar[8] = B_BUFF_EOS; \
}
#define PREPARE_STRING_BUFFER(textVar, stringId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_STRING; \
textVar[2] = stringId; \
textVar[3] = (stringId & 0xFF00) >> 8; \
textVar[4] = B_BUFF_EOS; \
}
#define PREPARE_MOVE_BUFFER(textVar, move) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_MOVE; \
textVar[2] = move; \
textVar[3] = (move & 0xFF00) >> 8; \
textVar[4] = B_BUFF_EOS; \
}
#define PREPARE_ITEM_BUFFER(textVar, item) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_ITEM; \
textVar[2] = item; \
textVar[3] = (item & 0xFF00) >> 8; \
textVar[4] = B_BUFF_EOS; \
}
#define PREPARE_SPECIES_BUFFER(textVar, species) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_SPECIES; \
textVar[2] = species; \
textVar[3] = (species & 0xFF00) >> 8; \
textVar[4] = B_BUFF_EOS; \
}
#define PREPARE_MON_NICK_WITH_PREFIX_BUFFER(textVar, bank, partyId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_MON_NICK_WITH_PREFIX; \
textVar[2] = bank; \
textVar[3] = partyId; \
textVar[4] = B_BUFF_EOS; \
}
#define PREPARE_MON_NICK_BUFFER(textVar, bank, partyId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_MON_NICK; \
textVar[2] = bank; \
textVar[3] = partyId; \
textVar[4] = B_BUFF_EOS; \
}
struct StringInfoBattle struct StringInfoBattle
{ {
u16 currentMove; u16 currentMove;
@ -17,12 +202,15 @@ struct StringInfoBattle
}; };
void BufferStringBattle(u16 stringID); void BufferStringBattle(u16 stringID);
u32 StrCpyDecodeToDisplayedStringBattle(const u8* src); u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src);
u32 StrCpyDecodeBattle(const u8* src, u8* dst); u32 BattleStringExpandPlaceholders(const u8* src, u8* dst);
void sub_814F9EC(const u8* text, u8 arg1);
extern u8 gBattleTextBuff1[]; extern u8 gBattleTextBuff1[];
extern u8 gBattleTextBuff2[]; extern u8 gBattleTextBuff2[];
extern u8 gBattleTextBuff3[]; extern u8 gBattleTextBuff3[];
extern u8 gDisplayedStringBattle[]; extern u8 gDisplayedStringBattle[];
extern const u8* const gRefereeStringsTable[];
#endif // GUARD_BATTLE_MESSAGE_H #endif // GUARD_BATTLE_MESSAGE_H

View File

@ -0,0 +1,6 @@
#ifndef GUARD_CALCULATE_BASE_DAMAGE_H
#define GUARD_CALCULATE_BASE_DAMAGE_H
s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideStatus, u16 powerOverride, u8 typeOverride, u8 bankAtk, u8 bankDef);
#endif // GUARD_CALCULATE_BASE_DAMAGE_H

19
include/mail.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef GUARD_MAIL_H
#define GUARD_MAIL_H
#include "items.h"
#define IS_ITEM_MAIL(itemId)((itemId == ITEM_ORANGE_MAIL \
|| itemId == ITEM_HARBOR_MAIL \
|| itemId == ITEM_GLITTER_MAIL \
|| itemId == ITEM_MECH_MAIL \
|| itemId == ITEM_WOOD_MAIL \
|| itemId == ITEM_WAVE_MAIL \
|| itemId == ITEM_BEAD_MAIL \
|| itemId == ITEM_SHADOW_MAIL \
|| itemId == ITEM_TROPIC_MAIL \
|| itemId == ITEM_DREAM_MAIL \
|| itemId == ITEM_FAB_MAIL \
|| itemId == ITEM_RETRO_MAIL))
#endif // GUARD_MAIL_H

View File

@ -360,4 +360,6 @@ enum
MOVE_PSYCHO_BOOST, MOVE_PSYCHO_BOOST,
}; };
#endif // GUARD_MOVES_H #define LAST_MOVE_INDEX MOVE_PSYCHO_BOOST
#endif // GUARD_MOVES_H

12
include/naming_screen.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef GUARD_NAMING_SCREEN_H
#define GUARD_NAMING_SCREEN_H
#define NAMING_SCREEN_PLAYER 0
#define NAMING_SCREEN_BOX 1
#define NAMING_SCREEN_CAUGHT_MON 2
#define NAMING_SCREEN_3 3
#define NAMING_SCREEN_WANDA 4
void DoNamingScreen(u8 caseId, u8* dst, u16 monSpecies, u8 monGender, u32 monPersonality, void (*callback)(void));
#endif // GUARD_NAMING_SCREEN_H

View File

@ -6,6 +6,7 @@ const u8 *GetPokemonCategory(u16);
u16 GetPokedexHeightWeight(u16 dexNum, u8 data); u16 GetPokedexHeightWeight(u16 dexNum, u8 data);
u16 GetNationalPokedexCount(u8); u16 GetNationalPokedexCount(u8);
u16 GetHoennPokedexCount(u8); u16 GetHoennPokedexCount(u8);
u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality);
enum enum
{ {

View File

@ -126,6 +126,8 @@
#define TYPE_DRAGON 0x10 #define TYPE_DRAGON 0x10
#define TYPE_DARK 0x11 #define TYPE_DARK 0x11
#define NUMBER_OF_MON_TYPES 0x12
#define PARTY_SIZE 6 #define PARTY_SIZE 6
#define MAX_TOTAL_EVS 510 #define MAX_TOTAL_EVS 510
#define NUM_STATS 6 #define NUM_STATS 6
@ -333,6 +335,8 @@ struct UnknownPokemonStruct
u8 friendship; u8 friendship;
}; };
#define BATTLE_STATS_NO 8
struct BattlePokemon struct BattlePokemon
{ {
/*0x00*/ u16 species; /*0x00*/ u16 species;
@ -350,7 +354,7 @@ struct BattlePokemon
/*0x17*/ u32 spDefenseIV:5; /*0x17*/ u32 spDefenseIV:5;
/*0x17*/ u32 isEgg:1; /*0x17*/ u32 isEgg:1;
/*0x17*/ u32 altAbility:1; /*0x17*/ u32 altAbility:1;
/*0x18*/ s8 statStages[8]; /*0x18*/ s8 statStages[BATTLE_STATS_NO];
/*0x20*/ u8 ability; /*0x20*/ u8 ability;
/*0x21*/ u8 type1; /*0x21*/ u8 type1;
/*0x22*/ u8 type2; /*0x22*/ u8 type2;
@ -443,6 +447,7 @@ struct BattleMove
#define FLAG_PROTECT_AFFECTED 0x2 #define FLAG_PROTECT_AFFECTED 0x2
#define FLAG_MAGICCOAT_AFFECTED 0x4 #define FLAG_MAGICCOAT_AFFECTED 0x4
#define FLAG_SNATCH_AFFECTED 0x8 #define FLAG_SNATCH_AFFECTED 0x8
#define FLAG_MIRROR_MOVE_AFFECTED 0x10
#define FLAG_KINGSROCK_AFFECTED 0x20 #define FLAG_KINGSROCK_AFFECTED 0x20
struct SpindaSpot struct SpindaSpot
@ -520,6 +525,7 @@ extern struct PokemonStorage* gPokemonStoragePtr;
extern const u32 gExperienceTables[][MAX_MON_LEVEL + 1]; extern const u32 gExperienceTables[][MAX_MON_LEVEL + 1];
extern const u16 *const gLevelUpLearnsets[]; extern const u16 *const gLevelUpLearnsets[];
u8 CountAliveMonsInBattle(u8 caseId);
#define BATTLE_ALIVE_EXCEPT_ACTIVE 0 #define BATTLE_ALIVE_EXCEPT_ACTIVE 0
#define BATTLE_ALIVE_ATK_SIDE 1 #define BATTLE_ALIVE_ATK_SIDE 1
#define BATTLE_ALIVE_DEF_SIDE 2 #define BATTLE_ALIVE_DEF_SIDE 2
@ -620,6 +626,13 @@ bool8 IsPokeSpriteNotFlipped(u16 species);
bool8 IsMonShiny(struct Pokemon *mon); bool8 IsMonShiny(struct Pokemon *mon);
bool8 IsShinyOtIdPersonality(u32 otId, u32 personality); bool8 IsShinyOtIdPersonality(u32 otId, u32 personality);
void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies);
bool8 IsTradedMon(struct Pokemon *mon);
void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality);
s32 sub_806D864(u16 a1);
bool16 sub_806D82C(u8 id);
u16 MonTryLearningNewMove(struct Pokemon* mon, bool8);
#include "sprite.h" #include "sprite.h"
void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3);

7
include/pokemon_icon.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef GUARD_POKEMON_ICON_H
#define GUARD_POKEMON_ICON_H
const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo);
const u16 *GetValidMonIconPalettePtr(u16 speciesId);
#endif // GUARD_POKEMON_ICON_H

View File

@ -0,0 +1,8 @@
#ifndef GUARD_POKEMON_ITEM_EFFECTS
#define GUARD_POKEMON_ITEM_EFFECTS
#include "pokemon.h"
bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 itemId, u8 partyId, u8 monMoveIndex, u8 a5);
#endif // GUARD_POKEMON_ITEM_EFFECTS

View File

@ -0,0 +1,6 @@
#ifndef GUARD_POKEMON_STORAGE_SYSTEM_H
#define GUARD_POKEMON_STORAGE_SYSTEM_H
u8* GetBoxNamePtr(u8 boxNumber);
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H

View File

@ -0,0 +1,6 @@
#ifndef GUARD_RECORDED_BATTLE_H
#define GUARD_RECORDED_BATTLE_H
void RecordedBattle_SetBankAction(u8 bank, u8 action);
#endif // GUARD_RECORDED_BATTLE_H

View File

@ -0,0 +1,6 @@
#ifndef GUARD_RESHOW_BATTLE_SCREEN_H
#define GUARD_RESHOW_BATTLE_SCREEN_H
void ReshowBattleScreenAfterMenu(void);
#endif // GUARD_RESHOW_BATTLE_SCREEN_H

View File

@ -65,36 +65,46 @@
#define CHAR_x 0xEC #define CHAR_x 0xEC
#define CHAR_y 0xED #define CHAR_y 0xED
#define CHAR_z 0xEE #define CHAR_z 0xEE
#define CHAR_SPECIAL_F9 0xF9
#define CHAR_COLON 0xF0 #define CHAR_COLON 0xF0
#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog #define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog
#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog #define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog
#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code #define EXT_CTRL_CODE_BEGIN 0xFC // extended control code
#define PLACEHOLDER_BEGIN 0xFD // string placeholder #define PLACEHOLDER_BEGIN 0xFD // string placeholder
#define CHAR_NEWLINE 0xFE #define CHAR_NEWLINE 0xFE
#define EOS 0xFF // end of string #define EOS 0xFF // end of string
#define TEXT_COLOR_TRANSPARENT 0x0
#define TEXT_COLOR_WHITE 0x1
#define TEXT_COLOR_DARK_GREY 0x2
// battle placeholders are located in battle_message.h
#define EXT_CTRL_CODE_JPN 0x15 #define EXT_CTRL_CODE_JPN 0x15
#define EXT_CTRL_CODE_ENG 0x16 #define EXT_CTRL_CODE_ENG 0x16
#define NUM_TEXT_PRINTERS 32 #define NUM_TEXT_PRINTERS 32
struct TextSubPrinter // TODO: Better name
{
u8* current_text_offset;
u8 windowId;
u8 fontId;
u8 x;
u8 y;
u8 currentX; // 0x8
u8 currentY;
u8 letterSpacing;
u8 lineSpacing;
u8 fontColor_l:4; // 0xC
u8 fontColor_h:4;
u8 bgColor:4;
u8 shadowColor:4;
};
struct TextPrinter struct TextPrinter
{ {
struct TextSubPrinter { // TODO: Better name struct TextSubPrinter subPrinter;
u8* current_text_offset;
u8 windowId;
u8 fontId;
u8 x;
u8 y;
u8 currentX; // 0x8
u8 currentY;
u8 letterSpacing;
u8 lineSpacing;
u8 fontColor_l:4; // 0xC
u8 fontColor_h:4;
u8 bgColor:4;
u8 shadowColor:4;
} subPrinter;
void (*callback)(struct TextSubPrinter *, u16); // 0x10 void (*callback)(struct TextSubPrinter *, u16); // 0x10

View File

@ -55,7 +55,7 @@ void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height);
void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height); void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height);
void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight); void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight);
void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
void CopyToWindowPixelBuffer(u8 windowId, u8 *src, u16 size, u16 tileOffset); void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset);
void FillWindowPixelBuffer(u8 windowId, u8 fillValue); void FillWindowPixelBuffer(u8 windowId, u8 fillValue);
void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue); void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue);
void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8)); void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8));

View File

@ -59,8 +59,7 @@ SECTIONS {
asm/battle_1.o(.text); asm/battle_1.o(.text);
asm/battle_2.o(.text); asm/battle_2.o(.text);
src/battle_3.o(.text); src/battle_3.o(.text);
src/battle_4.o(.text); src/battle_script_commands.o(.text);
asm/battle_4.o(.text);
asm/battle_5.o(.text); asm/battle_5.o(.text);
asm/battle_controller_player.o(.text); asm/battle_controller_player.o(.text);
asm/battle_7.o(.text); asm/battle_7.o(.text);
@ -176,7 +175,7 @@ SECTIONS {
asm/decoration.o(.text); asm/decoration.o(.text);
asm/slot_machine.o(.text); asm/slot_machine.o(.text);
asm/contest_painting.o(.text); asm/contest_painting.o(.text);
src/battle_ai.o(.text); src/battle_ai_script_commands.o(.text);
asm/trader.o(.text); asm/trader.o(.text);
asm/starter_choose.o(.text); asm/starter_choose.o(.text);
asm/wallclock.o(.text); asm/wallclock.o(.text);
@ -328,8 +327,7 @@ SECTIONS {
data/link.o(.rodata); data/link.o(.rodata);
src/rtc.o(.rodata); src/rtc.o(.rodata);
data/data2b.o(.rodata); data/data2b.o(.rodata);
src/battle_4.o(.rodata); src/battle_script_commands.o(.rodata);
data/battle_4.o(.rodata);
data/battle_controller_player.o(.rodata); data/battle_controller_player.o(.rodata);
data/smokescreen.o(.rodata); data/smokescreen.o(.rodata);
data/battle_controller_opponent.o(.rodata); data/battle_controller_opponent.o(.rodata);
@ -409,7 +407,7 @@ SECTIONS {
data/decoration.o(.rodata); data/decoration.o(.rodata);
data/slot_machine.o(.rodata); data/slot_machine.o(.rodata);
data/contest_painting.o(.rodata); data/contest_painting.o(.rodata);
src/battle_ai.o(.rodata); src/battle_ai_script_commands.o(.rodata);
data/data4.o(.rodata); data/data4.o(.rodata);
data/battle_controller_link_partner.o(.rodata); data/battle_controller_link_partner.o(.rodata);
data/battle_message.o(.rodata); data/battle_message.o(.rodata);

File diff suppressed because it is too large Load Diff

View File

@ -1,601 +0,0 @@
#include "global.h"
#include "battle.h"
#include "battle_move_effects.h"
#include "moves.h"
#include "abilities.h"
#include "item.h"
#include "items.h"
#include "hold_effects.h"
void atk00_attackcanceler(void);
void atk01_accuracycheck(void);
void atk02_attackstring(void);
void atk03_ppreduce(void);
void atk04_critcalc(void);
void atk05_damagecalc1(void);
void atk06_typecalc(void);
void atk07_dmg_adjustment(void);
void atk08_dmg_adjustment2(void);
void atk09_attackanimation(void);
void atk0A_waitanimation(void);
void atk0B_healthbarupdate(void);
void atk0C_datahpupdate(void);
void atk0D_critmessage(void);
void atk0E_effectiveness_sound(void);
void atk0F_resultmessage(void);
void atk10_printstring(void);
void atk11_printstring_playeronly(void);
void atk12_waitmessage(void);
void atk13_printfromtable(void);
void atk14_printfromtable_playeronly(void);
void atk15_seteffectwithchancetarget(void);
void atk16_seteffectprimary(void);
void atk17_seteffectsecondary(void);
void atk18_status_effect_clear(void);
void atk19_faint_pokemon(void);
void atk1A_faint_animation(void);
void atk1B_faint_effects_clear(void);
void atk1C_jumpifstatus(void);
void atk1D_jumpifstatus2(void);
void atk1E_jumpifability(void);
void atk1F_jumpifsideaffecting(void);
void atk20_jumpifstat(void);
void atk21_jumpifstatus3(void);
void atk22_jumpiftype(void);
void atk23_getexp(void);
void atk24(void);
void atk25_move_values_cleanup(void);
void atk26_set_multihit(void);
void atk27_decrement_multihit(void);
void atk28_goto(void);
void atk29_jumpifbyte(void);
void atk2A_jumpifhalfword(void);
void atk2B_jumpifword(void);
void atk2C_jumpifarrayequal(void);
void atk2D_jumpifarraynotequal(void);
void atk2E_setbyte(void);
void atk2F_addbyte(void);
void atk30_subbyte(void);
void atk31_copyarray(void);
void atk32_copyarray_withindex(void);
void atk33_orbyte(void);
void atk34_orhalfword(void);
void atk35_orword(void);
void atk36_bicbyte(void);
void atk37_bichalfword(void);
void atk38_bicword(void);
void atk39_pause(void);
void atk3A_waitstate(void);
void atk3B_healthbar_update(void);
void atk3C_return(void);
void atk3D_end(void);
void atk3E_end2(void);
void atk3F_end3(void);
void atk40_jump_if_move_affected_by_protect(void);
void atk41_call(void);
void atk42_jumpiftype2(void);
void atk43_jumpifabilitypresent(void);
void atk44(void);
void atk45_playanimation(void);
void atk46_playanimation2(void);
void atk47_setgraphicalstatchangevalues(void);
void atk48_playstatchangeanimation(void);
void atk49_moveendturn(void);
void atk4A_typecalc2(void);
void atk4B_return_atk_to_ball(void);
void atk4C_copy_poke_data(void);
void atk4D_switch_data_update(void);
void atk4E_switchin_anim(void);
void atk4F_jump_if_cannot_switch(void);
void atk50_openpartyscreen(void);
void atk51_switch_handle_order(void);
void atk52_switch_in_effects(void);
void atk53_trainer_slide(void);
void atk54_effectiveness_sound(void);
void atk55_play_sound(void);
void atk56_fainting_cry(void);
void atk57(void);
void atk58_return_to_ball(void);
void atk59_learnmove_inbattle(void);
void atk5A(void);
void atk5B_80256E0(void);
void atk5C_hitanimation(void);
void atk5D_getmoneyreward(void);
void atk5E_8025A70(void);
void atk5F_8025B24(void);
void atk60_increment_gamestat(void);
void atk61_8025BA4(void);
void atk62_08025C6C(void);
void atk63_jumptorandomattack(void);
void atk64_statusanimation(void);
void atk65_status2animation(void);
void atk66_chosenstatusanimation(void);
void atk67_8025ECC(void);
void atk68_80246A0(void);
void atk69_dmg_adjustment2(void);
void atk6A_removeitem(void);
void atk6B_atknameinbuff1(void);
void atk6C_lvlbox_display(void);
void atk6D_set_sentpokes_values(void);
void atk6E_set_atk_to_player0(void);
void atk6F_set_visible(void);
void atk70_record_ability(void);
void atk71_buffer_move_to_learn(void);
void atk72_jump_if_can_run_frombattle(void);
void atk73_hp_thresholds(void);
void atk74_hp_thresholds2(void);
void atk75_8026A58(void);
void atk76_various(void);
void atk77_setprotect(void);
void atk78_faintifabilitynotdamp(void);
void atk79_setatkhptozero(void);
void atk7A_jumpwhiletargetvalid(void);
void atk7B_healhalfHP_if_possible(void);
void atk7C_8025508(void);
void atk7D_set_rain(void);
void atk7E_setreflect(void);
void atk7F_setseeded(void);
void atk80_manipulatedamage(void);
void atk81_setrest(void);
void atk82_jumpifnotfirstturn(void);
void atk83_nop(void);
void atk84_jump_if_cant_sleep(void);
void atk85_stockpile(void);
void atk86_stockpiletobasedamage(void);
void atk87_stockpiletohpheal(void);
void atk88_negativedamage(void);
void atk89_statbuffchange(void);
void atk8A_normalisebuffs(void);
void atk8B_setbide(void);
void atk8C_confuseifrepeatingattackends(void);
void atk8D_setmultihit_counter(void);
void atk8E_prepare_multihit(void);
void atk8F_forcerandomswitch(void);
void atk90_conversion_type_change(void);
void atk91_givepaydaymoney(void);
void atk92_setlightscreen(void);
void atk93_ko_move(void);
void atk94_gethalfcurrentenemyhp(void);
void atk95_setsandstorm(void);
void atk96_weatherdamage(void);
void atk97_try_infatuation(void);
void atk98_status_icon_update(void);
void atk99_setmist(void);
void atk9A_set_focusenergy(void);
void atk9B_transformdataexecution(void);
void atk9C_set_substitute(void);
void atk9D_copyattack(void);
void atk9E_metronome(void);
void atk9F_dmgtolevel(void);
void atkA0_psywavedamageeffect(void);
void atkA1_counterdamagecalculator(void);
void atkA2_mirrorcoatdamagecalculator(void);
void atkA3_disablelastusedattack(void);
void atkA4_setencore(void);
void atkA5_painsplitdmgcalc(void);
void atkA6_settypetorandomresistance(void);
void atkA7_setalwayshitflag(void);
void atkA8_copymovepermanently(void);
void atkA9_sleeptalk_choose_move(void);
void atkAA_set_destinybond(void);
void atkAB_DestinyBondFlagUpdate(void);
void atkAC_remaininghptopower(void);
void atkAD_spite_ppreduce(void);
void atkAE_heal_party_status(void);
void atkAF_cursetarget(void);
void atkB0_set_spikes(void);
void atkB1_set_foresight(void);
void atkB2_setperishsong(void);
void atkB3_rolloutdamagecalculation(void);
void atkB4_jumpifconfusedandstatmaxed(void);
void atkB5_furycuttercalc(void);
void atkB6_happinesstodamagecalculation(void);
void atkB7_presentdamagecalculation(void);
void atkB8_set_safeguard(void);
void atkB9_magnitudedamagecalculation(void);
void atkBA_jumpifnopursuitswitchdmg(void);
void atkBB_setsunny(void);
void atkBC_maxattackhalvehp(void);
void atkBD_copyfoestats(void);
void atkBE_breakfree(void);
void atkBF_set_defense_curl(void);
void atkC0_recoverbasedonsunlight(void);
void atkC1_hidden_power(void);
void atkC2_selectnexttarget(void);
void atkC3_setfutureattack(void);
void atkC4_beat_up(void);
void atkC5_hidepreattack(void);
void atkC6_unhidepostattack(void);
void atkC7_setminimize(void);
void atkC8_sethail(void);
void atkC9_jumpifattackandspecialattackcannotfall(void);
void atkCA_setforcedtarget(void);
void atkCB_setcharge(void);
void atkCC_callterrainattack(void);
void atkCD_cureifburnedparalysedorpoisoned(void);
void atkCE_settorment(void);
void atkCF_jumpifnodamage(void);
void atkD0_settaunt(void);
void atkD1_set_helpinghand(void);
void atkD2_swap_items(void);
void atkD3_copy_ability(void);
void atkD4_wish_effect(void);
void atkD5_setroots(void);
void atkD6_doubledamagedealtifdamaged(void);
void atkD7_setyawn(void);
void atkD8_setdamagetohealthdifference(void);
void atkD9_scaledamagebyhealthratio(void);
void atkDA_abilityswap(void);
void atkDB_imprisoneffect(void);
void atkDC_setgrudge(void);
void atkDD_weightdamagecalculation(void);
void atkDE_asistattackselect(void);
void atkDF_setmagiccoat(void);
void atkE0_setstealstatchange(void);
void atkE1_intimidate_string_loader(void);
void atkE2_switchout_abilities(void);
void atkE3_jumpiffainted(void);
void atkE4_getsecretpowereffect(void);
void atkE5_pickup(void);
void atkE6_castform_change_animation(void);
void atkE7_castform_data_change(void);
void atkE8_settypebasedhalvers(void);
void atkE9_setweatherballtype(void);
void atkEA_recycleitem(void);
void atkEB_settypetoterrain(void);
void atkEC_pursuit_sth(void);
void atkED_802B4B4(void);
void atkEE_removelightscreenreflect(void);
void atkEF_pokeball_catch_calculation(void);
void atkF0_copy_caught_poke(void);
void atkF1_setpoke_as_caught(void);
void atkF2_display_dex_info(void);
void atkF3_nickname_caught_poke(void);
void atkF4_802BEF0(void);
void atkF5_removeattackerstatus1(void);
void atkF6_802BF48(void);
void atkF7_802BF54(void);
void sub_8056EF8(void);
void (* const gBattleScriptingCommandsTable[])(void) =
{
atk00_attackcanceler,
atk01_accuracycheck,
atk02_attackstring,
atk03_ppreduce,
atk04_critcalc,
atk05_damagecalc1,
atk06_typecalc,
atk07_dmg_adjustment,
atk08_dmg_adjustment2,
atk09_attackanimation,
atk0A_waitanimation,
atk0B_healthbarupdate,
atk0C_datahpupdate,
atk0D_critmessage,
atk0E_effectiveness_sound,
atk0F_resultmessage,
atk10_printstring,
atk11_printstring_playeronly,
atk12_waitmessage,
atk13_printfromtable,
atk14_printfromtable_playeronly,
atk15_seteffectwithchancetarget,
atk16_seteffectprimary,
atk17_seteffectsecondary,
atk18_status_effect_clear,
atk19_faint_pokemon,
atk1A_faint_animation,
atk1B_faint_effects_clear,
atk1C_jumpifstatus,
atk1D_jumpifstatus2,
atk1E_jumpifability,
atk1F_jumpifsideaffecting,
atk20_jumpifstat,
atk21_jumpifstatus3,
atk22_jumpiftype,
atk23_getexp,
atk24,
atk25_move_values_cleanup,
atk26_set_multihit,
atk27_decrement_multihit,
atk28_goto,
atk29_jumpifbyte,
atk2A_jumpifhalfword,
atk2B_jumpifword,
atk2C_jumpifarrayequal,
atk2D_jumpifarraynotequal,
atk2E_setbyte,
atk2F_addbyte,
atk30_subbyte,
atk31_copyarray,
atk32_copyarray_withindex,
atk33_orbyte,
atk34_orhalfword,
atk35_orword,
atk36_bicbyte,
atk37_bichalfword,
atk38_bicword,
atk39_pause,
atk3A_waitstate,
atk3B_healthbar_update,
atk3C_return,
atk3D_end,
atk3E_end2,
atk3F_end3,
atk40_jump_if_move_affected_by_protect,
atk41_call,
atk42_jumpiftype2,
atk43_jumpifabilitypresent,
atk44,
atk45_playanimation,
atk46_playanimation2,
atk47_setgraphicalstatchangevalues,
atk48_playstatchangeanimation,
atk49_moveendturn,
atk4A_typecalc2,
atk4B_return_atk_to_ball,
atk4C_copy_poke_data,
atk4D_switch_data_update,
atk4E_switchin_anim,
atk4F_jump_if_cannot_switch,
atk50_openpartyscreen,
atk51_switch_handle_order,
atk52_switch_in_effects,
atk53_trainer_slide,
atk54_effectiveness_sound,
atk55_play_sound,
atk56_fainting_cry,
atk57,
atk58_return_to_ball,
atk59_learnmove_inbattle,
atk5A,
atk5B_80256E0,
atk5C_hitanimation,
atk5D_getmoneyreward,
atk5E_8025A70,
atk5F_8025B24,
atk60_increment_gamestat,
atk61_8025BA4,
atk62_08025C6C,
atk63_jumptorandomattack,
atk64_statusanimation,
atk65_status2animation,
atk66_chosenstatusanimation,
atk67_8025ECC,
atk68_80246A0,
atk69_dmg_adjustment2,
atk6A_removeitem,
atk6B_atknameinbuff1,
atk6C_lvlbox_display,
atk6D_set_sentpokes_values,
atk6E_set_atk_to_player0,
atk6F_set_visible,
atk70_record_ability,
atk71_buffer_move_to_learn,
atk72_jump_if_can_run_frombattle,
atk73_hp_thresholds,
atk74_hp_thresholds2,
atk75_8026A58,
atk76_various,
atk77_setprotect,
atk78_faintifabilitynotdamp,
atk79_setatkhptozero,
atk7A_jumpwhiletargetvalid,
atk7B_healhalfHP_if_possible,
atk7C_8025508,
atk7D_set_rain,
atk7E_setreflect,
atk7F_setseeded,
atk80_manipulatedamage,
atk81_setrest,
atk82_jumpifnotfirstturn,
atk83_nop,
atk84_jump_if_cant_sleep,
atk85_stockpile,
atk86_stockpiletobasedamage,
atk87_stockpiletohpheal,
atk88_negativedamage,
atk89_statbuffchange,
atk8A_normalisebuffs,
atk8B_setbide,
atk8C_confuseifrepeatingattackends,
atk8D_setmultihit_counter,
atk8E_prepare_multihit,
atk8F_forcerandomswitch,
atk90_conversion_type_change,
atk91_givepaydaymoney,
atk92_setlightscreen,
atk93_ko_move,
atk94_gethalfcurrentenemyhp,
atk95_setsandstorm,
atk96_weatherdamage,
atk97_try_infatuation,
atk98_status_icon_update,
atk99_setmist,
atk9A_set_focusenergy,
atk9B_transformdataexecution,
atk9C_set_substitute,
atk9D_copyattack,
atk9E_metronome,
atk9F_dmgtolevel,
atkA0_psywavedamageeffect,
atkA1_counterdamagecalculator,
atkA2_mirrorcoatdamagecalculator,
atkA3_disablelastusedattack,
atkA4_setencore,
atkA5_painsplitdmgcalc,
atkA6_settypetorandomresistance,
atkA7_setalwayshitflag,
atkA8_copymovepermanently,
atkA9_sleeptalk_choose_move,
atkAA_set_destinybond,
atkAB_DestinyBondFlagUpdate,
atkAC_remaininghptopower,
atkAD_spite_ppreduce,
atkAE_heal_party_status,
atkAF_cursetarget,
atkB0_set_spikes,
atkB1_set_foresight,
atkB2_setperishsong,
atkB3_rolloutdamagecalculation,
atkB4_jumpifconfusedandstatmaxed,
atkB5_furycuttercalc,
atkB6_happinesstodamagecalculation,
atkB7_presentdamagecalculation,
atkB8_set_safeguard,
atkB9_magnitudedamagecalculation,
atkBA_jumpifnopursuitswitchdmg,
atkBB_setsunny,
atkBC_maxattackhalvehp,
atkBD_copyfoestats,
atkBE_breakfree,
atkBF_set_defense_curl,
atkC0_recoverbasedonsunlight,
atkC1_hidden_power,
atkC2_selectnexttarget,
atkC3_setfutureattack,
atkC4_beat_up,
atkC5_hidepreattack,
atkC6_unhidepostattack,
atkC7_setminimize,
atkC8_sethail,
atkC9_jumpifattackandspecialattackcannotfall,
atkCA_setforcedtarget,
atkCB_setcharge,
atkCC_callterrainattack,
atkCD_cureifburnedparalysedorpoisoned,
atkCE_settorment,
atkCF_jumpifnodamage,
atkD0_settaunt,
atkD1_set_helpinghand,
atkD2_swap_items,
atkD3_copy_ability,
atkD4_wish_effect,
atkD5_setroots,
atkD6_doubledamagedealtifdamaged,
atkD7_setyawn,
atkD8_setdamagetohealthdifference,
atkD9_scaledamagebyhealthratio,
atkDA_abilityswap,
atkDB_imprisoneffect,
atkDC_setgrudge,
atkDD_weightdamagecalculation,
atkDE_asistattackselect,
atkDF_setmagiccoat,
atkE0_setstealstatchange,
atkE1_intimidate_string_loader,
atkE2_switchout_abilities,
atkE3_jumpiffainted,
atkE4_getsecretpowereffect,
atkE5_pickup,
atkE6_castform_change_animation,
atkE7_castform_data_change,
atkE8_settypebasedhalvers,
atkE9_setweatherballtype,
atkEA_recycleitem,
atkEB_settypetoterrain,
atkEC_pursuit_sth,
atkED_802B4B4,
atkEE_removelightscreenreflect,
atkEF_pokeball_catch_calculation,
atkF0_copy_caught_poke,
atkF1_setpoke_as_caught,
atkF2_display_dex_info,
atkF3_nickname_caught_poke,
atkF4_802BEF0,
atkF5_removeattackerstatus1,
atkF6_802BF48,
atkF7_802BF54,
sub_8056EF8
};
struct statFractions
{
u8 dividend;
u8 divisor;
};
const struct statFractions gAccuracyStageRatios[] =
{
{ 33, 100}, // -6
{ 36, 100}, // -5
{ 43, 100}, // -4
{ 50, 100}, // -3
{ 60, 100}, // -2
{ 75, 100}, // -1
{ 1, 1}, // 0
{133, 100}, // +1
{166, 100}, // +2
{ 2, 1}, // +3
{233, 100}, // +4
{133, 50}, // +5
{ 3, 1}, // +6
};
// The chance is 1/N for each stage.
const u16 gCriticalHitChance[] = {16, 8, 4, 3, 2};
const u32 gStatusFlagsForMoveEffects[] =
{
0x00000000,
0x00000007,
0x00000008,
0x00000010,
0x00000020,
0x00000040,
0x00000080,
0x00000007,
0x00000008,
0x00000000,
0x00000070,
0x00000000,
0x00001000,
0x0000E000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00400000,
0x00000000,
0x00000000,
0x04000000,
0x08000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000C00,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000
};

View File

@ -1,5 +1,5 @@
#include "global.h" #include "global.h"
#include "battle_ai.h" #include "battle_ai_script_commands.h"
#include "pokemon.h" #include "pokemon.h"
#include "battle.h" #include "battle.h"
#include "species.h" #include "species.h"
@ -73,10 +73,7 @@ extern const struct BaseStats gBaseStats[];
extern const u32 gBitTable[]; extern const u32 gBitTable[];
extern u8 * const gBattleAI_ScriptsTable[]; extern u8 * const gBattleAI_ScriptsTable[];
extern u8 GetBankIdentity(u8);
extern u8 b_first_side(u8, u8, u8); extern u8 b_first_side(u8, u8, u8);
extern u8 GetBankByPlayerAI(u8);
extern void TypeCalc(u16 move, u8 bankAtk, u8 bankDef);
extern void AI_CalcDmg(u8, u8); extern void AI_CalcDmg(u8, u8);
extern u8 CheckMoveLimitations(); extern u8 CheckMoveLimitations();
@ -1805,7 +1802,7 @@ static void BattleAICmd_count_alive_pokemon(void)
u32 status; u32 status;
bankOnField1 = gBattlePartyID[index]; bankOnField1 = gBattlePartyID[index];
status = GetBankIdentity(index) ^ 2; status = GetBankIdentity(index) ^ 2;
bankOnField2 = gBattlePartyID[GetBankByPlayerAI(status)]; bankOnField2 = gBattlePartyID[GetBankByIdentity(status)];
} }
else // in singles there's only one bank by side else // in singles there's only one bank by side
{ {

11415
src/battle_script_commands.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,6 @@ extern struct BattleEnigmaBerry gEnigmaBerries[];
extern u16 gBattleMovePower; extern u16 gBattleMovePower;
extern u16 gTrainerBattleOpponent_A; extern u16 gTrainerBattleOpponent_A;
u8 CountAliveMonsInBattle(u8);
bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 bank); bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 bank);
extern const struct BattleMove gBattleMoves[]; extern const struct BattleMove gBattleMoves[];

View File

@ -35,7 +35,7 @@ extern const u8 gText_BadEgg[];
extern const u8 gText_EggNickname[]; extern const u8 gText_EggNickname[];
extern u8 GetBankSide(u8 bank); extern u8 GetBankSide(u8 bank);
extern u8 GetBankByPlayerAI(u8 bank); extern u8 GetBankByIdentity(u8 bank);
extern u8 GetBankIdentity(u8 bank); extern u8 GetBankIdentity(u8 bank);
u8 CountAliveMonsInBattle(u8 caseId) u8 CountAliveMonsInBattle(u8 caseId)
@ -90,7 +90,7 @@ u8 sub_8069F34(u8 bank)
status ^= 1; status ^= 1;
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
return GetBankByPlayerAI(status); return GetBankByIdentity(status);
if (CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) > 1) if (CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) > 1)
{ {
u8 val; u8 val;
@ -99,14 +99,14 @@ u8 sub_8069F34(u8 bank)
val = status ^ 2; val = status ^ 2;
else else
val = status; val = status;
return GetBankByPlayerAI(val); return GetBankByIdentity(val);
} }
else else
{ {
if ((gAbsentBankFlags & gBitTable[status])) if ((gAbsentBankFlags & gBitTable[status]))
return GetBankByPlayerAI(status ^ 2); return GetBankByIdentity(status ^ 2);
else else
return GetBankByPlayerAI(status); return GetBankByIdentity(status);
} }
} }

View File

@ -216,7 +216,7 @@ void sub_806CF24(s32 stat)
gBankTarget = gBankInMenu; gBankTarget = gBankInMenu;
StringCopy(gBattleTextBuff1, gStatNamesTable[gUnknown_08329EC8[stat]]); StringCopy(gBattleTextBuff1, gStatNamesTable[gUnknown_08329EC8[stat]]);
StringCopy(gBattleTextBuff2, gText_StatRose); StringCopy(gBattleTextBuff2, gText_StatRose);
StrCpyDecodeToDisplayedStringBattle(gText_PkmnsStatChanged2); BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnsStatChanged2);
} }
u8 *sub_806CF78(u16 itemId) u8 *sub_806CF78(u16 itemId)
@ -251,7 +251,7 @@ u8 *sub_806CF78(u16 itemId)
else else
{ {
gBankAttacker = gBankInMenu; gBankAttacker = gBankInMenu;
StrCpyDecodeToDisplayedStringBattle(gText_PkmnGettingPumped); BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnGettingPumped);
} }
} }
} }
@ -259,7 +259,7 @@ u8 *sub_806CF78(u16 itemId)
if (itemEffect[3] & 0x80) if (itemEffect[3] & 0x80)
{ {
gBankAttacker = gBankInMenu; gBankAttacker = gBankInMenu;
StrCpyDecodeToDisplayedStringBattle(gText_PkmnShroudedInMist); BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnShroudedInMist);
} }
return gDisplayedStringBattle; return gDisplayedStringBattle;
@ -601,9 +601,9 @@ bool8 sub_806D7EC(void)
return retVal; return retVal;
} }
bool8 sub_806D82C(u8 id) bool16 sub_806D82C(u8 id)
{ {
bool8 retVal = FALSE; bool16 retVal = FALSE;
switch (gLinkPlayers[id].lp_field_18) switch (gLinkPlayers[id].lp_field_18)
{ {
case 0: case 0:
@ -1361,20 +1361,20 @@ void BoxMonRestorePP(struct BoxPokemon *boxMon)
void sub_806E994(void) void sub_806E994(void)
{ {
gLastUsedAbility = gBattleStruct->field_B0; gLastUsedAbility = gBattleStruct->field_B0;
gBattleTextBuff1[0] = 0xFD;
gBattleTextBuff1[1] = 4; gBattleTextBuff1[0] = B_BUFF_PLACEHOLDER_BEGIN;
gBattleTextBuff1[1] = B_BUFF_MON_NICK_WITH_PREFIX;
gBattleTextBuff1[2] = gBattleStruct->field_49; gBattleTextBuff1[2] = gBattleStruct->field_49;
gBattleTextBuff1[4] = EOS; gBattleTextBuff1[4] = B_BUFF_EOS;
if (!GetBankSide(gBattleStruct->field_49)) if (!GetBankSide(gBattleStruct->field_49))
gBattleTextBuff1[3] = pokemon_order_func(gBattlePartyID[gBattleStruct->field_49]); gBattleTextBuff1[3] = pokemon_order_func(gBattlePartyID[gBattleStruct->field_49]);
else else
gBattleTextBuff1[3] = gBattlePartyID[gBattleStruct->field_49]; gBattleTextBuff1[3] = gBattlePartyID[gBattleStruct->field_49];
gBattleTextBuff2[0] = 0xFD;
gBattleTextBuff2[1] = 4; PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff2, gBankInMenu, pokemon_order_func(gBattlePartyID[gBankInMenu]))
gBattleTextBuff2[2] = gBankInMenu;
gBattleTextBuff2[3] = pokemon_order_func(gBattlePartyID[gBankInMenu]); BattleStringExpandPlaceholders(gText_PkmnsXPreventsSwitching, gStringVar4);
gBattleTextBuff2[4] = EOS;
StrCpyDecodeBattle(gText_PkmnsXPreventsSwitching, gStringVar4);
} }
struct PokeItem struct PokeItem
@ -1388,7 +1388,7 @@ extern const struct PokeItem gAlteringCaveWildMonHeldItems[9];
static s32 GetWildMonTableIdInAlteringCave(u16 species) static s32 GetWildMonTableIdInAlteringCave(u16 species)
{ {
s32 i; s32 i;
for (i = 0; i < 9; i++) for (i = 0; i < (s32) ARRAY_COUNT(gAlteringCaveWildMonHeldItems); i++)
if (gAlteringCaveWildMonHeldItems[i].species == species) if (gAlteringCaveWildMonHeldItems[i].species == species)
return i; return i;
return 0; return 0;

View File

@ -451,7 +451,7 @@ void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16
FillBitmapRect4Bit(&pixelRect, x, y, width, height, fillValue); FillBitmapRect4Bit(&pixelRect, x, y, width, height, fillValue);
} }
void CopyToWindowPixelBuffer(u8 windowId, u8 *src, u16 size, u16 tileOffset) void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset)
{ {
if (size != 0) if (size != 0)
CpuCopy16(src, gWindows[windowId].tileData + (0x20 * tileOffset), size); CpuCopy16(src, gWindows[windowId].tileData + (0x20 * tileOffset), size);

View File

@ -218,7 +218,7 @@ gUnknown_03005D3A: @ 3005D3A
gUnknown_03005D46: @ 3005D46 gUnknown_03005D46: @ 3005D46
.space 0xE .space 0xE
gUnknown_03005D54: @ 3005D54 gLeveledUpInBattle: @ 3005D54
.space 0xC .space 0xC
gBattleBankFunc: @ 3005D60 gBattleBankFunc: @ 3005D60

View File

@ -211,19 +211,19 @@ gUnknown_02022E14: @ 2022E14
gUnknown_02022E16: @ 2022E16 gUnknown_02022E16: @ 2022E16
.space 0x2 .space 0x2
gUnknown_02022E18: @ 2022E18 gBattle_BG1_X: @ 2022E18
.space 0x2 .space 0x2
gUnknown_02022E1A: @ 2022E1A gBattle_BG1_Y: @ 2022E1A
.space 0x2 .space 0x2
gUnknown_02022E1C: @ 2022E1C gBattle_BG2_X: @ 2022E1C
.space 0x2 .space 0x2
gUnknown_02022E1E: @ 2022E1E gBattle_BG2_Y: @ 2022E1E
.space 0x2 .space 0x2
gUnknown_02022E20: @ 2022E20 gBattle_BG3_X: @ 2022E20
.space 0x2 .space 0x2
gUnknown_02022E22: @ 2022E22 gUnknown_02022E22: @ 2022E22
@ -268,7 +268,7 @@ gUnknown_02022F88: @ 2022F88
gBattleTypeFlags: @ 2022FEC gBattleTypeFlags: @ 2022FEC
.space 0x4 .space 0x4
gUnknown_02022FF0: @ 2022FF0 gBattleTerrain: @ 2022FF0
.space 0x4 .space 0x4
gUnknown_02022FF4: @ 2022FF4 gUnknown_02022FF4: @ 2022FF4
@ -313,7 +313,7 @@ gUnknown_0202407A: @ 202407A
gTurnOrder: @ 202407E gTurnOrder: @ 202407E
.space 0x4 .space 0x4
gUnknown_02024082: @ 2024082 gCurrentMoveTurn: @ 2024082
.space 0x1 .space 0x1
gFightStateTracker: @ 2024083 gFightStateTracker: @ 2024083
@ -334,7 +334,7 @@ gUnknown_020241E9: @ 20241E9
gCurrentMove: @ 20241EA gCurrentMove: @ 20241EA
.space 0x2 .space 0x2
gUnknown_020241EC: @ 20241EC gLastUsedMove: @ 20241EC
.space 0x2 .space 0x2
gRandomMove: @ 20241EE gRandomMove: @ 20241EE
@ -343,7 +343,7 @@ gRandomMove: @ 20241EE
gBattleMoveDamage: @ 20241F0 gBattleMoveDamage: @ 20241F0
.space 0x4 .space 0x4
gUnknown_020241F4: @ 20241F4 gHpDealt: @ 20241F4
.space 0x4 .space 0x4
gTakenDmg: @ 20241F8 gTakenDmg: @ 20241F8
@ -376,13 +376,13 @@ gAbsentBankFlags: @ 2024210
gCritMultiplier: @ 2024211 gCritMultiplier: @ 2024211
.space 0x1 .space 0x1
gUnknown_02024212: @ 2024212 gMultiHitCounter: @ 2024212
.space 0x2 .space 0x2
gBattlescriptCurrInstr: @ 2024214 gBattlescriptCurrInstr: @ 2024214
.space 0x8 .space 0x8
gUnknown_0202421C: @ 202421C gActionForBanks: @ 202421C
.space 0x4 .space 0x4
gUnknown_02024220: @ 2024220 gUnknown_02024220: @ 2024220
@ -391,7 +391,7 @@ gUnknown_02024220: @ 2024220
gUnknown_02024230: @ 2024230 gUnknown_02024230: @ 2024230
.space 0x10 .space 0x10
gUnknown_02024240: @ 2024240 gUnknownMovesUsedByBanks: @ 2024240
.space 0x8 .space 0x8
gLastUsedMovesByBanks: @ 2024248 gLastUsedMovesByBanks: @ 2024248
@ -406,7 +406,7 @@ gUnknown_02024258: @ 2024258
gUnknown_02024260: @ 2024260 gUnknown_02024260: @ 2024260
.space 0x8 .space 0x8
gUnknown_02024268: @ 2024268 gLockedMoves: @ 2024268
.space 0x8 .space 0x8
gUnknown_02024270: @ 2024270 gUnknown_02024270: @ 2024270
@ -442,10 +442,10 @@ gStatuses3: @ 20242AC
gDisableStructs: @ 20242BC gDisableStructs: @ 20242BC
.space 0x70 .space 0x70
gUnknown_0202432C: @ 202432C gPauseCounterBattle: @ 202432C
.space 0x2 .space 0x2
gUnknown_0202432E: @ 202432E gPaydayMoney: @ 202432E
.space 0x2 .space 0x2
gUnknown_02024330: @ 2024330 gUnknown_02024330: @ 2024330
@ -475,13 +475,13 @@ gWishFutureKnock: @ 20243D0
gUnknown_020243FC: @ 20243FC gUnknown_020243FC: @ 20243FC
.space 0x2 .space 0x2
gUnknown_020243FE: @ 20243FE gSentPokesToOpponent: @ 20243FE
.space 0x2 .space 0x2
gDynamicBasePower: @ 2024400 gDynamicBasePower: @ 2024400
.space 0x2 .space 0x2
gUnknown_02024402: @ 2024402 gExpShareExp: @ 2024402
.space 0x2 .space 0x2
gEnigmaBerries: @ 2024404 gEnigmaBerries: @ 2024404
@ -1402,7 +1402,7 @@ gUnknown_0203AB30: @ 203AB30
gUnknown_0203AB34: @ 203AB34 gUnknown_0203AB34: @ 203AB34
.space 0x4 .space 0x4
.include "src/battle_ai.o" .include "src/battle_ai_script_commands.o"
.align 2 .align 2
gUnknown_0203AB40: @ 203AB40 gUnknown_0203AB40: @ 203AB40