Merge pull request #28 from DizzyEggg/decomp_pokemon

decompile pokemon1/2/3
This commit is contained in:
Cameron Hall 2017-09-16 14:14:50 -05:00 committed by GitHub
commit 19d2d73c70
81 changed files with 4133 additions and 8926 deletions

View File

@ -95,7 +95,7 @@ InitBattle: @ 80367D4
ands r0, r1
cmp r0, 0
beq _08036870
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0
@ -1537,12 +1537,12 @@ _08037530:
adds r0, 0x40
ldr r4, =gTrainerBattleOpponent_A
ldrh r1, [r4]
bl sub_8162E20
bl GetFrontierTrainerName
adds r0, r6, 0
adds r0, 0x5C
ldr r5, =gTrainerBattleOpponent_B
ldrh r1, [r5]
bl sub_8162E20
bl GetFrontierTrainerName
ldrh r1, [r4]
mov r0, sp
bl sub_8165B88
@ -5470,17 +5470,17 @@ sub_8039894: @ 8039894
adds r0, r2, 0
movs r2, 0
movs r3, 0x1
bl sub_806ECEC
bl BattleAnimateFrontSprite
_080398B0:
pop {r0}
bx r0
.pool
thumb_func_end sub_8039894
thumb_func_start nullsub_18
nullsub_18: @ 80398B8
thumb_func_start SpriteCallbackDummy_2
SpriteCallbackDummy_2: @ 80398B8
bx lr
thumb_func_end nullsub_18
thumb_func_end SpriteCallbackDummy_2
thumb_func_start sub_80398BC
sub_80398BC: @ 80398BC
@ -5534,7 +5534,7 @@ sub_80398D0: @ 80398D0
ands r0, r1
mov r1, r12
strb r0, [r1]
ldr r0, =nullsub_18
ldr r0, =SpriteCallbackDummy_2
str r0, [r3, 0x1C]
ldr r0, =gUnknown_02022F88
str r2, [r0]
@ -5635,7 +5635,7 @@ _080399E4:
cmp r4, r0
bne _08039A08
ldr r0, =gUnknown_08525F78
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r6, r1
ldrb r1, [r1]
lsls r1, 2
@ -5708,13 +5708,13 @@ _08039A7C:
lsls r0, 24
lsrs r0, 24
bl GetBankIdentity
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
lsls r0, 24
lsrs r0, 22
adds r1, 0x4
adds r1, r0
ldr r2, =gUnknown_020244E4
ldr r2, =gBattleMonForms
movs r3, 0x2E
ldrsh r0, [r4, r3]
adds r0, r2
@ -5734,7 +5734,7 @@ _08039AAE:
subs r0, 0x1
cmp r0, 0
bge _08039AAE
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
movs r3, 0x2E
ldrsh r1, [r4, r3]
adds r1, r0
@ -5815,7 +5815,7 @@ sub_8039B2C: @ 8039B2C
strb r1, [r2]
movs r1, 0
strh r1, [r0, 0x36]
ldr r1, =nullsub_18
ldr r1, =SpriteCallbackDummy_2
str r1, [r0, 0x1C]
bx lr
.pool
@ -5845,7 +5845,7 @@ sub_8039B58: @ 8039B58
beq _08039B94
_08039B80:
ldrh r0, [r4, 0x32]
bl sub_806F0D4
bl HasTwoFramesAnimation
lsls r0, 24
cmp r0, 0
beq _08039B94
@ -5857,7 +5857,7 @@ _08039B94:
adds r0, r4, 0
movs r2, 0x1
movs r3, 0x1
bl sub_806ECEC
bl BattleAnimateFrontSprite
_08039BA0:
pop {r4}
pop {r0}
@ -6212,7 +6212,7 @@ sub_8039E44: @ 8039E44
beq _08039E5C
ldrh r1, [r2, 0x32]
adds r0, r2, 0
bl sub_806EEB4
bl BattleAnimateBackSprite
_08039E5C:
pop {r0}
bx r0
@ -8082,7 +8082,7 @@ _0803AE0A:
add r1, r10
ldr r2, [r1]
movs r1, 0x2
bl SetPokedexFlag
bl HandleSetPokedexFlag
b _0803AEC0
.pool
_0803AE60:
@ -8109,7 +8109,7 @@ _0803AE60:
add r1, r10
ldr r2, [r1]
movs r1, 0x2
bl SetPokedexFlag
bl HandleSetPokedexFlag
_0803AE96:
movs r0, 0
bl dp01_build_cmdbuf_x04_4_4_4
@ -8669,7 +8669,7 @@ _0803B334:
adds r1, r7
ldr r2, [r1]
movs r1, 0x2
bl SetPokedexFlag
bl HandleSetPokedexFlag
_0803B36C:
ldrb r0, [r4]
adds r0, 0x1
@ -9615,7 +9615,7 @@ _0803BBB8:
lsls r0, 24
lsrs r2, r0, 24
_0803BBC2:
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldr r3, =gActiveBank
ldrb r0, [r3]
strb r0, [r1]
@ -10556,7 +10556,7 @@ _0803C42E:
b _0803C6C4
.pool
_0803C440:
bl PlayerPartyAndPokemonStorageFull
bl IsPlayerPartyAndPokemonStorageFull
lsls r0, 24
cmp r0, 0
bne _0803C44C
@ -14854,7 +14854,7 @@ _0803EC54:
lsls r0, 24
lsrs r1, r0, 24
_0803EC5E:
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r5, [r0]
cmp r1, 0x25
bne _0803EC9C

View File

@ -315,7 +315,7 @@ _0803FDC4:
lsls r0, 24
lsrs r4, r0, 24
_0803FDCE:
ldr r2, =gUnknown_0202420F
ldr r2, =gStringBank
ldr r1, =gActiveBank
ldrb r0, [r1]
strb r0, [r2]
@ -466,7 +466,7 @@ _0803FF1C:
lsls r1, r7, 3
ldr r3, [sp, 0x14]
_0803FF2E:
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r7, [r0]
movs r0, 0
mov r9, r0
@ -8351,7 +8351,7 @@ _0804463C:
_08044654:
ldr r0, =gBattleScripting
strb r7, [r0, 0x17]
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r7, [r0]
ldr r1, =gActiveBank
ldr r0, =gBankAttacker
@ -8612,7 +8612,7 @@ _080448CE:
_080448EA:
ldr r0, =gBattleScripting
strb r7, [r0, 0x17]
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r7, [r0]
ldr r1, =gActiveBank
ldr r0, =gBankAttacker
@ -9682,7 +9682,7 @@ _080451D6:
_080451DE:
ldr r0, =gBattleScripting
strb r7, [r0, 0x17]
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r7, [r0]
ldr r4, =gActiveBank
ldr r0, =gBankAttacker
@ -10135,7 +10135,7 @@ _08045638:
beq _080456B8
ldr r0, =gBattleScripting
strb r7, [r0, 0x17]
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r7, [r0]
bl b_movescr_stack_push_cursor
ldr r1, =gBattlescriptCurrInstr
@ -10150,7 +10150,7 @@ _08045674:
_0804567A:
ldr r0, =gBattleScripting
strb r7, [r0, 0x17]
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r7, [r0]
ldr r4, =gActiveBank
strb r7, [r4]
@ -10305,7 +10305,7 @@ _08045794:
mov r1, sp
ldrh r1, [r1, 0x14]
strh r1, [r0]
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
strb r3, [r0]
ldr r0, =gBattleScripting
strb r3, [r0, 0x17]

View File

@ -1040,7 +1040,7 @@ _08046928:
lsls r0, 24
lsrs r2, r0, 24
_08046944:
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
ldr r1, =gBankTarget
ldrb r1, [r1]
strb r1, [r0]
@ -1390,7 +1390,7 @@ _08046C48:
lsls r0, 24
lsrs r6, r0, 24
_08046C50:
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldr r3, =gBankAttacker
ldrb r0, [r3]
strb r0, [r1]
@ -2982,7 +2982,7 @@ _0804795C:
lsls r0, 24
lsrs r6, r0, 24
_08047976:
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldr r5, =gBankTarget
ldrb r0, [r5]
strb r0, [r1]
@ -3169,7 +3169,7 @@ _08047B0C:
lsls r0, 24
lsrs r6, r0, 24
_08047B26:
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldr r5, =gBankTarget
ldrb r0, [r5]
strb r0, [r1]
@ -4230,7 +4230,7 @@ _08048478:
adds r0, r2
ldrh r0, [r0, 0x2E]
strh r0, [r4]
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldrb r0, [r3]
strb r0, [r1]
movs r0, 0x3F
@ -4295,7 +4295,7 @@ _08048510:
adds r0, r2
ldrh r0, [r0, 0x2E]
strh r0, [r4]
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldrb r0, [r3]
strb r0, [r1]
movs r0, 0x3F
@ -8717,7 +8717,7 @@ _0804ACE2:
ands r0, r1
cmp r0, 0
beq _0804AD48
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0
@ -12378,7 +12378,7 @@ atk4E_switchin_anim: @ 804CAE8
adds r1, r4
ldr r2, [r1]
movs r1, 0x2
bl SetPokedexFlag
bl HandleSetPokedexFlag
_0804CB3E:
ldr r2, =gAbsentBankFlags
ldr r1, =gBitTable
@ -16226,7 +16226,7 @@ _0804ED10:
lsls r0, 24
lsrs r6, r0, 24
_0804ED2A:
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldr r5, =gBankTarget
ldrb r0, [r5]
strb r0, [r1]
@ -17407,7 +17407,7 @@ _0804F73E:
atk75_8026A58: @ 804F754
push {lr}
sub sp, 0x4
ldr r2, =gUnknown_020244B8
ldr r2, =gBankInMenu
ldr r1, =gBankAttacker
ldrb r0, [r1]
strb r0, [r2]
@ -21095,7 +21095,7 @@ _08051768:
lsls r0, 24
lsrs r6, r0, 24
_08051782:
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldr r5, =gBankTarget
ldrb r0, [r5]
strb r0, [r1]
@ -29984,7 +29984,7 @@ _08056480:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
movs r4, 0xA
cmp r0, 0
@ -30385,7 +30385,7 @@ atkF1_setpoke_as_caught: @ 8056850
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080568A8
@ -30411,7 +30411,7 @@ _080568A8:
lsrs r0, 16
movs r1, 0x3
adds r2, r4, 0
bl SetPokedexFlag
bl HandleSetPokedexFlag
ldr r1, =gBattlescriptCurrInstr
ldr r0, [r1]
adds r0, 0x5

View File

@ -991,7 +991,7 @@ move_anim_start_t3: @ 805D908
ands r0, r7
cmp r0, 0
beq _0805D950
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
adds r0, r6, r0
movs r2, 0x7F
adds r1, r7, 0
@ -1371,7 +1371,7 @@ _0805DC58:
lsls r2, r5, 3
ldr r1, =gMonFrontPicTable
adds r2, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
lsrs r0, 22
adds r1, 0x4
@ -1433,7 +1433,7 @@ _0805DCC6:
adds r1, r4
adds r0, r6, 0
bl LZDecompressWram
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
add r0, r8
ldrb r1, [r0]
lsls r1, 5
@ -1543,7 +1543,7 @@ _0805DE00:
lsls r0, r5, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
lsls r2, r7, 2
adds r1, 0x4
@ -1618,7 +1618,7 @@ _0805DE7E:
adds r1, r4
adds r0, r6, 0
bl LZDecompressWram
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
add r0, r8
ldrb r1, [r0]
lsls r1, 5
@ -1684,7 +1684,7 @@ sub_805DF38: @ 805DF38
lsls r4, 3
ldr r2, =gTrainerFrontPicTable
adds r2, r4, r2
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
movs r2, 0xBA
lsls r2, 1
@ -2308,7 +2308,7 @@ sub_805E448: @ 805E448
adds r1, r6, 0
movs r2, 0x20
bl LoadPalette
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r7, r1
ldr r0, [r4]
ldr r0, [r0, 0x8]
@ -2364,7 +2364,7 @@ _0805E51C:
lsls r0, r1, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
mov r3, r10
lsls r2, r3, 2
@ -2486,7 +2486,7 @@ _0805E618:
mov r2, r8
bl HandleLoadSpecialPokePic_DontHandleDeoxys
_0805E662:
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
mov r2, r10
lsls r1, r2, 2
@ -2554,7 +2554,7 @@ _0805E662:
adds r1, r4
mov r0, r9
bl LZDecompressWram
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
ldr r1, [sp]
adds r0, r1, r0
ldrb r1, [r0]
@ -2589,7 +2589,7 @@ _0805E70A:
adds r0, r1
mov r2, r8
strh r2, [r0, 0x2]
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
adds r1, r7, r0
ldr r3, [sp]
adds r0, r3, r0
@ -2614,7 +2614,7 @@ _0805E74A:
adds r0, r1
lsls r0, 2
adds r0, r2
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r7, r1
ldrb r1, [r1]
bl StartSpriteAnim
@ -2666,7 +2666,7 @@ _0805E814:
beq _0805E83C
ldr r0, =gUnknown_08C2CEE0
_0805E822:
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
lsls r4, 2
adds r1, 0x4
@ -2677,7 +2677,7 @@ _0805E822:
.pool
_0805E83C:
ldr r0, =gUnknown_08C2D120
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
adds r0, 0x4
adds r4, r0, r4
@ -2772,7 +2772,7 @@ refresh_graphics_maybe: @ 805E8F4
lsls r0, 2
ldr r1, =gSprites
adds r4, r0, r1
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
adds r0, r6, r0
ldrb r1, [r0]
adds r0, r4, 0
@ -3586,7 +3586,7 @@ sub_805EF84: @ 805EF84
movs r3, 0
movs r2, 0
strh r2, [r0, 0x2]
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
adds r0, r4, r0
strb r3, [r0]
cmp r1, 0
@ -3608,7 +3608,7 @@ init_uns_table_pokemon_copy: @ 805EFBC
mov r5, r8
push {r5-r7}
movs r6, 0
ldr r4, =gUnknown_020244D4
ldr r4, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r2, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
movs r2, 0xBA
lsls r2, 1
@ -3711,7 +3711,7 @@ _0805F01A:
thumb_func_start sub_805F094
sub_805F094: @ 805F094
push {r4-r6,lr}
ldr r6, =gUnknown_020244D4
ldr r6, =gBattleSpritesGfx
ldr r0, [r6]
cmp r0, 0
beq _0805F106

View File

@ -14561,7 +14561,7 @@ _08105CCC:
lsls r0, 6
bl AllocZeroed
adds r1, r0, 0
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
movs r2, 0xBE
lsls r2, 1
@ -14571,7 +14571,7 @@ _08105CCC:
bl LZDecompressWram
movs r4, 0
_08105D00:
ldr r5, =gUnknown_020244D4
ldr r5, =gBattleSpritesGfx
ldr r0, [r5]
movs r1, 0xBE
lsls r1, 1
@ -49777,7 +49777,7 @@ sub_8117C44: @ 8117C44
movs r0, 0x80
lsls r0, 6
bl AllocZeroed
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r6, =gBattleSpritesGfx
ldr r0, [r6]
movs r5, 0xBE
lsls r5, 1
@ -49866,7 +49866,7 @@ _08117CF6:
adds r4, r0, 0
adds r4, 0x10
_08117CFC:
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r2, [r1]
ldr r1, =gBattleAnimArgs
movs r3, 0x2
@ -50455,7 +50455,7 @@ battle_intro_launch: @ 81181D4
ands r0, r1
cmp r0, 0
beq _08118208
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0
@ -52081,12 +52081,12 @@ sub_8118FBC: @ 8118FBC
bl GetBankByPlayerAI
lsls r0, 24
lsrs r0, 24
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r2, [r1]
lsls r4, 2
adds r2, 0x4
adds r2, r4
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r0, r1
ldrb r1, [r0]
lsls r1, 11
@ -52189,7 +52189,7 @@ sub_8119094: @ 8119094
lsls r0, 24
mov r9, r0
ldr r4, =0x040000d4
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
lsrs r2, 22
adds r0, 0x4

View File

@ -1230,7 +1230,7 @@ sub_8064DD0: @ 8064DD0
ldr r0, =SpriteCallbackDummy
cmp r1, r0
beq _08064E1A
ldr r0, =nullsub_18
ldr r0, =SpriteCallbackDummy_2
cmp r1, r0
bne _08064E2A
_08064E1A:
@ -3655,7 +3655,7 @@ sub_80662F8: @ 80662F8
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r2, r1
ldrb r1, [r2]
bl StartSpriteAnim
@ -3850,7 +3850,7 @@ sub_8066494: @ 8066494
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
@ -4193,13 +4193,13 @@ _08066892:
cmp r0, 0
beq _080668BC
_080668AA:
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r0, 0x4F
ldrb r0, [r0]
b _0806694C
.pool
_080668BC:
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r0, 0x4E
ldrb r0, [r0]
b _0806694C
@ -4243,13 +4243,13 @@ _080668FE:
cmp r0, 0
beq _08066924
_08066916:
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r0, 0x51
ldrb r0, [r0]
b _0806694C
.pool
_08066924:
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r0, 0x50
ldrb r0, [r0]
b _0806694C
@ -4280,7 +4280,7 @@ _0806694C:
lsls r1, 24
lsrs r1, 24
mov r0, r8
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
mov r9, r7
ldr r1, =gUnknown_083054E0
@ -4409,7 +4409,7 @@ _08066A76:
lsls r1, 24
lsrs r1, 24
mov r0, r8
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r0, =gUnknown_0202499C
ldr r2, =gUnknown_083054E0
mov r3, r8

View File

@ -3237,7 +3237,7 @@ sub_814CB0C: @ 814CB0C
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r2, r1
ldrb r1, [r2]
bl StartSpriteAnim
@ -3419,7 +3419,7 @@ sub_814CC98: @ 814CC98
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
@ -3703,7 +3703,7 @@ _0814D002:
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
mov r8, r7
ldr r0, =gUnknown_08305D2C

View File

@ -1324,7 +1324,7 @@ bx_803AEDC: @ 805FC80
ldr r0, =SpriteCallbackDummy
cmp r1, r0
beq _0805FCCA
ldr r0, =nullsub_18
ldr r0, =SpriteCallbackDummy_2
cmp r1, r0
bne _0805FCDA
_0805FCCA:
@ -3811,7 +3811,7 @@ sub_8061224: @ 8061224
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r2, r1
ldrb r1, [r2]
bl StartSpriteAnim
@ -4012,7 +4012,7 @@ sub_80613DC: @ 80613DC
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
@ -4336,7 +4336,7 @@ _080617CA:
lsls r1, 24
lsrs r1, 24
mov r0, r8
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
mov r9, r7
ldr r1, =gUnknown_083054E0
@ -4562,7 +4562,7 @@ _080619DE:
lsls r1, 24
lsrs r1, 24
mov r0, r8
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r0, =gUnknown_0202499C
ldr r2, =gUnknown_083054E0
mov r3, r8

View File

@ -7067,7 +7067,7 @@ sub_805B258: @ 805B258
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
@ -7364,7 +7364,7 @@ _0805B5E0:
ands r0, r1
cmp r0, 0
beq _0805B618
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0
@ -7413,7 +7413,7 @@ _0805B656:
bne _0805B664
b _0805B794
_0805B664:
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0
@ -7549,7 +7549,7 @@ _0805B794:
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
mov r8, r9
lsls r4, r7, 16
@ -7731,7 +7731,7 @@ _0805B926:
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r0, =gUnknown_0202499C
ldr r1, =gUnknown_08305D2C
lsls r4, 2
@ -8748,7 +8748,7 @@ sub_805C248: @ 805C248
adds r0, r1
ldr r1, =sub_80598A4
str r1, [r0]
ldr r1, =gUnknown_020244B8
ldr r1, =gBankInMenu
ldrb r0, [r2]
strb r0, [r1]
movs r3, 0
@ -8896,7 +8896,7 @@ _0805C330:
adds r0, r1
ldr r1, =sub_80597CC
str r1, [r0]
ldr r1, =gUnknown_020244B8
ldr r1, =gBankInMenu
ldrb r0, [r4]
strb r0, [r1]
_0805C3BC:

View File

@ -3812,7 +3812,7 @@ sub_81BCF58: @ 81BCF58
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r2, r1
ldrb r1, [r2]
bl StartSpriteAnim
@ -3994,7 +3994,7 @@ sub_81BD0E4: @ 81BD0E4
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
@ -4174,7 +4174,7 @@ sub_81BD37C: @ 81BD37C
mov r7, r9
mov r6, r8
push {r6,r7}
ldr r2, =gUnknown_02038BCE
ldr r2, =gPartnerTrainerId
ldrh r1, [r2]
ldr r0, =0x00000c03
cmp r1, r0
@ -4205,7 +4205,7 @@ _081BD3BE:
lsls r1, 15
adds r0, r1
lsrs r7, r0, 16
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0
@ -4220,7 +4220,7 @@ _081BD3BE:
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
mov r8, r9
lsls r4, r7, 16
@ -5823,7 +5823,7 @@ sub_81BE10C: @ 81BE10C
bl AllocSpritePalette
lsls r0, 24
lsrs r4, r0, 24
ldr r2, =gUnknown_02038BCE
ldr r2, =gPartnerTrainerId
ldrh r1, [r2]
ldr r0, =0x00000c03
cmp r1, r0

View File

@ -1211,7 +1211,7 @@ sub_8186F14: @ 8186F14
ldr r0, =SpriteCallbackDummy
cmp r1, r0
beq _08186F5E
ldr r0, =nullsub_18
ldr r0, =SpriteCallbackDummy_2
cmp r1, r0
bne _08186F6E
_08186F5E:
@ -3636,7 +3636,7 @@ sub_818843C: @ 818843C
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r2, r1
ldrb r1, [r2]
bl StartSpriteAnim
@ -3831,7 +3831,7 @@ sub_81885D8: @ 81885D8
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
@ -4093,7 +4093,7 @@ _0818892C:
lsls r1, 24
lsrs r1, 24
mov r0, r8
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
mov r9, r7
ldr r1, =gUnknown_083054E0

View File

@ -3613,7 +3613,7 @@ sub_818B8E0: @ 818B8E0
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r2, r1
ldrb r1, [r2]
bl StartSpriteAnim
@ -3795,7 +3795,7 @@ sub_818BA6C: @ 818BA6C
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
@ -4189,7 +4189,7 @@ _0818BEDC:
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
mov r8, r9
lsls r4, r7, 16

View File

@ -578,7 +578,7 @@ sub_8159800: @ 8159800
lsls r1, 24
lsrs r1, 24
adds r0, r6, 0
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r0, =gUnknown_0202499C
ldr r2, =gUnknown_08305D2C
ldr r1, [r4]
@ -923,7 +923,7 @@ sub_8159B14: @ 8159B14
adds r0, r1
ldr r1, =sub_8159660
str r1, [r0]
ldr r1, =gUnknown_020244B8
ldr r1, =gBankInMenu
ldrb r0, [r2]
strb r0, [r1]
add sp, 0x4

View File

@ -3037,7 +3037,7 @@ sub_8169EC8: @ 8169EC8
lsls r1, 24
lsrs r1, 24
movs r0, 0x6
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r0, =gUnknown_0202499C
ldr r1, =gUnknown_08305D2C
ldrb r1, [r1, 0x18]
@ -3122,7 +3122,7 @@ dp01t_07_6_: @ 8169F94
lsls r1, 24
lsrs r1, 24
movs r0, 0x6
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r0, =gUnknown_0202499C
ldr r1, =gUnknown_08305D2C
ldrb r1, [r1, 0x18]
@ -3803,7 +3803,7 @@ sub_816A57C: @ 816A57C
adds r0, r1
ldr r1, =sub_81685D4
str r1, [r0]
ldr r1, =gUnknown_020244B8
ldr r1, =gBankInMenu
ldrb r0, [r2]
strb r0, [r1]
add sp, 0x4
@ -4504,7 +4504,7 @@ sub_816AA80: @ 816AA80
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim

View File

@ -42,7 +42,7 @@ BufferStringBattle: @ 814E0C4
ldr r1, [r4]
ldrb r1, [r1, 0x9]
strb r1, [r0]
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldr r2, [r4]
ldrb r0, [r2, 0xA]
strb r0, [r1]
@ -1602,7 +1602,7 @@ _0814EF98:
ldrb r0, [r0]
cmp r0, 0
beq _0814EFE0
ldr r2, =gUnknown_0202420F
ldr r2, =gStringBank
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
@ -1611,7 +1611,7 @@ _0814EF98:
b _0814F05C
.pool
_0814EFE0:
ldr r2, =gUnknown_0202420F
ldr r2, =gStringBank
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
@ -1640,7 +1640,7 @@ _0814F014:
subs r0, r1
lsls r0, 2
adds r0, r2
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldrb r2, [r1]
ldrh r0, [r0, 0x18]
cmp r0, r2
@ -2237,11 +2237,11 @@ _0814F584:
b _0814F5C0
.pool
_0814F594:
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
_0814F596:
ldrh r0, [r0]
_0814F598:
bl sub_8162BD8
bl GetFrontierOpponentClass
_0814F59C:
lsls r0, 24
lsrs r0, 24
@ -2254,12 +2254,12 @@ _0814F5A2:
b _0814F5C0
.pool
_0814F5B4:
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
_0814F5B6:
ldrh r1, [r0]
_0814F5B8:
mov r0, sp
bl sub_8162E20
bl GetFrontierTrainerName
_0814F5BE:
mov r4, sp
_0814F5C0:
@ -2513,7 +2513,7 @@ _0814F7A4:
b _0814F8DE
.pool
_0814F7BC:
ldr r1, =gUnknown_085CBE00
ldr r1, =gStatNamesTable
adds r0, r5, r7
ldrb r0, [r0, 0x1]
lsls r0, 2
@ -2606,7 +2606,7 @@ _0814F858:
subs r0, r1
lsls r0, 2
adds r0, r2
ldr r1, =gUnknown_0202420F
ldr r1, =gStringBank
ldrb r2, [r1]
ldrh r0, [r0, 0x18]
cmp r0, r2

View File

@ -75,7 +75,7 @@ task_add_01_battle_start: @ 80B065C
adds r1, r2
strh r4, [r1, 0xA]
adds r0, r5, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
pop {r4,r5}
pop {r0}
bx r0
@ -1359,7 +1359,7 @@ sub_80B1158: @ 80B1158
movs r3, 0
bl sub_80F9244
bl ResetTasks
bl sub_806E64C
bl PlayBattleBGM
ldr r0, =sub_80B11A8
bl SetMainCallback2
movs r0, 0

View File

@ -1855,13 +1855,13 @@ _080B3354:
cmp r0, 0
beq _080B3370
ldr r0, =0x000001dd
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
b _080B3378
.pool
_080B3370:
movs r0, 0xEE
lsls r0, 1
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
_080B3378:
ldr r0, =gSpecialVar_0x8004
ldrh r0, [r0]
@ -2025,13 +2025,13 @@ _080B34DE:
cmp r0, 0
beq _080B34FC
ldr r0, =0x000001dd
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
b _080B3504
.pool
_080B34FC:
movs r0, 0xEE
lsls r0, 1
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
_080B3504:
ldr r1, =gLinkPlayers
ldr r0, =0x00002211

View File

@ -547,7 +547,7 @@ _080D7B4E:
strb r5, [r0]
bl sub_80D7988
bl init_uns_table_pokemon_copy
ldr r4, =gUnknown_020244D4
ldr r4, =gBattleSpritesGfx
ldr r0, [r4]
ldr r0, [r0]
bl Free
@ -581,7 +581,7 @@ _080D7B4E:
lsls r1, 9
adds r0, r1
strb r5, [r0]
bl sub_806E414
bl ClearBattleMonForms
bl sub_80D787C
b _080D7BF6
.pool
@ -2494,7 +2494,7 @@ _080D8DC4:
mov r4, r8
lsls r4, 2
mov r10, r4
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
movs r2, 0
adds r0, r1, 0x3
_080D8DD0:
@ -6741,7 +6741,7 @@ sub_80DB174: @ 80DB174
lsls r0, r5, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x4]
adds r2, r5, 0
@ -13607,7 +13607,7 @@ sub_80DE864: @ 80DE864
movs r2, 0x14
bl memset
bl sub_80A3934
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
movs r2, 0
adds r0, r1, 0x3
_080DE8A8:

View File

@ -1364,7 +1364,7 @@ _080F6454:
mov r9, r4
ldr r4, =gMonFrontPicTable
mov r12, r4
ldr r4, =gUnknown_020244D4
ldr r4, =gBattleSpritesGfx
mov r8, r4
cmp r0, 0
beq _080F648C
@ -1638,7 +1638,7 @@ _080F66DA:
lsls r0, 16
lsrs r0, 16
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
adds r5, 0x40
subs r4, 0x1
cmp r4, 0

View File

@ -581,7 +581,7 @@ sub_81302E8: @ 81302E8
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r4, =gUnknown_020244D4
ldr r4, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r4, =gBattleSpritesGfx
ldr r1, [r4]
ldr r1, [r1, 0x4]
ldr r2, [r6]

View File

@ -3688,7 +3688,7 @@ sub_8177388: @ 8177388
_081773B4:
adds r0, r4, 0
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _081773D4

View File

@ -10177,7 +10177,7 @@ _0811F146:
lsls r0, 16
lsrs r0, 16
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _0811F166
@ -11016,7 +11016,7 @@ _0811F7D8:
lsls r0, 16
lsrs r0, 16
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
lsrs r0, 24
b _0811F82C
@ -11030,7 +11030,7 @@ _0811F7EE:
lsls r0, 16
lsrs r0, 16
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
_0811F808:
movs r0, 0x1
b _0811F82C

View File

@ -218,10 +218,10 @@ sub_80714B8: @ 80714B8
lsrs r4, 16
adds r0, r4, 0
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
adds r0, r4, 0
movs r1, 0x3
bl pokedex_flag_operation
bl GetSetPokedexFlag
ldr r1, =gStringVar1
adds r0, r5, 0
bl pokemon_get_nick
@ -399,7 +399,7 @@ _08071688:
lsls r0, r4, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r2, [r1]
mov r6, r8
lsls r1, r6, 1
@ -937,7 +937,7 @@ _08071BBC:
adds r1, r7, 0
movs r2, 0
movs r3, 0x1
bl sub_806ED40
bl DoMonFrontSpriteAnimation
ldr r1, [r5]
b _08071DC8
.pool

View File

@ -235,7 +235,7 @@ evolution_cutscene: @ 813DA8C
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r2, =gUnknown_020244D4
ldr r2, =gBattleSpritesGfx
ldr r1, [r2]
ldr r1, [r1, 0x8]
adds r2, r5, 0
@ -272,7 +272,7 @@ evolution_cutscene: @ 813DA8C
adds r6, r7, 0
adds r6, 0x1C
adds r0, r1, r6
ldr r2, =nullsub_18
ldr r2, =SpriteCallbackDummy_2
str r2, [r0]
adds r1, r7
ldrb r2, [r1, 0x5]
@ -291,7 +291,7 @@ evolution_cutscene: @ 813DA8C
lsls r0, r1, 3
ldr r2, =gMonFrontPicTable
adds r0, r2
ldr r2, =gUnknown_020244D4
ldr r2, =gBattleSpritesGfx
ldr r1, [r2]
ldr r1, [r1, 0x10]
mov r2, r10
@ -325,7 +325,7 @@ evolution_cutscene: @ 813DA8C
adds r1, r3
lsls r1, 2
adds r6, r1, r6
ldr r2, =nullsub_18
ldr r2, =SpriteCallbackDummy_2
str r2, [r6]
adds r1, r7
ldrb r0, [r1, 0x5]
@ -492,7 +492,7 @@ sub_813DD7C: @ 813DD7C
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x10]
adds r2, r5, 0
@ -528,7 +528,7 @@ sub_813DD7C: @ 813DD7C
adds r0, r3, 0
adds r0, 0x1C
adds r0, r1, r0
ldr r2, =nullsub_18
ldr r2, =SpriteCallbackDummy_2
str r2, [r0]
adds r1, r3
ldrb r2, [r1, 0x5]
@ -697,7 +697,7 @@ _0813E0A8:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x10]
adds r2, r6, 0
@ -736,7 +736,7 @@ _0813E0F0:
adds r0, r3, 0
adds r0, 0x1C
adds r0, r1, r0
ldr r2, =nullsub_18
ldr r2, =SpriteCallbackDummy_2
str r2, [r0]
adds r1, r3
ldrb r2, [r1, 0x5]
@ -867,7 +867,7 @@ sub_813E1D4: @ 813E1D4
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r5, 0
@ -903,7 +903,7 @@ sub_813E1D4: @ 813E1D4
adds r0, r3, 0
adds r0, 0x1C
adds r0, r1, r0
ldr r2, =nullsub_18
ldr r2, =SpriteCallbackDummy_2
str r2, [r0]
adds r1, r3
ldrb r2, [r1, 0x5]
@ -1142,13 +1142,13 @@ _0813E4A0:
lsls r0, 16
lsrs r0, 16
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
ldrh r0, [r4, 0xC]
bl SpeciesToNationalPokedexNum
lsls r0, 16
lsrs r0, 16
movs r1, 0x3
bl pokedex_flag_operation
bl GetSetPokedexFlag
mov r0, r9
movs r1, 0xB
bl GetMonData
@ -1647,19 +1647,19 @@ _0813E99E:
ldrh r1, [r4, 0xA]
ldrh r2, [r4, 0xC]
mov r0, r9
bl sub_806D778
bl EvolutionRenameMon
ldrh r0, [r4, 0xC]
bl SpeciesToNationalPokedexNum
lsls r0, 16
lsrs r0, 16
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
ldrh r0, [r4, 0xC]
bl SpeciesToNationalPokedexNum
lsls r0, 16
lsrs r0, 16
movs r1, 0x3
bl pokedex_flag_operation
bl GetSetPokedexFlag
movs r0, 0xE
bl IncrementGameStat
b _0813F1A4
@ -2831,19 +2831,19 @@ _0813F4F2:
ldrh r1, [r4, 0xA]
ldrh r2, [r4, 0xC]
mov r0, r9
bl sub_806D778
bl EvolutionRenameMon
ldrh r0, [r4, 0xC]
bl SpeciesToNationalPokedexNum
lsls r0, 16
lsrs r0, 16
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
ldrh r0, [r4, 0xC]
bl SpeciesToNationalPokedexNum
lsls r0, 16
lsrs r0, 16
movs r1, 0x3
bl pokedex_flag_operation
bl GetSetPokedexFlag
movs r0, 0xE
bl IncrementGameStat
b _0813FCC4
@ -4182,7 +4182,7 @@ sub_81401E0: @ 81401E0
adds r0, r2
movs r2, 0
movs r3, 0
bl sub_806ED40
bl DoMonFrontSpriteAnimation
pop {r0}
bx r0
.pool

View File

@ -3214,14 +3214,14 @@ _08175176:
adds r0, r2, 0
movs r2, 0x1
movs r3, 0x3
bl sub_806ED40
bl DoMonFrontSpriteAnimation
b _0817519C
_08175190:
lsrs r1, 16
adds r0, r2, 0
movs r2, 0
movs r3, 0x3
bl sub_806ED40
bl DoMonFrontSpriteAnimation
_0817519C:
pop {r4}
pop {r0}

View File

@ -2357,7 +2357,7 @@ ItemUseInBattle_PokeBall: @ 80FE394
lsls r0, 24
lsrs r4, r0, 24
adds r5, r4, 0
bl PlayerPartyAndPokemonStorageFull
bl IsPlayerPartyAndPokemonStorageFull
lsls r0, 24
cmp r0, 0
bne _080FE3D0
@ -2487,7 +2487,7 @@ ItemUseInBattle_StatIncrease: @ 80FE4B8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gBattlePartyID
ldr r0, =gUnknown_020244B8
ldr r0, =gBankInMenu
ldrb r0, [r0]
lsls r0, 1
adds r0, r1

View File

@ -21076,7 +21076,7 @@ sub_8014210: @ 8014210
str r0, [r1, 0x8]
ldr r0, =gBattleTypeFlags
str r6, [r0]
bl sub_806E64C
bl PlayBattleBGM
pop {r4-r6}
pop {r0}
bx r0

View File

@ -3940,7 +3940,7 @@ AddBirchSpeechObjects: @ 803192C
strb r1, [r2]
strh r0, [r5, 0x1A]
movs r0, 0x3C
bl TrainerClassToTrainerPic
bl sub_806EFF0
lsls r0, 24
lsrs r0, 24
ldr r4, =0x0201c000
@ -3970,7 +3970,7 @@ AddBirchSpeechObjects: @ 803192C
strb r1, [r2, 0x5]
strh r0, [r5, 0x1C]
movs r0, 0x3F
bl TrainerClassToTrainerPic
bl sub_806EFF0
lsls r0, 24
lsrs r0, 24
ldr r1, =0x0201c000

View File

@ -669,7 +669,7 @@ sub_8153CC8: @ 8153CC8
cmp r4, r0
bne _08153D18
ldr r0, =gStringVar1
ldr r1, =gUnknown_085E8264
ldr r1, =gEggNickname
movs r2, 0xB
bl StringCopyN
b _08153D22
@ -711,10 +711,10 @@ _08153D4C:
lsrs r4, 16
adds r0, r4, 0
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
adds r0, r4, 0
movs r1, 0x3
bl pokedex_flag_operation
bl GetSetPokedexFlag
_08153D86:
adds r0, r7, 0
movs r1, 0xC

View File

@ -322,7 +322,7 @@ _08179E48:
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r5, 0
@ -889,7 +889,7 @@ sub_817A358: @ 817A358
movs r1, 0x1
strb r1, [r0]
adds r0, r4, 0
bl sub_806E840
bl IsPokeSpriteNotFlipped
lsls r0, 24
cmp r0, 0
bne _0817A402

View File

@ -2450,7 +2450,7 @@ _080BC976:
strh r0, [r1]
ldrh r0, [r5, 0x4]
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
mov r3, r8
ldr r2, [r3]
adds r2, r4
@ -2465,7 +2465,7 @@ _080BC976:
strb r0, [r2, 0x2]
ldrh r0, [r5, 0x4]
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
mov r1, r8
ldr r3, [r1]
adds r3, r4
@ -2520,7 +2520,7 @@ _080BCA1A:
strh r0, [r6, 0x4]
ldrh r0, [r6, 0x4]
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
adds r7, r4, 0
cmp r0, 0
@ -2541,7 +2541,7 @@ _080BCA36:
strh r0, [r1]
ldrh r0, [r6, 0x4]
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
mov r1, r8
ldr r2, [r1]
adds r2, r4
@ -2558,7 +2558,7 @@ _080BCA36:
strb r0, [r2, 0x2]
ldrh r0, [r6, 0x4]
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
mov r2, r8
ldr r3, [r2]
adds r3, r4
@ -2625,7 +2625,7 @@ _080BCADA:
bhi _080BCB58
ldrh r0, [r5, 0x4]
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080BCB58
@ -2646,7 +2646,7 @@ _080BCADA:
strb r0, [r2, 0x2]
ldrh r0, [r5, 0x4]
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
mov r1, r8
ldr r3, [r1]
adds r1, r3, r6
@ -2701,7 +2701,7 @@ _080BCB82:
bhi _080BCBE2
ldrh r0, [r5, 0x4]
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080BCBE2
@ -2768,7 +2768,7 @@ _080BCC16:
bhi _080BCC7E
ldrh r0, [r5, 0x4]
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080BCC7E
@ -2833,7 +2833,7 @@ _080BCCAA:
bhi _080BCD0A
ldrh r0, [r5, 0x4]
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080BCD0A
@ -2900,7 +2900,7 @@ _080BCD3E:
bhi _080BCDA6
ldrh r0, [r5, 0x4]
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080BCDA6
@ -9408,9 +9408,9 @@ _080C065C:
.pool
thumb_func_end GetPokedexHeightWeight
thumb_func_start pokedex_flag_operation
@ u8 pokedex_flag_operation(u16 nationalPokedexNum, u8 op)
pokedex_flag_operation: @ 80C0664
thumb_func_start GetSetPokedexFlag
@ u8 GetSetPokedexFlag(u16 nationalPokedexNum, u8 op)
GetSetPokedexFlag: @ 80C0664
push {r4-r7,lr}
lsls r0, 16
lsls r1, 24
@ -9595,7 +9595,7 @@ _080C07E8:
pop {r1}
bx r1
.pool
thumb_func_end pokedex_flag_operation
thumb_func_end GetSetPokedexFlag
thumb_func_start pokedex_count
pokedex_count: @ 80C07F4
@ -9625,7 +9625,7 @@ _080C081A:
lsrs r0, 16
movs r1, 0x1
_080C0822:
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080C0832
@ -9675,7 +9675,7 @@ _080C086C:
lsrs r0, 16
movs r1, 0x1
_080C087C:
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080C088C
@ -9719,7 +9719,7 @@ _080C08BC:
lsrs r0, 16
movs r1, 0x1
_080C08C4:
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080C08D4
@ -9750,7 +9750,7 @@ _080C08E8:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
bne _080C0908
@ -9777,7 +9777,7 @@ _080C091C:
lsrs r4, r0, 16
adds r0, r4, 0
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
bne _080C0934
@ -9804,7 +9804,7 @@ _080C0948:
lsrs r4, r0, 16
adds r0, r4, 0
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080C0996
@ -9818,7 +9818,7 @@ _080C0964:
lsrs r4, r0, 16
adds r0, r4, 0
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080C0996
@ -9833,7 +9833,7 @@ _080C0982:
lsrs r4, r0, 16
adds r0, r4, 0
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
bne _080C09A0

View File

@ -7,235 +7,6 @@
thumb_func_start sub_8068338
sub_8068338: @ 8068338
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x58
adds r7, r0, 0
adds r6, r1, 0
lsls r2, 24
lsrs r2, 24
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r1, =0x00000ca9
adds r0, r1
ldrb r1, [r0]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _08068374
lsls r0, r1, 30
lsrs r0, 30
bl sub_8165C90
lsls r0, 24
lsrs r3, r0, 24
b _0806837C
.pool
_08068374:
movs r3, 0x32
cmp r2, 0
bne _0806837C
ldrb r3, [r6, 0xC]
_0806837C:
ldrh r1, [r6]
movs r2, 0x1
str r2, [sp]
ldr r0, [r6, 0x1C]
str r0, [sp, 0x4]
str r2, [sp, 0x8]
ldr r0, [r6, 0x14]
str r0, [sp, 0xC]
adds r0, r7, 0
adds r2, r3, 0
movs r3, 0
bl CreateMon
movs r5, 0
movs r0, 0xD
adds r0, r6
mov r10, r0
adds r1, r6, 0x2
str r1, [sp, 0x38]
adds r0, r6, 0
adds r0, 0x2B
str r0, [sp, 0x34]
adds r1, 0x1E
str r1, [sp, 0x54]
add r0, sp, 0x30
mov r9, r0
subs r1, 0x12
str r1, [sp, 0x3C]
adds r0, r6, 0
adds r0, 0xF
str r0, [sp, 0x40]
adds r1, 0x2
str r1, [sp, 0x44]
adds r0, 0x2
str r0, [sp, 0x48]
adds r1, 0x2
str r1, [sp, 0x4C]
adds r0, 0x2
str r0, [sp, 0x50]
movs r1, 0x31
add r1, sp
mov r8, r1
adds r4, r6, 0x4
_080683D2:
ldrh r1, [r4]
lsls r2, r5, 24
lsrs r2, 24
adds r0, r7, 0
bl SetMonMoveSlot
adds r4, 0x2
adds r5, 0x1
cmp r5, 0x3
ble _080683D2
adds r0, r7, 0
movs r1, 0x15
mov r2, r10
bl SetMonData
adds r0, r7, 0
movs r1, 0xC
ldr r2, [sp, 0x38]
bl SetMonData
adds r0, r7, 0
movs r1, 0x20
ldr r2, [sp, 0x34]
bl SetMonData
add r0, sp, 0x10
ldr r1, [sp, 0x54]
bl StringCopy
add r0, sp, 0x10
ldrb r0, [r0]
cmp r0, 0xFC
bne _0806842A
add r0, sp, 0x10
ldrb r0, [r0, 0x1]
cmp r0, 0x15
bne _0806842A
movs r0, 0x1
mov r1, r9
strb r0, [r1]
add r0, sp, 0x10
bl StripExtCtrlCodes
b _08068430
_0806842A:
movs r0, 0x2
mov r1, r9
strb r0, [r1]
_08068430:
adds r0, r7, 0
movs r1, 0x3
mov r2, r9
bl SetMonData
adds r0, r7, 0
movs r1, 0x2
add r2, sp, 0x10
bl SetMonData
adds r0, r7, 0
movs r1, 0x1A
ldr r2, [sp, 0x3C]
bl SetMonData
adds r0, r7, 0
movs r1, 0x1B
ldr r2, [sp, 0x40]
bl SetMonData
adds r0, r7, 0
movs r1, 0x1C
ldr r2, [sp, 0x44]
bl SetMonData
adds r0, r7, 0
movs r1, 0x1D
ldr r2, [sp, 0x48]
bl SetMonData
adds r0, r7, 0
movs r1, 0x1E
ldr r2, [sp, 0x4C]
bl SetMonData
adds r0, r7, 0
movs r1, 0x1F
ldr r2, [sp, 0x50]
bl SetMonData
ldrb r0, [r6, 0x1B]
lsrs r0, 7
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x2E
mov r2, r8
bl SetMonData
ldrb r0, [r6, 0x18]
lsls r0, 27
lsrs r0, 27
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x27
mov r2, r8
bl SetMonData
ldrh r0, [r6, 0x18]
lsls r0, 22
lsrs r0, 27
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x28
mov r2, r8
bl SetMonData
ldrb r0, [r6, 0x19]
lsls r0, 25
lsrs r0, 27
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x29
mov r2, r8
bl SetMonData
ldr r0, [r6, 0x18]
lsls r0, 12
lsrs r0, 27
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x2A
mov r2, r8
bl SetMonData
ldrh r0, [r6, 0x1A]
lsls r0, 23
lsrs r0, 27
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x2B
mov r2, r8
bl SetMonData
ldrb r0, [r6, 0x1B]
lsls r0, 26
lsrs r0, 27
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x2C
mov r2, r8
bl SetMonData
adds r0, r7, 0
bl MonRestorePP
adds r0, r7, 0
bl CalculateMonStats
add sp, 0x58
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8068338
thumb_func_start sub_8068528
sub_8068528: @ 8068528
push {r4-r7,lr}
@ -284,7 +55,7 @@ sub_8068528: @ 8068528
subs r0, 0x1
lsls r0, 24
lsrs r0, 24
bl sub_8165C90
bl BattleFrontierGetOpponentLvl
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
@ -823,8 +594,8 @@ _08068A02:
.pool
thumb_func_end sub_80688F8
thumb_func_start get_pokemon_data_3
get_pokemon_data_3: @ 8068A10
thumb_func_start GetDeoxysStat
GetDeoxysStat: @ 8068A10
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
@ -895,7 +666,7 @@ _08068A9A:
pop {r1}
bx r1
.pool
thumb_func_end get_pokemon_data_3
thumb_func_end GetDeoxysStat
thumb_func_start sub_8068AA4
sub_8068AA4: @ 8068AA4
@ -1012,7 +783,7 @@ _08068B78:
lsls r2, 1
adds r2, r0
ldrh r0, [r2]
bl TrainerClassToTrainerPic
bl sub_806EFF0
lsls r0, 16
lsrs r0, 16
pop {r1}
@ -1056,7 +827,7 @@ _08068BE0:
ldrb r0, [r1, 0x13]
lsls r0, 3
orrs r2, r0
ldr r1, =gTrainerClassNameIndices
ldr r1, =gTrainerClassToNameIndex
ldr r0, =gUnknown_08329D54
lsls r2, 1
adds r2, r0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -89,8 +89,8 @@ _0817F528:
.pool
thumb_func_end sub_817F498
thumb_func_start sub_817F544
sub_817F544: @ 817F544
thumb_func_start LaunchAnimationTaskForFrontSprite
LaunchAnimationTaskForFrontSprite: @ 817F544
push {r4,r5,lr}
adds r5, r0, 0
lsls r4, r1, 24
@ -113,7 +113,7 @@ sub_817F544: @ 817F544
pop {r0}
bx r0
.pool
thumb_func_end sub_817F544
thumb_func_end LaunchAnimationTaskForFrontSprite
thumb_func_start sub_817F578
sub_817F578: @ 817F578
@ -130,8 +130,8 @@ sub_817F578: @ 817F578
.pool
thumb_func_end sub_817F578
thumb_func_start sub_817F594
sub_817F594: @ 817F594
thumb_func_start LaunchAnimationTaskForBackSprite
LaunchAnimationTaskForBackSprite: @ 817F594
push {r4-r6,lr}
adds r5, r0, 0
lsls r6, r1, 24
@ -178,7 +178,7 @@ sub_817F594: @ 817F594
pop {r0}
bx r0
.pool
thumb_func_end sub_817F594
thumb_func_end LaunchAnimationTaskForBackSprite
thumb_func_start sub_817F60C
sub_817F60C: @ 817F60C

View File

@ -77,7 +77,7 @@ ExecuteTableBasedItemEffect: @ 806BD28
cmp r0, 0
beq _0806BDA8
ldr r2, =gEnigmaBerries
ldr r0, =gUnknown_020244B8
ldr r0, =gBankInMenu
ldrb r1, [r0]
lsls r0, r1, 3
subs r0, r1
@ -100,8 +100,8 @@ _0806BDBC:
lsrs r0, 24
_0806BDC4:
str r0, [sp, 0x34]
ldr r1, =gUnknown_0202420F
ldr r0, =gUnknown_020244B8
ldr r1, =gStringBank
ldr r0, =gBankInMenu
ldrb r2, [r0]
strb r2, [r1]
ldr r0, =gMain

View File

@ -883,7 +883,7 @@ _081854E2:
ldr r2, =0x000004f6
adds r0, r7, r2
strh r1, [r0]
ldr r3, =gUnknown_02038BCE
ldr r3, =gPartnerTrainerId
ldrh r1, [r3]
movs r4, 0x9F
lsls r4, 3
@ -1196,7 +1196,7 @@ _081857B6:
b _08185856
.pool
_081857E4:
ldr r3, =gUnknown_02038BCE
ldr r3, =gPartnerTrainerId
ldrh r3, [r3]
adds r0, r1, r3
lsls r0, 16
@ -1207,7 +1207,7 @@ _081857E4:
ldr r4, =0x00000504
adds r3, r7, r4
mov r10, r9
ldr r5, =gUnknown_02038BCE
ldr r5, =gPartnerTrainerId
mov r12, r5
ldr r0, =0xfffffed4
mov r8, r0
@ -1231,7 +1231,7 @@ _08185804:
ble _08185804
mov r0, r9
ldr r1, [r0]
ldr r2, =gUnknown_02038BCE
ldr r2, =gPartnerTrainerId
ldrh r0, [r2]
ldr r3, =0xfffffed4
adds r0, r3
@ -1246,7 +1246,7 @@ _08185804:
strb r1, [r0]
mov r0, r9
ldr r1, [r0]
ldr r4, =gUnknown_02038BCE
ldr r4, =gPartnerTrainerId
ldrh r0, [r4]
adds r0, r3
muls r0, r2
@ -1374,7 +1374,7 @@ _08185936:
b _081859AC
.pool
_0818597C:
ldr r3, =gUnknown_02038BCE
ldr r3, =gPartnerTrainerId
ldrh r0, [r3]
cmp r0, r1
bls _081859C0
@ -1395,7 +1395,7 @@ _0818597C:
adds r1, r7, r5
strb r0, [r1]
ldr r2, [r4]
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
adds r1, r3
_081859AC:
@ -1546,7 +1546,7 @@ sub_8185AB0: @ 8185AB0
strh r1, [r0]
ldr r0, =gTrainerBattleOpponent_B
strh r1, [r0]
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
strh r1, [r0]
bl sub_8185EFC
ldr r0, =gUnknown_0203C7B0
@ -1725,7 +1725,7 @@ _08185C2A:
adds r0, r7, r3
ldrh r0, [r0]
strh r0, [r1]
ldr r1, =gUnknown_02038BCE
ldr r1, =gPartnerTrainerId
adds r2, 0x4
adds r0, r7, r2
ldrh r0, [r0]
@ -1905,7 +1905,7 @@ sub_8185E24: @ 8185E24
ldr r0, =gUnknown_0203C7B0
str r5, [r0]
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
ldr r0, =sub_8185E8C
bl SetMainCallback2
_08185E6E:

View File

@ -265,7 +265,7 @@ _080A94F8:
bl sub_805EE54
_080A955C:
ldr r1, =gUnknown_020244AC
ldr r0, =gUnknown_020244B8
ldr r0, =gBankInMenu
ldrb r0, [r0]
adds r0, r1
ldrb r0, [r0]
@ -587,7 +587,7 @@ _080A9786:
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r7, r1
ldrb r1, [r1]
bl StartSpriteAnim
@ -616,7 +616,7 @@ _080A986C:
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r6, =gUnknown_0202499C
ldr r1, =gUnknown_08305D2C
ldr r0, [r5]
@ -654,7 +654,7 @@ _080A98D0:
lsls r1, 24
lsrs r1, 24
movs r0, 0x6
bl template_build_for_pokemon_or_trainer
bl sub_806A12C
ldr r5, =gUnknown_0202499C
ldr r0, =gUnknown_08305D2C
ldrb r0, [r0, 0x18]
@ -804,7 +804,7 @@ _080A998C:
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r7, r1
ldrb r1, [r1]
bl StartSpriteAnim

View File

@ -76,7 +76,7 @@ _080326B8:
movs r5, 0
str r5, [r0]
bl sub_80A3934
bl sub_806E414
bl ClearBattleMonForms
movs r0, 0xF
bl BattleAI_HandleItemUseBeforeAISetup
ldr r0, =gBattleTypeFlags
@ -2619,7 +2619,7 @@ dp01_build_cmdbuf_x10_TODO: @ 8033BE4
adds r0, 0xB1
ldrb r0, [r0]
strb r0, [r3, 0x9]
ldr r0, =gUnknown_0202420F
ldr r0, =gStringBank
ldrb r0, [r0]
strb r0, [r3, 0xA]
ldr r3, =gBattleMoves

View File

@ -4566,7 +4566,7 @@ _08137B7C:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
bne _08137BEA
@ -4576,7 +4576,7 @@ _08137B7C:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
bne _08137BEA
@ -4590,7 +4590,7 @@ _08137BB8:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _08137C04
@ -4600,7 +4600,7 @@ _08137BB8:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _08137C04
@ -11184,7 +11184,7 @@ sub_813B21C: @ 813B21C
lsls r0, 24
cmp r0, 0
bne _0813B258
bl get_preferred_box
bl StorageGetCurrentBox
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
@ -11215,7 +11215,7 @@ sub_813B260: @ 813B260
lsls r0, 24
lsrs r0, 24
bl set_unknown_box_id
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r4, r0, 24
_0813B278:
@ -11226,7 +11226,7 @@ _0813B27E:
lsls r1, r5, 24
lsrs r1, 24
lsrs r0, r6, 24
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
movs r1, 0xB
movs r2, 0
bl GetBoxMonData
@ -11257,7 +11257,7 @@ _0813B2C0:
bne _0813B2CE
movs r4, 0
_0813B2CE:
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
cmp r4, r0

View File

@ -2524,7 +2524,7 @@ _08036208:
ands r1, r0
cmp r1, 0
beq _08036224
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0

View File

@ -1317,7 +1317,7 @@ _08072D86:
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalStringN
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1333,7 +1333,7 @@ _08072D86:
lsls r0, 2
adds r5, r0, r1
_08072DB8:
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1536,7 +1536,7 @@ _08072F52:
ldr r1, =gUnknown_085E8D3E
bl StringCopy
_08072F82:
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1556,7 +1556,7 @@ _08072F82:
_08072FA6:
cmp r4, 0x2
bhi _08072FF0
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
movs r2, 0xBA
lsls r2, 1
@ -1579,7 +1579,7 @@ _08072FA6:
b _0807301A
.pool
_08072FF0:
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
movs r1, 0xBA
lsls r1, 1
@ -1609,7 +1609,7 @@ _08073024:
mov r3, r8
cmp r3, 0
bne _08073084
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r5, =gBattleSpritesGfx
ldr r0, [r5]
movs r2, 0xBA
lsls r2, 1
@ -3922,7 +3922,7 @@ sub_8074310: @ 8074310
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _080743E6
@ -8234,7 +8234,7 @@ _080766BA:
adds r0, r2, 0
movs r2, 0x1
movs r3, 0
bl sub_806ED40
bl DoMonFrontSpriteAnimation
b _08076708
.pool
_080766FC:
@ -8242,7 +8242,7 @@ _080766FC:
adds r0, r2, 0
movs r2, 0
movs r3, 0
bl sub_806ED40
bl DoMonFrontSpriteAnimation
_08076708:
adds r0, r4, 0
bl DestroySpriteAndFreeResources

View File

@ -263,7 +263,7 @@ _080A5E90:
cmp r5, r0
bne _080A5EB0
ldr r0, =gUnknown_08525F8C
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r4, r1
ldrb r1, [r1]
adds r1, r0
@ -353,7 +353,7 @@ _080A5F58:
cmp r5, r0
bne _080A5F7C
ldr r0, =gUnknown_08525F78
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r4, r1
ldrb r1, [r1]
lsls r1, 2
@ -407,7 +407,7 @@ sub_80A5FA0: @ 80A5FA0
cmp r4, r0
bne _080A5FE8
ldr r0, =gUnknown_08525F88
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
adds r1, r6, r1
ldrb r1, [r1]
adds r1, r0
@ -4541,7 +4541,7 @@ sub_80A7F18: @ 80A7F18
movs r4, 0
ldr r1, =gBankSpriteIds
ldr r7, =0x00000181
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
adds r6, r5, r0
_080A7F38:
adds r0, r4, r1
@ -5155,7 +5155,7 @@ sub_80A8394: @ 80A8394
bl AllocSpritePalette
lsls r0, 24
lsrs r5, r0, 24
ldr r4, =gUnknown_020244D4
ldr r4, =gBattleSpritesGfx
ldr r0, [r4]
cmp r0, 0
beq _080A8412
@ -5213,7 +5213,7 @@ _080A845E:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
movs r2, 0xBE
lsls r2, 1
@ -5276,7 +5276,7 @@ _080A84F6:
lsls r0, r6, 3
ldr r1, =gMonBackPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
movs r3, 0xBE
lsls r3, 1
@ -5305,7 +5305,7 @@ _080A8524:
mov r3, r8
bl LoadSpecialPokePic_2
_080A8540:
ldr r5, =gUnknown_020244D4
ldr r5, =gBattleSpritesGfx
ldr r0, [r5]
movs r4, 0xBE
lsls r4, 1
@ -5658,7 +5658,7 @@ _080A882E:
cmp r7, r0
bne _080A8850
_080A8834:
ldr r0, =gUnknown_020244E4
ldr r0, =gBattleMonForms
add r0, r8
ldrb r0, [r0]
lsls r0, 2

View File

@ -1763,7 +1763,7 @@ _080C7DA8:
bl CreateTask
ldr r1, [r4]
strb r0, [r1, 0x4]
bl get_preferred_box
bl StorageGetCurrentBox
ldr r1, =gUnknown_02039D10
strb r0, [r1]
ldr r0, =c2_Box
@ -2102,7 +2102,7 @@ _080C80EC:
bl sub_80CA704
b _080C8198
_080C80F2:
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
bl sub_80CC32C
@ -2459,7 +2459,7 @@ _080C8440:
_080C844C:
movs r0, 0x5
bl PlaySE
bl get_preferred_box
bl StorageGetCurrentBox
ldr r4, =gUnknown_02039D08
ldr r1, [r4]
lsls r0, 24
@ -2483,7 +2483,7 @@ _080C846E:
_080C8484:
movs r0, 0x5
bl PlaySE
bl get_preferred_box
bl StorageGetCurrentBox
ldr r4, =gUnknown_02039D08
ldr r1, [r4]
lsls r0, 24
@ -4859,7 +4859,7 @@ _080C99FE:
movs r1, 0xA
movs r3, 0x3
bl sub_80C77E8
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
bl sub_80C78D4
@ -4888,7 +4888,7 @@ _080C9A2C:
cmp r0, 0xC9
beq _080C9A6C
adds r4, r0, 0
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
cmp r4, r0
@ -5421,7 +5421,7 @@ _080C9F04:
.pool
_080C9F1C:
bl sub_80C9FC8
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
bl sav3_get_box_name
@ -6895,7 +6895,7 @@ _080CABDA:
sub_80CABE0: @ 80CABE0
push {r4,lr}
ldr r4, =gUnknown_02039D10
bl get_preferred_box
bl StorageGetCurrentBox
ldrb r1, [r4]
lsls r0, 24
lsrs r0, 24
@ -6904,7 +6904,7 @@ sub_80CABE0: @ 80CABE0
ldr r0, =0x000008d7
bl FlagReset
ldr r4, =0x00004036
bl get_preferred_box
bl StorageGetCurrentBox
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -10143,7 +10143,7 @@ sub_80CC644: @ 80CC644
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r1, r0, 24
movs r2, 0
@ -10180,7 +10180,7 @@ sub_80CC680: @ 80CC680
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
adds r1, r4, 0
@ -10244,7 +10244,7 @@ _080CC718:
lsls r0, 24
cmp r0, 0
bne _080CC794
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
movs r1, 0
@ -11229,7 +11229,7 @@ _080CCF96:
thumb_func_start sub_80CCF9C
sub_80CCF9C: @ 80CCF9C
push {lr}
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
bl sub_80D20F8
@ -12975,7 +12975,7 @@ _080CDDFE:
b _080CDE2A
.pool
_080CDE20:
bl get_preferred_box
bl StorageGetCurrentBox
ldr r1, [r4]
ldr r2, =0x00000d91
adds r1, r2
@ -13141,7 +13141,7 @@ _080CDF68:
ldrb r0, [r0]
cmp r0, 0
bne _080CDF8E
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
ldr r4, =gUnknown_02039D79
@ -13182,7 +13182,7 @@ sub_80CDFAC: @ 80CDFAC
b _080CDFF8
.pool
_080CDFDC:
bl get_preferred_box
bl StorageGetCurrentBox
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
@ -13417,7 +13417,7 @@ _080CE1DC:
ldrb r0, [r5]
bl sub_80CBB68
_080CE1F6:
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
cmp r6, r0
@ -13539,7 +13539,7 @@ _080CE2F0:
b _080CE30C
.pool
_080CE304:
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r2, r0, 24
_080CE30C:
@ -13687,7 +13687,7 @@ _080CE418:
b _080CE488
.pool
_080CE464:
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
ldr r1, =gUnknown_02039D79
@ -13697,7 +13697,7 @@ _080CE464:
ldr r3, =0x00002108
adds r2, r3
bl sub_80D2054
bl get_preferred_box
bl StorageGetCurrentBox
ldr r1, [r4]
ldr r2, =0x00002170
adds r1, r2
@ -14140,11 +14140,11 @@ _080CE838:
b _080CE8CA
.pool
_080CE894:
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
movs r1, 0
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
ldr r3, =gUnknown_02039D08
ldr r2, [r3]
ldr r4, =0x0000218c
@ -14527,12 +14527,12 @@ _080CEBB0:
bl sub_80CEC00
b _080CEBD0
_080CEBBA:
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
ldr r1, =gUnknown_02039D79
ldrb r1, [r1]
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
movs r1, 0x1
bl sub_80CEC00
_080CEBD0:
@ -14847,7 +14847,7 @@ _080CEE94:
_080CEEC0:
ldr r2, =0x00000cf9
adds r0, r1, r2
ldr r1, =gUnknown_085E8264
ldr r1, =gEggNickname
movs r2, 0
movs r3, 0x8
bl StringCopyPadded
@ -15491,7 +15491,7 @@ _080CF428:
adds r1, r0
movs r0, 0x2
strb r0, [r1]
bl get_preferred_box
bl StorageGetCurrentBox
ldr r1, =gUnknown_02039D7B
strb r0, [r1]
movs r0, 0x17
@ -18075,7 +18075,7 @@ _080D0902:
_080D0914:
adds r0, 0x1
strb r0, [r2, 0xB]
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
mov r10, r0
@ -18111,7 +18111,7 @@ _080D093C:
_080D095A:
mov r0, r10
adds r1, r5, 0
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r1, r0, 0
ldr r2, =gUnknown_02039D80
ldr r0, [r2]
@ -18161,7 +18161,7 @@ sub_80D09A4: @ 80D09A4
ldrb r0, [r0, 0xB]
adds r1, r0
mov r9, r1
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
mov r8, r0
@ -18305,7 +18305,7 @@ sub_80D0AAC: @ 80D0AAC
ldrb r0, [r0, 0xB]
adds r1, r0
str r1, [sp]
bl get_preferred_box
bl StorageGetCurrentBox
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x4]
@ -20559,15 +20559,15 @@ nullsub_98: @ 80D1D08
bx lr
thumb_func_end nullsub_98
thumb_func_start get_preferred_box
@ char get_preferred_box()
get_preferred_box: @ 80D1D0C
thumb_func_start StorageGetCurrentBox
@ char StorageGetCurrentBox()
StorageGetCurrentBox: @ 80D1D0C
ldr r0, =gPokemonStoragePtr
ldr r0, [r0]
ldrb r0, [r0]
bx lr
.pool
thumb_func_end get_preferred_box
thumb_func_end StorageGetCurrentBox
thumb_func_start sub_80D1D18
sub_80D1D18: @ 80D1D18
@ -21050,9 +21050,9 @@ _080D2088:
.pool
thumb_func_end sub_80D2054
thumb_func_start get_pokemon_by_box_and_pos
@ pokemon *get_pokemon_by_box_and_pos(u8 box_id, u8 pos)
get_pokemon_by_box_and_pos: @ 80D2094
thumb_func_start GetBoxedMonPtr
@ pokemon *GetBoxedMonPtr(u8 box_id, u8 pos)
GetBoxedMonPtr: @ 80D2094
push {r4,lr}
lsls r0, 24
lsrs r3, r0, 24
@ -21083,7 +21083,7 @@ _080D20CA:
pop {r4}
pop {r1}
bx r1
thumb_func_end get_pokemon_by_box_and_pos
thumb_func_end GetBoxedMonPtr
thumb_func_start sav3_get_box_name
sav3_get_box_name: @ 80D20D0

View File

@ -3024,12 +3024,12 @@ _0815B8E0:
lsls r0, 24
lsrs r1, r0, 24
_0815B8EA:
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r2, [r0]
lsls r0, r1, 2
adds r2, 0x4
adds r2, r0
ldr r1, =gUnknown_020244E4
ldr r1, =gBattleMonForms
ldr r0, =gAnimationBankAttacker
ldrb r0, [r0]
adds r0, r1

View File

@ -391,7 +391,7 @@ _081622B2:
adds r4, r1, r0
mov r0, r10
str r2, [sp, 0x38]
bl sub_8165C90
bl BattleFrontierGetOpponentLvl
ldrb r1, [r4]
lsls r0, 24
lsrs r0, 24
@ -1340,7 +1340,7 @@ sub_8162AA0: @ 8162AA0
lsls r0, 1
cmp r4, r0
bne _08162AD0
ldr r1, =gTrainerPicIndices
ldr r1, =gUnknown_0831F578
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r2, =0x00000bed
@ -1362,7 +1362,7 @@ _08162AE4:
ldr r0, =0x0000012b
cmp r4, r0
bhi _08162B08
ldr r2, =gTrainerPicIndices
ldr r2, =gUnknown_0831F578
ldr r0, =gUnknown_0203BC88
ldr r1, [r0]
movs r0, 0x34
@ -1383,7 +1383,7 @@ _08162B08:
ands r0, r1
cmp r0, 0
beq _08162B38
ldr r4, =gTrainerPicIndices
ldr r4, =gUnknown_0831F578
bl sub_818649C
lsls r0, 24
lsrs r0, 24
@ -1391,7 +1391,7 @@ _08162B08:
b _08162BC8
.pool
_08162B38:
ldr r3, =gTrainerPicIndices
ldr r3, =gUnknown_0831F578
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r1, =0xfffffed4
@ -1413,7 +1413,7 @@ _08162B64:
ands r0, r1
cmp r0, 0
bne _08162BB0
ldr r4, =gTrainerPicIndices
ldr r4, =gUnknown_0831F578
ldr r3, =gUnknown_08610970
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
@ -1436,7 +1436,7 @@ _08162B64:
b _08162BC8
.pool
_08162BB0:
ldr r5, =gTrainerPicIndices
ldr r5, =gUnknown_0831F578
ldr r4, =gUnknown_08610970
bl sub_81864A8
lsls r0, 24
@ -1456,8 +1456,8 @@ _08162BCA:
.pool
thumb_func_end sub_8162AA0
thumb_func_start sub_8162BD8
sub_8162BD8: @ 8162BD8
thumb_func_start GetFrontierOpponentClass
GetFrontierOpponentClass: @ 8162BD8
push {r4,r5,lr}
lsls r0, 16
lsrs r4, r0, 16
@ -1467,7 +1467,7 @@ sub_8162BD8: @ 8162BD8
lsls r0, 1
cmp r4, r0
bne _08162C08
ldr r1, =gTrainerClassNameIndices
ldr r1, =gTrainerClassToNameIndex
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r2, =0x00000bed
@ -1499,7 +1499,7 @@ _08162C38:
ldr r0, =0x0000012b
cmp r4, r0
bhi _08162C60
ldr r2, =gTrainerClassNameIndices
ldr r2, =gTrainerClassToNameIndex
ldr r0, =gUnknown_0203BC88
ldr r1, [r0]
movs r0, 0x34
@ -1521,7 +1521,7 @@ _08162C60:
ands r0, r1
cmp r0, 0
beq _08162C90
ldr r4, =gTrainerClassNameIndices
ldr r4, =gTrainerClassToNameIndex
bl sub_818649C
lsls r0, 24
lsrs r0, 24
@ -1530,7 +1530,7 @@ _08162C60:
b _08162D1E
.pool
_08162C90:
ldr r3, =gTrainerClassNameIndices
ldr r3, =gTrainerClassToNameIndex
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r1, =0xfffffed4
@ -1553,7 +1553,7 @@ _08162CBC:
ands r0, r1
cmp r0, 0
beq _08162CF4
ldr r5, =gTrainerClassNameIndices
ldr r5, =gTrainerClassToNameIndex
ldr r4, =gUnknown_08610970
bl sub_81864A8
lsls r0, 24
@ -1568,7 +1568,7 @@ _08162CBC:
b _08162D1E
.pool
_08162CF4:
ldr r4, =gTrainerClassNameIndices
ldr r4, =gTrainerClassToNameIndex
ldr r3, =gUnknown_08610970
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
@ -1594,7 +1594,7 @@ _08162D1E:
pop {r1}
bx r1
.pool
thumb_func_end sub_8162BD8
thumb_func_end GetFrontierOpponentClass
thumb_func_start sub_8162D34
sub_8162D34: @ 8162D34
@ -1697,8 +1697,8 @@ _08162E0C:
.pool
thumb_func_end sub_8162D34
thumb_func_start sub_8162E20
sub_8162E20: @ 8162E20
thumb_func_start GetFrontierTrainerName
GetFrontierTrainerName: @ 8162E20
push {r4-r6,lr}
adds r6, r0, 0
lsls r1, 16
@ -1846,7 +1846,7 @@ _08162F62:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8162E20
thumb_func_end GetFrontierTrainerName
thumb_func_start sub_8162F68
sub_8162F68: @ 8162F68
@ -3275,7 +3275,7 @@ _08163B56:
_08163B64:
movs r0, 0x2
bl sub_816306C
ldr r1, =gUnknown_02038BCE
ldr r1, =gPartnerTrainerId
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r2, =0x00000cd6
@ -3302,7 +3302,7 @@ _08163BA6:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0
b _08163E10
.pool
@ -3334,7 +3334,7 @@ _08163BC4:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0xC
b _08163E10
.pool
@ -3369,7 +3369,7 @@ _08163C18:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0xD
b _08163E10
.pool
@ -3438,7 +3438,7 @@ _08163D12:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0x4
b _08163E10
.pool
@ -3467,7 +3467,7 @@ _08163D5E:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0x5
b _08163E10
.pool
@ -3490,7 +3490,7 @@ _08163D8E:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0x6
b _08163E10
.pool
@ -3513,7 +3513,7 @@ _08163DC8:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0xA
b _08163E10
.pool
@ -3528,7 +3528,7 @@ _08163E00:
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0x7
_08163E10:
bl sub_80B100C
@ -3553,13 +3553,13 @@ _08163E2C:
strb r0, [r4]
ldr r0, =gUnknown_08224167
bl TrainerBattleConfigure
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
strh r5, [r0]
ldr r0, =sub_8163A8C
movs r1, 0x1
bl CreateTask
movs r0, 0
bl PlayNewMapMusic__default_for_battle
bl PlayMapChosenOrBattleBGM
movs r0, 0x12
bl sub_8145EF4
_08163E68:
@ -3979,7 +3979,7 @@ _081641E6:
lsls r0, r1, 24
lsrs r0, 24
str r2, [sp, 0x18]
bl sub_8165C90
bl BattleFrontierGetOpponentLvl
ldrb r1, [r4]
lsls r0, 24
lsrs r0, 24
@ -4464,7 +4464,7 @@ _081645B8:
lsls r0, r1, 24
lsrs r0, 24
str r3, [sp, 0x48]
bl sub_8165C90
bl BattleFrontierGetOpponentLvl
ldrb r1, [r4]
lsls r0, 24
lsrs r0, 24
@ -4782,7 +4782,7 @@ _081648D6:
_081648E2:
ldr r0, =gStringVar1
adds r1, r7, 0
bl sub_8162E20
bl GetFrontierTrainerName
b _08164AC2
.pool
_081648F4:
@ -4841,7 +4841,7 @@ _08164910:
ldr r0, =gStringVar3
mov r3, r10
lsrs r1, r3, 16
bl sub_8162E20
bl GetFrontierTrainerName
b _08164AC2
.pool
_08164984:
@ -4867,7 +4867,7 @@ _081649A8:
b _08164AC2
.pool
_081649BC:
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
strh r7, [r0]
ldr r0, =0x0000012b
cmp r7, r0
@ -4944,7 +4944,7 @@ _08164A60:
bl sub_8162548
lsls r0, 16
lsrs r3, r0, 16
ldr r0, =gUnknown_02038BCE
ldr r0, =gPartnerTrainerId
ldrh r0, [r0]
cmp r0, r3
beq _08164A60
@ -5340,7 +5340,7 @@ sub_8164E04: @ 8164E04
ldr r5, =gTrainerBattleOpponent_A
ldrh r1, [r5]
mov r0, sp
bl sub_8162E20
bl GetFrontierTrainerName
mov r0, sp
bl StripExtCtrlCodes
ldr r4, =gSaveBlock2Ptr
@ -5845,7 +5845,7 @@ _08165206:
thumb_func_start sub_8165244
sub_8165244: @ 8165244
ldr r1, =gTrainerPicIndices
ldr r1, =gUnknown_0831F578
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r2, =0x00000bed
@ -5859,7 +5859,7 @@ sub_8165244: @ 8165244
thumb_func_start sub_8165264
sub_8165264: @ 8165264
ldr r1, =gTrainerClassNameIndices
ldr r1, =gTrainerClassToNameIndex
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r2, =0x00000bed
@ -7104,7 +7104,7 @@ sub_8165C40: @ 8165C40
ldrb r0, [r2]
lsls r0, 30
lsrs r0, 30
bl sub_8165C90
bl BattleFrontierGetOpponentLvl
b _08165C88
.pool
_08165C84:
@ -7116,8 +7116,8 @@ _08165C88:
bx r1
thumb_func_end sub_8165C40
thumb_func_start sub_8165C90
sub_8165C90: @ 8165C90
thumb_func_start BattleFrontierGetOpponentLvl
BattleFrontierGetOpponentLvl: @ 8165C90
push {lr}
lsls r0, 24
lsrs r0, 24
@ -7138,7 +7138,7 @@ _08165CA2:
_08165CB0:
pop {r1}
bx r1
thumb_func_end sub_8165C90
thumb_func_end BattleFrontierGetOpponentLvl
thumb_func_start sub_8165CB4
sub_8165CB4: @ 8165CB4

View File

@ -4959,8 +4959,8 @@ sub_817F3F0: @ 817F3F0
bx r0
thumb_func_end sub_817F3F0
thumb_func_start sub_817F474
sub_817F474: @ 817F474
thumb_func_start GetSpeciesBackAnimId
GetSpeciesBackAnimId: @ 817F474
push {lr}
lsls r0, 16
lsrs r0, 16
@ -4979,6 +4979,6 @@ _0817F48C:
_0817F492:
pop {r1}
bx r1
thumb_func_end sub_817F474
thumb_func_end GetSpeciesBackAnimId
.align 2, 0 @ Don't pad with nop.

View File

@ -1263,13 +1263,13 @@ sub_818D97C: @ 818D97C
bne _0818D9A2
cmp r0, 0
beq _0818D99C
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r0, 0x3F
ldrb r0, [r0]
b _0818D9A2
.pool
_0818D99C:
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r0, 0x3C
ldrb r0, [r0]
_0818D9A2:

View File

@ -7171,7 +7171,7 @@ _0819270A:
ldr r4, [sp, 0x24]
cmp r4, r0
bne _08192784
ldr r0, =gTrainerClassNameIndices
ldr r0, =gTrainerClassToNameIndex
adds r0, 0x3C
ldrb r5, [r0]
b _081927A2
@ -7186,7 +7186,7 @@ _08192784:
.pool
_08192798:
ldr r0, [sp, 0x24]
bl sub_8162BD8
bl GetFrontierOpponentClass
_0819279E:
lsls r0, 24
lsrs r5, r0, 24
@ -15869,7 +15869,7 @@ _0819702E:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _08197050
@ -15882,7 +15882,7 @@ _08197050:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _0819706C
@ -40744,7 +40744,7 @@ sub_81A3DD0: @ 81A3DD0
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _081A3ED6
@ -41123,7 +41123,7 @@ _081A4112:
lsls r0, 16
lsrs r0, 16
movs r1, 0x1
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
cmp r0, 0
beq _081A412A
@ -41472,14 +41472,14 @@ _081A4450:
ldr r0, =gStringVar1
ldr r1, =gTrainerBattleOpponent_A
ldrh r1, [r1]
bl sub_8162E20
bl GetFrontierTrainerName
b _081A446E
.pool
_081A4464:
ldr r0, =gStringVar2
ldr r1, =gTrainerBattleOpponent_A
ldrh r1, [r1]
bl sub_8162E20
bl GetFrontierTrainerName
_081A446E:
pop {r0}
bx r0
@ -44244,7 +44244,7 @@ sub_81A5BE0: @ 81A5BE0
ldr r0, =gStringVar1
ldr r1, =gTrainerBattleOpponent_A
ldrh r1, [r1]
bl sub_8162E20
bl GetFrontierTrainerName
pop {r0}
bx r0
.pool
@ -52450,13 +52450,13 @@ sub_81A9F1C: @ 81A9F1C
.pool
thumb_func_end sub_81A9F1C
thumb_func_start sub_81A9F3C
sub_81A9F3C: @ 81A9F3C
thumb_func_start GetTrainerEncounterMusicIdInBattlePyramind
GetTrainerEncounterMusicIdInBattlePyramind: @ 81A9F3C
push {r4,lr}
lsls r0, 16
lsrs r0, 16
movs r4, 0
ldr r3, =gTrainerClassNameIndices
ldr r3, =gTrainerClassToNameIndex
ldr r1, =gUnknown_0203BC88
ldr r2, [r1]
movs r1, 0x34
@ -52483,7 +52483,7 @@ _081A9F7A:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_81A9F3C
thumb_func_end GetTrainerEncounterMusicIdInBattlePyramind
thumb_func_start sub_81A9F80
sub_81A9F80: @ 81A9F80
@ -80272,7 +80272,7 @@ sub_81B8A7C: @ 81B8A7C
bne _081B8AC4
_081B8AA2:
ldr r4, =gStringVar1
bl sub_806EBF8
bl GetTrainerPartnerName
adds r1, r0, 0
adds r0, r4, 0
bl StringCopy
@ -80378,7 +80378,7 @@ _081B8BA8:
movs r0, 0x1
strb r0, [r1]
ldr r1, =gBattlePartyID
ldr r0, =gUnknown_020244B8
ldr r0, =gBankInMenu
ldrb r0, [r0]
lsls r0, 1
adds r0, r1
@ -80410,7 +80410,7 @@ _081B8BFC:
b _081B8C42
.pool
_081B8C20:
ldr r0, =gUnknown_020244B8
ldr r0, =gBankInMenu
ldrb r0, [r0]
ldr r1, =gBattlePartyID
lsls r0, 1
@ -82460,7 +82460,7 @@ sub_81B9CF0: @ 81B9CF0
ldr r0, =gStringVar1
ldr r1, =gTrainerBattleOpponent_A
ldrh r1, [r1]
bl sub_8162E20
bl GetFrontierTrainerName
pop {r0}
bx r0
.pool

View File

@ -2290,7 +2290,7 @@ _081BF9EE:
strb r1, [r0]
movs r0, 0xFF
bl sub_81C488C
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
cmp r0, 0
bne _081BFA12
@ -3447,7 +3447,7 @@ sub_81C0484: @ 81C0484
movs r2, 0x80
lsls r2, 1
bl m4aMPlayVolumeControl
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r0, [r0]
cmp r0, 0
bne _081C04E2
@ -10970,7 +10970,7 @@ _081C4620:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x8]
b _081C46D6
@ -10980,12 +10980,12 @@ _081C4668:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
b _081C46B0
.pool
_081C4680:
ldr r0, =gUnknown_020244D4
ldr r0, =gBattleSpritesGfx
ldr r3, [r0]
adds r4, r0, 0
cmp r3, 0
@ -11162,7 +11162,7 @@ sub_81C47B4: @ 81C47B4
ands r0, r1
strb r0, [r7, 0x5]
ldrh r0, [r6, 0x2]
bl sub_806E840
bl IsPokeSpriteNotFlipped
lsls r0, 24
cmp r0, 0
bne _081C4828
@ -11210,7 +11210,7 @@ sub_81C4844: @ 81C4844
cmp r0, 0x1
beq _081C487E
ldrh r0, [r4, 0x2E]
bl sub_806E840
bl IsPokeSpriteNotFlipped
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x30]
@ -11218,7 +11218,7 @@ sub_81C4844: @ 81C4844
ldrh r1, [r4, 0x2E]
ldrb r2, [r5, 0x4]
adds r0, r4, 0
bl sub_806EE0C
bl PokemonSummaryDoMonAnimation
_081C487E:
pop {r4,r5}
pop {r0}
@ -23949,7 +23949,7 @@ _081CAF34:
adds r0, r5, 0
bl sub_81D1BD0
adds r4, r0, 0
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r0, r4, r0
ldrb r0, [r0]
b _081CAF6C
@ -28902,7 +28902,7 @@ sub_81CD624: @ 81CD624
bl sub_81D2C68
cmp r0, 0
beq _081CD690
ldr r1, =gUnknown_085E8264
ldr r1, =gEggNickname
adds r0, r5, 0
movs r2, 0
movs r3, 0xC
@ -28946,7 +28946,7 @@ _081CD690:
_081CD6E0:
mov r0, r8
mov r1, r9
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r4, r0, 0
bl GetBoxMonGender
lsls r0, 24
@ -33128,7 +33128,7 @@ sub_81CF8E4: @ 81CF8E4
_081CF924:
ldrb r0, [r2]
ldrb r1, [r2, 0x1]
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r4, r0, 0
bl GetBoxMonGender
lsls r0, 24
@ -34505,7 +34505,7 @@ sub_81D035C: @ 81D035C
_081D03A4:
ldrb r0, [r7]
ldrb r1, [r7, 0x1]
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r4, r0, 0
bl GetBoxMonGender
lsls r0, 24
@ -34992,7 +34992,7 @@ sub_81D06E4: @ 81D06E4
_081D0730:
ldrb r0, [r1]
ldrb r1, [r1, 0x1]
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r4, r0, 0
bl GetBoxMonGender
strb r0, [r6]
@ -35049,7 +35049,7 @@ sub_81D0760: @ 81D0760
_081D07AC:
ldrb r0, [r1]
ldrb r1, [r1, 0x1]
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r4, r0, 0
movs r1, 0xB
bl GetBoxMonData
@ -39944,7 +39944,7 @@ sub_81D2CD0: @ 81D2CD0
bl sub_81D2C68
cmp r0, 0
beq _081D2D20
ldr r1, =gUnknown_085E8264
ldr r1, =gEggNickname
adds r0, r5, 0
movs r2, 0
movs r3, 0xC
@ -39990,7 +39990,7 @@ _081D2D70:
lsrs r0, 24
lsls r1, r6, 24
lsrs r1, 24
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r4, r0, 0
bl GetBoxMonGender
lsls r0, 24
@ -44939,7 +44939,7 @@ sub_81D5530: @ 81D5530
lsls r1, 24
adds r0, r1
lsrs r0, 24
ldr r2, =gTrainerClassNameIndices
ldr r2, =gTrainerClassToNameIndex
ldr r1, =gUnknown_0203CF58
ldr r1, [r1]
adds r1, 0x16
@ -45006,7 +45006,7 @@ sub_81D5588: @ 81D5588
adds r3, r0
ldrb r4, [r3, 0x1B]
bl sub_81D5710
ldr r0, =gTrainerPicIndices
ldr r0, =gUnknown_0831F578
adds r4, r0
ldrb r0, [r4]
pop {r4}
@ -46715,7 +46715,7 @@ sub_81D63C8: @ 81D63C8
ldrb r4, [r3, 0x1B]
bl sub_81D5710
movs r2, 0
ldr r0, =gTrainerClassNameIndices
ldr r0, =gTrainerClassToNameIndex
adds r4, r0
ldrb r3, [r4]
ldr r1, =gUnknown_0862A3B4

View File

@ -5630,7 +5630,7 @@ sub_809BDD0: @ 809BDD0
lsls r4, 2
adds r4, r1
ldr r4, [r4]
bl sub_806F07C
bl GetTrainerClassNameFromId
adds r1, r0, 0
adds r0, r4, 0
bl StringCopy
@ -5658,7 +5658,7 @@ sub_809BE0C: @ 809BE0C
lsls r4, 2
adds r4, r1
ldr r4, [r4]
bl sub_806F0B0
bl GetTrainerNameFromId
adds r1, r0, 0
adds r0, r4, 0
bl StringCopy

View File

@ -710,7 +710,7 @@ _080F8D44:
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x8]
adds r2, r6, 0
@ -776,7 +776,7 @@ _080F8DD8:
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_806ED40
bl DoMonFrontSpriteAnimation
b _080F8E6C
.pool
_080F8E58:
@ -788,7 +788,7 @@ _080F8E58:
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_806ED40
bl DoMonFrontSpriteAnimation
_080F8E6C:
ldr r1, =gTasks
lsls r0, r7, 2
@ -1320,10 +1320,10 @@ sub_80F9244: @ 80F9244
blt _080F92B8
adds r0, r5, 0
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
adds r0, r5, 0
movs r1, 0x3
bl pokedex_flag_operation
bl GetSetPokedexFlag
_080F92B8:
adds r0, r4, 0
add sp, 0x78

View File

@ -288,7 +288,7 @@ sub_80773AC: @ 80773AC
ldr r0, =gMain
movs r1, 0
str r1, [r0]
ldr r0, =gUnknown_020244EA
ldr r0, =gEnemyPartyCount
strb r1, [r0]
pop {r0}
bx r0
@ -600,7 +600,7 @@ _080776A8:
adds r0, 0x36
strb r1, [r0]
ldr r0, [r2]
ldr r1, =gUnknown_020244EA
ldr r1, =gEnemyPartyCount
ldrb r1, [r1]
adds r0, 0x37
strb r1, [r0]
@ -1211,7 +1211,7 @@ _08077C6C:
adds r0, 0x36
strb r1, [r0]
ldr r0, [r4]
ldr r1, =gUnknown_020244EA
ldr r1, =gEnemyPartyCount
ldrb r1, [r1]
adds r0, 0x37
strb r1, [r0]
@ -7128,7 +7128,7 @@ _0807AD58:
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
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, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r2, [r1]
lsls r4, r6, 1
adds r1, r4, 0x1
@ -7885,11 +7885,11 @@ sub_807B464: @ 807B464
lsrs r4, 16
adds r0, r4, 0
movs r1, 0x2
bl pokedex_flag_operation
bl GetSetPokedexFlag
adds r0, r4, 0
movs r1, 0x3
adds r2, r5, 0
bl SetPokedexFlag
bl HandleSetPokedexFlag
_0807B4B8:
pop {r4,r5}
pop {r0}
@ -9588,7 +9588,7 @@ _0807C66C:
ldr r0, [r5]
adds r0, 0xF0
ldrh r0, [r0]
bl sub_806E840
bl IsPokeSpriteNotFlipped
lsls r0, 24
cmp r0, 0
bne _0807C6E4
@ -10369,7 +10369,7 @@ _0807CCEE:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x10]
ldr r3, [r3, 0x6C]
@ -11662,7 +11662,7 @@ _0807DA74:
ldr r0, [r5]
adds r0, 0xF0
ldrh r0, [r0]
bl sub_806E840
bl IsPokeSpriteNotFlipped
lsls r0, 24
cmp r0, 0
bne _0807DAEC
@ -12474,7 +12474,7 @@ _0807E13A:
lsls r0, r2, 3
ldr r1, =gMonFrontPicTable
adds r0, r1
ldr r1, =gUnknown_020244D4
ldr r1, =gBattleSpritesGfx
ldr r1, [r1]
ldr r1, [r1, 0x10]
ldr r3, [r3, 0x6C]

View File

@ -4754,7 +4754,7 @@ sub_80C4FF0: @ 80C4FF0
ldr r1, =0x00000583
adds r0, r1
ldrb r0, [r0]
bl TrainerClassToTrainerPic
bl sub_806EFF0
lsls r0, 16
lsrs r0, 16
ldr r4, =gUnknown_0856FB18
@ -4795,7 +4795,7 @@ _080C5060:
adds r0, r1
adds r0, r2
ldrb r0, [r0]
bl TrainerClassToTrainerPic
bl sub_806EFF0
lsls r0, 16
lsrs r0, 16
ldr r4, =gUnknown_0856FB18

View File

@ -6988,7 +6988,7 @@ _080EFA62:
lsls r0, 16
lsrs r0, 16
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
asrs r0, 24
cmp r0, 0x1
@ -7570,7 +7570,7 @@ sub_80EFEC4: @ 80EFEC4
ldrb r0, [r0]
ldr r1, =gSpecialVar_0x8013
ldrb r1, [r1]
bl get_pokemon_by_box_and_pos
bl GetBoxedMonPtr
adds r6, r0, 0
ldr r2, =gStringVar3
movs r1, 0x2
@ -9041,7 +9041,7 @@ sub_80F0B24: @ 80F0B24
lsls r0, 16
lsrs r0, 16
movs r1, 0
bl pokedex_flag_operation
bl GetSetPokedexFlag
lsls r0, 24
asrs r2, r0, 24
cmp r2, 0

View File

@ -249,7 +249,7 @@ gUnknown_085CA459:: @ 85CA459
.string "{STRING 19} transformed!$"
.string "{STRING 16}s {STRING 25}\ntook the attack!$"
gUnknown_085CB2A1:: @ 85CB2A1
BattleText_PreventedSwitch:: @ 85CB2A1
.string "{STRING 0}s {STRING 23}\nprevents switching!\p$"
.string "{STRING 16}s {STRING 25}\nprevented {STRING 19}s\l{STRING 0} from working!$"
@ -548,7 +548,7 @@ gUnknown_085CBDBD:: @ 85CBDBD
gUnknown_085CBDBF:: @ 85CBDBF
.incbin "baserom.gba", 0x5cbdbf, 0x41
gUnknown_085CBE00:: @ 85CBE00
gStatNamesTable:: @ 85CBE00
.incbin "baserom.gba", 0x5cbe00, 0x6c
gUnknown_085CBE6C:: @ 85CBE6C
@ -679,10 +679,10 @@ gUnknown_085CCB88:: @ 85CCB88
gUnknown_085CCB8C:: @ 85CCB8C
.incbin "baserom.gba", 0x5ccb8c, 0x4
gUnknown_085CCB90:: @ 85CCB90
gBadEggNickname:: @ 85CCB90
.incbin "baserom.gba", 0x5ccb90, 0x8
gUnknown_085CCB98:: @ 85CCB98
BattleText_Wally:: @ 85CCB98
.incbin "baserom.gba", 0x5ccb98, 0x6
gUnknown_085CCB9E:: @ 85CCB9E

View File

@ -53,10 +53,10 @@
@ 832937C
.include "data/level_up_learnset_pointers.inc"
gUnknown_083299EC:: @ 83299EC
gMonFrontAnimIdsTable:: @ 83299EC
.incbin "baserom.gba", 0x3299ec, 0x19b
gUnknown_08329B87:: @ 8329B87
gMonAnimationDelayTable:: @ 8329B87
.incbin "baserom.gba", 0x329b87, 0x19b
gUnknown_08329D22:: @ 8329D22
@ -101,11 +101,8 @@ gUnknown_08329ECE:: @ 8329ECE
gHMMoves:: @ 8329EEA
.incbin "baserom.gba", 0x329eea, 0x12
gUnknown_08329EFC:: @ 8329EFC
.incbin "baserom.gba", 0x329efc, 0x2
gAlteringCaveWildMonHeldItems:: @ 8329EFE
.incbin "baserom.gba", 0x329efe, 0x2a
gAlteringCaveWildMonHeldItems:: @ 8329EFC
.incbin "baserom.gba", 0x329efc, 0x2c
gUnknown_08329F28:: @ 8329F28
.incbin "baserom.gba", 0x329f28, 0x18

View File

@ -45,7 +45,7 @@ gExpandedPlaceholder_Brendan:: @ 85E8258
gExpandedPlaceholder_May:: @ 85E8260
.string "MAY$"
gUnknown_085E8264:: @ 85E8264
gEggNickname:: @ 85E8264
.string "EGG$"

View File

@ -1,4 +1,4 @@
gTrainerClassNameIndices:: @ 831F5CA
gTrainerClassToNameIndex:: @ 831F5CA
.byte TRAINER_CLASS_NAME_HIKER
.byte TRAINER_CLASS_NAME_TEAM_AQUA
.byte TRAINER_CLASS_NAME_PKMN_BREEDER

View File

@ -1,5 +1,5 @@
.align 2
gTrainerPicIndices:: @ 831F578
gUnknown_0831F578:: @ 831F578
.byte TRAINER_PIC_HIKER
.byte TRAINER_PIC_AQUA_GRUNT_M
.byte TRAINER_PIC_POKEMON_BREEDER_F

View File

@ -32,8 +32,14 @@
#define BATTLE_TYPE_KYORGE 0x20000000
#define BATTLE_TYPE_RAYQUAZA 0x40000000
#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 SIDE_PLAYER 0x0
#define SIDE_OPPONENT 0x1
#define BATTLE_WON 0x1
#define BATTLE_LOST 0x2
#define BATTLE_DREW 0x3
@ -187,8 +193,7 @@ struct Trainer
{
/*0x00*/ u8 partyFlags;
/*0x01*/ u8 trainerClass;
/*0x02*/ u8 encounterMusic:7;
/*0x02*/ u8 gender:1;
/*0x02*/ u8 encounterMusic_gender; // last bit is gender
/*0x03*/ u8 trainerPic;
/*0x04*/ u8 trainerName[12];
/*0x10*/ u16 items[4];
@ -200,6 +205,8 @@ struct Trainer
extern const struct Trainer gTrainers[];
#define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F))
struct UnknownFlags
{
u32 flags[4];
@ -282,7 +289,7 @@ struct BattleScriptsStack
struct BattleResources
{
void* secretBaseOpponent;
struct SecretBaseRecord* secretBase;
struct UnknownFlags *flags;
struct BattleScriptsStack* battleScriptsStack;
void* battleCallbackStack;
@ -336,7 +343,105 @@ struct BattleStruct
u8 wildVictorySong;
u8 dynamicMoveType;
u8 wrappedBy[4];
u8 field_18[0x63]; // TODO: expand
u8 field_18;
u8 field_19;
u8 field_1A;
u8 field_1B;
u8 field_1C;
u8 field_1D;
u8 field_1E;
u8 field_1F;
u8 field_20;
u8 field_21;
u8 field_22;
u8 field_23;
u8 field_24;
u8 field_25;
u8 field_26;
u8 field_27;
u8 field_28;
u8 field_29;
u8 field_2A;
u8 field_2B;
u8 field_2C;
u8 field_2D;
u8 field_2E;
u8 field_2F;
u8 field_30;
u8 field_31;
u8 field_32;
u8 field_33;
u8 field_34;
u8 field_35;
u8 field_36;
u8 field_37;
u8 field_38;
u8 field_39;
u8 field_3A;
u8 field_3B;
u8 field_3C;
u8 field_3D;
u8 field_3E;
u8 field_3F;
u8 field_40;
u8 field_41;
u8 field_42;
u8 field_43;
u8 field_44;
u8 field_45;
u8 field_46;
u8 field_47;
u8 field_48;
u8 field_49;
u8 field_4A;
u8 field_4B;
u8 field_4C;
u8 field_4D;
u8 field_4E;
u8 field_4F;
u8 field_50;
u8 field_51;
u8 field_52;
u8 field_53;
u8 field_54;
u8 field_55;
u8 field_56;
u8 field_57;
u8 field_58;
u8 field_59;
u8 field_5A;
u8 field_5B;
u8 field_5C;
u8 field_5D;
u8 field_5E;
u8 field_5F;
u8 field_60;
u8 field_61;
u8 field_62;
u8 field_63;
u8 field_64;
u8 field_65;
u8 field_66;
u8 field_67;
u8 field_68;
u8 field_69;
u8 field_6A;
u8 field_6B;
u8 field_6C;
u8 field_6D;
u8 field_6E;
u8 field_6F;
u8 field_70;
u8 field_71;
u8 field_72;
u8 field_73;
u8 field_74;
u8 field_75;
u8 field_76;
u8 field_77;
u8 field_78;
u8 field_79;
u8 field_7A;
u8 field_7B;
u8 field_7C;
u8 field_7D;
@ -412,4 +517,15 @@ struct BattleScripting
extern struct BattleScripting gBattleScripting;
#endif
#include "sprite.h"
struct BattleSpritesGfx
{
void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon
void* sprites[4];
struct SpriteTemplate templates[4];
};
extern struct BattleSpritesGfx* gBattleSpritesGfx;
#endif // GUARD_BATTLE_H

View File

@ -20,4 +20,9 @@ void BufferStringBattle(u16 stringID);
u32 StrCpyDecodeToDisplayedStringBattle(const u8* src);
u32 StrCpyDecodeBattle(const u8* src, u8* dst);
extern u8 gBattleTextBuff1[];
extern u8 gBattleTextBuff2[];
extern u8 gBattleTextBuff3[];
extern u8 gDisplayedStringBattle[];
#endif // GUARD_BATTLE_MESSAGE_H

View File

@ -2,8 +2,8 @@
#define GUARD_FLAGS_H
#define TRAINER_FLAG_START 0x500
#define TRAINERS_FLAG_NO 0x360
#define CODE_FLAGS (TRAINER_FLAG_START + TRAINERS_FLAG_NO)
#define TRAINERS_FLAG_NO 0x356
#define CODE_FLAGS (TRAINER_FLAG_START + TRAINERS_FLAG_NO + 0xA)
// SYSTEM FLAGS
@ -84,6 +84,8 @@
#define SYS_CTRL_OBJ_DELETE CODE_FLAGS + 0x61
#define SYS_RESET_RTC_ENABLE CODE_FLAGS + 0x62
#define SYS_STORAGE_UNKNOWN_FLAG CODE_FLAGS + 0x77
#define SYS_MYSTERY_GIFT_ENABLE CODE_FLAGS + 0x7B
// SPECIAL FLAGS (unknown purpose)

View File

@ -46,6 +46,10 @@ struct EnigmaBerry
u8 holdEffect;
u8 holdEffectParam;
u32 checksum;
u8 pic[(6 * 6) * TILE_SIZE_4BPP];
u16 palette[16];
u8 description1[45];
u8 description2[45];
};
struct BattleEnigmaBerry

View File

@ -184,7 +184,8 @@ struct SaveBlock2
// All below could be a one giant struct
/*0x64C*/ u8 field_64C[1629];
/*0xCA9*/ u8 frontierChosenLvl;
/*0xCA9*/ u8 frontierChosenLvl : 2;
/*0xCA9*/ u8 field_CA9_a : 6;
/*0xCAA*/ u8 field_CAA[368];
/*0xE1A*/ u16 battlePyramidFloor; // possibly?
/*0xE1C*/ u8 field_E1C[16];

194
include/link.h Normal file
View File

@ -0,0 +1,194 @@
#ifndef GUARD_LINK_H
#define GUARD_LINK_H
#define MAX_LINK_PLAYERS 4
#define CMD_LENGTH 8
#define QUEUE_CAPACITY 50
#define BLOCK_BUFFER_SIZE 0x100
#define LINK_STAT_LOCAL_ID 0x00000003
#define LINK_STAT_PLAYER_COUNT 0x0000001C
#define LINK_STAT_PLAYER_COUNT_SHIFT 2
#define LINK_STAT_MASTER 0x00000020
#define LINK_STAT_MASTER_SHIFT 5
#define LINK_STAT_CONN_ESTABLISHED 0x00000040
#define LINK_STAT_CONN_ESTABLISHED_SHIFT 6
#define LINK_STAT_RECEIVED_NOTHING 0x00000100
#define LINK_STAT_RECEIVED_NOTHING_SHIFT 8
#define LINK_STAT_ERRORS 0x0007F000
#define EXTRACT_PLAYER_COUNT(status) \
(((status) & LINK_STAT_PLAYER_COUNT) >> LINK_STAT_PLAYER_COUNT_SHIFT)
#define EXTRACT_MASTER(status) \
(((status) >> LINK_STAT_MASTER_SHIFT) & 1)
#define EXTRACT_CONN_ESTABLISHED(status) \
(((status) >> LINK_STAT_CONN_ESTABLISHED_SHIFT) & 1)
#define EXTRACT_RECEIVED_NOTHING(status) \
(((status) >> LINK_STAT_RECEIVED_NOTHING_SHIFT) & 1)
#define MASTER_HANDSHAKE 0x8FFF
#define SLAVE_HANDSHAKE 0xB9A0
enum
{
LINK_STATE_START0,
LINK_STATE_START1,
LINK_STATE_HANDSHAKE,
LINK_STATE_INIT_TIMER,
LINK_STATE_CONN_ESTABLISHED,
};
enum
{
EXCHANGE_NOT_STARTED,
EXCHANGE_COMPLETE,
EXCHANGE_TIMED_OUT,
EXCHANGE_IN_PROGRESS,
};
enum
{
QUEUE_FULL_NONE,
QUEUE_FULL_SEND,
QUEUE_FULL_RECV,
};
enum
{
LAG_NONE,
LAG_MASTER,
LAG_SLAVE,
};
struct LinkPlayer
{
/* 0x00 */ u16 version;
/* 0x02 */ u16 lp_field_2;
/* 0x04 */ u32 trainerId;
/* 0x08 */ u8 name[11];
/* 0x13 */ u8 gender;
/* 0x14 */ u32 linkType;
/* 0x18 */ u16 lp_field_18;
/* 0x1A */ u16 language;
};
struct LinkPlayerBlock
{
u8 magic1[16];
struct LinkPlayer linkPlayer;
u8 magic2[16];
};
// circular queues
struct SendQueue
{
u16 data[CMD_LENGTH][QUEUE_CAPACITY];
u8 pos;
u8 count;
};
struct RecvQueue
{
u16 data[MAX_LINK_PLAYERS][CMD_LENGTH][QUEUE_CAPACITY];
u8 pos;
u8 count;
};
struct Link
{
u8 isMaster; // 0: slave, 8: master
u8 state;
u8 localId; // local multi-player ID
u8 playerCount;
u16 tempRecvBuffer[4];
bool8 receivedNothing;
s8 serialIntrCounter;
bool8 handshakeAsMaster;
u8 link_field_F;
// error conditions
bool8 hardwareError; // hardware reported an error
bool8 badChecksum; // checksum didn't match between devices
u8 queueFull; // send or recv queue out of space
u8 lag; // connection is lagging
u16 checksum;
u8 sendCmdIndex;
u8 recvCmdIndex;
struct SendQueue sendQueue;
struct RecvQueue recvQueue;
};
struct BlockRequest
{
void * address;
u32 size;
};
extern const struct BlockRequest sBlockRequestLookupTable[5];
extern struct Link gLink;
extern u16 gRecvCmds[CMD_LENGTH][MAX_LINK_PLAYERS];
extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE];
extern u16 gLinkType;
extern u32 gLinkStatus;
extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2];
extern u16 gSendCmd[CMD_LENGTH];
extern u8 gShouldAdvanceLinkState;
extern struct LinkPlayer gLinkPlayers[];
extern u16 word_3002910[];
extern bool8 gReceivedRemoteLinkPlayers;
void Task_DestroySelf(u8);
void sub_8007270(u8);
void OpenLink(void);
void CloseLink(void);
u16 LinkMain2(u16 *);
void sub_8007B14(void);
bool32 sub_8007B24(void);
void ClearLinkCallback(void);
void ClearLinkCallback_2(void);
u8 GetLinkPlayerCount(void);
void OpenLinkTimed(void);
u8 GetLinkPlayerDataExchangeStatusTimed(void);
bool8 IsLinkPlayerDataExchangeComplete(void);
u32 GetLinkPlayerTrainerId(u8);
void ResetLinkPlayers(void);
void sub_8007E24(void);
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);
void SetSuppressLinkErrorMessage(bool8);
bool8 HasLinkErrorOccurred(void);
void ResetSerial(void);
u32 LinkMain1(u8 *, u16 *, u16[CMD_LENGTH][MAX_LINK_PLAYERS]);
void LinkVSync(void);
void Timer3Intr(void);
void SerialCB(void);
#endif // GUARD_LINK_H

View File

@ -9,6 +9,7 @@ void m4aSoundInit(void);
void m4aSoundMain(void);
void m4aSongNumStart(u16);
void m4aSongNumStop(u16 n);
void m4aMPlayAllStop(void);
void m4aMPlayContinue(struct MusicPlayerInfo *mplayInfo);
void m4aMPlayFadeOut(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed);

20
include/pokedex.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef GUARD_POKEDEX_H
#define GUARD_POKEDEX_H
void ResetPokedex(void);
const u8 *GetPokemonCategory(u16);
u16 GetPokedexHeightWeight(u16 dexNum, u8 data);
u16 GetNationalPokedexCount(u8);
u16 GetHoennPokedexCount(u8);
enum
{
FLAG_GET_SEEN,
FLAG_GET_CAUGHT,
FLAG_SET_SEEN,
FLAG_SET_CAUGHT
};
u8 GetSetPokedexFlag(u16 nationalNum, u8 caseId);
#endif // GUARD_POKEDEX_H

View File

@ -81,20 +81,28 @@
#define MON_DATA_GIFT_RIBBON_6 77
#define MON_DATA_GIFT_RIBBON_7 78
#define MON_DATA_FATEFUL_ENCOUNTER 79
#define MON_DATA_KNOWN_MOVES 80
#define MON_DATA_RIBBON_COUNT 81
#define MON_DATA_RIBBONS 82
#define MON_DATA_83 83
#define MON_DATA_OBEDIENCE 80
#define MON_DATA_KNOWN_MOVES 81
#define MON_DATA_RIBBON_COUNT 82
#define MON_DATA_RIBBONS 83
#define MON_DATA_ATK2 84
#define MON_DATA_DEF2 85
#define MON_DATA_SPD2 86
#define MON_DATA_SPATK2 87
#define MON_DATA_SPDEF2 88
#define MON_DATA_SPDEF2 88
#define OT_ID_RANDOM_NO_SHINY 2
#define OT_ID_PRESET 1
#define OT_ID_PLAYER_ID 0
#define MON_GIVEN_TO_PARTY 0x0
#define MON_GIVEN_TO_PC 0x1
#define MON_CANT_GIVE 0x2
#define PLAYER_HAS_TWO_USABLE_MONS 0x0
#define PLAYER_HAS_ONE_MON 0x1
#define PLAYER_HAS_ONE_USABLE_MON 0x2
#define MON_MALE 0x00
#define MON_FEMALE 0xFE
#define MON_GENDERLESS 0xFF
@ -240,7 +248,8 @@ struct PokemonSubstruct3
/* 0x0B */ u32 giftRibbon5:1;
/* 0x0B */ u32 giftRibbon6:1;
/* 0x0B */ u32 giftRibbon7:1;
/* 0x0B */ u32 fatefulEncounter:5; // unused in Ruby/Sapphire, but the high bit must be set for Mew/Deoxys to obey in FR/LG/Emerald
/* 0x0B */ u32 fatefulEncounter:4;
/* 0x0B */ u32 obedient:1;
};
union PokemonSubstruct
@ -279,7 +288,7 @@ struct Pokemon
struct BoxPokemon box;
u32 status;
u8 level;
u8 pokerus;
u8 mail;
u16 hp;
u16 maxHP;
u16 attack;
@ -374,6 +383,16 @@ enum
STAT_STAGE_EVASION, // 7
};
enum
{
STAT_HP, // 0
STAT_ATK, // 1
STAT_DEF, // 2
STAT_SPD, // 3
STAT_SPATK, // 4
STAT_SPDEF, // 5
};
struct BaseStats
{
/* 0x00 */ u8 baseHP;
@ -420,6 +439,12 @@ struct BattleMove
u8 flags;
};
struct SpindaSpot
{
u8 x, y;
u16 image[16];
};
struct __attribute__((packed)) LevelUpMove
{
u16 move:9;
@ -483,9 +508,15 @@ extern struct Pokemon gPlayerParty[PARTY_SIZE];
extern u8 gEnemyPartyCount;
extern struct Pokemon gEnemyParty[PARTY_SIZE];
extern const struct BaseStats gBaseStats[];
extern const u8 *const gItemEffectTable[];
extern const struct EvolutionData gEvolutionTable[];
extern struct PokemonStorage* gPokemonStoragePtr;
extern const u32 gExperienceTables[][MAX_MON_LEVEL + 1];
extern const u16 *const gLevelUpLearnsets[];
#define BATTLE_ALIVE_EXCEPT_ACTIVE 0
#define BATTLE_ALIVE_ATK_SIDE 1
#define BATTLE_ALIVE_DEF_SIDE 2
void ZeroBoxMonData(struct BoxPokemon *boxMon);
void ZeroMonData(struct Pokemon *mon);
@ -540,8 +571,8 @@ u8 GetMonAbility(struct Pokemon *mon);
void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord);
u8 GetSecretBaseTrainerPicIndex(void);
u8 GetSecretBaseTrainerNameIndex(void);
u8 PlayerPartyAndPokemonStorageFull(void);
u8 PokemonStorageFull(void);
bool8 IsPlayerPartyAndPokemonStorageFull(void);
bool8 IsPokemonStorageFull(void);
void GetSpeciesName(u8 *name, u16 species);
u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex);
void RemoveMonPPBonus(struct Pokemon *mon, u8 moveIndex);
@ -551,4 +582,36 @@ void CopyPlayerPartyMonToBattleData(u8 battleIndex, u8 partyIndex);
u8 GetNature(struct Pokemon *mon);
u8 GetNatureFromPersonality(u32 personality);
u16 nature_stat_mod(u8 nature, u16 n, u8 statIndex);
void MonRestorePP(struct Pokemon *);
void BoxMonRestorePP(struct BoxPokemon *);
u16 NationalPokedexNumToSpecies(u16 nationalNum);
u16 NationalToHoennOrder(u16);
u16 SpeciesToNationalPokedexNum(u16);
u16 HoennToNationalOrder(u16);
u16 SpeciesToCryId(u16 species);
void DrawSpindaSpots(u16, u32, u8 *, u8);
void AdjustFriendship(struct Pokemon *, u8);
u8 CheckPartyHasHadPokerus(struct Pokemon *, u8);
void UpdatePartyPokerusTime(u16);
u32 CanMonLearnTMHM(struct Pokemon *, u8);
u32 CanSpeciesLearnTMHM(u16 species, u8 tm);
u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves);
void ClearBattleMonForms(void);
const u8 *pokemon_get_pal(struct Pokemon *mon);
const u8 *species_and_otid_get_pal(u16, u32, u32);
const struct CompressedSpritePalette *sub_80409C8(u16, u32, u32);
bool8 IsOtherTrainer(u32, u8 *);
void SetWildMonHeldItem(void);
u16 GetMonEVCount(struct Pokemon *);
const struct CompressedSpritePalette *sub_806E794(struct Pokemon *mon);
const struct CompressedSpritePalette *sub_806E7CC(u16 species, u32 otId , u32 personality);
bool32 IsHMMove2(u16 move);
bool8 IsPokeSpriteNotFlipped(u16 species);
bool8 IsMonShiny(struct Pokemon *mon);
bool8 IsShinyOtIdPersonality(u32 otId, u32 personality);
#endif // GUARD_POKEMON_H

View File

@ -0,0 +1,7 @@
#ifndef GUARD_POKEMON_ANIMATION_H
#define GUARD_POKEMON_ANIMATION_H
void LaunchAnimationTaskForFrontSprite(struct Sprite* sprite, u8 frontAnimId);
void LaunchAnimationTaskForBackSprite(struct Sprite* sprite, u8 backAnimId);
#endif // GUARD_POKEMON_ANIMATION_H

View File

@ -1,4 +1,8 @@
enum {
#ifndef GUARD_SPECIES_H
#define GUARD_SPECIES_H
enum
{
SPECIES_NONE, // 0x000
SPECIES_BULBASAUR, // 0x001
SPECIES_IVYSAUR, // 0x002
@ -442,4 +446,8 @@ enum {
SPECIES_UNOWN_Z,
SPECIES_UNOWN_EMARK,
SPECIES_UNOWN_QMARK,
};
};
#define NUM_SPECIES SPECIES_EGG
#endif // GUARD_SPECIES_H

View File

@ -74,6 +74,7 @@
#define EOS 0xFF // end of string
#define EXT_CTRL_CODE_JPN 0x15
#define EXT_CTRL_CODE_ENG 0x16
#define NUM_TEXT_PRINTERS 32

53
include/trainer_classes.h Normal file
View File

@ -0,0 +1,53 @@
#ifndef GUARD_TRAINER_CLASSES_H
#define GUARD_TRAINER_CLASSES_H
enum
{
CLASS_PKMN_TRAINER0, //0
CLASS_PKMN_TRAINER1, //1
CLASS_HIKER, //2
CLASS_TEAM_AQUA, //3
CLASS_PKMN_BREEDER, //4
CLASS_COOLTRAINER, //5
CLASS_BIRDKEEPER, //6
CLASS_COLLECTOR, //7
CLASS_SWIMMER_MALE, //8
CLASS_TEAM_MAGMA, //9
CLASS_EXPERT, // 0xA
CLASS_AQUA_ADMIN, // 0xB
CLASS_BLACK_BELT, // 0xC
CLASS_AQUA_LEADER, // 0xD
CLASS_HEX_MANIAC, // 0xE
CLASS_AROMA_LADY, // 0xF
CLASS_RUIN_MANIAC, // 0x10
CLASS_INTERVIEWER, // 0x11
CLASS_TUBER_FEMALE, // 0x12
CLASS_TUBER_MALE, // 0x13
CLASS_LADY, // 0x14
CLASS_BEAUTY, // 0x15
CLASS_RICH_BOY, // 0x16
CLASS_POKEMANIAC, // 0x17
CLASS_GUITARIST, // 0x18
CLASS_KINDLER, // 0x19
CLASS_CAMPER, // 0x1A
CLASS_PICKNICKER, // 0x1B
CLASS_BUG_MANIAC, // 0x1C
CLASS_PSYCHIC, // 0x1D
CLASS_GENTLEMAN, // 0x1E
CLASS_ELITE_FOUR, // 0x1F
CLASS_LEADER, // 0x20
CLASS_CHAMPION = 0x26,
CLASS_MAGMA_ADMIN = 0x31,
CLASS_PKMN_TRAINER_RIVAL = 0x32,
CLASS_MAGMA_LEADER = 0x35,
CLASS_SALON_MAIDEN = 0x3A,
CLASS_DOME_ACE, // 0x3B
CLASS_PALACE_MAVEN, // 0x3C
CLASS_ARENA_TYCOON, // 0x3D
CLASS_FACTORY_HEAD, // 0x3E
CLASS_PIKE_QUEEN, // 0x3F
CLASS_PYRAMID_KING, // 0x40
CLASS_PKMN_TRAINER2, // 0x41
};
#endif // GUARD_TRAINER_CLASSES_H

7
include/trainer_ids.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef GUARD_TRAINER_IDS_H
#define GUARD_TRAINER_IDS_H
#define NO_OF_TRAINERS 854
#define TRAINER_ID_STEVEN 804
#endif // GUARD_TRAINER_IDS_H

View File

@ -28,6 +28,7 @@
#define VAR_DAYS 0x4040
#define VAR_DEPT_STORE_FLOOR 0x4043
#define VAR_STORAGE_UNKNOWN 0x4036
#define VAR_POKELOT_PRIZE 0x4045
#define VAR_NATIONAL_DEX 0x4046
#define VAR_SEEDOT_SIZE_RECORD 0x4047

View File

@ -73,6 +73,7 @@ SECTIONS {
src/pokemon_2.o(.text);
asm/pokemon_2.o(.text);
asm/pokemon_item_effect.o(.text);
src/pokemon_3.o(.text);
asm/pokemon_3.o(.text);
src/trig.o(.text);
src/rng.o(.text);

View File

@ -3,14 +3,13 @@
#include "species.h"
#include "text.h"
#include "malloc.h"
#include "pokemon.h"
EWRAM_DATA ALIGNED(4) u8 gDecompressionBuffer[0x4000] = {0};
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
extern const struct CompressedSpriteSheet gMonBackPicTable[];
extern void DrawSpindaSpots(u16 species, u32 personality, void* dest, bool8 isFrontPic);
static void DuplicateDeoxysTiles(void *pointer, s32 species);
void LZDecompressWram(const void *src, void *dest)

View File

@ -296,7 +296,73 @@ void sub_806819C(struct Pokemon *mon, struct UnknownPokemonStruct *src)
StripExtCtrlCodes(nickname);
}
else
{
language = GAME_LANGUAGE;
}
SetMonData(mon, MON_DATA_LANGUAGE, &language);
SetMonData(mon, MON_DATA_NICKNAME, nickname);
SetMonData(mon, MON_DATA_HP_EV, &src->hpEV);
SetMonData(mon, MON_DATA_ATK_EV, &src->attackEV);
SetMonData(mon, MON_DATA_DEF_EV, &src->defenseEV);
SetMonData(mon, MON_DATA_SPD_EV, &src->speedEV);
SetMonData(mon, MON_DATA_SPATK_EV, &src->spAttackEV);
SetMonData(mon, MON_DATA_SPDEF_EV, &src->spDefenseEV);
value = src->altAbility;
SetMonData(mon, MON_DATA_ALT_ABILITY, &value);
value = src->hpIV;
SetMonData(mon, MON_DATA_HP_IV, &value);
value = src->attackIV;
SetMonData(mon, MON_DATA_ATK_IV, &value);
value = src->defenseIV;
SetMonData(mon, MON_DATA_DEF_IV, &value);
value = src->speedIV;
SetMonData(mon, MON_DATA_SPD_IV, &value);
value = src->spAttackIV;
SetMonData(mon, MON_DATA_SPATK_IV, &value);
value = src->spDefenseIV;
SetMonData(mon, MON_DATA_SPDEF_IV, &value);
MonRestorePP(mon);
CalculateMonStats(mon);
}
u8 BattleFrontierGetOpponentLvl(u8);
void sub_8068338(struct Pokemon *mon, struct UnknownPokemonStruct *src, bool8 lvl50)
{
s32 i;
u8 nickname[30];
u8 level;
u8 language;
u8 value;
if (gSaveBlock2Ptr->frontierChosenLvl != 0)
level = BattleFrontierGetOpponentLvl(gSaveBlock2Ptr->frontierChosenLvl);
else if (lvl50)
level = 50;
else
level = src->level;
CreateMon(mon, src->species, level, 0, 1, src->personality, 1, src->otId);
for (i = 0; i < 4; i++)
SetMonMoveSlot(mon, src->moves[i], i);
SetMonData(mon, MON_DATA_PP_BONUSES, &src->ppBonuses);
SetMonData(mon, MON_DATA_HELD_ITEM, &src->heldItem);
SetMonData(mon, MON_DATA_FRIENDSHIP, &src->friendship);
StringCopy(nickname, src->nickname);
if (nickname[0] == EXT_CTRL_CODE_BEGIN && nickname[1] == EXT_CTRL_CODE_JPN)
{
language = LANGUAGE_JAPANESE;
StripExtCtrlCodes(nickname);
}
else
{
language = GAME_LANGUAGE;
}
SetMonData(mon, MON_DATA_LANGUAGE, &language);
SetMonData(mon, MON_DATA_NICKNAME, nickname);

File diff suppressed because it is too large Load Diff

1753
src/pokemon_3.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -367,7 +367,7 @@ gUnknown_0202420D: @ 202420D
gUnknown_0202420E: @ 202420E
.space 0x1
gUnknown_0202420F: @ 202420F
gStringBank: @ 202420F
.space 0x1
gAbsentBankFlags: @ 2024210
@ -511,7 +511,7 @@ gUnknown_020244B0: @ 20244B0
gUnknown_020244B4: @ 20244B4
.space 0x4
gUnknown_020244B8: @ 20244B8
gBankInMenu: @ 20244B8
.space 0x1
gDoingBattleAnim: @ 20244B9
@ -526,7 +526,7 @@ gUnknown_020244CC: @ 20244CC
gUnknown_020244D0: @ 20244D0
.space 0x4
gUnknown_020244D4: @ 20244D4
gBattleSpritesGfx: @ 20244D4
.space 0x4
gUnknown_020244D8: @ 20244D8
@ -541,7 +541,7 @@ gBattleMovePower: @ 20244E0
gMoveToLearn: @ 20244E2
.space 0x2
gUnknown_020244E4: @ 20244E4
gBattleMonForms: @ 20244E4
.space 0x4
sLearningMoveTableID: @ 20244E8
@ -550,7 +550,7 @@ sLearningMoveTableID: @ 20244E8
gPlayerPartyCount: @ 20244E9
.space 0x1
gUnknown_020244EA: @ 20244EA
gEnemyPartyCount: @ 20244EA
.space 0x2
gPlayerParty: @ 20244EC
@ -854,7 +854,7 @@ gTrainerBattleOpponent_A: @ 2038BCA
gTrainerBattleOpponent_B: @ 2038BCC
.space 0x2
gUnknown_02038BCE: @ 2038BCE
gPartnerTrainerId: @ 2038BCE
.space 0x2
gUnknown_02038BD0: @ 2038BD0