This commit is contained in:
ProjectRevoTPP 2017-10-06 18:35:51 -04:00
commit 4b4d9907a8
92 changed files with 8327 additions and 18777 deletions

View File

@ -1358,8 +1358,8 @@ _080356AA:
.pool
thumb_func_end trs_config
thumb_func_start c2_berry_program_update_menu
c2_berry_program_update_menu: @ 80356D0
thumb_func_start sub_80356D0
sub_80356D0: @ 80356D0
push {lr}
movs r0, 0x2
bl DisableInterrupts
@ -1381,10 +1381,10 @@ c2_berry_program_update_menu: @ 80356D0
pop {r0}
bx r0
.pool
thumb_func_end c2_berry_program_update_menu
thumb_func_end sub_80356D0
thumb_func_start sub_803570C
sub_803570C: @ 803570C
thumb_func_start ApplyPlayerChosenFrameToBattleMenu
ApplyPlayerChosenFrameToBattleMenu: @ 803570C
push {lr}
movs r0, 0x2
movs r1, 0x12
@ -1422,7 +1422,7 @@ _0803575A:
pop {r0}
bx r0
.pool
thumb_func_end sub_803570C
thumb_func_end ApplyPlayerChosenFrameToBattleMenu
thumb_func_start load_battle_oval_graphics
load_battle_oval_graphics: @ 8035770
@ -1667,8 +1667,8 @@ _08035A8A:
.pool
thumb_func_end load_battle_oval_graphics
thumb_func_start sub_8035AA4
sub_8035AA4: @ 8035AA4
thumb_func_start LoadBattleTextboxAndBackground
LoadBattleTextboxAndBackground: @ 8035AA4
push {lr}
ldr r0, =gUnknown_08C00000
movs r1, 0xC0
@ -1685,12 +1685,12 @@ sub_8035AA4: @ 8035AA4
movs r1, 0
movs r2, 0x40
bl LoadCompressedPalette
bl sub_803570C
bl ApplyPlayerChosenFrameToBattleMenu
bl load_battle_oval_graphics
pop {r0}
bx r0
.pool
thumb_func_end sub_8035AA4
thumb_func_end LoadBattleTextboxAndBackground
thumb_func_start sub_8035AE4
sub_8035AE4: @ 8035AE4
@ -2457,8 +2457,8 @@ _08036138:
.pool
thumb_func_end task00_0800F6FC
thumb_func_start sub_8036154
sub_8036154: @ 8036154
thumb_func_start LoadBattleEntryBackground
LoadBattleEntryBackground: @ 8036154
push {r4,r5,lr}
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
@ -2668,10 +2668,10 @@ _080363AC:
pop {r0}
bx r0
.pool
thumb_func_end sub_8036154
thumb_func_end LoadBattleEntryBackground
thumb_func_start sub_80363C4
sub_80363C4: @ 80363C4
thumb_func_start LoadChosenBattleElement
LoadChosenBattleElement: @ 80363C4
push {r4,lr}
lsls r0, 24
lsrs r0, 24
@ -3051,7 +3051,7 @@ _08036742:
b _08036758
.pool
_08036750:
bl sub_803570C
bl ApplyPlayerChosenFrameToBattleMenu
b _08036758
_08036756:
movs r4, 0x1
@ -3060,6 +3060,6 @@ _08036758:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_80363C4
thumb_func_end LoadChosenBattleElement
.align 2, 0 @ Don't pad with nop.

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
.text
thumb_func_start sub_8056F28
sub_8056F28: @ 8056F28
thumb_func_start AllocateBattleResrouces
AllocateBattleResrouces: @ 8056F28
push {r4-r6,lr}
ldr r5, =gBattleResources
ldr r6, =gBattleTypeFlags
@ -102,10 +102,10 @@ _08056FFA:
pop {r0}
bx r0
.pool
thumb_func_end sub_8056F28
thumb_func_end AllocateBattleResrouces
thumb_func_start sub_8057028
sub_8057028: @ 8057028
thumb_func_start FreeBattleResources
FreeBattleResources: @ 8057028
push {r4-r6,lr}
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
@ -181,7 +181,7 @@ _080570D0:
pop {r0}
bx r0
.pool
thumb_func_end sub_8057028
thumb_func_end FreeBattleResources
thumb_func_start AdjustFriendshipOnBattleFaint
AdjustFriendshipOnBattleFaint: @ 80570F4

View File

@ -5,10 +5,10 @@
.text
thumb_func_start dp11_init
dp11_init: @ 805D118
thumb_func_start AllocateBattleSpritesData
AllocateBattleSpritesData: @ 805D118
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
movs r0, 0x10
bl AllocZeroed
str r0, [r4]
@ -32,12 +32,12 @@ dp11_init: @ 805D118
pop {r0}
bx r0
.pool
thumb_func_end dp11_init
thumb_func_end AllocateBattleSpritesData
thumb_func_start dp11_free
dp11_free: @ 805D158
thumb_func_start FreeBattleSpritesData
FreeBattleSpritesData: @ 805D158
push {r4,r5,lr}
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
cmp r0, 0
beq _0805D192
@ -65,7 +65,7 @@ _0805D192:
pop {r0}
bx r0
.pool
thumb_func_end dp11_free
thumb_func_end FreeBattleSpritesData
thumb_func_start sub_805D19C
sub_805D19C: @ 805D19C
@ -839,7 +839,7 @@ move_anim_start_t2_for_situation: @ 805D808
push {r4-r6,lr}
adds r4, r1, 0
lsls r0, 24
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r1, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -1001,7 +1001,7 @@ move_anim_start_t3: @ 805D908
b _0805DA1E
.pool
_0805D950:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
mov r9, r0
ldr r0, [r0]
ldr r0, [r0]
@ -1063,7 +1063,7 @@ _0805D9CC:
mov r1, sp
ldrb r1, [r1]
strb r1, [r0]
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r0, [r0, 0x8]
strh r7, [r0]
@ -1119,7 +1119,7 @@ task0A_0803415C: @ 805DA48
ldrb r0, [r0]
cmp r0, 0
bne _0805DA8A
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r1, =gTasks
lsls r0, r4, 2
@ -1199,7 +1199,7 @@ move_anim_start_t4: @ 805DAC4
lsls r1, 3
adds r1, r2
strh r4, [r1, 0x8]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
movs r2, 0x8
ldrsh r1, [r1, r2]
@ -1230,7 +1230,7 @@ task0A_08034248: @ 805DB34
ldrb r0, [r0]
cmp r0, 0
bne _0805DB76
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r1, =gTasks
lsls r0, r4, 2
@ -1274,7 +1274,7 @@ mplay_80342A4: @ 805DB90
lsls r0, 24
cmp r0, 0
beq _0805DBD8
ldr r2, =gUnknown_020244D0
ldr r2, =gBattleSpritesDataPtr
ldr r0, [r2]
ldr r1, [r0, 0x4]
lsls r0, r4, 1
@ -1307,7 +1307,7 @@ _0805DBDC:
b _0805DC02
.pool
_0805DBF0:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r4, 1
@ -1338,7 +1338,7 @@ sub_805DC0C: @ 805DC0C
movs r1, 0
bl GetMonData
str r0, [sp]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
mov r2, r8
@ -1371,7 +1371,7 @@ _0805DC58:
lsls r2, r5, 3
ldr r1, =gMonFrontPicTable
adds r2, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
lsrs r0, 22
adds r1, 0x4
@ -1386,7 +1386,7 @@ _0805DC58:
movs r0, 0x80
lsls r0, 1
adds r7, r2, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
lsls r1, r3, 2
@ -1444,7 +1444,7 @@ _0805DCC6:
movs r2, 0x20
bl LoadPalette
_0805DD1A:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
ldr r1, [sp, 0x4]
@ -1491,7 +1491,7 @@ sub_805DD7C: @ 805DD7C
movs r1, 0
bl GetMonData
str r0, [sp]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
mov r2, r8
@ -1532,7 +1532,7 @@ _0805DDC8:
mov r10, r1
cmp r0, 0x1
beq _0805DE00
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
add r0, r10
@ -1543,7 +1543,7 @@ _0805DE00:
lsls r0, r5, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
lsls r2, r7, 2
adds r1, 0x4
@ -1558,7 +1558,7 @@ _0805DE2C:
lsls r0, r5, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
lsls r2, r7, 2
adds r1, 0x4
@ -1573,7 +1573,7 @@ _0805DE46:
movs r0, 0x80
lsls r0, 1
adds r7, r1, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
add r0, r10
@ -1629,7 +1629,7 @@ _0805DE7E:
movs r2, 0x20
bl LoadPalette
_0805DED2:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
add r0, r10
@ -1684,7 +1684,7 @@ sub_805DF38: @ 805DF38
lsls r4, 3
ldr r2, =gTrainerFrontPicTable
adds r2, r4, r2
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
lsrs r0, 22
adds r1, 0x4
@ -1718,7 +1718,7 @@ sub_805DF84: @ 805DF84
lsls r5, 3
ldr r2, =gTrainerBackPicTable
adds r2, r5, r2
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
lsrs r0, 22
adds r1, 0x4
@ -1959,7 +1959,7 @@ _0805E1AE:
load_gfxc_health_bar: @ 805E1B8
push {lr}
ldr r0, =gUnknown_08C093F0
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
movs r2, 0xBA
lsls r2, 1
@ -1971,8 +1971,8 @@ load_gfxc_health_bar: @ 805E1B8
.pool
thumb_func_end load_gfxc_health_bar
thumb_func_start battle_load_something
battle_load_something: @ 805E1D8
thumb_func_start BattleInitAllSprites
BattleInitAllSprites: @ 805E1D8
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
@ -2136,12 +2136,12 @@ _0805E346:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end battle_load_something
thumb_func_end BattleInitAllSprites
thumb_func_start sub_805E350
sub_805E350: @ 805E350
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r0, [r0, 0x4]
movs r1, 0
@ -2162,7 +2162,7 @@ sub_805E350: @ 805E350
sub_805E378: @ 805E378
push {lr}
bl sub_805E350
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
movs r1, 0
@ -2191,7 +2191,7 @@ sub_805E394: @ 805E394
movs r0, 0x2
negs r0, r0
mov r8, r0
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r6, =gBankSpriteIds
_0805E3B8:
ldr r0, [r7]
@ -2233,7 +2233,7 @@ _0805E3EA:
sub_805E408: @ 805E408
lsls r0, 24
lsrs r0, 24
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r1, [r1]
ldr r1, [r1]
lsls r3, r0, 2
@ -2285,7 +2285,7 @@ sub_805E448: @ 805E448
ldr r1, =gSprites
mov r8, r1
add r0, r8
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r1, [r1, 0x8]
ldrb r1, [r1]
@ -2364,7 +2364,7 @@ _0805E51C:
lsls r0, r1, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x4]
ldr r3, [r2, 0x10]
@ -2434,7 +2434,7 @@ _0805E59C:
lsls r0, r1, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
mov r3, r10
lsls r2, r3, 2
@ -2472,7 +2472,7 @@ _0805E618:
lsls r0, r1, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
mov r3, r10
lsls r2, r3, 2
@ -2486,7 +2486,7 @@ _0805E618:
mov r2, r8
bl HandleLoadSpecialPokePic_DontHandleDeoxys
_0805E662:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
mov r2, r10
lsls r1, r2, 2
@ -2582,7 +2582,7 @@ _0805E70A:
lsls r0, 24
cmp r0, 0
bne _0805E74A
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r7, 2
@ -2666,7 +2666,7 @@ _0805E814:
beq _0805E83C
ldr r0, =gUnknown_08C2CEE0
_0805E822:
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
lsls r4, 2
adds r1, 0x4
@ -2677,7 +2677,7 @@ _0805E822:
.pool
_0805E83C:
ldr r0, =gUnknown_08C2D120
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
lsls r4, 2
adds r1, 0x4
@ -2688,7 +2688,7 @@ _0805E84E:
movs r3, 0x1
lsls r6, r5, 4
ldr r7, =gUnknown_08C2CEBC
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
adds r0, 0x4
adds r4, r0, r4
@ -2804,7 +2804,7 @@ sub_805E94C: @ 805E94C
lsrs r1, 16
cmp r1, 0xA4
bne _0805E96C
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
lsls r1, r2, 2
@ -2822,7 +2822,7 @@ _0805E96C:
thumb_func_start sub_805E974
sub_805E974: @ 805E974
lsls r0, 24
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r1, [r1]
ldr r1, [r1]
lsrs r0, 22
@ -2862,7 +2862,7 @@ sub_805E990: @ 805E990
lsrs r0, 24
cmp r0, 0x1
bne _0805EA08
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r0, [r7]
ldr r2, [r0]
lsls r4, r6, 2
@ -2895,7 +2895,7 @@ _0805E9F6:
b _0805EA5A
.pool
_0805EA08:
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r0, [r0]
lsls r1, r6, 2
@ -2944,7 +2944,7 @@ BattleMusicStop: @ 805EA60
bl GetBankByIdentity
lsls r0, 24
lsrs r4, r0, 24
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldr r0, [r0]
lsls r1, r4, 2
@ -3134,7 +3134,7 @@ _0805EBC8:
mov r7, r8
cmp r7, 0
bne _0805EC3C
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r2, [r0, 0x4]
adds r2, r6, r2
@ -3164,7 +3164,7 @@ _0805EC3C:
adds r2, r0
lsls r2, 2
adds r2, r4
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
adds r0, r6, r0
@ -3229,7 +3229,7 @@ sub_805EC84: @ 805EC84
adds r1, r4, 0
movs r3, 0xC8
bl CreateSprite
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r1, [r6]
ldr r2, [r1, 0x4]
lsls r1, r5, 1
@ -3351,12 +3351,12 @@ _0805EDC0:
_0805EDD2:
movs r0, 0x1
mov r8, r0
ldr r2, =gUnknown_020244D0
ldr r2, =gBattleSpritesDataPtr
lsls r4, 2
b _0805EE06
.pool
_0805EDE4:
ldr r2, =gUnknown_020244D0
ldr r2, =gBattleSpritesDataPtr
ldr r0, [r2]
ldr r0, [r0]
lsls r1, r4, 2
@ -3431,7 +3431,7 @@ sub_805EE54: @ 805EE54
lsls r0, 24
cmp r0, 0
beq _0805EED0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r3, [r0]
ldr r1, [r3]
lsls r0, r4, 2
@ -3489,7 +3489,7 @@ sub_805EEE0: @ 805EEE0
lsls r0, 24
lsrs r0, 24
ldr r2, =gSprites
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r1, [r1]
ldr r3, [r1, 0x4]
lsls r1, r0, 1
@ -3578,7 +3578,7 @@ sub_805EF84: @ 805EF84
lsls r0, 24
lsrs r4, r0, 24
lsls r1, 24
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r2, [r0]
lsls r0, r4, 2
@ -3600,15 +3600,15 @@ _0805EFAC:
.pool
thumb_func_end sub_805EF84
thumb_func_start init_uns_table_pokemon_copy
init_uns_table_pokemon_copy: @ 805EFBC
thumb_func_start AllocateMonSpritesGfx
AllocateMonSpritesGfx: @ 805EFBC
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
movs r6, 0
ldr r4, =gBattleSpritesGfx
ldr r4, =gMonSpritesGfxPtr
str r6, [r4]
movs r0, 0xC0
lsls r0, 1
@ -3620,7 +3620,7 @@ init_uns_table_pokemon_copy: @ 805EFBC
ldr r1, [r4]
str r0, [r1]
_0805EFE2:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r1, [r0]
lsls r4, r6, 2
adds r2, r1, 0x4
@ -3649,7 +3649,7 @@ _0805EFE2:
mov r12, r8
adds r7, r4, 0
_0805F01A:
ldr r2, =gBattleSpritesGfx
ldr r2, =gMonSpritesGfxPtr
ldr r1, [r2]
lsls r4, r5, 3
add r4, r12
@ -3672,7 +3672,7 @@ _0805F01A:
lsrs r5, r0, 24
cmp r5, 0x3
bls _0805F01A
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r2, [r1]
mov r5, r9
adds r0, r5, r6
@ -3692,7 +3692,7 @@ _0805F01A:
movs r0, 0x80
lsls r0, 5
bl AllocZeroed
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
movs r2, 0xBA
lsls r2, 1
@ -3706,12 +3706,12 @@ _0805F01A:
pop {r0}
bx r0
.pool
thumb_func_end init_uns_table_pokemon_copy
thumb_func_end AllocateMonSpritesGfx
thumb_func_start sub_805F094
sub_805F094: @ 805F094
thumb_func_start FreeMonSpritesGfx
FreeMonSpritesGfx: @ 805F094
push {r4-r6,lr}
ldr r6, =gBattleSpritesGfx
ldr r6, =gMonSpritesGfxPtr
ldr r0, [r6]
cmp r0, 0
beq _0805F106
@ -3769,7 +3769,7 @@ _0805F106:
pop {r0}
bx r0
.pool
thumb_func_end sub_805F094
thumb_func_end FreeMonSpritesGfx
thumb_func_start sub_805F110
sub_805F110: @ 805F110

View File

@ -264,14 +264,14 @@ _080A3BAA:
movs r2, 0x80
bl m4aMPlayVolumeControl
_080A3BC2:
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r0, =gUnknown_02022E28
ldr r0, =gBattle_WIN1H
strh r1, [r0]
ldr r0, =gUnknown_02022E2A
ldr r0, =gBattle_WIN1V
strh r1, [r0]
add sp, 0x4
pop {r3-r5}
@ -1150,7 +1150,7 @@ _080A4330:
lsls r0, 24
cmp r0, 0
bne _080A4374
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r5, 2
@ -2864,7 +2864,7 @@ BattleAnimGetPanControl: @ 80A5178
lsls r0, 24
cmp r0, 0
bne _080A51C0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gAnimationBankAttacker
ldrb r2, [r0]
@ -2986,7 +2986,7 @@ sub_80A5278: @ 80A5278
lsls r0, 24
cmp r0, 0
bne _080A52C0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gAnimationBankAttacker
ldrb r2, [r0]

View File

@ -629,7 +629,7 @@ sub_80AA18C: @ 80AA18C
lsls r0, 24
lsrs r4, r0, 24
movs r3, 0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrh r0, [r0]
@ -899,7 +899,7 @@ task0A_80788BC: @ 80AA3B4
ldrb r0, [r0]
cmp r0, 0
bne _080AA3F6
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r1, =gTasks
lsls r0, r4, 2

View File

@ -14561,7 +14561,7 @@ _08105CCC:
lsls r0, 6
bl AllocZeroed
adds r1, r0, 0
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r2, 0xBE
lsls r2, 1
@ -14571,7 +14571,7 @@ _08105CCC:
bl LZDecompressWram
movs r4, 0
_08105D00:
ldr r5, =gBattleSpritesGfx
ldr r5, =gMonSpritesGfxPtr
ldr r0, [r5]
movs r1, 0xBE
lsls r1, 1
@ -14785,9 +14785,9 @@ sub_8105EB0: @ 8105EB0
movs r6, 0x98
_08105EC4:
movs r5, 0
ldr r1, =gUnknown_02022E24
ldr r1, =gBattle_WIN0H
strh r6, [r1]
ldr r4, =gUnknown_02022E26
ldr r4, =gBattle_WIN0V
movs r0, 0xA0
strh r0, [r4]
ldrh r1, [r1]
@ -14845,7 +14845,7 @@ sub_8105F30: @ 8105F30
lsls r0, r2, 16
cmp r1, r0
blt _08105F70
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =sub_8105F84
@ -14853,7 +14853,7 @@ sub_8105F30: @ 8105F30
b _08105F78
.pool
_08105F70:
ldr r1, =gUnknown_02022E24
ldr r1, =gBattle_WIN0H
lsls r0, r4, 8
orrs r2, r0
strh r2, [r1]
@ -14905,9 +14905,9 @@ sub_8105F84: @ 8105F84
_08105FD8:
cmp r0, 0x4
ble _0810600C
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r4, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r4, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -30154,7 +30154,7 @@ _0810DB50:
strh r0, [r2]
adds r7, r2, 0
_0810DB60:
ldr r3, =gUnknown_02022E22
ldr r3, =gBattle_BG3_Y
ldrh r2, [r4, 0x1C]
lsls r0, r2, 16
asrs r0, 24
@ -37347,7 +37347,7 @@ sub_811152C: @ 811152C
movs r0, 0xC8
strh r0, [r5, 0xA]
_0811154E:
ldr r4, =gUnknown_02022E22
ldr r4, =gBattle_BG3_Y
movs r1, 0xA
ldrsh r0, [r5, r1]
movs r1, 0xA
@ -37396,7 +37396,7 @@ sub_8111590: @ 8111590
ldrh r0, [r4, 0x8]
adds r0, 0x1
strh r0, [r4, 0x8]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
ldrh r0, [r0]
strh r0, [r4, 0xC]
_081115BC:
@ -37405,7 +37405,7 @@ _081115BC:
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0xA]
ldr r6, =gUnknown_02022E22
ldr r6, =gBattle_BG3_Y
movs r2, 0xA
ldrsh r1, [r4, r2]
movs r0, 0x4
@ -38602,7 +38602,7 @@ _08111F0C:
adds r2, r0
lsls r2, 2
adds r2, r4
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gAnimationBankTarget
ldrb r0, [r0]
@ -39577,10 +39577,10 @@ sub_8112758: @ 8112758
push {r4-r7,lr}
lsls r0, 24
lsrs r7, r0, 24
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r1, =0x00003f3f
movs r0, 0x48
@ -39611,13 +39611,13 @@ _081127A0:
_081127B8:
movs r6, 0xC8
_081127BA:
ldr r1, =gUnknown_02022E24
ldr r1, =gBattle_WIN0H
lsls r3, r6, 16
asrs r2, r3, 16
lsls r0, r2, 8
orrs r0, r2
strh r0, [r1]
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
movs r5, 0x28
ldr r0, =0x00002828
strh r0, [r1]
@ -39798,12 +39798,12 @@ _08112938:
ldr r0, _08112988 @=sub_8112994
str r0, [r4]
_08112966:
ldr r1, _0811298C @=gUnknown_02022E24
ldr r1, _0811298C @=gBattle_WIN0H
mov r2, r9
lsls r0, r2, 8
orrs r7, r0
strh r7, [r1]
ldr r1, _08112990 @=gUnknown_02022E26
ldr r1, _08112990 @=gBattle_WIN0V
lsls r0, r6, 8
orrs r5, r0
strh r5, [r1]
@ -39819,9 +39819,9 @@ _08112966:
_08112988:
.4byte sub_8112994
_0811298C:
.4byte gUnknown_02022E24
.4byte gBattle_WIN0H
_08112990:
.4byte gUnknown_02022E26
.4byte gBattle_WIN0V
thumb_func_end sub_811280C
thumb_func_start sub_8112994
@ -39837,9 +39837,9 @@ sub_8112994: @ 8112994
lsrs r1, r0, 24
cmp r1, 0
bne _081129DA
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -40042,10 +40042,10 @@ sub_8112B44: @ 8112B44
movs r0, 0x52
movs r1, 0
bl SetGpuReg
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
adds r0, r4, 0
bl move_anim_8072740
@ -42202,13 +42202,13 @@ _08113CDC:
ldr r1, =0x00003f3f
movs r0, 0x48
bl SetGpuReg
ldr r2, =gUnknown_02022E24
ldr r2, =gBattle_WIN0H
ldrh r0, [r5, 0x24]
lsls r0, 8
ldrh r1, [r5, 0x26]
orrs r0, r1
strh r0, [r2]
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
movs r0, 0xA0
strh r0, [r1]
ldr r0, =sub_8113D60
@ -42331,7 +42331,7 @@ _08113E1C:
blt _08113E3E
strh r2, [r4, 0x24]
_08113E3E:
ldr r3, =gUnknown_02022E24
ldr r3, =gBattle_WIN0H
ldrh r2, [r4, 0x24]
lsls r0, r2, 8
ldrh r1, [r4, 0x26]
@ -42398,10 +42398,10 @@ _08113EBC:
lsrs r0, 24
cmp r0, 0x1
bne _08113EF8
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -42588,13 +42588,13 @@ _08114078:
ldr r1, =0x00003f3f
movs r0, 0x48
bl SetGpuReg
ldr r2, =gUnknown_02022E24
ldr r2, =gBattle_WIN0H
ldrh r0, [r5, 0x24]
lsls r0, 8
ldrh r1, [r5, 0x26]
orrs r0, r1
strh r0, [r2]
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
movs r0, 0xA0
strh r0, [r1]
movs r0, 0
@ -42686,7 +42686,7 @@ _08114150:
movs r0, 0x1
strh r0, [r4, 0xA]
_08114154:
ldr r2, =gUnknown_02022E24
ldr r2, =gBattle_WIN0H
ldrh r0, [r4, 0x24]
lsls r0, 8
ldrh r1, [r4, 0x26]
@ -42782,10 +42782,10 @@ _08114204:
b _08114232
.pool
_08114210:
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -43157,9 +43157,9 @@ sub_81144F8: @ 81144F8
lsls r0, 24
lsrs r7, r0, 24
movs r6, 0
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r6, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r6, [r0]
ldr r1, =0x00003f3f
movs r0, 0x48
@ -43485,9 +43485,9 @@ _081147B8:
_08114824:
cmp r0, 0x3
bne _08114886
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r5, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r5, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -45266,7 +45266,7 @@ _0811565A:
ldr r2, =gBattle_BG3_X
ldrh r0, [r4, 0xA]
strh r0, [r2]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r1, [r0]
ldrh r0, [r6, 0x4]
strh r0, [r4, 0xE]
@ -45298,7 +45298,7 @@ sub_81156D0: @ 81156D0
ldr r0, =gBattle_BG3_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r1, [r0]
adds r0, r3, 0
bl DestroyTask
@ -45308,7 +45308,7 @@ _08115710:
ldr r1, =gBattle_BG3_X
ldrh r0, [r2, 0xA]
strh r0, [r1]
ldr r1, =gUnknown_02022E22
ldr r1, =gBattle_BG3_Y
ldrh r0, [r2, 0xC]
strh r0, [r1]
_0811571C:
@ -46557,7 +46557,7 @@ _081160E2:
b _081160F6
.pool
_081160EC:
ldr r1, =gUnknown_02022E22
ldr r1, =gBattle_BG3_Y
b _081160F6
.pool
_081160F4:
@ -46796,7 +46796,7 @@ sub_81162A4: @ 81162A4
ldr r4, =gBattle_BG3_X
ldrh r1, [r3]
strh r1, [r4]
ldr r4, =gUnknown_02022E22
ldr r4, =gBattle_BG3_Y
ldrh r1, [r3, 0x2]
strh r1, [r4]
ldr r1, =sub_81162F8
@ -46839,7 +46839,7 @@ _08116330:
ldrh r0, [r3, 0x8]
_08116332:
strh r0, [r6]
ldr r2, =gUnknown_02022E22
ldr r2, =gBattle_BG3_Y
ldrh r3, [r2]
lsls r1, r5, 2
adds r0, r1, r5
@ -47805,9 +47805,9 @@ sub_8116B14: @ 8116B14
lsrs r0, 24
mov r9, r0
movs r7, 0
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r7, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r7, [r0]
ldr r1, =0x00003f3f
movs r0, 0x48
@ -48072,10 +48072,10 @@ sub_8116D64: @ 8116D64
bne _08116E86
movs r0, 0
bl sub_80A477C
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
mov r1, r8
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -48256,10 +48256,10 @@ _08116F56:
movs r0, 0
strh r0, [r1, 0xA]
_08116F5C:
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r1, =0x00003f3f
movs r0, 0x48
@ -48746,10 +48746,10 @@ _081173AE:
strh r0, [r5, 0x26]
b _08117478
_081173B6:
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -49158,7 +49158,7 @@ sub_81176D8: @ 81176D8
ldrh r4, [r6]
adds r0, r4
strh r0, [r6]
ldr r4, =gUnknown_02022E22
ldr r4, =gBattle_BG3_Y
lsls r0, r2, 16
asrs r0, 24
ldrh r7, [r4]
@ -49363,10 +49363,10 @@ _081178B6:
movs r2, 0
mov r8, r2
_081178BA:
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r1, =0x00003f3f
movs r0, 0x48
@ -49676,9 +49676,9 @@ _08117B34:
bne _08117C0C
movs r0, 0
bl sub_80A477C
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r4, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r4, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -49777,7 +49777,7 @@ sub_8117C44: @ 8117C44
movs r0, 0x80
lsls r0, 6
bl AllocZeroed
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
movs r2, 0xBE
lsls r2, 1
@ -49797,7 +49797,7 @@ sub_8117C70: @ 8117C70
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r6, =gBattleSpritesGfx
ldr r6, =gMonSpritesGfxPtr
ldr r0, [r6]
movs r5, 0xBE
lsls r5, 1
@ -49866,7 +49866,7 @@ _08117CF6:
adds r4, r0, 0
adds r4, 0x10
_08117CFC:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r1, [r0]
ldr r0, =gBattleAnimArgs
movs r2, 0x2
@ -49944,7 +49944,7 @@ _08117D98:
lsls r0, r4, 5
ldr r1, =gPlttBufferUnfaded
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r2, [r1]
ldr r1, =gBattleAnimArgs
movs r3, 0x2
@ -50163,7 +50163,7 @@ _08117F78:
adds r3, r4
lsls r3, 3
adds r3, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r4, [r0]
ldr r2, =gAnimationBankAttacker
ldrb r0, [r2]
@ -50207,7 +50207,7 @@ sub_8117FD0: @ 8117FD0
lsls r0, 5
cmp r1, r0
bne _08118014
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gAnimationBankAttacker
ldrb r3, [r0]
@ -50646,7 +50646,7 @@ _0811838C:
bl SetGpuReg
b _0811852A
_0811839C:
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
ldrh r0, [r1]
subs r0, 0xFF
strh r0, [r1]
@ -50715,7 +50715,7 @@ _08118420:
_0811842C:
strh r0, [r2]
_0811842E:
ldr r2, =gUnknown_02022E26
ldr r2, =gBattle_WIN0V
ldrh r1, [r2]
movs r0, 0xFF
lsls r0, 8
@ -50988,7 +50988,7 @@ _08118662:
b _0811881A
.pool
_08118678:
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
ldrh r0, [r1]
subs r0, 0xFF
strh r0, [r1]
@ -51065,7 +51065,7 @@ _08118708:
movs r0, 0x4
strh r0, [r1, 0x12]
_08118728:
ldr r2, =gUnknown_02022E26
ldr r2, =gBattle_WIN0V
ldrh r1, [r2]
movs r0, 0xFF
lsls r0, 8
@ -51288,7 +51288,7 @@ _08118908:
b _08118A96
.pool
_0811891C:
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
ldrh r0, [r1]
subs r0, 0xFF
strh r0, [r1]
@ -51354,7 +51354,7 @@ _08118986:
movs r0, 0x6
strh r0, [r2, 0x12]
_081189A6:
ldr r2, =gUnknown_02022E26
ldr r2, =gBattle_WIN0V
ldrh r1, [r2]
movs r0, 0xFF
lsls r0, 8
@ -51652,7 +51652,7 @@ _08118BA8:
b _08118D5A
.pool
_08118C38:
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
ldrh r0, [r1]
subs r0, 0xFF
strh r0, [r1]
@ -51683,7 +51683,7 @@ _08118C50:
b _08118D5A
.pool
_08118C7C:
ldr r2, =gUnknown_02022E26
ldr r2, =gBattle_WIN0V
ldrh r1, [r2]
movs r0, 0xFF
lsls r0, 8
@ -51874,7 +51874,7 @@ _08118DD4:
ldr r1, =0x00003f3f
movs r0, 0x4A
bl SetGpuReg
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
ldr r2, =0x0000ffd0
adds r0, r2, 0
strh r0, [r1]
@ -51888,7 +51888,7 @@ _08118DD4:
b _08118FB2
.pool
_08118E4C:
ldr r2, =gUnknown_02022E26
ldr r2, =gBattle_WIN0V
ldrh r3, [r2]
movs r1, 0x80
lsls r1, 1
@ -51932,7 +51932,7 @@ _08118E7E:
b _08118FB2
.pool
_08118EA8:
ldr r3, =gUnknown_02022E26
ldr r3, =gBattle_WIN0V
ldrh r2, [r3]
movs r0, 0xFF
lsls r0, 8
@ -51973,7 +51973,7 @@ _08118ED8:
b _08118FB2
.pool
_08118F00:
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
ldrh r0, [r1]
adds r3, r0, 0x2
strh r3, [r1]
@ -51981,7 +51981,7 @@ _08118F00:
ldrh r0, [r1]
adds r0, 0x2
strh r0, [r1]
ldr r5, =gUnknown_02022E26
ldr r5, =gBattle_WIN0V
ldrh r2, [r5]
movs r0, 0xFF
lsls r0, 8
@ -52081,7 +52081,7 @@ sub_8118FBC: @ 8118FBC
bl GetBankByIdentity
lsls r0, 24
lsrs r0, 24
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r2, [r1]
lsls r4, 2
adds r2, 0x4
@ -52189,7 +52189,7 @@ sub_8119094: @ 8119094
lsls r0, 24
mov r9, r0
ldr r4, =0x040000d4
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
lsrs r2, 22
adds r0, 0x4

View File

@ -1077,10 +1077,10 @@ sub_815A934: @ 815A934
lsls r1, 8
movs r0, 0
bl SetGpuRegBits
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r4, =gUnknown_02022E26
ldr r4, =gBattle_WIN0V
strh r1, [r4]
movs r0, 0x40
movs r1, 0
@ -1416,18 +1416,18 @@ sub_815ABEC: @ 815ABEC
ldr r1, =0x00001f3f
movs r0, 0x48
bl SetGpuReg
ldr r1, =gUnknown_02022E28
ldr r1, =gBattle_WIN1H
ldr r2, =0x000098f0
adds r0, r2, 0
strh r0, [r1]
ldr r1, =gUnknown_02022E2A
ldr r1, =gBattle_WIN1V
movs r0, 0xA0
strh r0, [r1]
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
ldrh r1, [r0]
movs r0, 0x42
bl SetGpuReg
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
ldrh r1, [r0]
movs r0, 0x46
bl SetGpuReg
@ -1437,10 +1437,10 @@ _0815AC40:
ldr r1, =0x00001f3f
movs r0, 0x48
bl SetGpuReg
ldr r1, =gUnknown_02022E28
ldr r1, =gBattle_WIN1H
movs r0, 0xF0
strh r0, [r1]
ldr r4, =gUnknown_02022E2A
ldr r4, =gBattle_WIN1V
ldr r1, =0x000078a0
adds r0, r1, 0
strh r0, [r4]
@ -1471,10 +1471,10 @@ sub_815AC8C: @ 815AC8C
ldr r1, =0x00003f3f
movs r0, 0x48
bl SetGpuReg
ldr r0, =gUnknown_02022E28
ldr r0, =gBattle_WIN1H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E2A
ldr r0, =gBattle_WIN1V
strh r1, [r0]
bl IsContest
lsls r0, 24
@ -3024,7 +3024,7 @@ _0815B8E0:
lsls r0, 24
lsrs r1, r0, 24
_0815B8EA:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r2, [r0]
lsls r0, r1, 2
adds r2, 0x4
@ -3250,7 +3250,7 @@ _0815BAB6:
cmp r0, 0
bne _0815BAF6
ldrb r0, [r4]
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r1, [r1]
ldr r2, [r1]
lsls r1, r0, 2
@ -5397,10 +5397,10 @@ sub_815CC94: @ 815CC94
lsls r1, 8
movs r0, 0
bl SetGpuRegBits
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r4, =gUnknown_02022E26
ldr r4, =gBattle_WIN0V
strh r1, [r4]
movs r0, 0x40
movs r1, 0
@ -5723,7 +5723,7 @@ _0815CF18:
movs r1, 0x1
bl GetMonData
mov r8, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
@ -5791,7 +5791,7 @@ _0815CFC4:
movs r1, 0x1
bl GetMonData
mov r8, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
@ -10637,7 +10637,7 @@ _0815F67C:
adds r0, r2
movs r1, 0x2
strh r1, [r0, 0x8]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gAnimationBankTarget
ldrb r0, [r0]
@ -10762,7 +10762,7 @@ sub_815F7C4: @ 815F7C4
ble _0815F80E
movs r0, 0
strh r0, [r4, 0x30]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gAnimationBankTarget
ldrb r0, [r0]
@ -11072,7 +11072,7 @@ _0815FA28:
movs r1, 0x1
bl GetMonData
mov r9, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
@ -11136,7 +11136,7 @@ _0815FAC8:
movs r1, 0x1
bl GetMonData
mov r9, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
@ -11202,7 +11202,7 @@ _0815FB50:
bl sub_80A8394
lsls r0, 24
lsrs r5, r0, 24
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldrb r0, [r4]
ldr r1, [r1]

View File

@ -18,10 +18,10 @@ sub_8170478: @ 8170478
str r0, [sp, 0x10]
ldr r0, =gAnimationBankAttacker
ldrb r4, [r0]
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r1, =0x00003f3f
movs r0, 0x48
@ -317,9 +317,9 @@ _08170708:
bne _08170814
movs r0, 0
bl sub_80A477C
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r4, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r4, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
@ -1035,7 +1035,7 @@ sub_8170D4C: @ 8170D4C
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x8]
@ -1183,7 +1183,7 @@ sub_8170E04: @ 8170E04
adds r4, r0
ldr r0, =sub_8171104
str r0, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r3, [r0, 0x8]
ldr r1, =gBankSpriteIds
@ -1491,7 +1491,7 @@ sub_8171134: @ 8171134
lsls r0, 24
cmp r0, 0
beq _081711D2
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x8]
@ -1894,7 +1894,7 @@ _08171486:
adds r0, r1
strh r0, [r4, 0x22]
strh r5, [r4, 0x26]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x8]
@ -1940,7 +1940,7 @@ sub_81714D4: @ 81714D4
adds r0, r4, 0
movs r1, 0x1
bl StartSpriteAffineAnim
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
strh r5, [r0, 0xC]
@ -1982,7 +1982,7 @@ _08171540:
.4byte _08171708
.4byte _08171768
_0817155C:
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r5, [r1]
ldr r2, [r5, 0x8]
ldrh r3, [r2, 0xC]
@ -2060,7 +2060,7 @@ _081715EA:
bl ChangeSpriteAffineAnim
b _081717AE
_081715F4:
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r5, [r1]
ldr r2, [r5, 0x8]
ldrh r3, [r2, 0xC]
@ -2152,7 +2152,7 @@ _0817169C:
movs r1, 0x1
bl ChangeSpriteAffineAnim
_081716A4:
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r5, [r1]
ldr r2, [r5, 0x8]
ldrh r3, [r2, 0xC]
@ -2211,7 +2211,7 @@ _08171708:
strh r0, [r4, 0x34]
lsls r0, 16
asrs r1, r0, 24
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x8]
@ -2859,7 +2859,7 @@ _08171C24:
adds r2, r0
lsls r2, 2
adds r2, r4
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r1, [r0, 0x9]
@ -3083,7 +3083,7 @@ sub_8171E20: @ 8171E20
ands r0, r1
cmp r0, 0
beq _08171E3E
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x8]
ldrb r0, [r1, 0xA]
@ -4419,7 +4419,7 @@ sub_8172944: @ 8172944
b _081729E2
.pool
_08172970:
ldr r2, =gUnknown_020244D0
ldr r2, =gBattleSpritesDataPtr
ldr r0, [r2]
ldr r1, [r0, 0x8]
ldrb r0, [r1, 0xA]
@ -5046,7 +5046,7 @@ sub_8172E9C: @ 8172E9C
lsls r0, 24
lsrs r0, 24
ldr r3, =gBattleAnimArgs
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r2, [r1]
ldr r1, =gAnimationBankAttacker
ldrb r1, [r1]
@ -5088,7 +5088,7 @@ sub_8172EF0: @ 8172EF0
lsrs r6, r0, 24
movs r0, 0
mov r8, r0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r6, 1
@ -5169,7 +5169,7 @@ _08172F6E:
b _08172FDE
.pool
_08172FC8:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r6, 1
@ -5212,7 +5212,7 @@ sub_8172FEC: @ 8172FEC
b _08173190
.pool
_08173018:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0xA]
@ -5414,7 +5414,7 @@ sub_81731B0: @ 81731B0
cmp r0, 0x1
bne _081731EA
ldrb r1, [r1, 0x8]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
@ -5762,7 +5762,7 @@ sub_81734B4: @ 81734B4
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrh r1, [r0]
@ -5813,7 +5813,7 @@ sub_817351C: @ 817351C
lsls r0, 24
lsrs r0, 24
ldr r3, =gAnimationBankAttacker
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r2, [r1]
ldr r1, [r2, 0x8]
ldrh r1, [r1]

View File

@ -158,7 +158,7 @@ _080644C2:
thumb_func_start sub_80644D8
sub_80644D8: @ 80644D8
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r3, =gActiveBank
ldrb r0, [r3]
@ -281,7 +281,7 @@ _080645CA:
cmp r0, 0
bne _0806469C
_080645DE:
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
mov r12, r1
ldr r0, [r1]
ldr r7, =gActiveBank
@ -364,7 +364,7 @@ _08064600:
b _080646F2
.pool
_0806469C:
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r1, [r7]
ldr r2, [r0, 0x4]
@ -405,7 +405,7 @@ _0806469C:
adds r0, r4, 0
bl FreeSpritePaletteByTag
_080646F2:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -440,7 +440,7 @@ sub_8064734: @ 8064734
push {r5-r7}
movs r0, 0
mov r10, r0
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldr r4, =gActiveBank
ldrb r2, [r4]
@ -497,7 +497,7 @@ _08064776:
adds r0, r3, 0
bl sub_8172EF0
_080647B4:
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r2, =gActiveBank
ldrb r5, [r2]
@ -591,7 +591,7 @@ _0806484A:
ldrb r0, [r0]
bl sub_80729D0
_0806487A:
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -673,7 +673,7 @@ _08064930:
lsls r2, 1
bl m4aMPlayVolumeControl
_0806493C:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -735,7 +735,7 @@ _08064998:
lsrs r0, 24
cmp r0, 0x3
bne _080649E2
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r5]
ldr r0, [r0, 0x4]
@ -828,7 +828,7 @@ _08064A3A:
lsrs r1, 16
adds r0, r5, 0
bl sub_805EE54
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -900,7 +900,7 @@ sub_8064B04: @ 8064B04
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08064BB6
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r1, [r0, 0x4]
lsls r4, r3, 1
@ -1028,7 +1028,7 @@ _08064C42:
thumb_func_start sub_8064C58
sub_8064C58: @ 8064C58
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -1166,7 +1166,7 @@ sub_8064D60: @ 8064D60
ldr r0, =SpriteCallbackDummy
cmp r1, r0
bne _08064DAC
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r3, 2
@ -1198,7 +1198,7 @@ _08064DAC:
thumb_func_start sub_8064DD0
sub_8064DD0: @ 8064DD0
push {r4,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r4, =gActiveBank
ldrb r1, [r4]
@ -1250,7 +1250,7 @@ _08064E2A:
thumb_func_start sub_8064E50
sub_8064E50: @ 8064E50
push {r4-r7,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -1346,7 +1346,7 @@ _08064F0C:
thumb_func_start sub_8064F40
sub_8064F40: @ 8064F40
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -1430,7 +1430,7 @@ _08064FDC:
thumb_func_start sub_8065008
sub_8065008: @ 8065008
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -1454,7 +1454,7 @@ _0806502A:
thumb_func_start sub_8065038
sub_8065038: @ 8065038
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -3907,7 +3907,7 @@ sub_8066624: @ 8066624
ldrb r3, [r0]
cmp r3, 0
bne _0806666C
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
@ -3959,7 +3959,7 @@ _080666A8:
thumb_func_start sub_80666BC
sub_80666BC: @ 80666BC
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4589,7 +4589,7 @@ sub_8066B94: @ 8066B94
thumb_func_start sub_8066C40
sub_8066C40: @ 8066C40
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4816,7 +4816,7 @@ _08066D32:
b _08066E58
.pool
_08066E30:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
@ -4869,7 +4869,7 @@ sub_8066E70: @ 8066E70
adds r1, r2
ldrb r1, [r1]
mov r8, r1
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -4977,7 +4977,7 @@ _08066F32:
ands r0, r2
strb r0, [r1]
_08066F80:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -5031,10 +5031,10 @@ _08066FE4:
thumb_func_start sub_8066FF4
sub_8066FF4: @ 8066FF4
push {r4,r5,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r5, =gActiveBank
ldrb r4, [r5]
@ -5244,7 +5244,7 @@ sub_806719C: @ 806719C
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -5718,7 +5718,7 @@ sub_8067508: @ 8067508
adds r1, r4
ldrb r0, [r6]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r6]
ldr r1, [r0, 0x4]
@ -5893,7 +5893,7 @@ sub_8067718: @ 8067718
b _08067812
.pool
_08067748:
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -5960,7 +5960,7 @@ _080677B4:
adds r1, r2
movs r3, 0
strb r0, [r1]
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
@ -6000,7 +6000,7 @@ _08067812:
thumb_func_start sub_806782C
sub_806782C: @ 806782C
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -6036,7 +6036,7 @@ _08067864:
thumb_func_start sub_8067874
sub_8067874: @ 8067874
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]

View File

@ -131,7 +131,7 @@ _0814AFA4:
thumb_func_start sub_814AFBC
sub_814AFBC: @ 814AFBC
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r3, =gActiveBank
ldrb r0, [r3]
@ -239,7 +239,7 @@ _0814B094:
_0814B0A0:
cmp r6, 0
beq _0814B0C6
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -270,7 +270,7 @@ sub_814B0E8: @ 814B0E8
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
mov r12, r0
ldr r0, [r0]
ldr r7, =gActiveBank
@ -426,7 +426,7 @@ _0814B1F0:
adds r0, r5
ldrb r0, [r0]
bl sub_80729D0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -599,7 +599,7 @@ _0814B3BC:
thumb_func_start sub_814B3DC
sub_814B3DC: @ 814B3DC
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -737,7 +737,7 @@ sub_814B4E0: @ 814B4E0
bne _0814B532
adds r0, r3, 0
bl sub_805E408
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
@ -769,7 +769,7 @@ _0814B532:
thumb_func_start sub_814B554
sub_814B554: @ 814B554
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]
@ -808,7 +808,7 @@ sub_814B5A8: @ 814B5A8
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r7, =gActiveBank
ldrb r1, [r7]
@ -903,7 +903,7 @@ _0814B664:
thumb_func_start sub_814B69C
sub_814B69C: @ 814B69C
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r4, =gActiveBank
ldrb r2, [r4]
@ -1021,7 +1021,7 @@ _0814B7A6:
thumb_func_start sub_814B7B8
sub_814B7B8: @ 814B7B8
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -1045,7 +1045,7 @@ _0814B7DA:
thumb_func_start sub_814B7E8
sub_814B7E8: @ 814B7E8
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -3476,7 +3476,7 @@ sub_814CE14: @ 814CE14
ldrb r3, [r0]
cmp r3, 0
bne _0814CE5C
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
@ -3526,7 +3526,7 @@ _0814CE92:
thumb_func_start sub_814CEA4
sub_814CEA4: @ 814CEA4
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -3870,7 +3870,7 @@ sub_814D0F0: @ 814D0F0
thumb_func_start sub_814D19C
sub_814D19C: @ 814D19C
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4125,7 +4125,7 @@ _0814D2CE:
b _0814D3F4
.pool
_0814D3CC:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
@ -4178,7 +4178,7 @@ bx_move_anim_4: @ 814D40C
adds r1, r2
ldrb r1, [r1]
mov r8, r1
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -4286,7 +4286,7 @@ _0814D4CE:
ands r0, r2
strb r0, [r1]
_0814D51C:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4340,10 +4340,10 @@ _0814D580:
thumb_func_start sub_814D590
sub_814D590: @ 814D590
push {r4,r5,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r5, =gActiveBank
ldrb r4, [r5]
@ -4553,7 +4553,7 @@ sub_814D738: @ 814D738
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -5147,7 +5147,7 @@ _0814DC06:
adds r1, r4
ldrb r0, [r5]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r5]
ldr r1, [r0, 0x4]
@ -5326,7 +5326,7 @@ sub_814DDD8: @ 814DDD8
b _0814DE7C
.pool
_0814DE08:
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r1, [r5]
@ -5394,7 +5394,7 @@ _0814DE7C:
thumb_func_start sub_814DE9C
sub_814DE9C: @ 814DE9C
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -5430,7 +5430,7 @@ _0814DED4:
thumb_func_start sub_814DEE4
sub_814DEE4: @ 814DEE4
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]

View File

@ -158,7 +158,7 @@ _0805F292:
thumb_func_start sub_805F2A8
sub_805F2A8: @ 805F2A8
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r3, =gActiveBank
ldrb r0, [r3]
@ -277,7 +277,7 @@ _0805F3A0:
movs r6, 0x1
_0805F3A2:
ldr r3, =gUnknown_020244D8
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
mov r8, r1
ldr r2, [r1]
ldr r7, =gActiveBank
@ -449,7 +449,7 @@ _0805F4E4:
ands r0, r2
strb r0, [r1, 0x1]
_0805F51A:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -488,7 +488,7 @@ sub_805F560: @ 805F560
movs r0, 0
str r0, [sp]
mov r10, r0
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldr r4, =gActiveBank
ldrb r2, [r4]
@ -549,7 +549,7 @@ _0805F5A6:
adds r0, r3, 0
bl sub_8172EF0
_0805F5EE:
ldr r2, =gUnknown_020244D0
ldr r2, =gBattleSpritesDataPtr
ldr r0, [r2]
ldr r1, =gActiveBank
mov r8, r1
@ -643,7 +643,7 @@ _0805F684:
ldrb r0, [r0]
bl sub_80729D0
_0805F6B4:
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r2, [r3]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -723,7 +723,7 @@ _0805F768:
lsls r2, 1
bl m4aMPlayVolumeControl
_0805F774:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -906,7 +906,7 @@ _0805F8D2:
lsrs r1, 16
adds r0, r5, 0
bl sub_805EE54
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -972,7 +972,7 @@ sub_805F994: @ 805F994
ldrsh r0, [r0, r1]
cmp r0, 0
bne _0805F9E0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r2, r3, 1
@ -1010,7 +1010,7 @@ _0805F9E0:
ldr r0, =SpriteCallbackDummy
cmp r1, r0
bne _0805FA48
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r1, [r0, 0x4]
lsls r0, r3, 1
@ -1122,7 +1122,7 @@ _0805FAF2:
thumb_func_start sub_805FB08
sub_805FB08: @ 805FB08
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -1260,7 +1260,7 @@ sub_805FC10: @ 805FC10
ldr r0, =SpriteCallbackDummy
cmp r1, r0
bne _0805FC5C
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r3, 2
@ -1292,7 +1292,7 @@ _0805FC5C:
thumb_func_start bx_803AEDC
bx_803AEDC: @ 805FC80
push {r4,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r4, =gActiveBank
ldrb r1, [r4]
@ -1344,7 +1344,7 @@ _0805FCDA:
thumb_func_start sub_805FD00
sub_805FD00: @ 805FD00
push {r4-r7,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -1440,7 +1440,7 @@ _0805FDBC:
thumb_func_start sub_805FDF0
sub_805FDF0: @ 805FDF0
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -1524,7 +1524,7 @@ _0805FE8C:
thumb_func_start sub_805FEB8
sub_805FEB8: @ 805FEB8
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -1548,7 +1548,7 @@ _0805FEDA:
thumb_func_start bx_803B0F4
bx_803B0F4: @ 805FEE8
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4069,7 +4069,7 @@ sub_806156C: @ 806156C
ldrb r3, [r0]
cmp r3, 0
bne _080615B4
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
@ -4121,7 +4121,7 @@ _080615F0:
thumb_func_start sub_8061604
sub_8061604: @ 8061604
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4741,7 +4741,7 @@ sub_8061AF0: @ 8061AF0
thumb_func_start sub_8061B9C
sub_8061B9C: @ 8061B9C
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4962,7 +4962,7 @@ _08061C8A:
b _08061D9E
.pool
_08061D80:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -5009,7 +5009,7 @@ bx_move_anim_7: @ 8061DB0
adds r1, r2
ldrb r1, [r1]
mov r8, r1
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -5117,7 +5117,7 @@ _08061E72:
ands r0, r2
strb r0, [r1]
_08061EC0:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -5171,10 +5171,10 @@ _08061F24:
thumb_func_start sub_8061F34
sub_8061F34: @ 8061F34
push {r4,r5,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r5, =gActiveBank
ldrb r4, [r5]
@ -5694,7 +5694,7 @@ sub_8062390: @ 8062390
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -6168,7 +6168,7 @@ sub_80626FC: @ 80626FC
adds r1, r4
ldrb r0, [r6]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r6]
ldr r1, [r0, 0x4]
@ -6348,7 +6348,7 @@ dp01t_30_7_0803D67C: @ 8062918
b _08062A12
.pool
_08062948:
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -6415,7 +6415,7 @@ _080629B4:
adds r1, r2
movs r3, 0
strb r0, [r1]
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
@ -6455,7 +6455,7 @@ _08062A12:
thumb_func_start bx_0803D790_t7
bx_0803D790_t7: @ 8062A2C
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -6491,7 +6491,7 @@ _08062A64:
thumb_func_start sub_8062A74
sub_8062A74: @ 8062A74
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]
@ -6655,7 +6655,7 @@ sub_8062BB0: @ 8062BB0
negs r0, r0
ands r0, r1
strb r0, [r3]
ldr r0, =gUnknown_03005D00
ldr r0, =gPreBattleCallback1
ldr r0, [r0]
str r0, [r2]
ldr r0, [r2, 0x8]

View File

@ -191,7 +191,7 @@ _080575F0:
beq _08057658
movs r0, 0x5
bl PlaySE
ldr r1, =gUnknown_020244AC
ldr r1, =gActionSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -233,7 +233,7 @@ _08057658:
ands r0, r2
cmp r0, 0
beq _08057698
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -261,7 +261,7 @@ _08057698:
ands r0, r2
cmp r0, 0
beq _080576D8
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -290,7 +290,7 @@ _080576D8:
ands r0, r2
cmp r0, 0
beq _08057700
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -306,7 +306,7 @@ _08057700:
ands r0, r2
cmp r0, 0
beq _0805774C
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -508,7 +508,7 @@ _080578A0:
adds r0, r2
ldr r1, =sub_8039B2C
str r1, [r0]
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -664,7 +664,7 @@ _08057A32:
muls r0, r1
ldr r1, =gPlayerParty
adds r0, r1
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
adds r2, r1
ldrb r1, [r2]
adds r1, 0xD
@ -792,7 +792,7 @@ _08057B56:
muls r0, r1
ldr r1, =gPlayerParty
adds r0, r1
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
adds r2, r1
ldrb r1, [r2]
adds r1, 0xD
@ -890,7 +890,7 @@ _08057C48:
_08057C58:
movs r0, 0x5
bl PlaySE
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -977,7 +977,7 @@ _08057D18:
movs r0, 0x1
add r8, r0
_08057D24:
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
adds r0, r3, r0
adds r1, r6, 0
adds r1, 0x8
@ -1008,7 +1008,7 @@ _08057D5A:
cmp r0, 0
bne _08057D80
_08057D62:
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldrb r0, [r7]
adds r0, r1
ldrb r2, [r0]
@ -1095,7 +1095,7 @@ _08057E30:
ands r0, r2
cmp r0, 0
beq _08057E60
ldr r4, =gUnknown_020244B0
ldr r4, =gMoveSelectionCursor
ldrb r0, [r7]
adds r2, r0, r4
ldrb r1, [r2]
@ -1119,7 +1119,7 @@ _08057E60:
ands r0, r2
cmp r0, 0
beq _08057EA4
ldr r4, =gUnknown_020244B0
ldr r4, =gMoveSelectionCursor
ldrb r0, [r7]
adds r3, r0, r4
ldrb r2, [r3]
@ -1151,7 +1151,7 @@ _08057EA4:
ands r0, r2
cmp r0, 0
beq _08057ED4
ldr r4, =gUnknown_020244B0
ldr r4, =gMoveSelectionCursor
ldrb r0, [r7]
adds r2, r0, r4
ldrb r1, [r2]
@ -1173,7 +1173,7 @@ _08057ED4:
ands r0, r2
cmp r0, 0
beq _08057F30
ldr r4, =gUnknown_020244B0
ldr r4, =gMoveSelectionCursor
ldrb r0, [r7]
adds r3, r0, r4
ldrb r2, [r3]
@ -1221,7 +1221,7 @@ _08057F30:
ands r5, r6
cmp r5, 0
bne _08057F9E
ldr r4, =gUnknown_020244B0
ldr r4, =gMoveSelectionCursor
ldrb r0, [r7]
adds r0, r4
ldrb r0, [r0]
@ -1287,10 +1287,10 @@ _08057FD6:
beq _08057FF8
movs r0, 0x5
bl PlaySE
ldr r1, =gUnknown_02022E14
ldr r1, =gBattle_BG0_X
movs r0, 0
strh r0, [r1]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
movs r2, 0xA0
lsls r2, 1
adds r0, r2, 0
@ -1302,7 +1302,7 @@ _08057FF8:
ands r0, r1
cmp r0, 0
beq _08058038
ldr r5, =gUnknown_020244B0
ldr r5, =gMoveSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r2, r0, r5
@ -1333,7 +1333,7 @@ _08058038:
ands r0, r1
cmp r0, 0
beq _08058086
ldr r5, =gUnknown_020244B0
ldr r5, =gMoveSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r3, r0, r5
@ -1370,7 +1370,7 @@ _08058086:
ands r0, r1
cmp r0, 0
beq _080580C8
ldr r5, =gUnknown_020244B0
ldr r5, =gMoveSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r2, r0, r5
@ -1401,7 +1401,7 @@ _080580C8:
ands r0, r1
cmp r0, 0
beq _08058116
ldr r5, =gUnknown_020244B0
ldr r5, =gMoveSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r3, r0, r5
@ -1457,7 +1457,7 @@ sub_8058138: @ 8058138
_08058152:
movs r0, 0x5
bl PlaySE
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
mov r10, r0
ldr r1, =gActiveBank
mov r8, r1
@ -1594,7 +1594,7 @@ _0805824E:
adds r6, 0x1
cmp r6, 0x3
ble _0805824E
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldrb r0, [r7]
adds r0, r1
ldrb r0, [r0]
@ -1758,7 +1758,7 @@ _08058392:
adds r6, 0x1
cmp r6, 0x3
ble _08058392
ldr r4, =gUnknown_020244B0
ldr r4, =gMoveSelectionCursor
ldr r3, =gActiveBank
ldrb r0, [r3]
adds r0, r4
@ -1892,7 +1892,7 @@ _080584A8:
adds r0, r1
ldr r1, =sub_8057BFC
str r1, [r0]
ldr r3, =gUnknown_020244B0
ldr r3, =gMoveSelectionCursor
ldrb r0, [r2]
adds r0, r3
ldr r1, =gUnknown_03005D74
@ -1915,7 +1915,7 @@ _08058500:
ldr r0, =gUnknown_03005D74
ldrb r0, [r0]
bl battle_menu_cursor_related
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r1
@ -1947,7 +1947,7 @@ _08058554:
bne _0805856A
b _080586E8
_0805856A:
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
ldr r1, =gActiveBank
ldrb r1, [r1]
adds r1, r0
@ -1990,7 +1990,7 @@ _080585BA:
bcc _080585C8
b _080586E8
_080585C8:
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
ldr r1, =gActiveBank
ldrb r1, [r1]
adds r1, r0
@ -2010,7 +2010,7 @@ _080585E8:
ands r0, r2
cmp r0, 0
beq _080586E8
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
ldr r1, =gActiveBank
ldrb r1, [r1]
adds r1, r0
@ -2034,7 +2034,7 @@ _0805862C:
strb r0, [r4]
movs r0, 0x5
bl PlaySE
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -2064,7 +2064,7 @@ _0805865C:
ldrb r1, [r1]
cmp r0, r1
bcs _080586E8
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
ldr r1, =gActiveBank
ldrb r1, [r1]
adds r1, r0
@ -2087,7 +2087,7 @@ _080586AA:
strb r0, [r4]
movs r0, 0x5
bl PlaySE
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -2123,7 +2123,7 @@ sub_80586F8: @ 80586F8
ldrb r0, [r0]
cmp r0, 0
bne _0805875C
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _08058798
@ -2137,7 +2137,7 @@ sub_80586F8: @ 80586F8
negs r0, r0
ands r0, r1
strb r0, [r2]
ldr r0, =gUnknown_03005D00
ldr r0, =gPreBattleCallback1
ldr r0, [r0]
str r0, [r3]
ldr r0, =sub_8038D64
@ -2166,7 +2166,7 @@ _0805875C:
negs r0, r0
ands r0, r1
strb r0, [r2]
ldr r0, =gUnknown_03005D00
ldr r0, =gPreBattleCallback1
ldr r0, [r0]
str r0, [r3]
ldr r0, =sub_8038D64
@ -2233,7 +2233,7 @@ _08058810:
negs r0, r0
ands r0, r1
strb r0, [r3]
ldr r0, =gUnknown_03005D00
ldr r0, =gPreBattleCallback1
ldr r0, [r0]
str r0, [r2]
ldr r0, [r2, 0x8]
@ -2344,7 +2344,7 @@ _08058908:
thumb_func_start sub_8058924
sub_8058924: @ 8058924
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r3, =gActiveBank
ldrb r0, [r3]
@ -2452,7 +2452,7 @@ _08058A0A:
cmp r7, 0
beq _08058B08
_08058A0E:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
mov r9, r0
ldr r0, [r0]
mov r6, r10
@ -2593,7 +2593,7 @@ sub_8058B40: @ 8058B40
movs r0, 0
mov r9, r0
mov r8, r0
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r7, =gActiveBank
ldrb r2, [r7]
@ -2729,7 +2729,7 @@ _08058C38:
ldrb r0, [r0]
bl sub_80729D0
_08058C68:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -2743,7 +2743,7 @@ _08058C68:
orrs r1, r2
strb r1, [r0, 0x1]
_08058C82:
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldr r4, =gActiveBank
ldrb r2, [r4]
@ -2801,7 +2801,7 @@ _08058D08:
lsls r2, 1
bl m4aMPlayVolumeControl
_08058D14:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -2950,7 +2950,7 @@ _08058E48:
ldr r1, =gSprites
adds r0, r1
bl DestroySprite
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -3015,7 +3015,7 @@ sub_8058EDC: @ 8058EDC
ldr r0, =SpriteCallbackDummy
cmp r4, r0
bne _08058F94
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldr r1, [r0, 0x4]
lsls r0, r3, 1
@ -3098,7 +3098,7 @@ _08058F94:
thumb_func_start sub_8058FC0
sub_8058FC0: @ 8058FC0
push {r4,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r4, =gActiveBank
ldrb r1, [r4]
@ -3142,7 +3142,7 @@ _0805900E:
thumb_func_start sub_805902C
sub_805902C: @ 805902C
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -3774,7 +3774,7 @@ sub_80595A4: @ 80595A4
lsls r0, 3
adds r2, r0, r1
ldrb r5, [r2, 0xC]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r5, 1
@ -3942,7 +3942,7 @@ _08059724:
thumb_func_start sub_8059744
sub_8059744: @ 8059744
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -4145,7 +4145,7 @@ bx_wait_t1: @ 805991C
ldrb r0, [r0]
cmp r0, 0
beq _08059942
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4407,7 +4407,7 @@ sub_8059B3C: @ 8059B3C
adds r0, r5, 0x4
adds r4, r0
ldr r6, =gDisplayedStringBattle
ldr r5, =gUnknown_020244B0
ldr r5, =gMoveSelectionCursor
adds r1, r5
adds r0, r4, 0
adds r0, 0x8
@ -4462,7 +4462,7 @@ sub_8059BB0: @ 8059BB0
strb r1, [r0]
adds r0, 0x1
ldr r3, =gBattleMoves
ldr r2, =gUnknown_020244B0
ldr r2, =gMoveSelectionCursor
ldrb r1, [r5]
adds r1, r2
ldrb r1, [r1]
@ -4657,7 +4657,7 @@ sub_8059D50: @ 8059D50
thumb_func_start sub_8059D60
sub_8059D60: @ 8059D60
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4681,7 +4681,7 @@ _08059D82:
thumb_func_start bx_8030B2C
bx_8030B2C: @ 8059D90
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4711,10 +4711,10 @@ b_link_standby_message: @ 8059DC0
ands r0, r1
cmp r0, 0
beq _08059DE0
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gText_LinkStandby
movs r1, 0
@ -6924,11 +6924,11 @@ sub_805B1CC: @ 805B1CC
ldr r2, =gPlayerParty
adds r0, r2
bl sub_805DD7C
ldr r1, =gUnknown_020244AC
ldr r1, =gActionSelectionCursor
ldrb r0, [r5]
adds r0, r1
strb r4, [r0]
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldrb r0, [r5]
adds r0, r1
strb r4, [r0]
@ -7124,7 +7124,7 @@ sub_805B3D4: @ 805B3D4
ldrb r3, [r0]
cmp r3, 0
bne _0805B41C
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
@ -7174,7 +7174,7 @@ _0805B452:
thumb_func_start sub_805B464
sub_805B464: @ 805B464
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -7890,7 +7890,7 @@ sub_805B9F8: @ 805B9F8
thumb_func_start sub_805BAB8
sub_805BAB8: @ 805BAB8
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -8013,7 +8013,7 @@ sub_805BBA4: @ 805BBA4
thumb_func_start sub_805BBC4
sub_805BBC4: @ 805BBC4
push {r4,r5,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x8]
movs r0, 0x4
@ -8054,7 +8054,7 @@ sub_805BC18: @ 805BC18
adds r1, 0x1
adds r0, r1
ldrb r1, [r0]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
strb r1, [r0, 0x8]
@ -8229,7 +8229,7 @@ _0805BCBE:
b _0805BDE4
.pool
_0805BDBC:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
@ -8282,7 +8282,7 @@ bx_move_anim_1: @ 805BDFC
adds r1, r2
ldrb r1, [r1]
mov r8, r1
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -8390,7 +8390,7 @@ _0805BEBE:
ands r0, r2
strb r0, [r1]
_0805BF0C:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -8444,10 +8444,10 @@ _0805BF70:
thumb_func_start sub_805BF80
sub_805BF80: @ 805BF80
push {r4,r5,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r5, =gActiveBank
ldrb r4, [r5]
@ -8503,9 +8503,9 @@ sub_805C004: @ 805C004
lsrs r1, r0, 24
cmp r1, 0
bne _0805C02A
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r1, [r0]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
movs r0, 0xA0
strh r0, [r1]
ldr r1, =gBattleBankFunc
@ -8543,7 +8543,7 @@ _0805C062:
adds r4, 0x1
cmp r4, 0x3
ble _0805C062
ldr r1, =gUnknown_020244AC
ldr r1, =gActionSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -8611,9 +8611,9 @@ sub_805C114: @ 805C114
lsrs r1, r0, 24
cmp r1, 0
bne _0805C13E
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r1, [r0]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
movs r2, 0xA0
lsls r2, 1
adds r0, r2, 0
@ -8648,7 +8648,7 @@ sub_805C158: @ 805C158
lsls r0, 24
cmp r0, 0
bne _0805C194
ldr r1, =gUnknown_0203BD30
ldr r1, =gBattlePalaceMoveSelectionRngValue
ldr r0, =gRngValue
ldr r0, [r0]
str r0, [r1]
@ -8715,7 +8715,7 @@ sub_805C210: @ 805C210
ldr r1, =gUnknown_03005D74
movs r0, 0xFF
strb r0, [r1]
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -9132,7 +9132,7 @@ sub_805C5C4: @ 805C5C4
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -9794,7 +9794,7 @@ dp01t_2F_1_pokemon_enter: @ 805CA80
adds r1, r4
ldrb r0, [r7]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r7]
ldr r1, [r0, 0x4]
@ -10015,7 +10015,7 @@ sub_805CD74: @ 805CD74
b _0805CE18
.pool
_0805CDA4:
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r1, [r5]
@ -10083,7 +10083,7 @@ _0805CE18:
thumb_func_start sub_805CE38
sub_805CE38: @ 805CE38
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -10119,7 +10119,7 @@ _0805CE70:
thumb_func_start sub_805CE80
sub_805CE80: @ 805CE80
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]
@ -10333,21 +10333,21 @@ _0805D054:
beq _0805D07C
b _0805D084
_0805D05A:
ldr r0, =gUnknown_020244AC
ldr r0, =gActionSelectionCursor
adds r0, r3, r0
strb r2, [r0]
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldrb r0, [r4]
adds r0, r1
strb r2, [r0]
b _0805D084
.pool
_0805D074:
ldr r0, =gUnknown_020244AC
ldr r0, =gActionSelectionCursor
b _0805D07E
.pool
_0805D07C:
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
_0805D07E:
adds r0, r3, r0
movs r1, 0

View File

@ -132,7 +132,7 @@ _081BAEE8:
thumb_func_start sub_81BAF00
sub_81BAF00: @ 81BAF00
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r3, =gActiveBank
ldrb r0, [r3]
@ -240,7 +240,7 @@ _081BAFD8:
_081BAFE4:
cmp r6, 0
beq _081BB00A
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -271,7 +271,7 @@ sub_81BB02C: @ 81BB02C
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
mov r12, r0
ldr r0, [r0]
ldr r7, =gActiveBank
@ -427,7 +427,7 @@ _081BB134:
adds r0, r5
ldrb r0, [r0]
bl sub_80729D0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -1006,7 +1006,7 @@ sub_81BB688: @ 81BB688
lsls r0, 3
adds r2, r0, r1
ldrb r5, [r2, 0xC]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r5, 1
@ -1174,7 +1174,7 @@ _081BB808:
thumb_func_start sub_81BB828
sub_81BB828: @ 81BB828
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -1312,7 +1312,7 @@ sub_81BB92C: @ 81BB92C
bne _081BB97E
adds r0, r3, 0
bl sub_805E408
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
@ -1344,7 +1344,7 @@ _081BB97E:
thumb_func_start dp01t_35_3_free_vram
dp01t_35_3_free_vram: @ 81BB9A0
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]
@ -1383,7 +1383,7 @@ sub_81BB9F4: @ 81BB9F4
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r7, =gActiveBank
ldrb r1, [r7]
@ -1478,7 +1478,7 @@ _081BBAB0:
thumb_func_start sub_81BBAE8
sub_81BBAE8: @ 81BBAE8
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r4, =gActiveBank
ldrb r2, [r4]
@ -1596,7 +1596,7 @@ _081BBBF2:
thumb_func_start sub_81BBC04
sub_81BBC04: @ 81BBC04
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -1620,7 +1620,7 @@ _081BBC26:
thumb_func_start bx_80E8A6C
bx_80E8A6C: @ 81BBC34
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4051,7 +4051,7 @@ sub_81BD260: @ 81BD260
ldrb r3, [r0]
cmp r3, 0
bne _081BD2A8
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
@ -4101,7 +4101,7 @@ _081BD2DE:
thumb_func_start sub_81BD2F0
sub_81BD2F0: @ 81BD2F0
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4494,7 +4494,7 @@ sub_81BD5C8: @ 81BD5C8
thumb_func_start sub_81BD674
sub_81BD674: @ 81BD674
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4743,7 +4743,7 @@ _081BD7A2:
b _081BD8B6
.pool
_081BD898:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -4790,7 +4790,7 @@ bx_move_anim_3: @ 81BD8C8
adds r1, r2
ldrb r1, [r1]
mov r8, r1
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -4898,7 +4898,7 @@ _081BD98A:
ands r0, r2
strb r0, [r1]
_081BD9D8:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4952,10 +4952,10 @@ _081BDA3C:
thumb_func_start sub_81BDA4C
sub_81BDA4C: @ 81BDA4C
push {r4,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r4, =gActiveBank
ldrb r0, [r4]
@ -5340,7 +5340,7 @@ sub_81BDD9C: @ 81BDD9C
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -5880,7 +5880,7 @@ _081BE21A:
adds r1, r4
ldrb r0, [r5]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r5]
ldr r1, [r0, 0x4]
@ -6059,7 +6059,7 @@ dp01t_30_3_80EB11C: @ 81BE3D4
b _081BE478
.pool
_081BE404:
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r1, [r5]
@ -6127,7 +6127,7 @@ _081BE478:
thumb_func_start sub_81BE498
sub_81BE498: @ 81BE498
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -6163,7 +6163,7 @@ _081BE4D0:
thumb_func_start sub_81BE4E0
sub_81BE4E0: @ 81BE4E0
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]

View File

@ -157,7 +157,7 @@ _0818661A:
thumb_func_start sub_8186630
sub_8186630: @ 8186630
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r3, =gActiveBank
ldrb r0, [r3]
@ -311,7 +311,7 @@ _0818676A:
lsrs r3, r0, 24
cmp r3, 0x1
bne _08186816
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
mov r12, r0
ldr r0, [r0]
ldrb r2, [r6]
@ -388,7 +388,7 @@ _0818676A:
adds r0, r4, 0
bl FreeSpritePaletteByTag
_08186816:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
mov r2, r8
ldrb r1, [r2]
@ -425,7 +425,7 @@ sub_818686C: @ 818686C
movs r0, 0
mov r9, r0
mov r8, r0
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r7, =gActiveBank
ldrb r2, [r7]
@ -561,7 +561,7 @@ _08186964:
ldrb r0, [r0]
bl sub_80729D0
_08186994:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -575,7 +575,7 @@ _08186994:
orrs r1, r2
strb r1, [r0, 0x1]
_081869AE:
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldr r4, =gActiveBank
ldrb r2, [r4]
@ -639,7 +639,7 @@ _08186A40:
lsls r2, 1
bl m4aMPlayVolumeControl
_08186A4C:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -810,7 +810,7 @@ _08186B8A:
lsrs r1, 16
adds r0, r5, 0
bl sub_805EE54
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -881,7 +881,7 @@ sub_8186C48: @ 8186C48
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08186CFA
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r1, [r0, 0x4]
lsls r4, r3, 1
@ -1009,7 +1009,7 @@ _08186D86:
thumb_func_start sub_8186D9C
sub_8186D9C: @ 8186D9C
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -1147,7 +1147,7 @@ sub_8186EA4: @ 8186EA4
ldr r0, =SpriteCallbackDummy
cmp r1, r0
bne _08186EF0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r3, 2
@ -1179,7 +1179,7 @@ _08186EF0:
thumb_func_start sub_8186F14
sub_8186F14: @ 8186F14
push {r4,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r4, =gActiveBank
ldrb r1, [r4]
@ -1231,7 +1231,7 @@ _08186F6E:
thumb_func_start sub_8186F94
sub_8186F94: @ 8186F94
push {r4-r7,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -1327,7 +1327,7 @@ _08187050:
thumb_func_start sub_8187084
sub_8187084: @ 8187084
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -1411,7 +1411,7 @@ _08187120:
thumb_func_start sub_818714C
sub_818714C: @ 818714C
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -1435,7 +1435,7 @@ _0818716E:
thumb_func_start sub_818717C
sub_818717C: @ 818717C
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -3888,7 +3888,7 @@ sub_8188768: @ 8188768
ldrb r3, [r0]
cmp r3, 0
bne _081887B0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
@ -3940,7 +3940,7 @@ _081887EC:
thumb_func_start sub_8188800
sub_8188800: @ 8188800
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4278,7 +4278,7 @@ sub_8188A4C: @ 8188A4C
thumb_func_start sub_8188AF8
sub_8188AF8: @ 8188AF8
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4499,7 +4499,7 @@ _08188BE6:
b _08188CFA
.pool
_08188CDC:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -4546,7 +4546,7 @@ sub_8188D0C: @ 8188D0C
adds r1, r2
ldrb r1, [r1]
mov r8, r1
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -4654,7 +4654,7 @@ _08188DCE:
ands r0, r2
strb r0, [r1]
_08188E1C:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4708,10 +4708,10 @@ _08188E80:
thumb_func_start sub_8188E90
sub_8188E90: @ 8188E90
push {r4,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r4, =gActiveBank
ldrb r0, [r4]
@ -4983,7 +4983,7 @@ sub_81890CC: @ 81890CC
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -5457,7 +5457,7 @@ sub_8189438: @ 8189438
adds r1, r4
ldrb r0, [r6]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r6]
ldr r1, [r0, 0x4]
@ -5632,7 +5632,7 @@ sub_8189648: @ 8189648
b _08189742
.pool
_08189678:
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -5699,7 +5699,7 @@ _081896E4:
adds r1, r2
movs r3, 0
strb r0, [r1]
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
@ -5739,7 +5739,7 @@ _08189742:
thumb_func_start sub_818975C
sub_818975C: @ 818975C
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -5775,7 +5775,7 @@ _08189794:
thumb_func_start sub_81897A4
sub_81897A4: @ 81897A4
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]

View File

@ -132,7 +132,7 @@ _08189A40:
thumb_func_start sub_8189A58
sub_8189A58: @ 8189A58
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r1, [r4]
ldr r3, =gActiveBank
ldrb r0, [r3]
@ -244,7 +244,7 @@ _08189B42:
bne _08189B48
b _08189D18
_08189B48:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
mov r9, r0
ldr r0, [r0]
ldr r5, =gActiveBank
@ -435,7 +435,7 @@ _08189CE6:
_08189CF2:
cmp r6, 0
beq _08189D18
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -478,7 +478,7 @@ sub_8189D40: @ 8189D40
lsls r0, 24
cmp r0, 0
bne _08189DBE
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldrb r2, [r4]
ldr r1, [r0, 0x4]
@ -527,7 +527,7 @@ _08189D8C:
adds r0, r3, 0
bl sub_8172EF0
_08189DBE:
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r2, =gActiveBank
ldrb r5, [r2]
@ -621,7 +621,7 @@ _08189E54:
ldrb r0, [r0]
bl sub_80729D0
_08189E84:
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -702,7 +702,7 @@ _08189F38:
lsls r2, 1
bl m4aMPlayVolumeControl
_08189F44:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -779,7 +779,7 @@ _08189FC8:
ldr r1, =gSprites
adds r0, r1
bl DestroySprite
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -975,7 +975,7 @@ _0818A190:
thumb_func_start sub_818A1B0
sub_818A1B0: @ 818A1B0
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -1113,7 +1113,7 @@ sub_818A2B4: @ 818A2B4
bne _0818A306
adds r0, r3, 0
bl sub_805E408
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
@ -1145,7 +1145,7 @@ _0818A306:
thumb_func_start sub_818A328
sub_818A328: @ 818A328
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]
@ -1184,7 +1184,7 @@ sub_818A37C: @ 818A37C
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldr r7, =gActiveBank
ldrb r1, [r7]
@ -1279,7 +1279,7 @@ _0818A438:
thumb_func_start sub_818A470
sub_818A470: @ 818A470
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r4, =gActiveBank
ldrb r2, [r4]
@ -1397,7 +1397,7 @@ _0818A57A:
thumb_func_start sub_818A58C
sub_818A58C: @ 818A58C
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -1421,7 +1421,7 @@ _0818A5AE:
thumb_func_start sub_818A5BC
sub_818A5BC: @ 818A5BC
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -3852,7 +3852,7 @@ sub_818BBE8: @ 818BBE8
ldrb r3, [r0]
cmp r3, 0
bne _0818BC30
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
@ -3902,7 +3902,7 @@ _0818BC66:
thumb_func_start sub_818BC78
sub_818BC78: @ 818BC78
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4350,7 +4350,7 @@ sub_818BFB8: @ 818BFB8
thumb_func_start sub_818C064
sub_818C064: @ 818C064
push {r4-r6,lr}
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -4599,7 +4599,7 @@ _0818C192:
b _0818C2A6
.pool
_0818C288:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -4646,7 +4646,7 @@ bx_move_anim_2: @ 818C2B8
adds r1, r2
ldrb r1, [r1]
mov r8, r1
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -4754,7 +4754,7 @@ _0818C37A:
ands r0, r2
strb r0, [r1]
_0818C3C8:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -4808,10 +4808,10 @@ _0818C42C:
thumb_func_start sub_818C43C
sub_818C43C: @ 818C43C
push {r4,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r4, =gActiveBank
ldrb r0, [r4]
@ -5134,7 +5134,7 @@ sub_818C6F4: @ 818C6F4
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -5676,7 +5676,7 @@ _0818CB5A:
adds r1, r4
ldrb r0, [r5]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r5]
ldr r1, [r0, 0x4]
@ -5855,7 +5855,7 @@ sub_818CD30: @ 818CD30
b _0818CDD4
.pool
_0818CD60:
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r0, [r6]
ldr r5, =gActiveBank
ldrb r1, [r5]
@ -5923,7 +5923,7 @@ _0818CDD4:
thumb_func_start bx_increment_dp11b_field_5_till_x60_then_resume
bx_increment_dp11b_field_5_till_x60_then_resume: @ 818CDF4
push {r4,lr}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r3, =gActiveBank
ldrb r1, [r3]
@ -5959,7 +5959,7 @@ _0818CE2C:
thumb_func_start sub_818CE3C
sub_818CE3C: @ 818CE3C
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
ldr r0, =gActiveBank
ldrb r3, [r0]

View File

@ -71,7 +71,7 @@ bx_battle_menu_t6_2: @ 81593D8
beq _08159446
movs r0, 0x5
bl PlaySE
ldr r1, =gUnknown_020244AC
ldr r1, =gActionSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -118,7 +118,7 @@ _08159446:
ands r0, r1
cmp r0, 0
beq _08159484
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -144,7 +144,7 @@ _08159484:
ands r0, r1
cmp r0, 0
beq _081594C0
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -170,7 +170,7 @@ _081594C0:
ands r0, r1
cmp r0, 0
beq _0815950C
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -204,7 +204,7 @@ _0815950C:
ands r0, r1
cmp r0, 0
beq _0815954E
ldr r5, =gUnknown_020244AC
ldr r5, =gActionSelectionCursor
ldr r4, =gActiveBank
ldrb r0, [r4]
adds r0, r5
@ -318,7 +318,7 @@ sub_81595E4: @ 81595E4
negs r0, r0
ands r0, r1
strb r0, [r3]
ldr r0, =gUnknown_03005D00
ldr r0, =gPreBattleCallback1
ldr r0, [r0]
str r0, [r2]
ldr r0, [r2, 0x8]
@ -336,7 +336,7 @@ bx_wait_t6: @ 8159624
ldrb r0, [r0]
cmp r0, 0
beq _0815964A
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -410,7 +410,7 @@ _081596BE:
thumb_func_start sub_81596D4
sub_81596D4: @ 81596D4
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -484,7 +484,7 @@ _0815976A:
thumb_func_start bx_80364D0
bx_80364D0: @ 815977C
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -689,7 +689,7 @@ sub_8159904: @ 8159904
thumb_func_start sub_8159910
sub_8159910: @ 8159910
push {r4,r5,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x8]
movs r0, 0x4
@ -730,7 +730,7 @@ sub_8159964: @ 8159964
adds r1, 0x1
adds r0, r1
ldrb r1, [r0]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
strb r1, [r0, 0x8]
@ -778,10 +778,10 @@ sub_81599D0: @ 81599D0
thumb_func_start dp01t_10_6_message
dp01t_10_6_message: @ 81599DC
push {r4,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r4, =gActiveBank
ldrb r0, [r4]
@ -832,9 +832,9 @@ sub_8159A54: @ 8159A54
lsrs r1, r0, 24
cmp r1, 0
bne _08159A7A
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r1, [r0]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
movs r0, 0xA0
strh r0, [r1]
ldr r1, =gBattleBankFunc
@ -871,7 +871,7 @@ _08159AAE:
adds r4, 0x1
cmp r4, 0x3
ble _08159AAE
ldr r1, =gUnknown_020244AC
ldr r1, =gActionSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1

View File

@ -324,7 +324,7 @@ sub_816864C: @ 816864C
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r5, =gActiveBank
ldrb r2, [r5]
@ -500,7 +500,7 @@ _0816877A:
adds r0, r5
ldrb r0, [r0]
bl sub_80729D0
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
@ -549,7 +549,7 @@ sub_8168818: @ 8168818
_08168842:
cmp r4, 0
beq _08168904
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r0, [r7]
ldr r4, [r0, 0x4]
lsls r0, r3, 1
@ -761,7 +761,7 @@ _08168A1A:
thumb_func_start sub_8168A20
sub_8168A20: @ 8168A20
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
@ -833,7 +833,7 @@ _08168AB4:
thumb_func_start sub_8168AC8
sub_8168AC8: @ 8168AC8
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -907,7 +907,7 @@ _08168B5E:
thumb_func_start sub_8168B70
sub_8168B70: @ 8168B70
push {lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
@ -3221,7 +3221,7 @@ sub_816A078: @ 816A078
thumb_func_start sub_816A084
sub_816A084: @ 816A084
push {r4,r5,lr}
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x8]
movs r0, 0x4
@ -3262,7 +3262,7 @@ sub_816A0D8: @ 816A0D8
adds r1, 0x1
adds r0, r1
ldrb r1, [r0]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
strb r1, [r0, 0x8]
@ -3407,7 +3407,7 @@ sub_816A144: @ 816A144
b _0816A25A
.pool
_0816A23C:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -3449,7 +3449,7 @@ bx_move_anim_5: @ 816A26C
ldrb r0, [r1]
lsls r0, 8
orrs r4, r0
ldr r7, =gUnknown_020244D0
ldr r7, =gBattleSpritesDataPtr
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
@ -3592,10 +3592,10 @@ _0816A3AC:
thumb_func_start sub_816A3B8
sub_816A3B8: @ 816A3B8
push {r4,lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r4, =gActiveBank
ldrb r0, [r4]
@ -3646,9 +3646,9 @@ sub_816A430: @ 816A430
lsrs r1, r0, 24
cmp r1, 0
bne _0816A456
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r1, [r0]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
movs r0, 0xA0
strh r0, [r1]
ldr r1, =gBattleBankFunc
@ -3685,7 +3685,7 @@ _0816A48A:
adds r4, 0x1
cmp r4, 0x3
ble _0816A48A
ldr r1, =gUnknown_020244AC
ldr r1, =gActionSelectionCursor
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
@ -3749,9 +3749,9 @@ _0816A522:
lsrs r1, r0, 24
cmp r1, 0
bne _0816A574
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r1, [r0]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
movs r2, 0xA0
lsls r2, 1
adds r0, r2, 0
@ -4342,7 +4342,7 @@ sub_816A90C: @ 816A90C
adds r1, r4
ldrb r0, [r7]
strh r0, [r1, 0x8]
ldr r3, =gUnknown_020244D0
ldr r3, =gBattleSpritesDataPtr
ldr r0, [r3]
ldrb r2, [r7]
ldr r1, [r0, 0x4]
@ -4393,7 +4393,7 @@ sub_816AA80: @ 816AA80
adds r6, r0, 0
lsls r6, 24
lsrs r6, 24
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r6, 2
@ -4622,7 +4622,7 @@ sub_816AC78: @ 816AC78
b _0816ACE6
.pool
_0816ACA8:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r5, =gActiveBank
ldrb r1, [r5]

View File

@ -3161,9 +3161,9 @@ _0819044E:
ldr r0, =gUnknown_0860CEB4
bl InitWindows
bl DeactivateAllTextPrinters
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r4, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r4, [r0]
ldr r0, =gBattle_BG1_X
strh r4, [r0]
@ -3171,7 +3171,7 @@ _0819044E:
strh r4, [r0]
ldr r0, =gBattle_BG3_X
strh r4, [r0]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r4, [r0]
mov r2, r9
cmp r2, 0x2
@ -4366,10 +4366,10 @@ _08190E98:
ldrsh r2, [r0, r5]
cmp r2, 0
beq _08190ED4
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gBattle_BG1_X
strh r1, [r0]
@ -4379,9 +4379,9 @@ _08190E98:
b _08190EE6
.pool
_08190ED4:
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r2, [r0]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
movs r0, 0xA0
strh r0, [r1]
ldr r0, =gBattle_BG1_X
@ -4765,10 +4765,10 @@ _08191234:
ldrsh r2, [r0, r5]
cmp r2, 0
beq _08191278
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gBattle_BG1_X
strh r1, [r0]
@ -4779,9 +4779,9 @@ _08191234:
b _0819128C
.pool
_08191278:
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r2, [r0]
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
ldr r3, =0x0000ff60
adds r0, r3, 0
strh r0, [r1]
@ -5157,10 +5157,10 @@ _081915CC:
ldrsh r2, [r0, r5]
cmp r2, 0
beq _0819160C
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r2, =gBattle_BG1_X
movs r6, 0x80
@ -5172,12 +5172,12 @@ _081915CC:
b _08191622
.pool
_0819160C:
ldr r1, =gUnknown_02022E14
ldr r1, =gBattle_BG0_X
movs r3, 0x80
lsls r3, 1
adds r0, r3, 0
strh r0, [r1]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r2, [r0]
ldr r0, =gBattle_BG1_X
strh r2, [r0]
@ -5457,10 +5457,10 @@ _0819187C:
ldrsh r2, [r0, r5]
cmp r2, 0
beq _081918BC
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r2, =gBattle_BG1_X
movs r6, 0x80
@ -5472,12 +5472,12 @@ _0819187C:
b _081918D2
.pool
_081918BC:
ldr r1, =gUnknown_02022E14
ldr r1, =gBattle_BG0_X
movs r3, 0x80
lsls r3, 1
adds r0, r3, 0
strh r0, [r1]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r2, [r0]
ldr r0, =gBattle_BG1_X
strh r2, [r0]
@ -5744,10 +5744,10 @@ _08191B08:
ldrsh r2, [r0, r5]
cmp r2, 0
beq _08191B48
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r2, =gBattle_BG1_X
movs r6, 0xFF
@ -5759,12 +5759,12 @@ _08191B08:
b _08191B5E
.pool
_08191B48:
ldr r1, =gUnknown_02022E14
ldr r1, =gBattle_BG0_X
movs r3, 0xFF
lsls r3, 8
adds r0, r3, 0
strh r0, [r1]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r2, [r0]
ldr r0, =gBattle_BG1_X
strh r2, [r0]
@ -6011,10 +6011,10 @@ _08191D68:
ldrsh r2, [r0, r5]
cmp r2, 0
beq _08191DA8
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r2, =gBattle_BG1_X
movs r6, 0xFF
@ -6026,12 +6026,12 @@ _08191D68:
b _08191DBE
.pool
_08191DA8:
ldr r1, =gUnknown_02022E14
ldr r1, =gBattle_BG0_X
movs r3, 0xFF
lsls r3, 8
adds r0, r3, 0
strh r0, [r1]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r2, [r0]
ldr r0, =gBattle_BG1_X
strh r2, [r0]
@ -6306,7 +6306,7 @@ _08191FF8:
asrs r0, 16
cmp r0, 0x29
beq _08192100
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
ldrh r0, [r1]
subs r0, 0x4
strh r0, [r1]
@ -6331,7 +6331,7 @@ _08192038:
asrs r0, 16
cmp r0, 0x29
beq _08192100
ldr r1, =gUnknown_02022E16
ldr r1, =gBattle_BG0_Y
ldrh r0, [r1]
adds r0, 0x4
strh r0, [r1]
@ -6356,7 +6356,7 @@ _08192078:
asrs r0, 16
cmp r0, 0x41
beq _08192100
ldr r1, =gUnknown_02022E14
ldr r1, =gBattle_BG0_X
ldrh r0, [r1]
subs r0, 0x4
strh r0, [r1]
@ -6385,7 +6385,7 @@ _081920BC:
asrs r0, 16
cmp r0, 0x41
beq _08192100
ldr r1, =gUnknown_02022E14
ldr r1, =gBattle_BG0_X
ldrh r0, [r1]
adds r0, 0x4
strh r0, [r1]
@ -10400,9 +10400,9 @@ _0819427C:
ldr r0, =gUnknown_0860CE94
bl InitWindows
bl DeactivateAllTextPrinters
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r4, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r4, [r0]
ldr r0, =gBattle_BG1_X
strh r4, [r0]
@ -11358,11 +11358,11 @@ sub_8194B70: @ 8194B70
movs r1, 0x80
movs r2, 0x2
bl ChangeBgY
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
ldrh r1, [r0]
movs r0, 0x10
bl SetGpuReg
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
ldrh r1, [r0]
movs r0, 0x12
bl SetGpuReg
@ -11486,11 +11486,11 @@ _08194CD4:
thumb_func_start sub_8194CE4
sub_8194CE4: @ 8194CE4
push {lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
ldrh r1, [r0]
movs r0, 0x10
bl SetGpuReg
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
ldrh r1, [r0]
movs r0, 0x12
bl SetGpuReg

View File

@ -18768,7 +18768,7 @@ _081A43EE:
sub_81A4410: @ 81A4410
push {r4,lr}
ldr r4, =gScriptResult
bl sub_8185338
bl MoveRecordedBattleToSaveData
strh r0, [r4]
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
@ -20533,10 +20533,10 @@ _081A52A4:
lsls r1, 1
movs r2, 0x20
bl LoadCompressedPalette
ldr r1, =gUnknown_02022E24
ldr r1, =gBattle_WIN0H
movs r0, 0xFF
strh r0, [r1]
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
movs r0, 0x70
strh r0, [r1]
b _081A553E

View File

@ -780,7 +780,7 @@ sub_807294C: @ 807294C
ldr r7, [sp, 0x14]
lsls r0, 24
lsrs r0, 24
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
ldr r4, [r6]
ldr r5, [r4, 0xC]
lsls r4, r0, 2
@ -1317,7 +1317,7 @@ _08072D86:
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalStringN
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1333,7 +1333,7 @@ _08072D86:
lsls r0, 2
adds r5, r0, r1
_08072DB8:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1398,7 +1398,7 @@ sub_8072E0C: @ 8072E0C
lsls r0, 24
cmp r0, 0
bne _08072F28
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r1, [r0]
movs r2, 0x3A
ldrsh r0, [r7, r2]
@ -1500,7 +1500,7 @@ _08072F28:
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x2C]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
ldr r2, [sp, 0x2C]
@ -1536,7 +1536,7 @@ _08072F52:
ldr r1, =gText_Slash
bl StringCopy
_08072F82:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1556,7 +1556,7 @@ _08072F82:
_08072FA6:
cmp r4, 0x2
bhi _08072FF0
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r2, 0xBA
lsls r2, 1
@ -1579,7 +1579,7 @@ _08072FA6:
b _0807301A
.pool
_08072FF0:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1609,7 +1609,7 @@ _08073024:
mov r3, r8
cmp r3, 0
bne _08073084
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1702,7 +1702,7 @@ sub_80730D4: @ 80730D4
lsls r0, 24
lsrs r0, 24
bl GetBankIdentity
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r2, [r1]
movs r3, 0xBA
lsls r3, 1
@ -1877,7 +1877,7 @@ _08073236:
strb r0, [r1, 0x5]
movs r0, 0xBA
strb r0, [r1, 0x8]
ldr r5, =gBattleSpritesGfx
ldr r5, =gMonSpritesGfxPtr
ldr r0, [r5]
movs r2, 0xBA
lsls r2, 1
@ -2004,7 +2004,7 @@ _0807336A:
bne _08073382
b _080735A8
_08073382:
ldr r5, =gUnknown_020244D0
ldr r5, =gBattleSpritesDataPtr
ldr r0, [r5]
ldr r3, [r0]
mov r0, r9
@ -2988,7 +2988,7 @@ _08073BC6:
ldr r2, [sp, 0x10]
cmp r2, 0
beq _08073C0A
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r3, [r0, 0x8]
ldrb r2, [r3, 0x9]
@ -3311,7 +3311,7 @@ sub_8073E64: @ 8073E64
bne _08073F54
ldrb r5, [r4, 0xA]
movs r4, 0
ldr r6, =gUnknown_020244D0
ldr r6, =gBattleSpritesDataPtr
adds r0, r7, 0
adds r0, 0xE
adds r2, r3, r0
@ -3406,7 +3406,7 @@ _08073F54:
negs r0, r0
cmp r1, r0
bne _08073F8A
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
@ -3516,7 +3516,7 @@ _08074034:
negs r0, r0
cmp r2, r0
bne _0807406A
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r5, 1
@ -4140,7 +4140,7 @@ _08074542:
adds r4, 0x1
cmp r4, 0x2
ble _08074542
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
adds r0, r7, r0
@ -4222,7 +4222,7 @@ _080745B8:
cmp r0, 0x1
bne _08074672
_08074626:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r7, 2
@ -4760,7 +4760,7 @@ sub_8074AA0: @ 8074AA0
mov r9, r2
cmp r2, 0
bne _08074AEC
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0xC]
mov r1, r8
@ -4782,7 +4782,7 @@ sub_8074AA0: @ 8074AA0
b _08074B48
.pool
_08074AEC:
ldr r2, =gUnknown_020244D0
ldr r2, =gBattleSpritesDataPtr
mov r10, r2
ldr r0, [r2]
ldr r2, [r0, 0xC]
@ -4833,7 +4833,7 @@ _08074B48:
beq _08074B64
cmp r2, 0
bne _08074B6C
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
adds r0, r7, r0
@ -4851,7 +4851,7 @@ _08074B6C:
negs r0, r0
cmp r4, r0
bne _08074B86
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0xC]
mov r2, r8
@ -4890,7 +4890,7 @@ sub_8074B9C: @ 8074B9C
beq _08074CA0
b _08074D9E
_08074BB8:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0xC]
lsls r5, r6, 2
@ -4924,7 +4924,7 @@ _08074BF4:
ldr r0, =gSprites
mov r8, r0
_08074BFA:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0xC]
adds r0, r7, r6
@ -4995,7 +4995,7 @@ _08074C8A:
b _08074D9E
.pool
_08074CA0:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0xC]
lsls r5, r6, 2
@ -5055,7 +5055,7 @@ _08074D02:
ldrb r1, [r1]
lsls r1, 5
adds r0, r1
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r1, [r1]
ldr r1, [r1, 0xC]
adds r1, r4, r1
@ -5086,7 +5086,7 @@ _08074D5C:
ldrb r1, [r1]
lsls r1, 5
adds r0, r1
ldr r1, =gUnknown_020244D0
ldr r1, =gBattleSpritesDataPtr
ldr r1, [r1]
ldr r1, [r1, 0xC]
adds r1, r4, r1

View File

@ -4322,7 +4322,7 @@ _0817EF36:
b _0817F1FA
_0817EF44:
ldr r3, =gBattleMoves
ldr r2, =gUnknown_020244B0
ldr r2, =gMoveSelectionCursor
adds r0, r4, r2
ldrb r0, [r0]
lsls r0, 1
@ -4514,7 +4514,7 @@ _0817F0B4:
ble _0817EFC2
movs r5, 0
ldr r3, =gBankAttacker
ldr r6, =gUnknown_020244B0
ldr r6, =gMoveSelectionCursor
ldr r4, =gBattlePartyID
mov r8, r4
movs r7, 0x64
@ -4624,7 +4624,7 @@ _0817F1D4:
b _0817F0CC
_0817F1DC:
ldr r2, =gBattleMoveDamage
ldr r1, =gUnknown_020244B0
ldr r1, =gMoveSelectionCursor
ldr r0, =gBankAttacker
ldrb r0, [r0]
adds r0, r1

View File

@ -738,7 +738,7 @@ _0814E730:
ldr r5, [sp]
ldr r4, [sp, 0x4]
movs r3, 0
ldr r2, =gUnknown_0831BCA8
ldr r2, =gStatusConditionStringsTable
_0814E738:
ldr r1, [r2]
ldr r0, [r1]
@ -2998,7 +2998,7 @@ sub_814FBAC: @ 814FBAC
ldr r0, =gBattleBufferA + 4
adds r1, r0
ldr r4, =gUnknown_08D85620
ldr r0, =gUnknown_020244B0
ldr r0, =gMoveSelectionCursor
adds r2, r0
ldrb r2, [r2]
adds r0, r1, 0

View File

@ -41,7 +41,7 @@ _080B062E:
cmp r0, 0x1
bne _080B0652
bl overworld_free_bg_tilemaps
ldr r0, =sub_8036760
ldr r0, =CB2_InitBattle
bl SetMainCallback2
bl prev_quest_postbuffer_cursor_backup_reset
bl overworld_poison_timer_set
@ -638,8 +638,8 @@ _080B0BC6:
.pool
thumb_func_end sub_80B0B6C
thumb_func_start sub_80B0BD0
sub_80B0BD0: @ 80B0BD0
thumb_func_start BattleSetup_GetTerrainId
BattleSetup_GetTerrainId: @ 80B0BD0
push {r4,r5,lr}
sub sp, 0x4
mov r4, sp
@ -798,7 +798,7 @@ _080B0D1A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80B0BD0
thumb_func_end BattleSetup_GetTerrainId
thumb_func_start sub_80B0D24
sub_80B0D24: @ 80B0D24
@ -1387,7 +1387,7 @@ sub_80B11A8: @ 80B11A8
ldr r0, =sub_80B1204
str r0, [r1, 0x8]
bl FreeAllWindowBuffers
ldr r0, =sub_8036760
ldr r0, =CB2_InitBattle
bl SetMainCallback2
bl prev_quest_postbuffer_cursor_backup_reset
bl overworld_poison_timer_set

View File

@ -3194,7 +3194,7 @@ sub_8163A8C: @ 8163A8C
ldr r0, =gMain
ldr r1, =sub_81639AC
str r1, [r0, 0x8]
ldr r0, =sub_8036760
ldr r0, =CB2_InitBattle
bl SetMainCallback2
adds r0, r4, 0
bl DestroyTask
@ -5125,21 +5125,21 @@ _08164C18:
lsrs r0, 24
mov r1, sp
movs r2, 0x4
bl link_0800A448
bl SendBlock
ldr r1, =gScriptResult
movs r0, 0x1
b _08164DB4
.pool
_08164C3C:
bl sub_800A550
bl GetBlockReceivedStatus
movs r1, 0x3
ands r1, r0
cmp r1, 0x3
beq _08164C4A
b _08164DB6
_08164C4A:
bl sub_800A5B4
ldr r1, =gUnknown_020223C4
bl ResetBlockReceivedFlags
ldr r1, =gBlockRecvBuffer
movs r0, 0x80
lsls r0, 1
adds r2, r1, r0
@ -5221,23 +5221,23 @@ _08164CE0:
ldr r3, =0x00000cb4
adds r1, r3
movs r2, 0x28
bl link_0800A448
bl SendBlock
ldr r1, =gScriptResult
movs r0, 0x3
b _08164DB4
.pool
_08164D14:
bl sub_800A550
bl GetBlockReceivedStatus
movs r1, 0x3
ands r1, r0
cmp r1, 0x3
bne _08164DB6
bl sub_800A5B4
bl ResetBlockReceivedFlags
ldr r4, =gSaveBlock2Ptr
ldr r0, [r4]
ldr r5, =0x00000cb4
adds r0, r5
ldr r1, =gUnknown_020223C4
ldr r1, =gBlockRecvBuffer
movs r2, 0x28
bl memcpy
ldr r2, =gTrainerBattleOpponent_A
@ -5260,7 +5260,7 @@ _08164D14:
ldrh r0, [r4]
movs r1, 0x1
bl sub_8162614
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _08164DB0
@ -5279,7 +5279,7 @@ _08164D98:
b _08164DB4
.pool
_08164DA8:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _08164DB6

View File

@ -9513,11 +9513,11 @@ sub_814ABE4: @ 814ABE4
strh r0, [r6, 0xC]
cmp r0, 0
bne _0814AC24
ldr r5, =gUnknown_02022E14
ldr r5, =gBattle_BG0_X
ldrh r1, [r5]
movs r0, 0x12
bl SetGpuReg
ldr r4, =gUnknown_02022E16
ldr r4, =gBattle_BG0_Y
ldrh r1, [r4]
movs r0, 0x10
bl SetGpuReg
@ -9562,9 +9562,9 @@ sub_814AC38: @ 814AC38
movs r1, 0xF0
movs r2, 0x20
bl LoadPalette
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r5, [r0]
ldr r4, =gUnknown_02022E16
ldr r4, =gBattle_BG0_Y
strh r5, [r4]
movs r0, 0x12
movs r1, 0
@ -9781,10 +9781,10 @@ sub_814AE40: @ 814AE40
push {r4,r5,lr}
sub sp, 0x8
adds r5, r0, 0
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r4, =gUnknown_02022E16
ldr r4, =gBattle_BG0_Y
strh r1, [r4]
movs r0, 0x12
movs r1, 0

View File

@ -512,7 +512,7 @@ _0807FBBE:
adds r4, 0x1
cmp r4, 0x3
ble _0807FBBE
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _0807FC14
@ -1116,7 +1116,7 @@ _08080126:
adds r5, 0x1
cmp r5, 0x3
ble _08080126
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _0808016A
@ -1213,7 +1213,7 @@ _08080248:
bne _08080254
b _08080546
_08080254:
bl sub_800A5B4
bl ResetBlockReceivedFlags
bl GetMultiplayerId
lsls r0, 24
cmp r0, 0
@ -1239,7 +1239,7 @@ _08080282:
movs r0, 0x4
movs r1, 0x1
bl sub_8197DF8
bl sub_800A550
bl GetBlockReceivedStatus
adds r4, r0, 0
bl sub_800A9D8
lsls r4, 24
@ -1260,7 +1260,7 @@ _080802AC:
adds r0, r4, r0
adds r0, r6
lsls r1, r5, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x10
bl memcpy
@ -1280,7 +1280,7 @@ _080802D4:
lsrs r0, 24
cmp r5, r0
blt _080802AC
bl sub_800A5B4
bl ResetBlockReceivedFlags
b _080804F8
.pool
_080802EC:
@ -1876,7 +1876,7 @@ sub_80807BC: @ 80807BC
sub sp, 0x1C
movs r0, 0
mov r10, r0
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080807DE
@ -3330,7 +3330,7 @@ sub_80814B0: @ 80814B0
lsrs r1, 16
lsls r2, 16
lsrs r2, 16
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080814E4
@ -3633,7 +3633,7 @@ sub_8081744: @ 8081744
push {r4-r6,lr}
movs r4, 0
movs r6, 0
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _0808175A
@ -4702,7 +4702,7 @@ _08081F7C:
sub_8081F94: @ 8081F94
push {lr}
adds r1, r0, 0
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _08081FB8
@ -4810,7 +4810,7 @@ _08082078:
adds r1, 0x4C
movs r0, 0
strh r0, [r1]
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080820B0
@ -4848,7 +4848,7 @@ _080820E0:
bne _080820EC
b _0808249E
_080820EC:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _0808218C
@ -4911,7 +4911,7 @@ _08082132:
adds r1, r4
movs r0, 0
movs r2, 0x20
bl link_0800A448
bl SendBlock
lsls r0, 24
cmp r0, 0
bne _08082172
@ -4941,7 +4941,7 @@ _0808218C:
strh r2, [r0]
movs r0, 0
movs r2, 0x28
bl link_0800A448
bl SendBlock
lsls r0, 24
cmp r0, 0
bne _080821BE
@ -4951,20 +4951,20 @@ _080821BE:
b _0808245C
.pool
_080821C8:
bl sub_800A550
bl GetBlockReceivedStatus
lsls r0, 24
cmp r0, 0
bne _080821D4
b _0808249E
_080821D4:
bl sub_800A5B4
bl ResetBlockReceivedFlags
ldr r5, =gUnknown_020322A4
ldr r1, [r5]
adds r1, 0x63
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _08082254
@ -4972,7 +4972,7 @@ _080821D4:
ldrb r0, [r0]
cmp r0, 0
beq _08082254
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
ldr r3, [r5]
ldrh r0, [r2, 0x4]
adds r1, r3, 0
@ -5016,7 +5016,7 @@ _08082220:
b _0808249E
.pool
_08082254:
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
ldr r0, =gUnknown_020322A4
ldr r3, [r0]
ldrh r0, [r2, 0x4]
@ -5748,7 +5748,7 @@ _080828BC:
strb r0, [r1]
b _080828DC
_080828C6:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r4, [r0]
cmp r4, 0
bne _080828DC
@ -5966,7 +5966,7 @@ _08082A92:
thumb_func_start sub_8082AD4
sub_8082AD4: @ 8082AD4
push {r4-r7,lr}
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _08082AE0
@ -6242,7 +6242,7 @@ sub_8082D18: @ 8082D18
sub_8082D28: @ 8082D28
push {r4,lr}
movs r1, 0
ldr r4, =gUnknown_03003124
ldr r4, =gReceivedRemoteLinkPlayers
ldrb r0, [r4]
cmp r0, 0
beq _08082D3C
@ -7909,7 +7909,7 @@ _08083A80:
cmp r5, r0
bcc _08083A80
_08083A9E:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _08083AB4
@ -8514,7 +8514,7 @@ sub_8083F94: @ 8083F94
strb r0, [r7, 0xC]
movs r0, 0xFF
strb r0, [r7]
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080840C4

View File

@ -1,627 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_81795E8
sub_81795E8: @ 81795E8
push {lr}
ldr r0, =0x000008af
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179634
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldrh r1, [r2, 0x4]
ldr r0, =0x00004718
cmp r1, r0
bne _08179634
ldr r1, [r2]
ldr r0, =0x0003000a
cmp r1, r0
beq _08179616
ldr r0, =0x00030009
cmp r1, r0
beq _08179616
ldr r0, =0x0003000b
cmp r1, r0
bne _08179634
_08179616:
movs r0, 0x1
b _08179636
.pool
_08179634:
movs r0, 0
_08179636:
pop {r1}
bx r1
thumb_func_end sub_81795E8
thumb_func_start sub_817963C
sub_817963C: @ 817963C
push {lr}
ldr r2, =0x0000022a
movs r0, 0x10
movs r1, 0x8
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0x11
movs r1, 0x8
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x12
movs r1, 0x8
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0x10
movs r1, 0x9
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0x11
movs r1, 0x9
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x12
movs r1, 0x9
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl PlaySE
ldr r0, =0x000008af
bl FlagSet
bl ScriptContext2_Disable
pop {r0}
bx r0
.pool
thumb_func_end sub_817963C
thumb_func_start sub_81796AC
sub_81796AC: @ 81796AC
push {r4,lr}
ldr r4, =gPlayerParty
adds r0, r4, 0
movs r1, 0x41
movs r2, 0
bl GetMonData
movs r1, 0x9D
lsls r1, 1
cmp r0, r1
bne _081796F4
bl CalculatePlayerPartyCount
ldr r0, =gPlayerPartyCount
ldrb r1, [r0]
movs r0, 0x64
muls r0, r1
adds r1, r4, 0
subs r1, 0x64
adds r0, r1
movs r1, 0x41
movs r2, 0
bl GetMonData
ldr r1, =0x0000017d
cmp r0, r1
bne _081796F4
movs r0, 0x1
b _081796F6
.pool
_081796F4:
movs r0, 0
_081796F6:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_81796AC
thumb_func_start nullsub_84
nullsub_84: @ 81796FC
bx lr
thumb_func_end nullsub_84
thumb_func_start sub_8179700
sub_8179700: @ 8179700
push {lr}
ldr r0, =sub_8179778
movs r1, 0x9
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
movs r0, 0
strh r0, [r1, 0xA]
strh r0, [r1, 0xC]
movs r0, 0x2
strh r0, [r1, 0x10]
movs r0, 0x5
strh r0, [r1, 0x12]
movs r0, 0x32
strh r0, [r1, 0x14]
movs r0, 0
bl SetCameraPanningCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_8179700
thumb_func_start sub_817973C
sub_817973C: @ 817973C
push {lr}
ldr r0, =sub_8179778
movs r1, 0x9
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
movs r0, 0
strh r0, [r1, 0xA]
strh r0, [r1, 0xC]
movs r0, 0x3
strh r0, [r1, 0x10]
movs r0, 0x5
strh r0, [r1, 0x12]
movs r0, 0x2
strh r0, [r1, 0x14]
movs r0, 0
bl SetCameraPanningCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_817973C
thumb_func_start sub_8179778
sub_8179778: @ 8179778
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
movs r1, 0xA
ldrsh r0, [r4, r1]
movs r2, 0x12
ldrsh r1, [r4, r2]
bl __modsi3
cmp r0, 0
bne _081797D0
strh r0, [r4, 0xA]
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
ldrh r0, [r4, 0x10]
negs r0, r0
strh r0, [r4, 0x10]
movs r0, 0x10
ldrsh r1, [r4, r0]
movs r0, 0
bl SetCameraPanning
movs r2, 0xC
ldrsh r1, [r4, r2]
movs r2, 0x14
ldrsh r0, [r4, r2]
cmp r1, r0
bne _081797D0
adds r0, r5, 0
bl DestroyTask
bl EnableBothScriptContexts
bl InstallCameraPanAheadCallback
_081797D0:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8179778
thumb_func_start sub_81797DC
sub_81797DC: @ 81797DC
push {lr}
movs r0, 0x8B
lsls r0, 4
bl FlagGet
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
bne _0817982C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
ldrh r1, [r3, 0x4]
movs r0, 0xC3
lsls r0, 3
cmp r1, r0
bne _0817982C
ldr r1, [r3]
ldr r0, =0x00170006
cmp r1, r0
beq _08179810
ldr r0, =0x00170005
cmp r1, r0
beq _08179810
ldr r0, =0x00170007
cmp r1, r0
bne _0817982C
_08179810:
ldr r0, =gUnknown_0203BD14
strb r2, [r0]
movs r0, 0x1
b _0817982E
.pool
_0817982C:
movs r0, 0
_0817982E:
pop {r1}
bx r1
thumb_func_end sub_81797DC
thumb_func_start sub_8179834
sub_8179834: @ 8179834
push {lr}
bl brm_get_pokemon_selection
ldr r1, =gFieldEffectSpawnParams
lsls r0, 24
lsrs r0, 24
str r0, [r1]
movs r0, 0x3C
bl FieldEffectStart
pop {r0}
bx r0
.pool
thumb_func_end sub_8179834
thumb_func_start sub_8179850
sub_8179850: @ 8179850
push {lr}
movs r0, 0x3C
bl FieldEffectActiveListRemove
bl sub_8179860
pop {r0}
bx r0
thumb_func_end sub_8179850
thumb_func_start sub_8179860
sub_8179860: @ 8179860
push {lr}
ldr r2, =0x0000022a
movs r0, 0xE
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0xF
movs r1, 0x1A
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x10
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0xE
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0xF
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x10
movs r1, 0x1B
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl PlaySE
movs r0, 0x8B
lsls r0, 4
bl FlagSet
bl ScriptContext2_Disable
pop {r0}
bx r0
.pool
thumb_func_end sub_8179860
thumb_func_start sub_81798D0
sub_81798D0: @ 81798D0
push {lr}
ldr r0, =0x000008b2
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179910
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldrh r1, [r2, 0x4]
ldr r0, =0x00004418
cmp r1, r0
bne _08179910
ldr r1, [r2]
ldr r0, =0x00190008
cmp r1, r0
bne _08179910
ldr r1, =gUnknown_0203BD14
movs r0, 0x1
strb r0, [r1]
movs r0, 0x1
b _08179912
.pool
_08179910:
movs r0, 0
_08179912:
pop {r1}
bx r1
thumb_func_end sub_81798D0
thumb_func_start sub_8179918
sub_8179918: @ 8179918
push {lr}
bl brm_get_pokemon_selection
ldr r1, =gFieldEffectSpawnParams
lsls r0, 24
lsrs r0, 24
str r0, [r1]
movs r0, 0x3C
bl FieldEffectStart
pop {r0}
bx r0
.pool
thumb_func_end sub_8179918
thumb_func_start sub_8179934
sub_8179934: @ 8179934
push {lr}
movs r0, 0x3C
bl FieldEffectActiveListRemove
bl sub_8179944
pop {r0}
bx r0
thumb_func_end sub_8179934
thumb_func_start sub_8179944
sub_8179944: @ 8179944
push {lr}
ldr r2, =0x0000022a
movs r0, 0xE
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0xF
movs r1, 0x1A
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x10
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0xE
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0xF
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x10
movs r1, 0x1B
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl PlaySE
ldr r0, =0x000008b2
bl FlagSet
bl ScriptContext2_Disable
pop {r0}
bx r0
.pool
thumb_func_end sub_8179944
thumb_func_start nullsub_64
nullsub_64: @ 81799B4
bx lr
thumb_func_end nullsub_64
thumb_func_start sub_81799B8
sub_81799B8: @ 81799B8
push {lr}
bl oei_task_add
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_0203BD14
ldrb r0, [r0]
cmp r0, 0x1
bne _081799E4
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
ldr r2, =sub_8179934
b _081799F0
.pool
_081799E4:
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
ldr r2, =sub_8179850
_081799F0:
lsrs r1, r2, 16
strh r1, [r0, 0x18]
strh r2, [r0, 0x1A]
movs r0, 0
pop {r1}
bx r1
.pool
thumb_func_end sub_81799B8
thumb_func_start sub_8179A04
sub_8179A04: @ 8179A04
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
ldrh r1, [r0, 0x4]
ldr r0, =0x00004318
cmp r1, r0
beq _08179A1A
b _08179B5A
_08179A1A:
ldr r0, =0x000008b1
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _08179A28
b _08179B5A
_08179A28:
movs r0, 0x2
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179A36
b _08179B5A
_08179A36:
movs r0, 0x3
bl FlagGet
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08179A58
b _08179B5A
.pool
_08179A54:
movs r0, 0x1
b _08179B5C
_08179A58:
movs r5, 0
mov r8, r4
ldr r4, =gUnknown_085EFE74
adds r0, r4, 0x1
mov r12, r0
ldr r6, =0x0000403b
ldr r1, =0x0000403c
mov r9, r1
_08179A68:
lsls r0, r5, 1
adds r1, r0, r4
add r0, r12
ldrb r3, [r0]
mov r7, r8
ldr r2, [r7]
movs r7, 0
ldrsh r0, [r2, r7]
ldrb r1, [r1]
cmp r0, r1
bne _08179B44
movs r1, 0x2
ldrsh r0, [r2, r1]
cmp r0, r3
bne _08179B44
cmp r5, 0xF
bhi _08179AB0
adds r0, r6, 0
bl VarGet
lsls r0, 16
movs r1, 0x80
lsls r1, 9
lsls r1, r5
orrs r1, r0
lsrs r1, 16
adds r0, r6, 0
bl VarSet
b _08179AF0
.pool
_08179AB0:
cmp r5, 0x1F
bhi _08179AD2
mov r0, r9
bl VarGet
lsls r0, 16
adds r2, r5, 0
subs r2, 0x10
movs r1, 0x80
lsls r1, 9
lsls r1, r2
orrs r1, r0
lsrs r1, 16
mov r0, r9
bl VarSet
b _08179AF0
_08179AD2:
ldr r4, =0x0000403d
adds r0, r4, 0
bl VarGet
lsls r0, 16
adds r2, r5, 0
subs r2, 0x20
movs r1, 0x80
lsls r1, 9
lsls r1, r2
orrs r1, r0
lsrs r1, 16
adds r0, r4, 0
bl VarSet
_08179AF0:
ldr r0, =0x0000403b
bl VarGet
lsls r0, 16
lsrs r4, r0, 16
ldr r0, =0x0000ffff
cmp r4, r0
bne _08179B5A
ldr r0, =0x0000403c
bl VarGet
lsls r0, 16
lsrs r0, 16
cmp r0, r4
bne _08179B5A
ldr r0, =0x0000403d
bl VarGet
lsls r0, 16
lsrs r0, 16
cmp r0, 0xF
bne _08179B5A
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, [r0]
ldr r0, =0x00150008
cmp r1, r0
beq _08179A54
b _08179B5A
.pool
_08179B44:
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0x23
bls _08179A68
movs r0, 0x3
bl FlagSet
movs r0, 0x2
bl FlagReset
_08179B5A:
movs r0, 0
_08179B5C:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8179A04
.align 2, 0 @ Don't pad with nop.

View File

@ -1030,7 +1030,7 @@ sub_80B2C30: @ 80B2C30
bl sub_80B24F8
cmp r0, 0x1
beq _080B2C9C
bl sub_800A550
bl GetBlockReceivedStatus
adds r4, r0, 0
bl sub_800A9A8
lsls r4, 24
@ -1047,7 +1047,7 @@ _080B2C5C:
ldr r1, =gUnknown_02039B58
adds r0, r1
lsls r1, r4, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
lsls r2, r4, 3
subs r2, r4
@ -1066,7 +1066,7 @@ _080B2C7E:
bcc _080B2C5C
movs r0, 0
bl sub_800B330
bl sub_800A5B4
bl ResetBlockReceivedFlags
ldr r0, =gScriptResult
adds r1, r5, 0
bl task_map_chg_seq_0807EC34
@ -1082,7 +1082,7 @@ sub_80B2CB0: @ 80B2CB0
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080B2CDE
@ -1434,7 +1434,7 @@ _080B2FA8:
bl DestroyTask
b _080B2FC6
_080B2FB4:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080B2FC6
@ -1706,7 +1706,7 @@ sub_80B3220: @ 80B3220
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0x1
bne _080B3248
@ -1836,7 +1836,7 @@ _080B3338:
bl sub_800AC34
b _080B3346
_080B333E:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
_080B3342:
cmp r0, 0
@ -1872,7 +1872,7 @@ _080B3378:
lsls r2, 4
adds r0, r2, 0
strh r0, [r1]
ldr r0, =sub_8036760
ldr r0, =CB2_InitBattle
bl SetMainCallback2
ldr r1, =gMain
ldr r0, =sub_80B360C
@ -1948,13 +1948,13 @@ _080B3444:
ldr r1, =gUnknown_020229CC
movs r0, 0
movs r2, 0x1C
bl link_0800A448
bl SendBlock
movs r0, 0x3
strh r0, [r6]
b _080B3532
.pool
_080B3458:
bl sub_800A550
bl GetBlockReceivedStatus
adds r4, r0, 0
bl sub_800A9D8
lsls r4, 24
@ -1967,7 +1967,7 @@ _080B3458:
.pool
_080B3474:
lsls r1, r4, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r0, r5, 0
adds r1, r2
ldm r1!, {r2,r3,r7}
@ -2045,7 +2045,7 @@ _080B3504:
lsls r3, 4
adds r0, r3, 0
strh r0, [r1]
ldr r0, =sub_8036760
ldr r0, =CB2_InitBattle
bl SetMainCallback2
ldr r1, =gMain
ldr r0, =sub_80B360C
@ -2128,7 +2128,7 @@ _080B35C8:
b _080B35FE
.pool
_080B35E0:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080B35FE
@ -2425,7 +2425,7 @@ _080B3864:
b _080B3884
.pool
_080B3870:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080B3884
@ -2657,7 +2657,7 @@ task00_08081A90: @ 80B3A30
adds r0, r4, 0
bl DestroyTask
_080B3A62:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080B3AA6
@ -2691,7 +2691,7 @@ sub_80B3AAC: @ 80B3AAC
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080B3AC4
@ -2804,7 +2804,7 @@ _080B3B96:
strh r0, [r5]
b _080B3BB8
_080B3B9E:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0x1
bne _080B3BB8

View File

@ -45,10 +45,10 @@ sub_80D7678: @ 80D7678
lsls r1, 7
movs r0, 0
bl SetGpuRegBits
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gBattle_BG1_X
strh r1, [r0]
@ -60,15 +60,15 @@ sub_80D7678: @ 80D7678
strh r1, [r0]
ldr r0, =gBattle_BG3_X
strh r1, [r0]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r1, [r0]
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r0, =gUnknown_02022E28
ldr r0, =gBattle_WIN1H
strh r1, [r0]
ldr r0, =gUnknown_02022E2A
ldr r0, =gBattle_WIN1V
strh r1, [r0]
pop {r4}
pop {r0}
@ -546,8 +546,8 @@ _080D7B4E:
ldr r0, =gUnknown_02039F38
strb r5, [r0]
bl sub_80D7988
bl init_uns_table_pokemon_copy
ldr r4, =gBattleSpritesGfx
bl AllocateMonSpritesGfx
ldr r4, =gMonSpritesGfxPtr
ldr r0, [r4]
ldr r0, [r0]
bl Free
@ -1316,11 +1316,11 @@ _080D8266:
thumb_func_start vblank_cb_battle
vblank_cb_battle: @ 80D827C
push {lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
ldrh r1, [r0]
movs r0, 0x10
bl SetGpuReg
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
ldrh r1, [r0]
movs r0, 0x12
bl SetGpuReg
@ -1344,23 +1344,23 @@ vblank_cb_battle: @ 80D827C
ldrh r1, [r0]
movs r0, 0x1C
bl SetGpuReg
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
ldrh r1, [r0]
movs r0, 0x1E
bl SetGpuReg
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
ldrh r1, [r0]
movs r0, 0x40
bl SetGpuReg
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
ldrh r1, [r0]
movs r0, 0x44
bl SetGpuReg
ldr r0, =gUnknown_02022E28
ldr r0, =gBattle_WIN1H
ldrh r1, [r0]
movs r0, 0x42
bl SetGpuReg
ldr r0, =gUnknown_02022E2A
ldr r0, =gBattle_WIN1V
ldrh r1, [r0]
movs r0, 0x46
bl SetGpuReg
@ -1387,7 +1387,7 @@ sub_80D833C: @ 80D833C
ldrsh r1, [r4, r0]
cmp r1, 0
bne _080D840C
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gBattle_BG2_Y
strh r1, [r0]
@ -1517,7 +1517,7 @@ sub_80D8490: @ 80D8490
lsls r0, 24
lsrs r0, 24
mov r9, r0
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
movs r1, 0xA0
strh r1, [r0]
ldr r0, =gBattle_BG2_Y
@ -1770,7 +1770,7 @@ _080D86E4:
adds r0, r4, 0
movs r1, 0
bl sub_80DEC30
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
movs r1, 0
strh r1, [r0]
ldr r0, =gBattle_BG2_Y
@ -2041,7 +2041,7 @@ sub_80D895C: @ 80D895C
lsls r0, 24
lsrs r7, r0, 24
bl sub_80DB89C
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
movs r1, 0
strh r1, [r0]
ldr r0, =gBattle_BG2_Y
@ -5322,7 +5322,7 @@ sub_80DA5E8: @ 80DA5E8
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
movs r1, 0
strh r1, [r0]
ldr r0, =gBattle_BG2_Y
@ -5587,7 +5587,7 @@ sub_80DA830: @ 80DA830
str r1, [r0]
bl FreeAllWindowBuffers
bl sub_80D7A5C
bl sub_805F094
bl FreeMonSpritesGfx
ldr r0, =c2_exit_to_overworld_2_switch
bl SetMainCallback2
_080DA860:
@ -6741,7 +6741,7 @@ sub_80DB174: @ 80DB174
lsls r0, r5, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x4]
adds r2, r5, 0
@ -6753,7 +6753,7 @@ _080DB1B8:
lsls r0, r5, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x4]
adds r2, r5, 0
@ -8516,7 +8516,7 @@ _080DBF62:
thumb_func_start sub_80DBF68
sub_80DBF68: @ 80DBF68
push {lr}
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
movs r1, 0
strh r1, [r0]
ldr r0, =gBattle_BG2_Y

View File

@ -92,10 +92,10 @@ _080F57E0:
lsls r1, 8
movs r0, 0
bl SetGpuRegBits
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gBattle_BG1_X
strh r1, [r0]
@ -107,15 +107,15 @@ _080F57E0:
strh r1, [r0]
ldr r0, =gBattle_BG3_X
strh r1, [r0]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r1, [r0]
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
strh r1, [r0]
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
strh r1, [r0]
ldr r0, =gUnknown_02022E28
ldr r0, =gBattle_WIN1H
strh r1, [r0]
ldr r0, =gUnknown_02022E2A
ldr r0, =gBattle_WIN1V
strh r1, [r0]
pop {r4}
pop {r0}
@ -387,10 +387,10 @@ sub_80F5B00: @ 80F5B00
strb r0, [r1, 0x2]
ldr r0, =sub_80F5C00
bl SetMainCallback2
ldr r1, =gUnknown_02022E28
ldr r1, =gBattle_WIN1H
movs r0, 0xF0
strh r0, [r1]
ldr r1, =gUnknown_02022E2A
ldr r1, =gBattle_WIN1V
ldr r2, =0x000080a0
adds r0, r2, 0
strh r0, [r1]
@ -441,11 +441,11 @@ sub_80F5C00: @ 80F5C00
thumb_func_start sub_80F5C24
sub_80F5C24: @ 80F5C24
push {lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
ldrh r1, [r0]
movs r0, 0x10
bl SetGpuReg
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
ldrh r1, [r0]
movs r0, 0x12
bl SetGpuReg
@ -469,23 +469,23 @@ sub_80F5C24: @ 80F5C24
ldrh r1, [r0]
movs r0, 0x1C
bl SetGpuReg
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
ldrh r1, [r0]
movs r0, 0x1E
bl SetGpuReg
ldr r0, =gUnknown_02022E24
ldr r0, =gBattle_WIN0H
ldrh r1, [r0]
movs r0, 0x40
bl SetGpuReg
ldr r0, =gUnknown_02022E26
ldr r0, =gBattle_WIN0V
ldrh r1, [r0]
movs r0, 0x44
bl SetGpuReg
ldr r0, =gUnknown_02022E28
ldr r0, =gBattle_WIN1H
ldrh r1, [r0]
movs r0, 0x42
bl SetGpuReg
ldr r0, =gUnknown_02022E2A
ldr r0, =gBattle_WIN1V
ldrh r1, [r0]
movs r0, 0x46
bl SetGpuReg
@ -702,7 +702,7 @@ sub_80F5ED8: @ 80F5ED8
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080F5EFC
@ -1347,10 +1347,10 @@ _080F643C:
.4byte _080F6638
.4byte _080F667C
_080F6454:
ldr r1, =gUnknown_02022E24
ldr r1, =gBattle_WIN0H
movs r0, 0xF0
strh r0, [r1]
ldr r1, =gUnknown_02022E26
ldr r1, =gBattle_WIN0V
ldr r3, =0x00005050
adds r0, r3, 0
strh r0, [r1]
@ -1364,7 +1364,7 @@ _080F6454:
mov r9, r4
ldr r4, =gMonFrontPicTable
mov r12, r4
ldr r4, =gBattleSpritesGfx
ldr r4, =gMonSpritesGfxPtr
mov r8, r4
cmp r0, 0
beq _080F648C
@ -1494,7 +1494,7 @@ _080F65A4:
strh r0, [r4, 0xC]
_080F65BA:
ldrb r2, [r4, 0xC]
ldr r3, =gUnknown_02022E26
ldr r3, =gBattle_WIN0V
movs r0, 0x50
subs r0, r2
lsls r0, 8
@ -1556,7 +1556,7 @@ _080F6638:
ldrb r0, [r0, 0x6]
cmp r0, 0x2
bne _080F669C
ldr r3, =gUnknown_02022E26
ldr r3, =gBattle_WIN0V
ldrh r0, [r3]
lsrs r2, r0, 8
adds r0, r2, 0x2
@ -1706,7 +1706,7 @@ sub_80F677C: @ 80F677C
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080F67AC
@ -1842,7 +1842,7 @@ sub_80F68B4: @ 80F68B4
ldrh r3, [r2]
adds r0, r3, 0x2
strh r0, [r2]
ldr r4, =gUnknown_02022E22
ldr r4, =gBattle_BG3_Y
ldrh r5, [r4]
adds r1, r5, 0x1
strh r1, [r4]
@ -2870,10 +2870,10 @@ _080F70BE:
adds r5, 0x1
cmp r5, 0x2
ble _080F70BE
ldr r1, =gUnknown_02022E24
ldr r1, =gBattle_WIN0H
movs r0, 0xF0
strh r0, [r1]
ldr r2, =gUnknown_02022E26
ldr r2, =gBattle_WIN0V
ldrh r1, [r4, 0x22]
adds r0, r1, 0
subs r0, 0x10
@ -2910,8 +2910,8 @@ sub_80F7144: @ 80F7144
orrs r0, r1
mov r1, r12
strb r0, [r1]
ldr r7, =gUnknown_02022E24
ldr r6, =gUnknown_02022E26
ldr r7, =gBattle_WIN0H
ldr r6, =gBattle_WIN0V
adds r5, r3, 0
movs r4, 0x4
adds r2, 0x2E
@ -4522,7 +4522,7 @@ sub_80F7DF4: @ 80F7DF4
bl AllocZeroed
ldr r1, [r4]
str r0, [r1, 0x1C]
bl init_uns_table_pokemon_copy
bl AllocateMonSpritesGfx
pop {r4,r5}
pop {r0}
bx r0
@ -4569,7 +4569,7 @@ sub_80F7E64: @ 80F7E64
str r4, [r0, 0x1C]
bl Free
str r4, [r5]
bl sub_805F094
bl FreeMonSpritesGfx
pop {r4,r5}
pop {r0}
bx r0
@ -5633,7 +5633,7 @@ sub_80F87B4: @ 80F87B4
push {lr}
lsls r0, 24
lsrs r1, r0, 24
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080F87D0

View File

@ -21,7 +21,7 @@ sub_80FC4F4: @ 80FC4F4
lsrs r0, 24
adds r1, r5, 0
adds r2, r4, 0
bl link_0800A448
bl SendBlock
lsls r0, 24
cmp r0, 0
bne _080FC528
@ -45,7 +45,7 @@ sub_80FC530: @ 80FC530
lsls r4, 17
lsls r4, r5
lsrs r4, 24
bl sub_800A550
bl GetBlockReceivedStatus
ands r4, r0
cmp r4, 0
beq _080FC552
@ -64,7 +64,7 @@ _080FC554:
thumb_func_start sub_80FC55C
sub_80FC55C: @ 80FC55C
push {r4,lr}
bl sub_800A550
bl GetBlockReceivedStatus
adds r4, r0, 0
bl sub_800A9D8
lsls r4, 24
@ -74,7 +74,7 @@ sub_80FC55C: @ 80FC55C
movs r0, 0
b _080FC57A
_080FC574:
bl sub_800A5B4
bl ResetBlockReceivedFlags
movs r0, 0x1
_080FC57A:
pop {r4}
@ -90,7 +90,7 @@ sub_80FC580: @ 80FC580
movs r1, 0
ldr r5, =gTasks
ldr r6, =sub_80FC5C0
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
movs r3, 0xFF
_080FC590:
lsls r0, r1, 8
@ -134,7 +134,7 @@ sub_80FC5DC: @ 80FC5DC
push {r4-r7,lr}
lsls r0, 24
lsrs r7, r0, 24
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080FC650
@ -324,7 +324,7 @@ _080FC770:
ldr r0, =gUnknown_02039E00
adds r4, r0
lsls r1, r5, 8
ldr r0, =gUnknown_020223C4
ldr r0, =gBlockRecvBuffer
adds r1, r0
adds r0, r4, 0
movs r2, 0x40
@ -430,7 +430,7 @@ _080FC858:
cmp r0, 0
beq _080FC880
ldr r0, =gRngValue
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
adds r1, r4, 0
movs r2, 0x4
bl memcpy
@ -517,7 +517,7 @@ _080FC90C:
ldrb r0, [r1]
cmp r3, r0
bge _080FC93A
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
adds r0, r7, 0x2
adds r2, r5, r0
movs r5, 0x80
@ -690,7 +690,7 @@ _080FCA68:
bge _080FCAA4
ldr r1, =gUnknown_02039F34
mov r8, r1
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
movs r3, 0
movs r7, 0x80
lsls r7, 1
@ -784,7 +784,7 @@ _080FCB50:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x8
b _080FCC50
@ -827,7 +827,7 @@ _080FCBA4:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x8
b _080FCC50
@ -850,7 +850,7 @@ _080FCBE0:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x8
b _080FCC50
@ -885,7 +885,7 @@ _080FCC38:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x4
_080FCC50:
@ -974,7 +974,7 @@ _080FCD10:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x70
b _080FCE10
@ -1021,7 +1021,7 @@ _080FCD6C:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x14
b _080FCE10
@ -1078,7 +1078,7 @@ _080FCE04:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x4
_080FCE10:
@ -1169,7 +1169,7 @@ _080FCEC0:
beq _080FCF2E
mov r1, r8
mov r8, r9
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
adds r0, r7, 0
adds r0, 0xA
adds r2, r5, r0
@ -1278,7 +1278,7 @@ _080FCF9C:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x8
bl memcpy
@ -1344,7 +1344,7 @@ _080FD02C:
ldr r1, =gUnknown_02039F2B
ldrb r1, [r1]
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0x4
bl memcpy

View File

@ -469,7 +469,7 @@ _081DA1EC:
ldr r0, =gUnknown_02039E00
adds r4, r0
lsls r1, r5, 8
ldr r0, =gUnknown_020223C4
ldr r0, =gBlockRecvBuffer
adds r1, r0
adds r0, r4, 0
movs r2, 0x40
@ -554,7 +554,7 @@ _081DA2AC:
cmp r0, 0
beq _081DA2D4
ldr r0, =gRngValue
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
adds r1, r4, 0
movs r2, 0x4
bl memcpy
@ -641,7 +641,7 @@ _081DA35A:
mov r0, r8
adds r0, 0xA
adds r3, r5, r0
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
mov r2, sp
movs r5, 0x80
lsls r5, 1
@ -744,7 +744,7 @@ _081DA42A:
mov r0, r8
adds r0, 0x2
adds r3, r5, r0
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
mov r2, sp
movs r5, 0x80
lsls r5, 1
@ -849,7 +849,7 @@ _081DA50C:
lsls r0, r3, 6
ldr r5, =gUnknown_02039E00
adds r0, r5
ldr r1, =gUnknown_020223C4
ldr r1, =gBlockRecvBuffer
movs r2, 0x4
subs r2, r3
lsls r2, 6

View File

@ -72,7 +72,7 @@ sub_812FE0C: @ 812FE0C
movs r0, 0x1
bl GetBgTilemapBuffer
bl Free
bl sub_805F094
bl FreeMonSpritesGfx
pop {r4,r5}
pop {r0}
bx r0
@ -110,7 +110,7 @@ _0812FE94:
bl remove_some_task
movs r0, 0
bl SetVBlankCallback
bl init_uns_table_pokemon_copy
bl AllocateMonSpritesGfx
ldr r1, =gUnknown_030061C0
ldr r0, =gUnknown_02039F3C
str r0, [r1]
@ -581,7 +581,7 @@ sub_81302E8: @ 81302E8
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r4, =gBattleSpritesGfx
ldr r4, =gMonSpritesGfxPtr
ldr r1, [r4]
ldr r1, [r1, 0x8]
ldr r2, [r6]
@ -600,7 +600,7 @@ _08130348:
lsls r0, r5, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r4, =gBattleSpritesGfx
ldr r4, =gMonSpritesGfxPtr
ldr r1, [r4]
ldr r1, [r1, 0x4]
ldr r2, [r6]

View File

@ -68,7 +68,7 @@ _0813DA00:
adds r1, r4, 0
adds r2, r5, 0
adds r3, r6, 0
bl evolution_cutscene
bl EvolutionScene
_0813DA30:
add sp, 0x4
pop {r4-r7}
@ -77,8 +77,8 @@ _0813DA30:
.pool
thumb_func_end sub_813D9C0
thumb_func_start sub_813DA40
sub_813DA40: @ 813DA40
thumb_func_start BeginEvolutionScene
BeginEvolutionScene: @ 813DA40
push {r4-r6,lr}
adds r4, r1, 0
adds r5, r2, 0
@ -110,10 +110,10 @@ sub_813DA40: @ 813DA40
pop {r0}
bx r0
.pool
thumb_func_end sub_813DA40
thumb_func_end BeginEvolutionScene
thumb_func_start evolution_cutscene
evolution_cutscene: @ 813DA8C
thumb_func_start EvolutionScene
EvolutionScene: @ 813DA8C
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@ -165,10 +165,10 @@ evolution_cutscene: @ 813DA8C
movs r1, 0
bl SetGpuReg
bl ResetPaletteFade
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r2, 0
strh r2, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r2, [r0]
ldr r0, =gBattle_BG1_X
strh r2, [r0]
@ -183,14 +183,14 @@ evolution_cutscene: @ 813DA8C
lsls r2, 1
adds r0, r2, 0
strh r0, [r1]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
movs r1, 0
strh r1, [r0]
ldr r1, =gBattleTerrain
movs r0, 0x9
strb r0, [r1]
bl c2_berry_program_update_menu
bl sub_8035AA4
bl sub_80356D0
bl LoadBattleTextboxAndBackground
bl ResetSpriteData
bl remove_some_task
bl ResetTasks
@ -202,7 +202,7 @@ evolution_cutscene: @ 813DA8C
bl AllocZeroed
ldr r1, =gUnknown_0203AB80
str r0, [r1]
bl init_uns_table_pokemon_copy
bl AllocateMonSpritesGfx
adds r0, r4, 0
movs r1, 0x2
mov r2, sp
@ -235,7 +235,7 @@ evolution_cutscene: @ 813DA8C
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r2, =gBattleSpritesGfx
ldr r2, =gMonSpritesGfxPtr
ldr r1, [r2]
ldr r1, [r1, 0x8]
adds r2, r5, 0
@ -291,7 +291,7 @@ evolution_cutscene: @ 813DA8C
lsls r0, r1, 3
ldr r2, =gMonFrontPicTable
adds r0, r2
ldr r2, =gBattleSpritesGfx
ldr r2, =gMonSpritesGfxPtr
ldr r1, [r2]
ldr r1, [r1, 0x10]
mov r2, r10
@ -393,7 +393,7 @@ evolution_cutscene: @ 813DA8C
pop {r0}
bx r0
.pool
thumb_func_end evolution_cutscene
thumb_func_end EvolutionScene
thumb_func_start sub_813DD7C
sub_813DD7C: @ 813DD7C
@ -460,9 +460,9 @@ sub_813DD7C: @ 813DD7C
movs r1, 0
bl SetGpuReg
bl ResetPaletteFade
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r4, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r4, [r0]
ldr r0, =gBattle_BG1_X
strh r4, [r0]
@ -477,13 +477,13 @@ sub_813DD7C: @ 813DD7C
lsls r2, 1
adds r0, r2, 0
strh r0, [r1]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r4, [r0]
ldr r1, =gBattleTerrain
movs r0, 0x9
strb r0, [r1]
bl c2_berry_program_update_menu
bl sub_8035AA4
bl sub_80356D0
bl LoadBattleTextboxAndBackground
bl ResetSpriteData
bl FreeAllSpritePalettes
ldr r1, =gReservedSpritePaletteCount
@ -492,7 +492,7 @@ sub_813DD7C: @ 813DD7C
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x10]
adds r2, r5, 0
@ -629,10 +629,10 @@ _0813DFE0:
ldr r1, =gReservedSpritePaletteCount
movs r0, 0x4
strb r0, [r1]
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gBattle_BG1_X
strh r1, [r0]
@ -647,7 +647,7 @@ _0813DFE0:
lsls r3, 1
adds r0, r3, 0
strh r0, [r2]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r1, [r0]
b _0813E180
.pool
@ -697,7 +697,7 @@ _0813E0A8:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x10]
adds r2, r6, 0
@ -867,7 +867,7 @@ sub_813E1D4: @ 813E1D4
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r5, 0
@ -941,9 +941,9 @@ sub_813E1D4: @ 813E1D4
mov r1, sp
ldrh r1, [r1, 0x14]
strh r1, [r0, 0x1C]
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
strh r4, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r4, [r0]
ldr r0, =gBattle_BG1_X
strh r4, [r0]
@ -958,7 +958,7 @@ sub_813E1D4: @ 813E1D4
lsls r2, 1
adds r0, r2, 0
strh r0, [r1]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r4, [r0]
ldr r2, =gTextFlags
ldrb r0, [r2]
@ -1775,7 +1775,7 @@ _0813EAF6:
_0813EB06:
adds r0, r7, 0
bl DestroyTask
bl sub_805F094
bl FreeMonSpritesGfx
ldr r4, =gUnknown_0203AB80
ldr r0, [r4]
bl Free
@ -3630,11 +3630,11 @@ nullsub_83: @ 813FCD8
thumb_func_start sub_813FCDC
sub_813FCDC: @ 813FCDC
push {lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
ldrh r1, [r0]
movs r0, 0x10
bl SetGpuReg
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
ldrh r1, [r0]
movs r0, 0x12
bl SetGpuReg
@ -3658,7 +3658,7 @@ sub_813FCDC: @ 813FCDC
ldrh r1, [r0]
movs r0, 0x1C
bl SetGpuReg
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
ldrh r1, [r0]
movs r0, 0x1E
bl SetGpuReg
@ -3674,11 +3674,11 @@ sub_813FCDC: @ 813FCDC
thumb_func_start sub_813FD64
sub_813FD64: @ 813FD64
push {lr}
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
ldrh r1, [r0]
movs r0, 0x10
bl SetGpuReg
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
ldrh r1, [r0]
movs r0, 0x12
bl SetGpuReg
@ -3702,7 +3702,7 @@ sub_813FD64: @ 813FD64
ldrh r1, [r0]
movs r0, 0x1C
bl SetGpuReg
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
ldrh r1, [r0]
movs r0, 0x1E
bl SetGpuReg
@ -3871,7 +3871,7 @@ sub_813FEE8: @ 813FEE8
.pool
_0813FF28:
ldr r7, =gBattle_BG3_X
ldr r6, =gUnknown_02022E22
ldr r6, =gBattle_BG3_Y
_0813FF2C:
lsls r4, r5, 2
adds r4, r5

View File

@ -1411,7 +1411,7 @@ _0809CA64:
b _0809CB28
.pool
_0809CA7C:
bl sub_8179A04
bl ShouldDoBrailleRegicePuzzle
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1

View File

@ -9010,7 +9010,7 @@ _080AF9C8:
strh r0, [r4]
b _080AF9E8
_080AF9D0:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080AF9E8

File diff suppressed because it is too large Load Diff

View File

@ -533,7 +533,7 @@ sub_81221AC: @ 81221AC
bl is_c1_link_related_active
cmp r0, 0x1
beq _081221BE
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0x1
bne _081221C8

View File

@ -337,7 +337,7 @@ _08178C54:
lsls r0, 24
cmp r0, 0
beq _08178D00
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _08178C68
@ -435,13 +435,13 @@ _08178D28:
_08178D36:
b _08178E34
_08178D38:
bl sub_800A550
bl GetBlockReceivedStatus
lsls r0, 24
cmp r0, 0
bne _08178D44
b _08178E58
_08178D44:
bl sub_800A5B4
bl ResetBlockReceivedFlags
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
@ -462,7 +462,7 @@ _08178D60:
b _08178E3C
.pool
_08178D74:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r6, [r0]
cmp r6, 0
bne _08178E58

View File

@ -13868,7 +13868,7 @@ sub_81B7810: @ 81B7810
adds r0, r7, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_813DA40
bl BeginEvolutionScene
adds r0, r5, 0
bl DestroyTask
b _081B786E

View File

@ -17,7 +17,7 @@ sub_80753E8: @ 80753E8
ldr r1, =gDoingBattleAnim
movs r0, 0x1
strb r0, [r1]
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r1, [r6]
@ -992,7 +992,7 @@ _08075C22:
movs r2, 0xC
bl PlayCry4
_08075C2E:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
mov r2, r8
@ -1082,7 +1082,7 @@ _08075CD8:
movs r2, 0xB
bl PlayCry4
_08075CE4:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
mov r2, r8
@ -1215,7 +1215,7 @@ _08075E00:
lsls r0, 24
cmp r0, 0
beq _08075E56
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r1, [r0, 0x9]
@ -1247,7 +1247,7 @@ _08075E56:
lsls r0, 24
cmp r0, 0
beq _08075E70
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r1, [r0, 0x9]
@ -1278,7 +1278,7 @@ _08075E9C:
_08075EA0:
movs r4, 0x2
_08075EA2:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
mov r2, r8
@ -1508,7 +1508,7 @@ _0807605C:
strh r1, [r0, 0x26]
ldr r0, =gDoingBattleAnim
strb r2, [r0]
ldr r4, =gUnknown_020244D0
ldr r4, =gBattleSpritesDataPtr
ldr r0, [r4]
ldr r0, [r0, 0x4]
lsls r1, r6, 1
@ -1619,7 +1619,7 @@ _08076130:
ands r0, r1
cmp r0, 0
beq _08076196
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r7, 1
@ -1819,7 +1819,7 @@ _080762F8:
lsls r0, 24
cmp r0, 0
beq _08076358
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r1, [r0, 0x9]
@ -1892,7 +1892,7 @@ sub_8076398: @ 8076398
lsls r0, 24
cmp r0, 0
beq _080763E8
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r1, [r0, 0x9]

View File

@ -95,7 +95,7 @@ _08179C48:
bl FreeAllSpritePalettes
b _08179D32
_08179C4E:
bl init_uns_table_pokemon_copy
bl AllocateMonSpritesGfx
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
@ -322,7 +322,7 @@ _08179E48:
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r5, 0
@ -797,7 +797,7 @@ sub_817A2C0: @ 817A2C0
ldr r0, =gUnknown_0203BD18
ldr r0, [r0]
bl Free
bl sub_805F094
bl FreeMonSpritesGfx
_0817A304:
pop {r4}
pop {r0}

View File

@ -221,7 +221,7 @@ _0806BEE0:
mov r0, r8
movs r2, 0
ldr r3, [sp, 0x10]
bl sub_813DA40
bl BeginEvolutionScene
movs r0, 0
bl _0806CD5C
_0806BEF0:

View File

@ -127,7 +127,7 @@ _081BF9EE:
strb r1, [r0]
movs r0, 0xFF
bl sub_81C488C
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
cmp r0, 0
bne _081BFA12
@ -1284,7 +1284,7 @@ sub_81C0484: @ 81C0484
movs r2, 0x80
lsls r2, 1
bl m4aMPlayVolumeControl
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
cmp r0, 0
bne _081C04E2
@ -8807,7 +8807,7 @@ _081C4620:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x8]
b _081C46D6
@ -8817,12 +8817,12 @@ _081C4668:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
b _081C46B0
.pool
_081C4680:
ldr r0, =gBattleSpritesGfx
ldr r0, =gMonSpritesGfxPtr
ldr r3, [r0]
adds r4, r0, 0
cmp r3, 0

View File

@ -28252,7 +28252,7 @@ _081D4FB6:
lsls r0, 24
cmp r0, 0
beq _081D500C
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _081D4FE6
@ -28280,7 +28280,7 @@ _081D4FEC:
strb r0, [r4]
b _081D500C
_081D4FF8:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _081D500C
@ -28673,13 +28673,13 @@ _081D5374:
bl sub_80097E8
b _081D53C0
_081D537A:
bl sub_800A550
bl GetBlockReceivedStatus
lsls r0, 24
cmp r0, 0
bne _081D5386
b _081D548A
_081D5386:
bl sub_800A5B4
bl ResetBlockReceivedFlags
movs r0, 0xF
strb r0, [r4, 0x8]
b _081D548A
@ -28694,7 +28694,7 @@ _081D5390:
b _081D548A
.pool
_081D53A8:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _081D548A

View File

@ -849,7 +849,7 @@ _080E745A:
strh r0, [r5, 0x20]
b _080E7566
_080E7464:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080E746E
@ -1066,7 +1066,7 @@ sub_80E7630: @ 80E7630
ldr r1, =gTasks
adds r0, r1
mov r10, r0
bl sub_800A550
bl GetBlockReceivedStatus
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x4]
@ -1302,7 +1302,7 @@ sub_80E7810: @ 80E7810
sub_80E7820: @ 80E7820
lsls r0, 24
lsrs r0, 16
ldr r1, =gUnknown_020223C4
ldr r1, =gBlockRecvBuffer
adds r0, r1
bx lr
.pool
@ -2368,7 +2368,7 @@ _080E807C:
bl sub_800AC34
b _080E80F2
_080E8090:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080E810A

View File

@ -95,7 +95,7 @@ sub_8184E58: @ 8184E58
ldrb r0, [r0]
cmp r0, 0x1
bne _08184EA0
ldr r1, =gUnknown_0203BD2C
ldr r1, =gRecordedBattleRngSeed
ldr r0, =gRngValue
ldr r0, [r0]
str r0, [r1]
@ -112,7 +112,7 @@ _08184EA0:
cmp r0, 0x2
bne _08184EAC
ldr r0, =gRngValue
ldr r1, =gUnknown_0203BD2C
ldr r1, =gRecordedBattleRngSeed
ldr r1, [r1]
str r1, [r0]
_08184EAC:
@ -271,8 +271,8 @@ _08184FF0:
.pool
thumb_func_end RecordedBattle_SetBankAction
thumb_func_start sub_8185008
sub_8185008: @ 8185008
thumb_func_start RecordedBattle_ClearBankAction
RecordedBattle_ClearBankAction: @ 8185008
push {r4-r7,lr}
lsls r0, 24
lsrs r5, r0, 24
@ -310,7 +310,7 @@ _08185046:
pop {r0}
bx r0
.pool
thumb_func_end sub_8185008
thumb_func_end RecordedBattle_ClearBankAction
thumb_func_start sub_8185054
sub_8185054: @ 8185054
@ -348,7 +348,7 @@ _0818507A:
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
ldr r0, =sub_80384E4
ldr r0, =CB2_QuitRecordedBattle
bl SetMainCallback2
movs r0, 0xFF
b _081850C6
@ -681,8 +681,8 @@ _08185332:
bx r1
thumb_func_end sub_81852F0
thumb_func_start sub_8185338
sub_8185338: @ 8185338
thumb_func_start MoveRecordedBattleToSaveData
MoveRecordedBattleToSaveData: @ 8185338
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@ -779,7 +779,7 @@ _081853BA:
movs r4, 0x9D
lsls r4, 3
adds r1, r7, r4
ldr r5, =gUnknown_0203BD2C
ldr r5, =gRecordedBattleRngSeed
ldr r0, [r5]
str r0, [r1]
ldr r0, =gUnknown_0203C7B8
@ -1469,7 +1469,7 @@ _08185A14:
pop {r1}
bx r1
.pool
thumb_func_end sub_8185338
thumb_func_end MoveRecordedBattleToSaveData
thumb_func_start sub_8185A54
sub_8185A54: @ 8185A54
@ -1576,7 +1576,7 @@ sub_8185B1C: @ 8185B1C
ldr r0, =gMain
ldr r1, =sub_8185AB0
str r1, [r0, 0x8]
ldr r0, =sub_8036760
ldr r0, =CB2_InitBattle
bl SetMainCallback2
adds r0, r4, 0
bl DestroyTask
@ -1701,7 +1701,7 @@ _08185C2A:
adds r6, 0x1
cmp r6, 0x3
ble _08185BBE
ldr r1, =gUnknown_0203BD2C
ldr r1, =gRecordedBattleRngSeed
movs r3, 0x9D
lsls r3, 3
adds r0, r7, r3
@ -2655,8 +2655,8 @@ sub_8186444: @ 8186444
.pool
thumb_func_end sub_8186444
thumb_func_start rfu_lacks_rfufunc
rfu_lacks_rfufunc: @ 8186450
thumb_func_start sub_8186450
sub_8186450: @ 8186450
push {lr}
movs r1, 0
ldr r0, =gUnknown_0203CCD0
@ -2669,7 +2669,7 @@ _0818645E:
pop {r1}
bx r1
.pool
thumb_func_end rfu_lacks_rfufunc
thumb_func_end sub_8186450
thumb_func_start sub_8186468
sub_8186468: @ 8186468

View File

@ -98,10 +98,10 @@ _080A93B0:
movs r0, 0x3
bl ShowBg
bl ResetPaletteFade
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
movs r1, 0
strh r1, [r0]
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
strh r1, [r0]
ldr r0, =gBattle_BG1_X
strh r1, [r0]
@ -113,7 +113,7 @@ _080A93B0:
strh r1, [r0]
ldr r0, =gBattle_BG3_X
strh r1, [r0]
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
strh r1, [r0]
b _080A95D2
.pool
@ -128,7 +128,7 @@ _080A942C:
b _080A95D2
.pool
_080A9444:
bl sub_8035AA4
bl LoadBattleTextboxAndBackground
b _080A95D2
_080A944A:
bl ResetSpriteData
@ -264,7 +264,7 @@ _080A94F8:
adds r0, r4, 0
bl sub_805EE54
_080A955C:
ldr r1, =gUnknown_020244AC
ldr r1, =gActionSelectionCursor
ldr r0, =gBankInMenu
ldrb r0, [r0]
adds r0, r1
@ -275,7 +275,7 @@ _080A955C:
ldrb r0, [r0]
cmp r0, 0
beq _080A95D2
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080A95D2
@ -348,7 +348,7 @@ sub_80A9614: @ 80A9614
lsls r0, 24
cmp r0, 0
beq _080A9676
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r4, 2
@ -404,7 +404,7 @@ _080A96AA:
bl sub_805DF84
b _080A96F4
_080A96B2:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r4, 2
@ -459,7 +459,7 @@ sub_80A9708: @ 80A9708
bcc _080A9722
b _080A9AA0
_080A9722:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
lsls r2, r7, 2
@ -591,7 +591,7 @@ _080A9786:
adds r1, r7, r1
ldrb r1, [r1]
bl StartSpriteAnim
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
ldr r2, [sp]
@ -808,7 +808,7 @@ _080A998C:
adds r1, r7, r1
ldrb r1, [r1]
bl StartSpriteAnim
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
ldr r1, [sp]
@ -839,7 +839,7 @@ _080A9A70:
adds r2, r0
lsls r2, 2
adds r2, r1
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
ldr r1, [sp]

View File

@ -5,8 +5,8 @@
.text
thumb_func_start battle_wireless_setup_if_required_maybe
battle_wireless_setup_if_required_maybe: @ 8032654
thumb_func_start HandleLinkBattleSetup
HandleLinkBattleSetup: @ 8032654
push {lr}
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
@ -20,7 +20,7 @@ battle_wireless_setup_if_required_maybe: @ 8032654
beq _0803266E
bl sub_800B488
_0803266E:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _0803267A
@ -34,10 +34,10 @@ _08032686:
pop {r0}
bx r0
.pool
thumb_func_end battle_wireless_setup_if_required_maybe
thumb_func_end HandleLinkBattleSetup
thumb_func_start sub_803269C
sub_803269C: @ 803269C
thumb_func_start SetUpBattleVarsAndBirchZigzagoon
SetUpBattleVarsAndBirchZigzagoon: @ 803269C
push {r4-r7,lr}
sub sp, 0x14
ldr r0, =gBattleMainFunc
@ -47,9 +47,9 @@ sub_803269C: @ 803269C
str r0, [sp, 0x10]
movs r1, 0
ldr r7, =gBattleBankFunc
ldr r6, =gUnknown_020244AC
ldr r6, =gActionSelectionCursor
movs r2, 0
ldr r5, =gUnknown_020244B0
ldr r5, =gMoveSelectionCursor
ldr r4, =nullsub_21
ldr r3, =gBanksBySide
_080326B8:
@ -71,7 +71,7 @@ _080326B8:
adds r1, r0, 0
cmp r1, 0x3
ble _080326B8
bl battle_wireless_setup_if_required_maybe
bl HandleLinkBattleSetup
ldr r0, =gBattleExecBuffer
movs r5, 0
str r5, [r0]
@ -112,7 +112,7 @@ _08032728:
pop {r0}
bx r0
.pool
thumb_func_end sub_803269C
thumb_func_end SetUpBattleVarsAndBirchZigzagoon
thumb_func_start sub_8032768
sub_8032768: @ 8032768
@ -222,7 +222,7 @@ b_setup_bx: @ 8032824
cmp r5, 0
beq _080328E4
ldr r1, =gBattleMainFunc
ldr r0, =sub_8039ECC
ldr r0, =BeginBattleIntro
str r0, [r1]
movs r4, 0x80
lsls r4, 17
@ -286,7 +286,7 @@ _080328E4:
b _080329E0
_080328F0:
ldr r0, =gBattleMainFunc
ldr r2, =sub_8039ECC
ldr r2, =BeginBattleIntro
str r2, [r0]
movs r1, 0x80
ands r1, r3
@ -380,7 +380,7 @@ _080329CC:
b _08032CB2
.pool
_080329E0:
ldr r1, =sub_8039ECC
ldr r1, =BeginBattleIntro
ldr r2, =gBattleMainFunc
str r1, [r2]
ldr r2, =gBattleBankFunc
@ -419,7 +419,7 @@ _08032A20:
ands r0, r1
cmp r0, r1
bne _08032AA0
ldr r0, =sub_8039ECC
ldr r0, =BeginBattleIntro
ldr r1, =gBattleMainFunc
str r0, [r1]
ldr r0, =SetBankFuncToRecordedPlayerBufferRunCommand
@ -751,7 +751,7 @@ b_setup_bx_link: @ 8032CC0
cmp r4, 0
beq _08032D1C
ldr r1, =gBattleMainFunc
ldr r0, =sub_8039ECC
ldr r0, =BeginBattleIntro
str r0, [r1]
ldr r2, =gBattleBankFunc
ldr r0, =SetBankFuncToPlayerBufferRunCommand
@ -789,7 +789,7 @@ _08032D48:
cmp r3, 0
beq _08032D98
ldr r1, =gBattleMainFunc
ldr r0, =sub_8039ECC
ldr r0, =BeginBattleIntro
str r0, [r1]
ldr r2, =gBattleBankFunc
ldr r4, =SetBankFuncToPlayerBufferRunCommand
@ -840,7 +840,7 @@ _08032DD0:
cmp r3, 0
beq _08032E1C
ldr r1, =gBattleMainFunc
ldr r0, =sub_8039ECC
ldr r0, =BeginBattleIntro
str r0, [r1]
ldr r2, =gBattleBankFunc
ldr r0, =SetBankFuncToPlayerBufferRunCommand
@ -904,7 +904,7 @@ _08032E8C:
cmp r0, 0
beq _08032EA4
ldr r1, =gBattleMainFunc
ldr r0, =sub_8039ECC
ldr r0, =BeginBattleIntro
str r0, [r1]
_08032EA4:
movs r0, 0
@ -1790,7 +1790,7 @@ _080335A0:
ldr r1, [r5]
adds r1, r2
adds r2, r6, 0
bl link_0800A448
bl SendBlock
ldrh r0, [r4, 0x1E]
adds r0, 0x1
strh r0, [r4, 0x1E]
@ -1857,7 +1857,7 @@ sub_8033648: @ 8033648
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _08033738
@ -1869,12 +1869,12 @@ sub_8033648: @ 8033648
beq _08033738
bl sub_8011BD0
movs r4, 0
ldr r0, =gUnknown_020223C4
ldr r0, =gBlockRecvBuffer
mov r10, r0
b _0803372C
.pool
_08033680:
bl sub_800A550
bl GetBlockReceivedStatus
lsls r0, 24
lsrs r0, 24
ldr r2, =gBitTable
@ -1891,7 +1891,7 @@ _08033680:
lsls r0, r4, 8
mov r4, r10
adds r3, r0, r4
ldr r1, =gUnknown_020223C8
ldr r1, =gBlockRecvBuffer + 4
adds r0, r1
ldrh r6, [r0]
ldr r7, =gTasks
@ -2247,8 +2247,8 @@ _0803396C:
.pool
thumb_func_end sub_8033940
thumb_func_start dp01_build_cmdbuf_x04_4_4_4
dp01_build_cmdbuf_x04_4_4_4: @ 8033980
thumb_func_start EmitLoadMonSprite
EmitLoadMonSprite: @ 8033980
push {lr}
lsls r0, 24
lsrs r0, 24
@ -2262,7 +2262,7 @@ dp01_build_cmdbuf_x04_4_4_4: @ 8033980
pop {r0}
bx r0
.pool
thumb_func_end dp01_build_cmdbuf_x04_4_4_4
thumb_func_end EmitLoadMonSprite
thumb_func_start EmitSwitchInAnim
EmitSwitchInAnim: @ 80339A0
@ -2301,8 +2301,8 @@ EmitReturnPokeToBall: @ 80339C4
.pool
thumb_func_end EmitReturnPokeToBall
thumb_func_start dp01_build_cmdbuf_x07_7_7_7
dp01_build_cmdbuf_x07_7_7_7: @ 80339E4
thumb_func_start EmitDrawTrainerPic
EmitDrawTrainerPic: @ 80339E4
push {lr}
lsls r0, 24
lsrs r0, 24
@ -2317,7 +2317,7 @@ dp01_build_cmdbuf_x07_7_7_7: @ 80339E4
pop {r0}
bx r0
.pool
thumb_func_end dp01_build_cmdbuf_x07_7_7_7
thumb_func_end EmitDrawTrainerPic
thumb_func_start EmitTrainerSlide
EmitTrainerSlide: @ 8033A04
@ -2570,8 +2570,8 @@ _08033BB6:
.pool
thumb_func_end EmitMoveAnimation
thumb_func_start dp01_build_cmdbuf_x10_TODO
dp01_build_cmdbuf_x10_TODO: @ 8033BE4
thumb_func_start EmitPrintString
EmitPrintString: @ 8033BE4
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@ -2685,7 +2685,7 @@ _08033C88:
pop {r0}
bx r0
.pool
thumb_func_end dp01_build_cmdbuf_x10_TODO
thumb_func_end EmitPrintString
thumb_func_start EmitPrintStringPlayerOnly
EmitPrintStringPlayerOnly: @ 8033CFC
@ -2786,8 +2786,8 @@ _08033D7C:
.pool
thumb_func_end EmitPrintStringPlayerOnly
thumb_func_start dp01_build_cmdbuf_x12_a_bb
dp01_build_cmdbuf_x12_a_bb: @ 8033DE4
thumb_func_start EmitChooseAction
EmitChooseAction: @ 8033DE4
push {r4,lr}
adds r4, r1, 0
lsls r0, 24
@ -2807,7 +2807,7 @@ dp01_build_cmdbuf_x12_a_bb: @ 8033DE4
pop {r0}
bx r0
.pool
thumb_func_end dp01_build_cmdbuf_x12_a_bb
thumb_func_end EmitChooseAction
thumb_func_start EmitCmd13
EmitCmd13: @ 8033E10
@ -2827,8 +2827,8 @@ EmitCmd13: @ 8033E10
.pool
thumb_func_end EmitCmd13
thumb_func_start sub_8033E30
sub_8033E30: @ 8033E30
thumb_func_start EmitChooseMove
EmitChooseMove: @ 8033E30
push {r4-r6,lr}
adds r5, r3, 0
lsls r0, 24
@ -2858,10 +2858,10 @@ _08033E4C:
pop {r0}
bx r0
.pool
thumb_func_end sub_8033E30
thumb_func_end EmitChooseMove
thumb_func_start sub_8033E6C
sub_8033E6C: @ 8033E6C
thumb_func_start EmitOpenBag
EmitOpenBag: @ 8033E6C
push {r4,r5,lr}
adds r4, r1, 0
lsls r0, 24
@ -2886,7 +2886,7 @@ _08033E7E:
pop {r0}
bx r0
.pool
thumb_func_end sub_8033E6C
thumb_func_end EmitOpenBag
thumb_func_start EmitChoosePokemon
EmitChoosePokemon: @ 8033EA0
@ -3532,8 +3532,8 @@ EmitFaintingCry: @ 803432C
.pool
thumb_func_end EmitFaintingCry
thumb_func_start dp01_build_cmdbuf_x2E_a
dp01_build_cmdbuf_x2E_a: @ 803434C
thumb_func_start EmitIntroSlide
EmitIntroSlide: @ 803434C
push {lr}
adds r3, r1, 0
lsls r0, 24
@ -3547,10 +3547,10 @@ dp01_build_cmdbuf_x2E_a: @ 803434C
pop {r0}
bx r0
.pool
thumb_func_end dp01_build_cmdbuf_x2E_a
thumb_func_end EmitIntroSlide
thumb_func_start dp01_build_cmdbuf_x2F_2F_2F_2F
dp01_build_cmdbuf_x2F_2F_2F_2F: @ 803436C
thumb_func_start EmitIntroTrainerBallThrow
EmitIntroTrainerBallThrow: @ 803436C
push {lr}
lsls r0, 24
lsrs r0, 24
@ -3565,10 +3565,10 @@ dp01_build_cmdbuf_x2F_2F_2F_2F: @ 803436C
pop {r0}
bx r0
.pool
thumb_func_end dp01_build_cmdbuf_x2F_2F_2F_2F
thumb_func_end EmitIntroTrainerBallThrow
thumb_func_start EmitCmd48
EmitCmd48: @ 803438C
thumb_func_start EmitDrawPartyStatusSummary
EmitDrawPartyStatusSummary: @ 803438C
push {r4,r5,lr}
adds r4, r1, 0
lsls r0, 24
@ -3604,7 +3604,7 @@ _080343B4:
pop {r0}
bx r0
.pool
thumb_func_end EmitCmd48
thumb_func_end EmitDrawPartyStatusSummary
thumb_func_start EmitCmd49
EmitCmd49: @ 80343D4
@ -3624,8 +3624,8 @@ EmitCmd49: @ 80343D4
.pool
thumb_func_end EmitCmd49
thumb_func_start dp01_build_cmdbuf_x32_32_32_32
dp01_build_cmdbuf_x32_32_32_32: @ 80343F4
thumb_func_start Emit_x32
Emit_x32: @ 80343F4
push {lr}
lsls r0, 24
lsrs r0, 24
@ -3640,7 +3640,7 @@ dp01_build_cmdbuf_x32_32_32_32: @ 80343F4
pop {r0}
bx r0
.pool
thumb_func_end dp01_build_cmdbuf_x32_32_32_32
thumb_func_end Emit_x32
thumb_func_start EmitSpriteInvisibility
EmitSpriteInvisibility: @ 8034414

View File

@ -258,7 +258,7 @@ sub_813561C: @ 813561C
thumb_func_start sub_8135654
sub_8135654: @ 8135654
push {r4,lr}
bl sub_81797DC
bl ShouldDoBrailleStrengthEffect
lsls r0, 24
cmp r0, 0
beq _0813568C
@ -404,7 +404,7 @@ sub_8135780: @ 8135780
lsrs r0, r2, 16
strh r0, [r1, 0x18]
strh r2, [r1, 0x1A]
bl sub_81795E8
bl ShouldDoBrailleDigEffect
lsls r0, 24
cmp r0, 0
bne _081357AC
@ -422,12 +422,12 @@ sub_81357BC: @ 81357BC
push {r4,lr}
movs r0, 0x26
bl FieldEffectActiveListRemove
bl sub_81795E8
bl ShouldDoBrailleDigEffect
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _081357D6
bl sub_817963C
bl DoBrailleDigEffect
b _081357EE
_081357D6:
ldr r0, =task08_080A1C44
@ -3329,7 +3329,7 @@ _081370E2:
thumb_func_start sub_81370FC
sub_81370FC: @ 81370FC
push {r4,lr}
bl sub_81798D0
bl ShouldDoBrailleFlyEffect
lsls r0, 24
cmp r0, 0
beq _08137134
@ -11564,7 +11564,7 @@ sub_813B534: @ 813B534
str r0, [r2]
movs r0, 0
str r0, [r1]
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _0813B552
@ -11651,11 +11651,11 @@ _0813B5FE:
lsrs r0, 24
ldr r1, =gSpecialVar_0x8004
movs r2, 0x2
bl link_0800A448
bl SendBlock
b _0813B708
.pool
_0813B614:
bl sub_800A550
bl GetBlockReceivedStatus
movs r1, 0x2
ands r1, r0
cmp r1, 0
@ -11669,7 +11669,7 @@ _0813B622:
b _0813B790
_0813B62E:
ldr r5, =gSpecialVar_0x8005
ldr r0, =gUnknown_020223C4
ldr r0, =gBlockRecvBuffer
movs r1, 0x80
lsls r1, 1
adds r0, r1
@ -11738,11 +11738,11 @@ _0813B6C2:
lsrs r0, 24
ldr r1, =gScriptResult
movs r2, 0x2
bl link_0800A448
bl SendBlock
b _0813B708
.pool
_0813B6E4:
bl sub_800A550
bl GetBlockReceivedStatus
movs r1, 0x1
ands r1, r0
cmp r1, 0
@ -11752,7 +11752,7 @@ _0813B6E4:
cmp r0, 0
beq _0813B790
ldr r1, =gScriptResult
ldr r0, =gUnknown_020223C4
ldr r0, =gBlockRecvBuffer
ldrh r0, [r0]
strh r0, [r1]
movs r0, 0

View File

@ -94,7 +94,7 @@ _080A5D28:
lsls r0, 24
cmp r0, 0
beq _080A5D60
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r5, 2
@ -112,7 +112,7 @@ _080A5D28:
b _080A5D7E
.pool
_080A5D60:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r5, 2
@ -195,7 +195,7 @@ _080A5E00:
ldr r2, [r2, 0x8]
b _080A5E42
_080A5E04:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
lsls r1, r4, 2
@ -285,7 +285,7 @@ _080A5EC0:
_080A5EC8:
cmp r5, 0xC9
bne _080A5F58
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
lsls r1, r4, 2
@ -344,7 +344,7 @@ _080A5F44:
lsls r0, 16
lsrs r0, 16
_080A5F4E:
ldr r1, =gUnknown_08300D38
ldr r1, =gMonFrontPicCoords
lsls r0, 2
b _080A5F90
.pool
@ -352,7 +352,7 @@ _080A5F58:
ldr r0, =0x00000181
cmp r5, r0
bne _080A5F7C
ldr r0, =gUnknown_08525F78
ldr r0, =gCastformFrontSpriteCoords
ldr r1, =gBattleMonForms
adds r1, r4, r1
ldrb r1, [r1]
@ -366,11 +366,11 @@ _080A5F7C:
lsls r0, 1
cmp r5, r0
bls _080A5F8C
ldr r0, =gUnknown_08300D38
ldr r0, =gMonFrontPicCoords
b _080A5F92
.pool
_080A5F8C:
ldr r1, =gUnknown_08300D38
ldr r1, =gMonFrontPicCoords
_080A5F8E:
lsls r0, r5, 2
_080A5F90:
@ -546,7 +546,7 @@ _080A60E4:
ldrh r1, [r2]
b _080A610E
_080A60E8:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r4, 2
@ -654,7 +654,7 @@ sub_80A6190: @ 80A6190
lsls r0, 24
cmp r0, 0
beq _080A61E4
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r5, 2
@ -672,7 +672,7 @@ sub_80A6190: @ 80A6190
b _080A6202
.pool
_080A61E4:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r5, 2
@ -2976,7 +2976,7 @@ _080A72B4:
lsls r0, 30
cmp r0, 0
bne _080A7312
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r7, 1
@ -4571,7 +4571,7 @@ _080A7F78:
lsls r0, 24
cmp r0, 0
bne _080A7FD8
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r5, 2
@ -4606,7 +4606,7 @@ _080A7FD0:
b _080A8026
.pool
_080A7FD8:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r5, 2
@ -4641,7 +4641,7 @@ _080A8018:
b _080A8042
.pool
_080A8024:
ldr r0, =gUnknown_08300D38
ldr r0, =gMonFrontPicCoords
_080A8026:
lsls r1, r2, 2
adds r1, r0
@ -5155,7 +5155,7 @@ sub_80A8394: @ 80A8394
bl AllocSpritePalette
lsls r0, 24
lsrs r5, r0, 24
ldr r4, =gBattleSpritesGfx
ldr r4, =gMonSpritesGfxPtr
ldr r0, [r4]
cmp r0, 0
beq _080A8412
@ -5200,7 +5200,7 @@ _080A8412:
lsrs r0, 24
cmp r0, 0x1
beq _080A845E
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
ldr r2, [sp, 0x40]
@ -5213,7 +5213,7 @@ _080A845E:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
movs r3, 0xBE
lsls r3, 1
@ -5226,7 +5226,7 @@ _080A8488:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
movs r2, 0xBE
lsls r2, 1
@ -5263,7 +5263,7 @@ _080A84B0:
lsrs r0, 24
cmp r0, 0x1
beq _080A84F6
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r1, [r0]
ldr r3, [sp, 0x40]
@ -5276,7 +5276,7 @@ _080A84F6:
lsls r0, r6, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
movs r2, 0xBE
lsls r2, 1
@ -5294,7 +5294,7 @@ _080A8524:
lsls r0, r6, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
movs r3, 0xBE
lsls r3, 1
@ -5305,7 +5305,7 @@ _080A8524:
mov r3, r8
bl LoadSpecialPokePic_2
_080A8540:
ldr r5, =gBattleSpritesGfx
ldr r5, =gMonSpritesGfxPtr
ldr r0, [r5]
movs r4, 0xBE
lsls r4, 1
@ -5338,7 +5338,7 @@ _080A8540:
mov r2, r10
lsls r1, r2, 16
asrs r1, 16
ldr r3, =gUnknown_08300D38
ldr r3, =gMonFrontPicCoords
b _080A85B2
.pool
_080A85A0:
@ -5490,7 +5490,7 @@ _080A86C4:
lsls r0, 24
cmp r0, 0
bne _080A8790
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
mov r1, r8
@ -5580,7 +5580,7 @@ _080A8784:
b _080A8864
.pool
_080A8790:
ldr r0, =gUnknown_020244D0
ldr r0, =gBattleSpritesDataPtr
ldr r0, [r0]
ldr r0, [r0]
mov r1, r8
@ -5662,7 +5662,7 @@ _080A8834:
add r0, r8
ldrb r0, [r0]
lsls r0, 2
ldr r1, =gUnknown_08525F78
ldr r1, =gCastformFrontSpriteCoords
adds r4, r0, r1
b _080A8866
.pool
@ -5671,13 +5671,13 @@ _080A8850:
lsls r0, 1
cmp r7, r0
bls _080A8860
ldr r4, =gUnknown_08300D38
ldr r4, =gMonFrontPicCoords
b _080A8866
.pool
_080A8860:
lsls r1, r7, 2
_080A8862:
ldr r0, =gUnknown_08300D38
ldr r0, =gMonFrontPicCoords
_080A8864:
adds r4, r1, r0
_080A8866:

View File

@ -670,7 +670,7 @@ sub_80F8D28: @ 80F8D28
beq _080F8D44
b _080F8E9C
_080F8D44:
bl init_uns_table_pokemon_copy
bl AllocateMonSpritesGfx
movs r0, 0xA
mov r9, r0
movs r1, 0x3
@ -710,7 +710,7 @@ _080F8D44:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r6, 0
@ -722,7 +722,7 @@ _080F8DC4:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r6, 0
@ -842,7 +842,7 @@ sub_80F8EB8: @ 80F8EB8
ldrh r0, [r1, 0x8]
adds r0, 0x1
strh r0, [r1, 0x8]
bl sub_805F094
bl FreeMonSpritesGfx
_080F8EDC:
pop {r0}
bx r0
@ -1093,7 +1093,7 @@ sub_80F90DC: @ 80F90DC
ands r0, r1
cmp r0, 0
beq _080F90FE
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080F90FE
@ -1116,7 +1116,7 @@ sub_80F910C: @ 80F910C
ands r0, r1
cmp r0, 0
beq _080F9126
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080F9126

View File

@ -18,7 +18,7 @@ sub_8077170: @ 8077170
lsrs r2, 16
movs r0, 0
adds r1, r4, 0
bl link_0800A448
bl SendBlock
lsls r0, 24
lsrs r0, 24
b _080771A2
@ -83,7 +83,7 @@ _080771F8:
thumb_func_start sub_8077200
sub_8077200: @ 8077200
push {lr}
bl sub_800A550
bl GetBlockReceivedStatus
lsls r0, 24
lsrs r0, 24
pop {r1}
@ -103,7 +103,7 @@ sub_8077210: @ 8077210
b _08077230
.pool
_0807722C:
bl sub_800A5B4
bl ResetBlockReceivedFlags
_08077230:
pop {r0}
bx r0
@ -397,7 +397,7 @@ _080774B2:
bl sub_807A19C
movs r0, 0
bl ShowBg
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r2, [r0]
cmp r2, 0
bne _0807754C
@ -504,7 +504,7 @@ _080775D8:
b _08077B22
.pool
_080775E8:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0x1
beq _080775F2
@ -1832,7 +1832,7 @@ sub_80781C8: @ 80781C8
b _08078244
.pool
_08078220:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r4, [r0]
cmp r4, 0
bne _08078244
@ -2198,7 +2198,7 @@ _08078552:
adds r1, r5, 0
eors r1, r2
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0xC8
bl sub_8078438
@ -2237,7 +2237,7 @@ _080785B6:
adds r1, r5, 0
eors r1, r2
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0xC8
bl sub_8078438
@ -2276,7 +2276,7 @@ _0807861A:
adds r1, r5, 0
eors r1, r2
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0xC8
bl sub_8078438
@ -2318,7 +2318,7 @@ _0807868A:
adds r1, r5, 0
eors r1, r2
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0xD8
bl sub_8078438
@ -2360,7 +2360,7 @@ _080786F0:
adds r1, r5, 0
eors r1, r2
lsls r1, 8
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
adds r1, r2
movs r2, 0xB
bl sub_8078438
@ -2467,7 +2467,7 @@ sub_80787E0: @ 80787E0
ands r0, r2
cmp r0, 0
beq _08078864
ldr r0, =gUnknown_020223C4
ldr r0, =gBlockRecvBuffer
ldrh r1, [r0]
ldr r0, =0x0000bbbb
cmp r1, r0
@ -2521,7 +2521,7 @@ _08078864:
ands r0, r2
cmp r0, 0
beq _080788F6
ldr r3, =gUnknown_020223C4
ldr r3, =gBlockRecvBuffer
movs r1, 0x80
lsls r1, 1
adds r0, r3, r1
@ -2597,7 +2597,7 @@ sub_8078900: @ 8078900
ands r0, r5
cmp r0, 0
beq _080789E2
ldr r2, =gUnknown_020223C4
ldr r2, =gBlockRecvBuffer
ldrh r1, [r2]
ldr r0, =0x0000ddee
cmp r1, r0
@ -4052,7 +4052,7 @@ sub_80794CC: @ 80794CC
b _0807953A
.pool
_08079518:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _0807953A
@ -6279,7 +6279,7 @@ _0807A718:
thumb_func_start sub_807A728
sub_807A728: @ 807A728
push {r4-r7,lr}
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _0807A7B4
@ -7054,7 +7054,7 @@ _0807ACC4:
thumb_func_start sub_807ACDC
sub_807ACDC: @ 807ACDC
push {lr}
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _0807ACF0
@ -7128,7 +7128,7 @@ _0807AD58:
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r5, 0
@ -7141,7 +7141,7 @@ _0807AD94:
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r2, [r1]
lsls r4, r6, 1
adds r1, r4, 0x1
@ -7254,7 +7254,7 @@ _0807AE78:
.4byte _0807B0D4
.4byte _0807B0F0
_0807AEAC:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _0807AEC0
@ -7270,7 +7270,7 @@ _0807AEC0:
adds r0, r5, 0
bl AllocZeroed
str r0, [r4]
bl init_uns_table_pokemon_copy
bl AllocateMonSpritesGfx
bl ResetTasks
bl ResetSpriteData
bl FreeAllSpritePalettes
@ -7321,7 +7321,7 @@ _0807AEC0:
b _0807B116
.pool
_0807AF58:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r5, [r0]
cmp r5, 0
bne _0807AF90
@ -7401,7 +7401,7 @@ _0807B000:
b _0807B116
_0807B006:
bl sub_807AC64
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0x1
beq _0807B014
@ -7729,7 +7729,7 @@ _0807B2D0:
adds r0, r5, 0
bl AllocZeroed
str r0, [r4]
bl init_uns_table_pokemon_copy
bl AllocateMonSpritesGfx
bl ResetTasks
bl ResetSpriteData
bl FreeAllSpritePalettes
@ -7989,7 +7989,7 @@ _0807B566:
_0807B57C:
mov r0, r9
bl sub_807B464
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _0807B58E
@ -8029,7 +8029,7 @@ _0807B5D0:
ldr r1, [r4]
adds r1, 0x74
movs r2, 0x14
bl link_0800A448
bl SendBlock
ldr r1, [r4]
adds r1, 0x93
ldrb r0, [r1]
@ -8939,7 +8939,7 @@ _0807C04C:
adds r1, r0
lsls r1, 2
adds r1, r3
ldr r2, =gUnknown_08300D38
ldr r2, =gMonFrontPicCoords
adds r0, r4, 0
adds r0, 0xF0
ldrh r0, [r0]
@ -10369,7 +10369,7 @@ _0807CCEE:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x10]
ldr r3, [r3, 0x6C]
@ -10395,7 +10395,7 @@ _0807CD1C:
adds r1, r0
lsls r1, 2
adds r1, r4
ldr r3, =gUnknown_08300D38
ldr r3, =gMonFrontPicCoords
adds r2, 0xF2
ldrh r0, [r2]
lsls r0, 2
@ -10663,7 +10663,7 @@ _0807CF5C:
movs r0, 0
bl GetBgTilemapBuffer
bl Free
bl sub_805F094
bl FreeMonSpritesGfx
ldr r0, [r7]
bl Free
str r4, [r7]
@ -11001,7 +11001,7 @@ _0807D428:
adds r1, r0
lsls r1, 2
adds r1, r3
ldr r2, =gUnknown_08300D38
ldr r2, =gMonFrontPicCoords
adds r0, r4, 0
adds r0, 0xF0
ldrh r0, [r0]
@ -12474,7 +12474,7 @@ _0807E13A:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gBattleSpritesGfx
ldr r1, =gMonSpritesGfxPtr
ldr r1, [r1]
ldr r1, [r1, 0x10]
ldr r3, [r3, 0x6C]
@ -12500,7 +12500,7 @@ _0807E168:
adds r1, r0
lsls r1, 2
adds r1, r4
ldr r3, =gUnknown_08300D38
ldr r3, =gMonFrontPicCoords
adds r2, 0xF2
ldrh r0, [r2]
lsls r0, 2
@ -12768,7 +12768,7 @@ _0807E3A8:
movs r0, 0
bl GetBgTilemapBuffer
bl Free
bl sub_805F094
bl FreeMonSpritesGfx
ldr r0, [r7]
bl Free
str r4, [r7]
@ -12877,7 +12877,7 @@ _0807E4C2:
sub_807E4DC: @ 807E4DC
push {r4-r6,lr}
bl sub_807ACDC
bl sub_800A550
bl GetBlockReceivedStatus
lsls r0, 24
lsrs r5, r0, 24
movs r6, 0x1
@ -12885,7 +12885,7 @@ sub_807E4DC: @ 807E4DC
ands r0, r6
cmp r0, 0
beq _0807E51A
ldr r4, =gUnknown_020223C4
ldr r4, =gBlockRecvBuffer
ldrh r1, [r4]
ldr r0, =0x0000dcba
cmp r1, r0
@ -12909,7 +12909,7 @@ _0807E51A:
ands r0, r5
cmp r0, 0
beq _0807E542
ldr r0, =gUnknown_020223C4
ldr r0, =gBlockRecvBuffer
movs r1, 0x80
lsls r1, 1
adds r0, r1
@ -13600,7 +13600,7 @@ _0807EAEC:
ldr r1, [r4]
adds r1, 0x74
movs r2, 0x14
bl link_0800A448
bl SendBlock
ldr r0, [r4]
adds r0, 0x72
movs r1, 0x2
@ -14090,7 +14090,7 @@ _0807EFF0:
b _0807F03A
.pool
_0807F028:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r1, [r0]
cmp r1, 0
bne _0807F03A
@ -14136,7 +14136,7 @@ c2_080543C4: @ 807F068
movs r0, 0
bl GetBgTilemapBuffer
bl Free
bl sub_805F094
bl FreeMonSpritesGfx
ldr r4, =gUnknown_020322A0
ldr r0, [r4]
bl Free

View File

@ -191,7 +191,7 @@ _080C2836:
ldrb r0, [r0]
cmp r0, 0x1
bne _080C2852
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0x1
bne _080C2852
@ -261,7 +261,7 @@ _080C28D8:
b _080C2ACA
.pool
_080C28E4:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r5, [r0]
cmp r5, 0
bne _080C290A
@ -301,7 +301,7 @@ _080C293C:
bne _080C2946
b _080C2ACA
_080C2946:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080C2960
@ -346,7 +346,7 @@ _080C299C:
ands r0, r1
cmp r0, 0
beq _080C29F4
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080C29DC
@ -358,7 +358,7 @@ _080C299C:
cmp r0, 0x1
beq _080C2A14
_080C29C0:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080C29DC
@ -382,7 +382,7 @@ _080C29F4:
ands r0, r1
cmp r0, 0
beq _080C2ACA
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080C2A20
@ -430,7 +430,7 @@ _080C2A2C:
b _080C2ACA
.pool
_080C2A68:
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _080C2ACA
@ -1403,7 +1403,7 @@ sub_80C3278: @ 80C3278
movs r0, 0x40
movs r1, 0xF0
bl SetGpuReg
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080C32E0
@ -4267,7 +4267,7 @@ _080C4BF6:
ldrb r0, [r1, 0x4]
adds r0, 0x1
strb r0, [r1, 0x4]
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
beq _080C4B20
@ -4745,7 +4745,7 @@ sub_80C4FF0: @ 80C4FF0
bl InUnionRoom
cmp r0, 0x1
bne _080C5060
ldr r0, =gUnknown_03003124
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0x1
bne _080C5060

View File

@ -267,11 +267,11 @@ _080BA1D8:
.4byte _080BA250
.4byte _080BA24C
_080BA214:
ldr r0, =gUnknown_02022E14
ldr r0, =gBattle_BG0_X
b _080BA24E
.pool
_080BA21C:
ldr r0, =gUnknown_02022E16
ldr r0, =gBattle_BG0_Y
b _080BA24E
.pool
_080BA224:
@ -295,7 +295,7 @@ _080BA244:
b _080BA24E
.pool
_080BA24C:
ldr r0, =gUnknown_02022E22
ldr r0, =gBattle_BG3_Y
_080BA24E:
ldrh r6, [r0]
_080BA250:

View File

@ -327,7 +327,7 @@ gUnknown_08525E98:: @ 8525E98
gUnknown_08525F58:: @ 8525F58
.incbin "baserom.gba", 0x525f58, 0x20
gUnknown_08525F78:: @ 8525F78
gCastformFrontSpriteCoords:: @ 8525F78
.incbin "baserom.gba", 0x525f78, 0x10
gUnknown_08525F88:: @ 8525F88

View File

@ -1768,12 +1768,19 @@ gText_SafariBalls:: @ 85CCB2C
gText_SafariBallLeft:: @ 85CCB3C
.string "{HIGHLIGHT DARK_GREY}Left: $"
.string "{HIGHLIGHT DARK_GREY}$"
gText_Sleep::
.string "sleep$"
gText_Poison::
.string "poison$"
gText_Burn::
.string "burn$"
gText_Paralysis::
.string "paralysis$"
gText_Ice::
.string "ice$"
gText_Confusion::
.string "confusion$"
gText_Love::
.string "love$"
gText_SpaceAndSpace:: @ 85CCB79

View File

@ -45,40 +45,40 @@ gUnknown_082DA7C4:: @ 82DA7C4
gUnknown_082DA7CD:: @ 82DA7CD
.incbin "baserom.gba", 0x2da7cd, 0x160
gUnknown_082DA92D:: @ 82DA92D
BattleScript_LocalTrainerBattleWon:: @ 82DA92D
.incbin "baserom.gba", 0x2da92d, 0x3d
gUnknown_082DA96A:: @ 82DA96A
BattleScript_PayDayMoneyAndPickUpItems:: @ 82DA96A
.incbin "baserom.gba", 0x2da96a, 0x3
gUnknown_082DA96D:: @ 82DA96D
BattleScript_LocalBattleLost:: @ 82DA96D
.incbin "baserom.gba", 0x2da96d, 0x9e
gUnknown_082DAA0B:: @ 82DAA0B
.incbin "baserom.gba", 0x2daa0b, 0x2a
gUnknown_082DAA35:: @ 82DAA35
BattleScript_LinkBattleWonOrLost:: @ 82DAA35
.incbin "baserom.gba", 0x2daa35, 0x52
gUnknown_082DAA87:: @ 82DAA87
BattleScript_FrontierTrainerBattleWon:: @ 82DAA87
.incbin "baserom.gba", 0x2daa87, 0x54
gUnknown_082DAADB:: @ 82DAADB
BattleScript_SmokeBallEscape:: @ 82DAADB
.incbin "baserom.gba", 0x2daadb, 0xe
gUnknown_082DAAE9:: @ 82DAAE9
BattleScript_RanAwayUsingMonAbility:: @ 82DAAE9
.incbin "baserom.gba", 0x2daae9, 0x7
gUnknown_082DAAF0:: @ 82DAAF0
BattleScript_GotAwaySafely:: @ 82DAAF0
.incbin "baserom.gba", 0x2daaf0, 0x7
gUnknown_082DAAF7:: @ 82DAAF7
BattleScript_WildMonFled:: @ 82DAAF7
.incbin "baserom.gba", 0x2daaf7, 0x7
gUnknown_082DAAFE:: @ 82DAAFE
.incbin "baserom.gba", 0x2daafe, 0x4
gUnknown_082DAB02:: @ 82DAB02
BattleScript_PrintFailedToRunString:: @ 82DAB02
.incbin "baserom.gba", 0x2dab02, 0x9
gUnknown_082DAB0B:: @ 82DAB0B
@ -87,7 +87,7 @@ gUnknown_082DAB0B:: @ 82DAB0B
gUnknown_082DAB11:: @ 82DAB11
.incbin "baserom.gba", 0x2dab11, 0x4
gUnknown_082DAB15:: @ 82DAB15
BattleScript_ActionSwitch:: @ 82DAB15
.incbin "baserom.gba", 0x2dab15, 0xa4
BattleScript_Pausex20:: @ 82DABB9
@ -255,7 +255,7 @@ BattleScript_OneHitKOMsg:: @ 82DB1CE
BattleScript_SAtkDown2:: @ 82DB1D5
.incbin "baserom.gba", 0x2db1d5, 0x2a
gUnknown_082DB1FF:: @ 82DB1FF
BattleScript_FocusPunchSetUp:: @ 82DB1FF
.incbin "baserom.gba", 0x2db1ff, 0x14
BattleScript_MoveUsedIsAsleep:: @ 82DB213
@ -561,7 +561,7 @@ BattleScript_BerryStatRaiseEnd2:: @ 82DB84E
BattleScript_BerryFocusEnergyEnd2:: @ 82DB869
.incbin "baserom.gba", 0x2db869, 0x10
gUnknown_082DB879:: @ 82DB879
BattleScript_ActionSelectionItemsCantBeUsed:: @ 82DB879
.incbin "baserom.gba", 0x2db879, 0x4
gUnknown_082DB87D:: @ 82DB87D

View File

@ -4,7 +4,7 @@
.section script_data, "aw", %progbits
.align 2
gUnknown_082DBD08:: @ 82DBD08
gBattlescriptsForBallThrow:: @ 82DBD08
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
@ -29,11 +29,11 @@ gUnknown_082DBD3C:: @ 82DBD3C
.4byte gUnknown_082DBE91
.align 2
gUnknown_082DBD54:: @ 82DBD54
.4byte gUnknown_082DBEB3
gBattlescriptsForRunningByItem:: @ 82DBD54
.4byte BattleScript_RunByUsingItem
.align 2
gUnknown_082DBD58:: @ 82DBD58
gBattlescriptsForSafariActions:: @ 82DBD58
.4byte gUnknown_082DBEBD
.4byte gUnknown_082DBEC4
.4byte gUnknown_082DBECD
@ -72,7 +72,7 @@ gUnknown_082DBE6F:: @ 82DBE6F
gUnknown_082DBE91:: @ 82DBE91
.incbin "baserom.gba", 0x2dbe91, 0x22
gUnknown_082DBEB3:: @ 82DBEB3
BattleScript_RunByUsingItem:: @ 82DBEB3
.incbin "baserom.gba", 0x2dbeb3, 0xA
gUnknown_082DBEBD:: @ 82DBEBD

View File

@ -95,7 +95,7 @@ gUnknown_082FF6C0:: @ 82FF6C0
gUnknown_082FF70C:: @ 82FF70C
.incbin "baserom.gba", 0x2ff70c, 0x162c
gUnknown_08300D38:: @ 8300D38
gMonFrontPicCoords:: @ 8300D38
.incbin "baserom.gba", 0x300d38, 0x6e0
@ 8301418
@ -196,8 +196,13 @@ gUnknown_0831AC70:: @ 831AC70
gUnknown_0831AC88:: @ 831AC88
.incbin "baserom.gba", 0x31ac88, 0x18
gUnknown_0831ACA0:: @ 831ACA0
.incbin "baserom.gba", 0x31aca0, 0x40
gText_ShedinjaJapaneseName:: @ 831ACA0
.string "$" @Nukenin
.align 2
gUnknown_0831ACA8:: @ 831ACA8
.incbin "baserom.gba", 0x31aca8, 0x38
gUnknown_0831ACE0:: @ 831ACE0
.incbin "baserom.gba", 0x31ace0, 0x8
@ -220,46 +225,3 @@ gTrainerMoneyTable:: @ 831AEB8
@ 831BAD4
.include "data/text/ability_description_pointers.inc"
gUnknown_0831BC0C:: @ 831BC0C
.incbin "baserom.gba", 0x31bc0c, 0x38
gUnknown_0831BC44:: @ 831BC44
.incbin "baserom.gba", 0x31bc44, 0x2c
gStatusConditionString_PoisonJpn:: @ 831BC70
.incbin "baserom.gba", 0x31bc70, 0x8
gStatusConditionString_SleepJpn:: @ 831BC78
.incbin "baserom.gba", 0x31bc78, 0x8
gStatusConditionString_ParalysisJpn:: @ 831BC80
.incbin "baserom.gba", 0x31bc80, 0x8
gStatusConditionString_BurnJpn:: @ 831BC88
.incbin "baserom.gba", 0x31bc88, 0x8
gStatusConditionString_IceJpn:: @ 831BC90
.incbin "baserom.gba", 0x31bc90, 0x8
gStatusConditionString_ConfusionJpn:: @ 831BC98
.incbin "baserom.gba", 0x31bc98, 0x8
gStatusConditionString_LoveJpn:: @ 831BCA0
.incbin "baserom.gba", 0x31bca0, 0x8
gUnknown_0831BCA8:: @ 831BCA8
.incbin "baserom.gba", 0x31bca8, 0x38
gUnknown_0831BCE0:: @ 831BCE0
.incbin "baserom.gba", 0x31bce0, 0xf
gUnknown_0831BCEF:: @ 831BCEF
.incbin "baserom.gba", 0x31bcef, 0x4
gUnknown_0831BCF3:: @ 831BCF3
.incbin "baserom.gba", 0x31bcf3, 0x5
gSoundMovesTable:: @ 831BCF8
.incbin "baserom.gba", 0x31bcf8, 0x18

View File

@ -84,14 +84,14 @@ gUnknown_0823B68C:: @ 823B68C
gUnknown_0823C050:: @ 823C050
.incbin "baserom.gba", 0x23c050, 0x6431
gUnknown_08242481:: @ 8242481
gText_BattleRecordCouldntBeSaved:: @ 8242481
.incbin "baserom.gba", 0x242481, 0x87b
gUnknown_08242CFC:: @ 8242CFC
.incbin "baserom.gba", 0x242cfc, 0x6a91
gUnknown_0824978D:: @ 824978D
.incbin "baserom.gba", 0x24978d, 0xe
gText_LinkStandby3:: @ 824978D
.string "Link standby$"
gUnknown_0824979B:: @ 824979B
.incbin "baserom.gba", 0x24979b, 0x944d

View File

@ -316,7 +316,7 @@ gFieldEffectScript_FieldMoveShowMonInit:: @ 82DBCCC
field_eff_end
gFieldEffectScript_Unknown60:: @ 82DBCD2
field_eff_callnative sub_81799B8
field_eff_callnative FldEff_UsePuzzleEffect
field_eff_end
gFieldEffectScript_Unknown61:: @ 82DBCD8

View File

@ -1,6 +1,11 @@
#ifndef GUARD_BATTLE_H
#define GUARD_BATTLE_H
// should they be included here or included individually by every file?
#include "battle_util.h"
#include "battle_script_commands.h"
#include "battle_2.h"
/*
Banks are a name given to what could be called a 'battlerId' or 'monControllerId'.
Each bank has a value consisting of two bits.
@ -54,11 +59,16 @@
#define BATTLE_TYPE_GROUDON 0x10000000
#define BATTLE_TYPE_KYORGE 0x20000000
#define BATTLE_TYPE_RAYQUAZA 0x40000000
#define BATTLE_TYPE_x80000000 0x80000000
#define TRAINER_OPPONENT_3FE 0x3FE
#define TRAINER_OPPONENT_C00 0xC00
#define TRAINER_OPPONENT_800 0x800
#define STEVEN_PARTNER_ID 0xC03
#define SECRET_BASE_OPPONENT 0x400
#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 BATTLE_TYPE_FRONTIER_NO_PYRAMID (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_x100000)
#define BATTLE_WON 0x1
#define BATTLE_LOST 0x2
@ -67,8 +77,11 @@
#define BATTLE_PLAYER_TELEPORTED 0x5
#define BATTLE_POKE_FLED 0x6
#define BATTLE_CAUGHT 0x7
#define BATTLE_FORFEITED 0x9
#define BATTLE_OPPONENT_TELEPORTED 0xA
#define BATTLE_OUTCOME_BIT_x80 0x80
#define STATUS_SLEEP 0x7
#define STATUS_POISON 0x8
#define STATUS_BURN 0x10
@ -111,8 +124,8 @@
#define STATUS3_MINIMIZED 0x100
#define STATUS3_ROOTED 0x400
#define STATUS3_CHARGED_UP 0x200
#define STATUS3_YAWN 0x1800 //two bits
#define STATUS3_IMPRISONED_OTHERS 0x2000
#define STATUS3_YAWN 0x1800 // two bits
#define STATUS3_IMPRISONED_OTHERS 0x2000
#define STATUS3_GRUDGE 0x4000
#define STATUS3_CANT_SCORE_A_CRIT 0x8000
#define STATUS3_MUDSPORT 0x10000
@ -123,6 +136,7 @@
#define STATUS3_SEMI_INVULNERABLE ((STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER))
#define HITMARKER_x10 0x00000010
#define HITMARKER_x20 0x00000020
#define HITMARKER_DESTINYBOND 0x00000040
#define HITMARKER_NO_ANIMATIONS 0x00000080
@ -133,6 +147,7 @@
#define HITMARKER_PURSUIT_TRAP 0x00001000
#define HITMARKER_IGNORE_SAFEGUARD 0x00002000
#define HITMARKER_SYNCHRONISE_EFFECT 0x00004000
#define HITMARKER_RUN 0x00008000
#define HITMARKER_IGNORE_ON_AIR 0x00010000
#define HITMARKER_IGNORE_UNDERGROUND 0x00020000
#define HITMARKER_IGNORE_UNDERWATER 0x00040000
@ -143,6 +158,7 @@
#define HITMARKER_x800000 0x00800000
#define HITMARKER_GRUDGE 0x01000000
#define HITMARKER_OBEYS 0x02000000
#define HITMARKER_x4000000 0x04000000
#define HITMARKER_x8000000 0x08000000
#define HITMARKER_FAINTED(bank) ((gBitTable[bank] << 0x1C))
#define HITMARKER_UNK(bank) ((0x10000000 << bank))
@ -156,28 +172,21 @@
#define SIDE_STATUS_MIST (1 << 8)
#define SIDE_STATUS_SPIKES_DAMAGED (1 << 9)
#define ABILITYEFFECT_ON_SWITCHIN 0x0
#define ABILITYEFFECT_ENDTURN 0x1
#define ABILITYEFFECT_MOVES_BLOCK 0x2
#define ABILITYEFFECT_ABSORBING 0x3
#define ABILITYEFFECT_CONTACT 0x4
#define ABILITYEFFECT_IMMUNITY 0x5
#define ABILITYEFFECT_FORECAST 0x6
#define ABILITYEFFECT_SYNCHRONIZE 0x7
#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8
#define ABILITYEFFECT_INTIMIDATE1 0x9
#define ABILITYEFFECT_INTIMIDATE2 0xA
#define ABILITYEFFECT_TRACE 0xB
#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC
#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD
#define ABILITYEFFECT_FIELD_SPORT 0xE
#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF
#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10
#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11
#define ABILITYEFFECT_COUNT_ON_FIELD 0x12
#define ABILITYEFFECT_CHECK_ON_FIELD 0x13
#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0)))
#define ACTION_USE_MOVE 0
#define ACTION_USE_ITEM 1
#define ACTION_SWITCH 2
#define ACTION_RUN 3
#define ACTION_WATCHES_CAREFULLY 4
#define ACTION_SAFARI_ZONE_BALL 5
#define ACTION_POKEBLOCK_CASE 6
#define ACTION_GO_NEAR 7
#define ACTION_SAFARI_ZONE_RUN 8
#define ACTION_9 9
#define ACTION_RUN_BATTLESCRIPT 10 // when executing an action
#define ACTION_CANCEL_PARTNER 12 // when choosing an action
#define ACTION_FINISHED 12 // when executing an action
#define ACTION_NOTHING_FAINTED 13 // when choosing an action
#define ACTION_INIT_VALUE 0xFF
#define MOVESTATUS_MISSED (1 << 0)
#define MOVESTATUS_SUPEREFFECTIVE (1 << 1)
@ -215,14 +224,19 @@
#define BATTLE_TERRAIN_POND 5
#define BATTLE_TERRAIN_ROCK 6
#define BATTLE_TERRAIN_CAVE 7
#define BATTLE_TERRAIN_INSIDE 8
// 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 MULTISTRING_CHOOSER 0x5
#define MSG_DISPLAY 0x7
#define MULTIUSE_STATE 0x0
#define CURSOR_POSITION 0x1
#define TASK_ID 0x1 // task Id and cursor position share the same field
#define SPRITES_INIT_STATE1 0x1 // shares the Id as well
#define SPRITES_INIT_STATE2 0x2
#define MOVE_EFFECT_BYTE 0x3
#define ACTIONS_CONFIRMED_COUNT 0x4
#define MULTISTRING_CHOOSER 0x5
#define MSG_DISPLAY 0x7
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8
#define MOVE_TARGET_SELECTED 0x0
#define MOVE_TARGET_DEPENDS 0x1
@ -238,53 +252,34 @@
#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;
u16 iv;
u8 lvl;
u16 evsValue;
u16 species;
};
struct TrainerMonItemDefaultMoves
{
u16 species;
u16 iv;
u8 lvl;
u16 evsValue;
u16 species;
u16 heldItem;
};
struct TrainerMonNoItemCustomMoves
{
u16 species;
u16 iv;
u8 lvl;
u16 evsValue;
u16 species;
u16 moves[4];
};
struct TrainerMonItemCustomMoves
{
u16 species;
u16 iv;
u8 lvl;
u16 evsValue;
u16 species;
u16 heldItem;
u16 moves[4];
};
@ -342,8 +337,8 @@ struct DisableStruct
/*0x0F*/ u8 perishSong1 : 4;
/*0x0F*/ u8 perishSong2 : 4;
/*0x10*/ u8 furyCutterCounter;
/*0x11*/ u8 rolloutTimer1 : 4;
/*0x11*/ u8 rolloutTimer2 : 4;
/*0x11*/ u8 rolloutCounter1 : 4;
/*0x11*/ u8 rolloutCounter2 : 4;
/*0x12*/ u8 chargeTimer1 : 4;
/*0x12*/ u8 chargeTimer2 : 4;
/*0x13*/ u8 tauntTimer1:4;
@ -375,7 +370,7 @@ struct ProtectStruct
u32 prlzImmobility:1;
/* field_1 */
u32 confusionSelfDmg:1;
u32 notEffective:1;
u32 targetNotAffected:1;
u32 chargingTurn:1;
u32 fleeFlag:2; // for RunAway and Smoke Ball
u32 usedImprisionedMove:1;
@ -532,26 +527,24 @@ struct BattleResults
u8 playerSwitchesCounter; // 0x2
u8 unk3; // 0x3
u8 unk4; // 0x4
u8 unk5_0:1; // 0x5
u8 unk5_1:1; // 0x5
u8 caughtMonBall:4; // 0x5
u8 unk5_6:1; // 0x5
u8 unk5_7:1; // 0x5
u16 poke1Species; // 0x6
u8 pokeString1[10]; // 0x8
u8 unk12;
u8 unk5_0:1; // 0x5 , 0x1
u8 unk5_1:1; // 0x5 , 0x2
u8 caughtMonBall:4; // 0x5 , 0x4/0x8/0x10/0x20
u8 unk5_6:1; // 0x5 , 0x40
u8 unk5_7:1; // 0x5 , 0x80
u16 playerMon1Species; // 0x6
u8 playerMon1Name[11]; // 0x8
u8 battleTurnCounter; // 0x13
u8 pokeString2[10]; // 0x14
u8 field_1E; // 0x1E
u8 playerMon2Name[11]; // 0x14
u8 field_1F; // 0x1F
u16 lastOpponentSpecies; // 0x20
u16 lastUsedMove; // 0x22
u16 opponentMove; // 0x24
u16 opponentSpecies; // 0x26
u16 lastUsedMovePlayer; // 0x22
u16 lastUsedMoveOpponent; // 0x24
u16 playerMon2Species; // 0x26
u16 caughtMonSpecies; // 0x28
u8 caughtMonNick[10]; // 0x2A
u8 filler34[2];
u8 catchAttempts[10]; // 0x36
u8 catchAttempts[12]; // 0x36
};
extern struct BattleResults gBattleResults;
@ -578,22 +571,22 @@ struct BattleStruct
u8 field_45;
u8 field_46;
u8 field_47;
u8 field_48;
u8 focusPunchBank;
u8 field_49;
u8 moneyMultiplier;
u8 field_4B;
u8 field_4C;
u8 switchInAbilitiesCounter;
u8 field_4D;
u8 field_4E;
u8 field_4F;
u16 expValue;
u8 field_52;
u8 sentInPokes;
u8 field_54[4];
bool8 selectionScriptFinished[BATTLE_BANKS_COUNT];
u8 field_58[4];
u8 field_5C[4];
u8 field_60[4][3];
u8 field_6C;
u8 runTries;
u8 caughtMonNick[11];
u8 field_78;
u8 field_79;
@ -603,11 +596,8 @@ struct BattleStruct
u8 field_7D;
u8 field_7E;
u8 formToChangeInto;
u8 chosenMovesIds[4];
u8 field_84;
u8 field_85;
u8 field_86;
u8 field_87;
u8 chosenMovePositions[BATTLE_BANKS_COUNT];
u8 stateIdAfterSelScript[BATTLE_BANKS_COUNT];
u8 field_88;
u8 field_89;
u8 field_8A;
@ -633,31 +623,35 @@ struct BattleStruct
u8 field_A5;
u8 field_A6;
u8 field_A7;
u16 hpOnSwitchout[4];
u16 hpOnSwitchout[2];
u32 savedBattleTypeFlags;
u8 field_B0;
u8 hpScale;
u8 synchronizeMoveEffect;
u8 field_B3;
u8 field_B4;
u8 field_B5;
u8 field_B6;
u8 field_B7;
void (*savedCallback)(void);
u16 usedHeldItems[BATTLE_BANKS_COUNT];
u8 field_C0[8];
u8 field_C0[4];
u8 field_C4[2];
u8 field_C6[2];
u16 choicedMove[BATTLE_BANKS_COUNT];
u16 changedItems[BATTLE_BANKS_COUNT];
u8 intimidateBank;
u8 fillerD9[0xDA-0xD9];
u8 switchInItemsCounter;
u8 field_DA;
u8 turnSideTracker;
u8 fillerDC[0xDF-0xDC];
u8 field_DF;
u8 mirrorMoveArrays[32];
u16 castformPalette[4][16];
u8 field_180[32];
u8 field_180;
u8 field_181;
u8 field_182;
u8 field_183;
struct BattleEnigmaBerry battleEnigmaBerry;
u8 field_1A0;
u8 field_1A1;
u8 filler1A2;
bool8 overworldWeatherDone;
u8 atkCancellerTracker;
u8 field_1A4[240];
u8 field_294[4];
@ -783,38 +777,10 @@ extern struct BattleStruct* gBattleStruct;
#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))
@ -838,106 +804,103 @@ struct BattleScripting
u8 statChanger;
u8 field_1B;
u8 atk23_state;
u8 field_1D;
u8 battleStyle;
u8 atk6C_state;
u8 learnMoveState;
u8 field_20;
u8 field_21;
u8 field_22;
u8 field_23;
u8 field_24;
u8 multiplayerId;
};
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_1
void LoadBattleTextboxAndBackground(void);
void LoadBattleEntryBackground(void);
void ApplyPlayerChosenFrameToBattleMenu(void);
bool8 LoadChosenBattleElement(u8 caseId);
void task00_0800F6FC(u8 taskId);
// battle_5
void AllocateBattleResrouces(void);
void FreeBattleResources(void);
void AdjustFriendshipOnBattleFaint(u8 bank);
void sub_80571DC(u8 bank, u8 arg1);
u32 sub_805725C(u8 bank);
// battle 7
void AllocateBattleSpritesData(void);
void FreeBattleSpritesData(void);
void AllocateMonSpritesGfx(void);
void FreeMonSpritesGfx(void);
void BattleMusicStop(void);
void sub_805E990(struct Pokemon* mon, u8 bank);
void sub_805EF14(void);
bool8 BattleInitAllSprites(u8 *state1, u8 *state2);
// rom_80A5C6C
u8 GetBankSide(u8 bank);
u8 GetBankIdentity(u8 bank);
u8 GetBankByIdentity(u8 bank);
struct BattleSpriteInfo
{
u16 invisible : 1; // 0x1
u16 flag_x2 : 1; // 0x2
u16 behindSubstitute : 1; // 0x4
u16 flag_x8 : 1; // 0x8
u16 hpNumbersNoBars : 1; // 0x10
u16 transformSpecies;
};
struct BattleAnimationInfo
{
u16 field; // to fill up later
};
struct BattleHealthboxInfo
{
u8 flag_x1 : 1;
u8 flag_x2 : 1;
u8 flag_x4 : 1;
u8 field_1;
u8 field_2;
u8 field_3;
u8 field_4;
u8 field_5;
u8 field_6;
u8 field_7;
u8 field_8;
u8 field_9;
u8 field_A;
u8 field_B;
};
struct BattleSpriteData
{
struct BattleSpriteInfo *bankData;
struct BattleHealthboxInfo *healthBoxesData;
struct BattleAnimationInfo *animationData;
};
extern struct BattleSpriteData *gBattleSpritesDataPtr;
// Move this somewhere else
#include "sprite.h"
struct BattleSpritesGfx
struct MonSpritesGfx
{
void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon
void* sprites[4];
struct SpriteTemplate templates[4];
};
extern struct BattleSpritesGfx* gBattleSpritesGfx;
extern struct MonSpritesGfx* gMonSpritesGfxPtr;
#endif // GUARD_BATTLE_H

30
include/battle_2.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef GUARD_BATTLE_2_H
#define GUARD_BATTLE_2_H
void CB2_InitBattle(void);
void CB2_QuitRecordedBattle(void);
void FaintClearSetData(void);
void SwitchInClearSetData(void);
void sub_803BDA0(u8 bank);
void BattleMainCB2(void);
void VBlankCB_Battle(void);
bool8 TryRunFromBattle(u8 bank);
u8 IsRunningFromBattleImpossible(void);
u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves);
void SwapTurnOrder(u8 id1, u8 id2);
void BattleTurnPassed(void);
void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);
void sub_8039E9C(struct Sprite *sprite);
extern const u8 gStatusConditionString_PoisonJpn[8];
extern const u8 gStatusConditionString_SleepJpn[8];
extern const u8 gStatusConditionString_ParalysisJpn[8];
extern const u8 gStatusConditionString_BurnJpn[8];
extern const u8 gStatusConditionString_IceJpn[8];
extern const u8 gStatusConditionString_ConfusionJpn[8];
extern const u8 gStatusConditionString_LoveJpn[8];
extern const u8 * const gStatusConditionStringsTable[][2];
#endif // GUARD_BATTLE_2_H

View File

@ -1,6 +1,28 @@
#ifndef GUARD_BATTLE_CONTROLLERS_H
#define GUARD_BATTLE_CONTROLLERS_H
#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
#define RESET_ACTION_MOVE_SELECTION 0
#define RESET_ACTION_SELECTION 1
#define RESET_MOVE_SELECTION 2
#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
struct HpAndStatus
{
u16 hp;
@ -14,16 +36,15 @@ struct MovePpInfo
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
struct ChooseMoveStruct
{
u16 moves[4];
u8 ppNumbers[4];
u8 ppWithBonusNumbers[4];
u16 species;
u8 monType1;
u8 monType2;
};
// rom3.s, emitters
void EmitSetMonData(u8 bufferId, u8 request, u8 c, u8 bytes, void *data);
@ -40,34 +61,28 @@ 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 EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8* arg4);
void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, bool32 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 EmitDrawPartyStatusSummary(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 EmitIntroSlide(u8 bufferId, u8 terrainId);
void EmitDrawTrainerPic(u8 bufferId);
void EmitLoadMonSprite(u8 bufferId);
void EmitIntroTrainerBallThrow(u8 bufferId);
void EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2);
void EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct* movePpData);
void EmitOpenBag(u8 bufferId, u8* arg1);
void Emit_x32(u8 bufferId);
void EmitPrintString(u8 bufferId, u16 stringId);
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

@ -0,0 +1,58 @@
#ifndef GUARD_BATTLE_SCRIPT_COMMANDS_H
#define GUARD_BATTLE_SCRIPT_COMMANDS_H
#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
#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 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_CAN_RUN_FROM_BATTLE 2
#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 STAT_CHANGE_BS_PTR 0x1
#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20
#define STAT_CHANGE_WORKED 0
#define STAT_CHANGE_DIDNT_WORK 1
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[];
#endif // GUARD_BATTLE_SCRIPT_COMMANDS_H

6
include/battle_setup.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef GUARD_BATTLE_SETUP_H
#define GUARD_BATTLE_SETUP_H
u8 BattleSetup_GetTerrainId(void);
#endif // GUARD_BATTLE_SETUP_H

83
include/battle_util.h Normal file
View File

@ -0,0 +1,83 @@
#ifndef GUARD_BATTLE_UTIL_H
#define GUARD_BATTLE_UTIL_H
#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)
#define ABILITYEFFECT_ON_SWITCHIN 0x0
#define ABILITYEFFECT_ENDTURN 0x1
#define ABILITYEFFECT_MOVES_BLOCK 0x2
#define ABILITYEFFECT_ABSORBING 0x3
#define ABILITYEFFECT_CONTACT 0x4
#define ABILITYEFFECT_IMMUNITY 0x5
#define ABILITYEFFECT_FORECAST 0x6
#define ABILITYEFFECT_SYNCHRONIZE 0x7
#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8
#define ABILITYEFFECT_INTIMIDATE1 0x9
#define ABILITYEFFECT_INTIMIDATE2 0xA
#define ABILITYEFFECT_TRACE 0xB
#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC
#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD
#define ABILITYEFFECT_FIELD_SPORT 0xE
#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF
#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10
#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11
#define ABILITYEFFECT_COUNT_ON_FIELD 0x12
#define ABILITYEFFECT_CHECK_ON_FIELD 0x13
#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF
#define ITEMEFFECT_ON_SWITCH_IN 0x0
#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0)))
#define BS_GET_TARGET 0
#define BS_GET_ATTACKER 1
#define BS_GET_EFFECT_BANK 2
#define BS_GET_SCRIPTING_BANK 10
#define BS_GET_PLAYER1 11
#define BS_GET_OPPONENT1 12
#define BS_GET_PLAYER2 13
#define BS_GET_OPPONENT2 14
u8 GetBattleBank(u8 caseId);
void PressurePPLose(u8 bankDef, u8 bankAtk, u16 move);
void PressurePPLoseOnUsingPerishSong(u8 bankAtk);
void PressurePPLoseOnUsingImprision(u8 bankAtk);
void MarkAllBufferBanksForExecution(void); // unused
void MarkBufferBankForExecution(u8 bank);
void sub_803F850(u8 arg0);
void CancelMultiTurnMoves(u8 bank);
bool8 WasUnableToUseMove(u8 bank);
void PrepareStringBattle(u16 stringId, u8 bank);
void ResetSentPokesToOpponentValue(void);
void sub_803F9EC(u8 bank);
void sub_803FA70(u8 bank);
void BattleScriptPush(const u8* bsPtr);
void BattleScriptPushCursor(void);
void BattleScriptPop(void);
u8 TrySetCantSelectMoveBattleScript(void);
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 TryClearRageStatuses(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 ClearFuryCutterDestinyBondGrudge(u8 bank);
void HandleAction_RunBattleScript(void);
u8 GetMoveTarget(u16 move, u8 useMoveTarget);
u8 IsPokeDisobedient(void);
#endif // GUARD_BATTLE_UTIL_H

10
include/evolution_scene.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef GUARD_EVOLUTION_SCENE_H
#define GUARD_EVOLUTION_SCENE_H
void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
void BeginEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID);
extern void (*gCB2_AfterEvolution)(void);
#endif // GUARD_EVOLUTION_SCENE_H

View File

@ -84,6 +84,8 @@
#define SYS_CTRL_OBJ_DELETE CODE_FLAGS + 0x61
#define SYS_RESET_RTC_ENABLE CODE_FLAGS + 0x62
#define SYS_FRONTIER_PASS CODE_FLAGS + 0x72
#define SYS_STORAGE_UNKNOWN_FLAG CODE_FLAGS + 0x77
#define SYS_MYSTERY_GIFT_ENABLE CODE_FLAGS + 0x7B

View File

@ -1,9 +1,12 @@
#ifndef GUARD_GLOBAL_BERRY_H
#define GUARD_GLOBAL_BERRY_H
#define BERRY_NAME_COUNT 7
#define BERRY_ITEM_EFFECT_COUNT 18
struct Berry
{
const u8 name[7];
const u8 name[BERRY_NAME_COUNT];
u8 firmness;
u16 size;
u8 maxYield;
@ -23,7 +26,7 @@ struct Berry
struct Berry2
{
u8 name[7];
u8 name[BERRY_NAME_COUNT];
u8 firmness;
u16 size;
u8 maxYield;
@ -42,7 +45,7 @@ struct Berry2
struct EnigmaBerry
{
struct Berry2 berry;
u8 itemEffect[18];
u8 itemEffect[BERRY_ITEM_EFFECT_COUNT];
u8 holdEffect;
u8 holdEffectParam;
u32 checksum;
@ -50,9 +53,9 @@ struct EnigmaBerry
struct BattleEnigmaBerry
{
/*0x00*/ u8 name[7];
/*0x00*/ u8 name[BERRY_NAME_COUNT];
/*0x07*/ u8 holdEffect;
/*0x08*/ u8 itemEffect[18];
/*0x08*/ u8 itemEffect[BERRY_ITEM_EFFECT_COUNT];
/*0x1A*/ u8 holdEffectParam;
};

View File

@ -198,8 +198,13 @@ struct SaveBlock2
// All below could be a one giant struct
/*0x64C*/ u8 field_64C[1629];
/*0xCA9*/ u8 frontierChosenLvl : 2;
/*0xCA9*/ u8 field_CA9_a : 6;
/*0xCA9*/ u8 frontierChosenLvl : 2; // 0x1, 0x2 -> 0x3
/*0xCA9*/ u8 field_CA9_a : 1; // 0x4
/*0xCA9*/ u8 field_CA9_b : 1; // 0x8
/*0xCA9*/ u8 field_CA9_c : 1; // 0x10
/*0xCA9*/ u8 field_CA9_d : 1; // 0x20
/*0xCA9*/ u8 field_CA9_e : 1; // 0x40
/*0xCA9*/ u8 field_CA9_f : 1; // 0x80
/*0xCAA*/ u8 field_CAA[368];
/*0xE1A*/ u16 battlePyramidFloor; // possibly?
/*0xE1C*/ u8 field_E1C[16];

View File

@ -143,7 +143,6 @@ extern u16 word_3002910[];
extern bool8 gReceivedRemoteLinkPlayers;
void Task_DestroySelf(u8);
void sub_8007270(u8);
void OpenLink(void);
void CloseLink(void);
u16 LinkMain2(u16 *);
@ -162,24 +161,12 @@ void sub_8007E4C(void);
u8 GetMultiplayerId(void);
u8 bitmask_all_link_players_but_self(void);
bool8 SendBlock(u8, void *, u16);
bool8 sub_8007E9C(u8);
bool8 sub_8007ECC(void);
u8 GetBlockReceivedStatus(void);
void ResetBlockReceivedFlags(void);
void ResetBlockReceivedFlag(u8);
void sub_8007F4C(void);
void SetLinkDebugValues(u32, u32);
u8 sub_8008198(void);
void sub_80081C8(u8);
u8 sub_800820C(void);
u8 sub_8008218(void);
void sub_800826C(void);
void sub_80082EC(void);
u8 GetLinkPlayerCount_2(void);
bool8 IsLinkMaster(void);
void sub_800832C(void);
void sub_8008480(void);
void sub_80084A4(void);
void CB2_LinkError(void);
u8 GetSioMultiSI(void);
bool8 IsLinkConnectionEstablished(void);
@ -191,4 +178,11 @@ void LinkVSync(void);
void Timer3Intr(void);
void SerialCB(void);
void sub_800E0E8(void);
bool8 sub_800A520(void);
bool8 sub_8010500(void);
void sub_800DFB4(u8, u8);
void sub_800ADF8(void);
u8 sub_8009FCC(void);
#endif // GUARD_LINK_H

View File

@ -19,5 +19,6 @@ void LoadSerializedGame(void);
void LoadPlayerBag(void);
void SavePlayerBag(void);
void SetSaveBlocksPointers(u16);
void MoveSaveBlocks_ResetHeap(void);
#endif // GUARD_LOAD_SAVE_H

View File

@ -39,6 +39,7 @@ struct Main
/*0x439*/ u8 oamLoadDisabled:1;
/*0x439*/ u8 inBattle:1;
/*0x439*/ u8 field_439_x4:1;
};
extern u8 gUnknown_3001764;

View File

@ -439,7 +439,7 @@ struct BattleMove
u8 pp;
u8 secondaryEffectChance;
u8 target;
u8 priority;
s8 priority;
u8 flags;
};
@ -632,9 +632,21 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality);
s32 sub_806D864(u16 a1);
bool16 sub_806D82C(u8 id);
u16 MonTryLearningNewMove(struct Pokemon* mon, bool8);
void sub_8068AA4(void); // sets stats for deoxys
bool8 HasTwoFramesAnimation(u16 species);
u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem);
void RandomlyGivePartyPokerus(struct Pokemon *party);
u8 CheckPartyPokerus(struct Pokemon *party, u8 selection);
u8 CheckPartyHasHadPokerus(struct Pokemon *party, u8 selection);
void UpdatePartyPokerusTime(u16 days);
void PartySpreadPokerus(struct Pokemon *party);
s8 GetMonFlavourRelation(struct Pokemon *mon, u8 a2);
s8 GetFlavourRelationByPersonality(u32 personality, u8 a2);
#include "sprite.h"
void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3);
void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3);
void BattleAnimateBackSprite(struct Sprite* sprite, u16 species);
#endif // GUARD_POKEMON_H

View File

@ -1,6 +1,19 @@
#ifndef GUARD_RECORDED_BATTLE_H
#define GUARD_RECORDED_BATTLE_H
extern u32 gRecordedBattleRngSeed;
void sub_8185F84(void);
void sub_8184E58(void);
void RecordedBattle_SetBankAction(u8 bank, u8 action);
void RecordedBattle_ClearBankAction(u8 bank, u8 bytesToClear);
void sub_8185F90(u16 arg0);
bool8 sub_8186450(void);
u8 sub_8185FAC(void);
u8 sub_8185FB8(void);
u8 MoveRecordedBattleToSaveData(void);
void sub_818603C(u8);
void sub_8185FD0(void);
void sub_8186444(void);
#endif // GUARD_RECORDED_BATTLE_H

View File

@ -252,23 +252,23 @@ enum
SE_W114,
SE_W063B,
BGM_STOP = 349,
BGM_TETSUJI,
BGM_FIELD13,
BGM_KACHI22,
BGM_KACHI2,
BGM_KACHI3,
BGM_KACHI5,
BGM_PCC,
BGM_NIBI,
BGM_SUIKUN,
BGM_DOORO1,
BGM_DOORO_X1,
BGM_DOORO_X3,
BGM_MACHI_S2,
BGM_MACHI_S4,
BGM_GIM,
BGM_NAMINORI,
BGM_DAN01,
/*0x15E*/ BGM_TETSUJI,
/*0x15F*/ BGM_FIELD13,
/*0x160*/ BGM_KACHI22,
/*0x161*/ BGM_KACHI2,
/*0x162*/ BGM_KACHI3,
/*0x163*/ BGM_KACHI5,
/*0x164*/ BGM_PCC,
/*0x165*/ BGM_NIBI,
/*0x166*/ BGM_SUIKUN,
/*0x167*/ BGM_DOORO1,
/*0x168*/ BGM_DOORO_X1,
/*0x169*/ BGM_DOORO_X3,
/*0x16A*/ BGM_MACHI_S2,
/*0x16B*/ BGM_MACHI_S4,
/*0x16C*/ BGM_GIM,
/*0x16D*/ BGM_NAMINORI,
/*0x16E*/ BGM_DAN01,
/*0x16F*/ BGM_FANFA1,
/*0x170*/ BGM_ME_ASA,
/*0x171*/ BGM_ME_BACHI,
@ -306,31 +306,31 @@ enum
/*0x191*/ BGM_NEXTROAD,
/*0x192*/ BGM_GRANROAD,
/*0x193*/ BGM_CYCLING,
BGM_FRIENDLY,
BGM_MISHIRO,
BGM_TOZAN,
BGM_GIRLEYE,
BGM_MINAMO,
BGM_ASHROAD,
BGM_EVENT0,
BGM_DEEPDEEP,
BGM_KACHI1,
BGM_TITLE3,
BGM_DEMO1,
BGM_GIRL_SUP,
BGM_HAGESHII,
BGM_KAKKOII,
BGM_KAZANBAI,
BGM_AQA_0,
BGM_TSURETEK,
BGM_BOY_SUP,
BGM_RAINBOW,
BGM_AYASII,
BGM_KACHI4,
BGM_ROPEWAY,
BGM_CASINO,
BGM_HIGHTOWN,
BGM_SAFARI,
/*0x194*/ BGM_FRIENDLY,
/*0x195*/ BGM_MISHIRO,
/*0x196*/ BGM_TOZAN,
/*0x197*/ BGM_GIRLEYE,
/*0x198*/ BGM_MINAMO,
/*0x199*/ BGM_ASHROAD,
/*0x19A*/ BGM_EVENT0,
/*0x19B*/ BGM_DEEPDEEP,
/*0x19C*/ BGM_KACHI1,
/*0x19D*/ BGM_TITLE3,
/*0x19E*/ BGM_DEMO1,
/*0x19F*/ BGM_GIRL_SUP,
/*0x1A0*/ BGM_HAGESHII,
/*0x1A1*/ BGM_KAKKOII,
/*0x1A2*/ BGM_KAZANBAI,
/*0x1A3*/ BGM_AQA_0,
/*0x1A4*/ BGM_TSURETEK,
/*0x1A5*/ BGM_BOY_SUP,
/*0x1A6*/ BGM_RAINBOW,
/*0x1A7*/ BGM_AYASII,
/*0x1A8*/ BGM_KACHI4,
/*0x1A9*/ BGM_ROPEWAY,
/*0x1AA*/ BGM_CASINO,
/*0x1AB*/ BGM_HIGHTOWN,
/*0x1AC*/ BGM_SAFARI,
BGM_C_ROAD,
BGM_AJITO,
BGM_M_BOAT,

View File

@ -212,14 +212,14 @@ struct Sprite
u16 flags_5:1; //0x20
u16 flags_6:1; //0x40
u16 flags_7:1; //0x80
/*0x3F*/ u16 hFlip:1;
u16 vFlip:1;
u16 animBeginning:1;
u16 affineAnimBeginning:1;
u16 animEnded:1;
u16 affineAnimEnded:1;
u16 usingSheet:1;
u16 flags_f:1;
/*0x3F*/ u16 hFlip:1; //1
u16 vFlip:1; //2
u16 animBeginning:1; //4
u16 affineAnimBeginning:1; //8
u16 animEnded:1; //0x10
u16 affineAnimEnded:1; //0x20
u16 usingSheet:1; //0x40
u16 flags_f:1; //0x80
/*0x40*/ u16 sheetTileStart;

View File

@ -2,10 +2,21 @@
#define GUARD_unknown_task_H
// Exported type declarations
struct UnknownTaskStruct
{
volatile void *dest;
u32 control;
u8 unk8;
u8 unk9;
};
extern struct UnknownTaskStruct gUnknown_0831AC70;
// Exported RAM declarations
// Exported ROM declarations
void remove_some_task(void);
void sub_80BA038(struct UnknownTaskStruct arg0);
void sub_80BA0A8(void);
#endif //GUARD_unknown_task_H
#endif // GUARD_unknown_task_H

View File

@ -57,8 +57,8 @@ SECTIONS {
asm/rom3.o(.text);
src/decompress.o(.text);
asm/battle_1.o(.text);
asm/battle_2.o(.text);
src/battle_3.o(.text);
src/battle_2.o(.text);
src/battle_util.o(.text);
src/battle_script_commands.o(.text);
asm/battle_5.o(.text);
asm/battle_controller_player.o(.text);
@ -222,7 +222,7 @@ SECTIONS {
asm/berry_tag_screen.o(.text);
asm/mystery_event_menu.o(.text);
src/save_failed_screen.o(.text);
asm/braille_puzzles.o(.text);
src/braille_puzzles.o(.text);
asm/pokeblock_feed.o(.text);
asm/clear_save_data_screen.o(.text);
asm/intro_credits_graphics.o(.text);
@ -325,6 +325,8 @@ SECTIONS {
data/link.o(.rodata);
src/rtc.o(.rodata);
data/data2b.o(.rodata);
src/battle_2.o(.rodata);
src/battle_util.o(.rodata);
src/battle_script_commands.o(.rodata);
data/battle_controller_player.o(.rodata);
data/smokescreen.o(.rodata);

5653
src/battle_2.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -73,7 +73,7 @@ extern const struct BaseStats gBaseStats[];
extern const u32 gBitTable[];
extern u8 * const gBattleAI_ScriptsTable[];
extern u8 b_first_side(u8, u8, u8);
extern u8 GetWhoStrikesFirst(u8, u8, u8);
extern void AI_CalcDmg(u8, u8);
extern u8 CheckMoveLimitations();
@ -1756,7 +1756,7 @@ static void BattleAICmd_if_arg_not_equal(void)
static void BattleAICmd_if_would_go_first(void)
{
if (b_first_side(sBank_AI, gBankTarget, 1) == gAIScriptPtr[1])
if (GetWhoStrikesFirst(sBank_AI, gBankTarget, 1) == gAIScriptPtr[1])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
else
gAIScriptPtr += 6;
@ -1764,7 +1764,7 @@ static void BattleAICmd_if_would_go_first(void)
static void BattleAICmd_if_would_not_go_first(void)
{
if (b_first_side(sBank_AI, gBankTarget, 1) != gAIScriptPtr[1])
if (GetWhoStrikesFirst(sBank_AI, gBankTarget, 1) != gAIScriptPtr[1])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
else
gAIScriptPtr += 6;

View File

@ -47,8 +47,8 @@ extern u8 gActiveBank;
extern u32 gBattleExecBuffer;
extern u8 gNoOfAllBanks;
extern u16 gBattlePartyID[BATTLE_BANKS_COUNT];
extern u8 gTurnOrder[BATTLE_BANKS_COUNT];
extern u8 gUnknown_0202407A[BATTLE_BANKS_COUNT];
extern u8 gBanksByTurnOrder[BATTLE_BANKS_COUNT];
extern u8 gActionsByTurnOrder[BATTLE_BANKS_COUNT];
extern u16 gCurrentMove;
extern u8 gLastUsedAbility;
extern u16 gBattleWeather;
@ -67,7 +67,7 @@ extern u8 gBankAttacker;
extern u8 gBankTarget;
extern const u8* gBattlescriptCurrInstr;
extern u8 gCurrMovePos;
extern u8 gFightStateTracker;
extern u8 gCurrentActionFuncId;
extern u32 gHitMarker;
extern u8 gBattleMoveFlags;
extern u8 gBattleCommunication[];
@ -92,7 +92,7 @@ extern u16 gMoveToLearn;
extern u16 gRandomMove;
extern u8 gBankInMenu;
extern u8 gActionForBanks[BATTLE_BANKS_COUNT];
extern u8 gCurrentMoveTurn;
extern u8 gCurrentTurnActionNumber;
extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200];
extern u16 gLockedMoves[BATTLE_BANKS_COUNT];
extern u16 gPartnerTrainerId;
@ -145,8 +145,7 @@ extern u16 GetBattlePyramidPickupItemId(void);
extern u8 sav1_map_get_light_level(void);
extern u8 sub_813B21C(void);
extern u16 get_unknown_box_id(void);
extern void c2_berry_program_update_menu(void);
extern void sub_8035AA4(void);
extern void sub_80356D0(void);
// BattleScripts
extern const u8 BattleScript_MoveEnd[];
@ -332,7 +331,7 @@ static void atk40_jump_if_move_affected_by_protect(void);
static void atk41_call(void);
static void atk42_jumpiftype2(void);
static void atk43_jumpifabilitypresent(void);
static void atk44(void);
static void atk44_end_selection_script(void);
static void atk45_playanimation(void);
static void atk46_playanimation2(void);
static void atk47_setgraphicalstatchangevalues(void);
@ -361,7 +360,7 @@ static void atk5D_getmoneyreward(void);
static void atk5E_8025A70(void);
static void atk5F_8025B24(void);
static void atk60_increment_gamestat(void);
static void atk61_8025BA4(void);
static void atk61_draw_party_status_summary(void);
static void atk62_08025C6C(void);
static void atk63_jumptorandomattack(void);
static void atk64_statusanimation(void);
@ -378,7 +377,7 @@ static void atk6E_set_atk_to_player0(void);
static void atk6F_set_visible(void);
static void atk70_record_last_used_ability(void);
static void atk71_buffer_move_to_learn(void);
static void atk72_jump_if_can_run_frombattle(void);
static void atk72_jump_if_run_attempt_success(void);
static void atk73_hp_thresholds(void);
static void atk74_hp_thresholds2(void);
static void atk75_item_effect_on_opponent(void);
@ -510,8 +509,8 @@ static void atkF2_display_dex_info(void);
static void atkF3_nickname_caught_poke(void);
static void atkF4_subattackerhpbydmg(void);
static void atkF5_removeattackerstatus1(void);
static void atkF6_802BF48(void);
static void atkF7_802BF54(void);
static void atkF6_action_finished(void);
static void atkF7_turn_finished(void);
static void atkF8_trainer_slide_back(void);
void (* const gBattleScriptingCommandsTable[])(void) =
@ -584,7 +583,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atk41_call,
atk42_jumpiftype2,
atk43_jumpifabilitypresent,
atk44,
atk44_end_selection_script,
atk45_playanimation,
atk46_playanimation2,
atk47_setgraphicalstatchangevalues,
@ -613,7 +612,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atk5E_8025A70,
atk5F_8025B24,
atk60_increment_gamestat,
atk61_8025BA4,
atk61_draw_party_status_summary,
atk62_08025C6C,
atk63_jumptorandomattack,
atk64_statusanimation,
@ -630,7 +629,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atk6F_set_visible,
atk70_record_last_used_ability,
atk71_buffer_move_to_learn,
atk72_jump_if_can_run_frombattle,
atk72_jump_if_run_attempt_success,
atk73_hp_thresholds,
atk74_hp_thresholds2,
atk75_item_effect_on_opponent,
@ -762,8 +761,8 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atkF3_nickname_caught_poke,
atkF4_subattackerhpbydmg,
atkF5_removeattackerstatus1,
atkF6_802BF48,
atkF7_802BF54,
atkF6_action_finished,
atkF7_turn_finished,
atkF8_trainer_slide_back
};
@ -1098,9 +1097,9 @@ static void atk00_attackcanceler(void)
{
s32 i;
if (gBattleOutcome)
if (gBattleOutcome != 0)
{
gFightStateTracker = 0xC;
gCurrentActionFuncId = ACTION_FINISHED;
return;
}
if (gBattleMons[gBankAttacker].hp == 0 && !(gHitMarker & HITMARKER_NO_ATTACKSTRING))
@ -1152,11 +1151,11 @@ static void atk00_attackcanceler(void)
for (i = 0; i < gNoOfAllBanks; i++)
{
if ((gProtectStructs[gTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & FLAG_SNATCH_AFFECTED)
if ((gProtectStructs[gBanksByTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & FLAG_SNATCH_AFFECTED)
{
PressurePPLose(gBankAttacker, gTurnOrder[i], MOVE_SNATCH);
gProtectStructs[gTurnOrder[i]].stealMove = 0;
gBattleScripting.bank = gTurnOrder[i];
PressurePPLose(gBankAttacker, gBanksByTurnOrder[i], MOVE_SNATCH);
gProtectStructs[gBanksByTurnOrder[i]].stealMove = 0;
gBattleScripting.bank = gBanksByTurnOrder[i];
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_SnatchedMove;
return;
@ -1601,7 +1600,7 @@ static void atk06_typecalc(void)
RecordAbilityBattle(gBankTarget, gLastUsedAbility);
}
if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED)
gProtectStructs[gBankAttacker].notEffective = 1;
gProtectStructs[gBankAttacker].targetNotAffected = 1;
gBattlescriptCurrInstr++;
}
@ -1640,14 +1639,14 @@ static void CheckWonderGuardAndLevitate(void)
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 0)
{
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
gProtectStructs[gBankAttacker].notEffective = 1;
gProtectStructs[gBankAttacker].targetNotAffected = 1;
}
if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 &&
gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 &&
gTypeEffectiveness[i + 2] == TYPE_MUL_NO_EFFECT)
{
gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED;
gProtectStructs[gBankAttacker].notEffective = 1;
gProtectStructs[gBankAttacker].targetNotAffected = 1;
}
// check super effective
@ -2379,7 +2378,7 @@ u8 BankGetTurnOrder(u8 bank)
s32 i;
for (i = 0; i < gNoOfAllBanks; i++)
{
if (gTurnOrder[i] == bank)
if (gBanksByTurnOrder[i] == bank)
break;
}
return i;
@ -2737,7 +2736,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
}
else
{
if (BankGetTurnOrder(gEffectBank) > gCurrentMoveTurn)
if (BankGetTurnOrder(gEffectBank) > gCurrentTurnActionNumber)
gBattleMons[gEffectBank].status2 |= sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]];
gBattlescriptCurrInstr++;
}
@ -3209,7 +3208,7 @@ static void atk19_faint_pokemon(void)
&& gBattleMons[gBankAttacker].hp != 0
&& gCurrentMove != MOVE_STRUGGLE)
{
u8 moveIndex = *(gBattleStruct->chosenMovesIds + gBankAttacker);
u8 moveIndex = *(gBattleStruct->chosenMovePositions + gBankAttacker);
gBattleMons[gBankAttacker].pp[moveIndex] = 0;
BattleScriptPush(gBattlescriptCurrInstr);
@ -3252,7 +3251,7 @@ static void atk1B_faint_effects_clear(void)
MarkBufferBankForExecution(gActiveBank);
}
UndoEffectsAfterFainting(); // Effects like attractions, trapping, etc.
FaintClearSetData(); // Effects like attractions, trapping, etc.
gBattlescriptCurrInstr += 2;
}
}
@ -4422,13 +4421,13 @@ static void atk3D_end(void)
gBattleMoveFlags = 0;
gActiveBank = 0;
gFightStateTracker = 0xB;
gCurrentActionFuncId = 0xB;
}
static void atk3E_end2(void)
{
gActiveBank = 0;
gFightStateTracker = 0xB;
gCurrentActionFuncId = 0xB;
}
static void atk3F_end3(void) // pops the main function stack
@ -4463,9 +4462,9 @@ static void atk43_jumpifabilitypresent(void)
gBattlescriptCurrInstr += 6;
}
static void atk44(void)
static void atk44_end_selection_script(void)
{
*(gBankAttacker + gBattleStruct->field_54) = 1;
*(gBankAttacker + gBattleStruct->selectionScriptFinished) = TRUE;
}
static void atk45_playanimation(void)
@ -5067,7 +5066,7 @@ static void atk49_moveend(void)
case 9: // make attacker sprite visible
if (gBattleMoveFlags & MOVESTATUS_NOEFFECT
|| !(gStatuses3[gBankAttacker] & (STATUS3_SEMI_INVULNERABLE))
|| HasMoveFailed(gBankAttacker))
|| WasUnableToUseMove(gBankAttacker))
{
gActiveBank = gBankAttacker;
EmitSpriteInvisibility(0, FALSE);
@ -5298,7 +5297,7 @@ static void atk4A_typecalc2(void)
RecordAbilityBattle(gBankTarget, gLastUsedAbility);
}
if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED)
gProtectStructs[gBankAttacker].notEffective = 1;
gProtectStructs[gBankAttacker].targetNotAffected = 1;
gBattlescriptCurrInstr++;
}
@ -5367,7 +5366,7 @@ static void atk4D_switch_data_update(void)
gBattleMons[gActiveBank].status2 = oldData.status2;
}
SwitchInClearStructs();
SwitchInClearSetData();
if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gBattleMons[gActiveBank].maxHP / 2 >= gBattleMons[gActiveBank].hp
&& gBattleMons[gActiveBank].hp != 0 && !(gBattleMons[gActiveBank].status1 & STATUS_SLEEP))
@ -5904,15 +5903,15 @@ static void atk51_switch_handle_order(void)
gBattleCommunication[0] = gBattleBufferB[gActiveBank][1];
*(gBattleStruct->field_5C + gActiveBank) = gBattleBufferB[gActiveBank][1];
if ((gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK)) == (BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK))
if (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
*(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) &= 0xF;
*(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0);
*(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 1) = gBattleBufferB[gActiveBank][3];
*((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0);
*((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4;
*((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBank][3];
*((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0);
*((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4;
*((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBank][3];
}
else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER)
{
@ -5984,8 +5983,8 @@ static void atk52_switch_in_effects(void)
for (i = 0; i < gNoOfAllBanks; i++)
{
if (gTurnOrder[i] == gActiveBank)
gUnknown_0202407A[i] = 0xC;
if (gBanksByTurnOrder[i] == gActiveBank)
gActionsByTurnOrder[i] = ACTION_CANCEL_PARTNER;
}
for (i = 0; i < gNoOfAllBanks; i++)
@ -6412,7 +6411,7 @@ static void atk60_increment_gamestat(void)
gBattlescriptCurrInstr += 2;
}
static void atk61_8025BA4(void)
static void atk61_draw_party_status_summary(void)
{
s32 i;
struct Pokemon* party;
@ -6443,7 +6442,7 @@ static void atk61_8025BA4(void)
}
}
EmitCmd48(0, hpStatuses, 1);
EmitDrawPartyStatusSummary(0, hpStatuses, 1);
MarkBufferBankForExecution(gActiveBank);
gBattlescriptCurrInstr += 2;
@ -6570,7 +6569,7 @@ static void atk68_80246A0(void)
s32 i;
for (i = 0; i < gNoOfAllBanks; i++)
gUnknown_0202407A[i] = 0xC;
gActionsByTurnOrder[i] = ACTION_CANCEL_PARTNER;
gBattlescriptCurrInstr++;
}
@ -6957,9 +6956,9 @@ static void atk71_buffer_move_to_learn(void)
gBattlescriptCurrInstr++;
}
static void atk72_jump_if_can_run_frombattle(void)
static void atk72_jump_if_run_attempt_success(void)
{
if (CanRunFromBattle(gBank1))
if (TryRunFromBattle(gBank1))
gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1);
else
gBattlescriptCurrInstr += 5;
@ -7046,7 +7045,7 @@ static void atk76_various(void)
else
gBankTarget = gActiveBank;
break;
case 2:
case VARIOUS_CAN_RUN_FROM_BATTLE:
gBattleCommunication[0] = IsRunningFromBattleImpossible();
break;
case VARIOUS_GET_MOVE_TARGET:
@ -7197,7 +7196,7 @@ static void atk76_various(void)
gBattleOutcome = BATTLE_OPPONENT_TELEPORTED;
break;
case VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC:
EmitPlaySound(0, 0x19C, 1);
EmitPlaySound(0, BGM_KACHI1, 1);
MarkBufferBankForExecution(gActiveBank);
break;
}
@ -7213,7 +7212,7 @@ static void atk77_set_protect_like(void) // protect and endure
if (lastMove != MOVE_PROTECT && lastMove != MOVE_DETECT && lastMove != MOVE_ENDURE)
gDisableStructs[gBankAttacker].protectUses = 0;
if (gCurrentMoveTurn == (gNoOfAllBanks - 1))
if (gCurrentTurnActionNumber == (gNoOfAllBanks - 1))
notLastTurn = FALSE;
if (sProtectSuccessRates[gDisableStructs[gBankAttacker].protectUses] >= Random() && notLastTurn)
@ -9519,19 +9518,19 @@ static void atkB3_rolloutdamagecalculation(void)
if (!(gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS)) // first hit
{
gDisableStructs[gBankAttacker].rolloutTimer1 = 5;
gDisableStructs[gBankAttacker].rolloutTimer2 = 5;
gDisableStructs[gBankAttacker].rolloutCounter1 = 5;
gDisableStructs[gBankAttacker].rolloutCounter2 = 5;
gBattleMons[gBankAttacker].status2 |= STATUS2_MULTIPLETURNS;
gLockedMoves[gBankAttacker] = gCurrentMove;
}
if (--gDisableStructs[gBankAttacker].rolloutTimer1 == 0) // last hit
if (--gDisableStructs[gBankAttacker].rolloutCounter1 == 0) // last hit
{
gBattleMons[gBankAttacker].status2 &= ~(STATUS2_MULTIPLETURNS);
}
gDynamicBasePower = gBattleMoves[gCurrentMove].power;
for (i = 1; i < (5 - gDisableStructs[gBankAttacker].rolloutTimer1); i++)
for (i = 1; i < (5 - gDisableStructs[gBankAttacker].rolloutCounter1); i++)
gDynamicBasePower *= 2;
if (gBattleMons[gBankAttacker].status2 & STATUS2_DEFENSE_CURL)
@ -9711,12 +9710,12 @@ static void atkBA_jumpifnopursuitswitchdmg(void)
for (i = 0; i < gNoOfAllBanks; i++)
{
if (gTurnOrder[i] == gBankTarget)
gUnknown_0202407A[i] = 11;
if (gBanksByTurnOrder[i] == gBankTarget)
gActionsByTurnOrder[i] = 11;
}
gCurrentMove = MOVE_PURSUIT;
gCurrMovePos = gUnknown_020241E9 = *(gBattleStruct->chosenMovesIds + gBankTarget);
gCurrMovePos = gUnknown_020241E9 = *(gBattleStruct->chosenMovePositions + gBankTarget);
gBattlescriptCurrInstr += 5;
gBattleScripting.animTurn = 1;
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
@ -10632,7 +10631,7 @@ static void atkDF_setmagiccoat(void)
{
gBankTarget = gBankAttacker;
gSpecialStatuses[gBankAttacker].flag20 = 1;
if (gCurrentMoveTurn == gNoOfAllBanks - 1) // moves last turn
if (gCurrentTurnActionNumber == gNoOfAllBanks - 1) // moves last turn
{
gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1);
}
@ -10646,7 +10645,7 @@ static void atkDF_setmagiccoat(void)
static void atkE0_setstealstatchange(void) // snatch
{
gSpecialStatuses[gBankAttacker].flag20 = 1;
if (gCurrentMoveTurn == gNoOfAllBanks - 1) // moves last turn
if (gCurrentTurnActionNumber == gNoOfAllBanks - 1) // moves last turn
{
gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1);
}
@ -10943,7 +10942,7 @@ static void atkEC_pursuit_sth(void)
&& gActionForBanks[gActiveBank] == 0
&& gChosenMovesByBanks[gActiveBank] == MOVE_PURSUIT)
{
gUnknown_0202407A[gActiveBank] = 11;
gActionsByTurnOrder[gActiveBank] = 11;
gCurrentMove = MOVE_PURSUIT;
gBattlescriptCurrInstr += 5;
gBattleScripting.animTurn = 1;
@ -11217,8 +11216,8 @@ static void atkF2_display_dex_info(void)
}
break;
case 3:
c2_berry_program_update_menu();
sub_8035AA4();
sub_80356D0();
LoadBattleTextboxAndBackground();
gBattle_BG3_X = 0x100;
gBattleCommunication[0]++;
break;
@ -11394,15 +11393,15 @@ static void atkF5_removeattackerstatus1(void)
gBattlescriptCurrInstr++;
}
static void atkF6_802BF48(void)
static void atkF6_action_finished(void)
{
gFightStateTracker = 0xC;
gCurrentActionFuncId = ACTION_FINISHED;
}
static void atkF7_802BF54(void)
static void atkF7_turn_finished(void)
{
gFightStateTracker = 0xC;
gCurrentMoveTurn = gNoOfAllBanks;
gCurrentActionFuncId = ACTION_FINISHED;
gCurrentTurnActionNumber = gNoOfAllBanks;
}
static void atkF8_trainer_slide_back(void)

View File

@ -17,9 +17,10 @@
#include "battle_controllers.h"
#include "event_data.h"
#include "calculate_base_damage.h"
#include "link.h"
extern const u8* gBattlescriptCurrInstr;
extern const u8* gUnknown_02024220[BATTLE_BANKS_COUNT];
extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT];
extern const u8* gUnknown_02024230[BATTLE_BANKS_COUNT];
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
extern u8 gActiveBank;
@ -32,8 +33,8 @@ extern u8 gBankAttacker;
extern u8 gBankTarget;
extern u8 gAbsentBankFlags;
extern u16 gBattleWeather;
extern u8 gTurnOrder[BATTLE_BANKS_COUNT];
extern u16 gSideAffecting[];
extern u8 gBanksByTurnOrder[BATTLE_BANKS_COUNT];
extern u16 gSideAffecting[2];
extern u8 gBattleCommunication[];
extern void (*gBattleMainFunc)(void);
extern s32 gBattleMoveDamage;
@ -45,16 +46,17 @@ extern u32 gHitMarker;
extern u8 gEffectBank;
extern u16 gBattlePartyID[BATTLE_BANKS_COUNT];
extern u8 gBank1;
extern u16 gChosenMovesByBanks[];
extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT];
extern u8 gBattleMoveFlags;
extern s32 gTakenDmg[BATTLE_BANKS_COUNT];
extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT];
extern u8 gLastUsedAbility;
extern u8 gFightStateTracker;
extern u8 gCurrentActionFuncId;
extern u32 gBattleExecBuffer;
extern u16 gRandomMove;
extern u8 gCurrMovePos;
extern u8 gUnknown_020241E9;
extern u8 gSentPokesToOpponent[2];
extern const struct BattleMove gBattleMoves[];
@ -169,24 +171,278 @@ extern const u8 gUnknown_082DB6A5[]; //disobedient, uses a random move
extern const u8 gUnknown_082DB6D9[]; //disobedient, went to sleep
extern const u8 gUnknown_082DB6F0[]; //disobedient, hits itself
extern const u8 gStatusConditionString_PoisonJpn[];
extern const u8 gStatusConditionString_SleepJpn[];
extern const u8 gStatusConditionString_ParalysisJpn[];
extern const u8 gStatusConditionString_BurnJpn[];
extern const u8 gStatusConditionString_IceJpn[];
extern const u8 gStatusConditionString_ConfusionJpn[];
extern const u8 gStatusConditionString_LoveJpn[];
extern const u16 gSoundMovesTable[];
extern u8 b_first_side(u8, u8, u8);
extern void sub_803CEDC(u8, u8);
extern void BattleTurnPassed(void);
extern void sub_803F9EC();
extern bool8 sub_80423F4(u8 bank, u8, u8);
extern u8 weather_get_current(void);
extern void sub_803E08C(void);
extern void bc_move_exec_returning(void);
extern s8 GetFlavourRelationByPersonality(u32 personality, u8 flavor);
// rom const data
static const u16 sSoundMovesTable[] =
{
MOVE_GROWL, MOVE_ROAR, MOVE_SING, MOVE_SUPERSONIC, MOVE_SCREECH, MOVE_SNORE,
MOVE_UPROAR, MOVE_METAL_SOUND, MOVE_GRASS_WHISTLE, MOVE_HYPER_VOICE, 0xFFFF
};
u8 GetBattleBank(u8 caseId)
{
u8 ret = 0;
switch (caseId)
{
case BS_GET_TARGET:
ret = gBankTarget;
break;
case BS_GET_ATTACKER:
ret = gBankAttacker;
break;
case BS_GET_EFFECT_BANK:
ret = gEffectBank;
break;
case 7:
ret = 0;
break;
case BS_GET_SCRIPTING_BANK:
ret = gBattleScripting.bank;
break;
case 3:
ret = gBank1;
break;
case 5:
ret = gBank1;
break;
case 4:
case 6:
case 8:
case 9:
case BS_GET_PLAYER1:
ret = GetBankByIdentity(IDENTITY_PLAYER_MON1);
break;
case BS_GET_OPPONENT1:
ret = GetBankByIdentity(IDENTITY_OPPONENT_MON1);
break;
case BS_GET_PLAYER2:
ret = GetBankByIdentity(IDENTITY_PLAYER_MON2);
break;
case BS_GET_OPPONENT2:
ret = GetBankByIdentity(IDENTITY_OPPONENT_MON2);
break;
}
return ret;
}
void PressurePPLose(u8 bankDef, u8 bankAtk, u16 move)
{
s32 i;
if (gBattleMons[bankDef].ability != ABILITY_PRESSURE)
return;
for (i = 0; i < 4; i++)
{
if (gBattleMons[bankAtk].moves[i] == move)
break;
}
if (i == 4) // mons don't share any moves
return;
if (gBattleMons[bankAtk].pp[i] != 0)
gBattleMons[bankAtk].pp[i]--;
if (!(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED)
&& !(gDisableStructs[bankAtk].unk18_b & gBitTable[i]))
{
gActiveBank = bankAtk;
EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + i, 0, 1, &gBattleMons[gActiveBank].pp[i]);
MarkBufferBankForExecution(gActiveBank);
}
}
void PressurePPLoseOnUsingImprision(u8 bankAtk)
{
s32 i, j;
s32 imprisionPos = 4;
u8 atkSide = GetBankSide(bankAtk);
for (i = 0; i < gNoOfAllBanks; i++)
{
if (atkSide != GetBankSide(i) && gBattleMons[i].ability == ABILITY_PRESSURE)
{
for (j = 0; j < 4; j++)
{
if (gBattleMons[bankAtk].moves[j] == MOVE_IMPRISON)
break;
}
if (j != 4)
{
imprisionPos = j;
if (gBattleMons[bankAtk].pp[j] != 0)
gBattleMons[bankAtk].pp[j]--;
}
}
}
if (imprisionPos != 4
&& !(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED)
&& !(gDisableStructs[bankAtk].unk18_b & gBitTable[imprisionPos]))
{
gActiveBank = bankAtk;
EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisionPos, 0, 1, &gBattleMons[gActiveBank].pp[imprisionPos]);
MarkBufferBankForExecution(gActiveBank);
}
}
void PressurePPLoseOnUsingPerishSong(u8 bankAtk)
{
s32 i, j;
s32 perishSongPos = 4;
for (i = 0; i < gNoOfAllBanks; i++)
{
if (gBattleMons[i].ability == ABILITY_PRESSURE && i != bankAtk)
{
for (j = 0; j < 4; j++)
{
if (gBattleMons[bankAtk].moves[j] == MOVE_PERISH_SONG)
break;
}
if (j != 4)
{
perishSongPos = j;
if (gBattleMons[bankAtk].pp[j] != 0)
gBattleMons[bankAtk].pp[j]--;
}
}
}
if (perishSongPos != 4
&& !(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED)
&& !(gDisableStructs[bankAtk].unk18_b & gBitTable[perishSongPos]))
{
gActiveBank = bankAtk;
EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + perishSongPos, 0, 1, &gBattleMons[gActiveBank].pp[perishSongPos]);
MarkBufferBankForExecution(gActiveBank);
}
}
void MarkAllBufferBanksForExecution(void) // unused
{
s32 i;
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
for (i = 0; i < gNoOfAllBanks; i++)
gBattleExecBuffer |= gBitTable[i] << 0x1C;
}
else
{
for (i = 0; i < gNoOfAllBanks; i++)
gBattleExecBuffer |= gBitTable[i];
}
}
void MarkBufferBankForExecution(u8 bank)
{
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
gBattleExecBuffer |= gBitTable[bank] << 0x1C;
}
else
{
gBattleExecBuffer |= gBitTable[bank];
}
}
void sub_803F850(u8 arg0)
{
s32 i;
for (i = 0; i < sub_8009FCC(); i++)
gBattleExecBuffer |= gBitTable[arg0] << (i << 2);
gBattleExecBuffer &= ~(0x10000000 << arg0);
}
void CancelMultiTurnMoves(u8 bank)
{
gBattleMons[bank].status2 &= ~(STATUS2_MULTIPLETURNS);
gBattleMons[bank].status2 &= ~(STATUS2_LOCK_CONFUSE);
gBattleMons[bank].status2 &= ~(STATUS2_UPROAR);
gBattleMons[bank].status2 &= ~(STATUS2_BIDE);
gStatuses3[bank] &= ~(STATUS3_SEMI_INVULNERABLE);
gDisableStructs[bank].rolloutCounter1 = 0;
gDisableStructs[bank].furyCutterCounter = 0;
}
bool8 WasUnableToUseMove(u8 bank)
{
if (gProtectStructs[bank].prlzImmobility
|| gProtectStructs[bank].targetNotAffected
|| gProtectStructs[bank].usedImprisionedMove
|| gProtectStructs[bank].loveImmobility
|| gProtectStructs[bank].usedDisabledMove
|| gProtectStructs[bank].usedTauntedMove
|| gProtectStructs[bank].flag2Unknown
|| gProtectStructs[bank].flinchImmobility
|| gProtectStructs[bank].confusionSelfDmg)
return TRUE;
else
return FALSE;
}
void PrepareStringBattle(u16 stringId, u8 bank)
{
gActiveBank = bank;
EmitPrintString(0, stringId);
MarkBufferBankForExecution(gActiveBank);
}
void ResetSentPokesToOpponentValue(void)
{
s32 i;
u32 bits = 0;
gSentPokesToOpponent[0] = 0;
gSentPokesToOpponent[1] = 0;
for (i = 0; i < gNoOfAllBanks; i += 2)
bits |= gBitTable[gBattlePartyID[i]];
for (i = 1; i < gNoOfAllBanks; i += 2)
gSentPokesToOpponent[(i & BIT_MON) >> 1] = bits;
}
void sub_803F9EC(u8 bank)
{
s32 i = 0;
u32 bits = 0;
if (GetBankSide(bank) == SIDE_OPPONENT)
{
u8 id = ((bank & BIT_MON) >> 1);
gSentPokesToOpponent[id] = 0;
for (i = 0; i < gNoOfAllBanks; i += 2)
{
if (!(gAbsentBankFlags & gBitTable[i]))
bits |= gBitTable[gBattlePartyID[i]];
}
gSentPokesToOpponent[id] = bits;
}
}
void sub_803FA70(u8 bank)
{
if (GetBankSide(bank) == SIDE_OPPONENT)
{
sub_803F9EC(bank);
}
else
{
s32 i;
for (i = 1; i < gNoOfAllBanks; i++)
gSentPokesToOpponent[(i & BIT_MON) >> 1] |= gBitTable[gBattlePartyID[bank]];
}
}
void BattleScriptPush(const u8* bsPtr)
{
@ -203,7 +459,7 @@ void BattleScriptPop(void)
gBattlescriptCurrInstr = BATTLESCRIPTS_STACK->ptr[--BATTLESCRIPTS_STACK->size];
}
u8 sub_803FB4C(void) // msg, can't select a move
u8 TrySetCantSelectMoveBattleScript(void)
{
u8 limitations = 0;
u16 move = gBattleMons[gActiveBank].moves[gBattleBufferB[gActiveBank][2]];
@ -221,7 +477,7 @@ u8 sub_803FB4C(void) // msg, can't select a move
}
else
{
gUnknown_02024220[gActiveBank] = gUnknown_082DAE1F;
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAE1F;
limitations = 1;
}
}
@ -236,7 +492,7 @@ u8 sub_803FB4C(void) // msg, can't select a move
}
else
{
gUnknown_02024220[gActiveBank] = gUnknown_082DB089;
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB089;
limitations++;
}
}
@ -251,7 +507,7 @@ u8 sub_803FB4C(void) // msg, can't select a move
}
else
{
gUnknown_02024220[gActiveBank] = gUnknown_082DB0A0;
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB0A0;
limitations++;
}
}
@ -266,7 +522,7 @@ u8 sub_803FB4C(void) // msg, can't select a move
}
else
{
gUnknown_02024220[gActiveBank] = gUnknown_082DB181;
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB181;
limitations++;
}
}
@ -288,7 +544,7 @@ u8 sub_803FB4C(void) // msg, can't select a move
}
else
{
gUnknown_02024220[gActiveBank] = gUnknown_082DB812;
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB812;
limitations++;
}
}
@ -301,7 +557,7 @@ u8 sub_803FB4C(void) // msg, can't select a move
}
else
{
gUnknown_02024220[gActiveBank] = gUnknown_082DB076;
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB076;
limitations++;
}
}
@ -352,7 +608,7 @@ bool8 AreAllMovesUnusable(void)
if (unusable == 0xF) // all moves are unusable
{
gProtectStructs[gActiveBank].onlyStruggle = 1;
gUnknown_02024220[gActiveBank] = BattleScript_NoMovesLeft;
gBattlescriptPtrsForSelection[gActiveBank] = BattleScript_NoMovesLeft;
}
else
{
@ -407,15 +663,15 @@ u8 UpdateTurnCounters(void)
case 0:
for (i = 0; i < gNoOfAllBanks; i++)
{
gTurnOrder[i] = i;
gBanksByTurnOrder[i] = i;
}
for (i = 0; i < gNoOfAllBanks - 1; i++)
{
s32 j;
for (j = i + 1; j < gNoOfAllBanks; j++)
{
if (b_first_side(gTurnOrder[i], gTurnOrder[j], 0))
sub_803CEDC(i, j);
if (GetWhoStrikesFirst(gBanksByTurnOrder[i], gBanksByTurnOrder[j], 0))
SwapTurnOrder(i, j);
}
}
@ -540,7 +796,7 @@ u8 UpdateTurnCounters(void)
case 5:
while (gBattleStruct->turnSideTracker < gNoOfAllBanks)
{
gActiveBank = gTurnOrder[gBattleStruct->turnSideTracker];
gActiveBank = gBanksByTurnOrder[gBattleStruct->turnSideTracker];
if (gWishFutureKnock.wishCounter[gActiveBank] != 0
&& --gWishFutureKnock.wishCounter[gActiveBank] == 0
&& gBattleMons[gActiveBank].hp != 0)
@ -652,7 +908,7 @@ u8 TurnBasedEffects(void)
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20);
while (gBattleStruct->turnEffectsBank < gNoOfAllBanks && gBattleStruct->turnEffectsTracker <= TURNBASED_MAX_CASE)
{
gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->turnEffectsBank];
gActiveBank = gBankAttacker = gBanksByTurnOrder[gBattleStruct->turnEffectsBank];
if (gAbsentBankFlags & gBitTable[gActiveBank])
{
gBattleStruct->turnEffectsBank++;
@ -833,7 +1089,7 @@ u8 TurnBasedEffects(void)
{
gBankAttacker = gActiveBank;
gBattleMons[gActiveBank].status2 -= 0x10; // uproar timer goes down
if (HasMoveFailed(gActiveBank))
if (WasUnableToUseMove(gActiveBank))
{
CancelMultiTurnMoves(gActiveBank);
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
@ -859,7 +1115,7 @@ u8 TurnBasedEffects(void)
if (gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE)
{
gBattleMons[gActiveBank].status2 -= 0x400;
if (HasMoveFailed(gActiveBank))
if (WasUnableToUseMove(gActiveBank))
CancelMultiTurnMoves(gActiveBank);
else if (!(gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE)
&& (gBattleMons[gActiveBank].status2 & STATUS2_MULTIPLETURNS))
@ -1021,7 +1277,7 @@ bool8 sub_8041364(void)
case 1:
while (gBattleStruct->field_1A1 < gNoOfAllBanks)
{
gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->field_1A1];
gActiveBank = gBankAttacker = gBanksByTurnOrder[gBattleStruct->field_1A1];
if (gAbsentBankFlags & gBitTable[gActiveBank])
{
gBattleStruct->field_1A1++;
@ -1130,7 +1386,7 @@ bool8 sub_8041728(void)
case 4:
do
{
gBank1 = gBankTarget = gBattleStruct->field_4E; //or should banks be switched?
gBank1 = gBankTarget = gBattleStruct->field_4E;
if (gBattleMons[gBattleStruct->field_4E].hp == 0
&& !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E]))
{
@ -1159,7 +1415,7 @@ bool8 sub_8041728(void)
return FALSE;
}
void b_clear_atk_up_if_hit_flag_unless_enraged(void)
void TryClearRageStatuses(void)
{
int i;
for (i = 0; i < gNoOfAllBanks; i++)
@ -1667,7 +1923,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
gBankAttacker = bank;
switch (gLastUsedAbility)
{
case 0xFF: //weather from overworld
case ABILITYEFFECT_SWITCH_IN_WEATHER:
//_08042A86
switch (weather_get_current())
{
@ -1850,12 +2106,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
//_08042EF8
if (gLastUsedAbility == ABILITY_SOUNDPROOF)
{
for (i = 0; gSoundMovesTable[i] != 0xFFFF; i++)
for (i = 0; sSoundMovesTable[i] != 0xFFFF; i++)
{
if (gSoundMovesTable[i] == move)
if (sSoundMovesTable[i] == move)
break;
}
if (gSoundMovesTable[i] != 0xFFFF)
if (sSoundMovesTable[i] != 0xFFFF)
{
if (gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS)
gHitMarker |= HITMARKER_NO_PPDEDUCT;
@ -3156,7 +3412,7 @@ _08042EF8:\n\
bl _0804441E\n\
_08042F02:\n\
movs r4, 0\n\
ldr r0, =gSoundMovesTable\n\
ldr r0, =sSoundMovesTable\n\
ldrh r2, [r0]\n\
ldr r3, =0x0000ffff\n\
adds r1, r0, 0\n\
@ -5444,8 +5700,8 @@ void BattleScriptExecute(const u8* BS_ptr)
{
gBattlescriptCurrInstr = BS_ptr;
BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc;
gBattleMainFunc = bc_move_exec_returning;
gFightStateTracker = 0;
gBattleMainFunc = RunBattleScriptCommands_PopCallbacksStack;
gCurrentActionFuncId = 0;
}
void BattleScriptPushCursorAndCallback(const u8* BS_ptr)
@ -5453,7 +5709,7 @@ void BattleScriptPushCursorAndCallback(const u8* BS_ptr)
BattleScriptPushCursor();
gBattlescriptCurrInstr = BS_ptr;
BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc;
gBattleMainFunc = sub_803E08C;
gBattleMainFunc = RunBattleScriptCommands;
}
enum
@ -5523,7 +5779,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
switch (caseID)
{
case 0:
case ITEMEFFECT_ON_SWITCH_IN:
switch (bankHoldEffect)
{
case HOLD_EFFECT_DOUBLE_PRIZE:
@ -6188,14 +6444,14 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
return effect;
}
void sub_8045868(u8 bank)
void ClearFuryCutterDestinyBondGrudge(u8 bank)
{
gDisableStructs[bank].furyCutterCounter = 0;
gBattleMons[bank].status2 &= ~(STATUS2_DESTINY_BOND);
gStatuses3[bank] &= ~(STATUS3_GRUDGE);
}
void sub_80458B4(void)
void HandleAction_RunBattleScript(void) // identical to RunBattleScriptCommands
{
if (gBattleExecBuffer == 0)
gBattleScriptingCommandsTable[*gBattlescriptCurrInstr]();

583
src/braille_puzzles.c Executable file
View File

@ -0,0 +1,583 @@
#include "global.h"
#include "event_data.h"
#include "songs.h"
#include "sound.h"
#include "script.h"
#include "species.h"
#include "task.h"
#include "field_effect.h"
#include "flags.h"
extern void MapGridSetMetatileIdAt(s32 x, s32 y, u16 metatileId); // fieldmap
extern void DrawWholeMapView(); // field_camera
extern void SetCameraPanningCallback(void ( *callback)()); // field_camera
extern void InstallCameraPanAheadCallback(void);
extern void SetCameraPanning(s16 x, s16 y);
extern u8 brm_get_pokemon_selection(void);
extern void FieldEffectActiveListRemove(u8 id); // field_effect
extern u8 oei_task_add(void);
// why do this, GF?
enum
{
STRENGTH_PUZZLE,
FLY_PUZZLE
};
extern u8 gBraillePuzzleCallbackFlag;
extern u8 gUnknown_085EFE74[][2];
void SealedChamberShakingEffect(u8);
void sub_8179860(void);
void sub_8179944(void);
bool8 ShouldDoBrailleDigEffect(void)
{
if (!FlagGet(SYS_BRAILLE_DIG)
&& (gSaveBlock1Ptr->location.mapGroup == 0x18
&& gSaveBlock1Ptr->location.mapNum == 0x47))
{
if (gSaveBlock1Ptr->pos.x == 10 && gSaveBlock1Ptr->pos.y == 3)
return TRUE;
if (gSaveBlock1Ptr->pos.x == 9 && gSaveBlock1Ptr->pos.y == 3)
return TRUE;
if (gSaveBlock1Ptr->pos.x == 11 && gSaveBlock1Ptr->pos.y == 3)
return TRUE;
}
return FALSE;
}
void DoBrailleDigEffect(void)
{
MapGridSetMetatileIdAt(16, 8, 554);
MapGridSetMetatileIdAt(17, 8, 555);
MapGridSetMetatileIdAt(18, 8, 556);
MapGridSetMetatileIdAt(16, 9, 3634);
MapGridSetMetatileIdAt(17, 9, 563);
MapGridSetMetatileIdAt(18, 9, 3636);
DrawWholeMapView();
PlaySE(SE_BAN);
FlagSet(SYS_BRAILLE_DIG);
ScriptContext2_Disable();
}
bool8 CheckRelicanthWailord(void)
{
// Emerald change: why did they flip it?
// First comes Wailord
if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2, 0) == SPECIES_WAILORD)
{
CalculatePlayerPartyCount();
// Last comes Relicanth
if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES2, 0) == SPECIES_RELICANTH)
return TRUE;
}
return FALSE;
}
// THEORY: this was caused by block commenting out all of the older R/S braille functions but leaving the call to it itself, which creates the nullsub.
// the code is shown below to show what this might look like.
void ShouldDoBrailleStrengthEffectOld(void)
{
/*
if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1.location.mapGroup == MAP_GROUP_DESERT_RUINS && gSaveBlock1.location.mapNum == MAP_ID_DESERT_RUINS))
{
if (gSaveBlock1.pos.x == 10 && gSaveBlock1.pos.y == 23)
return TRUE;
else if (gSaveBlock1.pos.x == 9 && gSaveBlock1.pos.y == 23)
return TRUE;
else if (gSaveBlock1.pos.x == 11 && gSaveBlock1.pos.y == 23)
return TRUE;
}
return FALSE;
}
void DoBrailleStrengthEffect(void)
{
FieldEffectActiveListRemove(FLDEFF_USE_STRENGTH);
MapGridSetMetatileIdAt(14, 26, 554);
MapGridSetMetatileIdAt(15, 26, 555);
MapGridSetMetatileIdAt(16, 26, 556);
MapGridSetMetatileIdAt(14, 27, 3634);
MapGridSetMetatileIdAt(15, 27, 563);
MapGridSetMetatileIdAt(16, 27, 3636);
DrawWholeMapView();
PlaySE(SE_BAN);
FlagSet(SYS_BRAILLE_STRENGTH);
ScriptContext2_Disable();
}
bool8 ShouldDoBrailleFlyEffect(void)
{
if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1.location.mapGroup == MAP_GROUP_ANCIENT_TOMB && gSaveBlock1.location.mapNum == MAP_ID_ANCIENT_TOMB))
{
if (gSaveBlock1.pos.x == 8 && gSaveBlock1.pos.y == 25)
return TRUE;
}
return FALSE;
}
void DoBrailleFlyEffect(void)
{
gFieldEffectArguments[0] = gLastFieldPokeMenuOpened;
FieldEffectStart(FLDEFF_USE_FLY_ANCIENT_TOMB);
}
bool8 FldEff_UseFlyAncientTomb(void)
{
u8 taskId = oei_task_add();
gTasks[taskId].data[8] = (u32)UseFlyAncientTomb_Callback >> 16;
gTasks[taskId].data[9] = (u32)UseFlyAncientTomb_Callback;
return FALSE;
}
void UseFlyAncientTomb_Callback(void)
{
FieldEffectActiveListRemove(FLDEFF_USE_FLY_ANCIENT_TOMB);
UseFlyAncientTomb_Finish();
}
void UseFlyAncientTomb_Finish(void)
{
MapGridSetMetatileIdAt(14, 26, 554);
MapGridSetMetatileIdAt(15, 26, 555);
MapGridSetMetatileIdAt(16, 26, 556);
MapGridSetMetatileIdAt(14, 27, 3634);
MapGridSetMetatileIdAt(15, 27, 563);
MapGridSetMetatileIdAt(16, 27, 3636);
DrawWholeMapView();
PlaySE(SE_BAN);
FlagSet(SYS_BRAILLE_FLY);
ScriptContext2_Disable();
}
*/
}
void DoSealedChamberShakingEffect1(void)
{
u8 taskId = CreateTask(SealedChamberShakingEffect, 9);
gTasks[taskId].data[1] = 0;
gTasks[taskId].data[2] = 0;
gTasks[taskId].data[4] = 2;
gTasks[taskId].data[5] = 5;
gTasks[taskId].data[6] = 50;
SetCameraPanningCallback(0);
}
void DoSealedChamberShakingEffect2(void)
{
u8 taskId = CreateTask(SealedChamberShakingEffect, 9);
gTasks[taskId].data[1] = 0;
gTasks[taskId].data[2] = 0;
gTasks[taskId].data[4] = 3;
gTasks[taskId].data[5] = 5;
gTasks[taskId].data[6] = 2;
SetCameraPanningCallback(0);
}
void SealedChamberShakingEffect(u8 taskId)
{
struct Task *task = &gTasks[taskId];
task->data[1]++;
if (!(task->data[1] % task->data[5]))
{
task->data[1] = 0;
task->data[2]++;
task->data[4] = -task->data[4];
SetCameraPanning(0, task->data[4]);
if (task->data[2] == task->data[6])
{
DestroyTask(taskId);
EnableBothScriptContexts();
InstallCameraPanAheadCallback();
}
}
}
// moved later in the function because it was rewritten.
bool8 ShouldDoBrailleStrengthEffect(void)
{
if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x06))
{
if (gSaveBlock1Ptr->pos.x == 6 && gSaveBlock1Ptr->pos.y == 23)
{ gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; }
else if (gSaveBlock1Ptr->pos.x == 5 && gSaveBlock1Ptr->pos.y == 23)
{ gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; }
else if (gSaveBlock1Ptr->pos.x == 7 && gSaveBlock1Ptr->pos.y == 23)
{ gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; }
}
return FALSE;
}
void sub_8179834(void)
{
gFieldEffectSpawnParams[0] = brm_get_pokemon_selection();
FieldEffectStart(FLDEFF_USE_FLY_ANCIENT_TOMB);
}
void UseStrengthDesertRuins_Callback(void)
{
FieldEffectActiveListRemove(FLDEFF_USE_FLY_ANCIENT_TOMB);
sub_8179860();
}
void sub_8179860(void)
{
MapGridSetMetatileIdAt(14, 26, 554);
MapGridSetMetatileIdAt(15, 26, 555);
MapGridSetMetatileIdAt(16, 26, 556);
MapGridSetMetatileIdAt(14, 27, 3634);
MapGridSetMetatileIdAt(15, 27, 563);
MapGridSetMetatileIdAt(16, 27, 3636);
DrawWholeMapView();
PlaySE(SE_BAN);
FlagSet(SYS_BRAILLE_STRENGTH);
ScriptContext2_Disable();
}
bool8 ShouldDoBrailleFlyEffect(void)
{
if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x44))
{
if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25)
{ gBraillePuzzleCallbackFlag = FLY_PUZZLE; return TRUE; }
}
return FALSE;
}
void sub_8179918(void)
{
gFieldEffectSpawnParams[0] = brm_get_pokemon_selection();
FieldEffectStart(FLDEFF_USE_FLY_ANCIENT_TOMB);
}
void UseFlyAncientTomb_Callback(void)
{
FieldEffectActiveListRemove(FLDEFF_USE_FLY_ANCIENT_TOMB);
sub_8179944();
}
void sub_8179944(void)
{
MapGridSetMetatileIdAt(14, 26, 554);
MapGridSetMetatileIdAt(15, 26, 555);
MapGridSetMetatileIdAt(16, 26, 556);
MapGridSetMetatileIdAt(14, 27, 3634);
MapGridSetMetatileIdAt(15, 27, 563);
MapGridSetMetatileIdAt(16, 27, 3636);
DrawWholeMapView();
PlaySE(SE_BAN);
FlagSet(SYS_BRAILLE_FLY);
ScriptContext2_Disable();
}
// theory: another commented out DoBrailleWait and Task_BrailleWait.
void DoBrailleWait(void)
{
/*
if (!FlagGet(SYS_BRAILLE_WAIT))
CreateTask(Task_BrailleWait, 0x50);
}
void Task_BrailleWait(u8 taskId)
{
s16 *data = gTasks[taskId].data;
switch (data[0])
{
case 0:
data[1] = 7200;
data[0] = 1;
break;
case 1:
if (BrailleWait_CheckButtonPress() != FALSE)
{
MenuZeroFillScreen();
PlaySE(SE_SELECT);
data[0] = 2;
}
else
{
data[1] = data[1] - 1;
if (data[1] == 0)
{
MenuZeroFillScreen();
data[0] = 3;
data[1] = 30;
}
}
break;
case 2:
if (BrailleWait_CheckButtonPress() == FALSE)
{
data[1] = data[1] - 1;
if (data[1] == 0)
data[0] = 4;
break;
}
sub_8064E2C();
DestroyTask(taskId);
ScriptContext2_Disable();
break;
case 3:
data[1] = data[1] - 1;
if (data[1] == 0)
data[0] = 4;
break;
case 4:
sub_8064E2C();
ScriptContext1_SetupScript(S_OpenRegiceChamber);
DestroyTask(taskId);
break;
}
}
bool32 BrailleWait_CheckButtonPress(void)
{
u16 keyMask = A_BUTTON | B_BUTTON | START_BUTTON | SELECT_BUTTON | DPAD_ANY;
if (gSaveBlock2.optionsButtonMode == OPTIONS_BUTTON_MODE_LR)
keyMask |= L_BUTTON | R_BUTTON;
if (gSaveBlock2.optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
keyMask |= L_BUTTON;
if (gMain.newKeys & keyMask)
return TRUE;
else
return FALSE;
*/
}
// this used to be FldEff_UseFlyAncientTomb . why did GF merge the 2 functions?
bool8 FldEff_UsePuzzleEffect(void)
{
u8 taskId = oei_task_add();
if (gBraillePuzzleCallbackFlag == FLY_PUZZLE)
{
gTasks[taskId].data[8] = (u32)UseFlyAncientTomb_Callback >> 16;
gTasks[taskId].data[9] = (u32)UseFlyAncientTomb_Callback;
}
else
{
gTasks[taskId].data[8] = (u32)UseStrengthDesertRuins_Callback >> 16;
gTasks[taskId].data[9] = (u32)UseStrengthDesertRuins_Callback;
}
return FALSE;
}
// can't get this one to match due to the weird macro-like varsets with strange bitshifting.
// to note: 0x10000 is loaded in, and its obviously supposed to be 1, but i cant get 0x80 << 9 to be loaded in without using it directly.
// maybe there's some way of writing it that works?
#ifdef NONMATCHING
// ShouldDoBrailleRegicePuzzle
bool8 ShouldDoBrailleRegicePuzzle(void)
{
u8 i;
if (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x43)
{
// _08179A1A
if (FlagGet(SYS_BRAILLE_WAIT) != FALSE)
return FALSE;
if (FlagGet(2) == FALSE)
return FALSE;
if (FlagGet(3) == TRUE)
return FALSE;
for (i = 0; i < 36; i++)
{
if (gSaveBlock1Ptr->pos.x == gUnknown_085EFE74[i][0] && gSaveBlock1Ptr->pos.y == gUnknown_085EFE74[i][1])
{
if (i < 16)
VarSet(0x403B, (0x10000 << i | VarGet(0x403B) << 16) >> 16); // correct
else if (i < 32)
VarSet(0x403C, (0x10000 << (i - 16) | VarGet(0x403C) << 16) >> 16); // hmm?
else
VarSet(0x403D, (0x10000 << (i - 32) | VarGet(0x403D) << 16) >> 16); // hmm?
if (VarGet(0x403B) != 0xFFFF || VarGet(0x403C) != 0xFF || VarGet(0x403D) != 0xF)
return FALSE;
if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 21)
return TRUE;
else
return FALSE;
}
}
}
// TODO: Find what flags 2 and 3 are.
FlagSet(3);
FlagReset(2);
return FALSE;
}
#else
__attribute__((naked))
bool8 ShouldDoBrailleRegicePuzzle(void)
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
mov r7, r9\n\
mov r6, r8\n\
push {r6,r7}\n\
ldr r4, =gSaveBlock1Ptr\n\
ldr r0, [r4]\n\
ldrh r1, [r0, 0x4]\n\
ldr r0, =0x00004318\n\
cmp r1, r0\n\
beq _08179A1A\n\
b _08179B5A\n\
_08179A1A:\n\
ldr r0, =0x000008b1\n\
bl FlagGet\n\
lsls r0, 24\n\
cmp r0, 0\n\
beq _08179A28\n\
b _08179B5A\n\
_08179A28:\n\
movs r0, 0x2\n\
bl FlagGet\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _08179A36\n\
b _08179B5A\n\
_08179A36:\n\
movs r0, 0x3\n\
bl FlagGet\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x1\n\
bne _08179A58\n\
b _08179B5A\n\
.pool\n\
_08179A54:\n\
movs r0, 0x1\n\
b _08179B5C\n\
_08179A58:\n\
movs r5, 0\n\
mov r8, r4\n\
ldr r4, =gUnknown_085EFE74\n\
adds r0, r4, 0x1\n\
mov r12, r0\n\
ldr r6, =0x0000403b\n\
ldr r1, =0x0000403c\n\
mov r9, r1\n\
_08179A68:\n\
lsls r0, r5, 1\n\
adds r1, r0, r4\n\
add r0, r12\n\
ldrb r3, [r0]\n\
mov r7, r8\n\
ldr r2, [r7]\n\
movs r7, 0\n\
ldrsh r0, [r2, r7]\n\
ldrb r1, [r1]\n\
cmp r0, r1\n\
bne _08179B44\n\
movs r1, 0x2\n\
ldrsh r0, [r2, r1]\n\
cmp r0, r3\n\
bne _08179B44\n\
cmp r5, 0xF\n\
bhi _08179AB0\n\
adds r0, r6, 0\n\
bl VarGet\n\
lsls r0, 16\n\
movs r1, 0x80\n\
lsls r1, 9\n\
lsls r1, r5\n\
orrs r1, r0\n\
lsrs r1, 16\n\
adds r0, r6, 0\n\
bl VarSet\n\
b _08179AF0\n\
.pool\n\
_08179AB0:\n\
cmp r5, 0x1F\n\
bhi _08179AD2\n\
mov r0, r9\n\
bl VarGet\n\
lsls r0, 16\n\
adds r2, r5, 0\n\
subs r2, 0x10\n\
movs r1, 0x80\n\
lsls r1, 9\n\
lsls r1, r2\n\
orrs r1, r0\n\
lsrs r1, 16\n\
mov r0, r9\n\
bl VarSet\n\
b _08179AF0\n\
_08179AD2:\n\
ldr r4, =0x0000403d\n\
adds r0, r4, 0\n\
bl VarGet\n\
lsls r0, 16\n\
adds r2, r5, 0\n\
subs r2, 0x20\n\
movs r1, 0x80\n\
lsls r1, 9\n\
lsls r1, r2\n\
orrs r1, r0\n\
lsrs r1, 16\n\
adds r0, r4, 0\n\
bl VarSet\n\
_08179AF0:\n\
ldr r0, =0x0000403b\n\
bl VarGet\n\
lsls r0, 16\n\
lsrs r4, r0, 16\n\
ldr r0, =0x0000ffff\n\
cmp r4, r0\n\
bne _08179B5A\n\
ldr r0, =0x0000403c\n\
bl VarGet\n\
lsls r0, 16\n\
lsrs r0, 16\n\
cmp r0, r4\n\
bne _08179B5A\n\
ldr r0, =0x0000403d\n\
bl VarGet\n\
lsls r0, 16\n\
lsrs r0, 16\n\
cmp r0, 0xF\n\
bne _08179B5A\n\
ldr r0, =gSaveBlock1Ptr\n\
ldr r0, [r0]\n\
ldr r1, [r0]\n\
ldr r0, =0x00150008\n\
cmp r1, r0\n\
beq _08179A54\n\
b _08179B5A\n\
.pool\n\
_08179B44:\n\
adds r0, r5, 0x1\n\
lsls r0, 24\n\
lsrs r5, r0, 24\n\
cmp r5, 0x23\n\
bls _08179A68\n\
movs r0, 0x3\n\
bl FlagSet\n\
movs r0, 0x2\n\
bl FlagReset\n\
_08179B5A:\n\
movs r0, 0\n\
_08179B5C:\n\
pop {r3,r4}\n\
mov r8, r3\n\
mov r9, r4\n\
pop {r4-r7}\n\
pop {r1}\n\
bx r1\n\
.syntax divided");
}
#endif

View File

@ -64,8 +64,8 @@ extern void sub_806A068(u16, u8);
extern void fade_screen(u8, u8);
extern void overworld_free_bg_tilemaps(void);
extern void sub_80AF168(void);
extern void init_uns_table_pokemon_copy(void);
extern void sub_805F094(void);
extern void AllocateMonSpritesGfx(void);
extern void FreeMonSpritesGfx(void);
extern void remove_some_task(void);
extern void reset_temp_tile_data_buffers(void);
extern void c2_exit_to_overworld_2_switch(void);
@ -439,7 +439,7 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u32 pid = GetMonData(mon, MON_DATA_PERSONALITY);
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species],
gBattleSpritesGfx->sprites[(a0 * 2) + 1],
gMonSpritesGfxPtr->sprites[(a0 * 2) + 1],
species, pid);
LoadCompressedObjectPalette(sub_806E794(mon));
*speciesLoc = species;
@ -488,7 +488,7 @@ static void CB2_EggHatch_0(void)
SetGpuReg(REG_OFFSET_DISPCNT, 0);
sEggHatchData = Alloc(sizeof(struct EggHatchData));
init_uns_table_pokemon_copy();
AllocateMonSpritesGfx();
sEggHatchData->eggPartyID = gSpecialVar_0x8004;
sEggHatchData->eggShardVelocityID = 0;
@ -570,7 +570,7 @@ static void CB2_EggHatch_0(void)
static void EggHatchSetMonNickname(void)
{
SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar3);
sub_805F094();
FreeMonSpritesGfx();
Free(sEggHatchData);
SetMainCallback2(c2_exit_to_overworld_2_switch);
}
@ -691,7 +691,7 @@ static void CB2_EggHatch_1(void)
case 12:
if (!gPaletteFade.active)
{
sub_805F094();
FreeMonSpritesGfx();
RemoveWindow(sEggHatchData->windowId);
UnsetBgTilemapBuffer(0);
UnsetBgTilemapBuffer(1);

View File

@ -152,8 +152,8 @@ u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality)
void sub_806A068(u16 species, u8 bankIdentity)
{
if (gBattleSpritesGfx != NULL)
gUnknown_0202499C = gBattleSpritesGfx->templates[bankIdentity];
if (gMonSpritesGfxPtr != NULL)
gUnknown_0202499C = gMonSpritesGfxPtr->templates[bankIdentity];
else if (gUnknown_020249B4[0])
gUnknown_0202499C = gUnknown_020249B4[0]->templates[bankIdentity];
else if (gUnknown_020249B4[1])
@ -180,8 +180,8 @@ void sub_806A12C(u16 trainerSpriteId, u8 bankIdentity)
}
else
{
if (gBattleSpritesGfx != NULL)
gUnknown_0202499C = gBattleSpritesGfx->templates[bankIdentity];
if (gMonSpritesGfxPtr != NULL)
gUnknown_0202499C = gMonSpritesGfxPtr->templates[bankIdentity];
else
gUnknown_0202499C = gUnknown_08329D98[bankIdentity];
gUnknown_0202499C.anims = gUnknown_0830536C[trainerSpriteId];
@ -190,8 +190,8 @@ void sub_806A12C(u16 trainerSpriteId, u8 bankIdentity)
void sub_806A1C0(u16 arg0, u8 bankIdentity)
{
if (gBattleSpritesGfx != NULL)
gUnknown_0202499C = gBattleSpritesGfx->templates[bankIdentity];
if (gMonSpritesGfxPtr != NULL)
gUnknown_0202499C = gMonSpritesGfxPtr->templates[bankIdentity];
else
gUnknown_0202499C = gUnknown_08329D98[bankIdentity];
gUnknown_0202499C.paletteTag = arg0;

View File

@ -486,8 +486,8 @@ u16 SpeciesToCryId(u16 species)
void sub_806D544(u16 species, u32 personality, u8 *dest)
{
if (species == SPECIES_SPINDA
&& dest != gBattleSpritesGfx->sprites[0]
&& dest != gBattleSpritesGfx->sprites[2])
&& dest != gMonSpritesGfxPtr->sprites[0]
&& dest != gMonSpritesGfxPtr->sprites[2])
{
int i;
for (i = 0; i < 4; i++)
@ -1519,8 +1519,6 @@ void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u
DoMonFrontSpriteAnimation(sprite, species, noCry, arg3);
}
bool8 HasTwoFramesAnimation(u16 species);
extern void SpriteCallbackDummy_2(struct Sprite*);
extern void sub_817F60C(struct Sprite*);

View File

@ -117,7 +117,7 @@ gUnknown_03003110: @ 3003110
gUnknown_03003120: @ 3003120
.space 0x4
gUnknown_03003124: @ 3003124
gReceivedRemoteLinkPlayers: @ 3003124
.space 0xC
gUnknown_03003130: @ 3003130
@ -203,7 +203,7 @@ gUnknown_03005CDE: @ 3005CDE
.include "rtc.o"
gUnknown_03005D00: @ 3005D00
gPreBattleCallback1: @ 3005D00
.space 0x4
gBattleMainFunc: @ 3005D04

View File

@ -31,11 +31,8 @@ gUnknown_020223BD: @ 20223BD
gUnknown_020223C0: @ 20223C0
.space 0x4
gUnknown_020223C4: @ 20223C4
.space 0x4
gUnknown_020223C8: @ 20223C8
.space 0x4FC
gBlockRecvBuffer: @ 20223C4
.space 0x500
gUnknown_020228C4: @ 20228C4 gBlockSendBuffer
.space 0x100
@ -205,10 +202,10 @@ gUnknown_02022D10: @ 2022D10
gUnknown_02022E10: @ 2022E10
.space 0x4
gUnknown_02022E14: @ 2022E14
gBattle_BG0_X: @ 2022E14
.space 0x2
gUnknown_02022E16: @ 2022E16
gBattle_BG0_Y: @ 2022E16
.space 0x2
gBattle_BG1_X: @ 2022E18
@ -226,19 +223,19 @@ gBattle_BG2_Y: @ 2022E1E
gBattle_BG3_X: @ 2022E20
.space 0x2
gUnknown_02022E22: @ 2022E22
gBattle_BG3_Y: @ 2022E22
.space 0x2
gUnknown_02022E24: @ 2022E24
gBattle_WIN0H: @ 2022E24
.space 0x2
gUnknown_02022E26: @ 2022E26
gBattle_WIN0V: @ 2022E26
.space 0x2
gUnknown_02022E28: @ 2022E28
gBattle_WIN1H: @ 2022E28
.space 0x2
gUnknown_02022E2A: @ 2022E2A
gBattle_WIN1V: @ 2022E2A
.space 0x2
gDisplayedStringBattle: @ 2022E2C
@ -307,16 +304,16 @@ gBattlePartyID: @ 202406E
gBanksBySide: @ 2024076
.space 0x4
gUnknown_0202407A: @ 202407A
gActionsByTurnOrder: @ 202407A
.space 0x4
gTurnOrder: @ 202407E
gBanksByTurnOrder: @ 202407E
.space 0x4
gCurrentMoveTurn: @ 2024082
gCurrentTurnActionNumber: @ 2024082
.space 0x1
gFightStateTracker: @ 2024083
gCurrentActionFuncId: @ 2024083
.space 0x1
gBattleMons: @ 2024084
@ -385,7 +382,7 @@ gBattlescriptCurrInstr: @ 2024214
gActionForBanks: @ 202421C
.space 0x4
gUnknown_02024220: @ 2024220
gBattlescriptPtrsForSelection: @ 2024220
.space 0x10
gUnknown_02024230: @ 2024230
@ -448,7 +445,7 @@ gPauseCounterBattle: @ 202432C
gPaydayMoney: @ 202432E
.space 0x2
gUnknown_02024330: @ 2024330
gRandomTurnNumber: @ 2024330
.space 0x2
gBattleCommunication: @ 2024332
@ -502,10 +499,10 @@ gUnknown_020244A4: @ 20244A4
gBattleResources: @ 20244A8
.space 0x4
gUnknown_020244AC: @ 20244AC
gActionSelectionCursor: @ 20244AC
.space 0x4
gUnknown_020244B0: @ 20244B0
gMoveSelectionCursor: @ 20244B0
.space 0x4
gUnknown_020244B4: @ 20244B4
@ -523,10 +520,10 @@ gUnknown_020244BC: @ 20244BC
gUnknown_020244CC: @ 20244CC
.space 0x4
gUnknown_020244D0: @ 20244D0
gBattleSpritesDataPtr: @ 20244D0
.space 0x4
gBattleSpritesGfx: @ 20244D4
gMonSpritesGfxPtr: @ 20244D4
.space 0x4
gUnknown_020244D8: @ 20244D8
@ -1651,7 +1648,7 @@ gUnknown_0203BCFE: @ 203BCFE
gUnknown_0203BD0E: @ 203BD0E
.space 0x6
gUnknown_0203BD14: @ 203BD14
gBraillePuzzleCallbackFlag: @ 203BD14
.space 0x4
gUnknown_0203BD18: @ 203BD18
@ -1669,10 +1666,10 @@ gUnknown_0203BD26: @ 203BD26
gUnknown_0203BD28: @ 203BD28
.space 0x4
gUnknown_0203BD2C: @ 203BD2C
gRecordedBattleRngSeed: @ 203BD2C
.space 0x4
gUnknown_0203BD30: @ 203BD30
gBattlePalaceMoveSelectionRngValue: @ 203BD30
.space 0x4
gUnknown_0203BD34: @ 203BD34