mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 11:14:15 +01:00
Begin use pokeblock and menu specialised
This commit is contained in:
parent
8184688330
commit
aa7f69f067
@ -6,857 +6,11 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81D2C68
|
||||
sub_81D2C68: @ 81D2C68
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
cmp r0, 0xE
|
||||
bne _081D2CA8
|
||||
cmp r2, 0x2
|
||||
beq _081D2C7E
|
||||
cmp r2, 0x7
|
||||
bne _081D2C94
|
||||
_081D2C7E:
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
adds r1, r2, 0
|
||||
adds r2, r3, 0
|
||||
bl GetMonData
|
||||
b _081D2CCA
|
||||
.pool
|
||||
_081D2C94:
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
adds r1, r2, 0
|
||||
bl GetMonData
|
||||
b _081D2CCA
|
||||
.pool
|
||||
_081D2CA8:
|
||||
cmp r2, 0x2
|
||||
beq _081D2CB0
|
||||
cmp r2, 0x7
|
||||
bne _081D2CBE
|
||||
_081D2CB0:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
bl GetAndCopyBoxMonDataAt
|
||||
b _081D2CCA
|
||||
_081D2CBE:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
bl GetBoxMonDataAt
|
||||
_081D2CCA:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D2C68
|
||||
|
||||
thumb_func_start sub_81D2CD0
|
||||
sub_81D2CD0: @ 81D2CD0
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
adds r5, r0, 0
|
||||
lsls r1, 16
|
||||
lsrs r4, r1, 16
|
||||
lsls r2, 16
|
||||
lsrs r6, r2, 16
|
||||
movs r0, 0xFC
|
||||
strb r0, [r5]
|
||||
adds r5, 0x1
|
||||
movs r0, 0x4
|
||||
strb r0, [r5]
|
||||
adds r5, 0x1
|
||||
movs r0, 0x8
|
||||
strb r0, [r5]
|
||||
adds r5, 0x1
|
||||
movs r0, 0
|
||||
strb r0, [r5]
|
||||
adds r5, 0x1
|
||||
movs r0, 0x9
|
||||
strb r0, [r5]
|
||||
adds r5, 0x1
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x2D
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
cmp r0, 0
|
||||
beq _081D2D20
|
||||
ldr r1, =gText_EggNickname
|
||||
adds r0, r5, 0
|
||||
movs r2, 0
|
||||
movs r3, 0xC
|
||||
bl StringCopyPadded
|
||||
b _081D2E70
|
||||
.pool
|
||||
_081D2D20:
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x2
|
||||
adds r3, r5, 0
|
||||
bl sub_81D2C68
|
||||
adds r0, r5, 0
|
||||
bl StringGetEnd10
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0xB
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
lsls r0, 16
|
||||
lsrs r7, r0, 16
|
||||
cmp r4, 0xE
|
||||
bne _081D2D70
|
||||
movs r0, 0x64
|
||||
adds r4, r6, 0
|
||||
muls r4, r0
|
||||
ldr r0, =gPlayerParty
|
||||
adds r4, r0
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x38
|
||||
bl GetMonData
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
mov r8, r0
|
||||
adds r0, r4, 0
|
||||
bl GetMonGender
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
b _081D2D92
|
||||
.pool
|
||||
_081D2D70:
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r6, 24
|
||||
lsrs r1, 24
|
||||
bl GetBoxedMonPtr
|
||||
adds r4, r0, 0
|
||||
bl GetBoxMonGender
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
adds r0, r4, 0
|
||||
bl GetLevelFromBoxMonExp
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
_081D2D92:
|
||||
cmp r7, 0x1D
|
||||
beq _081D2D9A
|
||||
cmp r7, 0x20
|
||||
bne _081D2DB0
|
||||
_081D2D9A:
|
||||
movs r0, 0xB
|
||||
adds r1, r7, 0
|
||||
muls r1, r0
|
||||
ldr r0, =gSpeciesNames
|
||||
adds r1, r0
|
||||
adds r0, r5, 0
|
||||
bl StringCompare
|
||||
cmp r0, 0
|
||||
bne _081D2DB0
|
||||
movs r6, 0xFF
|
||||
_081D2DB0:
|
||||
adds r3, r5, 0
|
||||
b _081D2DBA
|
||||
.pool
|
||||
_081D2DB8:
|
||||
adds r3, 0x1
|
||||
_081D2DBA:
|
||||
ldrb r0, [r3]
|
||||
cmp r0, 0xFF
|
||||
bne _081D2DB8
|
||||
movs r1, 0xFC
|
||||
strb r1, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x12
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x3C
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
cmp r6, 0
|
||||
beq _081D2DDE
|
||||
cmp r6, 0xFE
|
||||
beq _081D2E02
|
||||
movs r0, 0
|
||||
b _081D2E24
|
||||
_081D2DDE:
|
||||
strb r1, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x1
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x4
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
strb r1, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x3
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x5
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0xB5
|
||||
b _081D2E24
|
||||
_081D2E02:
|
||||
strb r1, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x1
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x6
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
strb r1, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x3
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x7
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0xB6
|
||||
_081D2E24:
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0xFC
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x4
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x8
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r4, 0
|
||||
strb r4, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x9
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0xBA
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0xF9
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0x5
|
||||
strb r0, [r3]
|
||||
adds r3, 0x1
|
||||
adds r0, r3, 0
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
movs r3, 0x3
|
||||
bl ConvertIntToDecimalStringN
|
||||
adds r3, r0, 0
|
||||
strb r4, [r3]
|
||||
adds r3, 0x1
|
||||
movs r0, 0xFF
|
||||
strb r0, [r3]
|
||||
adds r0, r3, 0
|
||||
_081D2E70:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D2CD0
|
||||
|
||||
thumb_func_start sub_81D2E7C
|
||||
sub_81D2E7C: @ 81D2E7C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r2, 16
|
||||
lsrs r2, 16
|
||||
b _081D2E94
|
||||
_081D2E86:
|
||||
strb r3, [r4]
|
||||
adds r1, 0x1
|
||||
adds r4, 0x1
|
||||
lsls r0, r2, 16
|
||||
ldr r2, =0xffff0000
|
||||
adds r0, r2
|
||||
lsrs r2, r0, 16
|
||||
_081D2E94:
|
||||
ldrb r3, [r1]
|
||||
adds r0, r3, 0
|
||||
cmp r0, 0xFF
|
||||
bne _081D2E86
|
||||
adds r1, r2, 0
|
||||
lsls r0, r1, 16
|
||||
ldr r2, =0xffff0000
|
||||
adds r0, r2
|
||||
lsrs r2, r0, 16
|
||||
lsls r1, 16
|
||||
cmp r1, 0
|
||||
ble _081D2EC2
|
||||
movs r3, 0
|
||||
_081D2EAE:
|
||||
strb r3, [r4]
|
||||
adds r4, 0x1
|
||||
adds r1, r2, 0
|
||||
lsls r0, r1, 16
|
||||
ldr r2, =0xffff0000
|
||||
adds r0, r2
|
||||
lsrs r2, r0, 16
|
||||
lsls r1, 16
|
||||
cmp r1, 0
|
||||
bgt _081D2EAE
|
||||
_081D2EC2:
|
||||
movs r0, 0xFF
|
||||
strb r0, [r4]
|
||||
adds r0, r4, 0
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81D2E7C
|
||||
|
||||
thumb_func_start sub_81D2ED4
|
||||
sub_81D2ED4: @ 81D2ED4
|
||||
push {r4-r7,lr}
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
ldr r0, [sp, 0x14]
|
||||
ldr r1, [sp, 0x18]
|
||||
ldr r4, [sp, 0x1C]
|
||||
lsls r2, 16
|
||||
lsrs r7, r2, 16
|
||||
lsls r3, 16
|
||||
lsrs r3, 16
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r0, r1, 16
|
||||
lsls r4, 24
|
||||
cmp r4, 0
|
||||
bne _081D2EFC
|
||||
subs r0, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
_081D2EFC:
|
||||
cmp r2, r0
|
||||
beq _081D2F42
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
adds r2, r3, 0
|
||||
bl sub_81D2CD0
|
||||
movs r0, 0xFC
|
||||
strb r0, [r5]
|
||||
movs r0, 0x4
|
||||
strb r0, [r5, 0x1]
|
||||
movs r0, 0x8
|
||||
strb r0, [r5, 0x2]
|
||||
movs r0, 0
|
||||
strb r0, [r5, 0x3]
|
||||
movs r0, 0x9
|
||||
strb r0, [r5, 0x4]
|
||||
cmp r7, 0xE
|
||||
bne _081D2F2C
|
||||
adds r0, r5, 0x5
|
||||
ldr r1, =gText_InParty
|
||||
b _081D2F3A
|
||||
.pool
|
||||
_081D2F2C:
|
||||
adds r4, r5, 0x5
|
||||
lsls r0, r7, 24
|
||||
lsrs r0, 24
|
||||
bl GetBoxNamePtr
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
_081D2F3A:
|
||||
movs r2, 0x8
|
||||
bl sub_81D2E7C
|
||||
b _081D2F72
|
||||
_081D2F42:
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
_081D2F46:
|
||||
adds r0, r6, r1
|
||||
strb r2, [r0]
|
||||
adds r0, r1, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
cmp r1, 0xB
|
||||
bls _081D2F46
|
||||
adds r1, r6, r1
|
||||
movs r0, 0xFF
|
||||
strb r0, [r1]
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
_081D2F5E:
|
||||
adds r0, r5, r1
|
||||
strb r2, [r0]
|
||||
adds r0, r1, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
cmp r1, 0x7
|
||||
bls _081D2F5E
|
||||
adds r1, r5, r1
|
||||
movs r0, 0xFF
|
||||
strb r0, [r1]
|
||||
_081D2F72:
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81D2ED4
|
||||
|
||||
thumb_func_start sub_81D2F78
|
||||
sub_81D2F78: @ 81D2F78
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
mov r8, r0
|
||||
mov r10, r1
|
||||
ldr r0, [sp, 0x20]
|
||||
ldr r1, [sp, 0x24]
|
||||
ldr r4, [sp, 0x28]
|
||||
ldr r5, [sp, 0x2C]
|
||||
lsls r2, 16
|
||||
lsrs r7, r2, 16
|
||||
lsls r3, 16
|
||||
lsrs r6, r3, 16
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
mov r9, r1
|
||||
lsls r4, 16
|
||||
lsrs r0, r4, 16
|
||||
lsls r5, 24
|
||||
cmp r5, 0
|
||||
bne _081D2FB0
|
||||
subs r0, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
_081D2FB0:
|
||||
cmp r2, r0
|
||||
beq _081D305C
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x16
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
mov r1, r9
|
||||
lsls r5, r1, 2
|
||||
adds r4, r5, r1
|
||||
mov r2, r8
|
||||
adds r1, r2, r4
|
||||
strb r0, [r1]
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x2F
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
mov r1, r8
|
||||
adds r1, 0x1
|
||||
adds r1, r4
|
||||
strb r0, [r1]
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x21
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
mov r1, r8
|
||||
adds r1, 0x2
|
||||
adds r1, r4
|
||||
strb r0, [r1]
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x18
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
mov r1, r8
|
||||
adds r1, 0x3
|
||||
adds r1, r4
|
||||
strb r0, [r1]
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x17
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
mov r1, r8
|
||||
adds r1, 0x4
|
||||
adds r1, r4
|
||||
strb r0, [r1]
|
||||
mov r4, r10
|
||||
add r4, r9
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x30
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
cmp r0, 0xFF
|
||||
beq _081D3044
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x30
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
movs r1, 0x1D
|
||||
bl __udivsi3
|
||||
b _081D3046
|
||||
_081D3044:
|
||||
movs r0, 0x9
|
||||
_081D3046:
|
||||
strb r0, [r4]
|
||||
mov r0, r9
|
||||
adds r1, r5, r0
|
||||
mov r2, r8
|
||||
adds r0, r2, r1
|
||||
lsls r1, 2
|
||||
adds r1, 0x14
|
||||
add r1, r8
|
||||
bl sub_81D2754
|
||||
b _081D3086
|
||||
_081D305C:
|
||||
movs r2, 0
|
||||
mov r0, r9
|
||||
lsls r5, r0, 2
|
||||
adds r1, r5, r0
|
||||
movs r6, 0
|
||||
lsls r3, r1, 2
|
||||
movs r5, 0x9B
|
||||
movs r4, 0x5B
|
||||
_081D306C:
|
||||
adds r0, r2, r1
|
||||
add r0, r8
|
||||
strb r6, [r0]
|
||||
lsls r0, r2, 2
|
||||
adds r0, r3
|
||||
add r0, r8
|
||||
strh r5, [r0, 0x14]
|
||||
strh r4, [r0, 0x16]
|
||||
adds r0, r2, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
cmp r2, 0x4
|
||||
bls _081D306C
|
||||
_081D3086:
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81D2F78
|
||||
|
||||
thumb_func_start sub_81D3094
|
||||
sub_81D3094: @ 81D3094
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x4
|
||||
mov r8, r0
|
||||
mov r9, r1
|
||||
ldr r0, [sp, 0x20]
|
||||
ldr r1, [sp, 0x24]
|
||||
ldr r4, [sp, 0x28]
|
||||
lsls r2, 16
|
||||
lsrs r7, r2, 16
|
||||
lsls r3, 16
|
||||
lsrs r5, r3, 16
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r0, r1, 16
|
||||
lsls r4, 24
|
||||
cmp r4, 0
|
||||
bne _081D30C4
|
||||
subs r0, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
_081D30C4:
|
||||
cmp r2, r0
|
||||
beq _081D311A
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x41
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x1
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
adds r6, r0, 0
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
adds r5, r0, 0
|
||||
lsls r0, r4, 3
|
||||
ldr r1, =gMonFrontPicTable
|
||||
adds r0, r1
|
||||
movs r1, 0x1
|
||||
str r1, [sp]
|
||||
mov r1, r8
|
||||
adds r2, r4, 0
|
||||
adds r3, r5, 0
|
||||
bl LoadSpecialPokePic
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
adds r2, r5, 0
|
||||
bl GetFrontSpritePalFromSpeciesAndPersonality
|
||||
mov r1, r9
|
||||
bl LZ77UnCompWram
|
||||
_081D311A:
|
||||
add sp, 0x4
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D3094
|
||||
|
||||
thumb_func_start sub_81D312C
|
||||
sub_81D312C: @ 81D312C
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
ldrh r0, [r1]
|
||||
adds r0, 0x18
|
||||
strh r0, [r1]
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
ble _081D3140
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
_081D3140:
|
||||
movs r0, 0
|
||||
ldrsh r1, [r1, r0]
|
||||
negs r0, r1
|
||||
orrs r0, r1
|
||||
lsrs r0, 31
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D312C
|
||||
|
||||
thumb_func_start sub_81D3150
|
||||
sub_81D3150: @ 81D3150
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
ldrh r0, [r1]
|
||||
subs r0, 0x18
|
||||
strh r0, [r1]
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
movs r2, 0x50
|
||||
negs r2, r2
|
||||
cmp r0, r2
|
||||
bge _081D3168
|
||||
strh r2, [r1]
|
||||
_081D3168:
|
||||
movs r0, 0
|
||||
ldrsh r1, [r1, r0]
|
||||
eors r1, r2
|
||||
negs r0, r1
|
||||
orrs r0, r1
|
||||
lsrs r0, 31
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D3150
|
||||
|
||||
thumb_func_start sub_81D3178
|
||||
sub_81D3178: @ 81D3178
|
||||
push {r4,r5,lr}
|
||||
adds r5, r1, 0
|
||||
bl sub_81D2074
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
bl sub_81D312C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0
|
||||
cmp r4, 0
|
||||
bne _081D319A
|
||||
cmp r0, 0
|
||||
beq _081D319C
|
||||
_081D319A:
|
||||
movs r1, 0x1
|
||||
_081D319C:
|
||||
adds r0, r1, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D3178
|
||||
|
||||
thumb_func_start sub_81D31A4
|
||||
sub_81D31A4: @ 81D31A4
|
||||
push {r4,r5,lr}
|
||||
adds r5, r1, 0
|
||||
bl sub_81D2074
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
bl sub_81D3150
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0
|
||||
cmp r4, 0
|
||||
bne _081D31C6
|
||||
cmp r0, 0
|
||||
beq _081D31C8
|
||||
_081D31C6:
|
||||
movs r1, 0x1
|
||||
_081D31C8:
|
||||
adds r0, r1, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D31A4
|
||||
|
||||
thumb_func_start sub_81D31D0
|
||||
sub_81D31D0: @ 81D31D0
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x20
|
||||
ldr r3, =gUnknown_08625A48
|
||||
ldr r4, [r3]
|
||||
ldr r5, [r3, 0x4]
|
||||
str r4, [sp, 0x18]
|
||||
str r5, [sp, 0x1C]
|
||||
mov r4, sp
|
||||
ldr r3, =gUnknown_08625A50
|
||||
ldm r3!, {r5-r7}
|
||||
stm r4!, {r5-r7}
|
||||
ldm r3!, {r5-r7}
|
||||
stm r4!, {r5-r7}
|
||||
ldr r3, =gUnknown_08625A68
|
||||
ldr r4, [r3, 0x4]
|
||||
ldr r3, [r3]
|
||||
ldr r5, [sp, 0x18]
|
||||
ldr r6, [sp, 0x1C]
|
||||
str r5, [r0]
|
||||
str r6, [r0, 0x4]
|
||||
mov r0, sp
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
str r3, [r2]
|
||||
str r4, [r2, 0x4]
|
||||
add sp, 0x20
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D31D0
|
||||
|
||||
thumb_func_start sub_81D321C
|
||||
sub_81D321C: @ 81D321C
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x50
|
||||
adds r5, r0, 0
|
||||
mov r12, r1
|
||||
mov r8, r2
|
||||
mov r1, sp
|
||||
ldr r0, =gUnknown_08625A70
|
||||
ldm r0!, {r2-r4}
|
||||
stm r1!, {r2-r4}
|
||||
ldm r0!, {r2,r6,r7}
|
||||
stm r1!, {r2,r6,r7}
|
||||
ldm r0!, {r3,r4}
|
||||
stm r1!, {r3,r4}
|
||||
add r3, sp, 0x20
|
||||
adds r1, r3, 0
|
||||
ldr r0, =gUnknown_08625A90
|
||||
ldm r0!, {r2,r6,r7}
|
||||
stm r1!, {r2,r6,r7}
|
||||
ldm r0!, {r4,r6,r7}
|
||||
stm r1!, {r4,r6,r7}
|
||||
add r2, sp, 0x38
|
||||
adds r1, r2, 0
|
||||
ldr r0, =gUnknown_08625AA8
|
||||
ldm r0!, {r4,r6,r7}
|
||||
stm r1!, {r4,r6,r7}
|
||||
ldm r0!, {r4,r6,r7}
|
||||
stm r1!, {r4,r6,r7}
|
||||
movs r4, 0
|
||||
_081D3258:
|
||||
lsls r0, r4, 3
|
||||
add r0, sp
|
||||
ldr r1, [r0, 0x4]
|
||||
ldr r0, [r0]
|
||||
stm r5!, {r0,r1}
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x3
|
||||
bls _081D3258
|
||||
mov r1, r12
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r2,r4,r5}
|
||||
stm r1!, {r2,r4,r5}
|
||||
ldm r0!, {r2,r6,r7}
|
||||
stm r1!, {r2,r6,r7}
|
||||
movs r4, 0
|
||||
_081D327A:
|
||||
lsls r0, r4, 3
|
||||
adds r0, r3, r0
|
||||
ldr r1, [r0, 0x4]
|
||||
ldr r0, [r0]
|
||||
mov r5, r8
|
||||
adds r5, 0x8
|
||||
mov r8, r5
|
||||
subs r5, 0x8
|
||||
stm r5!, {r0,r1}
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x2
|
||||
bls _081D327A
|
||||
add sp, 0x50
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D321C
|
||||
|
||||
thumb_func_start sub_81D32B0
|
||||
sub_81D32B0: @ 81D32B0
|
||||
push {r4,r5,lr}
|
||||
ldr r2, =gUnknown_08625AC0
|
||||
ldr r4, [r2]
|
||||
ldr r5, [r2, 0x4]
|
||||
ldr r2, =gUnknown_08625AC8
|
||||
ldr r3, [r2, 0x4]
|
||||
ldr r2, [r2]
|
||||
str r4, [r0]
|
||||
str r5, [r0, 0x4]
|
||||
str r2, [r1]
|
||||
str r3, [r1, 0x4]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D32B0
|
||||
|
||||
thumb_func_start sub_81D32D4
|
||||
sub_81D32D4: @ 81D32D4
|
||||
|
@ -10839,7 +10839,7 @@ sub_81CD624: @ 81CD624
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x2D
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
cmp r0, 0
|
||||
beq _081CD690
|
||||
ldr r1, =gText_EggNickname
|
||||
@ -10854,14 +10854,14 @@ _081CD690:
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x2
|
||||
adds r3, r5, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
adds r0, r5, 0
|
||||
bl StringGetEnd10
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0xB
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
lsls r0, 16
|
||||
lsrs r7, r0, 16
|
||||
cmp r4, 0xE
|
||||
@ -11328,7 +11328,7 @@ _081CDA5A:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x16
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
mov r1, r9
|
||||
lsls r5, r1, 2
|
||||
adds r4, r5, r1
|
||||
@ -11340,7 +11340,7 @@ _081CDA5A:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x2F
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
ldr r1, =0x00006429
|
||||
add r1, r8
|
||||
adds r1, r4
|
||||
@ -11349,7 +11349,7 @@ _081CDA5A:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x21
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
ldr r1, =0x0000642a
|
||||
add r1, r8
|
||||
adds r1, r4
|
||||
@ -11358,7 +11358,7 @@ _081CDA5A:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x18
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
ldr r1, =0x0000642b
|
||||
add r1, r8
|
||||
adds r1, r4
|
||||
@ -11367,7 +11367,7 @@ _081CDA5A:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x17
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
ldr r1, =0x0000642c
|
||||
add r1, r8
|
||||
adds r1, r4
|
||||
@ -11381,14 +11381,14 @@ _081CDA5A:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x30
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
cmp r0, 0xFF
|
||||
beq _081CDB10
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x30
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
movs r1, 0x1D
|
||||
bl __udivsi3
|
||||
b _081CDB12
|
||||
@ -11401,7 +11401,7 @@ _081CDB12:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x8
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
ldr r1, =0x00006783
|
||||
add r1, r8
|
||||
add r1, r9
|
||||
@ -11498,7 +11498,7 @@ _081CDBD0:
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x41
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
@ -11506,13 +11506,13 @@ _081CDBD0:
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x1
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
mov r8, r0
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81D2C68
|
||||
bl GetBoxOrPartyMonData
|
||||
adds r5, r0, 0
|
||||
lsls r0, r4, 3
|
||||
ldr r1, =gMonFrontPicTable
|
||||
|
@ -3,83 +3,7 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
gUnknown_08625560:: @ 8625560
|
||||
.incbin "graphics/pokenav/pokeball.4bpp"
|
||||
|
||||
gUnknown_08625660:: @ 8625660
|
||||
.incbin "graphics/pokenav/pokeball_placeholder.4bpp"
|
||||
|
||||
gUnknown_08625680:: @ 8625680
|
||||
.incbin "graphics/pokenav/sparkle.gbapal"
|
||||
|
||||
gUnknown_086256A0:: @ 86255A0
|
||||
.incbin "graphics/pokenav/sparkle.4bpp"
|
||||
|
||||
gUnknown_08625A20:: @ 8625A20
|
||||
.2byte 0
|
||||
.2byte 0xC000
|
||||
.2byte 0x400
|
||||
.2byte 0
|
||||
|
||||
gUnknown_08625A28:: @ 8625A28
|
||||
.2byte 0
|
||||
.2byte 0x4000
|
||||
.2byte 0x800
|
||||
.2byte 0
|
||||
|
||||
gUnknown_08625A30:: @ 8625A30
|
||||
.2byte 0
|
||||
.2byte 5
|
||||
.2byte 0xFFFF
|
||||
.2byte 0
|
||||
|
||||
gUnknown_08625A38:: @ 8625A38
|
||||
.2byte 4
|
||||
.2byte 5
|
||||
.2byte 0xFFFF
|
||||
.2byte 0
|
||||
|
||||
gUnknown_08625A40:: @ 8625A40
|
||||
.4byte gUnknown_08625A30
|
||||
.4byte gUnknown_08625A38
|
||||
|
||||
gUnknown_08625A48:: @ 8625A48
|
||||
.4byte NULL
|
||||
.4byte 0x640800
|
||||
|
||||
gUnknown_08625A50:: @ 8625A50
|
||||
spr_template 0x64, 0x64, gUnknown_08625A20, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_08625A68:: @ 8625A68
|
||||
.4byte NULL
|
||||
.4byte 0x64
|
||||
|
||||
gUnknown_08625A70:: @ 8625A70
|
||||
.4byte gUnknown_08625560
|
||||
.byte 0, 1, 0x65, 0
|
||||
.4byte gUnknown_08625660
|
||||
.2byte 0x20, 0x67
|
||||
.4byte gPokenavConditionCancel_Gfx
|
||||
.byte 0, 1, 0x66, 0
|
||||
.4byte NULL, NULL
|
||||
|
||||
gUnknown_08625A90:: @ 8625A90
|
||||
.4byte gPokenavConditionCancel_Pal + 0x0
|
||||
.byte 0x65, 0, 0, 0
|
||||
.4byte gPokenavConditionCancel_Pal + 0x20
|
||||
.byte 0x66, 0, 0, 0
|
||||
.4byte NULL, NULL
|
||||
|
||||
gUnknown_08625AA8:: @ 8625AA8
|
||||
spr_template 0x65, 0x65, gUnknown_08625A28, gUnknown_08625A40, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_08625AC0:: @ 8625AC0
|
||||
.4byte gUnknown_086256A0
|
||||
.byte 0x80, 3, 0x68, 0
|
||||
|
||||
gUnknown_08625AC8:: @ 8625AC8
|
||||
.4byte gUnknown_08625680
|
||||
.byte 0x68, 0, 0, 0
|
||||
|
||||
gUnknown_08625AD0:: @ 8625AD0
|
||||
.2byte 0
|
||||
|
@ -4917,4 +4917,8 @@ extern const u16 gLinkMiscMenu_Pal[];
|
||||
extern const u32 gLinkMiscMenu_Gfx[];
|
||||
extern const u32 gLinkMiscMenu_Tilemap[];
|
||||
|
||||
// Pokeblock
|
||||
extern const u8 gPokenavConditionCancel_Gfx[];
|
||||
extern const u16 gPokenavConditionCancel_Pal[];
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
@ -26,6 +26,12 @@ struct UnknownStruct_81D1ED4
|
||||
/*0x355*/ u8 unk355;
|
||||
};
|
||||
|
||||
struct Unk81D2F78_Struct
|
||||
{
|
||||
u8 contestStats[4][5];
|
||||
struct UnknownSubStruct_81D1ED4 field_20[4][5];
|
||||
};
|
||||
|
||||
bool8 sub_81D1C44(u8 count);
|
||||
u8 sub_81D1C84(u8 a0);
|
||||
u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page);
|
||||
@ -43,10 +49,7 @@ bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0);
|
||||
void sub_81D354C(struct Sprite **);
|
||||
void sub_81D3464(struct Sprite **arg0);
|
||||
void sub_81D3480(struct Sprite **arg0, u8 arg1, u8 arg2);
|
||||
u8 sub_81D3178(struct UnknownStruct_81D1ED4*, u16*);
|
||||
u8 sub_81D31A4(struct UnknownStruct_81D1ED4*, u16*);
|
||||
bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0);
|
||||
u8 sub_81D3150(u16 *arg0);
|
||||
void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1);
|
||||
void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2);
|
||||
void MoveRelearnerPrintText(u8 *str);
|
||||
@ -55,5 +58,16 @@ void MoveRelearnerCreateYesNoMenu(void);
|
||||
u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices);
|
||||
void InitMoveRelearnerWindows(bool8 useContextWindow);
|
||||
void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation);
|
||||
s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst);
|
||||
void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7);
|
||||
void sub_81D2F78(struct Unk81D2F78_Struct *arg0, u8 *sheen, u16 boxId, u16 monId, u16 arg5, u16 id, u16 arg7, bool8 arg8);
|
||||
void sub_81D3094(u8 *tilesDst, u8 *palDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7);
|
||||
bool8 sub_81D312C(s16 *var);
|
||||
bool8 sub_81D3150(s16 *var);
|
||||
bool8 sub_81D3178(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1);
|
||||
bool8 sub_81D31A4(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1);
|
||||
void sub_81D31D0(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal);
|
||||
void sub_81D321C(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals);
|
||||
void sub_81D32B0(struct SpriteSheet *sheet, struct SpritePalette *pal);
|
||||
|
||||
#endif // GUARD_MENU_SPECIALIZED_H
|
||||
|
@ -1,8 +1,6 @@
|
||||
#ifndef GUARD_POKENAV_H
|
||||
#define GUARD_POKENAV_H
|
||||
#include "list_menu.h"
|
||||
|
||||
bool8 sub_81D312C(void *arg0);
|
||||
void CB2_InitPokeNav(void);
|
||||
|
||||
#endif //GUARD_POKENAV_H
|
||||
|
@ -194,6 +194,7 @@ extern const u8 gText_SeeYaDescription[];
|
||||
|
||||
extern const u8 gText_EggNickname[];
|
||||
extern const u8 gText_Pokemon[];
|
||||
extern const u8 gText_InParty[];
|
||||
extern const u8 gText_InGameClockUsable[];
|
||||
|
||||
// reset rtc screen texts
|
||||
|
@ -2,7 +2,10 @@
|
||||
#include "alloc.h"
|
||||
#include "battle_main.h"
|
||||
#include "contest_effect.h"
|
||||
#include "data2.h"
|
||||
#include "decompress.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "graphics.h"
|
||||
#include "menu.h"
|
||||
#include "international_string_util.h"
|
||||
#include "menu.h"
|
||||
@ -11,16 +14,21 @@
|
||||
#include "palette.h"
|
||||
#include "player_pc.h"
|
||||
#include "pokemon_summary_screen.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "sound.h"
|
||||
#include "strings.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "text_window.h"
|
||||
#include "trig.h"
|
||||
#include "window.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "gba/io_reg.h"
|
||||
|
||||
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
|
||||
|
||||
EWRAM_DATA static u8 sUnknown_0203CF48[3] = {0};
|
||||
EWRAM_DATA static struct ListMenuItem *sUnknown_0203CF4C = NULL;
|
||||
|
||||
@ -1075,3 +1083,371 @@ void MoveRelearnerCreateYesNoMenu(void)
|
||||
{
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, 1, 0xE, 0);
|
||||
}
|
||||
|
||||
s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst)
|
||||
{
|
||||
s32 ret;
|
||||
|
||||
if (boxId == TOTAL_BOXES_COUNT) // Party mon.
|
||||
{
|
||||
if (request == MON_DATA_NICKNAME || request == MON_DATA_OT_NAME)
|
||||
ret = GetMonData(&gPlayerParty[monId], request, dst);
|
||||
else
|
||||
ret = GetMonData(&gPlayerParty[monId], request);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (request == MON_DATA_NICKNAME || request == MON_DATA_OT_NAME)
|
||||
ret = GetAndCopyBoxMonDataAt(boxId, monId, request, dst);
|
||||
else
|
||||
ret = GetBoxMonDataAt(boxId, monId, request);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId)
|
||||
{
|
||||
u16 species, level, gender;
|
||||
struct BoxPokemon *boxMon;
|
||||
u8 *str;
|
||||
|
||||
*(dst++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(dst++) = 4;
|
||||
*(dst++) = 8;
|
||||
*(dst++) = 0;
|
||||
*(dst++) = 9;
|
||||
if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL))
|
||||
{
|
||||
return StringCopyPadded(dst, gText_EggNickname, 0, 12);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetBoxOrPartyMonData(boxId, monId, MON_DATA_NICKNAME, dst);
|
||||
StringGetEnd10(dst);
|
||||
species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES, NULL);
|
||||
if (boxId == TOTAL_BOXES_COUNT) // Party mon.
|
||||
{
|
||||
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||
gender = GetMonGender(&gPlayerParty[monId]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Needed to match, feel free to remove.
|
||||
boxId++;boxId--;
|
||||
monId++;monId--;
|
||||
|
||||
boxMon = GetBoxedMonPtr(boxId, monId);
|
||||
gender = GetBoxMonGender(boxMon);
|
||||
level = GetLevelFromBoxMonExp(boxMon);
|
||||
}
|
||||
|
||||
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(dst, gSpeciesNames[species]))
|
||||
gender = MON_GENDERLESS;
|
||||
|
||||
for (str = dst; *str != EOS; str++)
|
||||
;
|
||||
|
||||
*(str++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(str++) = 0x12;
|
||||
*(str++) = 0x3C;
|
||||
|
||||
switch (gender)
|
||||
{
|
||||
default:
|
||||
*(str++) = CHAR_SPACE;
|
||||
break;
|
||||
case MON_MALE:
|
||||
*(str++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(str++) = EXT_CTRL_CODE_COLOR;
|
||||
*(str++) = 4;
|
||||
*(str++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(str++) = 3;
|
||||
*(str++) = 5;
|
||||
*(str++) = CHAR_MALE;
|
||||
break;
|
||||
case MON_FEMALE:
|
||||
*(str++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(str++) = EXT_CTRL_CODE_COLOR;
|
||||
*(str++) = 6;
|
||||
*(str++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(str++) = 3;
|
||||
*(str++) = 7;
|
||||
*(str++) = CHAR_FEMALE;
|
||||
break;
|
||||
}
|
||||
|
||||
*(str++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(str++) = 4;
|
||||
*(str++) = 8;
|
||||
*(str++) = 0;
|
||||
*(str++) = 9;
|
||||
*(str++) = CHAR_SLASH;
|
||||
*(str++) = CHAR_SPECIAL_F9;
|
||||
*(str++) = 5;
|
||||
str = ConvertIntToDecimalStringN(str, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*(str++) = CHAR_SPACE;
|
||||
*str = EOS;
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
static u8 *sub_81D2E7C(u8 *dst, const u8 *src, s16 n)
|
||||
{
|
||||
while (*src != EOS)
|
||||
{
|
||||
*(dst++) = *(src++);
|
||||
n--;
|
||||
}
|
||||
while (n-- > 0)
|
||||
*(dst++) = CHAR_SPACE;
|
||||
|
||||
*dst = EOS;
|
||||
return dst;
|
||||
}
|
||||
|
||||
void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
if (!arg7)
|
||||
arg6--;
|
||||
|
||||
if (arg5 != arg6)
|
||||
{
|
||||
sub_81D2CD0(nameDst, boxId, monId);
|
||||
dst[0] = EXT_CTRL_CODE_BEGIN;
|
||||
dst[1] = 4;
|
||||
dst[2] = 8;
|
||||
dst[3] = 0;
|
||||
dst[4] = 9;
|
||||
if (boxId == TOTAL_BOXES_COUNT) // Party mon.
|
||||
{
|
||||
sub_81D2E7C(dst + 5, gText_InParty, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
boxId++;boxId--; // Again...Someone fix this maybe?
|
||||
sub_81D2E7C(dst + 5, GetBoxNamePtr(boxId), 8);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 12; i++)
|
||||
nameDst[i] = CHAR_SPACE;
|
||||
nameDst[i] = EOS;
|
||||
for (i = 0; i < 8; i++)
|
||||
dst[i] = CHAR_SPACE;
|
||||
dst[i] = EOS;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81D2F78(struct Unk81D2F78_Struct *arg0, u8 *sheen, u16 boxId, u16 monId, u16 arg5, u16 id, u16 arg7, bool8 arg8)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
if (!arg8)
|
||||
arg7--;
|
||||
|
||||
if (arg5 != arg7)
|
||||
{
|
||||
arg0->contestStats[id][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL);
|
||||
arg0->contestStats[id][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL);
|
||||
arg0->contestStats[id][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL);
|
||||
arg0->contestStats[id][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL);
|
||||
arg0->contestStats[id][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL);
|
||||
|
||||
sheen[id] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 0xFF)
|
||||
? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u
|
||||
: 9;
|
||||
|
||||
sub_81D2754(arg0->contestStats[id], arg0->field_20[id]);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
arg0->contestStats[id][i] = 0;
|
||||
arg0->field_20[id][i].unk0 = 155;
|
||||
arg0->field_20[id][i].unk2 = 91;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81D3094(u8 *tilesDst, u8 *palDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7)
|
||||
{
|
||||
if (!arg7)
|
||||
arg6--;
|
||||
|
||||
if (arg5 != arg6)
|
||||
{
|
||||
u16 species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL);
|
||||
u32 trainerId = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL);
|
||||
u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL);
|
||||
|
||||
LoadSpecialPokePic(&gMonFrontPicTable[species], tilesDst, species, personality, TRUE);
|
||||
LZ77UnCompWram(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst);
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_81D312C(s16 *var)
|
||||
{
|
||||
*var += 24;
|
||||
if (*var > 0)
|
||||
*var = 0;
|
||||
|
||||
return (*var != 0);
|
||||
}
|
||||
|
||||
bool8 sub_81D3150(s16 *var)
|
||||
{
|
||||
*var -= 24;
|
||||
if (*var < -80)
|
||||
*var = -80;
|
||||
|
||||
return (*var != -80);
|
||||
}
|
||||
|
||||
bool8 sub_81D3178(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1)
|
||||
{
|
||||
bool8 var1 = sub_81D2074(arg0);
|
||||
bool8 var2 = sub_81D312C(arg1);
|
||||
|
||||
return ((var1 != 0) || (var2 != 0));
|
||||
}
|
||||
|
||||
bool8 sub_81D31A4(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1)
|
||||
{
|
||||
bool8 var1 = sub_81D2074(arg0);
|
||||
bool8 var2 = sub_81D3150(arg1);
|
||||
|
||||
return ((var1 != 0) || (var2 != 0));
|
||||
}
|
||||
|
||||
const u32 gUnknown_08625560[] = INCBIN_U32("graphics/pokenav/pokeball.4bpp");
|
||||
const u32 gUnknown_08625660[] = INCBIN_U32("graphics/pokenav/pokeball_placeholder.4bpp");
|
||||
const u16 gUnknown_08625680[] = INCBIN_U16("graphics/pokenav/sparkle.gbapal");
|
||||
const u32 gUnknown_086256A0[] = INCBIN_U32("graphics/pokenav/sparkle.4bpp");
|
||||
|
||||
static const struct OamData sOamData_8625A20 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 0,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 3,
|
||||
.tileNum = 0,
|
||||
.priority = 1,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
const struct OamData sOamData_8625A28 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 0,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 1,
|
||||
.tileNum = 0,
|
||||
.priority = 2,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_8625A30[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_8625A38[] =
|
||||
{
|
||||
ANIMCMD_FRAME(4, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd *const sSpriteAnimTable_8625A40[] =
|
||||
{
|
||||
sSpriteAnim_8625A30,
|
||||
sSpriteAnim_8625A38
|
||||
};
|
||||
|
||||
void sub_81D31D0(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal)
|
||||
{
|
||||
struct SpriteSheet dataSheet = {NULL, 0x800, 100};
|
||||
|
||||
struct SpriteTemplate dataTemplate =
|
||||
{
|
||||
.tileTag = 100,
|
||||
.paletteTag = 100,
|
||||
.oam = &sOamData_8625A20,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
struct SpritePalette dataPal = {NULL, 100};
|
||||
|
||||
*sheet = dataSheet;
|
||||
*template = dataTemplate;
|
||||
*pal = dataPal;
|
||||
}
|
||||
|
||||
void sub_81D321C(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
struct SpriteSheet dataSheets[] =
|
||||
{
|
||||
{gUnknown_08625560, 0x100, 101},
|
||||
{gUnknown_08625660, 0x20, 103},
|
||||
{gPokenavConditionCancel_Gfx, 0x100, 102},
|
||||
{},
|
||||
};
|
||||
|
||||
struct SpritePalette dataPals[] =
|
||||
{
|
||||
{gPokenavConditionCancel_Pal, 101},
|
||||
{gPokenavConditionCancel_Pal + 16, 102},
|
||||
{},
|
||||
};
|
||||
|
||||
struct SpriteTemplate dataTemplate =
|
||||
{
|
||||
.tileTag = 101,
|
||||
.paletteTag = 101,
|
||||
.oam = &sOamData_8625A28,
|
||||
.anims = sSpriteAnimTable_8625A40,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(dataSheets); i++)
|
||||
*(sheets++) = dataSheets[i];
|
||||
|
||||
*template = dataTemplate;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(dataPals); i++)
|
||||
*(pals++) = dataPals[i];
|
||||
}
|
||||
|
||||
void sub_81D32B0(struct SpriteSheet *sheet, struct SpritePalette *pal)
|
||||
{
|
||||
struct SpriteSheet dataSheet = {gUnknown_086256A0, 0x380, 104};
|
||||
struct SpritePalette dataPal = {gUnknown_08625680, 104};
|
||||
|
||||
*sheet = dataSheet;
|
||||
*pal = dataPal;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user