mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-24 13:39:42 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
35d093f690
3
Makefile
3
Makefile
@ -111,6 +111,9 @@ $(C_BUILDDIR)/agb_flash_mx.o: CC1FLAGS := -O -mthumb-interwork
|
||||
|
||||
$(C_BUILDDIR)/m4a.o: CC1 := tools/agbcc/bin/old_agbcc
|
||||
|
||||
$(C_BUILDDIR)/kecleon_items_1.o: CC1FLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm
|
||||
|
||||
|
||||
#### Main Rules ####
|
||||
|
||||
|
||||
|
10
README.md
10
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
[![build](https://github.com/pret/pmd-red/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/pret/pmd-red/actions/workflows/build.yml)
|
||||
|
||||
This is a disassembly of Pokémon Mystery Dungeon: Red Rescue Team.
|
||||
This is a decompilation of Pokémon Mystery Dungeon: Red Rescue Team.
|
||||
|
||||
It builds the following rom:
|
||||
|
||||
@ -18,10 +18,10 @@ To set up the repository, see [INSTALL.md](INSTALL.md).
|
||||
* Disassembly of [**Pokémon Crystal**][pokecrystal]
|
||||
* Disassembly of [**Pokémon Pinball**][pokepinball]
|
||||
* Disassembly of [**Pokémon TCG**][poketcg]
|
||||
* Disassembly of [**Pokémon Fire Red**/**Leaf Green**][pokefirered]
|
||||
* Disassembly of [**Pokémon Ruby/Sapphire**][pokeruby]
|
||||
* Disassembly of [**Pokémon Emerald**][pokeemerald]
|
||||
* Disassembly of [**Pokémon Diamond/Pearl**][pokediamond]
|
||||
* Decompilation of [**Pokémon Fire Red**/**Leaf Green**][pokefirered]
|
||||
* Decompilation of [**Pokémon Ruby/Sapphire**][pokeruby]
|
||||
* Decompilation of [**Pokémon Emerald**][pokeemerald]
|
||||
* Decompilation of [**Pokémon Diamond/Pearl**][pokediamond]
|
||||
* Discord: [**pret**][Discord]
|
||||
* irc: **irc.libera.chat** [**#pret**][irc]
|
||||
|
||||
|
@ -452,7 +452,7 @@ sub_80009D0:
|
||||
mov r10, r0
|
||||
bl sub_801180C
|
||||
movs r0, 0x10
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
cmp r7, 0x7
|
||||
bne _08000A30
|
||||
cmp r4, 0x2
|
||||
@ -1161,7 +1161,7 @@ _08000FB8:
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x80
|
||||
bl SetDungeonLocationInfo
|
||||
bl sub_8011924
|
||||
bl xxx_call_stop_bgm
|
||||
movs r1, 0
|
||||
ldrsh r0, [r7, r1]
|
||||
cmp r0, r6
|
||||
|
@ -884,8 +884,8 @@ sub_803B6B0:
|
||||
_0803B6D0: .4byte gUnknown_80E8B94
|
||||
thumb_func_end sub_803B6B0
|
||||
|
||||
thumb_func_start sub_803B6D4
|
||||
sub_803B6D4:
|
||||
thumb_func_start CreateRescueTitle
|
||||
CreateRescueTitle:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x144
|
||||
adds r7, r0, 0
|
||||
@ -1204,7 +1204,7 @@ _0803B968:
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_803B6D4
|
||||
thumb_func_end CreateRescueTitle
|
||||
|
||||
thumb_func_start CreateRescueDescription
|
||||
CreateRescueDescription:
|
||||
|
@ -37,8 +37,8 @@ sub_803C1F0:
|
||||
_0803C1FC: .4byte gUnknown_80E8BF8
|
||||
thumb_func_end sub_803C1F0
|
||||
|
||||
thumb_func_start sub_803C200
|
||||
sub_803C200:
|
||||
thumb_func_start GetDungeonTeamRankPts
|
||||
GetDungeonTeamRankPts:
|
||||
push {lr}
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
@ -51,7 +51,7 @@ sub_803C200:
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_0803C218: .4byte gUnknown_80E80A0
|
||||
thumb_func_end sub_803C200
|
||||
thumb_func_end GetDungeonTeamRankPts
|
||||
|
||||
thumb_func_start sub_803C21C
|
||||
sub_803C21C:
|
||||
@ -225,7 +225,7 @@ _0803C35A:
|
||||
strh r0, [r4, 0x14]
|
||||
ldrb r1, [r6, 0x1]
|
||||
adds r0, r5, 0
|
||||
bl sub_803C200
|
||||
bl GetDungeonTeamRankPts
|
||||
str r0, [r4, 0x24]
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
|
@ -3200,7 +3200,7 @@ _0805F1F8:
|
||||
ldr r0, _0805F20C
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
b _0805F240
|
||||
.align 2, 0
|
||||
_0805F208: .4byte gDungeonGlobalData
|
||||
|
@ -167,7 +167,7 @@ sub_8075CFC:
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r5, 0
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08075DAA
|
||||
@ -633,7 +633,7 @@ sub_8076090:
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
mov r2, r9
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0807613A
|
||||
@ -715,7 +715,7 @@ sub_807614C:
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r7, 0
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08076206
|
||||
@ -814,7 +814,7 @@ _08076238:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
mov r2, r10
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0807624A
|
||||
@ -1045,7 +1045,7 @@ _0807641A:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
mov r2, r10
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0807642C
|
||||
@ -1279,7 +1279,7 @@ _08076602:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
mov r2, r10
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08076614
|
||||
@ -1510,7 +1510,7 @@ _080767CE:
|
||||
mov r0, r8
|
||||
adds r1, r5, 0
|
||||
adds r2, r4, 0
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080768C8
|
||||
@ -1641,7 +1641,7 @@ sub_80768DC:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
adds r2, r4, 0
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080769BE
|
||||
@ -1748,7 +1748,7 @@ sub_80769CC:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x1
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08076A9A
|
||||
@ -1933,7 +1933,7 @@ _08076B60:
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
cmp r7, 0
|
||||
@ -2150,7 +2150,7 @@ sub_8076D10:
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x1
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08076E0E
|
||||
|
1234
asm/code_8077274.s
1234
asm/code_8077274.s
File diff suppressed because it is too large
Load Diff
@ -1425,7 +1425,7 @@ sub_80807C0:
|
||||
beq _08080870
|
||||
mov r0, r8
|
||||
movs r2, 0x1
|
||||
bl sub_80716E8
|
||||
bl HasSafeguardStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08080870
|
||||
|
@ -1232,7 +1232,7 @@ _08083CF2:
|
||||
ldr r0, _08083D04
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
_08083CFC:
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -1248,7 +1248,7 @@ sub_8083D08:
|
||||
lsls r0, 1
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D08
|
||||
@ -1259,7 +1259,7 @@ sub_8083D1C:
|
||||
ldr r0, _08083D2C
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
@ -1272,7 +1272,7 @@ sub_8083D30:
|
||||
ldr r0, _08083D40
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
@ -1286,7 +1286,7 @@ sub_8083D44:
|
||||
lsls r0, 1
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D44
|
||||
@ -1297,7 +1297,7 @@ sub_8083D58:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xC8
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D58
|
||||
@ -1308,7 +1308,7 @@ sub_8083D68:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCF
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D68
|
||||
@ -1319,7 +1319,7 @@ sub_8083D78:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xD3
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D78
|
||||
@ -1330,7 +1330,7 @@ sub_8083D88:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCC
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D88
|
||||
@ -1409,7 +1409,7 @@ sub_8083E28:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCF
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083E28
|
||||
@ -1425,7 +1425,7 @@ PlaySoundEffect:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
adds r0, r2, 0
|
||||
bl sub_800C074
|
||||
bl PlayFanfareSE
|
||||
_08083E4E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -1442,7 +1442,7 @@ sub_8083E58:
|
||||
cmp r1, r0
|
||||
beq _08083E6A
|
||||
adds r0, r1, 0
|
||||
bl sub_800C298
|
||||
bl StopFanfareSE
|
||||
_08083E6A:
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -1450,17 +1450,17 @@ _08083E6A:
|
||||
_08083E70: .4byte 0x000003e5
|
||||
thumb_func_end sub_8083E58
|
||||
|
||||
thumb_func_start sub_8083E74
|
||||
sub_8083E74:
|
||||
thumb_func_start IsFanfareSEPlaying_2
|
||||
IsFanfareSEPlaying_2:
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl sub_800C5D0
|
||||
bl IsFanfareSEPlaying
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8083E74
|
||||
thumb_func_end IsFanfareSEPlaying_2
|
||||
|
||||
thumb_func_start sub_8083E88
|
||||
sub_8083E88:
|
||||
@ -1511,7 +1511,7 @@ sub_8083ED8:
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
ldr r0, _08083F00
|
||||
ldr r1, [r0]
|
||||
ldr r2, _08083F04
|
||||
@ -1538,7 +1538,7 @@ _08083F10: .4byte 0x0001ceda
|
||||
sub_8083F14:
|
||||
push {lr}
|
||||
bl sub_8083F34
|
||||
bl sub_8011924
|
||||
bl xxx_call_stop_bgm
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083F14
|
||||
@ -1716,7 +1716,7 @@ _0808406C:
|
||||
ldr r0, _0808407C
|
||||
cmp r1, r0
|
||||
bne _08084080
|
||||
bl sub_800BF80
|
||||
bl StopBGM
|
||||
movs r0, 0
|
||||
b _08084082
|
||||
.align 2, 0
|
||||
|
@ -521,7 +521,7 @@ ZapdosPreFightDialogue:
|
||||
ldr r0, _08087478
|
||||
bl DisplayDungeonDialogue
|
||||
ldr r0, [sp, 0x68]
|
||||
bl sub_8087704
|
||||
bl ZapdosDropInEffect
|
||||
movs r0, 0x9
|
||||
bl sub_8083E88
|
||||
adds r0, r6, 0
|
||||
|
@ -2009,8 +2009,8 @@ _080969C2:
|
||||
bx r1
|
||||
thumb_func_end GetNumAcceptedJobs
|
||||
|
||||
thumb_func_start sub_80969D0
|
||||
sub_80969D0:
|
||||
thumb_func_start CountJobsinDungeon
|
||||
CountJobsinDungeon:
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
@ -2041,7 +2041,7 @@ _080969FA:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80969D0
|
||||
thumb_func_end CountJobsinDungeon
|
||||
|
||||
thumb_func_start sub_8096A08
|
||||
sub_8096A08:
|
||||
|
@ -94,7 +94,7 @@ _08098504:
|
||||
cmp r0, 0
|
||||
bne _08098522
|
||||
movs r0, 0x10
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
_08098522:
|
||||
ldr r1, _080985B4
|
||||
ldr r2, _080985B8
|
||||
@ -490,7 +490,7 @@ _080988E4:
|
||||
movs r0, 0x1E
|
||||
bl sub_8098F44
|
||||
movs r0, 0x1E
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
_080988F8:
|
||||
bl GroundMap_Action
|
||||
bl nullsub_124
|
||||
@ -572,7 +572,7 @@ _080989E8: .4byte gUnknown_20398A8
|
||||
_080989EC: .4byte gUnknown_20398B9
|
||||
_080989F0:
|
||||
movs r0, 0x1E
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
movs r0, 0xF
|
||||
b _08098BD2
|
||||
_080989FA:
|
||||
@ -779,7 +779,7 @@ _08098BC0:
|
||||
movs r2, 0x1
|
||||
bl sub_80018D8
|
||||
movs r0, 0x10
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
movs r0, 0xE
|
||||
_08098BD2:
|
||||
add sp, 0x8
|
||||
|
@ -5,137 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8098FCC
|
||||
sub_8098FCC:
|
||||
push {r4,lr}
|
||||
movs r0, 0
|
||||
movs r1, 0x13
|
||||
bl sub_8001658
|
||||
lsls r0, 16
|
||||
asrs r1, r0, 16
|
||||
adds r2, r1, 0
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
cmp r1, r0
|
||||
beq _0809909E
|
||||
cmp r1, 0x51
|
||||
bne _08098FF6
|
||||
movs r0, 0
|
||||
movs r1, 0x14
|
||||
bl sub_8001658
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
b _08098FF8
|
||||
_08098FF6:
|
||||
adds r0, r2, 0
|
||||
_08098FF8:
|
||||
bl sub_80A2608
|
||||
adds r4, r0, 0
|
||||
ldr r0, _0809900C
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0x9
|
||||
bne _08099010
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r4, r1]
|
||||
b _080990B2
|
||||
.align 2, 0
|
||||
_0809900C: .4byte gUnknown_20398B4
|
||||
_08099010:
|
||||
ldrh r0, [r4, 0x4]
|
||||
subs r0, 0xB2
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, 0x17
|
||||
bhi _080990AE
|
||||
lsls r0, 2
|
||||
ldr r1, _08099028
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08099028: .4byte _0809902C
|
||||
.align 2, 0
|
||||
_0809902C:
|
||||
.4byte _0809908C
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990A2
|
||||
.4byte _080990AE
|
||||
.4byte _080990A2
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990A2
|
||||
.4byte _080990AE
|
||||
.4byte _080990AE
|
||||
.4byte _080990A2
|
||||
_0809908C:
|
||||
movs r2, 0x1
|
||||
negs r2, r2
|
||||
movs r0, 0x3
|
||||
movs r1, 0x2
|
||||
bl sub_8001D44
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080990AE
|
||||
_0809909E:
|
||||
movs r0, 0xC
|
||||
b _080990B2
|
||||
_080990A2:
|
||||
movs r0, 0x5
|
||||
bl sub_80023E4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0809909E
|
||||
_080990AE:
|
||||
movs r1, 0x4
|
||||
ldrsh r0, [r4, r1]
|
||||
_080990B2:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8098FCC
|
||||
|
||||
thumb_func_start sub_80990B8
|
||||
sub_80990B8:
|
||||
push {lr}
|
||||
movs r0, 0xB
|
||||
bl sub_8098FCC
|
||||
lsls r0, 16
|
||||
asrs r2, r0, 16
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
cmp r2, r0
|
||||
bne _080990D2
|
||||
bl sub_8098FB4
|
||||
b _080990E4
|
||||
_080990D2:
|
||||
ldr r1, _080990E8
|
||||
lsls r0, r2, 1
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r0, r1]
|
||||
bl sub_80A2B18
|
||||
_080990E4:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_080990E8: .4byte gUnknown_811BAF4
|
||||
thumb_func_end sub_80990B8
|
||||
|
||||
thumb_func_start sub_80990EC
|
||||
sub_80990EC:
|
||||
push {r4-r7,lr}
|
||||
@ -557,7 +426,7 @@ sub_80993F0:
|
||||
mov r10, r0
|
||||
bl sub_801180C
|
||||
movs r0, 0x10
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
ldr r1, _0809948C
|
||||
ldr r2, _08099490
|
||||
adds r0, r2, 0
|
||||
@ -792,7 +661,7 @@ _08099604:
|
||||
_08099620: .4byte gUnknown_203B46C
|
||||
_08099624:
|
||||
movs r0, 0x10
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
bl sub_80A4AC4
|
||||
bl sub_8099768
|
||||
bl nullsub_103
|
||||
@ -7742,7 +7611,7 @@ _0809CC5E:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCB
|
||||
bl sub_8011974
|
||||
bl xxx_call_play_fanfare_se
|
||||
_0809CC80:
|
||||
movs r0, 0x1
|
||||
_0809CC82:
|
||||
@ -8230,126 +8099,4 @@ _0809CFDA:
|
||||
bx r1
|
||||
thumb_func_end sub_809CDC8
|
||||
|
||||
thumb_func_start sub_809CFE8
|
||||
sub_809CFE8:
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
adds r2, r1, 0
|
||||
movs r0, 0x40
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0809D014
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0809D004
|
||||
movs r0, 0x3
|
||||
b _0809D052
|
||||
_0809D004:
|
||||
movs r0, 0x20
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0809D010
|
||||
movs r0, 0x5
|
||||
b _0809D052
|
||||
_0809D010:
|
||||
movs r0, 0x4
|
||||
b _0809D052
|
||||
_0809D014:
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0809D038
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0809D028
|
||||
movs r0, 0x1
|
||||
b _0809D052
|
||||
_0809D028:
|
||||
movs r0, 0x20
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0809D034
|
||||
movs r0, 0x7
|
||||
b _0809D052
|
||||
_0809D034:
|
||||
movs r0, 0
|
||||
b _0809D052
|
||||
_0809D038:
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0809D044
|
||||
movs r0, 0x2
|
||||
b _0809D052
|
||||
_0809D044:
|
||||
movs r0, 0x20
|
||||
ands r2, r0
|
||||
cmp r2, 0
|
||||
bne _0809D050
|
||||
subs r0, 0x21
|
||||
b _0809D052
|
||||
_0809D050:
|
||||
movs r0, 0x6
|
||||
_0809D052:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_809CFE8
|
||||
|
||||
thumb_func_start sub_809D058
|
||||
sub_809D058:
|
||||
push {lr}
|
||||
ldr r1, [r0, 0x4]
|
||||
cmp r1, 0x3F
|
||||
bgt _0809D076
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0x67
|
||||
bgt _0809D06A
|
||||
movs r0, 0x5
|
||||
b _0809D0A6
|
||||
_0809D06A:
|
||||
cmp r0, 0x88
|
||||
ble _0809D072
|
||||
movs r0, 0x3
|
||||
b _0809D0A6
|
||||
_0809D072:
|
||||
movs r0, 0x4
|
||||
b _0809D0A6
|
||||
_0809D076:
|
||||
cmp r1, 0x60
|
||||
ble _0809D090
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0x67
|
||||
bgt _0809D084
|
||||
movs r0, 0x7
|
||||
b _0809D0A6
|
||||
_0809D084:
|
||||
cmp r0, 0x88
|
||||
ble _0809D08C
|
||||
movs r0, 0x1
|
||||
b _0809D0A6
|
||||
_0809D08C:
|
||||
movs r0, 0
|
||||
b _0809D0A6
|
||||
_0809D090:
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0x67
|
||||
bgt _0809D09A
|
||||
movs r0, 0x6
|
||||
b _0809D0A6
|
||||
_0809D09A:
|
||||
cmp r0, 0x88
|
||||
bgt _0809D0A4
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
b _0809D0A6
|
||||
_0809D0A4:
|
||||
movs r0, 0x2
|
||||
_0809D0A6:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_809D058
|
||||
|
||||
.align 2,0
|
||||
|
@ -5,524 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80252F0
|
||||
sub_80252F0:
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
cmp r6, 0x2
|
||||
bne _08025308
|
||||
movs r0, 0x4
|
||||
bl sub_8024108
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08025308
|
||||
movs r0, 0
|
||||
b _0802534C
|
||||
_08025308:
|
||||
ldr r4, _08025340
|
||||
movs r0, 0xBC
|
||||
lsls r0, 1
|
||||
movs r1, 0x8
|
||||
bl MemoryAlloc
|
||||
str r0, [r4]
|
||||
movs r5, 0
|
||||
str r5, [r0, 0x70]
|
||||
str r6, [r0]
|
||||
bl sub_80A5728
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
bl sub_8002658
|
||||
ldr r1, [r4]
|
||||
strb r0, [r1, 0xC]
|
||||
ldr r0, [r4]
|
||||
strb r5, [r0, 0xD]
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0x2
|
||||
bne _08025344
|
||||
movs r0, 0
|
||||
bl sub_8025434
|
||||
b _0802534A
|
||||
.align 2, 0
|
||||
_08025340: .4byte gUnknown_203B2B4
|
||||
_08025344:
|
||||
movs r0, 0x1
|
||||
bl sub_8025434
|
||||
_0802534A:
|
||||
movs r0, 0x1
|
||||
_0802534C:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80252F0
|
||||
|
||||
thumb_func_start sub_8025354
|
||||
sub_8025354:
|
||||
push {lr}
|
||||
ldr r0, _0802536C
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0x4]
|
||||
subs r0, 0x1
|
||||
cmp r0, 0x12
|
||||
bhi _08025400
|
||||
lsls r0, 2
|
||||
ldr r1, _08025370
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_0802536C: .4byte gUnknown_203B2B4
|
||||
_08025370: .4byte _08025374
|
||||
.align 2, 0
|
||||
_08025374:
|
||||
.4byte _080253C4
|
||||
.4byte _080253C4
|
||||
.4byte _080253CA
|
||||
.4byte _080253D0
|
||||
.4byte _080253D6
|
||||
.4byte _08025400
|
||||
.4byte _08025400
|
||||
.4byte _08025400
|
||||
.4byte _08025400
|
||||
.4byte _08025400
|
||||
.4byte _080253DC
|
||||
.4byte _080253DC
|
||||
.4byte _080253E2
|
||||
.4byte _080253E8
|
||||
.4byte _080253EE
|
||||
.4byte _080253EE
|
||||
.4byte _080253F4
|
||||
.4byte _080253FA
|
||||
.4byte _080253C0
|
||||
_080253C0:
|
||||
movs r0, 0x3
|
||||
b _08025406
|
||||
_080253C4:
|
||||
bl sub_80259F0
|
||||
b _08025404
|
||||
_080253CA:
|
||||
bl sub_8025A84
|
||||
b _08025404
|
||||
_080253D0:
|
||||
bl sub_8025BCC
|
||||
b _08025404
|
||||
_080253D6:
|
||||
bl sub_8025BE8
|
||||
b _08025404
|
||||
_080253DC:
|
||||
bl sub_8025C04
|
||||
b _08025404
|
||||
_080253E2:
|
||||
bl sub_8025CB4
|
||||
b _08025404
|
||||
_080253E8:
|
||||
bl sub_8025D90
|
||||
b _08025404
|
||||
_080253EE:
|
||||
bl sub_8025DAC
|
||||
b _08025404
|
||||
_080253F4:
|
||||
bl sub_8025E08
|
||||
b _08025404
|
||||
_080253FA:
|
||||
bl sub_8025E24
|
||||
b _08025404
|
||||
_08025400:
|
||||
bl sub_8025E44
|
||||
_08025404:
|
||||
movs r0, 0
|
||||
_08025406:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8025354
|
||||
|
||||
thumb_func_start sub_802540C
|
||||
sub_802540C:
|
||||
ldr r0, _08025414
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0xD]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08025414: .4byte gUnknown_203B2B4
|
||||
thumb_func_end sub_802540C
|
||||
|
||||
thumb_func_start sub_8025418
|
||||
sub_8025418:
|
||||
push {r4,lr}
|
||||
ldr r4, _08025430
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _0802542A
|
||||
bl MemoryFree
|
||||
movs r0, 0
|
||||
str r0, [r4]
|
||||
_0802542A:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08025430: .4byte gUnknown_203B2B4
|
||||
thumb_func_end sub_8025418
|
||||
|
||||
thumb_func_start sub_8025434
|
||||
sub_8025434:
|
||||
push {lr}
|
||||
ldr r1, _08025448
|
||||
ldr r1, [r1]
|
||||
str r0, [r1, 0x4]
|
||||
bl sub_802544C
|
||||
bl sub_8025518
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08025448: .4byte gUnknown_203B2B4
|
||||
thumb_func_end sub_8025434
|
||||
|
||||
thumb_func_start sub_802544C
|
||||
sub_802544C:
|
||||
push {r4-r7,lr}
|
||||
ldr r4, _08025470
|
||||
ldr r0, [r4]
|
||||
movs r1, 0x8C
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
bl sub_8006518
|
||||
ldr r1, [r4]
|
||||
ldr r0, [r1, 0x4]
|
||||
cmp r0, 0x3
|
||||
beq _08025478
|
||||
cmp r0, 0xD
|
||||
beq _080254B0
|
||||
movs r2, 0
|
||||
ldr r3, _08025474
|
||||
b _080254D8
|
||||
.align 2, 0
|
||||
_08025470: .4byte gUnknown_203B2B4
|
||||
_08025474: .4byte gUnknown_80DD148
|
||||
_08025478:
|
||||
ldr r0, [r1]
|
||||
cmp r0, 0
|
||||
bne _0802548E
|
||||
movs r2, 0xB0
|
||||
lsls r2, 1
|
||||
adds r1, r2
|
||||
ldr r0, _080254A8
|
||||
ldm r0!, {r3,r5,r6}
|
||||
stm r1!, {r3,r5,r6}
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
_0802548E:
|
||||
bl sub_8025728
|
||||
ldr r2, [r4]
|
||||
movs r0, 0xA4
|
||||
lsls r0, 1
|
||||
adds r2, r0
|
||||
ldr r1, _080254AC
|
||||
ldm r1!, {r5-r7}
|
||||
stm r2!, {r5-r7}
|
||||
ldm r1!, {r3,r5,r6}
|
||||
stm r2!, {r3,r5,r6}
|
||||
b _080254C6
|
||||
.align 2, 0
|
||||
_080254A8: .4byte gUnknown_80DD190
|
||||
_080254AC: .4byte gUnknown_80DD160
|
||||
_080254B0:
|
||||
bl sub_802591C
|
||||
ldr r2, [r4]
|
||||
movs r0, 0xA4
|
||||
lsls r0, 1
|
||||
adds r2, r0
|
||||
ldr r1, _080254D4
|
||||
ldm r1!, {r3,r5,r7}
|
||||
stm r2!, {r3,r5,r7}
|
||||
ldm r1!, {r3,r6,r7}
|
||||
stm r2!, {r3,r6,r7}
|
||||
_080254C6:
|
||||
ldr r1, [r4]
|
||||
adds r0, r1, r0
|
||||
adds r1, 0xC8
|
||||
bl sub_8012CAC
|
||||
b _080254F8
|
||||
.align 2, 0
|
||||
_080254D4: .4byte gUnknown_80DD178
|
||||
_080254D8:
|
||||
ldr r0, [r4]
|
||||
lsls r1, r2, 1
|
||||
adds r1, r2
|
||||
lsls r1, 3
|
||||
adds r0, r1
|
||||
movs r5, 0x8C
|
||||
lsls r5, 1
|
||||
adds r0, r5
|
||||
adds r1, r3, 0
|
||||
ldm r1!, {r5-r7}
|
||||
stm r0!, {r5-r7}
|
||||
ldm r1!, {r5-r7}
|
||||
stm r0!, {r5-r7}
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x3
|
||||
ble _080254D8
|
||||
_080254F8:
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, _08025514
|
||||
ldr r0, [r0]
|
||||
movs r6, 0x8C
|
||||
lsls r6, 1
|
||||
adds r0, r6
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08025514: .4byte gUnknown_203B2B4
|
||||
thumb_func_end sub_802544C
|
||||
|
||||
thumb_func_start sub_8025518
|
||||
sub_8025518:
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0xC
|
||||
ldr r1, _08025534
|
||||
ldr r0, [r1]
|
||||
ldr r0, [r0, 0x4]
|
||||
adds r5, r1, 0
|
||||
cmp r0, 0x13
|
||||
bls _0802552A
|
||||
b _08025720
|
||||
_0802552A:
|
||||
lsls r0, 2
|
||||
ldr r1, _08025538
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08025534: .4byte gUnknown_203B2B4
|
||||
_08025538: .4byte _0802553C
|
||||
.align 2, 0
|
||||
_0802553C:
|
||||
.4byte _0802558C
|
||||
.4byte _080255A0
|
||||
.4byte _080255BA
|
||||
.4byte _080255C2
|
||||
.4byte _0802560C
|
||||
.4byte _0802561A
|
||||
.4byte _08025720
|
||||
.4byte _080256A8
|
||||
.4byte _0802567A
|
||||
.4byte _08025688
|
||||
.4byte _08025698
|
||||
.4byte _08025626
|
||||
.4byte _08025634
|
||||
.4byte _0802563C
|
||||
.4byte _08025668
|
||||
.4byte _080256CC
|
||||
.4byte _080256F2
|
||||
.4byte _080256FC
|
||||
.4byte _08025714
|
||||
.4byte _08025720
|
||||
_0802558C:
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x1
|
||||
str r0, [r1, 0x8]
|
||||
ldr r0, _08025598
|
||||
ldr r3, _0802559C
|
||||
b _080256B8
|
||||
.align 2, 0
|
||||
_08025598: .4byte gUnknown_80DD1A8
|
||||
_0802559C: .4byte 0x00000301
|
||||
_080255A0:
|
||||
movs r1, 0x4
|
||||
ldr r0, [r5]
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080255AC
|
||||
movs r1, 0x2
|
||||
_080255AC:
|
||||
adds r0, r1, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0xA
|
||||
bl sub_8023868
|
||||
b _08025720
|
||||
_080255BA:
|
||||
movs r0, 0x1
|
||||
bl sub_8023B7C
|
||||
b _08025720
|
||||
_080255C2:
|
||||
ldr r1, [r5]
|
||||
ldr r0, [r1]
|
||||
cmp r0, 0
|
||||
bne _080255D2
|
||||
adds r1, 0x18
|
||||
movs r0, 0x3
|
||||
bl sub_8025E68
|
||||
_080255D2:
|
||||
bl sub_8023DA4
|
||||
ldr r4, _08025608
|
||||
ldr r0, [r5]
|
||||
ldr r1, [r0, 0x1C]
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x7
|
||||
bl PrintColoredPokeNameToBuffer
|
||||
adds r4, 0x50
|
||||
ldr r0, [r5]
|
||||
ldr r1, [r0, 0x1C]
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x6
|
||||
bl PrintColoredPokeNameToBuffer
|
||||
ldr r2, [r5]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x78
|
||||
adds r1, r2, 0
|
||||
adds r1, 0xC8
|
||||
movs r4, 0x84
|
||||
lsls r4, 1
|
||||
adds r3, r2, r4
|
||||
ldr r2, [r2, 0x70]
|
||||
b _08025654
|
||||
.align 2, 0
|
||||
_08025608: .4byte gAvailablePokemonNames
|
||||
_0802560C:
|
||||
ldr r0, [r5]
|
||||
movs r1, 0xE
|
||||
ldrsh r0, [r0, r1]
|
||||
movs r1, 0x2
|
||||
bl sub_8024458
|
||||
b _08025720
|
||||
_0802561A:
|
||||
ldr r0, [r5]
|
||||
movs r4, 0xE
|
||||
ldrsh r0, [r0, r4]
|
||||
bl sub_801BEEC
|
||||
b _08025720
|
||||
_08025626:
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0xA
|
||||
bl sub_801A5D8
|
||||
b _08025720
|
||||
_08025634:
|
||||
movs r0, 0x1
|
||||
bl sub_801A8D0
|
||||
b _08025720
|
||||
_0802563C:
|
||||
bl sub_801A9E0
|
||||
ldr r0, _08025664
|
||||
ldr r2, [r0]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x78
|
||||
adds r1, r2, 0
|
||||
adds r1, 0xC8
|
||||
movs r4, 0x84
|
||||
lsls r4, 1
|
||||
adds r3, r2, r4
|
||||
ldr r2, [r2, 0x74]
|
||||
_08025654:
|
||||
str r2, [sp]
|
||||
movs r2, 0x2
|
||||
str r2, [sp, 0x4]
|
||||
movs r2, 0
|
||||
bl sub_8012D60
|
||||
b _08025720
|
||||
.align 2, 0
|
||||
_08025664: .4byte gUnknown_203B2B4
|
||||
_08025668:
|
||||
ldr r1, [r5]
|
||||
adds r1, 0x14
|
||||
add r0, sp, 0x8
|
||||
bl HeldItemToSlot
|
||||
add r0, sp, 0x8
|
||||
bl sub_801B3C0
|
||||
b _08025720
|
||||
_0802567A:
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x2
|
||||
str r0, [r1, 0x8]
|
||||
ldr r0, _08025684
|
||||
b _080256B6
|
||||
.align 2, 0
|
||||
_08025684: .4byte gUnknown_80DD1C8
|
||||
_08025688:
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x2
|
||||
str r0, [r1, 0x8]
|
||||
ldr r0, _08025694
|
||||
b _080256B6
|
||||
.align 2, 0
|
||||
_08025694: .4byte gUnknown_80DD1EC
|
||||
_08025698:
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x2
|
||||
str r0, [r1, 0x8]
|
||||
ldr r0, _080256A4
|
||||
b _080256B6
|
||||
.align 2, 0
|
||||
_080256A4: .4byte gUnknown_80DD240
|
||||
_080256A8:
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x1
|
||||
str r0, [r1, 0x8]
|
||||
movs r0, 0xCF
|
||||
bl PlaySound
|
||||
ldr r0, _080256C4
|
||||
_080256B6:
|
||||
ldr r3, _080256C8
|
||||
_080256B8:
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl sub_80141B4
|
||||
b _08025720
|
||||
.align 2, 0
|
||||
_080256C4: .4byte gUnknown_80DD270
|
||||
_080256C8: .4byte 0x00000101
|
||||
_080256CC:
|
||||
ldr r1, [r5]
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x28
|
||||
ldr r1, [r1, 0x1C]
|
||||
adds r1, 0x2C
|
||||
bl sub_809401C
|
||||
ldr r2, [r5]
|
||||
movs r0, 0xE
|
||||
ldrsh r1, [r2, r0]
|
||||
adds r2, 0x28
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0x3
|
||||
movs r3, 0
|
||||
bl sub_801EE10
|
||||
b _08025720
|
||||
_080256F2:
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
bl sub_801F1B0
|
||||
b _08025720
|
||||
_080256FC:
|
||||
ldr r2, [r5]
|
||||
ldr r0, [r2, 0x20]
|
||||
adds r1, r2, 0
|
||||
adds r1, 0x28
|
||||
adds r2, 0x68
|
||||
bl sub_8093560
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x68
|
||||
bl sub_801F808
|
||||
b _08025720
|
||||
_08025714:
|
||||
ldr r0, [r5]
|
||||
ldr r1, [r0, 0x1C]
|
||||
adds r1, 0x4C
|
||||
movs r0, 0x2
|
||||
bl sub_801602C
|
||||
_08025720:
|
||||
add sp, 0xC
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8025518
|
||||
|
||||
thumb_func_start sub_8025728
|
||||
sub_8025728:
|
||||
@ -2708,192 +2190,4 @@ _080268C4: .4byte gUnknown_80D4920
|
||||
_080268C8: .4byte gUnknown_80D4928
|
||||
thumb_func_end sub_8026878
|
||||
|
||||
thumb_func_start sub_80268CC
|
||||
sub_80268CC:
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
ldr r4, _0802690C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x7C
|
||||
bl sub_8012FD8
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080268F8
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x7C
|
||||
mov r1, sp
|
||||
bl sub_8013114
|
||||
ldr r1, [sp]
|
||||
cmp r1, 0x1
|
||||
beq _080268F8
|
||||
ldr r0, [r4]
|
||||
str r1, [r0, 0x70]
|
||||
_080268F8:
|
||||
ldr r0, [sp]
|
||||
subs r0, 0x1
|
||||
cmp r0, 0xC
|
||||
bls _08026902
|
||||
b _08026A6E
|
||||
_08026902:
|
||||
lsls r0, 2
|
||||
ldr r1, _08026910
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_0802690C: .4byte gUnknown_203B2B8
|
||||
_08026910: .4byte _08026914
|
||||
.align 2, 0
|
||||
_08026914:
|
||||
.4byte _08026A68
|
||||
.4byte _08026A6E
|
||||
.4byte _08026A6E
|
||||
.4byte _08026A58
|
||||
.4byte _08026A60
|
||||
.4byte _08026948
|
||||
.4byte _0802698C
|
||||
.4byte _080269B4
|
||||
.4byte _080269F0
|
||||
.4byte _08026A00
|
||||
.4byte _08026A08
|
||||
.4byte _08026A10
|
||||
.4byte _080269F8
|
||||
_08026948:
|
||||
ldr r4, _08026984
|
||||
ldr r0, [r4]
|
||||
movs r1, 0xA
|
||||
ldrsh r0, [r0, r1]
|
||||
bl sub_808D750
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08026976
|
||||
ldr r0, [r4]
|
||||
movs r2, 0xA
|
||||
ldrsh r1, [r0, r2]
|
||||
movs r0, 0x58
|
||||
muls r1, r0
|
||||
ldr r0, _08026988
|
||||
ldr r0, [r0]
|
||||
adds r1, r0
|
||||
ldrh r2, [r1]
|
||||
movs r0, 0x2
|
||||
orrs r0, r2
|
||||
strh r0, [r1]
|
||||
bl nullsub_104
|
||||
_08026976:
|
||||
bl sub_808ED00
|
||||
movs r0, 0x5
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
.align 2, 0
|
||||
_08026984: .4byte gUnknown_203B2B8
|
||||
_08026988: .4byte gRecruitedPokemonRef
|
||||
_0802698C:
|
||||
ldr r0, _080269AC
|
||||
ldr r0, [r0]
|
||||
ldr r2, [r0, 0x18]
|
||||
ldrh r1, [r2]
|
||||
ldr r0, _080269B0
|
||||
ands r0, r1
|
||||
strh r0, [r2]
|
||||
bl nullsub_104
|
||||
bl sub_808ED00
|
||||
movs r0, 0x6
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
.align 2, 0
|
||||
_080269AC: .4byte gUnknown_203B2B8
|
||||
_080269B0: .4byte 0x0000fffd
|
||||
_080269B4:
|
||||
ldr r2, _080269E8
|
||||
ldr r0, _080269EC
|
||||
ldr r0, [r0]
|
||||
movs r3, 0xA
|
||||
ldrsh r1, [r0, r3]
|
||||
movs r0, 0x58
|
||||
muls r1, r0
|
||||
ldr r0, [r2]
|
||||
adds r4, r0, r1
|
||||
bl GetPlayerPokemonStruct
|
||||
ldrb r1, [r4, 0x2]
|
||||
cmp r1, 0
|
||||
bne _080269DA
|
||||
strb r1, [r0, 0x2]
|
||||
movs r0, 0x1
|
||||
strb r0, [r4, 0x2]
|
||||
bl nullsub_104
|
||||
_080269DA:
|
||||
bl sub_808ED00
|
||||
movs r0, 0x7
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
.align 2, 0
|
||||
_080269E8: .4byte gRecruitedPokemonRef
|
||||
_080269EC: .4byte gUnknown_203B2B8
|
||||
_080269F0:
|
||||
movs r0, 0xC
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
_080269F8:
|
||||
movs r0, 0x16
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
_08026A00:
|
||||
movs r0, 0xE
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
_08026A08:
|
||||
movs r0, 0x12
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
_08026A10:
|
||||
ldr r0, _08026A50
|
||||
bl PlaySound
|
||||
ldr r4, _08026A54
|
||||
ldr r1, [r4]
|
||||
ldrb r0, [r1, 0x14]
|
||||
cmp r0, 0
|
||||
beq _08026A28
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x14
|
||||
bl AddHeldItemToInventory
|
||||
_08026A28:
|
||||
bl FillInventoryGaps
|
||||
ldr r0, [r4]
|
||||
movs r1, 0
|
||||
strb r1, [r0, 0x14]
|
||||
ldr r0, [r4]
|
||||
strb r1, [r0, 0x15]
|
||||
ldr r1, [r4]
|
||||
movs r2, 0xA
|
||||
ldrsh r0, [r1, r2]
|
||||
adds r1, 0x14
|
||||
bl GivePokemonItem
|
||||
bl nullsub_104
|
||||
movs r0, 0x11
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
.align 2, 0
|
||||
_08026A50: .4byte 0x0000014d
|
||||
_08026A54: .4byte gUnknown_203B2B8
|
||||
_08026A58:
|
||||
movs r0, 0x3
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
_08026A60:
|
||||
movs r0, 0x4
|
||||
bl sub_8026074
|
||||
b _08026A6E
|
||||
_08026A68:
|
||||
movs r0, 0x19
|
||||
bl sub_8026074
|
||||
_08026A6E:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80268CC
|
||||
|
||||
.align 2,0
|
||||
|
@ -1453,7 +1453,7 @@ _08033512:
|
||||
strb r1, [r0]
|
||||
adds r0, r2, 0x4
|
||||
movs r1, 0
|
||||
bl sub_803C200
|
||||
bl GetDungeonTeamRankPts
|
||||
ldr r1, [r4]
|
||||
movs r3, 0xAC
|
||||
lsls r3, 3
|
||||
|
@ -768,7 +768,7 @@ _0809DF24:
|
||||
str r0, [r1]
|
||||
add r0, sp, 0x4
|
||||
ldrh r0, [r0, 0x2]
|
||||
bl sub_80119C0
|
||||
bl IsFanfareSEPlaying_1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809DF42
|
||||
@ -4176,7 +4176,7 @@ _0809FCCE:
|
||||
.align 2, 0
|
||||
_0809FCE4: .4byte gUnknown_2039D98
|
||||
_0809FCE8:
|
||||
bl sub_80118A4
|
||||
bl StopAllMusic_1
|
||||
bl _0809EAE0
|
||||
_0809FCF0:
|
||||
add r0, sp, 0x8
|
||||
@ -4190,7 +4190,7 @@ _0809FCF0:
|
||||
_0809FD00:
|
||||
movs r0, 0x1E
|
||||
_0809FD02:
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
bl _0809EAE0
|
||||
_0809FD0A:
|
||||
add r0, sp, 0x8
|
||||
@ -4261,12 +4261,12 @@ _0809FD82:
|
||||
bl _0809EAE0
|
||||
_0809FD90:
|
||||
adds r0, r1, 0
|
||||
bl sub_8011914
|
||||
bl xxx_call_queue_bgm
|
||||
bl _0809EAE0
|
||||
.align 2, 0
|
||||
_0809FD9C: .4byte 0x000003e7
|
||||
_0809FDA0:
|
||||
bl sub_8011924
|
||||
bl xxx_call_stop_bgm
|
||||
bl _0809EAE0
|
||||
_0809FDA8:
|
||||
add r0, sp, 0x8
|
||||
@ -4288,13 +4288,13 @@ _0809FDC2:
|
||||
lsrs r0, 16
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl sub_8011974
|
||||
bl xxx_call_play_fanfare_se
|
||||
bl _0809EAE0
|
||||
_0809FDD4:
|
||||
ldr r0, [sp, 0xC]
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl sub_801199C
|
||||
bl xxx_call_stop_fanfare_se
|
||||
bl _0809EAE0
|
||||
_0809FDE2:
|
||||
ldr r0, [sp, 0xC]
|
||||
@ -4312,7 +4312,7 @@ _0809FDF8:
|
||||
movs r1, 0x1E
|
||||
_0809FDFA:
|
||||
adds r0, r2, 0
|
||||
bl sub_80119AC
|
||||
bl xxx_call_fade_out_fanfare_se
|
||||
bl _0809EAE0
|
||||
_0809FE04:
|
||||
mov r1, r9
|
||||
@ -7349,7 +7349,7 @@ _080A1730:
|
||||
bl sub_80A2740
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl sub_80969D0
|
||||
bl CountJobsinDungeon
|
||||
movs r1, 0
|
||||
cmp r0, 0
|
||||
ble _080A1750
|
||||
@ -8734,7 +8734,7 @@ _080A229E:
|
||||
bl sub_8098F00
|
||||
lsls r0, r5, 16
|
||||
lsrs r0, 16
|
||||
bl sub_80118C4
|
||||
bl FadeOutAllMusic
|
||||
b _080A236A
|
||||
_080A22AE:
|
||||
bl GetCurrentBGSong
|
||||
@ -8781,7 +8781,7 @@ _080A2304:
|
||||
ldr r5, _080A231C
|
||||
cmp r0, r5
|
||||
beq _080A236A
|
||||
bl sub_8011914
|
||||
bl xxx_call_queue_bgm
|
||||
_080A2312:
|
||||
strh r5, [r4]
|
||||
b _080A1EBE
|
||||
|
@ -1,660 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start JirachiWish
|
||||
JirachiWish:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x78
|
||||
movs r0, 0x1A
|
||||
bl GetEntityFromClientType
|
||||
adds r6, r0, 0
|
||||
ldr r0, _0808B82C
|
||||
ldr r1, _0808B830
|
||||
bl CopySpeciesNametoBuffer
|
||||
ldr r4, _0808B834
|
||||
adds r0, r4, 0
|
||||
bl sub_80855E4
|
||||
adds r0, r6, 0
|
||||
bl _call_via_r4
|
||||
movs r0, 0
|
||||
bl sub_8041888
|
||||
ldr r0, [r6, 0x70]
|
||||
movs r1, 0xAE
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
movs r4, 0x1
|
||||
strb r4, [r0]
|
||||
ldr r0, [r6, 0x70]
|
||||
movs r2, 0xAF
|
||||
lsls r2, 1
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r0, r6, 0
|
||||
movs r1, 0xE
|
||||
movs r2, 0
|
||||
bl sub_80861B8
|
||||
ldr r0, _0808B838
|
||||
bl sub_80855E4
|
||||
ldr r0, _0808B83C
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0808B840
|
||||
adds r0, r1
|
||||
strb r4, [r0]
|
||||
movs r0, 0x1E
|
||||
bl sub_8083ED8
|
||||
movs r0, 0x1E
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
ldr r0, _0808B844
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
ldr r0, _0808B848
|
||||
bl PlaySoundEffect
|
||||
movs r0, 0x96
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
bl sub_80862BC
|
||||
ldr r0, _0808B84C
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0x79
|
||||
bl sub_8083E88
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
movs r1, 0
|
||||
bl sub_80856E0
|
||||
movs r0, 0xB5
|
||||
lsls r0, 1
|
||||
bl PlaySoundEffect
|
||||
ldr r0, _0808B850
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
bl SpriteLookAroundEffect
|
||||
ldr r0, _0808B854
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
_0808B690:
|
||||
ldr r4, _0808B858
|
||||
_0808B692:
|
||||
movs r0, 0
|
||||
ldr r1, [r4]
|
||||
ldr r2, _0808B85C
|
||||
ldr r3, _0808B860
|
||||
bl sub_8052C68
|
||||
mov r9, r0
|
||||
cmp r0, 0
|
||||
ble _0808B692
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
mov r2, r9
|
||||
cmp r2, 0x1
|
||||
bne _0808B754
|
||||
ldr r0, _0808B864
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
bl JirachiWishGrantDialogue
|
||||
movs r0, 0
|
||||
add r7, sp, 0x6C
|
||||
_0808B6CA:
|
||||
adds r0, 0x1
|
||||
mov r8, r0
|
||||
mov r4, sp
|
||||
movs r5, 0x8
|
||||
_0808B6D2:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x69
|
||||
movs r2, 0
|
||||
bl sub_8045C28
|
||||
adds r4, 0x4
|
||||
subs r5, 0x1
|
||||
cmp r5, 0
|
||||
bge _0808B6D2
|
||||
movs r0, 0x3
|
||||
bl DungeonRandomCapped
|
||||
ldrh r1, [r6, 0x4]
|
||||
adds r1, r0
|
||||
subs r1, 0x1
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
ldr r2, _0808B868
|
||||
ldr r0, [sp, 0x6C]
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x6C]
|
||||
movs r0, 0x3
|
||||
bl DungeonRandomCapped
|
||||
ldrh r2, [r6, 0x6]
|
||||
adds r2, r0
|
||||
subs r2, 0x1
|
||||
lsls r2, 16
|
||||
ldr r0, _0808B86C
|
||||
ldr r1, [sp, 0x6C]
|
||||
ands r1, r0
|
||||
orrs r1, r2
|
||||
str r1, [sp, 0x6C]
|
||||
movs r2, 0
|
||||
ldrsh r0, [r7, r2]
|
||||
asrs r1, 16
|
||||
bl GetMapTile_2
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x3
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0808B744
|
||||
movs r0, 0xA6
|
||||
lsls r0, 1
|
||||
bl PlaySoundEffect
|
||||
adds r0, r7, 0
|
||||
bl sub_808BB3C
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
mov r2, sp
|
||||
movs r3, 0x9
|
||||
bl sub_8046860
|
||||
_0808B744:
|
||||
mov r0, r8
|
||||
cmp r0, 0x5
|
||||
ble _0808B6CA
|
||||
ldr r0, [r6, 0x70]
|
||||
ldr r2, _0808B870
|
||||
adds r1, r0, r2
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
_0808B754:
|
||||
mov r0, r9
|
||||
cmp r0, 0x2
|
||||
bne _0808B80A
|
||||
ldr r0, _0808B874
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
bl JirachiWishGrantDialogue
|
||||
movs r0, 0
|
||||
add r1, sp, 0x24
|
||||
mov r8, r1
|
||||
add r7, sp, 0x70
|
||||
_0808B776:
|
||||
adds r0, 0x1
|
||||
mov r10, r0
|
||||
mov r4, r8
|
||||
movs r5, 0x8
|
||||
_0808B77E:
|
||||
movs r0, 0
|
||||
bl sub_803D73C
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_8045C28
|
||||
adds r4, 0x4
|
||||
subs r5, 0x1
|
||||
cmp r5, 0
|
||||
bge _0808B77E
|
||||
movs r0, 0x3
|
||||
bl DungeonRandomCapped
|
||||
ldrh r1, [r6, 0x4]
|
||||
adds r1, r0
|
||||
subs r1, 0x1
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
ldr r2, _0808B868
|
||||
ldr r0, [sp, 0x70]
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x70]
|
||||
movs r0, 0x3
|
||||
bl DungeonRandomCapped
|
||||
ldrh r2, [r6, 0x6]
|
||||
adds r2, r0
|
||||
subs r2, 0x1
|
||||
lsls r2, 16
|
||||
ldr r0, _0808B86C
|
||||
ldr r1, [sp, 0x70]
|
||||
ands r1, r0
|
||||
orrs r1, r2
|
||||
str r1, [sp, 0x70]
|
||||
movs r2, 0
|
||||
ldrsh r0, [r7, r2]
|
||||
asrs r1, 16
|
||||
bl GetMapTile_2
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x3
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0808B7FA
|
||||
movs r0, 0xC8
|
||||
lsls r0, 1
|
||||
bl PlaySoundEffect
|
||||
adds r0, r7, 0
|
||||
bl sub_808BB3C
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
mov r2, r8
|
||||
movs r3, 0x9
|
||||
bl sub_8046860
|
||||
_0808B7FA:
|
||||
mov r0, r10
|
||||
cmp r0, 0x5
|
||||
ble _0808B776
|
||||
ldr r0, [r6, 0x70]
|
||||
ldr r2, _0808B870
|
||||
adds r1, r0, r2
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
_0808B80A:
|
||||
mov r0, r9
|
||||
cmp r0, 0x3
|
||||
bne _0808B8CA
|
||||
bl JirachiFriendAreaSearch
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x3A
|
||||
bne _0808B87C
|
||||
ldr r0, _0808B878
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
b _0808B690
|
||||
.align 2, 0
|
||||
_0808B82C: .4byte gUnknown_202E038
|
||||
_0808B830: .4byte 0x0000019d
|
||||
_0808B834: .4byte sub_808BBA8
|
||||
_0808B838: .4byte sub_80861A8
|
||||
_0808B83C: .4byte gDungeonGlobalData
|
||||
_0808B840: .4byte 0x0001356c
|
||||
_0808B844: .4byte gUnknown_8105668
|
||||
_0808B848: .4byte 0x000001a7
|
||||
_0808B84C: .4byte gUnknown_8105674
|
||||
_0808B850: .4byte gUnknown_81056B8
|
||||
_0808B854: .4byte gUnknown_81056DC
|
||||
_0808B858: .4byte gUnknown_8105798
|
||||
_0808B85C: .4byte gUnknown_810579C
|
||||
_0808B860: .4byte 0x00000705
|
||||
_0808B864: .4byte gUnknown_810581C
|
||||
_0808B868: .4byte 0xffff0000
|
||||
_0808B86C: .4byte 0x0000ffff
|
||||
_0808B870: .4byte 0x0000015d
|
||||
_0808B874: .4byte gUnknown_8105974
|
||||
_0808B878: .4byte gUnknown_8105A08
|
||||
_0808B87C:
|
||||
ldr r0, _0808BA30
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
bl JirachiWishGrantDialogue
|
||||
ldr r0, [r6, 0x70]
|
||||
ldr r2, _0808BA34
|
||||
adds r1, r0, r2
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
ldr r0, _0808BA38
|
||||
bl DisplayDungeonDialogue
|
||||
adds r0, r4, 0
|
||||
bl UnlockFriendArea
|
||||
movs r0, 0xD4
|
||||
bl PlaySoundEffect
|
||||
bl GetLeaderEntity
|
||||
adds r1, r0, 0
|
||||
ldr r0, _0808BA3C
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
ldr r0, _0808BA40
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_8092578
|
||||
ldr r0, _0808BA44
|
||||
bl DisplayDungeonDialogue
|
||||
_0808B8CA:
|
||||
mov r0, r9
|
||||
cmp r0, 0x4
|
||||
bne _0808B98E
|
||||
ldr r0, _0808BA48
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
bl JirachiWishGrantDialogue
|
||||
movs r0, 0
|
||||
add r1, sp, 0x48
|
||||
mov r8, r1
|
||||
add r7, sp, 0x74
|
||||
_0808B8EC:
|
||||
adds r0, 0x1
|
||||
mov r10, r0
|
||||
mov r4, r8
|
||||
movs r5, 0x3
|
||||
_0808B8F4:
|
||||
movs r0, 0x8
|
||||
bl DungeonRandomCapped
|
||||
ldr r2, _0808BA4C
|
||||
adds r0, r2
|
||||
ldrb r1, [r0]
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_8045C28
|
||||
adds r4, 0x4
|
||||
subs r5, 0x1
|
||||
cmp r5, 0
|
||||
bge _0808B8F4
|
||||
movs r0, 0x3
|
||||
bl DungeonRandomCapped
|
||||
ldrh r1, [r6, 0x4]
|
||||
adds r1, r0
|
||||
subs r1, 0x1
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
ldr r2, _0808BA50
|
||||
ldr r0, [sp, 0x74]
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x74]
|
||||
movs r0, 0x3
|
||||
bl DungeonRandomCapped
|
||||
ldrh r2, [r6, 0x6]
|
||||
adds r2, r0
|
||||
subs r2, 0x1
|
||||
lsls r2, 16
|
||||
ldr r0, _0808BA54
|
||||
ldr r1, [sp, 0x74]
|
||||
ands r1, r0
|
||||
orrs r1, r2
|
||||
str r1, [sp, 0x74]
|
||||
movs r2, 0
|
||||
ldrsh r0, [r7, r2]
|
||||
asrs r1, 16
|
||||
bl GetMapTile_2
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x3
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0808B970
|
||||
movs r0, 0xC8
|
||||
lsls r0, 1
|
||||
bl PlaySoundEffect
|
||||
adds r0, r7, 0
|
||||
bl sub_808BB3C
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
mov r2, r8
|
||||
movs r3, 0x4
|
||||
bl sub_8046860
|
||||
_0808B970:
|
||||
mov r0, r10
|
||||
cmp r0, 0x4
|
||||
ble _0808B8EC
|
||||
ldr r0, [r6, 0x70]
|
||||
ldr r2, _0808BA34
|
||||
adds r1, r0, r2
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
ldr r0, _0808BA58
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
_0808B98E:
|
||||
mov r0, r9
|
||||
cmp r0, 0x5
|
||||
bne _0808B9F8
|
||||
ldr r0, _0808BA5C
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
adds r0, r6, 0
|
||||
bl JirachiWishGrantDialogue
|
||||
ldr r0, [r6, 0x70]
|
||||
ldr r2, _0808BA34
|
||||
adds r1, r0, r2
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
ldr r0, _0808BA60
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
bl GetLeaderEntity
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x4
|
||||
adds r0, r6, 0x4
|
||||
bl CalculateFacingDir
|
||||
adds r1, r0, 0
|
||||
adds r0, r6, 0
|
||||
bl SetFacingDirection
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
ldr r0, _0808BA64
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
ldr r0, _0808BA68
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0808BA6C
|
||||
adds r0, r1
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
_0808B9F8:
|
||||
ldr r0, _0808BA70
|
||||
bl DisplayDungeonDialogue
|
||||
adds r0, r6, 0
|
||||
bl JirachiSpinEffect
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
ldr r0, _0808BA74
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
bl sub_808BD38
|
||||
add sp, 0x78
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0808BA30: .4byte gUnknown_8105AD4
|
||||
_0808BA34: .4byte 0x0000015d
|
||||
_0808BA38: .4byte gUnknown_8105B20
|
||||
_0808BA3C: .4byte gAvailablePokemonNames
|
||||
_0808BA40: .4byte gUnknown_202DE58
|
||||
_0808BA44: .4byte gUnknown_8105B68
|
||||
_0808BA48: .4byte gUnknown_8105BA8
|
||||
_0808BA4C: .4byte gUnknown_81074FC
|
||||
_0808BA50: .4byte 0xffff0000
|
||||
_0808BA54: .4byte 0x0000ffff
|
||||
_0808BA58: .4byte gUnknown_8105BF4
|
||||
_0808BA5C: .4byte gUnknown_8105D2C
|
||||
_0808BA60: .4byte gUnknown_8105D80
|
||||
_0808BA64: .4byte gUnknown_8105D9C
|
||||
_0808BA68: .4byte gDungeonGlobalData
|
||||
_0808BA6C: .4byte 0x00000674
|
||||
_0808BA70: .4byte gUnknown_81058E0
|
||||
_0808BA74: .4byte gUnknown_810593C
|
||||
thumb_func_end JirachiWish
|
||||
|
||||
thumb_func_start JirachiReFightDialogue
|
||||
JirachiReFightDialogue:
|
||||
push {lr}
|
||||
ldr r0, _0808BA94
|
||||
bl HasRecruitedMon
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0808BA9C
|
||||
bl sub_8086448
|
||||
ldr r0, _0808BA98
|
||||
bl sub_80866C4
|
||||
b _0808BAA0
|
||||
.align 2, 0
|
||||
_0808BA94: .4byte 0x0000019d
|
||||
_0808BA98: .4byte gJirachiReFightDialogue_1
|
||||
_0808BA9C:
|
||||
bl JirachiPreFightDialogue
|
||||
_0808BAA0:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end JirachiReFightDialogue
|
||||
|
||||
thumb_func_start JirachiWishGrantFlash
|
||||
JirachiWishGrantFlash:
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
ldr r0, _0808BB34
|
||||
bl PlaySoundEffect
|
||||
ldr r1, _0808BB38
|
||||
movs r0, 0x1F
|
||||
str r0, [r1]
|
||||
movs r4, 0xFA
|
||||
movs r5, 0x1
|
||||
_0808BAB8:
|
||||
str r5, [sp]
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x1
|
||||
bl SetDungeonBGColorRGB
|
||||
movs r0, 0x46
|
||||
bl sub_803E46C
|
||||
subs r4, 0xA
|
||||
cmp r4, 0x95
|
||||
bgt _0808BAB8
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
movs r4, 0xFA
|
||||
movs r5, 0x1
|
||||
_0808BADE:
|
||||
str r5, [sp]
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x1
|
||||
bl SetDungeonBGColorRGB
|
||||
movs r0, 0x46
|
||||
bl sub_803E46C
|
||||
subs r4, 0xA
|
||||
cmp r4, 0xC7
|
||||
bgt _0808BADE
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
movs r4, 0xFA
|
||||
movs r5, 0x1
|
||||
_0808BB04:
|
||||
str r5, [sp]
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x1
|
||||
bl SetDungeonBGColorRGB
|
||||
movs r0, 0x46
|
||||
bl sub_803E46C
|
||||
subs r4, 0xA
|
||||
cmp r4, 0
|
||||
bge _0808BB04
|
||||
movs r0, 0xA
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
bl sub_8085EB0
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0808BB34: .4byte 0x000002c1
|
||||
_0808BB38: .4byte gUnknown_202EDC8
|
||||
thumb_func_end JirachiWishGrantFlash
|
||||
|
||||
thumb_func_start sub_808BB3C
|
||||
sub_808BB3C:
|
||||
push {lr}
|
||||
sub sp, 0x8
|
||||
adds r3, r0, 0
|
||||
movs r0, 0
|
||||
ldrsh r1, [r3, r0]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 11
|
||||
movs r1, 0xC0
|
||||
lsls r1, 4
|
||||
adds r0, r1
|
||||
cmp r0, 0
|
||||
bge _0808BB58
|
||||
adds r0, 0xFF
|
||||
_0808BB58:
|
||||
lsls r0, 8
|
||||
lsrs r0, 16
|
||||
ldr r1, _0808BBA0
|
||||
ldr r2, [sp, 0x4]
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp, 0x4]
|
||||
movs r0, 0x2
|
||||
ldrsh r1, [r3, r0]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 11
|
||||
movs r1, 0x80
|
||||
lsls r1, 5
|
||||
adds r0, r1
|
||||
cmp r0, 0
|
||||
bge _0808BB7C
|
||||
adds r0, 0xFF
|
||||
_0808BB7C:
|
||||
lsls r0, 8
|
||||
lsrs r0, 16
|
||||
lsls r0, 16
|
||||
ldr r1, _0808BBA4
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp, 0x4]
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r0, 0x64
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
add r3, sp, 0x4
|
||||
bl sub_8085EC8
|
||||
add sp, 0x8
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0808BBA0: .4byte 0xffff0000
|
||||
_0808BBA4: .4byte 0x0000ffff
|
||||
thumb_func_end sub_808BB3C
|
||||
|
||||
.align 2,0
|
@ -271,393 +271,4 @@ _080177F2:
|
||||
bx r0
|
||||
thumb_func_end sub_8017758
|
||||
|
||||
thumb_func_start sub_80177F8
|
||||
sub_80177F8:
|
||||
ldr r0, _0801781C
|
||||
ldr r1, [r0]
|
||||
movs r3, 0
|
||||
ldr r0, _08017820
|
||||
ldr r0, [r0]
|
||||
str r0, [r1, 0x24]
|
||||
movs r0, 0x4
|
||||
str r0, [r1, 0x28]
|
||||
movs r2, 0x1
|
||||
ldr r0, _08017824
|
||||
ldr r0, [r0]
|
||||
str r0, [r1, 0x2C]
|
||||
movs r0, 0x5
|
||||
str r0, [r1, 0x30]
|
||||
str r3, [r1, 0x34]
|
||||
str r2, [r1, 0x38]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0801781C: .4byte gUnknown_203B208
|
||||
_08017820: .4byte gUnknown_80D4920
|
||||
_08017824: .4byte gUnknown_80D4928
|
||||
thumb_func_end sub_80177F8
|
||||
|
||||
thumb_func_start sub_8017828
|
||||
sub_8017828:
|
||||
push {lr}
|
||||
sub sp, 0x4
|
||||
mov r0, sp
|
||||
bl sub_80144A4
|
||||
cmp r0, 0
|
||||
bne _080178C8
|
||||
ldr r1, [sp]
|
||||
cmp r1, 0x1
|
||||
beq _08017842
|
||||
ldr r0, _08017854
|
||||
ldr r0, [r0]
|
||||
str r1, [r0, 0x18]
|
||||
_08017842:
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x2
|
||||
beq _08017862
|
||||
cmp r0, 0x2
|
||||
bgt _08017858
|
||||
cmp r0, 0x1
|
||||
beq _080178C2
|
||||
b _080178C8
|
||||
.align 2, 0
|
||||
_08017854: .4byte gUnknown_203B208
|
||||
_08017858:
|
||||
cmp r0, 0x3
|
||||
beq _0801788E
|
||||
cmp r0, 0x6
|
||||
beq _080178BA
|
||||
b _080178C8
|
||||
_08017862:
|
||||
bl GetNumberOfFilledInventorySlots
|
||||
cmp r0, 0
|
||||
bne _08017872
|
||||
movs r0, 0x5
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080178C8
|
||||
_08017872:
|
||||
movs r0, 0
|
||||
bl sub_801CF50
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08017886
|
||||
movs r0, 0x8
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080178C8
|
||||
_08017886:
|
||||
movs r0, 0xB
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080178C8
|
||||
_0801788E:
|
||||
movs r0, 0x1
|
||||
bl sub_801CF14
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080178A2
|
||||
movs r0, 0x7
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080178C8
|
||||
_080178A2:
|
||||
bl GetNumberOfFilledInventorySlots
|
||||
cmp r0, 0x13
|
||||
ble _080178B2
|
||||
movs r0, 0x6
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080178C8
|
||||
_080178B2:
|
||||
movs r0, 0x14
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080178C8
|
||||
_080178BA:
|
||||
movs r0, 0x2
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080178C8
|
||||
_080178C2:
|
||||
movs r0, 0x3
|
||||
bl UpdateKangaskhanStorageState
|
||||
_080178C8:
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8017828
|
||||
|
||||
thumb_func_start sub_80178D0
|
||||
sub_80178D0:
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
mov r0, sp
|
||||
bl sub_80144A4
|
||||
cmp r0, 0
|
||||
bne _0801791E
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x4
|
||||
beq _080178F4
|
||||
cmp r0, 0x4
|
||||
bgt _080178EE
|
||||
cmp r0, 0x1
|
||||
beq _08017918
|
||||
b _0801791E
|
||||
_080178EE:
|
||||
cmp r0, 0x5
|
||||
beq _08017918
|
||||
b _0801791E
|
||||
_080178F4:
|
||||
ldr r4, _08017914
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xC
|
||||
bl MoveToStorage
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x10]
|
||||
bl ShiftItemsDownFrom
|
||||
bl FillInventoryGaps
|
||||
movs r0, 0x13
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _0801791E
|
||||
.align 2, 0
|
||||
_08017914: .4byte gUnknown_203B208
|
||||
_08017918:
|
||||
movs r0, 0xE
|
||||
bl UpdateKangaskhanStorageState
|
||||
_0801791E:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80178D0
|
||||
|
||||
thumb_func_start sub_8017928
|
||||
sub_8017928:
|
||||
push {lr}
|
||||
sub sp, 0x8
|
||||
mov r0, sp
|
||||
bl sub_80144A4
|
||||
cmp r0, 0
|
||||
bne _080179A2
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x4
|
||||
beq _0801794C
|
||||
cmp r0, 0x4
|
||||
bgt _08017946
|
||||
cmp r0, 0x1
|
||||
beq _0801799C
|
||||
b _080179A2
|
||||
_08017946:
|
||||
cmp r0, 0x5
|
||||
beq _0801799C
|
||||
b _080179A2
|
||||
_0801794C:
|
||||
ldr r0, _0801798C
|
||||
ldr r1, [r0]
|
||||
ldr r0, _08017990
|
||||
ldr r3, [r0]
|
||||
ldrb r0, [r3, 0xE]
|
||||
lsls r0, 1
|
||||
adds r1, 0x50
|
||||
adds r1, r0
|
||||
ldrb r2, [r3, 0xD]
|
||||
ldrh r0, [r1]
|
||||
subs r0, r2
|
||||
strh r0, [r1]
|
||||
ldrb r2, [r3, 0xE]
|
||||
ldr r1, _08017994
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
str r0, [sp, 0x4]
|
||||
ldrb r1, [r3, 0xD]
|
||||
lsls r1, 8
|
||||
ldr r2, _08017998
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x4]
|
||||
add r0, sp, 0x4
|
||||
bl AddHeldItemToInventory
|
||||
movs r0, 0x1D
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _080179A2
|
||||
.align 2, 0
|
||||
_0801798C: .4byte gTeamInventory_203B460
|
||||
_08017990: .4byte gUnknown_203B208
|
||||
_08017994: .4byte 0xffffff00
|
||||
_08017998: .4byte 0xffff00ff
|
||||
_0801799C:
|
||||
movs r0, 0x17
|
||||
bl UpdateKangaskhanStorageState
|
||||
_080179A2:
|
||||
add sp, 0x8
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8017928
|
||||
|
||||
thumb_func_start sub_80179A8
|
||||
sub_80179A8:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
mov r0, sp
|
||||
bl sub_80144A4
|
||||
cmp r0, 0
|
||||
bne _08017A12
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x4
|
||||
beq _080179CC
|
||||
cmp r0, 0x4
|
||||
bgt _080179C6
|
||||
cmp r0, 0x1
|
||||
beq _08017A0C
|
||||
b _08017A12
|
||||
_080179C6:
|
||||
cmp r0, 0x5
|
||||
beq _08017A0C
|
||||
b _08017A12
|
||||
_080179CC:
|
||||
movs r5, 0
|
||||
ldr r6, _08017A08
|
||||
movs r7, 0
|
||||
_080179D2:
|
||||
adds r0, r5, 0
|
||||
bl sub_801AED0
|
||||
cmp r0, 0
|
||||
beq _080179F2
|
||||
lsls r4, r5, 2
|
||||
ldr r0, [r6]
|
||||
adds r0, r4
|
||||
bl MoveToStorage
|
||||
ldr r0, [r6]
|
||||
adds r0, r4
|
||||
strb r7, [r0, 0x2]
|
||||
ldr r0, [r6]
|
||||
adds r0, r4
|
||||
strb r7, [r0]
|
||||
_080179F2:
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x13
|
||||
ble _080179D2
|
||||
bl FillInventoryGaps
|
||||
bl sub_801AE84
|
||||
movs r0, 0x13
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _08017A12
|
||||
.align 2, 0
|
||||
_08017A08: .4byte gTeamInventory_203B460
|
||||
_08017A0C:
|
||||
movs r0, 0xE
|
||||
bl UpdateKangaskhanStorageState
|
||||
_08017A12:
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80179A8
|
||||
|
||||
thumb_func_start sub_8017A1C
|
||||
sub_8017A1C:
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
mov r0, sp
|
||||
bl sub_80144A4
|
||||
cmp r0, 0
|
||||
bne _08017AEE
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x4
|
||||
beq _08017A40
|
||||
cmp r0, 0x4
|
||||
bgt _08017A3A
|
||||
cmp r0, 0x1
|
||||
beq _08017AE8
|
||||
b _08017AEE
|
||||
_08017A3A:
|
||||
cmp r0, 0x5
|
||||
beq _08017AE8
|
||||
b _08017AEE
|
||||
_08017A40:
|
||||
movs r5, 0
|
||||
ldr r6, _08017A88
|
||||
_08017A44:
|
||||
lsls r0, r5, 24
|
||||
lsrs r4, r0, 24
|
||||
adds r0, r4, 0
|
||||
bl sub_801CFE0
|
||||
cmp r0, 0
|
||||
beq _08017ACE
|
||||
ldr r1, _08017A8C
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r1
|
||||
orrs r0, r4
|
||||
str r0, [sp, 0x4]
|
||||
add r4, sp, 0x4
|
||||
ldrb r0, [r4]
|
||||
bl IsThrowableItem
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08017AA2
|
||||
ldr r2, _08017A90
|
||||
ldr r1, [r2]
|
||||
ldrb r0, [r4]
|
||||
lsls r0, 1
|
||||
adds r1, 0x50
|
||||
adds r1, r0
|
||||
ldrh r1, [r1]
|
||||
cmp r1, 0x63
|
||||
bls _08017A94
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r6
|
||||
movs r1, 0xC6
|
||||
lsls r1, 7
|
||||
b _08017A9C
|
||||
.align 2, 0
|
||||
_08017A88: .4byte 0xffff00ff
|
||||
_08017A8C: .4byte 0xffffff00
|
||||
_08017A90: .4byte gTeamInventory_203B460
|
||||
_08017A94:
|
||||
lsls r1, 24
|
||||
lsrs r1, 16
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r6
|
||||
_08017A9C:
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x4]
|
||||
b _08017AB0
|
||||
_08017AA2:
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r6
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x4]
|
||||
ldr r2, _08017AE4
|
||||
_08017AB0:
|
||||
ldr r3, [r2]
|
||||
add r0, sp, 0x4
|
||||
ldrb r1, [r4]
|
||||
lsls r1, 1
|
||||
adds r3, 0x50
|
||||
adds r3, r1
|
||||
ldr r1, [sp, 0x4]
|
||||
lsrs r1, 8
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldrh r2, [r3]
|
||||
subs r2, r1
|
||||
strh r2, [r3]
|
||||
bl AddHeldItemToInventory
|
||||
_08017ACE:
|
||||
adds r5, 0x1
|
||||
cmp r5, 0xEF
|
||||
ble _08017A44
|
||||
bl FillInventoryGaps
|
||||
bl sub_801CF94
|
||||
movs r0, 0x1D
|
||||
bl UpdateKangaskhanStorageState
|
||||
b _08017AEE
|
||||
.align 2, 0
|
||||
_08017AE4: .4byte gTeamInventory_203B460
|
||||
_08017AE8:
|
||||
movs r0, 0x17
|
||||
bl UpdateKangaskhanStorageState
|
||||
_08017AEE:
|
||||
add sp, 0x8
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8017A1C
|
||||
|
||||
.align 2,0
|
||||
|
@ -1,730 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_801A9E0
|
||||
sub_801A9E0:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0xCC
|
||||
ldr r4, _0801AA2C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x88
|
||||
ldr r0, [r0]
|
||||
bl sub_8008C54
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x88
|
||||
ldr r0, [r0]
|
||||
bl sub_80073B8
|
||||
ldr r4, [r4]
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x72
|
||||
movs r2, 0
|
||||
ldrsh r0, [r1, r2]
|
||||
lsls r0, 3
|
||||
adds r5, r0, 0
|
||||
adds r5, 0xA
|
||||
movs r3, 0
|
||||
ldrsh r1, [r1, r3]
|
||||
cmp r1, 0
|
||||
bne _0801AA34
|
||||
ldr r2, _0801AA30
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
str r1, [sp]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl xxx_call_draw_string
|
||||
b _0801AA48
|
||||
.align 2, 0
|
||||
_0801AA2C: .4byte gUnknown_203B224
|
||||
_0801AA30: .4byte gTeamToolboxA
|
||||
_0801AA34:
|
||||
ldr r2, _0801AA58
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl xxx_call_draw_string
|
||||
_0801AA48:
|
||||
movs r7, 0
|
||||
ldr r1, _0801AA5C
|
||||
ldr r0, [r1]
|
||||
adds r0, 0x6E
|
||||
movs r4, 0
|
||||
ldrsh r0, [r0, r4]
|
||||
b _0801AD0A
|
||||
.align 2, 0
|
||||
_0801AA58: .4byte gTeamToolboxB
|
||||
_0801AA5C: .4byte gUnknown_203B224
|
||||
_0801AA60:
|
||||
ldr r2, [r1]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x72
|
||||
movs r3, 0
|
||||
ldrsh r1, [r0, r3]
|
||||
subs r0, 0x2
|
||||
movs r4, 0
|
||||
ldrsh r0, [r0, r4]
|
||||
muls r0, r1
|
||||
adds r0, r7
|
||||
mov r8, r0
|
||||
ldr r0, _0801AA9C
|
||||
ldr r0, [r0]
|
||||
mov r3, r8
|
||||
lsls r1, r3, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
add r1, sp, 0xC8
|
||||
str r0, [r1]
|
||||
ldr r0, [r2]
|
||||
adds r4, r1, 0
|
||||
cmp r0, 0x5
|
||||
bls _0801AA90
|
||||
b _0801ACC4
|
||||
_0801AA90:
|
||||
lsls r0, 2
|
||||
ldr r1, _0801AAA0
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_0801AA9C: .4byte gTeamInventory_203B460
|
||||
_0801AAA0: .4byte _0801AAA4
|
||||
.align 2, 0
|
||||
_0801AAA4:
|
||||
.4byte _0801AABC
|
||||
.4byte _0801AAE4
|
||||
.4byte _0801AAE4
|
||||
.4byte _0801AB18
|
||||
.4byte _0801AB90
|
||||
.4byte _0801AC50
|
||||
_0801AABC:
|
||||
add r0, sp, 0x4
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_8090E14
|
||||
ldr r4, _0801AAE0
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
b _0801AC8C
|
||||
.align 2, 0
|
||||
_0801AAE0: .4byte gUnknown_203B224
|
||||
_0801AAE4:
|
||||
add r2, sp, 0x54
|
||||
movs r5, 0
|
||||
str r5, [sp, 0x54]
|
||||
strb r5, [r2, 0x4]
|
||||
movs r0, 0x1
|
||||
strb r0, [r2, 0x8]
|
||||
strb r0, [r4]
|
||||
add r1, sp, 0xC8
|
||||
add r0, sp, 0x4
|
||||
bl sub_8090E14
|
||||
ldr r4, _0801AB14
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
str r5, [sp]
|
||||
b _0801AC8C
|
||||
.align 2, 0
|
||||
_0801AB14: .4byte gUnknown_203B224
|
||||
_0801AB18:
|
||||
add r2, sp, 0x60
|
||||
movs r6, 0
|
||||
str r6, [sp, 0x60]
|
||||
strb r6, [r2, 0x4]
|
||||
movs r0, 0x1
|
||||
strb r0, [r2, 0x8]
|
||||
strb r0, [r4]
|
||||
add r1, sp, 0xC8
|
||||
add r0, sp, 0x4
|
||||
bl sub_8090E14
|
||||
ldr r5, _0801AB60
|
||||
ldr r0, [r5]
|
||||
mov r4, r8
|
||||
lsls r1, r4, 2
|
||||
adds r0, 0x4
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _0801AB4E
|
||||
mov r0, r8
|
||||
bl sub_801ADA0
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0
|
||||
beq _0801AB64
|
||||
_0801AB4E:
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r5]
|
||||
b _0801AC86
|
||||
.align 2, 0
|
||||
_0801AB60: .4byte gUnknown_203B224
|
||||
_0801AB64:
|
||||
ldr r0, _0801AB88
|
||||
add r1, sp, 0x4
|
||||
movs r2, 0x50
|
||||
bl strncpy
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r2, _0801AB8C
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
str r4, [sp]
|
||||
b _0801AC3C
|
||||
.align 2, 0
|
||||
_0801AB88: .4byte gUnknown_202DE58
|
||||
_0801AB8C: .4byte gUnknown_80DB994
|
||||
_0801AB90:
|
||||
ldrb r0, [r4, 0x2]
|
||||
bl CanSellItem
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0
|
||||
beq _0801AC10
|
||||
add r2, sp, 0x6C
|
||||
movs r1, 0x3
|
||||
str r1, [sp, 0x6C]
|
||||
movs r6, 0
|
||||
strb r6, [r2, 0x4]
|
||||
movs r0, 0x58
|
||||
strh r0, [r2, 0x6]
|
||||
movs r0, 0x1
|
||||
strb r0, [r2, 0x8]
|
||||
strb r1, [r4]
|
||||
add r0, sp, 0x4
|
||||
adds r1, r4, 0
|
||||
bl sub_8090E14
|
||||
adds r0, r4, 0
|
||||
bl GetStackSellPrice
|
||||
ldr r1, _0801AC00
|
||||
ldr r1, [r1]
|
||||
movs r2, 0x98
|
||||
lsls r2, 2
|
||||
adds r1, r2
|
||||
ldr r1, [r1]
|
||||
adds r0, r1
|
||||
ldr r1, _0801AC04
|
||||
cmp r0, r1
|
||||
ble _0801AC76
|
||||
add r5, sp, 0x78
|
||||
ldr r1, _0801AC08
|
||||
adds r0, r5, 0
|
||||
add r2, sp, 0x4
|
||||
bl sprintf_2
|
||||
ldr r4, _0801AC0C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
str r6, [sp]
|
||||
movs r0, 0x8
|
||||
adds r2, r5, 0
|
||||
bl xxx_call_draw_string
|
||||
b _0801ACC4
|
||||
.align 2, 0
|
||||
_0801AC00: .4byte gTeamInventory_203B460
|
||||
_0801AC04: .4byte 0x0001869f
|
||||
_0801AC08: .4byte gUnknown_80DB9A0
|
||||
_0801AC0C: .4byte gUnknown_203B224
|
||||
_0801AC10:
|
||||
add r0, sp, 0x4
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_8090E14
|
||||
ldr r0, _0801AC44
|
||||
add r1, sp, 0x4
|
||||
movs r2, 0x50
|
||||
bl strncpy
|
||||
ldr r4, _0801AC48
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r2, _0801AC4C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
str r5, [sp]
|
||||
_0801AC3C:
|
||||
movs r0, 0x8
|
||||
bl xxx_format_and_draw
|
||||
b _0801ACC4
|
||||
.align 2, 0
|
||||
_0801AC44: .4byte gUnknown_202DE58
|
||||
_0801AC48: .4byte gUnknown_203B224
|
||||
_0801AC4C: .4byte gUnknown_80DB994
|
||||
_0801AC50:
|
||||
add r2, sp, 0x78
|
||||
movs r6, 0
|
||||
str r6, [sp, 0x78]
|
||||
strb r6, [r2, 0x4]
|
||||
movs r0, 0x1
|
||||
strb r0, [r2, 0x8]
|
||||
strb r0, [r4]
|
||||
add r4, sp, 0xC8
|
||||
add r0, sp, 0x4
|
||||
adds r1, r4, 0
|
||||
bl sub_8090E14
|
||||
ldrb r0, [r4, 0x2]
|
||||
bl IsGummiItem
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0
|
||||
beq _0801AC9C
|
||||
_0801AC76:
|
||||
ldr r4, _0801AC98
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r4]
|
||||
_0801AC86:
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
str r6, [sp]
|
||||
_0801AC8C:
|
||||
movs r0, 0x8
|
||||
add r2, sp, 0x4
|
||||
bl xxx_call_draw_string
|
||||
b _0801ACC4
|
||||
.align 2, 0
|
||||
_0801AC98: .4byte gUnknown_203B224
|
||||
_0801AC9C:
|
||||
ldr r0, _0801AD28
|
||||
add r1, sp, 0x4
|
||||
movs r2, 0x50
|
||||
bl strncpy
|
||||
ldr r4, _0801AD2C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r1, r0, 0
|
||||
ldr r2, _0801AD30
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x88
|
||||
ldr r3, [r0]
|
||||
str r5, [sp]
|
||||
movs r0, 0x8
|
||||
bl xxx_format_and_draw
|
||||
_0801ACC4:
|
||||
mov r0, r8
|
||||
bl sub_801AED0
|
||||
movs r1, 0x1
|
||||
ands r1, r0
|
||||
cmp r1, 0
|
||||
beq _0801ACFE
|
||||
ldr r4, _0801AD2C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x54
|
||||
adds r1, r7, 0
|
||||
bl sub_8013800
|
||||
adds r2, r0, 0
|
||||
ldr r1, [r4]
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x88
|
||||
ldr r0, [r0]
|
||||
adds r1, 0x8C
|
||||
ldr r1, [r1]
|
||||
movs r4, 0xC
|
||||
ldrsh r3, [r1, r4]
|
||||
subs r3, 0x2
|
||||
lsls r3, 3
|
||||
movs r1, 0xA
|
||||
str r1, [sp]
|
||||
movs r1, 0x8
|
||||
bl sub_8007B7C
|
||||
_0801ACFE:
|
||||
adds r7, 0x1
|
||||
ldr r1, _0801AD2C
|
||||
ldr r0, [r1]
|
||||
adds r0, 0x6E
|
||||
movs r2, 0
|
||||
ldrsh r0, [r0, r2]
|
||||
_0801AD0A:
|
||||
adds r2, r1, 0
|
||||
cmp r7, r0
|
||||
bge _0801AD12
|
||||
b _0801AA60
|
||||
_0801AD12:
|
||||
ldr r0, [r2]
|
||||
adds r0, 0x88
|
||||
ldr r0, [r0]
|
||||
bl sub_80073E0
|
||||
add sp, 0xCC
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0801AD28: .4byte gUnknown_202DE58
|
||||
_0801AD2C: .4byte gUnknown_203B224
|
||||
_0801AD30: .4byte gUnknown_80DB994
|
||||
thumb_func_end sub_801A9E0
|
||||
|
||||
thumb_func_start sub_801AD34
|
||||
sub_801AD34:
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
bl sub_8008C54
|
||||
adds r0, r4, 0
|
||||
bl sub_80073B8
|
||||
ldr r2, _0801AD98
|
||||
movs r6, 0
|
||||
str r6, [sp]
|
||||
movs r0, 0x6
|
||||
movs r1, 0
|
||||
adds r3, r4, 0
|
||||
bl xxx_call_draw_string
|
||||
bl GetNumberOfFilledInventorySlots
|
||||
adds r2, r0, 0
|
||||
movs r5, 0x7
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
movs r0, 0x12
|
||||
movs r1, 0xD
|
||||
movs r3, 0x2
|
||||
bl sub_8012BC4
|
||||
ldr r2, _0801AD9C
|
||||
str r6, [sp]
|
||||
movs r0, 0x16
|
||||
movs r1, 0xD
|
||||
adds r3, r4, 0
|
||||
bl xxx_call_draw_string
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
movs r0, 0x2B
|
||||
movs r1, 0xD
|
||||
movs r2, 0x14
|
||||
movs r3, 0x2
|
||||
bl sub_8012BC4
|
||||
adds r0, r4, 0
|
||||
bl sub_80073E0
|
||||
add sp, 0x8
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0801AD98: .4byte gUnknown_80DB9A8
|
||||
_0801AD9C: .4byte gUnknown_80DB9B0
|
||||
thumb_func_end sub_801AD34
|
||||
|
||||
thumb_func_start sub_801ADA0
|
||||
sub_801ADA0:
|
||||
push {r4-r6,lr}
|
||||
ldr r5, _0801ADEC
|
||||
ldr r1, [r5]
|
||||
lsls r0, 2
|
||||
adds r1, r0
|
||||
ldr r6, [r1]
|
||||
lsls r4, r6, 8
|
||||
lsrs r0, r4, 24
|
||||
bl IsNotMoneyOrUsedTMItem
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0801AE12
|
||||
lsrs r0, r4, 24
|
||||
bl IsThrowableItem
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0801ADF4
|
||||
lsrs r0, r4, 24
|
||||
bl sub_801AE24
|
||||
ldr r2, [r5]
|
||||
lsrs r1, r4, 24
|
||||
lsls r1, 1
|
||||
adds r2, 0x50
|
||||
adds r2, r1
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldrh r2, [r2]
|
||||
adds r0, r2
|
||||
lsrs r1, r6, 8
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r1
|
||||
ldr r1, _0801ADF0
|
||||
b _0801AE0E
|
||||
.align 2, 0
|
||||
_0801ADEC: .4byte gTeamInventory_203B460
|
||||
_0801ADF0: .4byte 0x000003e7
|
||||
_0801ADF4:
|
||||
lsrs r0, r4, 24
|
||||
bl sub_801AE24
|
||||
ldr r2, [r5]
|
||||
lsrs r1, r4, 24
|
||||
lsls r1, 1
|
||||
adds r2, 0x50
|
||||
adds r2, r1
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldrh r2, [r2]
|
||||
adds r0, r2
|
||||
ldr r1, _0801AE18
|
||||
_0801AE0E:
|
||||
cmp r0, r1
|
||||
ble _0801AE1C
|
||||
_0801AE12:
|
||||
movs r0, 0
|
||||
b _0801AE1E
|
||||
.align 2, 0
|
||||
_0801AE18: .4byte 0x000003e6
|
||||
_0801AE1C:
|
||||
movs r0, 0x1
|
||||
_0801AE1E:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_801ADA0
|
||||
|
||||
thumb_func_start sub_801AE24
|
||||
sub_801AE24:
|
||||
push {r4-r7,lr}
|
||||
adds r7, r0, 0
|
||||
movs r5, 0
|
||||
movs r6, 0
|
||||
b _0801AE74
|
||||
_0801AE2E:
|
||||
ldr r0, _0801AE64
|
||||
ldr r0, [r0]
|
||||
lsls r1, r6, 2
|
||||
adds r0, 0x4
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0801AE72
|
||||
ldr r0, _0801AE68
|
||||
ldr r0, [r0]
|
||||
adds r0, r1
|
||||
ldr r4, [r0]
|
||||
lsls r1, r4, 8
|
||||
lsrs r0, r1, 24
|
||||
cmp r0, r7
|
||||
bne _0801AE72
|
||||
bl IsThrowableItem
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0801AE6C
|
||||
lsrs r0, r4, 8
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, r5, r0
|
||||
b _0801AE6E
|
||||
.align 2, 0
|
||||
_0801AE64: .4byte gUnknown_203B224
|
||||
_0801AE68: .4byte gTeamInventory_203B460
|
||||
_0801AE6C:
|
||||
adds r0, r5, 0x1
|
||||
_0801AE6E:
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
_0801AE72:
|
||||
adds r6, 0x1
|
||||
_0801AE74:
|
||||
bl GetNumberOfFilledInventorySlots
|
||||
cmp r6, r0
|
||||
blt _0801AE2E
|
||||
adds r0, r5, 0
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_801AE24
|
||||
|
||||
thumb_func_start sub_801AE84
|
||||
sub_801AE84:
|
||||
push {r4,lr}
|
||||
movs r2, 0
|
||||
ldr r4, _0801AEA4
|
||||
movs r3, 0
|
||||
_0801AE8C:
|
||||
ldr r0, [r4]
|
||||
lsls r1, r2, 2
|
||||
adds r0, 0x4
|
||||
adds r0, r1
|
||||
str r3, [r0]
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x13
|
||||
ble _0801AE8C
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0801AEA4: .4byte gUnknown_203B224
|
||||
thumb_func_end sub_801AE84
|
||||
|
||||
thumb_func_start sub_801AEA8
|
||||
sub_801AEA8:
|
||||
push {lr}
|
||||
movs r3, 0
|
||||
ldr r0, _0801AECC
|
||||
ldr r0, [r0]
|
||||
adds r1, r0, 0x4
|
||||
movs r2, 0x13
|
||||
_0801AEB4:
|
||||
ldr r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _0801AEBC
|
||||
adds r3, 0x1
|
||||
_0801AEBC:
|
||||
adds r1, 0x4
|
||||
subs r2, 0x1
|
||||
cmp r2, 0
|
||||
bge _0801AEB4
|
||||
adds r0, r3, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_0801AECC: .4byte gUnknown_203B224
|
||||
thumb_func_end sub_801AEA8
|
||||
|
||||
thumb_func_start sub_801AED0
|
||||
sub_801AED0:
|
||||
ldr r1, _0801AEE0
|
||||
ldr r1, [r1]
|
||||
lsls r0, 2
|
||||
adds r1, 0x4
|
||||
adds r1, r0
|
||||
ldr r0, [r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0801AEE0: .4byte gUnknown_203B224
|
||||
thumb_func_end sub_801AED0
|
||||
|
||||
thumb_func_start sub_801AEE4
|
||||
sub_801AEE4:
|
||||
ldr r2, _0801AEF4
|
||||
ldr r2, [r2]
|
||||
lsls r0, 2
|
||||
adds r2, 0x4
|
||||
adds r2, r0
|
||||
str r1, [r2]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0801AEF4: .4byte gUnknown_203B224
|
||||
thumb_func_end sub_801AEE4
|
||||
|
||||
thumb_func_start sub_801AEF8
|
||||
sub_801AEF8:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x4
|
||||
movs r0, 0
|
||||
mov r9, r0
|
||||
b _0801AF78
|
||||
_0801AF08:
|
||||
movs r1, 0x1
|
||||
add r1, r9
|
||||
mov r8, r1
|
||||
mov r7, r8
|
||||
b _0801AF6E
|
||||
_0801AF12:
|
||||
ldr r2, _0801AF90
|
||||
ldr r0, [r2]
|
||||
mov r1, r9
|
||||
lsls r6, r1, 2
|
||||
adds r0, r6
|
||||
ldrb r0, [r0, 0x2]
|
||||
str r2, [sp]
|
||||
bl GetItemOrder
|
||||
adds r4, r0, 0
|
||||
ldr r2, [sp]
|
||||
ldr r0, [r2]
|
||||
lsls r5, r7, 2
|
||||
adds r0, r5
|
||||
ldrb r0, [r0, 0x2]
|
||||
bl GetItemOrder
|
||||
ldr r2, [sp]
|
||||
cmp r4, r0
|
||||
bgt _0801AF4C
|
||||
cmp r4, r0
|
||||
bne _0801AF6C
|
||||
ldr r0, [r2]
|
||||
adds r1, r0, r6
|
||||
adds r0, r5
|
||||
ldrb r1, [r1, 0x1]
|
||||
ldrb r0, [r0, 0x1]
|
||||
cmp r1, r0
|
||||
bcs _0801AF6C
|
||||
_0801AF4C:
|
||||
ldr r0, [r2]
|
||||
adds r2, r0, r6
|
||||
ldr r3, [r2]
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
str r1, [r2]
|
||||
str r3, [r0]
|
||||
ldr r0, _0801AF94
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x4
|
||||
adds r2, r0, r6
|
||||
ldr r3, [r2]
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
str r1, [r2]
|
||||
str r3, [r0]
|
||||
_0801AF6C:
|
||||
adds r7, 0x1
|
||||
_0801AF6E:
|
||||
bl GetNumberOfFilledInventorySlots
|
||||
cmp r7, r0
|
||||
blt _0801AF12
|
||||
mov r9, r8
|
||||
_0801AF78:
|
||||
bl GetNumberOfFilledInventorySlots
|
||||
subs r0, 0x1
|
||||
cmp r9, r0
|
||||
blt _0801AF08
|
||||
add sp, 0x4
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0801AF90: .4byte gTeamInventory_203B460
|
||||
_0801AF94: .4byte gUnknown_203B224
|
||||
thumb_func_end sub_801AEF8
|
||||
|
||||
.align 2,0
|
362
asm/music.s
362
asm/music.s
@ -1,362 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start UpdateSound
|
||||
UpdateSound:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
bl m4aSoundMain
|
||||
ldr r4, _0800C680
|
||||
ldrh r0, [r4]
|
||||
cmp r0, 0
|
||||
bne _0800C670
|
||||
b _0800C7E0
|
||||
_0800C670:
|
||||
cmp r0, 0x2
|
||||
beq _0800C6C0
|
||||
cmp r0, 0x2
|
||||
bgt _0800C684
|
||||
cmp r0, 0x1
|
||||
beq _0800C68E
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C680: .4byte gUnknown_202D690
|
||||
_0800C684:
|
||||
cmp r0, 0x3
|
||||
beq _0800C700
|
||||
cmp r0, 0x4
|
||||
beq _0800C730
|
||||
b _0800C8A2
|
||||
_0800C68E:
|
||||
ldr r2, _0800C69C
|
||||
ldrh r0, [r2]
|
||||
cmp r0, 0
|
||||
beq _0800C6A0
|
||||
subs r0, 0x1
|
||||
strh r0, [r2]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C69C: .4byte gUnknown_202D692
|
||||
_0800C6A0:
|
||||
ldr r3, _0800C6B4
|
||||
ldrh r1, [r3]
|
||||
ldr r0, _0800C6B8
|
||||
cmp r1, r0
|
||||
bne _0800C6BC
|
||||
movs r0, 0x4
|
||||
strh r0, [r4]
|
||||
movs r0, 0x20
|
||||
strh r0, [r2]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C6B4: .4byte gUnknown_202D68E
|
||||
_0800C6B8: .4byte 0x000003e5
|
||||
_0800C6BC:
|
||||
ldrh r0, [r3]
|
||||
b _0800C6E4
|
||||
_0800C6C0:
|
||||
ldr r0, _0800C6F0
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _0800C6F4
|
||||
cmp r1, r0
|
||||
beq _0800C6D8
|
||||
movs r0, 0
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0800C6D8
|
||||
b _0800C8A2
|
||||
_0800C6D8:
|
||||
ldr r2, _0800C6F8
|
||||
ldrh r1, [r2]
|
||||
ldr r0, _0800C6FC
|
||||
cmp r1, r0
|
||||
beq _0800C718
|
||||
ldrh r0, [r2]
|
||||
_0800C6E4:
|
||||
bl m4aSongNumStart
|
||||
movs r0, 0x3
|
||||
strh r0, [r4]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C6F0: .4byte gCurrentBGSong
|
||||
_0800C6F4: .4byte 0x000003e7
|
||||
_0800C6F8: .4byte gUnknown_202D68E
|
||||
_0800C6FC: .4byte 0x000003e5
|
||||
_0800C700:
|
||||
ldr r0, _0800C724
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _0800C728
|
||||
cmp r1, r0
|
||||
beq _0800C718
|
||||
movs r0, 0x1
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0800C718
|
||||
b _0800C8A2
|
||||
_0800C718:
|
||||
movs r0, 0x4
|
||||
strh r0, [r4]
|
||||
ldr r1, _0800C72C
|
||||
movs r0, 0x20
|
||||
strh r0, [r1]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C724: .4byte gUnknown_202D68E
|
||||
_0800C728: .4byte 0x000003e5
|
||||
_0800C72C: .4byte gUnknown_202D692
|
||||
_0800C730:
|
||||
ldr r0, _0800C74C
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _0800C750
|
||||
cmp r1, r0
|
||||
beq _0800C754
|
||||
movs r0, 0x1
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0800C748
|
||||
b _0800C8A2
|
||||
_0800C748:
|
||||
b _0800C75A
|
||||
.align 2, 0
|
||||
_0800C74C: .4byte gUnknown_202D68E
|
||||
_0800C750: .4byte 0x000003e5
|
||||
_0800C754:
|
||||
ldr r0, _0800C76C
|
||||
bl m4aMPlayStop
|
||||
_0800C75A:
|
||||
ldr r1, _0800C770
|
||||
ldrh r0, [r1]
|
||||
adds r2, r0, 0
|
||||
cmp r2, 0
|
||||
beq _0800C774
|
||||
subs r0, 0x1
|
||||
strh r0, [r1]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C76C: .4byte gUnknown_2000970
|
||||
_0800C770: .4byte gUnknown_202D692
|
||||
_0800C774:
|
||||
ldr r3, _0800C794
|
||||
ldrh r1, [r3]
|
||||
ldr r0, _0800C798
|
||||
cmp r1, r0
|
||||
beq _0800C7B4
|
||||
ldr r1, _0800C79C
|
||||
movs r0, 0x1
|
||||
strh r0, [r1]
|
||||
ldr r0, _0800C7A0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0800C7A4
|
||||
ldrh r0, [r3]
|
||||
bl m4aSongNumStart
|
||||
b _0800C7BE
|
||||
.align 2, 0
|
||||
_0800C794: .4byte gCurrentBGSong
|
||||
_0800C798: .4byte 0x000003e7
|
||||
_0800C79C: .4byte gBGMusicPlayerState
|
||||
_0800C7A0: .4byte gUnknown_202D694
|
||||
_0800C7A4:
|
||||
ldr r0, _0800C7B0
|
||||
movs r1, 0x4
|
||||
bl m4aMPlayFadeIn
|
||||
b _0800C7BE
|
||||
.align 2, 0
|
||||
_0800C7B0: .4byte gMPlayInfo_BGM
|
||||
_0800C7B4:
|
||||
ldr r0, _0800C7CC
|
||||
strh r2, [r0]
|
||||
ldr r0, _0800C7D0
|
||||
bl m4aMPlayStop
|
||||
_0800C7BE:
|
||||
ldr r1, _0800C7D4
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
ldr r1, _0800C7D8
|
||||
ldr r2, _0800C7DC
|
||||
b _0800C84C
|
||||
.align 2, 0
|
||||
_0800C7CC: .4byte gBGMusicPlayerState
|
||||
_0800C7D0: .4byte gMPlayInfo_BGM
|
||||
_0800C7D4: .4byte gUnknown_202D690
|
||||
_0800C7D8: .4byte gUnknown_202D68E
|
||||
_0800C7DC: .4byte 0x000003e5
|
||||
_0800C7E0:
|
||||
ldr r5, _0800C810
|
||||
ldrh r0, [r5]
|
||||
cmp r0, 0
|
||||
beq _0800C864
|
||||
cmp r0, 0x3
|
||||
bgt _0800C8A2
|
||||
cmp r0, 0x2
|
||||
bge _0800C81C
|
||||
cmp r0, 0x1
|
||||
bne _0800C8A2
|
||||
ldr r0, _0800C814
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _0800C818
|
||||
cmp r1, r0
|
||||
beq _0800C80A
|
||||
movs r0, 0
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0800C8A2
|
||||
_0800C80A:
|
||||
movs r0, 0x2
|
||||
strh r0, [r5]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C810: .4byte gBGMusicPlayerState
|
||||
_0800C814: .4byte gCurrentBGSong
|
||||
_0800C818: .4byte 0x000003e7
|
||||
_0800C81C:
|
||||
ldr r0, _0800C834
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _0800C838
|
||||
cmp r1, r0
|
||||
beq _0800C83C
|
||||
movs r0, 0
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0800C8A2
|
||||
b _0800C842
|
||||
.align 2, 0
|
||||
_0800C834: .4byte gCurrentBGSong
|
||||
_0800C838: .4byte 0x000003e7
|
||||
_0800C83C:
|
||||
ldr r0, _0800C854
|
||||
bl m4aMPlayStop
|
||||
_0800C842:
|
||||
ldr r1, _0800C858
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
ldr r1, _0800C85C
|
||||
ldr r2, _0800C860
|
||||
_0800C84C:
|
||||
adds r0, r2, 0
|
||||
strh r0, [r1]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C854: .4byte gMPlayInfo_BGM
|
||||
_0800C858: .4byte gBGMusicPlayerState
|
||||
_0800C85C: .4byte gCurrentBGSong
|
||||
_0800C860: .4byte 0x000003e7
|
||||
_0800C864:
|
||||
movs r0, 0
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0
|
||||
bne _0800C8A2
|
||||
ldr r6, _0800C890
|
||||
ldrh r2, [r6]
|
||||
adds r1, r2, 0
|
||||
ldr r4, _0800C894
|
||||
cmp r1, r4
|
||||
beq _0800C89C
|
||||
movs r0, 0x1
|
||||
strh r0, [r5]
|
||||
ldr r0, _0800C898
|
||||
strh r2, [r0]
|
||||
adds r0, r1, 0
|
||||
bl m4aSongNumStart
|
||||
strh r4, [r6]
|
||||
b _0800C8A2
|
||||
.align 2, 0
|
||||
_0800C890: .4byte gUnknown_202D68C
|
||||
_0800C894: .4byte 0x000003e7
|
||||
_0800C898: .4byte gCurrentBGSong
|
||||
_0800C89C:
|
||||
strh r0, [r5]
|
||||
ldr r0, _0800C8C4
|
||||
strh r1, [r0]
|
||||
_0800C8A2:
|
||||
movs r5, 0x2
|
||||
ldr r4, _0800C8C8
|
||||
ldr r0, _0800C8CC
|
||||
mov r8, r0
|
||||
movs r6, 0x18
|
||||
movs r7, 0
|
||||
_0800C8AE:
|
||||
ldrh r1, [r4, 0x2]
|
||||
cmp r1, r8
|
||||
beq _0800C926
|
||||
ldrh r0, [r4]
|
||||
cmp r0, 0x1
|
||||
beq _0800C8D0
|
||||
cmp r0, 0x1
|
||||
ble _0800C926
|
||||
cmp r0, 0x2
|
||||
beq _0800C8F0
|
||||
b _0800C926
|
||||
.align 2, 0
|
||||
_0800C8C4: .4byte gCurrentBGSong
|
||||
_0800C8C8: .4byte gUnknown_3000FE8
|
||||
_0800C8CC: .4byte 0x000003e5
|
||||
_0800C8D0:
|
||||
ldr r0, _0800C8EC
|
||||
cmp r1, r0
|
||||
beq _0800C8E4
|
||||
lsls r0, r5, 16
|
||||
lsrs r0, 16
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0800C926
|
||||
_0800C8E4:
|
||||
movs r0, 0x2
|
||||
strh r0, [r4]
|
||||
b _0800C926
|
||||
.align 2, 0
|
||||
_0800C8EC: .4byte 0x000003e7
|
||||
_0800C8F0:
|
||||
lsls r0, r5, 16
|
||||
lsrs r0, 16
|
||||
bl sub_800CAF0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0
|
||||
beq _0800C91C
|
||||
ldrb r0, [r4, 0x6]
|
||||
cmp r0, 0
|
||||
beq _0800C926
|
||||
strb r7, [r4, 0x6]
|
||||
ldr r0, _0800C918
|
||||
adds r0, r6, r0
|
||||
ldr r0, [r0]
|
||||
ldrh r2, [r4, 0x4]
|
||||
movs r1, 0xFF
|
||||
bl m4aMPlayVolumeControl
|
||||
b _0800C926
|
||||
.align 2, 0
|
||||
_0800C918: .4byte gMPlayTable
|
||||
_0800C91C:
|
||||
strh r0, [r4]
|
||||
mov r1, r8
|
||||
strh r1, [r4, 0x2]
|
||||
strh r0, [r4, 0x4]
|
||||
strb r7, [r4, 0x6]
|
||||
_0800C926:
|
||||
adds r6, 0xC
|
||||
adds r5, 0x1
|
||||
adds r4, 0x8
|
||||
cmp r5, 0x6
|
||||
ble _0800C8AE
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end UpdateSound
|
||||
|
||||
.align 2,0
|
@ -1,673 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_802BF30
|
||||
sub_802BF30:
|
||||
push {r4,lr}
|
||||
ldr r4, _0802BF9C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xA0
|
||||
movs r2, 0
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xA1
|
||||
strb r2, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xA2
|
||||
movs r1, 0xC
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xA3
|
||||
strb r2, [r0]
|
||||
ldr r0, [r4]
|
||||
movs r1, 0x1E
|
||||
ldrsh r0, [r0, r1]
|
||||
movs r1, 0x18
|
||||
bl sub_8009614
|
||||
adds r0, 0x2
|
||||
lsls r0, 16
|
||||
ldr r2, [r4]
|
||||
ldr r3, [r2, 0x38]
|
||||
lsls r1, r3, 1
|
||||
adds r1, r3
|
||||
lsls r1, 3
|
||||
adds r1, r2, r1
|
||||
adds r1, 0x4E
|
||||
asrs r3, r0, 16
|
||||
lsrs r0, 16
|
||||
strh r0, [r1]
|
||||
ldr r1, [r2, 0x38]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r2, r0
|
||||
adds r3, 0x2
|
||||
adds r2, 0x50
|
||||
strh r3, [r2]
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x40
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0802BF9C: .4byte gUnknown_203B2D8
|
||||
thumb_func_end sub_802BF30
|
||||
|
||||
thumb_func_start CreateMailMenu
|
||||
CreateMailMenu:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0xDC
|
||||
ldr r4, _0802C060
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x38]
|
||||
bl sub_8008C54
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x38]
|
||||
bl sub_80073B8
|
||||
ldr r1, [r4]
|
||||
movs r2, 0x22
|
||||
ldrsh r0, [r1, r2]
|
||||
lsls r0, 3
|
||||
adds r0, 0xA
|
||||
ldr r2, _0802C064
|
||||
ldr r3, [r1, 0x38]
|
||||
movs r1, 0
|
||||
str r1, [sp]
|
||||
bl xxx_call_draw_string
|
||||
movs r6, 0
|
||||
ldr r0, [r4]
|
||||
movs r3, 0x1E
|
||||
ldrsh r0, [r0, r3]
|
||||
cmp r6, r0
|
||||
bge _0802C09A
|
||||
adds r7, r4, 0
|
||||
ldr r0, _0802C068
|
||||
mov r9, r0
|
||||
add r1, sp, 0x5C
|
||||
mov r8, r1
|
||||
_0802BFE8:
|
||||
ldr r1, [r7]
|
||||
movs r3, 0x22
|
||||
ldrsh r2, [r1, r3]
|
||||
movs r3, 0x20
|
||||
ldrsh r0, [r1, r3]
|
||||
muls r0, r2
|
||||
adds r0, r6
|
||||
adds r1, r0
|
||||
ldrb r0, [r1]
|
||||
bl sub_8095FE8
|
||||
adds r5, r0, 0
|
||||
ldr r0, [r7]
|
||||
ldr r1, [r0, 0x38]
|
||||
str r1, [sp, 0x4]
|
||||
adds r0, 0x4
|
||||
adds r1, r6, 0
|
||||
bl sub_8013800
|
||||
str r0, [sp, 0x4C]
|
||||
ldrb r0, [r5]
|
||||
cmp r0, 0x1
|
||||
bne _0802C06C
|
||||
ldr r0, [r7]
|
||||
adds r0, 0x4
|
||||
adds r1, r6, 0
|
||||
bl sub_8013800
|
||||
adds r4, r0, 0
|
||||
ldr r0, [r7]
|
||||
ldr r3, [r0, 0x38]
|
||||
movs r0, 0xA
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x6
|
||||
bl sub_803B6B0
|
||||
bl GetPlayerPokemonStruct
|
||||
adds r1, r0, 0
|
||||
mov r0, r9
|
||||
bl PrintPokeNameToBuffer
|
||||
ldrb r0, [r5, 0x5]
|
||||
bl GetPokemonMailHeadline
|
||||
adds r1, r0, 0
|
||||
mov r0, r8
|
||||
mov r2, r9
|
||||
bl sprintf_2
|
||||
ldr r0, [r7]
|
||||
ldr r3, [r0, 0x38]
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r0, 0x15
|
||||
adds r1, r4, 0
|
||||
mov r2, r8
|
||||
bl xxx_call_draw_string
|
||||
b _0802C08E
|
||||
.align 2, 0
|
||||
_0802C060: .4byte gUnknown_203B2D8
|
||||
_0802C064: .4byte gMailboxText
|
||||
_0802C068: .4byte gAvailablePokemonNames
|
||||
_0802C06C:
|
||||
adds r0, r5, 0
|
||||
add r1, sp, 0x4
|
||||
bl sub_803B35C
|
||||
adds r0, r5, 0
|
||||
bl sub_80968B0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0802C088
|
||||
mov r1, sp
|
||||
adds r1, 0x47
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
_0802C088:
|
||||
add r0, sp, 0x4
|
||||
bl sub_803B6D4
|
||||
_0802C08E:
|
||||
adds r6, 0x1
|
||||
ldr r0, [r7]
|
||||
movs r1, 0x1E
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r6, r0
|
||||
blt _0802BFE8
|
||||
_0802C09A:
|
||||
ldr r0, _0802C0B4
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0x38]
|
||||
bl sub_80073E0
|
||||
add sp, 0xDC
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0802C0B4: .4byte gUnknown_203B2D8
|
||||
thumb_func_end CreateMailMenu
|
||||
|
||||
thumb_func_start CountEmptyMailSlots
|
||||
CountEmptyMailSlots:
|
||||
push {r4,r5,lr}
|
||||
movs r5, 0
|
||||
movs r4, 0
|
||||
_0802C0BE:
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl IsMailSlotEmpty
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0802C0D6
|
||||
ldr r0, _0802C0E4
|
||||
ldr r0, [r0]
|
||||
adds r0, r5
|
||||
strb r4, [r0]
|
||||
adds r5, 0x1
|
||||
_0802C0D6:
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x3
|
||||
ble _0802C0BE
|
||||
adds r0, r5, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_0802C0E4: .4byte gUnknown_203B2D8
|
||||
thumb_func_end CountEmptyMailSlots
|
||||
|
||||
thumb_func_start HasNoMailinMailbox
|
||||
HasNoMailinMailbox:
|
||||
push {r4,lr}
|
||||
movs r4, 0
|
||||
_0802C0EC:
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl IsMailSlotEmpty
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0802C0FE
|
||||
movs r0, 0
|
||||
b _0802C106
|
||||
_0802C0FE:
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x3
|
||||
ble _0802C0EC
|
||||
movs r0, 0x1
|
||||
_0802C106:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end HasNoMailinMailbox
|
||||
|
||||
thumb_func_start sub_802C10C
|
||||
sub_802C10C:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
adds r6, r0, 0
|
||||
adds r4, r1, 0
|
||||
mov r8, r2
|
||||
bl sub_802C4A4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0802C126
|
||||
movs r0, 0
|
||||
b _0802C1CC
|
||||
_0802C126:
|
||||
ldr r5, _0802C1D8
|
||||
ldr r0, [r5]
|
||||
cmp r0, 0
|
||||
bne _0802C138
|
||||
movs r0, 0xA8
|
||||
movs r1, 0x8
|
||||
bl MemoryAlloc
|
||||
str r0, [r5]
|
||||
_0802C138:
|
||||
ldr r0, [r5]
|
||||
str r6, [r0, 0x3C]
|
||||
lsls r1, r6, 1
|
||||
adds r1, r6
|
||||
lsls r1, 3
|
||||
adds r1, 0x44
|
||||
adds r1, r0, r1
|
||||
str r1, [r0, 0x40]
|
||||
adds r0, 0x44
|
||||
bl sub_8006518
|
||||
ldr r1, [r5]
|
||||
ldr r2, [r1, 0x3C]
|
||||
lsls r0, r2, 1
|
||||
adds r0, r2
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
adds r1, 0x44
|
||||
ldr r0, _0802C1DC
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
ldr r2, [r5]
|
||||
ldr r1, [r2, 0x40]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xA4
|
||||
str r0, [r1, 0x14]
|
||||
cmp r4, 0
|
||||
beq _0802C186
|
||||
ldr r1, [r2, 0x3C]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r1, r2, 0
|
||||
adds r1, 0x4C
|
||||
adds r1, r0
|
||||
ldr r0, [r4]
|
||||
str r0, [r1]
|
||||
_0802C186:
|
||||
ldr r0, [r5]
|
||||
ldr r0, [r0, 0x40]
|
||||
mov r1, r8
|
||||
bl sub_8012D34
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x44
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
ldr r4, [r5]
|
||||
adds r4, 0x8
|
||||
bl sub_802C474
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
mov r2, r8
|
||||
adds r3, r6, 0
|
||||
bl sub_8013848
|
||||
ldr r0, [r5]
|
||||
ldr r1, _0802C1E0
|
||||
ldrh r1, [r1]
|
||||
strh r1, [r0, 0x20]
|
||||
adds r0, 0x8
|
||||
bl sub_8013984
|
||||
bl sub_802C328
|
||||
bl sub_802C39C
|
||||
movs r0, 0x1
|
||||
_0802C1CC:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_0802C1D8: .4byte gUnknown_203B2E0
|
||||
_0802C1DC: .4byte gUnknown_80DFCB4
|
||||
_0802C1E0: .4byte gUnknown_203B2E4
|
||||
thumb_func_end sub_802C10C
|
||||
|
||||
thumb_func_start sub_802C1E4
|
||||
sub_802C1E4:
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0802C200
|
||||
ldr r0, _0802C1FC
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x8
|
||||
bl sub_8013660
|
||||
movs r0, 0
|
||||
b _0802C266
|
||||
.align 2, 0
|
||||
_0802C1FC: .4byte gUnknown_203B2E0
|
||||
_0802C200:
|
||||
ldr r0, _0802C218
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x8
|
||||
bl GetKeyPress
|
||||
cmp r0, 0x2
|
||||
beq _0802C222
|
||||
cmp r0, 0x2
|
||||
bgt _0802C21C
|
||||
cmp r0, 0x1
|
||||
beq _0802C22C
|
||||
b _0802C240
|
||||
.align 2, 0
|
||||
_0802C218: .4byte gUnknown_203B2E0
|
||||
_0802C21C:
|
||||
cmp r0, 0x4
|
||||
beq _0802C236
|
||||
b _0802C240
|
||||
_0802C222:
|
||||
movs r0, 0x1
|
||||
bl PlayMenuSoundEffect
|
||||
movs r0, 0x2
|
||||
b _0802C266
|
||||
_0802C22C:
|
||||
movs r0, 0
|
||||
bl PlayMenuSoundEffect
|
||||
movs r0, 0x3
|
||||
b _0802C266
|
||||
_0802C236:
|
||||
movs r0, 0x4
|
||||
bl PlayMenuSoundEffect
|
||||
movs r0, 0x4
|
||||
b _0802C266
|
||||
_0802C240:
|
||||
ldr r0, _0802C258
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x8
|
||||
movs r1, 0x1
|
||||
bl sub_80138B8
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0802C25C
|
||||
movs r0, 0
|
||||
b _0802C266
|
||||
.align 2, 0
|
||||
_0802C258: .4byte gUnknown_203B2E0
|
||||
_0802C25C:
|
||||
bl sub_802C328
|
||||
bl sub_802C39C
|
||||
movs r0, 0x1
|
||||
_0802C266:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_802C1E4
|
||||
|
||||
thumb_func_start sub_802C26C
|
||||
sub_802C26C:
|
||||
ldr r0, _0802C288
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x26
|
||||
ldrsh r2, [r1, r0]
|
||||
movs r3, 0x24
|
||||
ldrsh r0, [r1, r3]
|
||||
muls r0, r2
|
||||
movs r3, 0x20
|
||||
ldrsh r2, [r1, r3]
|
||||
adds r0, r2
|
||||
adds r1, r0
|
||||
ldrb r0, [r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0802C288: .4byte gUnknown_203B2E0
|
||||
thumb_func_end sub_802C26C
|
||||
|
||||
thumb_func_start sub_802C28C
|
||||
sub_802C28C:
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r5, _0802C2D0
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x44
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl sub_800641C
|
||||
bl sub_802C474
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r5]
|
||||
strh r1, [r0, 0x2A]
|
||||
adds r0, 0x8
|
||||
bl sub_8013984
|
||||
bl sub_802C328
|
||||
bl sub_802C39C
|
||||
cmp r4, 0
|
||||
beq _0802C2CA
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x8
|
||||
bl AddMenuCursorSprite
|
||||
_0802C2CA:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0802C2D0: .4byte gUnknown_203B2E0
|
||||
thumb_func_end sub_802C28C
|
||||
|
||||
thumb_func_start sub_802C2D4
|
||||
sub_802C2D4:
|
||||
push {r4,r5,lr}
|
||||
ldr r4, _0802C31C
|
||||
ldr r2, [r4]
|
||||
cmp r2, 0
|
||||
beq _0802C314
|
||||
ldr r1, _0802C320
|
||||
ldrh r0, [r2, 0x20]
|
||||
strh r0, [r1]
|
||||
ldr r0, [r2, 0x3C]
|
||||
lsls r1, r0, 1
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r1, r2, r1
|
||||
adds r1, 0x44
|
||||
ldr r0, _0802C324
|
||||
ldm r0!, {r2,r3,r5}
|
||||
stm r1!, {r2,r3,r5}
|
||||
ldm r0!, {r2,r3,r5}
|
||||
stm r1!, {r2,r3,r5}
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x44
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
movs r0, 0
|
||||
str r0, [r4]
|
||||
_0802C314:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0802C31C: .4byte gUnknown_203B2E0
|
||||
_0802C320: .4byte gUnknown_203B2E4
|
||||
_0802C324: .4byte gUnknown_80DFC9C
|
||||
thumb_func_end sub_802C2D4
|
||||
|
||||
thumb_func_start sub_802C328
|
||||
sub_802C328:
|
||||
push {r4,lr}
|
||||
ldr r4, _0802C398
|
||||
ldr r0, [r4]
|
||||
ldrh r1, [r0, 0x28]
|
||||
adds r0, 0xA4
|
||||
movs r2, 0
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
ldrh r1, [r0, 0x26]
|
||||
adds r0, 0xA5
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xA6
|
||||
movs r1, 0xC
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xA7
|
||||
strb r2, [r0]
|
||||
ldr r0, [r4]
|
||||
movs r1, 0x22
|
||||
ldrsh r0, [r0, r1]
|
||||
movs r1, 0x18
|
||||
bl sub_8009614
|
||||
adds r0, 0x2
|
||||
lsls r0, 16
|
||||
ldr r2, [r4]
|
||||
ldr r3, [r2, 0x3C]
|
||||
lsls r1, r3, 1
|
||||
adds r1, r3
|
||||
lsls r1, 3
|
||||
adds r1, r2, r1
|
||||
adds r1, 0x52
|
||||
asrs r3, r0, 16
|
||||
lsrs r0, 16
|
||||
strh r0, [r1]
|
||||
ldr r1, [r2, 0x3C]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r2, r0
|
||||
adds r3, 0x2
|
||||
adds r2, 0x54
|
||||
strh r3, [r2]
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x44
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0802C398: .4byte gUnknown_203B2E0
|
||||
thumb_func_end sub_802C328
|
||||
|
||||
thumb_func_start sub_802C39C
|
||||
sub_802C39C:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x60
|
||||
ldr r7, _0802C3F8
|
||||
ldr r0, [r7]
|
||||
ldr r0, [r0, 0x3C]
|
||||
bl sub_8008C54
|
||||
ldr r0, [r7]
|
||||
ldr r0, [r0, 0x3C]
|
||||
bl sub_80073B8
|
||||
ldr r0, [r7]
|
||||
movs r1, 0x26
|
||||
ldrsh r4, [r0, r1]
|
||||
lsls r4, 3
|
||||
adds r5, r4, 0
|
||||
adds r5, 0xA
|
||||
ldr r2, _0802C3FC
|
||||
ldr r3, [r0, 0x3C]
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl xxx_call_draw_string
|
||||
adds r4, 0x4
|
||||
ldr r1, [r7]
|
||||
adds r0, r1, 0
|
||||
adds r0, 0xA6
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 3
|
||||
adds r5, r4, r0
|
||||
movs r3, 0x26
|
||||
ldrsh r2, [r1, r3]
|
||||
adds r2, 0x1
|
||||
movs r0, 0x7
|
||||
str r0, [sp]
|
||||
ldr r0, [r1, 0x3C]
|
||||
str r0, [sp, 0x4]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
movs r3, 0x2
|
||||
bl sub_8012BC4
|
||||
movs r6, 0
|
||||
b _0802C452
|
||||
.align 2, 0
|
||||
_0802C3F8: .4byte gUnknown_203B2E0
|
||||
_0802C3FC: .4byte gBulletinBoardText
|
||||
_0802C400:
|
||||
ldr r1, [r7]
|
||||
movs r3, 0x26
|
||||
ldrsh r2, [r1, r3]
|
||||
movs r3, 0x24
|
||||
ldrsh r0, [r1, r3]
|
||||
muls r0, r2
|
||||
adds r0, r6
|
||||
adds r1, r0
|
||||
ldrb r5, [r1]
|
||||
adds r0, r5, 0
|
||||
bl sub_8096574
|
||||
adds r4, r0, 0
|
||||
ldr r0, [r7]
|
||||
ldr r1, [r0, 0x3C]
|
||||
str r1, [sp, 0x8]
|
||||
adds r0, 0x8
|
||||
adds r1, r6, 0
|
||||
bl sub_8013800
|
||||
str r0, [sp, 0x50]
|
||||
adds r0, r4, 0
|
||||
add r1, sp, 0x8
|
||||
bl sub_803B35C
|
||||
adds r0, r5, 0
|
||||
bl sub_8096574
|
||||
bl sub_80968B0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0802C44A
|
||||
mov r1, sp
|
||||
adds r1, 0x4B
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
_0802C44A:
|
||||
add r0, sp, 0x8
|
||||
bl sub_803B6D4
|
||||
adds r6, 0x1
|
||||
_0802C452:
|
||||
ldr r0, [r7]
|
||||
movs r1, 0x22
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r6, r0
|
||||
blt _0802C400
|
||||
ldr r0, _0802C470
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0x3C]
|
||||
bl sub_80073E0
|
||||
add sp, 0x60
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0802C470: .4byte gUnknown_203B2E0
|
||||
thumb_func_end sub_802C39C
|
||||
|
||||
.align 2,0
|
@ -379,7 +379,7 @@ _0802FCA8:
|
||||
cmp r5, 0
|
||||
bne _0802FCCA
|
||||
mov r0, r9
|
||||
bl sub_80969D0
|
||||
bl CountJobsinDungeon
|
||||
cmp r0, 0
|
||||
ble _0802FCCA
|
||||
ldr r0, [r4]
|
||||
|
@ -5,239 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80308A0
|
||||
sub_80308A0:
|
||||
push {r4,lr}
|
||||
ldr r4, _08030928
|
||||
ldr r0, [r4]
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x44
|
||||
ldrh r1, [r1]
|
||||
adds r0, 0xC0
|
||||
movs r2, 0
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x42
|
||||
ldrh r1, [r1]
|
||||
adds r0, 0xC1
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xC2
|
||||
movs r1, 0xC
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xC3
|
||||
strb r2, [r0]
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x60
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
ldr r0, [r4]
|
||||
movs r1, 0x3E
|
||||
ldrsh r0, [r0, r1]
|
||||
movs r1, 0xC
|
||||
bl sub_80095E4
|
||||
adds r0, 0x2
|
||||
lsls r0, 16
|
||||
ldr r2, [r4]
|
||||
ldr r3, [r2, 0x58]
|
||||
lsls r1, r3, 1
|
||||
adds r1, r3
|
||||
lsls r1, 3
|
||||
adds r1, r2, r1
|
||||
adds r1, 0x6E
|
||||
asrs r3, r0, 16
|
||||
lsrs r0, 16
|
||||
strh r0, [r1]
|
||||
ldr r1, [r2, 0x58]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r2, r0
|
||||
adds r3, 0x2
|
||||
adds r2, 0x70
|
||||
strh r3, [r2]
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x60
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08030928: .4byte gUnknown_203B320
|
||||
thumb_func_end sub_80308A0
|
||||
|
||||
thumb_func_start sub_803092C
|
||||
sub_803092C:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x60
|
||||
ldr r7, _08030A24
|
||||
ldr r0, [r7]
|
||||
ldr r0, [r0, 0x58]
|
||||
bl sub_8008C54
|
||||
ldr r0, [r7]
|
||||
ldr r0, [r0, 0x58]
|
||||
bl sub_80073B8
|
||||
ldr r1, [r7]
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x42
|
||||
movs r2, 0
|
||||
ldrsh r4, [r0, r2]
|
||||
lsls r4, 3
|
||||
adds r5, r4, 0
|
||||
adds r5, 0xA
|
||||
ldr r2, _08030A28
|
||||
ldr r0, [r1, 0x20]
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldr r2, [r0]
|
||||
ldr r3, [r1, 0x58]
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl xxx_call_draw_string
|
||||
adds r4, 0x4
|
||||
ldr r3, [r7]
|
||||
adds r0, r3, 0
|
||||
adds r0, 0xC2
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 3
|
||||
adds r5, r4, r0
|
||||
adds r0, r3, 0
|
||||
adds r0, 0x42
|
||||
movs r1, 0
|
||||
ldrsh r2, [r0, r1]
|
||||
adds r2, 0x1
|
||||
movs r0, 0x7
|
||||
str r0, [sp]
|
||||
ldr r0, [r3, 0x58]
|
||||
str r0, [sp, 0x4]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8012BC4
|
||||
movs r6, 0
|
||||
ldr r0, [r7]
|
||||
movs r2, 0x3E
|
||||
ldrsh r0, [r0, r2]
|
||||
cmp r6, r0
|
||||
bge _08030A56
|
||||
mov r9, r7
|
||||
mov r8, r6
|
||||
add r7, sp, 0x8
|
||||
mov r5, sp
|
||||
adds r5, 0x4B
|
||||
_080309B0:
|
||||
mov r3, r9
|
||||
ldr r1, [r3]
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x42
|
||||
movs r3, 0
|
||||
ldrsh r2, [r0, r3]
|
||||
subs r0, 0x2
|
||||
movs r3, 0
|
||||
ldrsh r0, [r0, r3]
|
||||
muls r0, r2
|
||||
adds r0, r6
|
||||
adds r1, r0
|
||||
ldrb r0, [r1]
|
||||
bl sub_8095228
|
||||
adds r4, r0, 0
|
||||
mov r1, r9
|
||||
ldr r0, [r1]
|
||||
ldr r1, [r0, 0x58]
|
||||
str r1, [sp, 0x8]
|
||||
adds r0, 0x24
|
||||
adds r1, r6, 0
|
||||
bl sub_8013800
|
||||
str r0, [sp, 0x50]
|
||||
add r1, sp, 0x48
|
||||
movs r0, 0x7
|
||||
strb r0, [r1]
|
||||
mov r0, sp
|
||||
adds r0, 0x4A
|
||||
mov r2, r8
|
||||
strb r2, [r0]
|
||||
add r0, sp, 0x4C
|
||||
strb r2, [r0]
|
||||
adds r0, r4, 0x4
|
||||
str r0, [sp, 0x10]
|
||||
adds r0, 0x10
|
||||
str r0, [sp, 0x14]
|
||||
ldrh r0, [r4, 0xC]
|
||||
strh r0, [r7, 0x10]
|
||||
ldrh r0, [r4, 0xC]
|
||||
strh r0, [r7, 0x12]
|
||||
strb r2, [r7, 0x14]
|
||||
subs r1, 0x12
|
||||
movs r0, 0x5
|
||||
strb r0, [r1]
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0x4
|
||||
beq _08030A32
|
||||
cmp r0, 0x4
|
||||
bgt _08030A2C
|
||||
cmp r0, 0x2
|
||||
bgt _08030A3E
|
||||
cmp r0, 0x1
|
||||
blt _08030A3E
|
||||
movs r0, 0x1
|
||||
strb r0, [r5]
|
||||
b _08030A42
|
||||
.align 2, 0
|
||||
_08030A24: .4byte gUnknown_203B320
|
||||
_08030A28: .4byte gUnknown_80E086C
|
||||
_08030A2C:
|
||||
cmp r0, 0x5
|
||||
beq _08030A38
|
||||
b _08030A3E
|
||||
_08030A32:
|
||||
movs r0, 0x3
|
||||
strb r0, [r5]
|
||||
b _08030A42
|
||||
_08030A38:
|
||||
movs r0, 0x4
|
||||
strb r0, [r5]
|
||||
b _08030A42
|
||||
_08030A3E:
|
||||
mov r3, r8
|
||||
strb r3, [r5]
|
||||
_08030A42:
|
||||
add r0, sp, 0x8
|
||||
bl sub_803B6D4
|
||||
adds r6, 0x1
|
||||
mov r1, r9
|
||||
ldr r0, [r1]
|
||||
movs r2, 0x3E
|
||||
ldrsh r0, [r0, r2]
|
||||
cmp r6, r0
|
||||
blt _080309B0
|
||||
_08030A56:
|
||||
ldr r0, _08030A70
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0x58]
|
||||
bl sub_80073E0
|
||||
add sp, 0x60
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08030A70: .4byte gUnknown_203B320
|
||||
thumb_func_end sub_803092C
|
||||
|
||||
thumb_func_start sub_8030A74
|
||||
sub_8030A74:
|
||||
push {r4,r5,lr}
|
||||
|
@ -139,661 +139,4 @@ _08030F50: .4byte gUnknown_203B324
|
||||
_08030F54: .4byte gUnknown_80E0938
|
||||
thumb_func_end sub_8030E48
|
||||
|
||||
thumb_func_start sub_8030F58
|
||||
sub_8030F58:
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
bl ResetUnusedInputStruct
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
ldr r5, _08030FF4
|
||||
ldr r0, [r5]
|
||||
cmp r0, 0
|
||||
bne _08030F88
|
||||
movs r4, 0x8E
|
||||
lsls r4, 1
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x8
|
||||
bl MemoryAlloc
|
||||
str r0, [r5]
|
||||
movs r1, 0
|
||||
adds r2, r4, 0
|
||||
bl MemoryFill8
|
||||
_08030F88:
|
||||
ldr r0, [r5]
|
||||
movs r1, 0x8C
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
str r6, [r0]
|
||||
movs r0, 0x98
|
||||
lsls r0, 1
|
||||
bl GetDialogueSpriteDataPtr
|
||||
ldr r2, [r5]
|
||||
movs r4, 0x84
|
||||
lsls r4, 1
|
||||
adds r1, r2, r4
|
||||
str r0, [r1]
|
||||
movs r3, 0x86
|
||||
lsls r3, 1
|
||||
adds r1, r2, r3
|
||||
ldr r0, [r0, 0x4]
|
||||
str r0, [r1]
|
||||
movs r0, 0x8A
|
||||
lsls r0, 1
|
||||
adds r2, r0
|
||||
movs r1, 0
|
||||
strb r1, [r2]
|
||||
ldr r0, [r5]
|
||||
ldr r2, _08030FF8
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
ldr r0, [r5]
|
||||
adds r3, 0xA
|
||||
adds r0, r3
|
||||
strb r1, [r0]
|
||||
ldr r2, [r5]
|
||||
movs r0, 0x88
|
||||
lsls r0, 1
|
||||
adds r1, r2, r0
|
||||
movs r0, 0x2
|
||||
strh r0, [r1]
|
||||
subs r3, 0x4
|
||||
adds r1, r2, r3
|
||||
movs r0, 0x8
|
||||
strh r0, [r1]
|
||||
adds r0, r6, 0
|
||||
bl sub_8030C20
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r1, 0
|
||||
beq _08031038
|
||||
cmp r6, 0x2
|
||||
beq _08030FFC
|
||||
cmp r6, 0x4
|
||||
beq _08031014
|
||||
b _08031022
|
||||
.align 2, 0
|
||||
_08030FF4: .4byte gUnknown_203B328
|
||||
_08030FF8: .4byte 0x00000115
|
||||
_08030FFC:
|
||||
ldr r0, _0803100C
|
||||
ldr r2, [r5]
|
||||
adds r2, r4
|
||||
ldr r3, _08031010
|
||||
movs r1, 0
|
||||
bl sub_80141B4
|
||||
b _08031022
|
||||
.align 2, 0
|
||||
_0803100C: .4byte gUnknown_80E09D8
|
||||
_08031010: .4byte 0x00000101
|
||||
_08031014:
|
||||
ldr r0, _0803102C
|
||||
ldr r2, [r5]
|
||||
adds r2, r4
|
||||
ldr r3, _08031030
|
||||
movs r1, 0
|
||||
bl sub_80141B4
|
||||
_08031022:
|
||||
ldr r0, _08031034
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x5
|
||||
str r0, [r1]
|
||||
b _08031048
|
||||
.align 2, 0
|
||||
_0803102C: .4byte gUnknown_80E0A0C
|
||||
_08031030: .4byte 0x00000101
|
||||
_08031034: .4byte gUnknown_203B328
|
||||
_08031038:
|
||||
ldr r0, [r5]
|
||||
str r1, [r0]
|
||||
adds r0, r6, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x8
|
||||
bl sub_80306A8
|
||||
_08031048:
|
||||
movs r0, 0x1
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8030F58
|
||||
|
||||
thumb_func_start sub_8031050
|
||||
sub_8031050:
|
||||
push {lr}
|
||||
ldr r1, _08031068
|
||||
ldr r0, [r1]
|
||||
ldr r0, [r0]
|
||||
adds r2, r1, 0
|
||||
cmp r0, 0x6
|
||||
bhi _080310AC
|
||||
lsls r0, 2
|
||||
ldr r1, _0803106C
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08031068: .4byte gUnknown_203B328
|
||||
_0803106C: .4byte _08031070
|
||||
.align 2, 0
|
||||
_08031070:
|
||||
.4byte _0803108C
|
||||
.4byte _08031092
|
||||
.4byte _08031098
|
||||
.4byte _08031098
|
||||
.4byte _080310A2
|
||||
.4byte _080310A8
|
||||
.4byte _080310A8
|
||||
_0803108C:
|
||||
bl sub_8031300
|
||||
b _080310AC
|
||||
_08031092:
|
||||
bl sub_803136C
|
||||
b _080310AC
|
||||
_08031098:
|
||||
ldr r0, [r2]
|
||||
ldr r0, [r0]
|
||||
bl sub_80313D8
|
||||
b _080310AC
|
||||
_080310A2:
|
||||
bl sub_8031498
|
||||
b _080310AC
|
||||
_080310A8:
|
||||
movs r0, 0x3
|
||||
b _080310AE
|
||||
_080310AC:
|
||||
movs r0, 0
|
||||
_080310AE:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8031050
|
||||
|
||||
thumb_func_start sub_80310B4
|
||||
sub_80310B4:
|
||||
push {r4,lr}
|
||||
bl sub_803084C
|
||||
ldr r4, _080310E0
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _080310D8
|
||||
movs r1, 0x84
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
bl CloseFile
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
movs r0, 0
|
||||
str r0, [r4]
|
||||
_080310D8:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080310E0: .4byte gUnknown_203B328
|
||||
thumb_func_end sub_80310B4
|
||||
|
||||
thumb_func_start sub_80310E4
|
||||
sub_80310E4:
|
||||
push {lr}
|
||||
ldr r1, _080310F8
|
||||
ldr r1, [r1]
|
||||
str r0, [r1]
|
||||
bl sub_80310FC
|
||||
bl sub_8031258
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080310F8: .4byte gUnknown_203B328
|
||||
thumb_func_end sub_80310E4
|
||||
|
||||
thumb_func_start sub_80310FC
|
||||
sub_80310FC:
|
||||
push {r4-r6,lr}
|
||||
ldr r4, _0803111C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xA8
|
||||
bl sub_8006518
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0x6
|
||||
bls _08031112
|
||||
b _0803122C
|
||||
_08031112:
|
||||
lsls r0, 2
|
||||
ldr r1, _08031120
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_0803111C: .4byte gUnknown_203B328
|
||||
_08031120: .4byte _08031124
|
||||
.align 2, 0
|
||||
_08031124:
|
||||
.4byte _08031140
|
||||
.4byte _08031178
|
||||
.4byte _080311C0
|
||||
.4byte _080311C0
|
||||
.4byte _080311E8
|
||||
.4byte _0803122C
|
||||
.4byte _0803122C
|
||||
_08031140:
|
||||
ldr r3, _08031170
|
||||
ldr r1, [r3]
|
||||
ldr r2, _08031174
|
||||
adds r1, 0xC0
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldr r1, [r3]
|
||||
adds r1, 0xD8
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldr r0, [r3]
|
||||
adds r0, 0xF0
|
||||
ldm r2!, {r1,r3,r4}
|
||||
stm r0!, {r1,r3,r4}
|
||||
ldm r2!, {r1,r5,r6}
|
||||
stm r0!, {r1,r5,r6}
|
||||
b _0803123A
|
||||
.align 2, 0
|
||||
_08031170: .4byte gUnknown_203B328
|
||||
_08031174: .4byte gUnknown_80E0990
|
||||
_08031178:
|
||||
ldr r3, _080311B0
|
||||
ldr r1, [r3]
|
||||
adds r1, 0xC0
|
||||
ldr r0, _080311B4
|
||||
ldm r0!, {r2,r4,r5}
|
||||
stm r1!, {r2,r4,r5}
|
||||
ldm r0!, {r2,r4,r6}
|
||||
stm r1!, {r2,r4,r6}
|
||||
ldr r1, [r3]
|
||||
ldr r2, _080311B8
|
||||
adds r1, 0xD8
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldr r0, [r3]
|
||||
adds r0, 0xF0
|
||||
ldm r2!, {r1,r5,r6}
|
||||
stm r0!, {r1,r5,r6}
|
||||
ldm r2!, {r4-r6}
|
||||
stm r0!, {r4-r6}
|
||||
ldr r0, [r3]
|
||||
adds r0, 0xC0
|
||||
ldr r1, _080311BC
|
||||
bl sub_8012CAC
|
||||
b _0803123A
|
||||
.align 2, 0
|
||||
_080311B0: .4byte gUnknown_203B328
|
||||
_080311B4: .4byte gUnknown_80E09A8
|
||||
_080311B8: .4byte gUnknown_80E0990
|
||||
_080311BC: .4byte gUnknown_80E0968
|
||||
_080311C0:
|
||||
ldr r2, _080311DC
|
||||
ldr r1, [r2]
|
||||
adds r1, 0xD8
|
||||
ldr r0, _080311E0
|
||||
ldm r0!, {r3-r5}
|
||||
stm r1!, {r3-r5}
|
||||
ldm r0!, {r3,r4,r6}
|
||||
stm r1!, {r3,r4,r6}
|
||||
ldr r0, [r2]
|
||||
adds r0, 0xD8
|
||||
ldr r1, _080311E4
|
||||
bl sub_8012CAC
|
||||
b _0803123A
|
||||
.align 2, 0
|
||||
_080311DC: .4byte gUnknown_203B328
|
||||
_080311E0: .4byte gUnknown_80E09C0
|
||||
_080311E4: .4byte gUnknown_80E0948
|
||||
_080311E8:
|
||||
ldr r3, _08031224
|
||||
ldr r1, [r3]
|
||||
ldr r2, _08031228
|
||||
adds r1, 0xA8
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldr r1, [r3]
|
||||
adds r1, 0xC0
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldr r1, [r3]
|
||||
adds r1, 0xD8
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldm r0!, {r4-r6}
|
||||
stm r1!, {r4-r6}
|
||||
ldr r0, [r3]
|
||||
adds r0, 0xF0
|
||||
ldm r2!, {r1,r5,r6}
|
||||
stm r0!, {r1,r5,r6}
|
||||
ldm r2!, {r3-r5}
|
||||
stm r0!, {r3-r5}
|
||||
b _0803123A
|
||||
.align 2, 0
|
||||
_08031224: .4byte gUnknown_203B328
|
||||
_08031228: .4byte gUnknown_80E0990
|
||||
_0803122C:
|
||||
bl ResetUnusedInputStruct
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
_0803123A:
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, _08031254
|
||||
ldr r0, [r0]
|
||||
adds r0, 0xA8
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08031254: .4byte gUnknown_203B328
|
||||
thumb_func_end sub_80310FC
|
||||
|
||||
thumb_func_start sub_8031258
|
||||
sub_8031258:
|
||||
push {r4,lr}
|
||||
sub sp, 0x8
|
||||
ldr r1, _08031274
|
||||
ldr r0, [r1]
|
||||
ldr r0, [r0]
|
||||
adds r2, r1, 0
|
||||
cmp r0, 0x6
|
||||
bhi _080312F6
|
||||
lsls r0, 2
|
||||
ldr r1, _08031278
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08031274: .4byte gUnknown_203B328
|
||||
_08031278: .4byte _0803127C
|
||||
.align 2, 0
|
||||
_0803127C:
|
||||
.4byte _08031298
|
||||
.4byte _080312A0
|
||||
.4byte _080312BC
|
||||
.4byte _080312BC
|
||||
.4byte _080312EC
|
||||
.4byte _080312F6
|
||||
.4byte _080312F6
|
||||
_08031298:
|
||||
movs r0, 0x1
|
||||
bl sub_8030810
|
||||
b _080312F6
|
||||
_080312A0:
|
||||
bl sub_803092C
|
||||
ldr r0, _080312B4
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x8
|
||||
ldr r1, _080312B8
|
||||
movs r2, 0x4
|
||||
str r2, [sp]
|
||||
movs r2, 0x1
|
||||
b _080312D8
|
||||
.align 2, 0
|
||||
_080312B4: .4byte gUnknown_203B328
|
||||
_080312B8: .4byte gUnknown_80E0968
|
||||
_080312BC:
|
||||
bl sub_803092C
|
||||
ldr r4, _080312E4
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x8
|
||||
movs r1, 0
|
||||
bl sub_8012EA4
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x58
|
||||
ldr r1, _080312E8
|
||||
movs r2, 0x3
|
||||
str r2, [sp]
|
||||
movs r2, 0x2
|
||||
_080312D8:
|
||||
str r2, [sp, 0x4]
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_8012D60
|
||||
b _080312F6
|
||||
.align 2, 0
|
||||
_080312E4: .4byte gUnknown_203B328
|
||||
_080312E8: .4byte gUnknown_80E0948
|
||||
_080312EC:
|
||||
ldr r0, [r2]
|
||||
ldrb r0, [r0, 0x4]
|
||||
movs r1, 0x3
|
||||
bl sub_8030D40
|
||||
_080312F6:
|
||||
add sp, 0x8
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8031258
|
||||
|
||||
thumb_func_start sub_8031300
|
||||
sub_8031300:
|
||||
push {lr}
|
||||
movs r0, 0x1
|
||||
bl sub_8030768
|
||||
cmp r0, 0x4
|
||||
bhi _08031366
|
||||
lsls r0, 2
|
||||
ldr r1, _08031318
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08031318: .4byte _0803131C
|
||||
.align 2, 0
|
||||
_0803131C:
|
||||
.4byte _08031366
|
||||
.4byte _08031366
|
||||
.4byte _08031360
|
||||
.4byte _08031330
|
||||
.4byte _08031348
|
||||
_08031330:
|
||||
bl sub_80307EC
|
||||
ldr r1, _08031344
|
||||
ldr r1, [r1]
|
||||
strb r0, [r1, 0x4]
|
||||
movs r0, 0x1
|
||||
bl sub_80310E4
|
||||
b _08031366
|
||||
.align 2, 0
|
||||
_08031344: .4byte gUnknown_203B328
|
||||
_08031348:
|
||||
bl sub_80307EC
|
||||
ldr r1, _0803135C
|
||||
ldr r1, [r1]
|
||||
strb r0, [r1, 0x4]
|
||||
movs r0, 0x4
|
||||
bl sub_80310E4
|
||||
b _08031366
|
||||
.align 2, 0
|
||||
_0803135C: .4byte gUnknown_203B328
|
||||
_08031360:
|
||||
movs r0, 0x6
|
||||
bl sub_80310E4
|
||||
_08031366:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8031300
|
||||
|
||||
thumb_func_start sub_803136C
|
||||
sub_803136C:
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
bl sub_8030768
|
||||
ldr r4, _080313A4
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x8
|
||||
bl sub_8012FD8
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08031392
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x8
|
||||
mov r1, sp
|
||||
bl sub_8013114
|
||||
_08031392:
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x4
|
||||
beq _080313C2
|
||||
cmp r0, 0x4
|
||||
bgt _080313A8
|
||||
cmp r0, 0x1
|
||||
beq _080313B2
|
||||
b _080313D0
|
||||
.align 2, 0
|
||||
_080313A4: .4byte gUnknown_203B328
|
||||
_080313A8:
|
||||
cmp r0, 0x5
|
||||
beq _080313CA
|
||||
cmp r0, 0x6
|
||||
beq _080313BA
|
||||
b _080313D0
|
||||
_080313B2:
|
||||
movs r0, 0
|
||||
bl sub_80310E4
|
||||
b _080313D0
|
||||
_080313BA:
|
||||
movs r0, 0x3
|
||||
bl sub_80310E4
|
||||
b _080313D0
|
||||
_080313C2:
|
||||
movs r0, 0x2
|
||||
bl sub_80310E4
|
||||
b _080313D0
|
||||
_080313CA:
|
||||
movs r0, 0x4
|
||||
bl sub_80310E4
|
||||
_080313D0:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_803136C
|
||||
|
||||
thumb_func_start sub_80313D8
|
||||
sub_80313D8:
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
bl sub_8030768
|
||||
ldr r4, _08031418
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x8
|
||||
bl sub_8012FD8
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x58
|
||||
bl sub_8012FD8
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08031408
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x58
|
||||
mov r1, sp
|
||||
bl sub_8013114
|
||||
_08031408:
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x2
|
||||
beq _08031428
|
||||
cmp r0, 0x2
|
||||
bgt _0803141C
|
||||
cmp r0, 0x1
|
||||
beq _08031420
|
||||
b _0803148E
|
||||
.align 2, 0
|
||||
_08031418: .4byte gUnknown_203B328
|
||||
_0803141C:
|
||||
cmp r0, 0x3
|
||||
bne _0803148E
|
||||
_08031420:
|
||||
movs r0, 0
|
||||
bl sub_80310E4
|
||||
b _0803148E
|
||||
_08031428:
|
||||
cmp r5, 0x2
|
||||
beq _08031432
|
||||
cmp r5, 0x3
|
||||
beq _0803143C
|
||||
b _0803145A
|
||||
_08031432:
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0, 0x4]
|
||||
bl sub_8095240
|
||||
b _0803145A
|
||||
_0803143C:
|
||||
ldr r4, _08031480
|
||||
movs r3, 0
|
||||
movs r1, 0
|
||||
movs r2, 0x1F
|
||||
_08031444:
|
||||
ldr r0, [r4]
|
||||
adds r0, r1
|
||||
strb r3, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, r1
|
||||
adds r0, 0x22
|
||||
strb r3, [r0]
|
||||
adds r1, 0x30
|
||||
subs r2, 0x1
|
||||
cmp r2, 0
|
||||
bge _08031444
|
||||
_0803145A:
|
||||
ldr r0, _08031484
|
||||
ldr r0, [r0]
|
||||
movs r1, 0x8C
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0x2
|
||||
beq _0803146E
|
||||
cmp r0, 0x4
|
||||
bne _0803148E
|
||||
_0803146E:
|
||||
bl sub_8030C20
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08031488
|
||||
movs r0, 0x5
|
||||
bl sub_80310E4
|
||||
b _0803148E
|
||||
.align 2, 0
|
||||
_08031480: .4byte gUnknown_203B480
|
||||
_08031484: .4byte gUnknown_203B328
|
||||
_08031488:
|
||||
movs r0, 0
|
||||
bl sub_80310E4
|
||||
_0803148E:
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80313D8
|
||||
|
||||
.align 2,0
|
||||
|
@ -736,7 +736,7 @@ _0802D034:
|
||||
ldr r0, [r4, 0x14]
|
||||
str r0, [sp, 0x54]
|
||||
add r0, sp, 0x8
|
||||
bl sub_803B6D4
|
||||
bl CreateRescueTitle
|
||||
adds r5, 0x1
|
||||
_0802D076:
|
||||
ldr r0, [r6]
|
||||
|
6
include/code_808417C.h
Normal file
6
include/code_808417C.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_808417C_H
|
||||
#define GUARD_808417C_H
|
||||
|
||||
s32 CalculateStatusTurns(struct DungeonEntity *target, s16 *turnRange, bool8 factorCurerSkills);
|
||||
|
||||
#endif // GUARD_808417C_H
|
17
include/code_80A26CC.h
Normal file
17
include/code_80A26CC.h
Normal file
@ -0,0 +1,17 @@
|
||||
struct unkStruct_80A2608
|
||||
{
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x2 */ s16 unk2;
|
||||
/* 0x4 */ s16 unk4;
|
||||
/* 0x6 */ u16 unk6;
|
||||
/* 0x8 */ u16 unk8;
|
||||
/* 0xA */ u16 unkA;
|
||||
/* 0xC */ u8 unkC;
|
||||
/* 0xD */ u8 unkD;
|
||||
/* 0xE */ s16 unkE;
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x11 */ u8 unk11;
|
||||
};
|
||||
|
||||
struct unkStruct_80A2608 *sub_80A2608(s16 r0);
|
||||
struct unkStruct_80A2608 *sub_80A2620(s16 r0);
|
@ -2,5 +2,6 @@
|
||||
#define GUARD_CONSTANTS_MAILBOX_H
|
||||
|
||||
#define MAX_ACCEPTED_JOBS 8
|
||||
#define NUM_MAILBOX_SLOTS 4
|
||||
|
||||
#endif // GUARD_CONSTANTS_MAILBOX_H
|
||||
|
@ -162,7 +162,8 @@ struct DungeonEntityData
|
||||
/* 0xF5 */ bool8 exposedStatus;
|
||||
/* 0xF6 */ bool8 isColorChanged;
|
||||
/* 0xF7 */ bool8 isBoss;
|
||||
u8 fillF8[0xFA - 0xF8];
|
||||
/* 0xF8 */ u8 unkF8;
|
||||
/* 0xF9 */ u8 unkF9;
|
||||
/* 0xFA */ u8 terrifiedTurnsLeft; // Doubles as a bool for whether the Pokémon is terrified.
|
||||
u8 unkFB;
|
||||
// Set to true if the player makes a teammate use their held item.
|
||||
|
@ -58,7 +58,8 @@ struct DungeonGlobalData
|
||||
u8 fill66C[0x671 - 0x66C];
|
||||
/* 0x671 */ bool8 monsterHouseActive;
|
||||
/* 0x672 */ u8 unk672;
|
||||
u8 fill673[0x675 - 0x673];
|
||||
u8 fill673[0x674 - 0x673];
|
||||
u8 unk674;
|
||||
u8 unk675;
|
||||
u8 unk676[0x68A - 0x676];
|
||||
/* 0x68A */ u8 unk68A;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include "dungeon_entity.h"
|
||||
|
||||
bool8 HasSafeguardStatus(struct DungeonEntity * param_1, struct DungeonEntity * param_2, bool8 displayMessage);
|
||||
bool8 sub_80717A4(struct DungeonEntity *pokemon, u16 moveID);
|
||||
bool8 HasAbility(struct DungeonEntity *pokemon, u8 ability);
|
||||
bool8 HasType(struct DungeonEntity *pokemon, u8 type);
|
||||
bool8 CanSeeInvisible(struct DungeonEntity *pokemon);
|
||||
|
@ -22,6 +22,12 @@ void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16
|
||||
void m4aSoundVSync(void);
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM; // BGM??
|
||||
extern struct MusicPlayerInfo gUnknown_2000970;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_Fanfare;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE3;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE4;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE5;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE6;
|
||||
|
||||
#endif //GUARD_M4A_H
|
||||
|
@ -3,23 +3,63 @@
|
||||
|
||||
void StopBGMusicVSync(void);
|
||||
void StartBGMusicVSync(void);
|
||||
u8 sub_800CA38(u32 songIndex);
|
||||
bool8 IsValidSong(u32 songIndex);
|
||||
void StartNewBGM(u16 songIndex);
|
||||
bool8 IsBGSong(u32 songIndex);
|
||||
bool8 sub_800CAAC(u32 songIndex);
|
||||
bool8 sub_800CACC(u32 songIndex);
|
||||
bool8 IsSoundEffect(u32 songIndex);
|
||||
bool8 IsFanfare(u32 songIndex);
|
||||
u16 GetMusicPlayerIndex(u16 songIndex);
|
||||
bool8 sub_800CAF0(u16 songIndex);
|
||||
bool8 IsMusicPlayerPlaying(u16 songIndex);
|
||||
void StartNewBGM(u16 songIndex);
|
||||
void FadeInNewBGM(u16 SongIndex, u16 speed);
|
||||
void FadeInNewBGM(u16 songIndex, u16 speed);
|
||||
u16 GetCurrentBGSong(void);
|
||||
void sub_800BF48(u16 SongIndex);
|
||||
void sub_800BF80(void);
|
||||
void QueueBGM(u16 songIndex);
|
||||
void StopBGM(void); // stops all BGM, fanfares and SE's
|
||||
void FadeOutBGM(u16 speed);
|
||||
void sub_800C074(u16 SongIndex, u16 param_2);
|
||||
void sub_800C298(u16 songIndex);
|
||||
void PlayFanfareSE(u16 songIndex, u16 volume);
|
||||
void StopFanfareSE(u16 songIndex);
|
||||
void FadeOutFanfareSE(u16 songIndex, u16 speed);
|
||||
bool8 IsFanfareSEPlaying(u16 songIndex);
|
||||
|
||||
void nullsub_19(void);
|
||||
void nullsub_20(u16 songIndex);
|
||||
|
||||
#define NUM_FANFARES 19
|
||||
#define FANFARE_START_INDEX 200
|
||||
|
||||
#define NUM_SOUND_EFFECTS 639
|
||||
#define SOUND_EFFECTS_START_INDEX 300
|
||||
|
||||
#define STOP_SOUND_EFFECT 997
|
||||
#define STOP_FANFARE 998
|
||||
#define STOP_BGM 999
|
||||
|
||||
#define MAX_VOLUME 256
|
||||
|
||||
enum MusicPlayerIndex
|
||||
{
|
||||
INDEX_BGM,
|
||||
INDEX_FANFARE,
|
||||
INDEX_SE1,
|
||||
INDEX_SE2,
|
||||
INDEX_SE3,
|
||||
INDEX_SE4,
|
||||
INDEX_SE5,
|
||||
INDEX_SE6,
|
||||
};
|
||||
|
||||
// TODO: continue to doc the rest of BG/Fanfare Player States
|
||||
enum BG_Player_State
|
||||
{
|
||||
BG_PLAYER_STATE_INITIALIZE = 0,
|
||||
BG_PLAYER_STATE_PLAYING = 1,
|
||||
BG_PLAYER_STATE_STOPPED = 4,
|
||||
};
|
||||
|
||||
enum Fanfare_Player_State
|
||||
{
|
||||
FANFARE_PLAYER_STATE_INITIALIZE = 0,
|
||||
FANFARE_PLAYER_STATE_PLAYING = 3,
|
||||
};
|
||||
|
||||
#endif //GUARD_MUSIC_H
|
||||
|
@ -24,6 +24,26 @@ struct RescuePasswordMenu
|
||||
u32 unk210;
|
||||
};
|
||||
|
||||
|
||||
#define PASSWORD_ENTRY_DUPLICATE_SOS_MAIL 0x7
|
||||
#define PASSWORD_ENTRY_DUPLICATE_AOK_MAIL 0x9
|
||||
#define PASSWORD_ENTRY_DUPLICATE_THANK_YOU_MAIL 0xB
|
||||
|
||||
#define PASSWORD_ENTRY_INCORRECT_PASSWORD 0x11
|
||||
|
||||
#define PASSWORD_ENTRY_NOT_SOS_MAIL 0x12
|
||||
#define PASSWORD_ENTRY_NOT_AOK_MAIL 0x13
|
||||
#define PASSWORD_ENTRY_NOT_THANK_YOU_MAIL 0x14
|
||||
|
||||
#define PASSWORD_ENTRY_SOS_MAIL_SUCCESS 0x16
|
||||
#define PASSWORD_ENTRY_AOK_MAIL_SUCCESS 0x17
|
||||
#define PASSWORD_ENTRY_THANK_YOU_MAIL_SUCCESS 0x18
|
||||
|
||||
#define PASSWORD_ENTRY_SOS_MAIL_MODE 0x1C
|
||||
#define PASSWORD_ENTRY_AOK_MAIL_MODE 0x1E
|
||||
#define PASSWORD_ENTRY_THANK_YOU_MAIL_MODE 0x20
|
||||
|
||||
|
||||
void CreateRescuePasswordMenu(u32 currMenu);
|
||||
s32 UpdateRescuePasswordMenu(void);
|
||||
void CleanRescuePasswordMenu(void);
|
||||
|
@ -8,5 +8,16 @@
|
||||
#define FLASH_FIRE_STATUS_NOT_MAXED 2
|
||||
|
||||
u8 GetFlashFireStatus(struct DungeonEntity *pokemon);
|
||||
void UpdateFlashFireBoost(struct DungeonEntity * pokemon, struct DungeonEntity *target);
|
||||
void sub_80772C0(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32 statStage, s32 param_4, bool8 displayMessage);
|
||||
void sub_8077434(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32 statStage, s32 param_4, bool8 displayMessage);
|
||||
void sub_8077540(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 statStage);
|
||||
void sub_80775DC(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 statStage, bool8 displayMessage);
|
||||
void sub_80776C0(struct DungeonEntity * pokemon,struct DungeonEntity * target, bool8 displayMessage);
|
||||
void sub_8077780(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void sub_8077910(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 turns, bool8 diplayMessage);
|
||||
void sub_80779F0(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 param_3, bool8 displayMessage);
|
||||
void sub_8077AE4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void sub_8077BB4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
|
||||
#endif
|
||||
|
@ -7,8 +7,7 @@ struct unkStruct_8095228
|
||||
/* 0x1 */ u8 missionType; // mission type
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ u8 unk3;
|
||||
/* 0x4 */ u8 dungeon; // dungeon
|
||||
/* 0x5 */ u8 floor; // floor
|
||||
/* 0x4 */ struct DungeonLocation dungeon; // dungeon
|
||||
/* 0x8 */ u32 unk8;
|
||||
/* 0xC */ s16 clientSpecies; // client pokemon
|
||||
/* 0xE */ s16 targetSpecies; // target
|
||||
|
@ -72,8 +72,6 @@ SECTIONS {
|
||||
src/file_system.o(.text);
|
||||
src/main.o(.text);
|
||||
asm/code_800B5F0.o(.text);
|
||||
src/music_pre.o(.text);
|
||||
asm/music.o(.text);
|
||||
src/music.o(.text);
|
||||
src/code_800C9CC.o(.text);
|
||||
src/cpu.o(.text);
|
||||
@ -100,8 +98,6 @@ SECTIONS {
|
||||
src/kecleon_items.o(.text);
|
||||
asm/kecleon_items.o(.text);
|
||||
src/kecleon_items_1.o(.text);
|
||||
asm/kecleon_items_1.o(.text);
|
||||
src/kecleon_items_2.o(.text);
|
||||
src/code_801AFA4.o(.text);
|
||||
src/code_801B3C0.o(.text);
|
||||
asm/code_801B3C0.o(.text);
|
||||
@ -117,6 +113,7 @@ SECTIONS {
|
||||
src/gulpin_shop_1.o(.text);
|
||||
asm/code_801EE10.o(.text);
|
||||
src/luminous_cave.o(.text);
|
||||
src/friend_list_menu_1.o(.text);
|
||||
asm/friend_list_menu.o(.text);
|
||||
src/friend_list_menu.o(.text);
|
||||
src/friend_area_action_menu.o(.text);
|
||||
@ -125,7 +122,7 @@ SECTIONS {
|
||||
src/wonder_mail.o(.text);
|
||||
src/thank_you_wonder_mail.o(.text);
|
||||
src/wonder_mail_2.o(.text);
|
||||
asm/wonder_mail_2.o(.text);
|
||||
src/wonder_mail_2_mid.o(.text);
|
||||
src/wonder_mail_2_1.o(.text);
|
||||
asm/wonder_mail_802C860.o(.text);
|
||||
src/wonder_mail_3.o(.text);
|
||||
@ -146,7 +143,7 @@ SECTIONS {
|
||||
asm/wonder_mail_4.o(.text);
|
||||
src/wonder_mail_5.o(.text);
|
||||
asm/wonder_mail_5.o(.text);
|
||||
src/wonder_mail_4_1.o(.text);
|
||||
src/wonder_mail_6.o(.text);
|
||||
src/post_office_guide.o(.text);
|
||||
asm/code_8031D70.o(.text);
|
||||
src/adventure_log.o(.text);
|
||||
@ -274,8 +271,6 @@ SECTIONS {
|
||||
src/code_8086A3C.o(.text);
|
||||
asm/code_8086A3C.o(.text);
|
||||
src/code_8057824_1.o(.text);
|
||||
asm/jirachi_wish.o(.text);
|
||||
src/code_80521D0_1.o(.text);
|
||||
src/pokemon.o(.text);
|
||||
asm/pokemon.o(.text);
|
||||
src/pokemon_mid.o(.text);
|
||||
|
@ -1,10 +1,10 @@
|
||||
.align 2
|
||||
gMPlayTable:: @ 9E8665C
|
||||
music_player gMPlayInfo_BGM, gMPlayTrack_BGM, 12, 0 @ BGM
|
||||
music_player gUnknown_2000970, gMPlayTrack_Unknown1, 6, 0 @ SE?
|
||||
music_player 0x20009B0, gMPlayTrack_Unknown2, 1, 0
|
||||
music_player 0x2000A40, gMPlayTrack_Unknown3, 1, 0
|
||||
music_player 0x20009F0, gMPlayTrack_Unknown4, 2, 0
|
||||
music_player 0x2000870, gMPlayTrack_Unknown5, 2, 0
|
||||
music_player 0x20008B0, gMPlayTrack_Unknown6, 2, 0
|
||||
music_player 0x2000930, gMPlayTrack_Unknown7, 1, 0
|
||||
music_player gMPlayInfo_BGM, gMPlayTrack_BGM, 12, 0
|
||||
music_player gMPlayInfo_Fanfare, gMPlayTrack_Fanfare, 6, 0
|
||||
music_player gMPlayInfo_SE1, gMPlayTrack_SE1, 1, 0
|
||||
music_player gMPlayInfo_SE2, gMPlayTrack_SE2, 1, 0
|
||||
music_player gMPlayInfo_SE3, gMPlayTrack_SE3, 2, 0
|
||||
music_player gMPlayInfo_SE4, gMPlayTrack_SE4, 2, 0
|
||||
music_player gMPlayInfo_SE5, gMPlayTrack_SE5, 2, 0
|
||||
music_player gMPlayInfo_SE6, gMPlayTrack_SE6, 1, 0
|
||||
|
@ -9,13 +9,10 @@
|
||||
#include "config.h"
|
||||
|
||||
|
||||
void sub_8011924(void);
|
||||
void xxx_call_stop_bgm(void);
|
||||
|
||||
extern u8 sub_80023E4(u8);
|
||||
extern void sub_800C3F8(u16 r0, u16 r1);
|
||||
extern void sub_801199C(u16 r0);
|
||||
extern void sub_800C298(u16 r0);
|
||||
extern u8 sub_800C5D0(u16 r0);
|
||||
extern void xxx_call_stop_fanfare_se(u16 r0);
|
||||
|
||||
struct UnkSaveStruct1
|
||||
{
|
||||
@ -118,19 +115,19 @@ void sub_80117C4(void)
|
||||
// Some sound effect
|
||||
void sub_80117D0(void)
|
||||
{
|
||||
sub_800C074(302, 256);
|
||||
PlayFanfareSE(302, MAX_VOLUME);
|
||||
}
|
||||
|
||||
// Some sound effect
|
||||
void sub_80117E4(void)
|
||||
{
|
||||
sub_800C074(303, 256);
|
||||
PlayFanfareSE(303, MAX_VOLUME);
|
||||
}
|
||||
|
||||
// Some sound effect
|
||||
void sub_80117F8(void)
|
||||
{
|
||||
sub_800C074(301, 256);
|
||||
PlayFanfareSE(301, MAX_VOLUME);
|
||||
}
|
||||
|
||||
void sub_801180C(void)
|
||||
@ -170,18 +167,18 @@ void sub_8011860(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80118A4(void)
|
||||
void StopAllMusic_1(void)
|
||||
{
|
||||
sub_8011924();
|
||||
sub_801199C(0x3e6);
|
||||
sub_801199C(0x3e5);
|
||||
xxx_call_stop_bgm();
|
||||
xxx_call_stop_fanfare_se(STOP_FANFARE);
|
||||
xxx_call_stop_fanfare_se(STOP_SOUND_EFFECT);
|
||||
}
|
||||
|
||||
void sub_80118C4(u16 r0)
|
||||
void FadeOutAllMusic(u16 speed)
|
||||
{
|
||||
FadeOutBGM(r0);
|
||||
sub_800C3F8(0x3e6, r0);
|
||||
sub_800C3F8(0x3e5, r0);
|
||||
FadeOutBGM(speed);
|
||||
FadeOutFanfareSE(STOP_FANFARE, speed);
|
||||
FadeOutFanfareSE(STOP_SOUND_EFFECT, speed);
|
||||
}
|
||||
|
||||
void xxx_call_start_new_bgm(u16 songIndex)
|
||||
@ -194,14 +191,14 @@ void xxx_call_fade_in_new_bgm(u16 songIndex, u16 speed)
|
||||
FadeInNewBGM(songIndex, speed);
|
||||
}
|
||||
|
||||
void sub_8011914(u16 songIndex)
|
||||
void xxx_call_queue_bgm(u16 songIndex)
|
||||
{
|
||||
sub_800BF48(songIndex);
|
||||
QueueBGM(songIndex);
|
||||
}
|
||||
|
||||
void sub_8011924()
|
||||
void xxx_call_stop_bgm()
|
||||
{
|
||||
sub_800BF80();
|
||||
StopBGM();
|
||||
}
|
||||
|
||||
void xxx_call_fade_out_bgm(u16 speed)
|
||||
@ -211,45 +208,45 @@ void xxx_call_fade_out_bgm(u16 speed)
|
||||
|
||||
u32 IsEqualtoBGTrack(u16 songIndex)
|
||||
{
|
||||
u32 temp;
|
||||
temp = GetCurrentBGSong();
|
||||
u32 currBGSong;
|
||||
currBGSong = GetCurrentBGSong();
|
||||
|
||||
if(songIndex == 999)
|
||||
return temp != 999;
|
||||
if(songIndex == STOP_BGM)
|
||||
return currBGSong != STOP_BGM;
|
||||
|
||||
return temp == songIndex;
|
||||
return currBGSong == songIndex;
|
||||
}
|
||||
|
||||
void sub_8011974(u16 songIndex, u16 r1)
|
||||
void xxx_call_play_fanfare_se(u16 songIndex, u16 volume)
|
||||
{
|
||||
sub_800C074(songIndex, r1);
|
||||
PlayFanfareSE(songIndex, volume);
|
||||
}
|
||||
|
||||
void PlaySound(u16 songIndex)
|
||||
{
|
||||
sub_800C074(songIndex, 256);
|
||||
PlayFanfareSE(songIndex, MAX_VOLUME);
|
||||
}
|
||||
|
||||
void sub_801199C(u16 songIndex)
|
||||
void xxx_call_stop_fanfare_se(u16 songIndex)
|
||||
{
|
||||
sub_800C298(songIndex);
|
||||
StopFanfareSE(songIndex);
|
||||
}
|
||||
|
||||
void sub_80119AC(u16 songIndex, u16 r1)
|
||||
void xxx_call_fade_out_fanfare_se(u16 songIndex, u16 speed)
|
||||
{
|
||||
sub_800C3F8(songIndex, r1);
|
||||
FadeOutFanfareSE(songIndex, speed);
|
||||
}
|
||||
|
||||
u8 sub_80119C0(u16 songIndex)
|
||||
bool8 IsFanfareSEPlaying_1(u16 songIndex)
|
||||
{
|
||||
return sub_800C5D0(songIndex);
|
||||
return IsFanfareSEPlaying(songIndex);
|
||||
}
|
||||
|
||||
void PlayMenuSoundEffect(u32 r0)
|
||||
{
|
||||
if(gUnknown_202DE20 > 0)
|
||||
return;
|
||||
sub_800C074(gUnknown_80D4144[r0], 256);
|
||||
PlayFanfareSE(gUnknown_80D4144[r0], MAX_VOLUME);
|
||||
gUnknown_202DE20 = 4;
|
||||
}
|
||||
|
||||
@ -258,7 +255,7 @@ void sub_8011A04(void)
|
||||
if(gUnknown_202DE22 > 0)
|
||||
return;
|
||||
gUnknown_202DE22 = 3;
|
||||
sub_800C074(305, 256);
|
||||
PlayFanfareSE(305, MAX_VOLUME);
|
||||
}
|
||||
|
||||
void sub_8011A2C(u32 r0)
|
||||
|
@ -32,24 +32,24 @@ extern u8 *gPtrSelfHealPreventedHungerMessage[];
|
||||
extern u8 *gUnknown_80F9740[];
|
||||
extern u8 *gUnknown_80F9760[];
|
||||
|
||||
extern void sub_807D148(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2, u32 r3);
|
||||
extern void sub_8075FCC(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void sub_8077AE4(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2);
|
||||
extern void sub_8072008(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2, u8 r3, u32);
|
||||
extern void sub_8076D10(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void LevelDownTarget(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2);
|
||||
extern void sub_807D148(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2, u32 r3);
|
||||
extern void sub_8075FCC(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void sub_8077AE4(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2);
|
||||
extern void sub_8072008(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2, u8 r3, u32);
|
||||
extern void sub_8076D10(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void LevelDownTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2);
|
||||
extern void sub_8078B5C(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32);
|
||||
extern void SetMessageArgument(u8 *r0, struct DungeonEntity *r1, u32);
|
||||
extern void sub_807A290(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void sub_80522F4(struct DungeonEntity *r0, struct DungeonEntity *r1, const char[]);
|
||||
extern void RestoreVisionTarget(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void sub_8077910(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32);
|
||||
extern void sub_80791D8(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void BlindTarget(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void HealTargetHP(struct DungeonEntity *r0, struct DungeonEntity *r1, s16, s16, u32);
|
||||
extern void sub_80792F8(struct DungeonEntity *r0, struct DungeonEntity *r1, u32);
|
||||
extern void sub_8079F20(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u8);
|
||||
extern void sub_806F370(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
extern void SetMessageArgument(u8 *buffer, struct DungeonEntity *r1, u32);
|
||||
extern void sub_807A290(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void sub_80522F4(struct DungeonEntity *pokemon, struct DungeonEntity *r1, const char[]);
|
||||
extern void RestoreVisionTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void sub_8077910(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u32);
|
||||
extern void sub_80791D8(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void BlindTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void HealTargetHP(struct DungeonEntity *pokemon, struct DungeonEntity *r1, s16, s16, u32);
|
||||
extern void sub_80792F8(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32);
|
||||
extern void sub_8079F20(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u8);
|
||||
extern void sub_806F370(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
extern void sub_8078A58(struct DungeonEntity *, struct DungeonEntity *, s16, u32);
|
||||
extern void SendImmobilizeEndMessage(struct DungeonEntity*, struct DungeonEntity*);
|
||||
extern s32 sub_8042520(struct DungeonEntity *);
|
||||
@ -57,153 +57,153 @@ struct DungeonEntity *sub_80696FC(struct DungeonEntity *);
|
||||
extern void sub_80943A0(void*, s32);
|
||||
extern void sub_803E708(u32 r0, u32 r1);
|
||||
|
||||
void sub_8048340(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2)
|
||||
void sub_8048340(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32 r2)
|
||||
{
|
||||
sub_806F370(r0, r1, r2, 1, 0, 0, 528, 0, 0, 0);
|
||||
sub_806F370(pokemon, target, r2, 1, 0, 0, 528, 0, 0, 0);
|
||||
}
|
||||
|
||||
void sub_8048364(struct DungeonEntity *r0, struct DungeonEntity *r1, u8 r2)
|
||||
void sub_8048364(struct DungeonEntity *pokemon, struct DungeonEntity *target, u8 r2)
|
||||
{
|
||||
sub_8079F20(r0, r1, 1, r2);
|
||||
sub_8079F20(pokemon, target, 1, r2);
|
||||
}
|
||||
|
||||
void sub_8048374(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_8048374(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
HealTargetHP(r0, r1, gUnknown_80F4FB6, gUnknown_80F4FB8, 1);
|
||||
HealTargetHP(pokemon, target, gUnknown_80F4FB6, gUnknown_80F4FB8, 1);
|
||||
}
|
||||
|
||||
void sub_804839C(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_804839C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
HealTargetHP(r0, r1, gUnknown_80F4FBA, gUnknown_80F4FBC, 1);
|
||||
HealTargetHP(pokemon, target, gUnknown_80F4FBA, gUnknown_80F4FBC, 1);
|
||||
}
|
||||
|
||||
void sub_80483C4(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80483C4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_80792F8(r0, r1, 999);
|
||||
sub_80792F8(pokemon, target, 999);
|
||||
}
|
||||
|
||||
void sub_80483D4(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80483D4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
HealTargetHP(r0, r1, 0, gUnknown_80F4FBE, 1);
|
||||
HealTargetHP(pokemon, target, 0, gUnknown_80F4FBE, 1);
|
||||
}
|
||||
|
||||
void sub_80483F4(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80483F4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
BlindTarget(r0, r1);
|
||||
BlindTarget(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_8048400(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_8048400(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_80791D8(r0, r1);
|
||||
sub_80791D8(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_804840C(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_804840C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8077910(r0, r1, 0, 1);
|
||||
sub_8077910(pokemon, target, 0, 1);
|
||||
}
|
||||
|
||||
void sub_804841C(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_804841C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
RestoreVisionTarget(r0, r1);
|
||||
RestoreVisionTarget(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_8048428(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_8048428(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
if(r1->entityData->nonVolatileStatus == NON_VOLATILE_STATUS_PARALYZED)
|
||||
sub_807A290(r0, r1);
|
||||
if(target->entityData->nonVolatileStatus == NON_VOLATILE_STATUS_PARALYZED)
|
||||
sub_807A290(pokemon, target);
|
||||
else
|
||||
// Pointer to "But nothing happened!"
|
||||
sub_80522F4(r0, r1, *gUnknown_80F89F4);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
||||
}
|
||||
|
||||
void sub_8048450(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_8048450(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
if((u8)(r1->entityData->nonVolatileStatus - 2) <= 1)
|
||||
sub_807A290(r0, r1);
|
||||
if((u8)(target->entityData->nonVolatileStatus - 2) <= 1)
|
||||
sub_807A290(pokemon, target);
|
||||
else
|
||||
// Pointer to "But nothing happened!"
|
||||
sub_80522F4(r0, r1, *gUnknown_80F89F4);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
||||
}
|
||||
|
||||
void sub_8048480(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_8048480(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_807D148(r0, r1, 0, 0);
|
||||
sub_807D148(pokemon, target, 0, 0);
|
||||
}
|
||||
|
||||
void sub_8048490(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_8048490(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8075FCC(r0, r1);
|
||||
sub_8075FCC(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_804849C(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_804849C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8077AE4(r0, r1, 1);
|
||||
sub_8077AE4(pokemon, target, 1);
|
||||
}
|
||||
|
||||
void sub_80484A8(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80484A8(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8072008(r0, r1, 1, 1, 1);
|
||||
sub_8072008(pokemon, target, 1, 1, 1);
|
||||
}
|
||||
|
||||
void sub_80484BC(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80484BC(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8076D10(r0, r1);
|
||||
sub_8076D10(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_80484C8(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80484C8(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
// Pointer to "But nothing happened!"
|
||||
sub_80522F4(r0, r1, *gUnknown_80F89F4);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
||||
}
|
||||
|
||||
void sub_80484DC(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80484DC(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
LevelDownTarget(r0, r1, 1);
|
||||
LevelDownTarget(pokemon, target, 1);
|
||||
}
|
||||
|
||||
void sub_80484E8(struct DungeonEntity *r0, struct DungeonEntity *r1)
|
||||
void sub_80484E8(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
if(r1->entityData->nonVolatileStatus == NON_VOLATILE_STATUS_BURNED)
|
||||
sub_807A290(r0, r1);
|
||||
if(target->entityData->nonVolatileStatus == NON_VOLATILE_STATUS_BURNED)
|
||||
sub_807A290(pokemon, target);
|
||||
else
|
||||
{
|
||||
SetMessageArgument(gAvailablePokemonNames, r1, 0);
|
||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||
// Pointer to "But nothing happened!"
|
||||
sub_80522F4(r0, r1, *gUnknown_80FB580);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FB580);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8048524(struct DungeonEntity *param_1, struct DungeonEntity * param_2)
|
||||
void sub_8048524(struct DungeonEntity *pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
struct DungeonEntityData *iVar2;
|
||||
struct DungeonEntityData *iVar3;
|
||||
struct DungeonEntityData *entityData;
|
||||
struct DungeonEntityData *entityData_1;
|
||||
u32 *belly;
|
||||
u32 local_14;
|
||||
u32 newBelly;
|
||||
|
||||
iVar2 = param_2->entityData;
|
||||
iVar3 = iVar2;
|
||||
if (iVar2->isLeader)
|
||||
sub_8078A58(param_1, param_2, 0, 5);
|
||||
entityData = target->entityData;
|
||||
entityData_1 = entityData;
|
||||
if (entityData->isLeader)
|
||||
sub_8078A58(pokemon, target, 0, 5);
|
||||
else
|
||||
{
|
||||
SetMessageArgument(gAvailablePokemonNames, param_2, 0);
|
||||
if (HasIQSkill(param_2, IQ_SKILL_SELF_CURER))
|
||||
sub_80522F4(param_1, param_2, *gPtrSelfHealPreventedHungerMessage);
|
||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||
if (HasIQSkill(target, IQ_SKILL_SELF_CURER))
|
||||
sub_80522F4(pokemon, target, *gPtrSelfHealPreventedHungerMessage);
|
||||
else
|
||||
{
|
||||
belly = &iVar3->belly;
|
||||
belly = &entityData_1->belly;
|
||||
if (RoundUpFixedPoint(*belly) != 0) {
|
||||
sub_80943A0(&local_14, 0);
|
||||
*belly = local_14;
|
||||
sub_80522F4(param_1, param_2, *gUnknown_80F9740);
|
||||
sub_80943A0(&newBelly, 0);
|
||||
*belly = newBelly;
|
||||
sub_80522F4(pokemon, target, *gUnknown_80F9740);
|
||||
}
|
||||
else
|
||||
sub_80522F4(param_1, param_2, *gUnknown_80F9760);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80F9760);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80485B0(struct DungeonEntity *param_1, struct DungeonEntity * param_2)
|
||||
void sub_80485B0(struct DungeonEntity *pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
bool8 isMoveBoosted;
|
||||
s32 moveIndex;
|
||||
@ -216,7 +216,7 @@ void sub_80485B0(struct DungeonEntity *param_1, struct DungeonEntity * param_2)
|
||||
|
||||
isMoveBoosted = FALSE;
|
||||
cVar8 = 1;
|
||||
iVar5 = param_2->entityData;
|
||||
iVar5 = target->entityData;
|
||||
if (DungeonRandomCapped(100) < gUnknown_80F4F46)
|
||||
cVar8 = 3;
|
||||
if (iVar5->isLeader) {
|
||||
@ -236,69 +236,69 @@ void sub_80485B0(struct DungeonEntity *param_1, struct DungeonEntity * param_2)
|
||||
}
|
||||
|
||||
if (isMoveBoosted) {
|
||||
sub_80522F4(param_1,param_2,*gUnknown_80FE454);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FE454);
|
||||
if (cVar8 != 1) {
|
||||
sub_803E708(10,0x40);
|
||||
sub_80522F4(param_1,param_2,*gUnknown_80FE434);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FE434);
|
||||
}
|
||||
}
|
||||
else
|
||||
sub_80522F4(param_1,param_2,*gUnknown_80FE40C);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FE40C);
|
||||
}
|
||||
else
|
||||
sub_80522F4(param_1,param_2,*gUnknown_80FE40C);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FE40C);
|
||||
}
|
||||
|
||||
void sub_804869C(struct DungeonEntity *param_1, struct DungeonEntity * param_2, u8 param_3)
|
||||
void sub_804869C(struct DungeonEntity *pokemon, struct DungeonEntity * target, u8 param_3)
|
||||
{
|
||||
s32 uVar1;
|
||||
struct DungeonEntityData *iVar2;
|
||||
struct DungeonEntityData *iVar4;
|
||||
struct DungeonEntity *iVar3;
|
||||
struct DungeonEntityData *entityData;
|
||||
struct DungeonEntityData *entityData_1;
|
||||
struct DungeonEntity *entity;
|
||||
u8 auStack28 [4];
|
||||
|
||||
if (param_3 != '\0') {
|
||||
iVar2 = param_2->entityData;
|
||||
iVar4 = iVar2;
|
||||
entityData = target->entityData;
|
||||
entityData_1 = entityData;
|
||||
if (gDungeonGlobalData->unk675 != 0) {
|
||||
uVar1 = gUnknown_80F4FA8;
|
||||
sub_80522F4(param_1, param_2, *gUnknown_80FEAE8);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FEAE8);
|
||||
}
|
||||
else {
|
||||
uVar1 = gUnknown_80F4FA4;
|
||||
}
|
||||
if (iVar4->immobilizeStatus == IMMOBILIZE_STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(param_1, param_2);
|
||||
if (entityData_1->immobilizeStatus == IMMOBILIZE_STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(pokemon, target);
|
||||
}
|
||||
sub_806F370(param_1, param_2, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
sub_806F370(pokemon, target, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_8042520(param_1);
|
||||
iVar3 = sub_80696FC(param_1);
|
||||
if (iVar3 == NULL)
|
||||
sub_8042520(pokemon);
|
||||
entity = sub_80696FC(pokemon);
|
||||
if (entity == NULL)
|
||||
{
|
||||
sub_80522F4(param_1, param_2, *gUnknown_80FDBA0);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FDBA0);
|
||||
}
|
||||
else
|
||||
{
|
||||
iVar2 = iVar3->entityData;
|
||||
entityData = entity->entityData;
|
||||
if (gDungeonGlobalData->unk675 != 0) {
|
||||
uVar1 = gUnknown_80F4FAA;
|
||||
sub_80522F4(param_1, param_2, *gUnknown_80FEAE8);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FEAE8);
|
||||
}
|
||||
else {
|
||||
uVar1 = gUnknown_80F4FA6;
|
||||
}
|
||||
if (iVar2->immobilizeStatus == IMMOBILIZE_STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(param_1, iVar3);
|
||||
if (entityData->immobilizeStatus == IMMOBILIZE_STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(pokemon, entity);
|
||||
}
|
||||
sub_806F370(param_1, iVar3, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
sub_806F370(pokemon, entity, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80487CC(struct DungeonEntity *param_1, struct DungeonEntity * param_2, u32 param_3, u32 param_4)
|
||||
void sub_80487CC(struct DungeonEntity *pokemon, struct DungeonEntity * target, u32 param_3, u32 param_4)
|
||||
{
|
||||
sub_8078B5C(param_1, param_2, param_3, param_4, 1);
|
||||
sub_8078B5C(pokemon, target, param_3, param_4, 1);
|
||||
}
|
||||
|
@ -32,20 +32,20 @@ extern void SetMessageArgument(char[], struct DungeonEntity*, u32);
|
||||
extern u8 *gUnknown_80FDCA4[];
|
||||
extern u8 *gUnknown_80FE3E8[];
|
||||
|
||||
bool8 sub_8048D50(struct DungeonEntity * param_1,struct ItemSlot *param_2)
|
||||
bool8 sub_8048D50(struct DungeonEntity * param_1,struct ItemSlot *item)
|
||||
{
|
||||
struct DungeonEntityData *iVar2;
|
||||
|
||||
iVar2 = param_1->entityData;
|
||||
|
||||
if ((param_2->itemFlags & ITEM_FLAG_STICKY) != 0) {
|
||||
sub_8045BF8(gUnknown_202DE58,param_2);
|
||||
if ((item->itemFlags & ITEM_FLAG_STICKY) != 0) {
|
||||
sub_8045BF8(gUnknown_202DE58, item);
|
||||
SendMessage(param_1,*gUnknown_80FE3E8);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((iVar2->muzzledStatus == MUZZLED_STATUS_MUZZLED) && (IsEdibleItem(param_2->itemIndex))) {
|
||||
if ((iVar2->muzzledStatus == MUZZLED_STATUS_MUZZLED) && (IsEdibleItem(item->itemIndex))) {
|
||||
SetMessageArgument(gAvailablePokemonNames,param_1,0);
|
||||
SendMessage(param_1,*gUnknown_80FDCA4);
|
||||
return FALSE;
|
||||
@ -54,11 +54,11 @@ bool8 sub_8048D50(struct DungeonEntity * param_1,struct ItemSlot *param_2)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_8048DB8(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u8 r2)
|
||||
void sub_8048DB8(struct DungeonEntity *pokemon, struct DungeonEntity *target, u8 r2)
|
||||
{
|
||||
u8 temp;
|
||||
if(r2 != 0)
|
||||
sub_806F370(pokemon, r1, gUnknown_80F4FAC, 1, &temp, 0, 0x217, 0, 0, 0);
|
||||
sub_806F370(pokemon, target, gUnknown_80F4FAC, 1, &temp, 0, 0x217, 0, 0, 0);
|
||||
else
|
||||
sub_8051E7C(pokemon);
|
||||
}
|
||||
|
1307
src/code_80521D0_1.c
1307
src/code_80521D0_1.c
File diff suppressed because it is too large
Load Diff
1728
src/code_8057824_1.c
1728
src/code_8057824_1.c
File diff suppressed because it is too large
Load Diff
@ -18,14 +18,14 @@ EWRAM_DATA struct unkStruct_202F3D0 gUnknown_202F3D0;
|
||||
|
||||
s8 sub_8002984(s8, u8);
|
||||
void sub_803E708(u32, u32);
|
||||
void sub_80869E4(struct DungeonEntity *r0, u32, u8, s8);
|
||||
void sub_80869E4(struct DungeonEntity *entity, u32, u8, s8);
|
||||
extern void sub_80859F0(u32);
|
||||
extern void sub_803E46C(u32);
|
||||
extern void sub_803E9D0(void);
|
||||
extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32);
|
||||
extern void PlaySoundEffect(u32);
|
||||
extern struct DungeonEntity *xxx_call_GetLeaderEntity(void);
|
||||
void SpriteLookAroundEffect(struct DungeonEntity *r0);
|
||||
void SpriteLookAroundEffect(struct DungeonEntity *entity);
|
||||
extern void DisplayDungeonDialogue(u32);
|
||||
void sub_8086494();
|
||||
|
||||
@ -39,7 +39,7 @@ extern void sub_80855E4(void *);
|
||||
extern s32 GetCameraXPos(void);
|
||||
extern s32 GetCameraYPos(void);
|
||||
extern void sub_803F878(u32, u32);
|
||||
extern void sub_8086384(struct DungeonEntity *r0);
|
||||
extern void sub_8086384(struct DungeonEntity *entity);
|
||||
extern void sub_8085930(u32);
|
||||
extern void sub_804539C(struct DungeonEntity *, u32, u32);
|
||||
extern void sub_806CE68(struct DungeonEntity *, u32);
|
||||
@ -50,100 +50,100 @@ extern void sub_8086A3C(struct DungeonEntity *);
|
||||
extern void PlaySoundEffect(u32);
|
||||
extern void sub_80861F8(u32, struct DungeonEntity *, u32);
|
||||
|
||||
void sub_80862BC(struct DungeonEntity *r0)
|
||||
void SpriteShockEffect(struct DungeonEntity *entity)
|
||||
{
|
||||
PlaySoundEffect(0xE8 << 1);
|
||||
sub_80861F8(0x143, r0, 0);
|
||||
sub_80861F8(0x143, entity, 0);
|
||||
}
|
||||
|
||||
void sub_80862DC(struct DungeonEntity *r0)
|
||||
void sub_80862DC(struct DungeonEntity *entity)
|
||||
{
|
||||
u32 array[2];
|
||||
array[0] = r0->posPixel.x;
|
||||
array[1] = r0->posPixel.y + (0xE0 << 6);
|
||||
array[0] = entity->posPixel.x;
|
||||
array[1] = entity->posPixel.y + (0xE0 << 6);
|
||||
|
||||
sub_804535C(r0, array);
|
||||
sub_806CDD4(r0, 0, DIRECTION_NORTH);
|
||||
sub_8086A54(r0);
|
||||
sub_804535C(entity, array);
|
||||
sub_806CDD4(entity, 0, DIRECTION_NORTH);
|
||||
sub_8086A54(entity);
|
||||
}
|
||||
|
||||
void sub_8086310(struct DungeonEntity *r0)
|
||||
void sub_8086310(struct DungeonEntity *entity)
|
||||
{
|
||||
u32 array[2];
|
||||
array[0] = r0->posPixel.x;
|
||||
array[1] = r0->posPixel.y + (0x90 << 8);
|
||||
array[0] = entity->posPixel.x;
|
||||
array[1] = entity->posPixel.y + (0x90 << 8);
|
||||
|
||||
sub_804535C(r0, array);
|
||||
sub_806CE68(r0, DIRECTION_SOUTH);
|
||||
sub_8086A3C(r0);
|
||||
r0->visible = 0;
|
||||
sub_804535C(entity, array);
|
||||
sub_806CE68(entity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(entity);
|
||||
entity->visible = 0;
|
||||
}
|
||||
|
||||
void sub_8086348(struct DungeonEntity *r0)
|
||||
void sub_8086348(struct DungeonEntity *entity)
|
||||
{
|
||||
u32 array[2];
|
||||
array[0] = r0->posPixel.x + (0xF0 << 7);
|
||||
array[1] = r0->posPixel.y + 0xffffe000;
|
||||
array[0] = entity->posPixel.x + (0xF0 << 7);
|
||||
array[1] = entity->posPixel.y + 0xffffe000;
|
||||
|
||||
sub_804535C(r0, array);
|
||||
sub_806CDD4(r0, 0, DIRECTION_WEST);
|
||||
sub_8086A54(r0);
|
||||
sub_804535C(entity, array);
|
||||
sub_806CDD4(entity, 0, DIRECTION_WEST);
|
||||
sub_8086A54(entity);
|
||||
}
|
||||
|
||||
void sub_8086384(struct DungeonEntity *r0)
|
||||
void sub_8086384(struct DungeonEntity *entity)
|
||||
{
|
||||
u32 array[2];
|
||||
array[0] = r0->posPixel.x + (0xF0 << 7);
|
||||
array[1] = r0->posPixel.y;
|
||||
array[0] = entity->posPixel.x + (0xF0 << 7);
|
||||
array[1] = entity->posPixel.y;
|
||||
|
||||
sub_804535C(r0, array);
|
||||
sub_806CDD4(r0, 0, DIRECTION_WEST);
|
||||
sub_8086A54(r0);
|
||||
sub_804535C(entity, array);
|
||||
sub_806CDD4(entity, 0, DIRECTION_WEST);
|
||||
sub_8086A54(entity);
|
||||
}
|
||||
|
||||
void sub_80863B8(struct DungeonEntity *r0)
|
||||
void sub_80863B8(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_806CDD4(r0, 0, DIRECTION_NORTH);
|
||||
sub_806CDD4(entity, 0, DIRECTION_NORTH);
|
||||
}
|
||||
|
||||
void sub_80863C8(struct DungeonEntity *r0)
|
||||
void sub_80863C8(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_806CDD4(r0, 0, DIRECTION_SOUTH);
|
||||
sub_806CDD4(entity, 0, DIRECTION_SOUTH);
|
||||
}
|
||||
|
||||
void sub_80863D8(struct DungeonEntity *r0)
|
||||
void sub_80863D8(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_806CDD4(r0, 0, DIRECTION_WEST);
|
||||
sub_806CDD4(entity, 0, DIRECTION_WEST);
|
||||
}
|
||||
|
||||
void sub_80863E8(struct DungeonEntity *r0)
|
||||
void sub_80863E8(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_806CDD4(r0, 6, DIRECTION_NORTH);
|
||||
sub_806CDD4(entity, 6, DIRECTION_NORTH);
|
||||
}
|
||||
|
||||
void sub_80863F8(struct DungeonEntity *r0)
|
||||
void sub_80863F8(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_806CE68(r0, DIRECTION_NORTH);
|
||||
sub_806CE68(entity, DIRECTION_NORTH);
|
||||
}
|
||||
|
||||
void sub_8086404(struct DungeonEntity *r0)
|
||||
void sub_8086404(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_806CE68(r0, DIRECTION_WEST);
|
||||
sub_806CE68(entity, DIRECTION_WEST);
|
||||
}
|
||||
|
||||
void sub_8086410(struct DungeonEntity *r0)
|
||||
void sub_8086410(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_804539C(r0, 0, 0xffffff00);
|
||||
sub_804539C(entity, 0, 0xffffff00);
|
||||
}
|
||||
|
||||
void sub_8086424(struct DungeonEntity *r0)
|
||||
void sub_8086424(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_804539C(r0, 0, 0x80 << 1);
|
||||
sub_804539C(entity, 0, 0x80 << 1);
|
||||
}
|
||||
|
||||
void sub_8086434(struct DungeonEntity *r0)
|
||||
void sub_8086434(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_804539C(r0, 0xffffff00, 0);
|
||||
sub_804539C(entity, 0xffffff00, 0);
|
||||
}
|
||||
|
||||
void sub_8086448(void)
|
||||
@ -306,12 +306,12 @@ void sub_8086690(void)
|
||||
}
|
||||
|
||||
|
||||
void sub_80866C4(u32 r0)
|
||||
void sub_80866C4(u32 entity)
|
||||
{
|
||||
|
||||
SpriteLookAroundEffect(xxx_call_GetLeaderEntity());
|
||||
sub_803E708(0xA, 0x46);
|
||||
DisplayDungeonDialogue(r0);
|
||||
DisplayDungeonDialogue(entity);
|
||||
sub_803E708(0xA, 0x46);
|
||||
sub_8086494();
|
||||
gDungeonGlobalData->unk2 = 1;
|
||||
@ -395,21 +395,21 @@ void sub_808680C(void)
|
||||
PlaySoundEffect(0x1F9);
|
||||
}
|
||||
|
||||
void sub_808682C(u8 r0)
|
||||
void sub_808682C(u8 entity)
|
||||
{
|
||||
gUnknown_202F3D0.unk0 = 0;
|
||||
}
|
||||
|
||||
void sub_8086838(u8 r0, u8 r1, u8 r2)
|
||||
void sub_8086838(u8 entity, u8 r1, u8 r2)
|
||||
{
|
||||
gUnknown_202F3D0.unk1 = r0;
|
||||
gUnknown_202F3D0.unk1 = entity;
|
||||
gUnknown_202F3D0.unk2 = r1;
|
||||
gUnknown_202F3D0.unk3 = r2;
|
||||
}
|
||||
|
||||
void sub_8086848(u8 r0, u8 r1)
|
||||
void sub_8086848(u8 entity, u8 r1)
|
||||
{
|
||||
gUnknown_202F3D0.unk4 = r0;
|
||||
gUnknown_202F3D0.unk4 = entity;
|
||||
gUnknown_202F3D0.unk5 = r1;
|
||||
}
|
||||
|
||||
@ -446,16 +446,16 @@ void sub_8086854(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80868F4(struct DungeonEntity *r0)
|
||||
void sub_80868F4(struct DungeonEntity *entity)
|
||||
{
|
||||
r0->entityData->unk15C = 1;
|
||||
r0->entityData->unk15D = 1;
|
||||
entity->entityData->unk15C = 1;
|
||||
entity->entityData->unk15D = 1;
|
||||
}
|
||||
|
||||
void sub_8086910(struct DungeonEntity *r0)
|
||||
void sub_8086910(struct DungeonEntity *entity)
|
||||
{
|
||||
r0->entityData->unk15C = 0;
|
||||
r0->entityData->unk15D = 0;
|
||||
entity->entityData->unk15C = 0;
|
||||
entity->entityData->unk15D = 0;
|
||||
}
|
||||
|
||||
void sub_808692C(void)
|
||||
@ -473,26 +473,26 @@ void sub_808692C(void)
|
||||
sub_803E708(0x4, 0x46);
|
||||
}
|
||||
|
||||
void SpriteLookAroundEffect(struct DungeonEntity *r0)
|
||||
void SpriteLookAroundEffect(struct DungeonEntity *entity)
|
||||
{
|
||||
s8 r4;
|
||||
s8 r3;
|
||||
|
||||
r4 = sub_8002984(r0->entityData->action.facingDir, 4);
|
||||
r4 = sub_8002984(entity->entityData->action.facingDir, 4);
|
||||
|
||||
sub_80869E4(r0, 4, 2, r4);
|
||||
sub_80869E4(entity, 4, 2, r4);
|
||||
|
||||
sub_803E708(0xF, 0x46);
|
||||
|
||||
r4 = sub_8002984(r4, 5);
|
||||
|
||||
sub_80869E4(r0, 4, 1, r4);
|
||||
sub_80869E4(entity, 4, 1, r4);
|
||||
|
||||
sub_803E708(0xF, 0x46);
|
||||
|
||||
r3 = sub_8002984(r4, 4);
|
||||
|
||||
sub_80869E4(r0, 4, 2, r3);
|
||||
sub_80869E4(entity, 4, 2, r3);
|
||||
|
||||
sub_803E708(0xF, 0x46);
|
||||
}
|
||||
|
@ -28,8 +28,8 @@ extern void sub_80869E4(struct DungeonEntity *, u32, u32, u32);
|
||||
extern void sub_8083E88(u32);
|
||||
extern void sub_803E708(u32, u32);
|
||||
extern void sub_8086448(void);
|
||||
extern void sub_80862BC(struct DungeonEntity *);
|
||||
extern void sub_8086E74(struct DungeonEntity *);
|
||||
extern void SpriteShockEffect(struct DungeonEntity *);
|
||||
extern void SkarmoryEntry(struct DungeonEntity *);
|
||||
extern void SpriteLookAroundEffect(struct DungeonEntity *);
|
||||
extern void sub_8086A54(struct DungeonEntity *);
|
||||
extern void PlaySoundEffect(u32);
|
||||
@ -174,7 +174,7 @@ void SkarmoryPreFightDialogue(void)
|
||||
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
sub_80862BC(PartnerEntity);
|
||||
SpriteShockEffect(PartnerEntity);
|
||||
sub_803E708(0x20,0x46);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_1);
|
||||
@ -189,7 +189,7 @@ void SkarmoryPreFightDialogue(void)
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&local_20,0x20);
|
||||
sub_803E708(0x20,0x46);
|
||||
sub_8086E74(SkarmoryEntity);
|
||||
SkarmoryEntry(SkarmoryEntity);
|
||||
DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_4); // Skarmory: You!\nWhat do you think you're doing here?!
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_5);
|
||||
@ -223,7 +223,7 @@ void SkarmoryReFightDialogue(void)
|
||||
local_14.y = SkarmoryEntity->posPixel.y + 0x2000;
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086E74(SkarmoryEntity);
|
||||
SkarmoryEntry(SkarmoryEntity);
|
||||
ShiftCameraToPosition(&local_14,0x10);
|
||||
DisplayDungeonDialogue(&gSkarmoryReFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
@ -245,10 +245,10 @@ void sub_8086E40(void)
|
||||
gDungeonGlobalData->unk2 = 1;
|
||||
}
|
||||
|
||||
void sub_8086E74(struct DungeonEntity * param_1)
|
||||
void SkarmoryEntry(struct DungeonEntity * skarmoryEntity)
|
||||
{
|
||||
sub_806CDD4(param_1,0xf,0);
|
||||
sub_8086A54(param_1);
|
||||
sub_806CDD4(skarmoryEntity,0xf,0);
|
||||
sub_8086A54(skarmoryEntity);
|
||||
PlaySoundEffect(0x1f8);
|
||||
sub_803E708(0x44,0x46);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "play_time.h"
|
||||
#include "input.h"
|
||||
#include "debug.h"
|
||||
#include "code_80A26CC.h"
|
||||
|
||||
extern u32 gUnknown_20398A8;
|
||||
extern u32 gUnknown_20398AC;
|
||||
@ -21,6 +22,15 @@ extern const char gUnknown_8115FA4;
|
||||
extern const char gUnknown_8115FC8;
|
||||
extern const char gUnknown_8115FE8;
|
||||
|
||||
struct unkStruct_811BAF4
|
||||
{
|
||||
u16 unk0;
|
||||
s16 unk2;
|
||||
u8 fill4[8];
|
||||
};
|
||||
|
||||
extern struct unkStruct_811BAF4 gUnknown_811BAF4[10];
|
||||
|
||||
extern void sub_809B57C();
|
||||
extern void GroundScript_Unlock();
|
||||
extern void sub_809D25C();
|
||||
@ -61,11 +71,11 @@ extern void ClearAllItems_8091FB4();
|
||||
extern const char *sub_80A2B18(s16);
|
||||
extern u8 sub_8001CC4(u8, u8, u8);
|
||||
extern void ChooseKecleonShopInventory(u32);
|
||||
|
||||
extern u8 sub_80023E4(u32);
|
||||
extern void sub_80118C4(u16);
|
||||
extern void FadeOutAllMusic(u16);
|
||||
extern u8 sub_809C730();
|
||||
extern s16 sub_80A2750(s16);
|
||||
extern u8 sub_8001D44(u32, u32, s32);
|
||||
|
||||
void sub_8098BDC(void)
|
||||
{
|
||||
@ -199,7 +209,7 @@ bool8 sub_8098D80(u32 r0)
|
||||
sub_809C730();
|
||||
if(sub_80023E4(0xD) == 0)
|
||||
{
|
||||
sub_80118C4(r0);
|
||||
FadeOutAllMusic(r0);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -216,7 +226,7 @@ bool8 sub_8098DCC(u32 r0)
|
||||
sub_809C730();
|
||||
if(sub_80023E4(0xD) == 0)
|
||||
{
|
||||
sub_80118C4(r0);
|
||||
FadeOutAllMusic(r0);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -319,3 +329,54 @@ const char *sub_8098FB4(void)
|
||||
{
|
||||
return sub_80A2B18(sub_8001658(0, 0x11));
|
||||
}
|
||||
|
||||
|
||||
s32 sub_8098FCC(u32 unused)
|
||||
{
|
||||
s32 iVar4;
|
||||
s32 iVar5;
|
||||
s32 iVar6;
|
||||
struct unkStruct_80A2608 *iVar3;
|
||||
|
||||
iVar5 = (s16)sub_8001658(0,0x13);
|
||||
iVar6 = iVar5;
|
||||
if (iVar5 == -1) return 0xC;
|
||||
|
||||
if (iVar5 == 0x51)
|
||||
iVar4 = (s16)sub_8001658(0,0x14);
|
||||
else
|
||||
iVar4 = iVar6;
|
||||
|
||||
iVar3 = sub_80A2608(iVar4);
|
||||
if (gUnknown_20398B4 == 9) {
|
||||
return iVar3->unk2;
|
||||
}
|
||||
switch((s16)(iVar3->unk4 - 0xb2)) {
|
||||
case 0:
|
||||
if (sub_8001D44(3,2,-1) != 0) return 0xc;
|
||||
break;
|
||||
case 0xf:
|
||||
case 0x11:
|
||||
case 0x14:
|
||||
case 0x17:
|
||||
if (sub_80023E4(5) == 0) return 0xC;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return iVar3->unk4;
|
||||
}
|
||||
|
||||
const char *sub_80990B8(void)
|
||||
{
|
||||
s16 index;
|
||||
index = sub_8098FCC(0xB);
|
||||
if(index != -1)
|
||||
{
|
||||
return sub_80A2B18(gUnknown_811BAF4[index].unk2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sub_8098FB4();
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,67 @@ extern struct unkStruct_20399E8 gUnknown_20399E8;
|
||||
|
||||
void sub_809D0BC(void);
|
||||
|
||||
s32 sub_809CFE8(u16 param_1)
|
||||
{
|
||||
if ((param_1 & 0x40) != 0) {
|
||||
if ((param_1 & 0x10) != 0)
|
||||
return 3;
|
||||
else if ((param_1 & 0x20) != 0)
|
||||
return 5;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
else if ((param_1 & 0x80) != 0) {
|
||||
if ((param_1 & 0x10) != 0)
|
||||
return 1;
|
||||
else if ((param_1 & 0x20) != 0)
|
||||
return 7;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
else if ((param_1 & 0x10) != 0)
|
||||
return 2;
|
||||
else if ((param_1 & 0x20) != 0)
|
||||
return 6;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Unused
|
||||
s32 sub_809D058(s32 *param_1)
|
||||
{
|
||||
if (param_1[1] < 0x40) {
|
||||
if (param_1[0] < 0x68) {
|
||||
return 5;
|
||||
}
|
||||
else if (param_1[0] > 0x88) {
|
||||
return 3;
|
||||
}
|
||||
else {
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
else if (param_1[1] > 0x60) {
|
||||
if (param_1[0] < 0x68) {
|
||||
return 7;
|
||||
}
|
||||
else if (param_1[0] > 0x88) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (param_1[0] < 0x68) {
|
||||
return 6;
|
||||
}
|
||||
else if (param_1[0] > 0x88) {
|
||||
return 2;
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_809D0AC(void)
|
||||
{
|
||||
|
@ -1,18 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
struct unkStruct_80A2608
|
||||
{
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x2 */ u16 padding;
|
||||
/* 0x4 */ u32 padding2;
|
||||
/* 0x8 */ u16 padding3;
|
||||
/* 0xA */ u16 padding4;
|
||||
/* 0xC */ u8 unkC;
|
||||
/* 0xD */ u8 padding5;
|
||||
/* 0xE */ s16 unkE;
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x11 */ u8 unk11;
|
||||
};
|
||||
#include "code_80A26CC.h"
|
||||
|
||||
extern u8 sub_80023E4(u32);
|
||||
extern u8 sub_80973F4(s16);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "item.h"
|
||||
#include "position.h"
|
||||
#include "position_util.h"
|
||||
#include "status.h"
|
||||
#include "team_inventory.h"
|
||||
|
||||
#define NUM_POTENTIAL_ROCK_TARGETS 20
|
||||
@ -34,8 +35,6 @@ enum ItemTargetFlag
|
||||
ITEM_TARGET_ALLY = 1 << 1
|
||||
};
|
||||
|
||||
extern void sub_8077274(struct DungeonEntity *, struct DungeonEntity *);
|
||||
|
||||
extern s32 gNumPotentialTargets;
|
||||
extern u32 gPotentialItemTargetWeights[NUM_DIRECTIONS];
|
||||
extern u32 gPotentialItemTargetDirections[NUM_DIRECTIONS];
|
||||
@ -55,7 +54,7 @@ void sub_807360C(struct DungeonEntity *pokemon)
|
||||
if(entity->entityData->unk152 != 0)
|
||||
{
|
||||
entity->entityData->unk152 = 0;
|
||||
sub_8077274(entity, entity);
|
||||
UpdateFlashFireBoost(entity, entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,32 +26,32 @@ extern bool8 sub_805744C(struct DungeonEntity *, struct PokemonMove *, u32);
|
||||
extern void SetMessageArgument(char[], struct DungeonEntity*, u32);
|
||||
extern void sub_80522F4(struct DungeonEntity *r1, struct DungeonEntity *r2, u32);
|
||||
|
||||
bool8 sub_80716E8(struct DungeonEntity * param_1, struct DungeonEntity * param_2, u8 param_3)
|
||||
bool8 HasSafeguardStatus(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
if (param_2->entityData->protectionStatus == PROTECTION_STATUS_SAFEGUARD) {
|
||||
if (param_3 != '\0') {
|
||||
SetMessageArgument(gAvailablePokemonNames,param_2,0);
|
||||
sub_80522F4(param_1,param_2,gUnknown_80FC2FC);
|
||||
if (target->entityData->protectionStatus == PROTECTION_STATUS_SAFEGUARD) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,gUnknown_80FC2FC);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_8071728(struct DungeonEntity * param_1, struct DungeonEntity * param_2, u8 param_3)
|
||||
bool8 sub_8071728(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
if (param_2->entityData->protectionStatus == PROTECTION_STATUS_MIST) {
|
||||
if (param_3 != '\0') {
|
||||
SetMessageArgument(gAvailablePokemonNames, param_2, 0);
|
||||
sub_80522F4(param_1, param_2, gUnknown_80FC31C);
|
||||
if (target->entityData->protectionStatus == PROTECTION_STATUS_MIST) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||
sub_80522F4(pokemon, target, gUnknown_80FC31C);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
if (HasAbility(param_2, ABILITY_CLEAR_BODY) || HasAbility(param_2, ABILITY_WHITE_SMOKE)) {
|
||||
if (param_3 != '\0') {
|
||||
SetMessageArgument(gAvailablePokemonNames, param_2, 0);
|
||||
sub_80522F4(param_1, param_2, gUnknown_80FCEFC);
|
||||
if (HasAbility(target, ABILITY_CLEAR_BODY) || HasAbility(target, ABILITY_WHITE_SMOKE)) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||
sub_80522F4(pokemon, target, gUnknown_80FCEFC);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -59,12 +59,12 @@ bool8 sub_8071728(struct DungeonEntity * param_1, struct DungeonEntity * param_2
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_80717A4(struct DungeonEntity *param_1, u16 moveID)
|
||||
bool8 sub_80717A4(struct DungeonEntity *pokemon, u16 moveID)
|
||||
{
|
||||
struct DungeonEntityData * entityData;
|
||||
s32 iVar3;
|
||||
|
||||
entityData = param_1->entityData;
|
||||
entityData = pokemon->entityData;
|
||||
if ((entityData->sleepStatus != SLEEP_STATUS_SLEEP) && (entityData->sleepStatus != SLEEP_STATUS_NAPPING) && (entityData->sleepStatus != SLEEP_STATUS_NIGHTMARE)) {
|
||||
return FALSE;
|
||||
}
|
||||
@ -78,7 +78,7 @@ bool8 sub_80717A4(struct DungeonEntity *param_1, u16 moveID)
|
||||
for(iVar3 = 0, pokeMove = entityData->moves, pokeMove2 = pokeMove; iVar3 < MAX_MON_MOVES; pokeMove++, pokeMove2++, iVar3++)
|
||||
{
|
||||
if (((pokeMove->moveFlags & MOVE_FLAG_EXISTS) != 0) && (entityData->isLeader || ((pokeMove->moveFlags & MOVE_FLAG_ENABLED) != 0)))
|
||||
if((sub_805744C(param_1, pokeMove2, 1) != '\0') && (pokeMove->PP != 0))
|
||||
if((sub_805744C(pokemon, pokeMove2, 1) != '\0') && (pokeMove->PP != 0))
|
||||
if(pokeMove->moveID == moveID)
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -79,7 +79,94 @@ extern void sub_801BF98(void);
|
||||
extern u32 sub_801BF48(void);
|
||||
extern void sub_802453C(void);
|
||||
extern u32 sub_80244E4(void);
|
||||
extern bool8 sub_808D750(s16 index_);
|
||||
extern void sub_808ED00(void);
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
|
||||
void sub_80268CC(void)
|
||||
{
|
||||
struct PokemonStruct *playerPokemon;
|
||||
struct PokemonStruct *pokeStruct;
|
||||
struct PokemonStruct *iVar4;
|
||||
s32 choice;
|
||||
|
||||
choice = 0;
|
||||
if ((sub_8012FD8(&gUnknown_203B2B8->unk7C) == 0) && (sub_8013114(&gUnknown_203B2B8->unk7C,&choice), choice != 1)) {
|
||||
gUnknown_203B2B8->unk70 = choice;
|
||||
}
|
||||
switch(choice) {
|
||||
case 6:
|
||||
if (sub_808D750(gUnknown_203B2B8->pokeSpecies)) {
|
||||
|
||||
#ifdef NONMATCHING
|
||||
puVar3 = &gUnknown_203B2B8->pokeSpecies[gRecruitedPokemonRef->pokemon];
|
||||
#else
|
||||
register size_t offset asm("r1") = offsetof(struct unkStruct_203B45C, pokemon[gUnknown_203B2B8->pokeSpecies]);
|
||||
struct PokemonStruct* p = gRecruitedPokemonRef->pokemon;
|
||||
size_t addr = offset + (size_t)p;
|
||||
pokeStruct = (struct PokemonStruct*)addr;
|
||||
#endif
|
||||
|
||||
pokeStruct->unk0 |= 2;
|
||||
nullsub_104();
|
||||
}
|
||||
sub_808ED00();
|
||||
sub_8026074(5);
|
||||
break;
|
||||
case 7:
|
||||
gUnknown_203B2B8->unk18->unk0 &= 0xfffd;
|
||||
nullsub_104();
|
||||
sub_808ED00();
|
||||
sub_8026074(6);
|
||||
break;
|
||||
case 8:
|
||||
iVar4 = &gRecruitedPokemonRef->pokemon[gUnknown_203B2B8->pokeSpecies];
|
||||
playerPokemon = GetPlayerPokemonStruct();
|
||||
|
||||
if (!iVar4->isLeader) {
|
||||
playerPokemon->isLeader = FALSE;
|
||||
iVar4->isLeader = TRUE;
|
||||
nullsub_104();
|
||||
}
|
||||
sub_808ED00();
|
||||
sub_8026074(7);
|
||||
break;
|
||||
case 9:
|
||||
sub_8026074(0xc);
|
||||
break;
|
||||
case 0xd:
|
||||
sub_8026074(0x16);
|
||||
break;
|
||||
case 10:
|
||||
sub_8026074(0xe);
|
||||
break;
|
||||
case 0xb:
|
||||
sub_8026074(0x12);
|
||||
break;
|
||||
case 0xc:
|
||||
PlaySound(0x14d);
|
||||
if (gUnknown_203B2B8->unk14.itemIndex != ITEM_ID_NOTHING) {
|
||||
AddHeldItemToInventory(&gUnknown_203B2B8->unk14);
|
||||
}
|
||||
FillInventoryGaps();
|
||||
gUnknown_203B2B8->unk14.itemIndex = ITEM_ID_NOTHING;
|
||||
gUnknown_203B2B8->unk14.numItems = 0;
|
||||
GivePokemonItem(gUnknown_203B2B8->pokeSpecies,&gUnknown_203B2B8->unk14);
|
||||
nullsub_104();
|
||||
sub_8026074(0x11);
|
||||
break;
|
||||
case 4:
|
||||
sub_8026074(3);
|
||||
break;
|
||||
case 5:
|
||||
sub_8026074(4);
|
||||
break;
|
||||
case 1:
|
||||
sub_8026074(0x19);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8026A78(void)
|
||||
{
|
||||
@ -221,7 +308,7 @@ void sub_8026C14(void)
|
||||
PlaySound(0x14d);
|
||||
ShiftItemsDownFrom(gUnknown_203B2B8->unkC);
|
||||
FillInventoryGaps();
|
||||
if (gUnknown_203B2B8->unk14.itemIndex != '\0') {
|
||||
if (gUnknown_203B2B8->unk14.itemIndex != ITEM_ID_NOTHING) {
|
||||
AddHeldItemToInventory(&gUnknown_203B2B8->unk14);
|
||||
nextState = 0x10;
|
||||
}
|
||||
@ -306,14 +393,14 @@ void sub_8026D88(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8026DAC(u32 r0, struct HeldItem *r1)
|
||||
void sub_8026DAC(u32 r0, struct HeldItem *item)
|
||||
{
|
||||
struct ItemSlot slot;
|
||||
struct unkStruct_8090F58 temp;
|
||||
|
||||
sub_8008C54(r0);
|
||||
sub_80073B8(r0);
|
||||
HeldItemToSlot(&slot, r1);
|
||||
HeldItemToSlot(&slot, item);
|
||||
temp.unk0 = 0;
|
||||
temp.unk4 = 0;
|
||||
temp.unk8 = 1;
|
||||
@ -359,7 +446,7 @@ u32 sub_8026EB8(struct PokemonStruct *r0)
|
||||
u8 iVar3;
|
||||
if(sub_808D3BC() != r0)
|
||||
if(sub_808D3F8() != r0)
|
||||
if(r0->isLeader == 0)
|
||||
if(!r0->isLeader)
|
||||
{
|
||||
iVar3 = (r0->unk4.dungeonIndex == 0x41);
|
||||
if(iVar3 != 0)
|
||||
|
298
src/friend_list_menu_1.c
Normal file
298
src/friend_list_menu_1.c
Normal file
@ -0,0 +1,298 @@
|
||||
#include "global.h"
|
||||
#include "memory.h"
|
||||
#include "text.h"
|
||||
#include "input.h"
|
||||
#include "menu.h"
|
||||
#include "item.h"
|
||||
#include "pokemon.h"
|
||||
#include "moves.h"
|
||||
|
||||
struct unkStruct_203B2B4
|
||||
{
|
||||
// size: 0x178
|
||||
s32 unk0;
|
||||
s32 state;
|
||||
u32 unk8;
|
||||
u8 unkC;
|
||||
u8 unkD;
|
||||
s16 unkE;
|
||||
u32 unk10;
|
||||
struct HeldItem unk14;
|
||||
u32 unk18;
|
||||
/* 0x1C */ struct PokemonStruct *pokeStruct;
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
/* 0x28 */ struct PokemonMove moves[8];
|
||||
u32 unk68;
|
||||
u32 unk6C;
|
||||
u32 unk70;
|
||||
u32 unk74;
|
||||
u32 unk78;
|
||||
u8 fill7C[0xC8 - 0x7C];
|
||||
struct MenuItem unkC8[4];
|
||||
u8 fillE8[0x108 - 0xE8];
|
||||
s16 unk108[8];
|
||||
struct UnkTextStruct2 unk118[4];
|
||||
};
|
||||
extern struct unkStruct_203B2B4 *gUnknown_203B2B4;
|
||||
|
||||
extern struct UnkTextStruct2 gUnknown_80DD190;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD160;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD148;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD178;
|
||||
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern u8 gUnknown_80DD1A8[];
|
||||
extern u8 gUnknown_80DD270[];
|
||||
extern u8 gUnknown_80DD1C8[];
|
||||
extern u8 gUnknown_80DD1EC[];
|
||||
extern u8 gUnknown_80DD240[];
|
||||
|
||||
extern void sub_80141B4(const char *r0, u32, struct OpenedFile **r1, u32);
|
||||
extern s16 sub_80A5728(void);
|
||||
extern u8 sub_8002658(s16);
|
||||
extern bool8 sub_8024108(u32);
|
||||
extern void sub_8025434(s32);
|
||||
extern void sub_80259F0(void);
|
||||
extern void sub_8025A84(void);
|
||||
extern void sub_8025BCC(void);
|
||||
extern void sub_8025BE8(void);
|
||||
extern void sub_8025C04(void);
|
||||
extern void sub_8025CB4(void);
|
||||
extern void sub_8025D90(void);
|
||||
extern void sub_8025DAC(void);
|
||||
extern void sub_8025E08(void);
|
||||
extern void sub_8025E24(void);
|
||||
extern void sub_8025E44(void);
|
||||
extern void sub_802544C(void);
|
||||
extern void sub_8025518(void);
|
||||
extern void sub_8012CAC(struct UnkTextStruct2 *, struct MenuItem *);
|
||||
extern void sub_8025728(void);
|
||||
extern void sub_802591C(void);
|
||||
extern u32 sub_801B3C0(struct ItemSlot *param_1);
|
||||
extern void sub_8023868(u32, u32, u32, u32);
|
||||
extern void sub_801F1B0(u32, u32);
|
||||
extern void sub_801A5D8(u32,u32, u32, u32);
|
||||
extern void sub_801A8D0(u32);
|
||||
extern void sub_801A9E0(void);
|
||||
extern void PlaySound(u32);
|
||||
extern void sub_8012CAC(struct UnkTextStruct2 *, struct MenuItem *);
|
||||
extern void sub_8012D60(u32 *, struct MenuItem *, u32, s16 *, u32, u32);
|
||||
extern void sub_8024458(s16, u32);
|
||||
extern void sub_801BEEC(s16);
|
||||
extern void sub_8023B7C(u32);
|
||||
extern void sub_8023DA4(void);
|
||||
|
||||
extern void sub_809401C(struct PokemonMove *, struct PokemonMove *); // TODO convert arg 0 to PokemonMove struct *
|
||||
extern void sub_801EE10(u32, s16, struct PokemonMove *, u32, u32, u32);
|
||||
extern void sub_8093560(u32, struct PokemonMove *, u32 *);
|
||||
extern void sub_801F808(u32 *);
|
||||
u32 sub_801602C(u32 r0, u8 *name);
|
||||
extern void sub_8025E68(u32 , u32 *);
|
||||
|
||||
bool8 sub_80252F0(s32 param_1)
|
||||
{
|
||||
|
||||
if ((param_1 == 2) && (sub_8024108(4) != '\0')) {
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
gUnknown_203B2B4 = MemoryAlloc(0x178,8);
|
||||
gUnknown_203B2B4->unk70 = 0;
|
||||
gUnknown_203B2B4->unk0 = param_1;
|
||||
gUnknown_203B2B4->unkC = sub_8002658(sub_80A5728());
|
||||
gUnknown_203B2B4->unkD = 0;
|
||||
if (gUnknown_203B2B4->unk0 == 2) {
|
||||
sub_8025434(0);
|
||||
}
|
||||
else {
|
||||
sub_8025434(1);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_8025354(void)
|
||||
{
|
||||
switch(gUnknown_203B2B4->state) {
|
||||
case 0x13:
|
||||
return 3;
|
||||
case 1:
|
||||
case 2:
|
||||
sub_80259F0();
|
||||
break;
|
||||
case 3:
|
||||
sub_8025A84();
|
||||
break;
|
||||
case 4:
|
||||
sub_8025BCC();
|
||||
break;
|
||||
case 5:
|
||||
sub_8025BE8();
|
||||
break;
|
||||
case 0xb:
|
||||
case 0xc:
|
||||
sub_8025C04();
|
||||
break;
|
||||
case 0xd:
|
||||
sub_8025CB4();
|
||||
break;
|
||||
case 0xe:
|
||||
sub_8025D90();
|
||||
break;
|
||||
case 0xf:
|
||||
case 0x10:
|
||||
sub_8025DAC();
|
||||
break;
|
||||
case 0x11:
|
||||
sub_8025E08();
|
||||
break;
|
||||
case 0x12:
|
||||
sub_8025E24();
|
||||
break;
|
||||
default:
|
||||
sub_8025E44();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_802540C(void)
|
||||
{
|
||||
return gUnknown_203B2B4->unkD;
|
||||
}
|
||||
|
||||
void sub_8025418(void)
|
||||
{
|
||||
if(gUnknown_203B2B4 != NULL)
|
||||
{
|
||||
MemoryFree(gUnknown_203B2B4);
|
||||
gUnknown_203B2B4 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025434(s32 newState)
|
||||
{
|
||||
gUnknown_203B2B4->state = newState;
|
||||
sub_802544C();
|
||||
sub_8025518();
|
||||
}
|
||||
|
||||
void sub_802544C(void)
|
||||
{
|
||||
s32 iVar5;
|
||||
|
||||
sub_8006518(gUnknown_203B2B4->unk118);
|
||||
|
||||
switch(gUnknown_203B2B4->state)
|
||||
{
|
||||
case 3:
|
||||
if (gUnknown_203B2B4->unk0 == 0) {
|
||||
gUnknown_203B2B4->unk118[3] = gUnknown_80DD190;
|
||||
}
|
||||
sub_8025728();
|
||||
gUnknown_203B2B4->unk118[2] = gUnknown_80DD160;
|
||||
sub_8012CAC(&gUnknown_203B2B4->unk118[2],gUnknown_203B2B4->unkC8);
|
||||
break;
|
||||
case 0xD:
|
||||
sub_802591C();
|
||||
gUnknown_203B2B4->unk118[2] = gUnknown_80DD178;
|
||||
sub_8012CAC(&gUnknown_203B2B4->unk118[2],gUnknown_203B2B4->unkC8);
|
||||
break;
|
||||
default:
|
||||
for(iVar5 = 0; iVar5 < 4; iVar5++)
|
||||
{
|
||||
gUnknown_203B2B4->unk118[iVar5] = gUnknown_80DD148;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B2B4->unk118,1,1);
|
||||
}
|
||||
|
||||
void sub_8025518(void)
|
||||
{
|
||||
u32 uVar3;
|
||||
struct ItemSlot item;
|
||||
|
||||
switch(gUnknown_203B2B4->state)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203B2B4->unk8 = 1;
|
||||
sub_80141B4(gUnknown_80DD1A8,0,0,0x301);
|
||||
break;
|
||||
case 1:
|
||||
uVar3 = 4;
|
||||
if (gUnknown_203B2B4->unk0 == 0) {
|
||||
uVar3 = 2;
|
||||
}
|
||||
sub_8023868(uVar3,0,0,10);
|
||||
break;
|
||||
case 2:
|
||||
sub_8023B7C(1);
|
||||
break;
|
||||
case 3:
|
||||
if (gUnknown_203B2B4->unk0 == 0) {
|
||||
sub_8025E68(3,&gUnknown_203B2B4->unk18);
|
||||
}
|
||||
sub_8023DA4();
|
||||
PrintColoredPokeNameToBuffer(gAvailablePokemonNames,gUnknown_203B2B4->pokeStruct,7);
|
||||
PrintColoredPokeNameToBuffer(gAvailablePokemonNames + 0x50,gUnknown_203B2B4->pokeStruct,6);
|
||||
sub_8012D60(&gUnknown_203B2B4->unk78,gUnknown_203B2B4->unkC8,0,gUnknown_203B2B4->unk108,gUnknown_203B2B4->unk70,2);
|
||||
break;
|
||||
case 4:
|
||||
sub_8024458(gUnknown_203B2B4->unkE,2);
|
||||
break;
|
||||
case 5:
|
||||
sub_801BEEC(gUnknown_203B2B4->unkE);
|
||||
break;
|
||||
case 0xb:
|
||||
sub_801A5D8(1,0,0,10);
|
||||
break;
|
||||
case 0xc:
|
||||
sub_801A8D0(1);
|
||||
break;
|
||||
case 0xd:
|
||||
sub_801A9E0();
|
||||
sub_8012D60(&gUnknown_203B2B4->unk78,gUnknown_203B2B4->unkC8,0,gUnknown_203B2B4->unk108,gUnknown_203B2B4->unk74,2);
|
||||
break;
|
||||
case 0xe:
|
||||
HeldItemToSlot(&item, &gUnknown_203B2B4->unk14);
|
||||
sub_801B3C0(&item);
|
||||
break;
|
||||
case 8:
|
||||
gUnknown_203B2B4->unk8 = 2;
|
||||
sub_80141B4(gUnknown_80DD1C8,0,0,0x101);
|
||||
break;
|
||||
case 9:
|
||||
gUnknown_203B2B4->unk8 = 2;
|
||||
sub_80141B4(gUnknown_80DD1EC,0,0,0x101);
|
||||
break;
|
||||
case 10:
|
||||
gUnknown_203B2B4->unk8 = 2;
|
||||
sub_80141B4(gUnknown_80DD240,0,0,0x101);
|
||||
break;
|
||||
case 7:
|
||||
gUnknown_203B2B4->unk8 = 1;
|
||||
PlaySound(0xcf);
|
||||
sub_80141B4(gUnknown_80DD270,0,0,0x101);
|
||||
break;
|
||||
case 0xf:
|
||||
sub_809401C(gUnknown_203B2B4->moves,gUnknown_203B2B4->pokeStruct->moves);
|
||||
sub_801EE10(3,gUnknown_203B2B4->unkE,gUnknown_203B2B4->moves,0,0,0);
|
||||
break;
|
||||
case 0x10:
|
||||
sub_801F1B0(1,0);
|
||||
break;
|
||||
case 0x11:
|
||||
sub_8093560(gUnknown_203B2B4->unk20,gUnknown_203B2B4->moves,&gUnknown_203B2B4->unk68);
|
||||
sub_801F808(&gUnknown_203B2B4->unk68);
|
||||
break;
|
||||
case 0x12:
|
||||
sub_801602C(2,gUnknown_203B2B4->pokeStruct->name);
|
||||
break;
|
||||
case 0x13:
|
||||
break;
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
#include "sub_8095228.h"
|
||||
#include "item.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "rescue_password_menu.h"
|
||||
|
||||
extern struct TeamInventory *gTeamInventory_203B460;
|
||||
extern u8 *gUnknown_203B484;
|
||||
@ -447,44 +448,44 @@ void sub_8033DBC(void)
|
||||
switch(gUnknown_203B33C->unk528)
|
||||
{
|
||||
case 3:
|
||||
input_var = 0x1C;
|
||||
input_var = PASSWORD_ENTRY_SOS_MAIL_MODE;
|
||||
break;
|
||||
case 0x12:
|
||||
input_var = 0x1E;
|
||||
input_var = PASSWORD_ENTRY_AOK_MAIL_MODE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch(sub_8039068(input_var, gUnknown_203B33C->passwordBuffer, &temp))
|
||||
{
|
||||
case 17:
|
||||
case PASSWORD_ENTRY_INCORRECT_PASSWORD:
|
||||
sub_8014248(gUnknown_80E48A8, 0, 6, gUnknown_80E2290, 0, 4, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(0x1B);
|
||||
break;
|
||||
case 18:
|
||||
case PASSWORD_ENTRY_NOT_SOS_MAIL:
|
||||
sub_80141B4(gUnknown_80E48E8, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(8);
|
||||
break;
|
||||
case 7:
|
||||
case PASSWORD_ENTRY_DUPLICATE_SOS_MAIL:
|
||||
sub_80141B4(gUnknown_80E460C, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(8);
|
||||
break;
|
||||
case 22:
|
||||
case PASSWORD_ENTRY_SOS_MAIL_SUCCESS:
|
||||
sub_8095274(temp.unk10);
|
||||
temp.mailType = 2;
|
||||
sub_80951BC(&temp);
|
||||
sub_80141B4(gUnknown_80E4928, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(0x16);
|
||||
break;
|
||||
case 19:
|
||||
case PASSWORD_ENTRY_NOT_AOK_MAIL:
|
||||
sub_80141B4(gUnknown_80E4964, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(8);
|
||||
break;
|
||||
case 9:
|
||||
case PASSWORD_ENTRY_DUPLICATE_AOK_MAIL:
|
||||
sub_80141B4(gUnknown_80E499C, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(8);
|
||||
break;
|
||||
case 23:
|
||||
case PASSWORD_ENTRY_AOK_MAIL_SUCCESS:
|
||||
temp.mailType = 5;
|
||||
sub_80951FC(&temp);
|
||||
temp2 = sub_8095228(sub_809539C(1, temp.unk10));
|
||||
@ -1340,21 +1341,21 @@ void sub_8034D74(void)
|
||||
switch(return_var)
|
||||
{
|
||||
case 3:
|
||||
switch(sub_8039068(0x20, gUnknown_203B33C->passwordBuffer, &temp))
|
||||
switch(sub_8039068(PASSWORD_ENTRY_THANK_YOU_MAIL_MODE, gUnknown_203B33C->passwordBuffer, &temp))
|
||||
{
|
||||
case 17:
|
||||
case PASSWORD_ENTRY_INCORRECT_PASSWORD:
|
||||
sub_8014248(gUnknown_80E48A8, 0, 6, gUnknown_80E2440, 0, 4, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(0x74);
|
||||
break;
|
||||
case 20:
|
||||
case PASSWORD_ENTRY_NOT_THANK_YOU_MAIL:
|
||||
sub_80141B4(gUnknown_80E49C4, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(0x6B);
|
||||
break;
|
||||
case 11:
|
||||
case PASSWORD_ENTRY_DUPLICATE_THANK_YOU_MAIL:
|
||||
sub_80141B4(gUnknown_80E4704, 0, 0, 0x101);
|
||||
SetFriendRescueMenuState(0x6B);
|
||||
break;
|
||||
case 24:
|
||||
case PASSWORD_ENTRY_THANK_YOU_MAIL_SUCCESS:
|
||||
temp2 = sub_8095228(sub_809539C(4, temp.unk10));
|
||||
*temp2 = temp;
|
||||
temp2->mailType = 6;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "constants/item.h"
|
||||
#include "global.h"
|
||||
#include "input.h"
|
||||
#include "memory.h"
|
||||
@ -55,7 +56,6 @@ extern void sub_80073E0(u32);
|
||||
extern void sub_8012EA4(u32 *, u32);
|
||||
extern void xxx_call_draw_string(u32 x, u32 y, u8 *, u32, u32);
|
||||
|
||||
|
||||
extern void sub_801A9E0();
|
||||
extern void sub_801841C();
|
||||
extern void sub_801CCD8();
|
||||
@ -68,6 +68,12 @@ extern void sub_801C8C4(u32, u32, u32, u32);
|
||||
extern void sub_8012D60(u32 *, struct MenuItem *, u32, u16 *, u32, u32);
|
||||
extern void sub_801CB5C(u32);
|
||||
extern void sub_801A8D0(u32);
|
||||
extern u32 sub_801CFE0(u8);
|
||||
extern void sub_801CF94(void);
|
||||
extern void sub_801AE84(void);
|
||||
extern s32 sub_801AED0(s32);
|
||||
extern u8 sub_801CF14(u32);
|
||||
extern u8 sub_801CF50(u32);
|
||||
|
||||
extern struct UnkTextStruct2 gUnknown_80DB7B8;
|
||||
extern struct UnkTextStruct2 gUnknown_80DB7E8;
|
||||
@ -75,6 +81,210 @@ extern struct UnkTextStruct2 gUnknown_80DB7D0;
|
||||
extern struct UnkTextStruct2 gUnknown_80DB800;
|
||||
extern struct UnkTextStruct2 gUnknown_80DB818;
|
||||
extern u8 gUnknown_80DB830[];
|
||||
extern u8 *gUnknown_80D4920[];
|
||||
extern u8 *gUnknown_80D4928[];
|
||||
|
||||
struct HeldItem_Alt {
|
||||
union tempHeld
|
||||
{
|
||||
struct HeldItem norm;
|
||||
u32 full_bits;
|
||||
} temp;
|
||||
};
|
||||
|
||||
void sub_80177F8(void)
|
||||
{
|
||||
struct unkStruct_203B208 *preload;
|
||||
u8 *nullText;
|
||||
u32 defaultAction;
|
||||
|
||||
preload = gUnknown_203B208;
|
||||
nullText = NULL;
|
||||
preload->unk24[0].text = *gUnknown_80D4920;
|
||||
preload->unk24[0].menuAction = 4;
|
||||
defaultAction = 1;
|
||||
preload->unk24[1].text = *gUnknown_80D4928;
|
||||
preload->unk24[1].menuAction = 5;
|
||||
preload->unk24[2].text = nullText;
|
||||
preload->unk24[2].menuAction = defaultAction;
|
||||
}
|
||||
|
||||
void sub_8017828(void)
|
||||
{
|
||||
s32 local_8;
|
||||
|
||||
if (sub_80144A4(&local_8) == 0) {
|
||||
if (local_8 != 1) {
|
||||
gUnknown_203B208->unk18 = local_8;
|
||||
}
|
||||
switch(local_8)
|
||||
{
|
||||
case 2:
|
||||
if (GetNumberOfFilledInventorySlots() == 0) {
|
||||
UpdateKangaskhanStorageState(5);
|
||||
}
|
||||
else {
|
||||
if (sub_801CF50(0) != 0) {
|
||||
UpdateKangaskhanStorageState(8);
|
||||
}
|
||||
else {
|
||||
UpdateKangaskhanStorageState(0xb);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (sub_801CF14(1) != 0) {
|
||||
UpdateKangaskhanStorageState(7);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetNumberOfFilledInventorySlots() >= INVENTORY_SIZE) {
|
||||
UpdateKangaskhanStorageState(6);
|
||||
}
|
||||
else {
|
||||
UpdateKangaskhanStorageState(0x14);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
UpdateKangaskhanStorageState(2);
|
||||
break;
|
||||
case 1:
|
||||
UpdateKangaskhanStorageState(3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80178D0(void)
|
||||
{
|
||||
s32 local_18;
|
||||
|
||||
if (sub_80144A4(&local_18) == 0) {
|
||||
switch(local_18)
|
||||
{
|
||||
case 4:
|
||||
MoveToStorage(&gUnknown_203B208->unkC);
|
||||
ShiftItemsDownFrom(gUnknown_203B208->unk10);
|
||||
FillInventoryGaps();
|
||||
UpdateKangaskhanStorageState(0x13);
|
||||
break;
|
||||
case 1:
|
||||
case 5:
|
||||
UpdateKangaskhanStorageState(0xe);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8017928(void)
|
||||
{
|
||||
int local_c;
|
||||
u32 itemindex;
|
||||
u32 numItems;
|
||||
struct HeldItem_Alt local_8;
|
||||
|
||||
if (sub_80144A4(&local_c) == 0) {
|
||||
switch(local_c)
|
||||
{
|
||||
case 4:
|
||||
|
||||
gTeamInventory_203B460->teamStorage[gUnknown_203B208->unkC.itemIndex] -= gUnknown_203B208->unkC.numItems;
|
||||
|
||||
itemindex = gUnknown_203B208->unkC.itemIndex;
|
||||
local_8.temp.full_bits = (local_8.temp.full_bits & 0xffffff00) | itemindex;
|
||||
|
||||
numItems = gUnknown_203B208->unkC.numItems << 8;
|
||||
local_8.temp.full_bits = (local_8.temp.full_bits & 0xffff00ff) | numItems;
|
||||
|
||||
AddHeldItemToInventory((struct HeldItem *)&local_8);
|
||||
UpdateKangaskhanStorageState(0x1d);
|
||||
break;
|
||||
case 1:
|
||||
case 5:
|
||||
UpdateKangaskhanStorageState(0x17);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80179A8(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
s32 local_18;
|
||||
|
||||
if (sub_80144A4(&local_18) == 0) {
|
||||
switch(local_18)
|
||||
{
|
||||
case 4:
|
||||
for(iVar1 = 0; iVar1 < INVENTORY_SIZE; iVar1++)
|
||||
{
|
||||
if (sub_801AED0(iVar1) != 0) {
|
||||
MoveToStorage(&gTeamInventory_203B460->teamItems[iVar1]);
|
||||
gTeamInventory_203B460->teamItems[iVar1].itemIndex = 0;
|
||||
gTeamInventory_203B460->teamItems[iVar1].itemFlags = 0;
|
||||
}
|
||||
}
|
||||
FillInventoryGaps();
|
||||
sub_801AE84();
|
||||
UpdateKangaskhanStorageState(0x13);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 5:
|
||||
UpdateKangaskhanStorageState(0xe);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8017A1C(void)
|
||||
{
|
||||
u8 iVar2_u8;
|
||||
u32 uVar4;
|
||||
s32 itemID;
|
||||
int local_18;
|
||||
u16 cast;
|
||||
struct HeldItem_Alt local_14;
|
||||
|
||||
if (sub_80144A4(&local_18) == 0) {
|
||||
|
||||
switch(local_18)
|
||||
{
|
||||
case 4:
|
||||
for(itemID = 0; itemID < NUMBER_OF_ITEM_IDS; itemID++)
|
||||
{
|
||||
iVar2_u8 = itemID;
|
||||
if (sub_801CFE0(itemID) != 0) {
|
||||
local_14.temp.full_bits = (local_14.temp.full_bits & 0xffffff00) | iVar2_u8;
|
||||
if (IsThrowableItem(local_14.temp.norm.itemIndex)) {
|
||||
uVar4 = gTeamInventory_203B460->teamStorage[local_14.temp.norm.itemIndex];
|
||||
if (uVar4 > 99) {
|
||||
local_14.temp.full_bits = (local_14.temp.full_bits & 0xffff00ff) | 0x6300;
|
||||
}
|
||||
else {
|
||||
cast = uVar4 << 8;
|
||||
local_14.temp.full_bits = (local_14.temp.full_bits & 0xffff00ff) | cast;
|
||||
}
|
||||
}
|
||||
else {
|
||||
local_14.temp.full_bits = (local_14.temp.full_bits & 0xffff00ff) | 0x100;
|
||||
}
|
||||
gTeamInventory_203B460->teamStorage[local_14.temp.norm.itemIndex] -= local_14.temp.norm.numItems;
|
||||
AddHeldItemToInventory((struct HeldItem *)&local_14);
|
||||
}
|
||||
}
|
||||
FillInventoryGaps();
|
||||
sub_801CF94();
|
||||
UpdateKangaskhanStorageState(0x1d);
|
||||
break;
|
||||
case 1:
|
||||
case 5:
|
||||
UpdateKangaskhanStorageState(0x17);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8017AF8(void)
|
||||
{
|
||||
|
@ -19,6 +19,14 @@ extern u8 gUnknown_80DB92C[];
|
||||
extern u8 gUnknown_80DB934[];
|
||||
extern u8 *gUnknown_80D4920[];
|
||||
extern u8 *gUnknown_80D4928[];
|
||||
extern u8 gUnknown_80DB9A8[];
|
||||
extern u8 gUnknown_80DB9B0[];
|
||||
extern u8 gTeamToolboxA[];
|
||||
extern u8 gTeamToolboxB[];
|
||||
extern u8 gUnknown_80DB9A0[];
|
||||
extern u8 gUnknown_202DE58[];
|
||||
extern u8 gUnknown_80DB994[];
|
||||
|
||||
|
||||
extern s32 sub_80144A4(s32 *);
|
||||
void UpdateKecleonStoreState(u32);
|
||||
@ -39,13 +47,18 @@ extern void sub_80073B8(u32);
|
||||
extern void sub_80073E0(u32);
|
||||
extern s32 sub_8013800(void *, u32);
|
||||
extern void xxx_call_draw_string(s32 x, s32, u8 *, u32, u32);
|
||||
extern void sub_8012BC4(s32, s32, s32, s32, s32, s32);
|
||||
extern void xxx_format_and_draw(u32, u32, u8 *, u32, u32);
|
||||
extern s32 sub_801AED0(s32);
|
||||
void sub_8007B7C(s32, s32, s32, s32, s32);
|
||||
extern void sub_801AE84(void);
|
||||
extern void sub_8012D08(void *, u32);
|
||||
extern void sub_801A998(void);
|
||||
extern void sub_801A9E0(void);
|
||||
extern void sub_801AEF8(void);
|
||||
extern bool8 sub_801ADA0(u32);
|
||||
extern u32 sub_801AEA8(void);
|
||||
extern void Kecleon_SortItems(void);
|
||||
extern bool8 sub_801ADA0(s32);
|
||||
extern s32 sub_801AEA8(void);
|
||||
s32 sub_801AE24(u32);
|
||||
|
||||
|
||||
extern struct unkStruct_203B224 *gUnknown_203B224;
|
||||
@ -1045,7 +1058,7 @@ u32 sub_801A6E8(u8 param_1)
|
||||
case 3:
|
||||
if (gUnknown_203B224->unk0 != 2) {
|
||||
PlayMenuSoundEffect(5);
|
||||
sub_801AEF8();
|
||||
Kecleon_SortItems();
|
||||
sub_801A9E0();
|
||||
}
|
||||
// NOTE: fallthrough needed here
|
||||
@ -1110,3 +1123,252 @@ void sub_801A998(void)
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B224->unk90, 1, 1);
|
||||
}
|
||||
|
||||
void sub_801A9E0(void)
|
||||
{
|
||||
s32 teamItemIndex;
|
||||
s32 r7;
|
||||
s32 x;
|
||||
char buffer1 [0x50]; // sp 0x4
|
||||
struct unkStruct_8090F58 stack; // sp 0x54
|
||||
struct unkStruct_8090F58 stack1; // sp 0x60
|
||||
struct unkStruct_8090F58 stack2; // sp 0x6C
|
||||
struct unkStruct_8090F58 stack3; // sp 0x78
|
||||
// NOTE: this var is unused but makes sure we get correct stack size
|
||||
// This is also why we need special build flag for this file
|
||||
u8 local_6c[0x44]; // sp 0x78 ?? (why is this at same location..)
|
||||
struct ItemSlot item; // sp 0xC8
|
||||
|
||||
sub_8008C54(gUnknown_203B224->unk88);
|
||||
sub_80073B8(gUnknown_203B224->unk88);
|
||||
x = gUnknown_203B224->unk72 * 8 + 10;
|
||||
if (gUnknown_203B224->unk72 == 0) {
|
||||
xxx_call_draw_string(x,0,gTeamToolboxA,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
else {
|
||||
xxx_call_draw_string(x,0,gTeamToolboxB,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
for(r7 = 0; r7 < gUnknown_203B224->unk6E; r7++)
|
||||
{
|
||||
teamItemIndex = (gUnknown_203B224->unk72 * gUnknown_203B224->unk70) + r7;
|
||||
item = gTeamInventory_203B460->teamItems[teamItemIndex];
|
||||
switch(gUnknown_203B224->unk0) {
|
||||
case 0:
|
||||
sub_8090E14(buffer1,&item,0);
|
||||
xxx_call_draw_string(8,sub_8013800(&gUnknown_203B224->unk54,r7),buffer1,gUnknown_203B224->unk88,0);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
stack.unk0 = 0;
|
||||
stack.unk4 = 0;
|
||||
stack.unk8 = 1;
|
||||
item.itemFlags = 1;
|
||||
sub_8090E14(buffer1,&item, &stack);
|
||||
xxx_call_draw_string(8,sub_8013800(&gUnknown_203B224->unk54,r7),buffer1,gUnknown_203B224->unk88,0);
|
||||
break;
|
||||
case 3:
|
||||
stack1.unk0 = 0;
|
||||
stack1.unk4 = 0;
|
||||
stack1.unk8 = 1;
|
||||
item.itemFlags = 1;
|
||||
sub_8090E14(buffer1,&item,&stack1);
|
||||
if (gUnknown_203B224->unk4[teamItemIndex] != 0 || sub_801ADA0(teamItemIndex) != '\0'){
|
||||
xxx_call_draw_string(8,sub_8013800(&gUnknown_203B224->unk54,r7),buffer1,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(gUnknown_202DE58,buffer1,0x50);
|
||||
xxx_format_and_draw(8,sub_8013800(&gUnknown_203B224->unk54,r7),gUnknown_80DB994,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (CanSellItem(item.itemIndex)) {
|
||||
stack2.unk0 = 3;
|
||||
stack2.unk4 = 0;
|
||||
stack2.unk6 = 0x58;
|
||||
stack2.unk8 = 1;
|
||||
item.itemFlags = 3;
|
||||
sub_8090E14(buffer1,&item, &stack2);
|
||||
if (GetStackSellPrice(&item) + gTeamInventory_203B460->teamMoney > 99999){
|
||||
// very dumb but this matches...
|
||||
sprintf_2((char *)&stack3,gUnknown_80DB9A0,buffer1);
|
||||
xxx_call_draw_string(8,sub_8013800(&gUnknown_203B224->unk54,r7),(u8 *)&stack3,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
else
|
||||
xxx_call_draw_string(8,sub_8013800(&gUnknown_203B224->unk54,r7),buffer1,gUnknown_203B224->unk88,0);;
|
||||
}
|
||||
else {
|
||||
sub_8090E14(buffer1,&item, 0);
|
||||
strncpy(gUnknown_202DE58,buffer1,0x50);
|
||||
xxx_format_and_draw(8,sub_8013800(&gUnknown_203B224->unk54,r7),gUnknown_80DB994,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
stack3.unk0 = 0;
|
||||
stack3.unk4 = 0;
|
||||
stack3.unk8 = 1;
|
||||
item.itemFlags = 1;
|
||||
sub_8090E14(buffer1,&item,&stack3);
|
||||
if (IsGummiItem(item.itemIndex)) {
|
||||
xxx_call_draw_string(8,sub_8013800(&gUnknown_203B224->unk54,r7),buffer1,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(gUnknown_202DE58,buffer1,0x50);
|
||||
xxx_format_and_draw(8,sub_8013800(&gUnknown_203B224->unk54,r7),gUnknown_80DB994,gUnknown_203B224->unk88,0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ((sub_801AED0(teamItemIndex) & 1) != 0) {
|
||||
sub_8007B7C(gUnknown_203B224->unk88,8,sub_8013800(&gUnknown_203B224->unk54,r7),(gUnknown_203B224->unk8C->unk0c - 2) * 8,10);
|
||||
}
|
||||
}
|
||||
sub_80073E0(gUnknown_203B224->unk88);
|
||||
}
|
||||
|
||||
|
||||
void sub_801AD34(u32 param_1)
|
||||
{
|
||||
sub_8008C54(param_1);
|
||||
sub_80073B8(param_1);
|
||||
xxx_call_draw_string(6,0,gUnknown_80DB9A8,param_1,0);
|
||||
sub_8012BC4(0x12,0xd,GetNumberOfFilledInventorySlots(),2,7,param_1);
|
||||
xxx_call_draw_string(0x16,0xd,gUnknown_80DB9B0,param_1,0);
|
||||
sub_8012BC4(0x2b,0xd,INVENTORY_SIZE,2,7,param_1);
|
||||
sub_80073E0(param_1);
|
||||
}
|
||||
|
||||
bool8 sub_801ADA0(s32 param_1)
|
||||
{
|
||||
u16 uVar2;
|
||||
u32 uVar2_32;
|
||||
|
||||
u16 uVar3;
|
||||
u32 uVar3_32;
|
||||
s32 sum1;
|
||||
s32 sum2;
|
||||
struct ItemSlot item;
|
||||
|
||||
item = gTeamInventory_203B460->teamItems[param_1];
|
||||
if (!IsNotMoneyOrUsedTMItem(item.itemIndex)) {
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsThrowableItem(item.itemIndex)) {
|
||||
uVar3_32 = sub_801AE24(item.itemIndex);
|
||||
sum1 = gTeamInventory_203B460->teamStorage[item.itemIndex];
|
||||
uVar3 = uVar3_32;
|
||||
sum1 += uVar3;
|
||||
sum1 += (item.numItems);
|
||||
if (sum1 > 999)
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
uVar2_32 = sub_801AE24(item.itemIndex);
|
||||
sum2 = gTeamInventory_203B460->teamStorage[item.itemIndex];
|
||||
uVar2 = uVar2_32;
|
||||
sum2 += uVar2;
|
||||
if (sum2 > 998)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 sub_801AE24(u32 itemIndex)
|
||||
{
|
||||
struct ItemSlot uVar3;
|
||||
u16 uVar4;
|
||||
s32 invIndex;
|
||||
|
||||
uVar4 = 0;
|
||||
for (invIndex = 0; invIndex < GetNumberOfFilledInventorySlots(); invIndex++) {
|
||||
if (gUnknown_203B224->unk4[invIndex] != 0) {
|
||||
uVar3 = gTeamInventory_203B460->teamItems[invIndex];
|
||||
if (uVar3.itemIndex == itemIndex) {
|
||||
if (IsThrowableItem(uVar3.itemIndex)) {
|
||||
uVar4 += uVar3.numItems;
|
||||
}
|
||||
else {
|
||||
uVar4++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return uVar4;
|
||||
}
|
||||
|
||||
void sub_801AE84(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
|
||||
for(iVar1 = 0; iVar1 < INVENTORY_SIZE; iVar1++)
|
||||
{
|
||||
gUnknown_203B224->unk4[iVar1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
s32 sub_801AEA8(void)
|
||||
{
|
||||
s32 index;
|
||||
s32 iVar3;
|
||||
|
||||
iVar3 = 0;
|
||||
for(index = 0; index < 0x14; index++)
|
||||
{
|
||||
if (gUnknown_203B224->unk4[index] != 0) {
|
||||
iVar3++;
|
||||
}
|
||||
}
|
||||
return iVar3;
|
||||
}
|
||||
|
||||
s32 sub_801AED0(s32 index)
|
||||
{
|
||||
return gUnknown_203B224->unk4[index];
|
||||
}
|
||||
|
||||
void sub_801AEE4(s32 index, s32 value)
|
||||
{
|
||||
gUnknown_203B224->unk4[index] = value ;
|
||||
}
|
||||
|
||||
void Kecleon_SortItems(void)
|
||||
{
|
||||
struct ItemSlot *puVar1;
|
||||
u32 *puVar2;
|
||||
u32 *base;
|
||||
int orderL;
|
||||
int orderR;
|
||||
u32 puVar4;
|
||||
struct ItemSlot uVar5;
|
||||
int itemR;
|
||||
int itemL;
|
||||
|
||||
for (itemL = 0; itemL < GetNumberOfFilledInventorySlots() - 1; itemL++) {
|
||||
for (itemR = itemL + 1; itemR < GetNumberOfFilledInventorySlots(); itemR++) {
|
||||
orderL = GetItemOrder(gTeamInventory_203B460->teamItems[itemL].itemIndex);
|
||||
orderR = GetItemOrder(gTeamInventory_203B460->teamItems[itemR].itemIndex);
|
||||
if ((orderL > orderR) || ((orderL == orderR) &&
|
||||
(gTeamInventory_203B460->teamItems[itemL].numItems < gTeamInventory_203B460->teamItems[itemR].numItems))) {
|
||||
|
||||
uVar5 = gTeamInventory_203B460->teamItems[itemL];
|
||||
puVar1 = &gTeamInventory_203B460->teamItems[itemR];
|
||||
gTeamInventory_203B460->teamItems[itemL] = *puVar1;
|
||||
*puVar1 = uVar5;
|
||||
|
||||
base = gUnknown_203B224->unk4;
|
||||
puVar4 = gUnknown_203B224->unk4[itemL];
|
||||
puVar2 = &base[itemR];
|
||||
base[itemL] = *puVar2;
|
||||
*puVar2 = puVar4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct unkStruct_203B224 * sub_801AF98(void)
|
||||
{
|
||||
return gUnknown_203B224;
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "file_system.h"
|
||||
#include "memory.h"
|
||||
#include "pokemon.h"
|
||||
#include "input.h"
|
||||
#include "item.h"
|
||||
#include "kecleon_items.h"
|
||||
#include "team_inventory.h"
|
||||
|
||||
extern struct unkStruct_203B224 *gUnknown_203B224;
|
||||
|
||||
struct unkStruct_203B224 * sub_801AF98(void)
|
||||
{
|
||||
return gUnknown_203B224;
|
||||
}
|
@ -96,7 +96,7 @@ extern void UpdateLuminousCaveDialogue(void);
|
||||
extern void sub_80141B4(const char *r0, u32, struct OpenedFile **r1, u32);
|
||||
extern void sub_8014248(const char *r0, u32, u32, struct MenuItem *r4, u16 *, u32, u32, struct OpenedFile **r5, u32);
|
||||
void xxx_call_fade_out_bgm(u16 speed);
|
||||
void sub_801199C(u16 songIndex);
|
||||
void xxx_call_stop_fanfare_se(u16 songIndex);
|
||||
void xxx_call_fade_in_new_bgm(u16 songIndex, u16 speed);
|
||||
void sub_80977D0(void);
|
||||
void PlaySound(u32);
|
||||
@ -397,7 +397,7 @@ void UpdateLuminousCaveDialogue(void)
|
||||
ClearItemSlotAt(gUnknown_203B2B0->evoItem2_InvIndex);
|
||||
}
|
||||
FillInventoryGaps();
|
||||
sub_801199C(0x1ff);
|
||||
xxx_call_stop_fanfare_se(0x1ff);
|
||||
PlaySound(0xd2);
|
||||
if (gUnknown_203B2B0->pokeRenamed) {
|
||||
BoundedCopyStringtoBuffer(gUnknown_203B2B0->pokeStruct->name,GetMonSpecies(gUnknown_203B2B0->pokeStruct->speciesNum),POKEMON_NAME_LENGTH);
|
||||
|
1184
src/music.c
1184
src/music.c
File diff suppressed because it is too large
Load Diff
1000
src/music_pre.c
1000
src/music_pre.c
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "file_system.h"
|
||||
#include "input.h"
|
||||
#include "constants/mailbox.h"
|
||||
#include "menu.h"
|
||||
#include "memory.h"
|
||||
#include "text.h"
|
||||
@ -185,7 +186,7 @@ extern void DisplayMissionObjectives();
|
||||
extern u8 *GetCurrentMissionText(s16 r0);
|
||||
extern u8 *sub_80975DC(u32 r0);
|
||||
extern u8 sub_8099360(u8 *);
|
||||
extern u8 sub_8099394(u8 *);
|
||||
extern u8 sub_8099394(volatile u8 *);
|
||||
extern struct WonderMail *GetJobSlotInfo(u8);
|
||||
extern void xxx_call_draw_string(s32 x, u32 y, const u8 *, u32 , u32);
|
||||
extern void sub_80073B8(u32);
|
||||
@ -208,7 +209,7 @@ extern void ReturntoGoRescueMenu();
|
||||
extern void HandlePostOfficeHelpGetHelpMenuSelection();
|
||||
extern void ReturnToGetHelpMenu();
|
||||
extern s32 sub_80144A4(s32 *);
|
||||
extern s32 sub_80969D0(u8);
|
||||
extern s32 CountJobsinDungeon(u8);
|
||||
extern void sub_8012D08(struct UnkTextStruct2 *, s32);
|
||||
|
||||
|
||||
@ -582,7 +583,7 @@ void sub_8031A84(void)
|
||||
sub_8006518(gUnknown_203B330->unk18);
|
||||
gUnknown_203B330->unk18[gUnknown_203B330->unk10] = gUnknown_80E1F18;
|
||||
if (gUnknown_203B330->unkC == 2) {
|
||||
iVar1 = sub_80969D0(gUnknown_203B330->dungeonIndex);
|
||||
iVar1 = CountJobsinDungeon(gUnknown_203B330->dungeonIndex);
|
||||
if (iVar1 == 0) {
|
||||
iVar1 = 1;
|
||||
}
|
||||
@ -599,7 +600,7 @@ void DisplayMissionObjectives(void)
|
||||
struct unkStruct_8095228 *iVar8;
|
||||
struct WonderMail *jobInfo;
|
||||
u8 auStack248 [100];
|
||||
u8 local_94 [4];
|
||||
volatile u8 local_94;
|
||||
u8 auStack144 [100];
|
||||
short auStack44;
|
||||
short local_2a;
|
||||
@ -611,18 +612,18 @@ void DisplayMissionObjectives(void)
|
||||
switch(gUnknown_203B330->unkC)
|
||||
{
|
||||
case 1:
|
||||
sub_8099394(local_94);
|
||||
iVar8 = sub_8095228(local_94[0]);
|
||||
sub_8099394(&local_94);
|
||||
iVar8 = sub_8095228(local_94);
|
||||
sub_803B6B0(10,16,3,gUnknown_203B330->unk10);
|
||||
// %dF
|
||||
sprintf_2(auStack248,gUnknown_80E1F3C,iVar8->floor);
|
||||
sprintf_2(auStack248,gUnknown_80E1F3C,iVar8->dungeon.dungeonFloor);
|
||||
xxx_call_draw_string(0x15,16,auStack248,gUnknown_203B330->unk10,0);
|
||||
// Rescue #C6%s#R
|
||||
sprintf_2(auStack248,gUnknown_80E1F40,GetMonSpecies(iVar8->clientSpecies));
|
||||
xxx_call_draw_string(0x28,16,auStack248,gUnknown_203B330->unk10,0);
|
||||
break;
|
||||
case 2:
|
||||
if (sub_80969D0(gUnknown_203B330->dungeonIndex) == 0) {
|
||||
if (CountJobsinDungeon(gUnknown_203B330->dungeonIndex) == 0) {
|
||||
// Just go!
|
||||
xxx_call_draw_string(10,16,gUnknown_80E1F54,gUnknown_203B330->unk10,0);
|
||||
}
|
||||
@ -631,7 +632,7 @@ void DisplayMissionObjectives(void)
|
||||
yCoord = 16;
|
||||
|
||||
// 8 Job Slots... check each of them
|
||||
for(jobSlotIdx = 0; jobSlotIdx < 8; jobSlotIdx++)
|
||||
for(jobSlotIdx = 0; jobSlotIdx < MAX_ACCEPTED_JOBS; jobSlotIdx++)
|
||||
{
|
||||
jobInfo = GetJobSlotInfo(jobSlotIdx);
|
||||
if ((((jobInfo->dungeon == gUnknown_203B330->dungeonIndex) && (jobInfo->mailType != 0)
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "code_8094F88.h"
|
||||
#include "wonder_mail.h"
|
||||
|
||||
extern u8 gUnknown_202EC50[];
|
||||
extern u8 gRescuePasswordBuffer[];
|
||||
extern u32 gUnknown_202EC4C;
|
||||
extern struct unkStruct_203B484 *gUnknown_203B484;
|
||||
extern struct UnkTextStruct2 gUnknown_80E71E4;
|
||||
@ -28,10 +28,10 @@ extern u32 ConvertMenutoRescuePasswordState(u32);
|
||||
extern void sub_8039174(void);
|
||||
extern void sub_80155F0(void);
|
||||
extern void sub_8031E10(void);
|
||||
extern void sub_8038F98(void);
|
||||
extern void DisplayPasswordAcceptScreen(void);
|
||||
|
||||
|
||||
extern u32 sub_8039068(u32, u8 *r1, struct unkStruct_8095228 *r0);
|
||||
extern u32 sub_8039068(u32, u8 *passwordBuffer, struct unkStruct_8095228 *r0);
|
||||
|
||||
extern void sub_80951BC(struct unkStruct_8095228 *r0);
|
||||
extern void sub_80951FC(struct unkStruct_8095228 *r0);
|
||||
@ -43,7 +43,7 @@ extern void sub_8095274(u32);
|
||||
extern u32 sub_8031DCC(void);
|
||||
extern void sub_80391F8(void);
|
||||
extern void sub_8031E00();
|
||||
extern void sub_8038DC0(u32);
|
||||
extern void DisplayRescuePasswordError(u32);
|
||||
extern struct MainMenu *GetMainMenu(void);
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ void CreateRescuePasswordMenu(u32 currMenu)
|
||||
if ((gUnknown_203B368 != 0) || (gUnknown_203B36C != currMenu)) {
|
||||
for(counter = 0; counter < 0x36; counter++)
|
||||
{
|
||||
gUnknown_202EC50[counter] = 0;
|
||||
gRescuePasswordBuffer[counter] = 0;
|
||||
}
|
||||
gUnknown_203B368 = 0;
|
||||
}
|
||||
@ -117,7 +117,7 @@ void CreateRescuePasswordMenu(u32 currMenu)
|
||||
case 0x1C:
|
||||
case 0x1E:
|
||||
case 0x20:
|
||||
sub_80151C0(4, gUnknown_202EC50);
|
||||
sub_80151C0(4, gRescuePasswordBuffer);
|
||||
break;
|
||||
case MENU_DISPLAY_RESCUE_PASSWORD:
|
||||
temp = sub_8095228(0x1F);
|
||||
@ -127,7 +127,7 @@ void CreateRescuePasswordMenu(u32 currMenu)
|
||||
sub_8031D70(0x1F, 0);
|
||||
break;
|
||||
case MENU_RESCUE_PASSWORD_ENTRY:
|
||||
sub_80151C0(4, gUnknown_202EC50);
|
||||
sub_80151C0(4, gRescuePasswordBuffer);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -198,53 +198,53 @@ s32 UpdateRescuePasswordMenu(void)
|
||||
nextMenu = MENU_FRIEND_RESCUE;
|
||||
break;
|
||||
case 3:
|
||||
switch(sub_8039068(gRescuePasswordMenu->currMenu, gUnknown_202EC50, &local_44)) {
|
||||
case 0x11:
|
||||
nextMenu = 0x11;
|
||||
sub_8038DC0(nextMenu);
|
||||
switch(sub_8039068(gRescuePasswordMenu->currMenu, gRescuePasswordBuffer, &local_44)) {
|
||||
case PASSWORD_ENTRY_INCORRECT_PASSWORD:
|
||||
nextMenu = PASSWORD_ENTRY_INCORRECT_PASSWORD;
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 0xd:
|
||||
nextMenu = 0xD;
|
||||
sub_8038DC0(nextMenu);
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 0x12:
|
||||
nextMenu = 0x12;
|
||||
sub_8038DC0(nextMenu);
|
||||
case PASSWORD_ENTRY_NOT_SOS_MAIL:
|
||||
nextMenu = PASSWORD_ENTRY_NOT_SOS_MAIL;
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 7:
|
||||
nextMenu = 7;
|
||||
sub_8038DC0(nextMenu);
|
||||
case PASSWORD_ENTRY_DUPLICATE_SOS_MAIL:
|
||||
nextMenu = PASSWORD_ENTRY_DUPLICATE_SOS_MAIL;
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 0x16:
|
||||
case PASSWORD_ENTRY_SOS_MAIL_SUCCESS:
|
||||
sub_8095274(local_44.unk10);
|
||||
sub_8038F98();
|
||||
DisplayPasswordAcceptScreen();
|
||||
gRescuePasswordMenu->state = 9;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
local_44.mailType = 2;
|
||||
sub_80951BC(&local_44);
|
||||
break;
|
||||
case 0x13:
|
||||
nextMenu = 0x13;
|
||||
sub_8038DC0(nextMenu);
|
||||
case PASSWORD_ENTRY_NOT_AOK_MAIL:
|
||||
nextMenu = PASSWORD_ENTRY_NOT_AOK_MAIL;
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 9:
|
||||
nextMenu = 0x9;
|
||||
sub_8038DC0(nextMenu);
|
||||
case PASSWORD_ENTRY_DUPLICATE_AOK_MAIL:
|
||||
nextMenu = PASSWORD_ENTRY_DUPLICATE_AOK_MAIL;
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 0x17:
|
||||
sub_8038F98();
|
||||
case PASSWORD_ENTRY_AOK_MAIL_SUCCESS:
|
||||
DisplayPasswordAcceptScreen();
|
||||
gRescuePasswordMenu->state = 9;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
local_44.mailType = 5;
|
||||
@ -253,22 +253,20 @@ s32 UpdateRescuePasswordMenu(void)
|
||||
puVar5->mailType = 7;
|
||||
MemoryFill8((u8 *)&gUnknown_203B484, 0, sizeof(struct unkStruct_203B484));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case 0x14:
|
||||
nextMenu = 0x14;
|
||||
sub_8038DC0(nextMenu);
|
||||
case PASSWORD_ENTRY_NOT_THANK_YOU_MAIL:
|
||||
nextMenu = PASSWORD_ENTRY_NOT_THANK_YOU_MAIL;
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 0xb:
|
||||
nextMenu = 0xb;
|
||||
sub_8038DC0(nextMenu);
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
case 0x18:
|
||||
sub_8038F98();
|
||||
case PASSWORD_ENTRY_THANK_YOU_MAIL_SUCCESS:
|
||||
DisplayPasswordAcceptScreen();
|
||||
gRescuePasswordMenu->state = 9;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
puVar6 = sub_8095228(sub_809539C(4, local_44.unk10));
|
||||
@ -291,7 +289,7 @@ s32 UpdateRescuePasswordMenu(void)
|
||||
{
|
||||
case 3:
|
||||
nextMenu = 0x15;
|
||||
sub_8038DC0(nextMenu);
|
||||
DisplayRescuePasswordError(nextMenu);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
nextMenu = MENU_NO_SCREEN_CHANGE;
|
||||
break;
|
||||
@ -323,7 +321,7 @@ s32 UpdateRescuePasswordMenu(void)
|
||||
sub_8039174();
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(0,1,1);
|
||||
sub_80151C0(4,gUnknown_202EC50);
|
||||
sub_80151C0(4,gRescuePasswordBuffer);
|
||||
gRescuePasswordMenu->state = 8;
|
||||
subtract = gRescuePasswordMenu->currMenu - 0x21;
|
||||
nextMenu = MENU_FRIEND_RESCUE;
|
||||
@ -351,7 +349,7 @@ s32 UpdateRescuePasswordMenu(void)
|
||||
sub_8039174();
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(0,1,1);
|
||||
sub_80151C0(4,gUnknown_202EC50);
|
||||
sub_80151C0(4,gRescuePasswordBuffer);
|
||||
gRescuePasswordMenu->state = ConvertMenutoRescuePasswordState(gRescuePasswordMenu->currMenu);
|
||||
subtract = gRescuePasswordMenu->currMenu - 0x21;
|
||||
nextMenu = 0x2a;
|
||||
@ -369,35 +367,35 @@ s32 UpdateRescuePasswordMenu(void)
|
||||
return nextMenu;
|
||||
}
|
||||
|
||||
void sub_8038DC0(u32 param_1)
|
||||
void DisplayRescuePasswordError(u32 passwordError)
|
||||
{
|
||||
sub_8006518(gRescuePasswordMenu->unk1A8);
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(0,1,1);
|
||||
sub_80155F0();
|
||||
switch(param_1) {
|
||||
case 0x11:
|
||||
switch(passwordError) {
|
||||
case PASSWORD_ENTRY_INCORRECT_PASSWORD:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E71FC,gUnknown_80E7214,0,0xd,0);
|
||||
break;
|
||||
case 0x12:
|
||||
case PASSWORD_ENTRY_NOT_SOS_MAIL:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E72EC,gUnknown_80E7304,0,0xd,0);
|
||||
break;
|
||||
case 7:
|
||||
case PASSWORD_ENTRY_DUPLICATE_SOS_MAIL:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7344,gUnknown_80E735C,0,0xd,0);
|
||||
break;
|
||||
case 0xd:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7588,gUnknown_80E75A0,0,0xd,0);
|
||||
break;
|
||||
case 0x13:
|
||||
case PASSWORD_ENTRY_NOT_AOK_MAIL:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E73AC,gUnknown_80E73C4,0,0xd,0);
|
||||
break;
|
||||
case 9:
|
||||
case PASSWORD_ENTRY_DUPLICATE_AOK_MAIL:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7408,gUnknown_80E7420,0,0xd,0);
|
||||
break;
|
||||
case 0x14:
|
||||
case PASSWORD_ENTRY_NOT_THANK_YOU_MAIL:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7468,gUnknown_80E7480,0,0xd,0);
|
||||
break;
|
||||
case 0xb:
|
||||
case PASSWORD_ENTRY_DUPLICATE_THANK_YOU_MAIL:
|
||||
SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E74C8,gUnknown_80E74E0,0,0xd,0);
|
||||
break;
|
||||
case 0x15:
|
||||
@ -409,7 +407,7 @@ void sub_8038DC0(u32 param_1)
|
||||
sub_8035CF4(&gRescuePasswordMenu->unk8,0,1);
|
||||
}
|
||||
|
||||
void sub_8038F98(void)
|
||||
void DisplayPasswordAcceptScreen(void)
|
||||
{
|
||||
sub_8006518(gRescuePasswordMenu->unk1A8);
|
||||
ResetUnusedInputStruct();
|
||||
@ -453,51 +451,51 @@ u32 ConvertMenutoRescuePasswordState(u32 unused)
|
||||
return uVar1;
|
||||
}
|
||||
|
||||
u32 sub_8039068(u32 param_1, u8 *param_2,struct unkStruct_8095228 *param_3)
|
||||
u32 sub_8039068(u32 mailMode, u8 *passwordBuffer, struct unkStruct_8095228 *param_3)
|
||||
{
|
||||
if ( (!sub_803D204(param_2,param_3)) || (7 < param_3->mailType) ||
|
||||
(param_3->floor >= GetDungeonFloorCount(param_3->dungeon)) ||
|
||||
if ( (!sub_803D204(passwordBuffer, param_3)) || (7 < param_3->mailType) ||
|
||||
(param_3->dungeon.dungeonFloor >= GetDungeonFloorCount(param_3->dungeon.dungeonIndex)) ||
|
||||
(param_3->clientSpecies == SPECIES_NONE) || (SPECIES_RAYQUAZA_CUTSCENE < param_3->clientSpecies) ||
|
||||
(IsInvalidItemReward(param_3->unk20.itemIndex))) {
|
||||
return 0x11;
|
||||
return PASSWORD_ENTRY_INCORRECT_PASSWORD;
|
||||
}
|
||||
else
|
||||
switch(param_1)
|
||||
switch(mailMode)
|
||||
{
|
||||
case 0x1C:
|
||||
case PASSWORD_ENTRY_SOS_MAIL_MODE:
|
||||
if (param_3->mailType != WONDER_MAIL_TYPE_SOS) {
|
||||
return 0x12;
|
||||
return PASSWORD_ENTRY_NOT_SOS_MAIL;
|
||||
}
|
||||
else if ( (sub_80952F0(2, param_3->unk10)) || (sub_80952F0(4, param_3->unk10)) || (sub_80952F0(6, param_3->unk10)) || (sub_8095298(param_3->unk10))) {
|
||||
return 0x7;
|
||||
return PASSWORD_ENTRY_DUPLICATE_SOS_MAIL;
|
||||
}
|
||||
else if (sub_8095190() == -1) {
|
||||
return 0xd;
|
||||
}
|
||||
else {
|
||||
return 0x16;
|
||||
return PASSWORD_ENTRY_SOS_MAIL_SUCCESS;
|
||||
}
|
||||
break;
|
||||
case 0x1E:
|
||||
case PASSWORD_ENTRY_AOK_MAIL_MODE:
|
||||
if (param_3->mailType != WONDER_MAIL_TYPE_AOK) {
|
||||
return 0x13;
|
||||
return PASSWORD_ENTRY_NOT_AOK_MAIL;
|
||||
}
|
||||
else if (!sub_80952F0(1, param_3->unk10)) {
|
||||
return 0x9;
|
||||
return PASSWORD_ENTRY_DUPLICATE_AOK_MAIL;
|
||||
}
|
||||
else {
|
||||
return 0x17;
|
||||
return PASSWORD_ENTRY_AOK_MAIL_SUCCESS;
|
||||
}
|
||||
break;
|
||||
case 0x20:
|
||||
case PASSWORD_ENTRY_THANK_YOU_MAIL_MODE:
|
||||
if (param_3->mailType != WONDER_MAIL_TYPE_THANK_YOU) {
|
||||
return 0x14;
|
||||
return PASSWORD_ENTRY_NOT_THANK_YOU_MAIL;
|
||||
}
|
||||
else if ((!sub_80952F0(4, param_3->unk10)) || (param_3->unk28 != sub_8011C34())) {
|
||||
return 0xb;
|
||||
return PASSWORD_ENTRY_DUPLICATE_THANK_YOU_MAIL;
|
||||
}
|
||||
else {
|
||||
return 0x18;
|
||||
return PASSWORD_ENTRY_THANK_YOU_MAIL_SUCCESS;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
525
src/status.c
525
src/status.c
@ -1,9 +1,85 @@
|
||||
#include "global.h"
|
||||
#include "status.h"
|
||||
|
||||
#include "constants/status.h"
|
||||
#include "constants/ability.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_ai_targeting.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "dungeon_items.h"
|
||||
#include "code_808417C.h"
|
||||
#include "map.h"
|
||||
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern u8 gUnknown_202DE58[];
|
||||
|
||||
extern u8 *gUnknown_80FC084[];
|
||||
extern u8 *gUnknown_80FC090[];
|
||||
extern u8 *gUnknown_80FC1C4[];
|
||||
extern u8 *gUnknown_80FC218[];
|
||||
extern u8 *gUnknown_80FD550[];
|
||||
extern u8 *gUnknown_80FCA60[];
|
||||
extern u8 *gUnknown_80FC184[];
|
||||
extern u8 *gUnknown_80FC0B8[];
|
||||
extern u8 *gUnknown_80FC0C8[];
|
||||
extern u8 *gUnknown_80FC118[];
|
||||
extern u8 *gUnknown_80FC11C[];
|
||||
extern u8 *gUnknown_80FC114[];
|
||||
extern u8 *gUnknown_80FC180[];
|
||||
extern u8 *gUnknown_80FC0FC[];
|
||||
extern u8 *gUnknown_80FC0AC[];
|
||||
extern u8 *gUnknown_80FC09C[];
|
||||
extern u8 *gUnknown_80FC1F0[];
|
||||
extern u8 *gUnknown_80FC1A4[];
|
||||
extern u8 *gUnknown_80FCA64[];
|
||||
extern s16 gUnknown_80F4E3C[];
|
||||
extern u8 *gUnknown_80FCC18[];
|
||||
extern u8 *gUnknown_80FB2E0[];
|
||||
extern u8 *gUnknown_80FB300[];
|
||||
extern s16 gUnknown_80F4E50[];
|
||||
extern u8 *gUnknown_80FB2CC[];
|
||||
extern u8 *gUnknown_80FB2AC[];
|
||||
extern u8 *gUnknown_80FF01C[];
|
||||
extern u8 *gUnknown_80FCBF8[];
|
||||
extern s16 gUnknown_80F4E40[];
|
||||
extern u8 *gUnknown_80FA124[];
|
||||
extern u8 *gUnknown_80FC2B8[];
|
||||
extern u8 *gUnknown_80FC298[];
|
||||
extern u8 *gUnknown_80FC2D8[];
|
||||
extern u8 *gUnknown_80FC298[];
|
||||
extern s16 gUnknown_80F4E48[];
|
||||
extern s16 gUnknown_80F4E4C[];
|
||||
extern u8 *gUnknown_80FB27C[];
|
||||
extern u8 *gUnknown_80FB25C[];
|
||||
extern u8 *gUnknown_80FCDB4[];
|
||||
extern u8 *gUnknown_80FD500[];
|
||||
extern s16 gUnknown_80F4ECC[];
|
||||
extern u8 *gUnknown_80FB960[];
|
||||
extern u8 *gUnknown_80FB940[];
|
||||
|
||||
extern void sub_8041BF8(struct DungeonEntity *);
|
||||
extern void sub_8041BE8(struct DungeonEntity *);
|
||||
extern void sub_8041CCC(struct DungeonEntity *);
|
||||
extern void sub_8041CB8(struct DungeonEntity *r0);
|
||||
extern void sub_8041C1C(struct DungeonEntity *r0);
|
||||
extern s32 GetMovementSpeed(struct DungeonEntity *);
|
||||
|
||||
extern void sub_8042060(struct DungeonEntity *, s32);
|
||||
extern bool8 sub_8071728(struct DungeonEntity * param_1, struct DungeonEntity * param_2, u8 param_3);
|
||||
extern void sub_8041FB4(struct DungeonEntity *r0, u32 r1);
|
||||
extern void sub_8041FD8(struct DungeonEntity *r0, u32 r1);
|
||||
extern void sub_80522F4(struct DungeonEntity *r1, struct DungeonEntity *r2, u8 *);
|
||||
extern s32 sub_8009DA4(s32, s32);
|
||||
|
||||
extern void sub_804201C(struct DungeonEntity *r0, u32 r1);
|
||||
extern void sub_8041FFC(struct DungeonEntity *r0, u32 r1);
|
||||
|
||||
extern void SetMessageArgument(char[], struct DungeonEntity*, u32);
|
||||
extern void SetMessageArgument_2(char[], struct DungeonEntityData*, u32);
|
||||
extern void sub_8041C58(struct DungeonEntity *r0);
|
||||
extern void DungeonEntityUpdateStatusSprites(struct DungeonEntity *);
|
||||
extern void sub_8042040(struct DungeonEntity *, s32);
|
||||
extern void sub_80420A0(struct DungeonEntity *);
|
||||
|
||||
u8 GetFlashFireStatus(struct DungeonEntity *pokemon)
|
||||
{
|
||||
@ -17,3 +93,450 @@ u8 GetFlashFireStatus(struct DungeonEntity *pokemon)
|
||||
}
|
||||
return FLASH_FIRE_STATUS_NOT_MAXED;
|
||||
}
|
||||
|
||||
static inline s32 UpdateFlashFireBoost_sub(struct DungeonEntityData * entityData)
|
||||
{
|
||||
s32 flashFireBoost;
|
||||
|
||||
flashFireBoost = entityData->flashFireBoost;
|
||||
flashFireBoost++;
|
||||
if (FLASH_FIRE_STATUS_MAXED < flashFireBoost) {
|
||||
flashFireBoost = FLASH_FIRE_STATUS_NOT_MAXED;
|
||||
}
|
||||
return flashFireBoost;
|
||||
}
|
||||
|
||||
void UpdateFlashFireBoost(struct DungeonEntity * pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
struct DungeonEntityData * entityData;
|
||||
struct DungeonEntityData * entityData_1;
|
||||
s32 flashFireBoost;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
entityData = target->entityData;
|
||||
entityData_1 = entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
flashFireBoost = UpdateFlashFireBoost_sub(entityData);
|
||||
if (entityData_1->flashFireBoost != flashFireBoost) {
|
||||
entityData_1->flashFireBoost = flashFireBoost;
|
||||
sub_8041C58(target);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80772C0(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32 statStage, s32 param_4, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
s32 oldMulti;
|
||||
|
||||
if (!EntityExists(target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (statStage != STAT_STAGE_ATTACK) {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC0C8);
|
||||
}
|
||||
else {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC0B8);
|
||||
}
|
||||
if ((param_4 < 0x100) && sub_8071728(pokemon,target,displayMessage)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((HasItem(target,ITEM_ID_TWIST_BAND)) && (param_4 < 0x100)) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FD550);
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasAbility(target, ABILITY_HYPER_CUTTER) && (statStage == STAT_STAGE_ATTACK) && (param_4 < 0x100)) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FCA60);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
oldMulti = entityData->attackMultipliers[statStage];
|
||||
|
||||
if (param_4 < 0x100) {
|
||||
sub_8041FD8(target,statStage);
|
||||
}
|
||||
else {
|
||||
sub_8041FB4(target,statStage);
|
||||
}
|
||||
|
||||
entityData->attackMultipliers[statStage] = sub_8009DA4(entityData->attackMultipliers[statStage],param_4);
|
||||
|
||||
if (entityData->attackMultipliers[statStage] < 2) {
|
||||
entityData->attackMultipliers[statStage] = 2;
|
||||
}
|
||||
if (0x63fd < entityData->attackMultipliers[statStage]) {
|
||||
entityData->attackMultipliers[statStage] = 0x63fd; // 25597
|
||||
}
|
||||
if (oldMulti > entityData->attackMultipliers[statStage]) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC11C);
|
||||
}
|
||||
else if (oldMulti < entityData->attackMultipliers[statStage]) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC118);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC184);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void sub_8077434(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32 statStage, s32 param_4, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
s32 oldMulti;
|
||||
|
||||
if (!EntityExists(target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (statStage != STAT_STAGE_DEFENSE) {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC0AC);
|
||||
}
|
||||
else {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC09C);
|
||||
}
|
||||
if ((param_4 < 0x100) && sub_8071728(pokemon,target,displayMessage)) {
|
||||
return;
|
||||
}
|
||||
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
oldMulti = entityData->defenseMultipliers[statStage];
|
||||
|
||||
if (param_4 < 0x100) {
|
||||
sub_804201C(target,statStage);
|
||||
}
|
||||
else {
|
||||
sub_8041FFC(target,statStage);
|
||||
}
|
||||
|
||||
entityData->defenseMultipliers[statStage] = sub_8009DA4(entityData->defenseMultipliers[statStage],param_4);
|
||||
|
||||
if (entityData->defenseMultipliers[statStage] < 2) {
|
||||
entityData->defenseMultipliers[statStage] = 2;
|
||||
}
|
||||
if (0x63fd < entityData->defenseMultipliers[statStage]) {
|
||||
entityData->defenseMultipliers[statStage] = 0x63fd; // 25597
|
||||
}
|
||||
if (oldMulti > entityData->defenseMultipliers[statStage]) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC114);
|
||||
}
|
||||
else if (oldMulti < entityData->defenseMultipliers[statStage]) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC0FC);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC180);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void sub_8077540(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 statStage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_8042040(target,statStage);
|
||||
if (statStage != STAT_STAGE_ACCURACY) {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC090);
|
||||
}
|
||||
else {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC084);
|
||||
}
|
||||
if (entityData->accuracyStages[statStage] < MAX_STAT_STAGE) {
|
||||
entityData->accuracyStages[statStage]++;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC1C4);
|
||||
}
|
||||
else {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC218);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80775DC(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 statStage, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
if (statStage != STAT_STAGE_ACCURACY) {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC090);
|
||||
}
|
||||
else {
|
||||
strcpy(gUnknown_202DE58,*gUnknown_80FC084);
|
||||
}
|
||||
if (!sub_8071728(pokemon,target,displayMessage)) {
|
||||
if (HasAbility(target, ABILITY_KEEN_EYE) && (statStage == STAT_STAGE_ACCURACY)){
|
||||
if(displayMessage)
|
||||
{
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FCA64);
|
||||
}
|
||||
}
|
||||
else {
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_8042060(target,statStage);
|
||||
if (entityData->accuracyStages[statStage] != 0) {
|
||||
entityData->accuracyStages[statStage]--;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC1A4);
|
||||
}
|
||||
else {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC1F0);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80776C0(struct DungeonEntity * pokemon,struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
if (!HasSafeguardStatus(pokemon, target, displayMessage)) {
|
||||
if (HasAbility(target, ABILITY_INNER_FOCUS)){
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if(displayMessage)
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FCC18);
|
||||
}
|
||||
else {
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if(entityData->volatileStatus != VOLATILE_STATUS_CRINGING)
|
||||
{
|
||||
entityData->volatileStatus = VOLATILE_STATUS_CRINGING;
|
||||
entityData->volatileStatusTurnsLeft = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
|
||||
sub_80420A0(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB2E0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB300);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8077780(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct MapTile *mapTile;
|
||||
register struct DungeonEntityData *entityData;
|
||||
struct DungeonEntity *mapPokemonEntity;
|
||||
int index;
|
||||
bool8 bVar6;
|
||||
bool8 bVar7;
|
||||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) {
|
||||
if (HasAbility(target, ABILITY_LIMBER)) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (displayMessage) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FCBF8);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bVar6 = TRUE;
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityData->nonVolatileStatus != NON_VOLATILE_STATUS_PARALYZED) {
|
||||
entityData->nonVolatileStatus = NON_VOLATILE_STATUS_PARALYZED;
|
||||
entityData->nonVolatileStatusTurnsLeft = CalculateStatusTurns(target,gUnknown_80F4E50,1) + 1;
|
||||
entityData->nonVolatileStatusDamageTimer = 0;
|
||||
entityData->fillAF = 0;
|
||||
bVar6 = FALSE;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB2AC);
|
||||
sub_8041C1C(target);
|
||||
GetMovementSpeed(target);
|
||||
}
|
||||
else {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB2CC);
|
||||
}
|
||||
if ((HasAbility(target, ABILITY_SYNCHRONIZE)) && (!bVar6)) {
|
||||
bVar7 = FALSE;
|
||||
|
||||
for(index = 0; index < NUM_DIRECTIONS; index++)
|
||||
{
|
||||
mapTile = GetMapTile_1(target->posWorld.x + gAdjacentTileOffsets[index].x,target->posWorld.y + gAdjacentTileOffsets[index].y);
|
||||
mapPokemonEntity = mapTile->pokemon;
|
||||
if ((EntityExists(mapPokemonEntity)) && (GetEntityType(mapPokemonEntity) == ENTITY_POKEMON)) {
|
||||
if (!bVar7) {
|
||||
bVar7 = TRUE;
|
||||
SetMessageArgument_2(gAvailablePokemonNames,entityData,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FF01C);
|
||||
}
|
||||
if (sub_807167C(target,mapPokemonEntity) == 1) {
|
||||
sub_8077780(pokemon, mapPokemonEntity, displayMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8077910(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 turns, bool8 diplayMessage)
|
||||
{
|
||||
s32 movSpeed;
|
||||
s32 index;
|
||||
s32 movSpeed_1;
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
if (!EntityExists(target)) {
|
||||
return;
|
||||
}
|
||||
if (turns == 0) {
|
||||
turns = CalculateStatusTurns(target,gUnknown_80F4E40,0) + 1;
|
||||
}
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
movSpeed = GetMovementSpeed(target);
|
||||
if (movSpeed == 4) {
|
||||
if (diplayMessage)
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC2B8);
|
||||
}
|
||||
else {
|
||||
for(index = 0; index < NUM_SPEED_TURN_COUNTERS; index++)
|
||||
{
|
||||
if(entityData->speedUpTurnsLeft[index] == 0)
|
||||
{
|
||||
entityData->speedUpTurnsLeft[index] = turns;
|
||||
break;
|
||||
}
|
||||
}
|
||||
movSpeed_1 = GetMovementSpeed(target);
|
||||
if (movSpeed == movSpeed_1) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC298);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_8041CB8(target);
|
||||
sub_80522F4(pokemon,target,gUnknown_80FA124[movSpeed_1]);
|
||||
entityData->unkF8 = 1;
|
||||
entityData->attacking = FALSE;
|
||||
}
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void sub_80779F0(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 param_3, bool8 displayMessage)
|
||||
{
|
||||
s32 movSpeed;
|
||||
s32 iVar4;
|
||||
s32 index;
|
||||
s32 movSpeed_1;
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
if (!EntityExists(target)) {
|
||||
return;
|
||||
}
|
||||
if (HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
return;
|
||||
}
|
||||
entityData = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
movSpeed = GetMovementSpeed(target);
|
||||
if (movSpeed == 0) {
|
||||
if (displayMessage)
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC2D8);
|
||||
}
|
||||
else {
|
||||
for(iVar4 = 0; iVar4 < param_3; iVar4++)
|
||||
{
|
||||
for(index = 0; index < NUM_SPEED_TURN_COUNTERS; index++)
|
||||
{
|
||||
if (entityData->slowTurnsLeft[index]== 0) {
|
||||
entityData->slowTurnsLeft[index] = CalculateStatusTurns(target,gUnknown_80F4E48,1) + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
movSpeed_1 = GetMovementSpeed(target);
|
||||
if (movSpeed == movSpeed_1) {
|
||||
if (displayMessage)
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC298);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_8041CCC(target);
|
||||
sub_80522F4(pokemon,target,gUnknown_80FA124[movSpeed_1]);
|
||||
}
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void sub_8077AE4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
if (!EntityExists(target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (HasItem(target,ITEM_ID_PERSIM_BAND)) {
|
||||
if (displayMessage)
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FD500);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (HasAbility(target, ABILITY_OWN_TEMPO)) {
|
||||
if (displayMessage)
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FCDB4);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_8041BE8(target);
|
||||
entityData = target->entityData;
|
||||
if (entityData->volatileStatus != VOLATILE_STATUS_CONFUSED) {
|
||||
entityData->volatileStatus = VOLATILE_STATUS_CONFUSED;
|
||||
entityData->volatileStatusTurnsLeft = CalculateStatusTurns(target,gUnknown_80F4E4C,1) + 1;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB25C);
|
||||
}
|
||||
else {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB27C);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8077BB4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *iVar3;
|
||||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) {
|
||||
iVar3 = target->entityData;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (iVar3->volatileStatus != VOLATILE_STATUS_COWERING) {
|
||||
iVar3->volatileStatus = VOLATILE_STATUS_COWERING;
|
||||
iVar3->volatileStatusTurnsLeft = CalculateStatusTurns(target,gUnknown_80F4ECC,1) + 1;
|
||||
sub_8041BF8(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB940);
|
||||
}
|
||||
else {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB960);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "memory.h"
|
||||
#include "menu.h"
|
||||
#include "input.h"
|
||||
#include "rescue_password_menu.h"
|
||||
#include "text.h"
|
||||
#include "team_inventory.h"
|
||||
#include "code_800D090.h"
|
||||
@ -236,7 +237,7 @@ extern s32 sub_80381F4(u32, void *, void *);
|
||||
extern void sub_801C8C4(u32, u32, s32 * , u32);
|
||||
extern u8 sub_809539C(u32, u32);
|
||||
extern u8 sub_800D588(void);
|
||||
extern u32 sub_803C200(u8 *, u32);
|
||||
extern u32 GetDungeonTeamRankPts(struct DungeonLocation *, u32);
|
||||
extern void sub_8031D70(u8, u32);
|
||||
|
||||
extern void sub_803092C(void);
|
||||
@ -829,25 +830,21 @@ void HandleThankYouMailPasswordMenu(void)
|
||||
switch(return_var)
|
||||
{
|
||||
case 3:
|
||||
switch(sub_8039068(0x20,gUnknown_203B2C4->passwordBuffer,&temp))
|
||||
switch(sub_8039068(PASSWORD_ENTRY_THANK_YOU_MAIL_MODE,gUnknown_203B2C4->passwordBuffer,&temp))
|
||||
{
|
||||
case 0x11:
|
||||
// Wrong password
|
||||
case PASSWORD_ENTRY_INCORRECT_PASSWORD:
|
||||
sub_8014248(gUnknown_80DF1C0, 0, 7, gUnknown_80DEE44, 0, 4, 0, &gUnknown_203B2C4->faceFile, 0xc);
|
||||
SetThankYouMailMenuState(THANK_YOU_PASSWORD_WRONG);
|
||||
break;
|
||||
case 0x14:
|
||||
// Incorrect password
|
||||
case PASSWORD_ENTRY_NOT_THANK_YOU_MAIL:
|
||||
sub_80141B4(gUnknown_80DF208, 0, &gUnknown_203B2C4->faceFile, 0x10d);
|
||||
SetThankYouMailMenuState(PRINT_THANK_YOU_ERROR);
|
||||
break;
|
||||
case 0xB:
|
||||
// Not eligible to receive
|
||||
case PASSWORD_ENTRY_DUPLICATE_THANK_YOU_MAIL:
|
||||
sub_80141B4(gUnknown_80DF0A0, 0, &gUnknown_203B2C4->faceFile, 0x10d);
|
||||
SetThankYouMailMenuState(PRINT_THANK_YOU_ERROR);
|
||||
break;
|
||||
case 0x18:
|
||||
// I think this is when password works successfully
|
||||
case PASSWORD_ENTRY_THANK_YOU_MAIL_SUCCESS:
|
||||
uVar1 = sub_809539C(4,temp.unk10);
|
||||
puVar5 = sub_8095228(uVar1);
|
||||
*puVar5 = temp;
|
||||
@ -1423,7 +1420,7 @@ void UpdateThankYouMailText(void)
|
||||
else
|
||||
gUnknown_203B2C4->unk53C.itemRewards[0] = 0; // unk558
|
||||
gUnknown_203B2C4->unk53C.numItems = 1; // unk55B
|
||||
gUnknown_203B2C4->unk53C.teamRankPtsReward = sub_803C200(&puVar4->dungeon, 0); // unk560
|
||||
gUnknown_203B2C4->unk53C.teamRankPtsReward = GetDungeonTeamRankPts(&puVar4->dungeon, 0); // unk560
|
||||
gUnknown_203B2C4->unk53C.itemRewards[1] = 0; // unk559
|
||||
gUnknown_203B2C4->unk53C.itemRewards[2] = 0; // unk55A
|
||||
gUnknown_203B2C4->unk53C.friendAreaReward = 0; // unk55C
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "menu.h"
|
||||
#include "text.h"
|
||||
#include "team_inventory.h"
|
||||
#include "rescue_password_menu.h"
|
||||
|
||||
extern struct WonderMailStruct_203B2C0 *gUnknown_203B2C0;
|
||||
|
||||
@ -1171,7 +1172,7 @@ void sub_8028FDC(void)
|
||||
{
|
||||
case 8:
|
||||
return_var = sub_8095228(gUnknown_203B2C0->unk218);
|
||||
if(sub_80A2824(return_var->dungeon) == 0)
|
||||
if(sub_80A2824(return_var->dungeon.dungeonIndex) == 0)
|
||||
{
|
||||
sub_8028B04(0x1C);
|
||||
}
|
||||
@ -1459,21 +1460,21 @@ void sub_80293F4(void)
|
||||
switch(return_var)
|
||||
{
|
||||
case 3:
|
||||
switch(sub_8039068(0x1C, (gUnknown_203B2C0->passwordBuffer), &temp))
|
||||
switch(sub_8039068(PASSWORD_ENTRY_SOS_MAIL_MODE, (gUnknown_203B2C0->passwordBuffer), &temp))
|
||||
{
|
||||
case 17:
|
||||
case PASSWORD_ENTRY_INCORRECT_PASSWORD:
|
||||
sub_8014248(gWonderMailPasswordIncorrectText, 0, 8, gUnknown_80DDA48, 0, 4, 0, &gUnknown_203B2C0->faceFile, 0xC);
|
||||
sub_8028B04(40);
|
||||
break;
|
||||
case 18:
|
||||
case PASSWORD_ENTRY_NOT_SOS_MAIL:
|
||||
sub_80141B4(gWonderMailSOSPasswordIncorrectText, 0, &gUnknown_203B2C0->faceFile, 0x10d);
|
||||
sub_8028B04(7);
|
||||
break;
|
||||
case 7:
|
||||
case PASSWORD_ENTRY_DUPLICATE_SOS_MAIL:
|
||||
sub_80141B4(gWonderMailDuplicateText, 0, &gUnknown_203B2C0->faceFile, 0x10d);
|
||||
sub_8028B04(7);
|
||||
break;
|
||||
case 22:
|
||||
case PASSWORD_ENTRY_SOS_MAIL_SUCCESS:
|
||||
sub_8095274(temp.unk10);
|
||||
temp.mailType = 2;
|
||||
sub_80951BC(&temp);
|
||||
|
@ -141,8 +141,8 @@ extern void sub_802B5FC(void);
|
||||
extern void sub_802B624(void);
|
||||
|
||||
extern void sub_802F204(struct unkStruct_802F204 *, u32);
|
||||
extern void sub_803C37C(u8 *, u32, u8 *);
|
||||
extern u32 sub_803C200(u8 *, u32);
|
||||
extern void sub_803C37C(struct DungeonLocation *, u32, u8 *);
|
||||
extern u32 GetDungeonTeamRankPts(struct DungeonLocation *, u32);
|
||||
extern void sub_80141B4(const char *r0, u32, struct OpenedFile **r1, u32);
|
||||
extern u8 sub_80023E4(u32);
|
||||
extern void nullsub_131(void);
|
||||
@ -387,7 +387,7 @@ void sub_802B3E0(void)
|
||||
sub_8097790();
|
||||
iVar3 = sub_8095228(gUnknown_203B2C8->unk1);
|
||||
sub_803C37C(&iVar3->dungeon, 0, gUnknown_203B2C8->unk114.itemRewards);
|
||||
gUnknown_203B2C8->unk114.teamRankPtsReward = sub_803C200(&iVar3->dungeon, 0);
|
||||
gUnknown_203B2C8->unk114.teamRankPtsReward = GetDungeonTeamRankPts(&iVar3->dungeon, 0);
|
||||
gUnknown_203B2C8->unk114.itemRewards[1] = 0;
|
||||
gUnknown_203B2C8->unk114.itemRewards[2] = 0;
|
||||
gUnknown_203B2C8->unk114.numItems = 10;
|
||||
@ -643,7 +643,7 @@ void sub_802B880(void)
|
||||
void sub_802B8D4(void)
|
||||
{
|
||||
s32 iVar2;
|
||||
s32 retvar;
|
||||
s32 y;
|
||||
s32 new_index;
|
||||
u8 mailIndex;
|
||||
|
||||
@ -654,12 +654,12 @@ void sub_802B8D4(void)
|
||||
sub_8012BC4(((gUnknown_80DFBE8[2] << 3) + 4), 0, gUnknown_203B2CC->unk56 + 1, 2, 7, gUnknown_203B2CC->unk6C);
|
||||
for(iVar2 = 0; iVar2 < gUnknown_203B2CC->unk52; iVar2++)
|
||||
{
|
||||
retvar = sub_8013800(&gUnknown_203B2CC->unk38, iVar2);
|
||||
y = sub_8013800(&gUnknown_203B2CC->unk38, iVar2);
|
||||
new_index = (gUnknown_203B2CC->unk56 * gUnknown_203B2CC->unk54) + iVar2;
|
||||
mailIndex = gUnknown_203B2CC->receivedNewsletters[new_index];
|
||||
sub_803B6B0(0xA, retvar, 6, gUnknown_203B2CC->unk6C);
|
||||
sub_803B6B0(0xA, y, 6, gUnknown_203B2CC->unk6C);
|
||||
sub_802BC7C();
|
||||
xxx_format_and_draw(0x15, retvar, GetPokemonMailHeadline(mailIndex), gUnknown_203B2CC->unk6C, 0);
|
||||
xxx_format_and_draw(0x15, y, GetPokemonMailHeadline(mailIndex), gUnknown_203B2CC->unk6C, 0);
|
||||
}
|
||||
sub_80073E0(gUnknown_203B2CC->unk6C);
|
||||
}
|
||||
@ -953,3 +953,63 @@ void sub_802BEDC(void)
|
||||
gUnknown_203B2D8 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
NAKED
|
||||
void sub_802BF30(void)
|
||||
{
|
||||
asm_unified(
|
||||
"\tpush {r4,lr}\n"
|
||||
"\tldr r4, _0802BF9C\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xA0\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tmovs r1, 0x1\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xA1\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xA2\n"
|
||||
"\tmovs r1, 0xC\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xA3\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tmovs r1, 0x1E\n"
|
||||
"\tldrsh r0, [r0, r1]\n"
|
||||
"\tmovs r1, 0x18\n"
|
||||
"\tbl sub_8009614\n"
|
||||
"\tadds r0, 0x2\n"
|
||||
"\tlsls r0, 16\n"
|
||||
"\tldr r2, [r4]\n"
|
||||
"\tldr r3, [r2, 0x38]\n"
|
||||
"\tlsls r1, r3, 1\n"
|
||||
"\tadds r1, r3\n"
|
||||
"\tlsls r1, 3\n"
|
||||
"\tadds r1, r2, r1\n"
|
||||
"\tadds r1, 0x4E\n"
|
||||
"\tasrs r3, r0, 16\n"
|
||||
"\tlsrs r0, 16\n"
|
||||
"\tstrh r0, [r1]\n"
|
||||
"\tldr r1, [r2, 0x38]\n"
|
||||
"\tlsls r0, r1, 1\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tlsls r0, 3\n"
|
||||
"\tadds r2, r0\n"
|
||||
"\tadds r3, 0x2\n"
|
||||
"\tadds r2, 0x50\n"
|
||||
"\tstrh r3, [r2]\n"
|
||||
"\tbl ResetUnusedInputStruct\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x40\n"
|
||||
"\tmovs r1, 0x1\n"
|
||||
"\tmovs r2, 0x1\n"
|
||||
"\tbl sub_800641C\n"
|
||||
"\tpop {r4}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0802BF9C: .4byte gUnknown_203B2D8"
|
||||
);
|
||||
}
|
||||
|
@ -5,6 +5,21 @@
|
||||
#include "text.h"
|
||||
#include "menu.h"
|
||||
|
||||
struct unkStruct_802C39C
|
||||
{
|
||||
/* 0x0 */ u32 unk0[2];
|
||||
/* 0x8 */ struct DungeonLocation *unk8;
|
||||
/* 0xC */ u8 *unkC;
|
||||
/* 0x10 */ s16 unk10;
|
||||
/* 0x12 */ s16 unk12;
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ u8 fill15[0x1B];
|
||||
/* 0x36 */ u8 fill36[0x3C - 0x36];
|
||||
/* 0x3C */ u8 unk3C[0xC];
|
||||
/* 0x48 */ u8 fill48[4];
|
||||
/* 0x4C */ u32 unk4C;
|
||||
/* 0x50 */ u32 unk50[3];
|
||||
};
|
||||
|
||||
struct unkStruct_203B2E8
|
||||
{
|
||||
@ -143,7 +158,7 @@ extern s32 sub_8013800(void *, u32);
|
||||
extern void sub_803B35C(void *, u32 *);
|
||||
extern void xxx_call_draw_string(u32, u32, const u8 *, u32, u32);
|
||||
extern void sub_8012BC4(u32 x, u32 y, u32, u32, u32, u32);
|
||||
extern void sub_803B6D4(u32 *);
|
||||
extern void CreateRescueTitle(void *);
|
||||
|
||||
extern void sub_8013984(u32 *);
|
||||
extern void sub_802C6DC(void);
|
||||
@ -356,8 +371,7 @@ void sub_802C750(void)
|
||||
int iVar2;
|
||||
s32 r4;
|
||||
s32 r5;
|
||||
u32 auStack104 [18];
|
||||
u32 uStack32[4];
|
||||
struct unkStruct_802C39C local;
|
||||
|
||||
sub_8008C54(gUnknown_203B2E8->unk3C);
|
||||
sub_80073B8(gUnknown_203B2E8->unk3C);
|
||||
@ -374,10 +388,10 @@ void sub_802C750(void)
|
||||
do
|
||||
{
|
||||
uVar1 = GetJobSlotInfo(gUnknown_203B2E8->unk0[gUnknown_203B2E8->unk26 * gUnknown_203B2E8->unk24 + iVar2]);
|
||||
auStack104[0] = gUnknown_203B2E8->unk3C;
|
||||
uStack32[0] = sub_8013800(&gUnknown_203B2E8->unk8,iVar2);
|
||||
sub_803B35C(uVar1,auStack104);
|
||||
sub_803B6D4(auStack104);
|
||||
local.unk0[0] = gUnknown_203B2E8->unk3C;
|
||||
local.unk4C = sub_8013800(&gUnknown_203B2E8->unk8,iVar2);
|
||||
sub_803B35C(uVar1,local.unk0);
|
||||
CreateRescueTitle(&local);
|
||||
iVar2++;
|
||||
} while( iVar2 < gUnknown_203B2E8->unk22);
|
||||
sub_80073E0(gUnknown_203B2E8->unk3C);
|
||||
|
367
src/wonder_mail_2_mid.c
Normal file
367
src/wonder_mail_2_mid.c
Normal file
@ -0,0 +1,367 @@
|
||||
#include "global.h"
|
||||
#include "constants/mailbox.h"
|
||||
#include "code_800D090.h"
|
||||
#include "input.h"
|
||||
#include "memory.h"
|
||||
#include "text.h"
|
||||
#include "pokemon_mail.h"
|
||||
|
||||
bool8 IsMailSlotEmpty(u8);
|
||||
extern void sub_8013984(void *);
|
||||
extern void sub_8013848(u32 *, s32, u32, u32);
|
||||
extern s32 sub_802C474(void);
|
||||
extern void sub_8012D34(struct UnkTextStruct2 *, u32);
|
||||
extern void sub_802C328(void);
|
||||
extern void sub_802C39C(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_8013660(u32 *);
|
||||
extern s32 GetKeyPress(u32 *);
|
||||
extern bool8 sub_80138B8(u32 *, u32);
|
||||
extern void AddMenuCursorSprite(u32 *);
|
||||
extern u8 sub_802C4A4(void);
|
||||
extern void sub_8008C54(u32);
|
||||
extern void sub_80073B8(u32);
|
||||
extern void sub_80073E0(u32);
|
||||
|
||||
extern s32 sub_8013800(u32 *, s32);
|
||||
extern u8 *sub_8096574(u32);
|
||||
extern void sub_803B35C(u8 *, u32 *);
|
||||
extern u8 gBulletinBoardText[];
|
||||
extern u8 sub_80968B0(u8 *);
|
||||
extern void CreateRescueTitle(void *);
|
||||
extern void xxx_call_draw_string(s32, s32, u8 *, s32, s32);
|
||||
extern void sub_8012BC4(s32, s32, s32, s32 ,s32 ,s32);
|
||||
|
||||
|
||||
struct unkStruct_203B2D8
|
||||
{
|
||||
// size: 0xA4
|
||||
u8 unk0[4];
|
||||
u32 unk4;
|
||||
u8 fill8[0x1C - 0x8];
|
||||
s16 unk1C;
|
||||
s16 unk1E;
|
||||
s16 unk20;
|
||||
s16 unk22;
|
||||
s16 fill24;
|
||||
/* 0x26 */ s16 emptyMailSlots;
|
||||
u8 fill28[0x38 - 0x28];
|
||||
u32 unk38;
|
||||
struct UnkTextStruct2 *unk3C;
|
||||
struct UnkTextStruct2 unk40[4];
|
||||
u8 unkA0[4];
|
||||
};
|
||||
|
||||
|
||||
extern struct unkStruct_203B2D8 *gUnknown_203B2D8;
|
||||
|
||||
struct unkStruct_203B2E0
|
||||
{
|
||||
// size: 0xA8
|
||||
u8 unk0[0x8];
|
||||
u32 unk8;
|
||||
u8 unkC[0x20 - 0xC];
|
||||
s16 unk20;
|
||||
s16 unk22;
|
||||
s16 unk24;
|
||||
s16 unk26;
|
||||
s16 unk28;
|
||||
s16 unk2A;
|
||||
u8 fill22[0x3C - 0x2C];
|
||||
s32 unk3C;
|
||||
struct UnkTextStruct2 *unk40;
|
||||
struct UnkTextStruct2 unk44[4];
|
||||
u8 unkA4[4];
|
||||
};
|
||||
extern struct unkStruct_203B2E0 *gUnknown_203B2E0;
|
||||
|
||||
struct unkStruct_802C39C
|
||||
{
|
||||
/* 0x0 */ u32 unk0[2];
|
||||
/* 0x8 */ struct DungeonLocation *unk8;
|
||||
/* 0xC */ u8 *unkC;
|
||||
/* 0x10 */ s16 unk10;
|
||||
/* 0x12 */ s16 unk12;
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ u8 fill15[0x1B];
|
||||
/* 0x34 */ u8 fill34[2];
|
||||
/* 0x36 */ u8 fill36[0x3C - 0x36];
|
||||
/* 0x3C */ u8 unk3C[0xC];
|
||||
/* 0x48 */ u8 fill48[4];
|
||||
/* 0x4C */ u32 unk4C;
|
||||
/* 0x50 */ u32 unk50[3];
|
||||
};
|
||||
|
||||
extern struct UnkTextStruct2 gUnknown_80DFCB4;
|
||||
extern struct UnkTextStruct2 gUnknown_80DFC9C;
|
||||
|
||||
extern u16 gUnknown_203B2E4;
|
||||
|
||||
extern u8 *sub_8095FE8(u8);
|
||||
extern u8 sub_80968B0(u8 *);
|
||||
extern void sub_803B35C(u8 *, u32 *);
|
||||
extern void CreateRescueTitle(void *);
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
extern u8 gMailboxText[];
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern void PrintPokeNameToBuffer(u8 *buffer, struct PokemonStruct *pokemon);
|
||||
extern void sub_803B6B0(u32, u32, u32, u32);
|
||||
|
||||
void CreateMailMenu(void)
|
||||
{
|
||||
u8 *pcVar2;
|
||||
s32 y;
|
||||
s32 iVar5;
|
||||
struct unkStruct_802C39C local;
|
||||
u8 buffer [128];
|
||||
|
||||
sub_8008C54(gUnknown_203B2D8->unk38);
|
||||
sub_80073B8(gUnknown_203B2D8->unk38);
|
||||
xxx_call_draw_string(gUnknown_203B2D8->unk22 * 8 + 10,0,gMailboxText,gUnknown_203B2D8->unk38,0);
|
||||
iVar5 = 0;
|
||||
if (iVar5 < gUnknown_203B2D8->unk1E) {
|
||||
do {
|
||||
pcVar2 = sub_8095FE8(gUnknown_203B2D8->unk0[(gUnknown_203B2D8->unk22 * gUnknown_203B2D8->unk20) + iVar5]);
|
||||
local.unk0[0] = gUnknown_203B2D8->unk38;
|
||||
local.unk4C = sub_8013800(&gUnknown_203B2D8->unk4, iVar5);
|
||||
if (*pcVar2 == 1) {
|
||||
y = sub_8013800(&gUnknown_203B2D8->unk4, iVar5);
|
||||
sub_803B6B0(10,y,6,gUnknown_203B2D8->unk38);
|
||||
PrintPokeNameToBuffer(gAvailablePokemonNames, GetPlayerPokemonStruct());
|
||||
sprintf_2(buffer, GetPokemonMailHeadline(pcVar2[5]), gAvailablePokemonNames);
|
||||
xxx_call_draw_string(0x15,y,buffer,gUnknown_203B2D8->unk38,0);
|
||||
}
|
||||
else {
|
||||
sub_803B35C(pcVar2,local.unk0);
|
||||
if (sub_80968B0(pcVar2) != 0) {
|
||||
local.unk3C[11] = 2;
|
||||
}
|
||||
CreateRescueTitle(&local);
|
||||
}
|
||||
iVar5++;
|
||||
} while (iVar5 < gUnknown_203B2D8->unk1E);
|
||||
}
|
||||
sub_80073E0(gUnknown_203B2D8->unk38);
|
||||
}
|
||||
|
||||
s32 CountEmptyMailSlots(void)
|
||||
{
|
||||
s32 mailSlots;
|
||||
s32 index;
|
||||
|
||||
mailSlots = 0;
|
||||
for(index = 0; index < NUM_MAILBOX_SLOTS; index++)
|
||||
{
|
||||
if(!IsMailSlotEmpty(index))
|
||||
{
|
||||
gUnknown_203B2D8->unk0[mailSlots] = index;
|
||||
mailSlots++;
|
||||
}
|
||||
}
|
||||
return mailSlots;
|
||||
}
|
||||
|
||||
bool8 HasNoMailinMailbox(void)
|
||||
{
|
||||
s32 index;
|
||||
for(index = 0; index < NUM_MAILBOX_SLOTS; index++)
|
||||
{
|
||||
if(!IsMailSlotEmpty(index))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool8 sub_802C10C(s32 param_1,struct UnkTextStruct2_sub *param_2,s32 param_3)
|
||||
{
|
||||
if (sub_802C4A4() != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gUnknown_203B2E0 == NULL) {
|
||||
gUnknown_203B2E0 = MemoryAlloc(sizeof(struct unkStruct_203B2E0),8);
|
||||
}
|
||||
gUnknown_203B2E0->unk3C = param_1;
|
||||
gUnknown_203B2E0->unk40 = &gUnknown_203B2E0->unk44[param_1];
|
||||
sub_8006518(gUnknown_203B2E0->unk44);
|
||||
|
||||
gUnknown_203B2E0->unk44[gUnknown_203B2E0->unk3C] = gUnknown_80DFCB4;
|
||||
gUnknown_203B2E0->unk40->unk14 = gUnknown_203B2E0->unkA4;
|
||||
if (param_2 != NULL) {
|
||||
gUnknown_203B2E0->unk44[gUnknown_203B2E0->unk3C].unk08 = *param_2;
|
||||
}
|
||||
sub_8012D34(gUnknown_203B2E0->unk40,param_3);
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B2E0->unk44,1,1);
|
||||
sub_8013848(&gUnknown_203B2E0->unk8,sub_802C474(),param_3,param_1);
|
||||
gUnknown_203B2E0->unk20 = gUnknown_203B2E4;
|
||||
sub_8013984(&gUnknown_203B2E0->unk8);
|
||||
sub_802C328();
|
||||
sub_802C39C();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_802C1E4(u8 param_1)
|
||||
{
|
||||
if (param_1 == '\0') {
|
||||
sub_8013660(&gUnknown_203B2E0->unk8);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
switch(GetKeyPress(&gUnknown_203B2E0->unk8))
|
||||
{
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
return 3;
|
||||
case 4:
|
||||
PlayMenuSoundEffect(4);
|
||||
return 4;
|
||||
default:
|
||||
if (sub_80138B8(&gUnknown_203B2E0->unk8,1)) {
|
||||
sub_802C328();
|
||||
sub_802C39C();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_802C26C(void)
|
||||
{
|
||||
return gUnknown_203B2E0->unk0[(gUnknown_203B2E0->unk26 * gUnknown_203B2E0->unk24) + gUnknown_203B2E0->unk20];
|
||||
}
|
||||
|
||||
void sub_802C28C(u32 r0)
|
||||
{
|
||||
u8 r0_u8;
|
||||
|
||||
r0_u8 = r0;
|
||||
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B2E0->unk44, 0, 0);
|
||||
gUnknown_203B2E0->unk2A = sub_802C474();
|
||||
sub_8013984(&gUnknown_203B2E0->unk8);
|
||||
sub_802C328();
|
||||
sub_802C39C();
|
||||
if(r0_u8)
|
||||
AddMenuCursorSprite(&gUnknown_203B2E0->unk8);
|
||||
}
|
||||
|
||||
void sub_802C2D4(void)
|
||||
{
|
||||
if(gUnknown_203B2E0 != NULL)
|
||||
{
|
||||
gUnknown_203B2E4 = gUnknown_203B2E0->unk20;
|
||||
gUnknown_203B2E0->unk44[gUnknown_203B2E0->unk3C] = gUnknown_80DFC9C;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B2E0->unk44, 1, 1);
|
||||
MemoryFree(gUnknown_203B2E0);
|
||||
gUnknown_203B2E0 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
NAKED
|
||||
void sub_802C328(void)
|
||||
{
|
||||
asm_unified(
|
||||
"\tpush {r4,lr}\n"
|
||||
"\tldr r4, _0802C398\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tldrh r1, [r0, 0x28]\n"
|
||||
"\tadds r0, 0xA4\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tldrh r1, [r0, 0x26]\n"
|
||||
"\tadds r0, 0xA5\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xA6\n"
|
||||
"\tmovs r1, 0xC\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xA7\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tmovs r1, 0x22\n"
|
||||
"\tldrsh r0, [r0, r1]\n"
|
||||
"\tmovs r1, 0x18\n"
|
||||
"\tbl sub_8009614\n"
|
||||
"\tadds r0, 0x2\n"
|
||||
"\tlsls r0, 16\n"
|
||||
"\tldr r2, [r4]\n"
|
||||
"\tldr r3, [r2, 0x3C]\n"
|
||||
"\tlsls r1, r3, 1\n"
|
||||
"\tadds r1, r3\n"
|
||||
"\tlsls r1, 3\n"
|
||||
"\tadds r1, r2, r1\n"
|
||||
"\tadds r1, 0x52\n"
|
||||
"\tasrs r3, r0, 16\n"
|
||||
"\tlsrs r0, 16\n"
|
||||
"\tstrh r0, [r1]\n"
|
||||
"\tldr r1, [r2, 0x3C]\n"
|
||||
"\tlsls r0, r1, 1\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tlsls r0, 3\n"
|
||||
"\tadds r2, r0\n"
|
||||
"\tadds r3, 0x2\n"
|
||||
"\tadds r2, 0x54\n"
|
||||
"\tstrh r3, [r2]\n"
|
||||
"\tbl ResetUnusedInputStruct\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x44\n"
|
||||
"\tmovs r1, 0x1\n"
|
||||
"\tmovs r2, 0x1\n"
|
||||
"\tbl sub_800641C\n"
|
||||
"\tpop {r4}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0802C398: .4byte gUnknown_203B2E0");
|
||||
}
|
||||
|
||||
void sub_802C39C(void)
|
||||
{
|
||||
u32 uVar1;
|
||||
u8 *uVar3;
|
||||
s32 iVar4;
|
||||
s32 x;
|
||||
s32 iVar6;
|
||||
struct unkStruct_802C39C local;
|
||||
|
||||
sub_8008C54(gUnknown_203B2E0->unk3C);
|
||||
sub_80073B8(gUnknown_203B2E0->unk3C);
|
||||
iVar4 = gUnknown_203B2E0->unk26 * 8;
|
||||
x = iVar4;
|
||||
x += 10;
|
||||
xxx_call_draw_string(x,0,gBulletinBoardText,gUnknown_203B2E0->unk3C,0);
|
||||
iVar4 += 4;
|
||||
x = iVar4 + gUnknown_203B2E0->unkA4[2] * 8;
|
||||
sub_8012BC4(x,0,gUnknown_203B2E0->unk26 + 1,2,7,gUnknown_203B2E0->unk3C);
|
||||
|
||||
iVar6 = 0;
|
||||
if(iVar6 < gUnknown_203B2E0->unk22)
|
||||
do
|
||||
{
|
||||
uVar1 = (gUnknown_203B2E0->unk0[gUnknown_203B2E0->unk26 * gUnknown_203B2E0->unk24 + iVar6]);
|
||||
uVar3 = sub_8096574(uVar1);
|
||||
local.unk0[0] = gUnknown_203B2E0->unk3C;
|
||||
local.unk4C = sub_8013800(&gUnknown_203B2E0->unk8,iVar6);
|
||||
sub_803B35C(uVar3,local.unk0);
|
||||
if (sub_80968B0(sub_8096574(uVar1)) != '\0') {
|
||||
local.unk3C[11] = 2;
|
||||
}
|
||||
CreateRescueTitle(&local);
|
||||
iVar6++;
|
||||
} while (iVar6 < gUnknown_203B2E0->unk22);
|
||||
sub_80073E0(gUnknown_203B2E0->unk3C);
|
||||
}
|
@ -44,8 +44,8 @@ struct unkStruct_203B310
|
||||
{
|
||||
// size: 0x84
|
||||
/* 0x0 */ u32 state;
|
||||
u32 unk4;
|
||||
u8 unk8;
|
||||
/* 0x4 */ u32 nextState;
|
||||
/* 0x8 */ bool8 displayClientDialogueSprite; // true to display the dialogue sprite for the client
|
||||
/* 0x9 */ u8 currTeamRank; // team rank
|
||||
u8 unkA;
|
||||
u8 unkB;
|
||||
@ -354,7 +354,7 @@ void sub_802F1E8(void)
|
||||
|
||||
|
||||
|
||||
u32 sub_802F204(struct unkStruct_802F204 *r0, u8 r1)
|
||||
u32 sub_802F204(struct unkStruct_802F204 *r0, bool8 r1)
|
||||
{
|
||||
struct unkStruct_203B310 *preload;
|
||||
|
||||
@ -363,7 +363,7 @@ u32 sub_802F204(struct unkStruct_802F204 *r0, u8 r1)
|
||||
gUnknown_203B310 = MemoryAlloc(sizeof(struct unkStruct_203B310), 8);
|
||||
gUnknown_203B310->unk10 = r0;
|
||||
gUnknown_203B310->itemRewardIndex = 0;
|
||||
gUnknown_203B310->unk8 = r1;
|
||||
gUnknown_203B310->displayClientDialogueSprite = r1;
|
||||
|
||||
// NOTE: dumb var to get correct ordering
|
||||
preload = gUnknown_203B310;
|
||||
@ -459,9 +459,9 @@ void HandleMissionReward(void)
|
||||
}
|
||||
else {
|
||||
gUnknown_202DE30 = moneyReward;
|
||||
if (gUnknown_203B310->unk8 != '\0') {
|
||||
if (gUnknown_203B310->displayClientDialogueSprite) {
|
||||
sub_80141B4(gUnknown_80E0434,0,&gUnknown_203B310->faceFile,0x10d);
|
||||
gUnknown_203B310->unk4 = 1;
|
||||
gUnknown_203B310->nextState = 1;
|
||||
}
|
||||
else {
|
||||
sub_802F2E8(1);
|
||||
@ -477,7 +477,7 @@ void HandleMissionReward(void)
|
||||
else {
|
||||
sub_80141B4(gUnknown_80E0484,0,0,0x101);
|
||||
}
|
||||
gUnknown_203B310->unk4 = 2;
|
||||
gUnknown_203B310->nextState = 2;
|
||||
break;
|
||||
case 2:
|
||||
if (gUnknown_203B310->unk10->friendAreaReward == '\0') {
|
||||
@ -486,9 +486,9 @@ void HandleMissionReward(void)
|
||||
}
|
||||
else {
|
||||
sub_8092578(gUnknown_202E628,gUnknown_203B310->unk10->friendAreaReward,0);
|
||||
if (gUnknown_203B310->unk8 != '\0') {
|
||||
if (gUnknown_203B310->displayClientDialogueSprite) {
|
||||
sub_80141B4(gUnknown_80E04B4,0,&gUnknown_203B310->faceFile,0x10d);
|
||||
gUnknown_203B310->unk4 = 3;
|
||||
gUnknown_203B310->nextState = 3;
|
||||
}
|
||||
else {
|
||||
sub_802F2E8(3);
|
||||
@ -516,7 +516,7 @@ void HandleMissionReward(void)
|
||||
sub_80141B4(gUnknown_80E05FC,0,0,0x101);
|
||||
}
|
||||
}
|
||||
gUnknown_203B310->unk4 = 4;
|
||||
gUnknown_203B310->nextState = 4;
|
||||
break;
|
||||
case 4:
|
||||
uVar7 = gUnknown_203B310->unk10->itemRewards[0];
|
||||
@ -542,9 +542,9 @@ void HandleMissionReward(void)
|
||||
local_20.unk4 = 0;
|
||||
local_20.unk8 = 1;
|
||||
sub_8090E14(gUnknown_202DEA8,(struct ItemSlot *)&local_14,&local_20);
|
||||
if (gUnknown_203B310->unk8 != '\0') {
|
||||
if (gUnknown_203B310->displayClientDialogueSprite) {
|
||||
sub_80141B4(gUnknown_80E0640,0,&gUnknown_203B310->faceFile,0x10d);
|
||||
gUnknown_203B310->unk4 = 5;
|
||||
gUnknown_203B310->nextState = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -594,11 +594,11 @@ void HandleMissionReward(void)
|
||||
PlaySound(0xcb);
|
||||
if (gUnknown_203B310->currTeamRank != GetRescueTeamRank()) {
|
||||
// Rank up time
|
||||
gUnknown_203B310->unk4 = 8;
|
||||
gUnknown_203B310->nextState = 8;
|
||||
}
|
||||
else {
|
||||
// No rank up.. close out
|
||||
gUnknown_203B310->unk4 = 9;
|
||||
gUnknown_203B310->nextState = 9;
|
||||
}
|
||||
gUnknown_202DE30 = gUnknown_203B310->unk10->teamRankPtsReward;
|
||||
sub_80141B4(gUnknown_80E0670,0,0,0x101);
|
||||
@ -607,7 +607,7 @@ void HandleMissionReward(void)
|
||||
case 8:
|
||||
// Rank up
|
||||
PlaySound(0xc9);
|
||||
gUnknown_203B310->unk4 = 9;
|
||||
gUnknown_203B310->nextState = 9;
|
||||
rankString = GetTeamRankString(gUnknown_203B310->currTeamRank);
|
||||
strcpy(gUnknown_202E038,rankString);
|
||||
rankString = GetTeamRankString(GetRescueTeamRank());
|
||||
@ -639,7 +639,7 @@ void sub_802F718(void)
|
||||
s32 temp;
|
||||
|
||||
if (sub_80144A4(&temp) == 0) {
|
||||
sub_802F2E8(gUnknown_203B310->unk4);
|
||||
sub_802F2E8(gUnknown_203B310->nextState);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,14 +2,17 @@
|
||||
#include "text.h"
|
||||
#include "input.h"
|
||||
#include "memory.h"
|
||||
#include "item.h"
|
||||
#include "sub_8095228.h"
|
||||
|
||||
struct unkStruct_203B320
|
||||
{
|
||||
// size: 0xC4
|
||||
u8 unk0[4];
|
||||
u8 fill4[0x20 - 4];
|
||||
u32 unk20;
|
||||
u8 fill24[0x3C - 0x24];
|
||||
u32 wonderMailMode;
|
||||
u32 unk24;
|
||||
u8 fill28[0x3C - 0x28];
|
||||
s16 unk3C;
|
||||
s16 unk3E;
|
||||
s16 unk40;
|
||||
@ -25,6 +28,23 @@ struct unkStruct_203B320
|
||||
extern struct unkStruct_203B320 *gUnknown_203B320;
|
||||
extern struct UnkTextStruct2 gUnknown_80E083C;
|
||||
extern struct UnkTextStruct2 gUnknown_80E0854;
|
||||
extern u8 *gUnknown_80E086C[];
|
||||
|
||||
struct unkStruct_802C39C
|
||||
{
|
||||
/* 0x0 */ u32 unk0[2];
|
||||
/* 0x8 */ struct DungeonLocation *unk8;
|
||||
/* 0xC */ u8 *unkC;
|
||||
/* 0x10 */ s16 unk10;
|
||||
/* 0x12 */ s16 unk12;
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ u8 fill15[0x1B];
|
||||
/* 0x34 */ u8 fill34[2];
|
||||
/* 0x36 */ u8 fill36[0x3C - 0x36];
|
||||
/* 0x3C */ u8 unk3C[0x10];
|
||||
/* 0x4C */ u32 unk4C;
|
||||
/* 0x50 */ u32 unk50[3];
|
||||
};
|
||||
|
||||
extern u8 sub_8030C20(u32);
|
||||
extern s32 sub_8030A74(void);
|
||||
@ -33,19 +53,26 @@ extern void sub_803092C(void);
|
||||
extern void sub_8012D08(struct UnkTextStruct2 *, s32);
|
||||
extern void sub_8013818(void *, u32, u32, u32);
|
||||
|
||||
extern u8 sub_80138B8(u8 *, u32);
|
||||
extern void sub_8013660(u8 *);
|
||||
extern s32 GetKeyPress(u8 *);
|
||||
extern u8 sub_80138B8(u32 *, u32);
|
||||
extern void sub_8013660(u32 *);
|
||||
extern s32 GetKeyPress(u32 *);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_8013984(u8 *);
|
||||
extern void AddMenuCursorSprite(u8 *);
|
||||
extern void sub_8013984(u32 *);
|
||||
extern void AddMenuCursorSprite(u32 *);
|
||||
extern s32 sub_8013800(void *, u32);
|
||||
extern void xxx_call_draw_string(u32, u32, const u8 *, u32, u32);
|
||||
extern void sub_8012BC4(u32 x, u32 y, u32, u32, u32, u32);
|
||||
extern void sub_8008C54(u32);
|
||||
extern void sub_80073B8(u32);
|
||||
extern void sub_80073E0(u32);
|
||||
extern void CreateRescueTitle(void *);
|
||||
|
||||
u32 sub_80306A8(u32 r0, u32 r1, struct UnkTextStruct2_sub *r2, u32 r3)
|
||||
u32 sub_80306A8(u32 wonderMailMode, u32 r1, struct UnkTextStruct2_sub *r2, u32 r3)
|
||||
{
|
||||
if(sub_8030C20(r0))
|
||||
if(sub_8030C20(wonderMailMode))
|
||||
return 0;
|
||||
gUnknown_203B320 = MemoryAlloc(sizeof(struct unkStruct_203B320), 0x8);
|
||||
gUnknown_203B320->unk20 = r0;
|
||||
gUnknown_203B320->wonderMailMode = wonderMailMode;
|
||||
gUnknown_203B320->unk58 = r1;
|
||||
|
||||
gUnknown_203B320->unk5C = &gUnknown_203B320->unk60[gUnknown_203B320->unk58];
|
||||
@ -63,7 +90,7 @@ u32 sub_80306A8(u32 r0, u32 r1, struct UnkTextStruct2_sub *r2, u32 r3)
|
||||
sub_8012D08(gUnknown_203B320->unk5C, r3);
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B320->unk60, 1, 1);
|
||||
sub_8013818(gUnknown_203B320->fill24, sub_8030A74(), r3, r1);
|
||||
sub_8013818(&gUnknown_203B320->unk24, sub_8030A74(), r3, r1);
|
||||
sub_80308A0();
|
||||
sub_803092C();
|
||||
return 1;
|
||||
@ -73,10 +100,10 @@ u32 sub_8030768(u8 r0)
|
||||
{
|
||||
if(r0 == 0)
|
||||
{
|
||||
sub_8013660(gUnknown_203B320->fill24);
|
||||
sub_8013660(&gUnknown_203B320->unk24);
|
||||
return 0;
|
||||
}
|
||||
switch(GetKeyPress(gUnknown_203B320->fill24))
|
||||
switch(GetKeyPress(&gUnknown_203B320->unk24))
|
||||
{
|
||||
case 4:
|
||||
PlayMenuSoundEffect(4);
|
||||
@ -88,7 +115,7 @@ u32 sub_8030768(u8 r0)
|
||||
PlayMenuSoundEffect(0);
|
||||
return 3;
|
||||
default:
|
||||
if(sub_80138B8(gUnknown_203B320->fill24, 1) != 0)
|
||||
if(sub_80138B8(&gUnknown_203B320->unk24, 1) != 0)
|
||||
{
|
||||
sub_80308A0();
|
||||
sub_803092C();
|
||||
@ -111,12 +138,12 @@ void sub_8030810(u32 r0)
|
||||
r0_u8 = r0; // cast needed..
|
||||
|
||||
gUnknown_203B320->unk46 = sub_8030A74();
|
||||
sub_8013984(gUnknown_203B320->fill24);
|
||||
sub_8013984(&gUnknown_203B320->unk24);
|
||||
|
||||
sub_80308A0();
|
||||
sub_803092C();
|
||||
if(r0_u8 != 0)
|
||||
AddMenuCursorSprite(gUnknown_203B320->fill24);
|
||||
AddMenuCursorSprite(&gUnknown_203B320->unk24);
|
||||
}
|
||||
|
||||
void sub_803084C()
|
||||
@ -135,3 +162,132 @@ u8 *sub_8030894()
|
||||
{
|
||||
return gUnknown_203B320->unk0;
|
||||
}
|
||||
|
||||
NAKED
|
||||
void sub_80308A0(void)
|
||||
{
|
||||
asm_unified(
|
||||
"\tpush {r4,lr}\n"
|
||||
"\tldr r4, _08030928\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r1, r0, 0\n"
|
||||
"\tadds r1, 0x44\n"
|
||||
"\tldrh r1, [r1]\n"
|
||||
"\tadds r0, 0xC0\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r1, r0, 0\n"
|
||||
"\tadds r1, 0x42\n"
|
||||
"\tldrh r1, [r1]\n"
|
||||
"\tadds r0, 0xC1\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xC2\n"
|
||||
"\tmovs r1, 0xC\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0xC3\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tbl ResetUnusedInputStruct\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x60\n"
|
||||
"\tmovs r1, 0x1\n"
|
||||
"\tmovs r2, 0x1\n"
|
||||
"\tbl sub_800641C\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tmovs r1, 0x3E\n"
|
||||
"\tldrsh r0, [r0, r1]\n"
|
||||
"\tmovs r1, 0xC\n"
|
||||
"\tbl sub_80095E4\n"
|
||||
"\tadds r0, 0x2\n"
|
||||
"\tlsls r0, 16\n"
|
||||
"\tldr r2, [r4]\n"
|
||||
"\tldr r3, [r2, 0x58]\n"
|
||||
"\tlsls r1, r3, 1\n"
|
||||
"\tadds r1, r3\n"
|
||||
"\tlsls r1, 3\n"
|
||||
"\tadds r1, r2, r1\n"
|
||||
"\tadds r1, 0x6E\n"
|
||||
"\tasrs r3, r0, 16\n"
|
||||
"\tlsrs r0, 16\n"
|
||||
"\tstrh r0, [r1]\n"
|
||||
"\tldr r1, [r2, 0x58]\n"
|
||||
"\tlsls r0, r1, 1\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tlsls r0, 3\n"
|
||||
"\tadds r2, r0\n"
|
||||
"\tadds r3, 0x2\n"
|
||||
"\tadds r2, 0x70\n"
|
||||
"\tstrh r3, [r2]\n"
|
||||
"\tbl ResetUnusedInputStruct\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x60\n"
|
||||
"\tmovs r1, 0x1\n"
|
||||
"\tmovs r2, 0x1\n"
|
||||
"\tbl sub_800641C\n"
|
||||
"\tpop {r4}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_08030928: .4byte gUnknown_203B320");
|
||||
}
|
||||
|
||||
void sub_803092C(void)
|
||||
{
|
||||
struct unkStruct_8095228 *pbVar2;
|
||||
s32 r4;
|
||||
s32 r5;
|
||||
s32 r6;
|
||||
struct unkStruct_802C39C local;
|
||||
|
||||
sub_8008C54(gUnknown_203B320->unk58);
|
||||
sub_80073B8(gUnknown_203B320->unk58);
|
||||
r4 = gUnknown_203B320->unk42 * 8;
|
||||
r5 = r4;
|
||||
r5 += 10;
|
||||
xxx_call_draw_string(r5,0,gUnknown_80E086C[gUnknown_203B320->wonderMailMode],gUnknown_203B320->unk58,0);
|
||||
r4 += 4;
|
||||
r5 = r4 + gUnknown_203B320->unkC0[2] * 8;
|
||||
sub_8012BC4(r5,0,gUnknown_203B320->unk42 + 1,1,7,gUnknown_203B320->unk58);
|
||||
|
||||
r6 = 0;
|
||||
if (r6 < gUnknown_203B320->unk3E) {
|
||||
do {
|
||||
pbVar2 = sub_8095228(gUnknown_203B320->unk0[(gUnknown_203B320->unk42 * gUnknown_203B320->unk40) + r6]);
|
||||
local.unk0[0] = gUnknown_203B320->unk58;
|
||||
local.unk4C = sub_8013800(&gUnknown_203B320->unk24,r6);
|
||||
local.unk3C[8] = 7;
|
||||
local.unk3C[10] = 0;
|
||||
local.unk3C[12] = 0;
|
||||
|
||||
local.unk8 = &pbVar2->dungeon;
|
||||
local.unkC = pbVar2->padding2;
|
||||
|
||||
local.unk10 = (pbVar2->clientSpecies);
|
||||
local.unk12 = (pbVar2->clientSpecies);
|
||||
local.unk14 = 0;
|
||||
local.fill15[0x19] = 5;
|
||||
|
||||
switch(pbVar2->mailType)
|
||||
{
|
||||
case 4:
|
||||
local.unk3C[11] = 3;
|
||||
break;
|
||||
case 5:
|
||||
local.unk3C[11] = 4;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
local.unk3C[11]= 1;
|
||||
break;
|
||||
default:
|
||||
local.unk3C[11]= 0;
|
||||
break;
|
||||
}
|
||||
CreateRescueTitle(&local);
|
||||
r6++;
|
||||
} while (r6 < gUnknown_203B320->unk3E);
|
||||
}
|
||||
sub_80073E0(gUnknown_203B320->unk58);
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
extern u32 sub_8030DA0(void);
|
||||
extern void sub_8030DE4();
|
||||
extern void sub_80310E4(u32);
|
||||
|
||||
|
||||
void sub_8031498(void)
|
||||
{
|
||||
switch(sub_8030DA0())
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sub_8030DE4();
|
||||
sub_80310E4(0);
|
||||
break;
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
|
||||
struct unkStruct_203B324
|
||||
{
|
||||
// size: 0x78
|
||||
u8 fill0[0xC];
|
||||
u8 unkC;
|
||||
u32 unk10;
|
||||
@ -26,7 +27,7 @@ void sub_8030E48(void);
|
||||
|
||||
bool8 sub_8030D40(u8 param_1, s32 param_2)
|
||||
{
|
||||
gUnknown_203B324 = MemoryAlloc(0x78,8);
|
||||
gUnknown_203B324 = MemoryAlloc(sizeof(struct unkStruct_203B324), 8);
|
||||
gUnknown_203B324->unkC = param_1;
|
||||
sub_801317C(gUnknown_203B324);
|
||||
gUnknown_203B324->unk10 = param_2;
|
||||
|
427
src/wonder_mail_6.c
Normal file
427
src/wonder_mail_6.c
Normal file
@ -0,0 +1,427 @@
|
||||
#include "global.h"
|
||||
#include "memory.h"
|
||||
#include "input.h"
|
||||
#include "file_system.h"
|
||||
#include "text.h"
|
||||
#include "pokemon.h"
|
||||
#include "menu.h"
|
||||
#include "code_8094F88.h"
|
||||
|
||||
extern bool8 sub_8030C20(u32);
|
||||
|
||||
struct unkStruct_203B328
|
||||
{
|
||||
// size: 0x11C
|
||||
u32 state;
|
||||
u8 unk4;
|
||||
u32 unk8;
|
||||
u8 fillC[0x58 - 0xC];
|
||||
u32 unk58;
|
||||
u8 fill5C[0xA8 - 0x5C];
|
||||
struct UnkTextStruct2 unkA8[4];
|
||||
/* 0x108 */ struct OpenedFile *faceFile;
|
||||
/* 0x10C */ u8 *faceData;
|
||||
u16 unk110;
|
||||
u16 unk112;
|
||||
/* 0x114 */ u8 unk114;
|
||||
/* 0x115 */ u8 unk115;
|
||||
/* 0x116 */ u8 unk116;
|
||||
u32 wonderMailMode;
|
||||
};
|
||||
extern struct unkStruct_203B328 *gUnknown_203B328;
|
||||
extern struct unkStruct_203B480 *gUnknown_203B480;
|
||||
|
||||
extern u8 gUnknown_80E0A0C[];
|
||||
extern u8 gUnknown_80E09D8[];
|
||||
|
||||
extern struct UnkTextStruct2 gUnknown_80E0990;
|
||||
extern struct UnkTextStruct2 gUnknown_80E09A8;
|
||||
extern struct MenuItem gUnknown_80E0968;
|
||||
extern struct UnkTextStruct2 gUnknown_80E09C0;
|
||||
extern struct MenuItem gUnknown_80E0948;
|
||||
|
||||
extern void sub_8012CAC(struct UnkTextStruct2 *, struct MenuItem *);
|
||||
extern void sub_80306A8(s32, u32, u32, u32);
|
||||
extern void sub_80141B4(char *r0, u32, struct OpenedFile **r1, u32);
|
||||
extern void sub_8031300(void);
|
||||
extern void sub_803136C(void);
|
||||
extern void sub_80313D8(u32);
|
||||
extern void sub_8031498(void);
|
||||
extern void sub_803084C(void);
|
||||
extern void sub_80310FC();
|
||||
extern void sub_8031258();
|
||||
extern u32 sub_8030768(u32);
|
||||
extern u8 sub_80307EC(void);
|
||||
extern u32 sub_8030DA0(void);
|
||||
extern void sub_8030DE4();
|
||||
|
||||
extern void sub_8030810(u32);
|
||||
extern void sub_803092C(void);
|
||||
extern void sub_8030D40(u8, u32);
|
||||
extern void sub_8012EA4(u32 *, u32);
|
||||
extern void sub_8012D60(u32 *, struct MenuItem *, u32, u32, u32, u32);
|
||||
extern u8 sub_8012FD8(u32 *);
|
||||
extern void sub_8013114(u32 *, s32 *);
|
||||
extern void sub_8095240(u8);
|
||||
|
||||
bool8 sub_8030F58(u32 wonderMailMode)
|
||||
{
|
||||
struct OpenedFile *iVar3;
|
||||
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(0,1,1);
|
||||
if (gUnknown_203B328 == NULL) {
|
||||
gUnknown_203B328 = MemoryAlloc(sizeof(struct unkStruct_203B328),8);
|
||||
MemoryFill8((u8 *)gUnknown_203B328,0,sizeof(struct unkStruct_203B328));
|
||||
}
|
||||
gUnknown_203B328->wonderMailMode = wonderMailMode;
|
||||
iVar3 = GetDialogueSpriteDataPtr(0x130);
|
||||
gUnknown_203B328->faceFile = iVar3;
|
||||
gUnknown_203B328->faceData = iVar3->data;
|
||||
gUnknown_203B328->unk114 = 0;
|
||||
gUnknown_203B328->unk115 = 0;
|
||||
gUnknown_203B328->unk116 = 0;
|
||||
gUnknown_203B328->unk110 = 2;
|
||||
gUnknown_203B328->unk112 = 8;
|
||||
|
||||
if (sub_8030C20(wonderMailMode)) {
|
||||
switch(wonderMailMode)
|
||||
{
|
||||
case 2:
|
||||
// "You don{APOSTROPHE}t have any {COLOR_1 LIGHT_BLUE_2}SOS Mail{END_COLOR_TEXT_1}.\0"
|
||||
sub_80141B4(gUnknown_80E09D8,0,&gUnknown_203B328->faceFile,0x101);
|
||||
break;
|
||||
case 4:
|
||||
// "You don{APOSTROPHE}t have any {COLOR_1 LIGHT_BLUE_2}A-OK Mail{END_COLOR_TEXT_1}.\0"
|
||||
sub_80141B4(gUnknown_80E0A0C,0,&gUnknown_203B328->faceFile,0x101);
|
||||
break;
|
||||
}
|
||||
gUnknown_203B328->state = 5;
|
||||
}
|
||||
else {
|
||||
gUnknown_203B328->state = 0;
|
||||
sub_80306A8(wonderMailMode,0,0,8);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 sub_8031050(void)
|
||||
{
|
||||
switch(gUnknown_203B328->state)
|
||||
{
|
||||
case 0:
|
||||
sub_8031300();
|
||||
break;
|
||||
case 1:
|
||||
sub_803136C();
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sub_80313D8(gUnknown_203B328->state);
|
||||
break;
|
||||
case 4:
|
||||
sub_8031498();
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_80310B4(void)
|
||||
{
|
||||
sub_803084C();
|
||||
if (gUnknown_203B328 != NULL) {
|
||||
CloseFile(gUnknown_203B328->faceFile);
|
||||
MemoryFree(gUnknown_203B328);
|
||||
gUnknown_203B328 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80310E4(u32 newState)
|
||||
{
|
||||
gUnknown_203B328->state = newState;
|
||||
sub_80310FC();
|
||||
sub_8031258();
|
||||
}
|
||||
|
||||
void sub_80310FC(void)
|
||||
{
|
||||
sub_8006518(gUnknown_203B328->unkA8);
|
||||
switch(gUnknown_203B328->state)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203B328->unkA8[1] = gUnknown_80E0990;
|
||||
gUnknown_203B328->unkA8[2] = gUnknown_80E0990;
|
||||
gUnknown_203B328->unkA8[3] = gUnknown_80E0990;
|
||||
break;
|
||||
case 1:
|
||||
gUnknown_203B328->unkA8[1] = gUnknown_80E09A8;
|
||||
gUnknown_203B328->unkA8[2] = gUnknown_80E0990;
|
||||
gUnknown_203B328->unkA8[3] = gUnknown_80E0990;
|
||||
sub_8012CAC(&gUnknown_203B328->unkA8[1], &gUnknown_80E0968);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
gUnknown_203B328->unkA8[2] = gUnknown_80E09C0;
|
||||
sub_8012CAC(&gUnknown_203B328->unkA8[2], &gUnknown_80E0948);
|
||||
break;
|
||||
case 4:
|
||||
gUnknown_203B328->unkA8[0] = gUnknown_80E0990;
|
||||
gUnknown_203B328->unkA8[1] = gUnknown_80E0990;
|
||||
gUnknown_203B328->unkA8[2] = gUnknown_80E0990;
|
||||
gUnknown_203B328->unkA8[3] = gUnknown_80E0990;
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
default:
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(0, 1, 1);
|
||||
break;
|
||||
}
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B328->unkA8, 1, 1);
|
||||
}
|
||||
|
||||
void sub_8031258(void)
|
||||
{
|
||||
switch(gUnknown_203B328->state)
|
||||
{
|
||||
case 0:
|
||||
sub_8030810(1);
|
||||
break;
|
||||
case 1:
|
||||
sub_803092C();
|
||||
sub_8012D60(&gUnknown_203B328->unk8, &gUnknown_80E0968, 0, 0, 4, 1);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sub_803092C();
|
||||
sub_8012EA4(&gUnknown_203B328->unk8, 0);
|
||||
sub_8012D60(&gUnknown_203B328->unk58, &gUnknown_80E0948, 0, 0, 3, 2);
|
||||
break;
|
||||
case 4:
|
||||
sub_8030D40(gUnknown_203B328->unk4, 3);
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8031300(void)
|
||||
{
|
||||
switch(sub_8030768(1))
|
||||
{
|
||||
case 3:
|
||||
gUnknown_203B328->unk4 = sub_80307EC();
|
||||
sub_80310E4(1);
|
||||
break;
|
||||
case 4:
|
||||
gUnknown_203B328->unk4 = sub_80307EC();
|
||||
sub_80310E4(4);
|
||||
break;
|
||||
case 2:
|
||||
sub_80310E4(6);
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_803136C(void)
|
||||
{
|
||||
s32 local_c;
|
||||
|
||||
local_c = 0;
|
||||
sub_8030768(0);
|
||||
if (sub_8012FD8(&gUnknown_203B328->unk8) == '\0') {
|
||||
sub_8013114(&gUnknown_203B328->unk8,&local_c);
|
||||
}
|
||||
|
||||
switch(local_c)
|
||||
{
|
||||
case 1:
|
||||
sub_80310E4(0);
|
||||
break;
|
||||
case 6:
|
||||
sub_80310E4(3);
|
||||
break;
|
||||
case 4:
|
||||
sub_80310E4(2);
|
||||
break;
|
||||
case 5:
|
||||
sub_80310E4(4);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_80313D8(u32 param_1)
|
||||
{
|
||||
s32 iVar2;
|
||||
s32 local_10;
|
||||
|
||||
local_10 = 0;
|
||||
sub_8030768(0);
|
||||
sub_8012FD8(&gUnknown_203B328->unk8);
|
||||
if (sub_8012FD8(&gUnknown_203B328->unk58) == '\0') {
|
||||
sub_8013114(&gUnknown_203B328->unk58,&local_10);
|
||||
}
|
||||
|
||||
switch(local_10)
|
||||
{
|
||||
case 1:
|
||||
case 3:
|
||||
sub_80310E4(0);
|
||||
break;
|
||||
case 2:
|
||||
switch(param_1)
|
||||
{
|
||||
case 2:
|
||||
sub_8095240(gUnknown_203B328->unk4);
|
||||
break;
|
||||
case 3:
|
||||
for(iVar2 = 0; iVar2 < 0x20; iVar2++)
|
||||
{
|
||||
gUnknown_203B480[iVar2].unk0 = 0;
|
||||
gUnknown_203B480[iVar2].unk22 = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ((gUnknown_203B328->wonderMailMode == 2) || (gUnknown_203B328->wonderMailMode == 4)) {
|
||||
if (sub_8030C20(gUnknown_203B328->wonderMailMode) != '\0') {
|
||||
sub_80310E4(5);
|
||||
}
|
||||
else {
|
||||
sub_80310E4(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_80313D8(u32 param_1)
|
||||
{
|
||||
asm_unified(
|
||||
"\tpush {r4,r5,lr}\n"
|
||||
"\tsub sp, 0x4\n"
|
||||
"\tadds r5, r0, 0\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tstr r0, [sp]\n"
|
||||
"\tbl sub_8030768\n"
|
||||
"\tldr r4, _08031418\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x8\n"
|
||||
"\tbl sub_8012FD8\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x58\n"
|
||||
"\tbl sub_8012FD8\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _08031408\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x58\n"
|
||||
"\tmov r1, sp\n"
|
||||
"\tbl sub_8013114\n"
|
||||
"_08031408:\n"
|
||||
"\tldr r0, [sp]\n"
|
||||
"\tcmp r0, 0x2\n"
|
||||
"\tbeq _08031428\n"
|
||||
"\tcmp r0, 0x2\n"
|
||||
"\tbgt _0803141C\n"
|
||||
"\tcmp r0, 0x1\n"
|
||||
"\tbeq _08031420\n"
|
||||
"\tb _0803148E\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_08031418: .4byte gUnknown_203B328\n"
|
||||
"_0803141C:\n"
|
||||
"\tcmp r0, 0x3\n"
|
||||
"\tbne _0803148E\n"
|
||||
"_08031420:\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tbl sub_80310E4\n"
|
||||
"\tb _0803148E\n"
|
||||
"_08031428:\n"
|
||||
"\tcmp r5, 0x2\n"
|
||||
"\tbeq _08031432\n"
|
||||
"\tcmp r5, 0x3\n"
|
||||
"\tbeq _0803143C\n"
|
||||
"\tb _0803145A\n"
|
||||
"_08031432:\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tldrb r0, [r0, 0x4]\n"
|
||||
"\tbl sub_8095240\n"
|
||||
"\tb _0803145A\n"
|
||||
"_0803143C:\n"
|
||||
"\tldr r4, _08031480\n"
|
||||
"\tmovs r3, 0\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r2, 0x1F\n"
|
||||
"_08031444:\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tstrb r3, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tadds r0, 0x22\n"
|
||||
"\tstrb r3, [r0]\n"
|
||||
"\tadds r1, 0x30\n"
|
||||
"\tsubs r2, 0x1\n"
|
||||
"\tcmp r2, 0\n"
|
||||
"\tbge _08031444\n"
|
||||
"_0803145A:\n"
|
||||
"\tldr r0, _08031484\n"
|
||||
"\tldr r0, [r0]\n"
|
||||
"\tmovs r1, 0x8C\n"
|
||||
"\tlsls r1, 1\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tldr r0, [r0]\n"
|
||||
"\tcmp r0, 0x2\n"
|
||||
"\tbeq _0803146E\n"
|
||||
"\tcmp r0, 0x4\n"
|
||||
"\tbne _0803148E\n"
|
||||
"_0803146E:\n"
|
||||
"\tbl sub_8030C20\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _08031488\n"
|
||||
"\tmovs r0, 0x5\n"
|
||||
"\tbl sub_80310E4\n"
|
||||
"\tb _0803148E\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_08031480: .4byte gUnknown_203B480\n"
|
||||
"_08031484: .4byte gUnknown_203B328\n"
|
||||
"_08031488:\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tbl sub_80310E4\n"
|
||||
"_0803148E:\n"
|
||||
"\tadd sp, 0x4\n"
|
||||
"\tpop {r4,r5}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0"
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_8031498(void)
|
||||
{
|
||||
switch(sub_8030DA0())
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sub_8030DE4();
|
||||
sub_80310E4(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,38 +1,53 @@
|
||||
gMPlayTrack_BGM = .; /* 2000000 */
|
||||
. += 0x3C0;
|
||||
|
||||
gMPlayTrack_Unknown1 = .; /* 20003C0 */
|
||||
gMPlayTrack_Fanfare = .; /* 20003C0 */
|
||||
. += 0x1E0;
|
||||
|
||||
gMPlayTrack_Unknown2 = .; /* 20005A0 */
|
||||
gMPlayTrack_SE1 = .; /* 20005A0 */
|
||||
. += 0x50;
|
||||
|
||||
gMPlayTrack_Unknown3 = .; /* 20005F0 */
|
||||
gMPlayTrack_SE2 = .; /* 20005F0 */
|
||||
. += 0x50;
|
||||
|
||||
gMPlayTrack_Unknown4 = .; /* 2000640 */
|
||||
gMPlayTrack_SE3 = .; /* 2000640 */
|
||||
. += 0xA0;
|
||||
|
||||
gMPlayTrack_Unknown5 = .; /* 20006E0 */
|
||||
gMPlayTrack_SE4 = .; /* 20006E0 */
|
||||
. += 0xA0;
|
||||
|
||||
gMPlayTrack_Unknown6 = .; /* 2000780 */
|
||||
gMPlayTrack_SE5 = .; /* 2000780 */
|
||||
. += 0xA0;
|
||||
|
||||
gMPlayTrack_Unknown7 = .; /* 2000820 */
|
||||
gMPlayTrack_SE6 = .; /* 2000820 */
|
||||
. += 0x50;
|
||||
|
||||
gUnknown_2000870 = .; /* 2000870 */
|
||||
. += 0x80;
|
||||
gMPlayInfo_SE4 = .; /* 2000870 */
|
||||
. += 0x40;
|
||||
|
||||
gMPlayInfo_SE5 = .; /* 20008B0 */
|
||||
. += 0x40;
|
||||
|
||||
gMPlayInfo_BGM = .; /* 20008F0 */
|
||||
. += 0x80;
|
||||
. += 0x40;
|
||||
|
||||
gUnknown_2000970 = .; /* 2000970 */
|
||||
. += 0xC0;
|
||||
gMPlayInfo_SE6 = .; /* 2000930 */
|
||||
. += 0x40;
|
||||
|
||||
gMPlayInfo_Fanfare = .; /* 2000970 */
|
||||
. += 0x40;
|
||||
|
||||
gMPlayInfo_SE1 = .; /* 20009B0 */
|
||||
. += 0x40;
|
||||
|
||||
gMPlayInfo_SE3 = .; /* 20009F0 */
|
||||
. += 0x40;
|
||||
|
||||
gMPlayMemAccArea = .; /* 2000A30 */
|
||||
. += 0x50;
|
||||
. += 0x10;
|
||||
|
||||
gMPlayInfo_SE2 = .; /* 2000A40 */
|
||||
. += 0x40;
|
||||
|
||||
gUnknown_2000A80 = .; /* 2000A80 */
|
||||
. += 0x8;
|
||||
@ -302,19 +317,19 @@ gBGMusicPlayerState = .; /* 202D688 */
|
||||
gCurrentBGSong = .; /* 202D68A */
|
||||
. += 0x2;
|
||||
|
||||
gUnknown_202D68C = .; /* 202D68C */
|
||||
gQueuedBGSong = .; /* 202D68C */
|
||||
. += 0x2;
|
||||
|
||||
gUnknown_202D68E = .; /* 202D68E */
|
||||
gCurrentFanfareSong = .; /* 202D68E */
|
||||
. += 0x2;
|
||||
|
||||
gUnknown_202D690 = .; /* 202D690 */
|
||||
gFanfareMusicPlayerState = .; /* 202D690 */
|
||||
. += 0x2;
|
||||
|
||||
gUnknown_202D692 = .; /* 202D692 */
|
||||
gMusicTransitionCounter = .; /* 202D692 */
|
||||
. += 0x2;
|
||||
|
||||
gUnknown_202D694 = .; /* 202D694 */
|
||||
gRestartBGM = .; /* 202D694 */
|
||||
. += 0x4;
|
||||
|
||||
gBG0Control = .; /* 202D698 */
|
||||
@ -537,7 +552,7 @@ gUnknown_202EC48 = .; /* 202EC48 */
|
||||
gUnknown_202EC4C = .; /* 202EC4C */
|
||||
. += 0x4;
|
||||
|
||||
gUnknown_202EC50 = .; /* 202EC50 */
|
||||
gRescuePasswordBuffer = .; /* 202EC50 */
|
||||
. += 0x38;
|
||||
|
||||
gDungeonNameBannerPalette = .; /* 202EC88 */
|
||||
|
Loading…
Reference in New Issue
Block a user