more of pokemon3 decompiled

This commit is contained in:
DizzyEggg
2017-09-11 14:42:13 +02:00
parent 154a70e228
commit 5394435520
27 changed files with 563 additions and 1080 deletions
+3 -3
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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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
@@ -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
+4 -4
View File
@@ -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:
+2 -2
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
+4 -4
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
+1 -1
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
+1 -1
View File
@@ -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
-1000
View File
File diff suppressed because it is too large Load Diff
+10 -10
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:
+1 -1
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
+22 -22
View File
@@ -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
@@ -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:
@@ -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
+6 -6
View File
@@ -7186,7 +7186,7 @@ _08192784:
.pool
_08192798:
ldr r0, [sp, 0x24]
bl sub_8162BD8
bl GetFrontierOpponentClass
_0819279E:
lsls r0, 24
lsrs r5, r0, 24
@@ -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
@@ -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
@@ -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
+2 -2
View File
@@ -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]
+2 -2
View File
@@ -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
@@ -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