mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
document more of trainer card
This commit is contained in:
parent
576d1b3474
commit
4e396207d3
@ -7,931 +7,6 @@
|
||||
|
||||
|
||||
|
||||
thumb_func_start sub_80C49D8
|
||||
sub_80C49D8: @ 80C49D8
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x4
|
||||
mov r8, r0
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r1, [r0]
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0x9]
|
||||
mov r0, r8
|
||||
ldrh r1, [r0, 0xA]
|
||||
movs r2, 0xA
|
||||
ldrsh r0, [r0, r2]
|
||||
cmp r0, 0x4C
|
||||
ble _080C4A08
|
||||
movs r0, 0x4D
|
||||
mov r3, r8
|
||||
strh r0, [r3, 0xA]
|
||||
b _080C4A0E
|
||||
.pool
|
||||
_080C4A08:
|
||||
adds r0, r1, 0x7
|
||||
mov r4, r8
|
||||
strh r0, [r4, 0xA]
|
||||
_080C4A0E:
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r0, [r0]
|
||||
mov r2, r8
|
||||
ldrh r1, [r2, 0xA]
|
||||
ldr r3, =0x00007ca8
|
||||
adds r0, r3
|
||||
strh r1, [r0]
|
||||
ldrh r0, [r2, 0xA]
|
||||
bl sub_80C32EC
|
||||
mov r4, r8
|
||||
movs r0, 0xA
|
||||
ldrsh r7, [r4, r0]
|
||||
movs r0, 0xA0
|
||||
subs r0, r7
|
||||
mov r9, r0
|
||||
subs r4, r0, r7
|
||||
negs r0, r7
|
||||
lsls r6, r0, 16
|
||||
movs r0, 0xA0
|
||||
lsls r0, 16
|
||||
adds r1, r4, 0
|
||||
bl __udivsi3
|
||||
adds r5, r0, 0
|
||||
ldr r1, =0xffff0000
|
||||
adds r5, r1
|
||||
adds r0, r5, 0
|
||||
muls r0, r4
|
||||
adds r0, r6, r0
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl __udivsi3
|
||||
mov r10, r0
|
||||
lsls r5, 1
|
||||
movs r2, 0
|
||||
cmp r2, r7
|
||||
bcs _080C4A78
|
||||
ldr r3, =gScanlineEffectRegBuffers
|
||||
_080C4A60:
|
||||
lsls r0, r2, 16
|
||||
asrs r0, 16
|
||||
lsls r1, r0, 1
|
||||
adds r1, r3
|
||||
negs r2, r0
|
||||
strh r2, [r1]
|
||||
adds r0, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, r7
|
||||
bcc _080C4A60
|
||||
_080C4A78:
|
||||
lsls r1, r2, 16
|
||||
mov r3, r9
|
||||
lsls r0, r3, 16
|
||||
asrs r3, r0, 16
|
||||
ldr r4, =gUnknown_02039CE8
|
||||
mov r9, r4
|
||||
ldr r4, [sp]
|
||||
lsrs r7, r4, 16
|
||||
cmp r1, r0
|
||||
bge _080C4AB0
|
||||
ldr r0, =gScanlineEffectRegBuffers
|
||||
mov r12, r0
|
||||
adds r4, r3, 0
|
||||
_080C4A92:
|
||||
lsrs r3, r6, 16
|
||||
adds r6, r5
|
||||
mov r2, r10
|
||||
subs r5, r2
|
||||
asrs r0, r1, 16
|
||||
lsls r1, r0, 1
|
||||
add r1, r12
|
||||
strh r3, [r1]
|
||||
adds r0, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
lsls r1, r2, 16
|
||||
asrs r0, r1, 16
|
||||
cmp r0, r4
|
||||
blt _080C4A92
|
||||
_080C4AB0:
|
||||
adds r3, r7, 0
|
||||
lsls r1, r2, 16
|
||||
asrs r0, r1, 16
|
||||
cmp r0, 0x9F
|
||||
bgt _080C4ACE
|
||||
ldr r2, =gScanlineEffectRegBuffers
|
||||
_080C4ABC:
|
||||
asrs r0, r1, 16
|
||||
lsls r1, r0, 1
|
||||
adds r1, r2
|
||||
strh r3, [r1]
|
||||
adds r0, 0x1
|
||||
lsls r1, r0, 16
|
||||
asrs r0, r1, 16
|
||||
cmp r0, 0x9F
|
||||
ble _080C4ABC
|
||||
_080C4ACE:
|
||||
mov r3, r9
|
||||
ldr r0, [r3]
|
||||
movs r1, 0x1
|
||||
strb r1, [r0, 0x9]
|
||||
mov r4, r8
|
||||
movs r1, 0xA
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0x4C
|
||||
ble _080C4AE6
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
_080C4AE6:
|
||||
movs r0, 0
|
||||
add sp, 0x4
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80C49D8
|
||||
|
||||
thumb_func_start sub_80C4B08
|
||||
sub_80C4B08: @ 80C4B08
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x8
|
||||
adds r5, r0, 0
|
||||
ldr r4, =gUnknown_02039CE8
|
||||
ldr r1, [r4]
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0x9]
|
||||
bl sub_8087598
|
||||
adds r2, r4, 0
|
||||
cmp r0, 0x1
|
||||
beq _080C4C08
|
||||
_080C4B20:
|
||||
ldr r3, [r2]
|
||||
ldrb r0, [r3, 0x4]
|
||||
cmp r0, 0x4
|
||||
bhi _080C4BE4
|
||||
lsls r0, 2
|
||||
ldr r1, =_080C4B3C
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_080C4B3C:
|
||||
.4byte _080C4B50
|
||||
.4byte _080C4B6C
|
||||
.4byte _080C4B8C
|
||||
.4byte _080C4BB0
|
||||
.4byte _080C4BCE
|
||||
_080C4B50:
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
movs r0, 0x20
|
||||
str r0, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl FillBgTilemapBufferRect_Palette0
|
||||
b _080C4BF6
|
||||
_080C4B6C:
|
||||
ldr r0, [r2]
|
||||
ldrb r0, [r0, 0x8]
|
||||
cmp r0, 0
|
||||
bne _080C4B80
|
||||
bl PrintStringsOnCardPage2
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080C4BF6
|
||||
b _080C4C08
|
||||
_080C4B80:
|
||||
bl PrintAllOnCardPage1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080C4BF6
|
||||
b _080C4C08
|
||||
_080C4B8C:
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r1, [r0]
|
||||
ldrb r0, [r1, 0x8]
|
||||
cmp r0, 0
|
||||
bne _080C4BA8
|
||||
ldr r2, =0x00000a48
|
||||
adds r0, r1, r2
|
||||
bl sub_80C45C0
|
||||
b _080C4BF6
|
||||
.pool
|
||||
_080C4BA8:
|
||||
movs r0, 0x1
|
||||
bl sub_80C438C
|
||||
b _080C4BF6
|
||||
_080C4BB0:
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x8]
|
||||
cmp r0, 0
|
||||
bne _080C4BC4
|
||||
bl sub_80C474C
|
||||
b _080C4BF6
|
||||
.pool
|
||||
_080C4BC4:
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
b _080C4BF6
|
||||
_080C4BCE:
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x8]
|
||||
cmp r0, 0
|
||||
beq _080C4BF6
|
||||
bl sub_80C4FF0
|
||||
b _080C4BF6
|
||||
.pool
|
||||
_080C4BE4:
|
||||
ldrh r0, [r5, 0x8]
|
||||
adds r0, 0x1
|
||||
movs r1, 0
|
||||
strh r0, [r5, 0x8]
|
||||
movs r0, 0x1
|
||||
strb r0, [r3, 0x9]
|
||||
ldr r0, [r2]
|
||||
strb r1, [r0, 0x4]
|
||||
b _080C4C08
|
||||
_080C4BF6:
|
||||
ldr r2, =gUnknown_02039CE8
|
||||
ldr r1, [r2]
|
||||
ldrb r0, [r1, 0x4]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1, 0x4]
|
||||
ldr r0, =gReceivedRemoteLinkPlayers
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080C4B20
|
||||
_080C4C08:
|
||||
movs r0, 0
|
||||
add sp, 0x8
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80C4B08
|
||||
|
||||
thumb_func_start sub_80C4C1C
|
||||
sub_80C4C1C: @ 80C4C1C
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
ldr r4, =gUnknown_02039CE8
|
||||
ldr r1, [r4]
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0x9]
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0, 0x8]
|
||||
cmp r0, 0
|
||||
beq _080C4C50
|
||||
movs r0, 0x2
|
||||
bl sub_80C438C
|
||||
ldr r0, [r4]
|
||||
ldr r1, =0x00000ef8
|
||||
adds r0, r1
|
||||
bl sub_80C4550
|
||||
ldr r0, [r4]
|
||||
movs r1, 0xB3
|
||||
lsls r1, 3
|
||||
adds r0, r1
|
||||
bl sub_80C45C0
|
||||
bl sub_80C4630
|
||||
_080C4C50:
|
||||
movs r0, 0x1
|
||||
bl sub_80C438C
|
||||
ldr r2, [r4]
|
||||
ldrb r0, [r2, 0x8]
|
||||
movs r1, 0x1
|
||||
eors r0, r1
|
||||
strb r0, [r2, 0x8]
|
||||
ldrh r0, [r5, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x8]
|
||||
ldr r1, [r4]
|
||||
movs r0, 0x1
|
||||
strb r0, [r1, 0x9]
|
||||
movs r0, 0xFA
|
||||
bl PlaySE
|
||||
movs r0, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80C4C1C
|
||||
|
||||
thumb_func_start sub_80C4C84
|
||||
sub_80C4C84: @ 80C4C84
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x4
|
||||
mov r8, r0
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r0, [r0]
|
||||
movs r2, 0
|
||||
strb r2, [r0, 0x9]
|
||||
mov r0, r8
|
||||
ldrh r1, [r0, 0xA]
|
||||
movs r3, 0xA
|
||||
ldrsh r0, [r0, r3]
|
||||
cmp r0, 0x5
|
||||
bgt _080C4CB0
|
||||
mov r4, r8
|
||||
strh r2, [r4, 0xA]
|
||||
b _080C4CB6
|
||||
.pool
|
||||
_080C4CB0:
|
||||
subs r0, r1, 0x5
|
||||
mov r1, r8
|
||||
strh r0, [r1, 0xA]
|
||||
_080C4CB6:
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r0, [r0]
|
||||
mov r2, r8
|
||||
ldrh r1, [r2, 0xA]
|
||||
ldr r3, =0x00007ca8
|
||||
adds r0, r3
|
||||
strh r1, [r0]
|
||||
ldrh r0, [r2, 0xA]
|
||||
bl sub_80C32EC
|
||||
mov r4, r8
|
||||
movs r0, 0xA
|
||||
ldrsh r7, [r4, r0]
|
||||
movs r0, 0xA0
|
||||
subs r0, r7
|
||||
mov r9, r0
|
||||
subs r4, r0, r7
|
||||
negs r0, r7
|
||||
lsls r6, r0, 16
|
||||
movs r0, 0xA0
|
||||
lsls r0, 16
|
||||
adds r1, r4, 0
|
||||
bl __udivsi3
|
||||
adds r5, r0, 0
|
||||
ldr r1, =0xffff0000
|
||||
adds r5, r1
|
||||
adds r0, r5, 0
|
||||
muls r0, r4
|
||||
adds r0, r6, r0
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl __udivsi3
|
||||
mov r10, r0
|
||||
lsrs r5, 1
|
||||
movs r2, 0
|
||||
cmp r2, r7
|
||||
bcs _080C4D20
|
||||
ldr r3, =gScanlineEffectRegBuffers
|
||||
_080C4D08:
|
||||
lsls r0, r2, 16
|
||||
asrs r0, 16
|
||||
lsls r1, r0, 1
|
||||
adds r1, r3
|
||||
negs r2, r0
|
||||
strh r2, [r1]
|
||||
adds r0, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, r7
|
||||
bcc _080C4D08
|
||||
_080C4D20:
|
||||
lsls r1, r2, 16
|
||||
mov r3, r9
|
||||
lsls r0, r3, 16
|
||||
asrs r3, r0, 16
|
||||
ldr r4, =gUnknown_02039CE8
|
||||
mov r9, r4
|
||||
ldr r4, [sp]
|
||||
lsrs r7, r4, 16
|
||||
cmp r1, r0
|
||||
bge _080C4D56
|
||||
ldr r0, =gScanlineEffectRegBuffers
|
||||
mov r12, r0
|
||||
adds r4, r3, 0
|
||||
_080C4D3A:
|
||||
lsrs r3, r6, 16
|
||||
adds r6, r5
|
||||
add r5, r10
|
||||
asrs r0, r1, 16
|
||||
lsls r1, r0, 1
|
||||
add r1, r12
|
||||
strh r3, [r1]
|
||||
adds r0, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
lsls r1, r2, 16
|
||||
asrs r0, r1, 16
|
||||
cmp r0, r4
|
||||
blt _080C4D3A
|
||||
_080C4D56:
|
||||
adds r3, r7, 0
|
||||
lsls r1, r2, 16
|
||||
asrs r0, r1, 16
|
||||
cmp r0, 0x9F
|
||||
bgt _080C4D74
|
||||
ldr r2, =gScanlineEffectRegBuffers
|
||||
_080C4D62:
|
||||
asrs r0, r1, 16
|
||||
lsls r1, r0, 1
|
||||
adds r1, r2
|
||||
strh r3, [r1]
|
||||
adds r0, 0x1
|
||||
lsls r1, r0, 16
|
||||
asrs r0, r1, 16
|
||||
cmp r0, 0x9F
|
||||
ble _080C4D62
|
||||
_080C4D74:
|
||||
mov r1, r9
|
||||
ldr r0, [r1]
|
||||
movs r1, 0x1
|
||||
strb r1, [r0, 0x9]
|
||||
mov r2, r8
|
||||
movs r3, 0xA
|
||||
ldrsh r0, [r2, r3]
|
||||
cmp r0, 0
|
||||
bgt _080C4D8C
|
||||
ldrh r0, [r2, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r2, 0x8]
|
||||
_080C4D8C:
|
||||
movs r0, 0
|
||||
add sp, 0x4
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80C4C84
|
||||
|
||||
thumb_func_start sub_80C4DB0
|
||||
sub_80C4DB0: @ 80C4DB0
|
||||
push {lr}
|
||||
movs r0, 0x1
|
||||
bl ShowBg
|
||||
movs r0, 0x3
|
||||
bl ShowBg
|
||||
movs r0, 0
|
||||
bl SetHBlankCallback
|
||||
ldr r0, =sub_80C4960
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80C4DB0
|
||||
|
||||
thumb_func_start sub_80C4DDC
|
||||
sub_80C4DDC: @ 80C4DDC
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
ldr r4, =gUnknown_02039CE8
|
||||
ldr r0, =0x00007cac
|
||||
bl AllocZeroed
|
||||
adds r1, r0, 0
|
||||
str r1, [r4]
|
||||
movs r2, 0xA6
|
||||
lsls r2, 3
|
||||
adds r0, r1, r2
|
||||
str r5, [r0]
|
||||
ldr r0, =sub_80C5868
|
||||
cmp r5, r0
|
||||
bne _080C4E18
|
||||
ldr r0, =0x0000052c
|
||||
adds r1, r0
|
||||
ldr r0, =0x00007fff
|
||||
b _080C4E1E
|
||||
.pool
|
||||
_080C4E18:
|
||||
ldr r2, =0x0000052c
|
||||
adds r1, r2
|
||||
movs r0, 0
|
||||
_080C4E1E:
|
||||
strh r0, [r1]
|
||||
bl InUnionRoom
|
||||
adds r3, r0, 0
|
||||
cmp r3, 0x1
|
||||
bne _080C4E3C
|
||||
ldr r1, =gUnknown_02039CE8
|
||||
ldr r0, [r1]
|
||||
strb r3, [r0, 0x5]
|
||||
adds r2, r1, 0
|
||||
b _080C4E44
|
||||
.pool
|
||||
_080C4E3C:
|
||||
ldr r2, =gUnknown_02039CE8
|
||||
ldr r1, [r2]
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0x5]
|
||||
_080C4E44:
|
||||
ldr r0, [r2]
|
||||
ldr r1, =0x00007caa
|
||||
adds r0, r1
|
||||
movs r1, 0x2
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
ldr r2, =0x00000534
|
||||
adds r0, r2
|
||||
bl sub_80C3020
|
||||
ldr r0, =sub_80C2C80
|
||||
bl SetMainCallback2
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80C4DDC
|
||||
|
||||
thumb_func_start TrainerCard_ShowLinkCard
|
||||
TrainerCard_ShowLinkCard: @ 80C4E74
|
||||
push {r4-r6,lr}
|
||||
adds r4, r0, 0
|
||||
adds r6, r1, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r5, =gUnknown_02039CE8
|
||||
ldr r0, =0x00007cac
|
||||
bl AllocZeroed
|
||||
str r0, [r5]
|
||||
movs r2, 0xA6
|
||||
lsls r2, 3
|
||||
adds r1, r0, r2
|
||||
str r6, [r1]
|
||||
movs r1, 0x1
|
||||
strb r1, [r0, 0x5]
|
||||
ldr r0, [r5]
|
||||
ldr r1, =0x00000534
|
||||
adds r0, r1
|
||||
ldr r2, =gTrainerCards
|
||||
movs r1, 0x64
|
||||
muls r1, r4
|
||||
adds r1, r2
|
||||
movs r2, 0x64
|
||||
bl memcpy
|
||||
ldr r1, [r5]
|
||||
ldr r2, =gLinkPlayers
|
||||
lsls r0, r4, 3
|
||||
subs r0, r4
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrh r0, [r0, 0x1A]
|
||||
ldr r2, =0x00007caa
|
||||
adds r1, r2
|
||||
strb r0, [r1]
|
||||
ldr r0, =sub_80C2C80
|
||||
bl SetMainCallback2
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end TrainerCard_ShowLinkCard
|
||||
|
||||
thumb_func_start sub_80C4EE4
|
||||
sub_80C4EE4: @ 80C4EE4
|
||||
push {r4,r5,lr}
|
||||
ldr r4, =gUnknown_02039CE8
|
||||
ldr r0, [r4]
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
ldr r2, [r4]
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x12]
|
||||
strb r0, [r2, 0x6]
|
||||
ldr r0, [r4]
|
||||
strb r1, [r0, 0x7]
|
||||
ldr r0, [r4]
|
||||
strb r1, [r0, 0x8]
|
||||
ldr r0, [r4]
|
||||
movs r2, 0xA5
|
||||
lsls r2, 3
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
bl sub_80C4F50
|
||||
ldr r1, [r4]
|
||||
ldr r3, =0x0000052a
|
||||
adds r1, r3
|
||||
strb r0, [r1]
|
||||
movs r5, 0
|
||||
_080C4F18:
|
||||
movs r0, 0xD
|
||||
muls r0, r5
|
||||
adds r0, 0x19
|
||||
ldr r1, [r4]
|
||||
adds r0, r1, r0
|
||||
lsls r2, r5, 1
|
||||
ldr r3, =0x0000055c
|
||||
adds r1, r3
|
||||
adds r1, r2
|
||||
ldrh r1, [r1]
|
||||
bl CopyEasyChatWord
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0x3
|
||||
bls _080C4F18
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80C4EE4
|
||||
|
||||
thumb_func_start sub_80C4F50
|
||||
sub_80C4F50: @ 80C4F50
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_02039CE8
|
||||
ldr r1, [r0]
|
||||
cmp r1, 0
|
||||
bne _080C4F7C
|
||||
ldr r0, =gGameVersion
|
||||
ldrb r1, [r0]
|
||||
subs r0, r1, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bhi _080C4F74
|
||||
movs r0, 0
|
||||
b _080C4FC2
|
||||
.pool
|
||||
_080C4F74:
|
||||
cmp r1, 0x3
|
||||
beq _080C4FC0
|
||||
movs r0, 0x1
|
||||
b _080C4FC2
|
||||
_080C4F7C:
|
||||
ldr r2, =0x0000056c
|
||||
adds r0, r1, r2
|
||||
ldrb r2, [r0]
|
||||
subs r0, r2, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bhi _080C4FA0
|
||||
ldr r0, =0x0000052b
|
||||
adds r1, r0
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
b _080C4FC2
|
||||
.pool
|
||||
_080C4FA0:
|
||||
lsls r0, r2, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x3
|
||||
beq _080C4FB8
|
||||
ldr r2, =0x0000052b
|
||||
adds r1, r2
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
b _080C4FC2
|
||||
.pool
|
||||
_080C4FB8:
|
||||
ldr r0, =0x0000052b
|
||||
adds r1, r0
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
_080C4FC0:
|
||||
movs r0, 0x2
|
||||
_080C4FC2:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80C4F50
|
||||
|
||||
thumb_func_start sub_80C4FCC
|
||||
sub_80C4FCC: @ 80C4FCC
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
movs r2, 0xFC
|
||||
lsls r2, 24
|
||||
adds r0, r2
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bhi _080C4FE2
|
||||
movs r0, 0
|
||||
b _080C4FEC
|
||||
_080C4FE2:
|
||||
cmp r1, 0x3
|
||||
beq _080C4FEA
|
||||
movs r0, 0x1
|
||||
b _080C4FEC
|
||||
_080C4FEA:
|
||||
movs r0, 0x2
|
||||
_080C4FEC:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80C4FCC
|
||||
|
||||
thumb_func_start sub_80C4FF0
|
||||
sub_80C4FF0: @ 80C4FF0
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
bl InUnionRoom
|
||||
cmp r0, 0x1
|
||||
bne _080C5060
|
||||
ldr r0, =gReceivedRemoteLinkPlayers
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _080C5060
|
||||
ldr r5, =gUnknown_02039CE8
|
||||
ldr r0, [r5]
|
||||
ldr r1, =0x00000583
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bl FacilityClassToPicIndex
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r4, =gUnknown_0856FB18
|
||||
ldr r1, [r5]
|
||||
ldr r3, =0x00000534
|
||||
adds r2, r1, r3
|
||||
ldrb r3, [r2]
|
||||
lsls r3, 1
|
||||
ldr r2, =0x0000052b
|
||||
adds r1, r2
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 2
|
||||
adds r3, r1
|
||||
adds r1, r3, r4
|
||||
ldrb r2, [r1]
|
||||
adds r4, 0x1
|
||||
adds r3, r4
|
||||
ldrb r3, [r3]
|
||||
movs r1, 0x8
|
||||
str r1, [sp]
|
||||
movs r1, 0x2
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x1
|
||||
bl sub_818D938
|
||||
b _080C50AE
|
||||
.pool
|
||||
_080C5060:
|
||||
ldr r2, =gUnknown_0856FB20
|
||||
ldr r6, =gUnknown_02039CE8
|
||||
ldr r0, [r6]
|
||||
ldr r5, =0x00000534
|
||||
adds r1, r0, r5
|
||||
ldr r3, =0x0000052a
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 1
|
||||
ldrb r1, [r1]
|
||||
adds r0, r1
|
||||
adds r0, r2
|
||||
ldrb r0, [r0]
|
||||
bl FacilityClassToPicIndex
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r4, =gUnknown_0856FB18
|
||||
ldr r1, [r6]
|
||||
adds r5, r1, r5
|
||||
ldrb r3, [r5]
|
||||
lsls r3, 1
|
||||
ldr r2, =0x0000052b
|
||||
adds r1, r2
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 2
|
||||
adds r3, r1
|
||||
adds r1, r3, r4
|
||||
ldrb r2, [r1]
|
||||
adds r4, 0x1
|
||||
adds r3, r4
|
||||
ldrb r3, [r3]
|
||||
movs r1, 0x8
|
||||
str r1, [sp]
|
||||
movs r1, 0x2
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x1
|
||||
bl sub_818D938
|
||||
_080C50AE:
|
||||
add sp, 0x8
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80C4FF0
|
||||
|
||||
thumb_func_start sub_80C50D0
|
||||
sub_80C50D0: @ 80C50D0
|
||||
push {lr}
|
||||
sub sp, 0x8
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xE
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xC
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xA
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x8
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x50
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x54
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x52
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x40
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x44
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x42
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x46
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x48
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x4A
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
mov r1, sp
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
movs r1, 0xC0
|
||||
lsls r1, 19
|
||||
ldr r2, =0x0100c000
|
||||
mov r0, sp
|
||||
bl CpuSet
|
||||
movs r0, 0
|
||||
str r0, [sp, 0x4]
|
||||
add r0, sp, 0x4
|
||||
movs r1, 0xE0
|
||||
lsls r1, 19
|
||||
ldr r2, =0x05000100
|
||||
bl CpuSet
|
||||
add sp, 0x8
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80C50D0
|
||||
|
||||
thumb_func_start sub_80C51C4
|
||||
sub_80C51C4: @ 80C51C4
|
||||
@ -1023,7 +98,7 @@ _080C5240:
|
||||
negs r0, r0
|
||||
ands r0, r1
|
||||
strb r0, [r2, 0xE]
|
||||
bl sub_80C2E40
|
||||
bl CountPlayerTrainerStars
|
||||
ldr r3, [r5]
|
||||
lsls r0, 4
|
||||
ldrb r2, [r3, 0xE]
|
||||
@ -1837,7 +912,7 @@ _080C5970:
|
||||
.pool
|
||||
_080C5994:
|
||||
ldr r0, =sub_80C5868
|
||||
bl sub_80C4DDC
|
||||
bl ShowPlayerTrainerCard
|
||||
_080C599A:
|
||||
pop {r0}
|
||||
bx r0
|
@ -1262,7 +1262,7 @@ VerdanturfTown_PokemonCenter_1F_EventScript_27191E:: @ 827191E
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_0x8004, 0
|
||||
specialvar VAR_RESULT, sub_80C2E40
|
||||
specialvar VAR_RESULT, CountPlayerTrainerStars
|
||||
compare VAR_RESULT, 4
|
||||
goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_271A68
|
||||
msgbox gUnknown_082726EB, MSGBOX_YESNO
|
||||
|
@ -12,179 +12,6 @@
|
||||
.2byte \short4
|
||||
.endm
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F018:: @ 856F018
|
||||
.incbin "graphics/trainer_card/stickers_fr.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F18C:: @ 856F18C
|
||||
.incbin "graphics/trainer_card/unknown_56F18C.gbapal"
|
||||
|
||||
.align 2
|
||||
gEmeraldTrainerCard1Star_Pal:: @ 856F1AC
|
||||
.incbin "graphics/trainer_card/one_star.gbapal"
|
||||
|
||||
.align 2
|
||||
gFireRedTrainerCard1Star_Pal:: @ 856F20C
|
||||
.incbin "graphics/trainer_card/one_star_fr.gbapal"
|
||||
|
||||
.align 2
|
||||
gEmeraldTrainerCard2Star_Pal:: @ 856F26C
|
||||
.incbin "graphics/trainer_card/two_stars.gbapal"
|
||||
|
||||
.align 2
|
||||
gFireRedTrainerCard2Star_Pal:: @ 856F2CC
|
||||
.incbin "graphics/trainer_card/two_stars_fr.gbapal"
|
||||
|
||||
.align 2
|
||||
gEmeraldTrainerCard3Star_Pal:: @ 856F32C
|
||||
.incbin "graphics/trainer_card/three_stars.gbapal"
|
||||
|
||||
.align 2
|
||||
gFireRedTrainerCard3Star_Pal:: @ 856F38C
|
||||
.incbin "graphics/trainer_card/three_stars_fr.gbapal"
|
||||
|
||||
.align 2
|
||||
gEmeraldTrainerCard4Star_Pal:: @ 856F3EC
|
||||
.incbin "graphics/trainer_card/four_stars.gbapal"
|
||||
|
||||
.align 2
|
||||
gFireRedTrainerCard4Star_Pal:: @ 856F44C
|
||||
.incbin "graphics/trainer_card/four_stars_fr.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F4AC:: @ 856F4AC
|
||||
.incbin "graphics/trainer_card/female_bg.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F4CC:: @ 856F4CC
|
||||
.incbin "graphics/trainer_card/female_bg_fr.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F4EC:: @ 856F4EC
|
||||
.incbin "graphics/trainer_card/badges.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F50C:: @ 856F50C
|
||||
.incbin "graphics/trainer_card/badges_fr.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F52C:: @ 856F52C
|
||||
.incbin "graphics/trainer_card/gold.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F54C:: @ 856F54C
|
||||
.incbin "graphics/trainer_card/stickers_fr1.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F56C:: @ 856F56C
|
||||
.incbin "graphics/trainer_card/stickers_fr2.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F58C:: @ 856F58C
|
||||
.incbin "graphics/trainer_card/stickers_fr3.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F5AC:: @ 856F5AC
|
||||
.incbin "graphics/trainer_card/stickers_fr4.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F5CC:: @ 856F5CC
|
||||
.incbin "graphics/trainer_card/badges.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856F814:: @ 856F814
|
||||
.incbin "graphics/trainer_card/badges_fr.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FAB4:: @ 856FAB4
|
||||
.4byte 0x000025b0, 0x000001d9, 0x000031e2, 0x003011f3
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FAC4:: @ 856FAC4
|
||||
window_template 0x01, 0x02, 0x0f, 0x1b, 0x04, 0x0f, 0x0253
|
||||
window_template 0x01, 0x01, 0x01, 0x1c, 0x12, 0x0f, 0x0001
|
||||
window_template 0x03, 0x13, 0x05, 0x09, 0x0a, 0x08, 0x0150
|
||||
null_window_template
|
||||
|
||||
.align 2
|
||||
gEmeraldTrainerCardStarPals:: @ 856FAE4
|
||||
.4byte gEmeraldTrainerCard0Star_Pal
|
||||
.4byte gEmeraldTrainerCard1Star_Pal
|
||||
.4byte gEmeraldTrainerCard2Star_Pal
|
||||
.4byte gEmeraldTrainerCard3Star_Pal
|
||||
.4byte gEmeraldTrainerCard4Star_Pal
|
||||
|
||||
.align 2
|
||||
gFireRedTrainerCardStarPals:: @ 856FAF8
|
||||
.4byte gFireRedTrainerCard0Star_Pal
|
||||
.4byte gFireRedTrainerCard1Star_Pal
|
||||
.4byte gFireRedTrainerCard2Star_Pal
|
||||
.4byte gFireRedTrainerCard3Star_Pal
|
||||
.4byte gFireRedTrainerCard4Star_Pal
|
||||
|
||||
gUnknown_0856FB0C:: @ 856FB0C
|
||||
.byte 0x00, 0x02, 0x03
|
||||
|
||||
gUnknown_0856FB0F:: @ 856FB0F
|
||||
.byte 0x00, 0x04, 0x05
|
||||
|
||||
gUnknown_0856FB12:: @ 856FB12
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
gUnknown_0856FB18:: @ 856FB18
|
||||
.byte 0x0d, 0x04, 0x0d, 0x04, 0x01, 0x00, 0x01, 0x00
|
||||
|
||||
gUnknown_0856FB20:: @ 856FB20
|
||||
.byte 0x4e, 0x4f, 0x50, 0x51, 0x3c, 0x3f
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FB28:: @ 856FB28
|
||||
.4byte sub_80C4998
|
||||
.4byte sub_80C49D8
|
||||
.4byte sub_80C4B08
|
||||
.4byte sub_80C4C1C
|
||||
.4byte sub_80C4C84
|
||||
.4byte sub_80C4DB0
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FB40:: @ 856FB40
|
||||
.4byte gUnknown_0856FB0C
|
||||
.4byte gUnknown_0856FB12
|
||||
|
||||
gUnknown_0856FB48:: @ 856FB48
|
||||
.byte 0x71, 0x68
|
||||
|
||||
gUnknown_0856FB4A:: @ 856FB4A
|
||||
.byte 0x81, 0x78
|
||||
|
||||
gUnknown_0856FB4C:: @ 856FB4C
|
||||
.byte 0xfd, 0x02, 0xf0, 0xfd, 0x03, 0xf0, 0xfd, 0x04, 0xff
|
||||
|
||||
gUnknown_0856FB55:: @ 856FB55
|
||||
.byte 0x08, 0x10
|
||||
|
||||
gUnknown_0856FB57:: @ 856FB57
|
||||
.byte 0xd8, 0xd8
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FB5C:: @ 856FB5C
|
||||
.4byte gText_LinkBattles
|
||||
.4byte gText_LinkCableBattles
|
||||
.4byte gText_LinkBattles
|
||||
|
||||
gUnknown_0856FB68:: @ 856FB68
|
||||
.byte 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a
|
||||
|
||||
gUnknown_0856FB6E:: @ 856FB6E
|
||||
.byte 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14
|
||||
|
||||
gUnknown_0856FB74:: @ 856FB74
|
||||
.byte 0x0b, 0x0c, 0x0d, 0x0e
|
||||
|
||||
gUnknown_0856FB78:: @ 856FB78
|
||||
.byte 0x07, 0x07
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FB7C:: @ 856FB7C
|
||||
.incbin "graphics/frontier_pass/map_heads.gbapal"
|
@ -481,7 +481,7 @@ gSpecials:: @ 81DBA64
|
||||
def_special sub_813B7D8
|
||||
def_special sub_81C72A4
|
||||
def_special sp106_CreateStartMenu
|
||||
def_special sub_80C2E40
|
||||
def_special CountPlayerTrainerStars
|
||||
def_special sub_813AC7C
|
||||
def_special sub_813ADB8
|
||||
def_special sub_813ADD4
|
||||
|
@ -4846,4 +4846,18 @@ extern const u16 gUnknown_08DC64E8[];
|
||||
extern const u16 gUnknown_08DC64FC[];
|
||||
extern const u16 gUnknown_08DC6510[];
|
||||
|
||||
// Trainer Card.
|
||||
extern const u16 gEmeraldTrainerCard0Star_Pal[];
|
||||
extern const u32 gEmeraldTrainerCard_Gfx[];
|
||||
extern const u16 gFireRedTrainerCard0Star_Pal[];
|
||||
extern const u32 gFireRedTrainerCard_Gfx[];
|
||||
extern const u32 gUnknown_08DD2AE0[];
|
||||
extern const u32 gUnknown_08DD21B0[];
|
||||
extern const u32 gUnknown_08DD2D30[];
|
||||
extern const u32 gUnknown_08DD2010[];
|
||||
extern const u32 gUnknown_08DD2B78[];
|
||||
extern const u32 gUnknown_08DD228C[];
|
||||
extern const u32 gUnknown_08DD2E5C[];
|
||||
extern const u32 gUnknown_08DD1F78[];
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
@ -66,5 +66,9 @@ void BeginHardwarePaletteFade(u8, u8, u8, u8, u8);
|
||||
void BlendPalettes(u32, u8, u16);
|
||||
void BlendPalettesUnfaded(u32, u8, u16);
|
||||
void sub_80A2C44(u32 a1, s8 a2, u8 a3, u8 a4, u16 a5, u8 a6, u8 a7);
|
||||
void TintPalette_GrayScale(u16 *palette, u16 count);
|
||||
void TintPalette_GrayScale2(u16 *palette, u16 count);
|
||||
void TintPalette_SepiaTone(u16 *palette, u16 count);
|
||||
void TintPalette_CustomTone(u16 *palette, u16 count, u16 rTone, u16 gTone, u16 bTone);
|
||||
|
||||
#endif // GUARD_PALETTE_H
|
||||
|
@ -2222,4 +2222,30 @@ extern const u8 gText_PreliminaryResults[];
|
||||
extern const u8 gText_Round2Results[];
|
||||
extern const u8 gText_Var1sVar2Won[];
|
||||
|
||||
// Trainer Card
|
||||
extern const u8 gText_LinkCableBattles[];
|
||||
extern const u8 gText_LinkBattles[];
|
||||
extern const u8 gText_WaitingTrainerFinishReading[];
|
||||
extern const u8 gText_TrainerCardName[];
|
||||
extern const u8 gText_TrainerCardIDNo[];
|
||||
extern const u8 gText_TrainerCardMoney[];
|
||||
extern const u8 gText_PokedollarVar1[];
|
||||
extern const u8 gText_EmptyString6[];
|
||||
extern const u8 gText_TrainerCardPokedex[];
|
||||
extern const u8 gText_TrainerCardTime[];
|
||||
extern const u8 gText_Colon2[];
|
||||
extern const u8 gText_Var1sTrainerCard[];
|
||||
extern const u8 gText_HallOfFameDebut[];
|
||||
extern const u8 gText_WinsLosses[];
|
||||
extern const u8 gText_PokemonTrades[];
|
||||
extern const u8 gText_BerryCrush[];
|
||||
extern const u8 gText_UnionTradesAndBattles[];
|
||||
extern const u8 gText_Var1DarkGreyShadowLightGrey[];
|
||||
extern const u8 gText_PokeblocksWithFriends[];
|
||||
extern const u8 gText_WonContestsWFriends[];
|
||||
extern const u8 gText_WSlashStraightSlash[];
|
||||
extern const u8 gText_Var1DarkLightGreyBP[];
|
||||
extern const u8 gText_BattleTower[];
|
||||
extern const u8 gText_BattlePtsWon[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
@ -8,7 +8,6 @@ struct TrainerCard
|
||||
/*0x02*/ bool8 hasPokedex;
|
||||
/*0x03*/ bool8 caughtAllHoenn;
|
||||
/*0x04*/ bool8 hasAllPaintings;
|
||||
/*0x05*/ u8 var_5;
|
||||
/*0x06*/ u16 hofDebutHours;
|
||||
/*0x08*/ u16 hofDebutMinutes;
|
||||
/*0x0A*/ u16 hofDebutSeconds;
|
||||
@ -19,36 +18,35 @@ struct TrainerCard
|
||||
/*0x14*/ u16 linkBattleWins;
|
||||
/*0x16*/ u16 linkBattleLosses;
|
||||
/*0x18*/ u16 battleTowerWins;
|
||||
/*0x1A*/ u16 battleTowerLosses; // wrong name
|
||||
/*0x1A*/ u16 battleTowerStraightWins;
|
||||
/*0x1C*/ u16 contestsWithFriends;
|
||||
/*0x1E*/ u16 pokeblocksWithFriends;
|
||||
/*0x20*/ u16 pokemonTrades;
|
||||
/*0x22*/ u16 var_22;
|
||||
/*0x24*/ u32 money;
|
||||
/*0x28*/ u16 var_28[4];
|
||||
/*0x30*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x38*/ u8 var_38;
|
||||
/*0x39*/ u8 var_39;
|
||||
/*0x38*/ u8 version;
|
||||
/*0x3A*/ u16 var_3A;
|
||||
/*0x3C*/ u32 var_3C;
|
||||
/*0x40*/ u32 var_40;
|
||||
/*0x3C*/ u32 berruCrushPoints;
|
||||
/*0x40*/ u32 unionRoomNum;
|
||||
/*0x44*/ u8 filler44[0x8];
|
||||
/*0x4C*/ u8 var_4C;
|
||||
/*0x4D*/ u8 var_4D;
|
||||
/*0x4E*/ u8 var_4E;
|
||||
/*0x4F*/ u8 var_4F;
|
||||
/*0x50*/ u8 var_50[0x4];
|
||||
/*0x54*/ u16 monSpecies[6];
|
||||
/*0x60*/ u16 var_60;
|
||||
/*0x62*/ u16 var_62;
|
||||
/*0x54*/ u16 monSpecies[PARTY_SIZE];
|
||||
/*0x60*/ bool16 hasAllSymbols;
|
||||
/*0x62*/ u16 frontierBP;
|
||||
};
|
||||
|
||||
extern struct TrainerCard gTrainerCards[4];
|
||||
|
||||
void sub_80C3120(struct TrainerCard *arg0, u16 *src, u8 gameVersion);
|
||||
void TrainerCard_ShowLinkCard(u8 arg0, void (*callback)(void));
|
||||
u32 CountPlayerTrainerStars(void);
|
||||
u8 sub_80C4904(u8 cardId);
|
||||
void CopyTrainerCardData(struct TrainerCard *dst, u16 *src, u8 gameVersion);
|
||||
void ShowPlayerTrainerCard(void (*callback)(void));
|
||||
void ShowTrainerCardInLink(u8 arg0, void (*callback)(void));
|
||||
void TrainerCard_GenerateCardForPlayer(struct TrainerCard *);
|
||||
u8 sub_80C4904(u8);
|
||||
void sub_80C6D80(const u8 *, u8 *, u8, u8, u8);
|
||||
|
||||
#endif // GUARD_TRAINER_CARD_H
|
||||
|
@ -125,7 +125,8 @@ SECTIONS {
|
||||
src/option_menu.o(.text);
|
||||
src/pokedex.o(.text);
|
||||
src/trainer_card.o(.text);
|
||||
asm/trainer_card.o(.text);
|
||||
src/frontier_pass.o(.text);
|
||||
asm/frontier_pass.o(.text);
|
||||
src/pokemon_storage_system.o(.text);
|
||||
src/pokemon_icon.o(.text);
|
||||
src/script_movement.o(.text);
|
||||
@ -458,7 +459,8 @@ SECTIONS {
|
||||
src/field_effect.o(.rodata);
|
||||
src/option_menu.o(.rodata);
|
||||
src/pokedex.o(.rodata);
|
||||
data/trainer_card.o(.rodata);
|
||||
src/trainer_card.o(.rodata);
|
||||
data/frontier_pass.o(.rodata);
|
||||
src/pokemon_storage_system.o(.rodata);
|
||||
src/pokemon_icon.o(.rodata);
|
||||
src/fldeff_cut.o(.rodata);
|
||||
|
@ -498,7 +498,7 @@ static void sub_80B2C30(u8 taskId)
|
||||
|
||||
for (index = 0; index < GetLinkPlayerCount(); index++)
|
||||
{
|
||||
sub_80C3120(&gTrainerCards[index], gBlockRecvBuffer[index], gLinkPlayers[index].version);
|
||||
CopyTrainerCardData(&gTrainerCards[index], gBlockRecvBuffer[index], gLinkPlayers[index].version);
|
||||
}
|
||||
|
||||
SetSuppressLinkErrorMessage(FALSE);
|
||||
@ -1176,7 +1176,7 @@ static void sub_80B39A4(void)
|
||||
|
||||
void sp02A_crash_sound(void)
|
||||
{
|
||||
TrainerCard_ShowLinkCard(gSpecialVar_0x8006, CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
ShowTrainerCardInLink(gSpecialVar_0x8006, CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
|
||||
bool32 sub_80B39D4(u8 linkPlayerIndex)
|
||||
|
31
src/frontier_pass.c
Normal file
31
src/frontier_pass.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include "global.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "bg.h"
|
||||
|
||||
void sub_80C50D0(void)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, 0);
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
ChangeBgX(1, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
ChangeBgX(2, 0, 0);
|
||||
ChangeBgY(2, 0, 0);
|
||||
ChangeBgX(3, 0, 0);
|
||||
ChangeBgY(3, 0, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN1H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN1V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
CpuFill16(0, (void *)VRAM, VRAM_SIZE);
|
||||
CpuFill32(0, (void *)OAM, OAM_SIZE);
|
||||
}
|
@ -1577,7 +1577,7 @@ void sub_80140E0(u8 taskId)
|
||||
for (i = 0; i < GetLinkPlayerCount(); i++)
|
||||
{
|
||||
recvBuff = gBlockRecvBuffer[i];
|
||||
sub_80C3120(&gTrainerCards[i], recvBuff, gLinkPlayers[i].version);
|
||||
CopyTrainerCardData(&gTrainerCards[i], recvBuff, gLinkPlayers[i].version);
|
||||
}
|
||||
|
||||
if (GetLinkPlayerCount() == 2)
|
||||
@ -1607,7 +1607,7 @@ void sub_80141A4(void)
|
||||
break;
|
||||
case 1:
|
||||
if (!FuncIsActiveTask(sub_80140E0))
|
||||
TrainerCard_ShowLinkCard(GetMultiplayerId() ^ 1, CB2_ReturnToField);
|
||||
ShowTrainerCardInLink(GetMultiplayerId() ^ 1, CB2_ReturnToField);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "strings.h"
|
||||
#include "bg.h"
|
||||
#include "field_effect.h"
|
||||
#include "party_menu.h"
|
||||
#include "task.h"
|
||||
#include "overworld.h"
|
||||
#include "link.h"
|
||||
@ -30,6 +31,7 @@
|
||||
#include "scanline_effect.h"
|
||||
#include "text_window.h"
|
||||
#include "load_save.h"
|
||||
#include "trainer_card.h"
|
||||
#include "international_string_util.h"
|
||||
#include "constants/songs.h"
|
||||
#include "field_player_avatar.h"
|
||||
@ -89,11 +91,9 @@ extern void var_800D_set_xB(void);
|
||||
extern void sub_808B864(void);
|
||||
extern void CB2_Pokedex(void);
|
||||
extern void PlayRainSoundEffect(void);
|
||||
extern void CB2_PartyMenuFromStartMenu(void);
|
||||
extern void CB2_PokeNav(void);
|
||||
extern void sub_80C4DDC(void (*)(void));
|
||||
extern void ShowPlayerTrainerCard(void (*)(void));
|
||||
extern void sub_80C51C4(void (*)(void));
|
||||
extern void TrainerCard_ShowLinkCard(u8, void (*)(void));
|
||||
extern void ScriptUnfreezeEventObjects(void);
|
||||
extern void sub_81A9EC8(void);
|
||||
extern void save_serialize_map(void);
|
||||
@ -468,21 +468,14 @@ static bool32 InitStartMenuStep(void)
|
||||
break;
|
||||
case 3:
|
||||
if (GetSafariZoneFlag())
|
||||
{
|
||||
ShowSafariBallsWindow();
|
||||
}
|
||||
if (InBattlePyramid())
|
||||
{
|
||||
ShowPyramidFloorWindow();
|
||||
}
|
||||
sUnknown_02037619[0]++;
|
||||
break;
|
||||
case 4:
|
||||
if (!PrintStartMenuActions(&sUnknown_02037619[1], 2))
|
||||
{
|
||||
break;
|
||||
}
|
||||
sUnknown_02037619[0]++;
|
||||
if (PrintStartMenuActions(&sUnknown_02037619[1], 2))
|
||||
sUnknown_02037619[0]++;
|
||||
break;
|
||||
case 5:
|
||||
sStartMenuCursorPos = sub_81983AC(GetStartMenuWindowId(), 1, 0, 9, 16, sNumStartMenuActions, sStartMenuCursorPos);
|
||||
@ -497,15 +490,14 @@ static void InitStartMenu(void)
|
||||
{
|
||||
sUnknown_02037619[0] = 0;
|
||||
sUnknown_02037619[1] = 0;
|
||||
while (!InitStartMenuStep());
|
||||
while (!InitStartMenuStep())
|
||||
;
|
||||
}
|
||||
|
||||
static void StartMenuTask(u8 taskId)
|
||||
{
|
||||
if (InitStartMenuStep() == TRUE)
|
||||
{
|
||||
SwitchTaskToFollowupFunc(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
static void CreateStartMenuTask(TaskFunc followupFunc)
|
||||
@ -544,18 +536,14 @@ void sub_809FA34(u8 taskId) // Referenced in field_screen.s and rom_8011DC0.s
|
||||
{
|
||||
case 0:
|
||||
if (InUnionRoom() == TRUE)
|
||||
{
|
||||
var_800D_set_xB();
|
||||
}
|
||||
|
||||
gMenuCallback = HandleStartMenuInput;
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
if (gMenuCallback() == TRUE)
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -591,9 +579,8 @@ static bool8 HandleStartMenuInput(void)
|
||||
PlaySE(SE_SELECT);
|
||||
if (sStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].func.u8_void == StartMenuPokedexCallback)
|
||||
{
|
||||
if (GetNationalPokedexCount(0) == 0) {
|
||||
if (GetNationalPokedexCount(0) == 0)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
gMenuCallback = sStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].func.u8_void;
|
||||
@ -689,17 +676,11 @@ static bool8 StartMenuPlayerNameCallback(void)
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
|
||||
if (is_c1_link_related_active() || InUnionRoom())
|
||||
{
|
||||
sub_80C4DDC(CB2_ReturnToFieldWithOpenMenu); // Display trainer card
|
||||
}
|
||||
ShowPlayerTrainerCard(CB2_ReturnToFieldWithOpenMenu); // Display trainer card
|
||||
else if (FlagGet(FLAG_SYS_FRONTIER_PASS))
|
||||
{
|
||||
sub_80C51C4(CB2_ReturnToFieldWithOpenMenu); // Display frontier pass
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80C4DDC(CB2_ReturnToFieldWithOpenMenu); // Display trainer card
|
||||
}
|
||||
ShowPlayerTrainerCard(CB2_ReturnToFieldWithOpenMenu); // Display trainer card
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -710,9 +691,7 @@ static bool8 StartMenuPlayerNameCallback(void)
|
||||
static bool8 StartMenuSaveCallback(void)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
{
|
||||
RemoveExtraStartMenuWindows();
|
||||
}
|
||||
|
||||
gMenuCallback = SaveStartCallback; // Display save menu
|
||||
|
||||
@ -758,7 +737,7 @@ static bool8 StartMenuLinkModePlayerNameCallback(void)
|
||||
{
|
||||
PlayRainSoundEffect();
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
TrainerCard_ShowLinkCard(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
|
||||
ShowTrainerCardInLink(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
1383
src/trainer_card.c
1383
src/trainer_card.c
File diff suppressed because it is too large
Load Diff
@ -153,8 +153,7 @@ gUnknown_02039B6E: @ 2039B6E
|
||||
gUnknown_02039B88: @ 2039B88
|
||||
.space 0x160
|
||||
|
||||
gUnknown_02039CE8: @ 2039CE8
|
||||
.space 0x4
|
||||
.include "src/trainer_card.o"
|
||||
|
||||
gUnknown_02039CEC: @ 2039CEC
|
||||
.space 0x4
|
||||
|
Loading…
Reference in New Issue
Block a user