pokeemerald/asm/contest.s

1325 lines
20 KiB
ArmAsm
Raw Normal View History

2016-11-01 18:08:48 +01:00
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_80DF080
sub_80DF080: @ 80DF080
push {r4-r7,lr}
lsls r0, 24
lsrs r4, r0, 24
2017-10-14 16:55:25 +02:00
ldr r2, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r3, [r2]
ldr r5, [r3, 0x10]
ldrb r1, [r5, 0x1]
movs r7, 0x1
adds r0, r7, 0
ands r0, r1
adds r6, r2, 0
cmp r0, 0
bne _080DF0D2
movs r0, 0
ldrsb r0, [r5, r0]
cmp r0, 0
ble _080DF0D2
ldr r1, [r3, 0x4]
lsls r0, r4, 3
subs r0, r4
lsls r0, 2
adds r0, r1
ldrb r1, [r0, 0x15]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
bne _080DF0D2
ldr r1, [r3, 0x1C]
lsls r2, r4, 4
adds r1, r2, r1
ldrb r3, [r1, 0xC]
movs r0, 0x1
orrs r0, r3
strb r0, [r1, 0xC]
ldr r0, [r6]
ldr r0, [r0, 0x1C]
adds r2, r0
ldrb r0, [r2, 0xE]
movs r1, 0x2
orrs r0, r1
strb r0, [r2, 0xE]
_080DF0D2:
ldr r3, [r6]
ldr r1, [r3, 0x4]
lsls r2, r4, 3
subs r0, r2, r4
lsls r0, 2
adds r0, r1
ldrb r1, [r0, 0xC]
movs r5, 0x1
adds r0, r5, 0
ands r0, r1
adds r7, r2, 0
cmp r0, 0
beq _080DF0FA
ldr r0, [r3, 0x1C]
lsls r1, r4, 4
adds r1, r0
ldrb r2, [r1, 0xC]
movs r0, 0x2
orrs r0, r2
strb r0, [r1, 0xC]
_080DF0FA:
ldr r3, [r6]
ldr r2, [r3, 0x10]
ldrb r1, [r2, 0x1]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _080DF126
movs r0, 0
ldrsb r0, [r2, r0]
cmp r0, 0
beq _080DF126
movs r0, 0x2
ldrsb r0, [r2, r0]
cmp r0, 0x3C
bne _080DF126
ldr r0, [r3, 0x1C]
lsls r1, r4, 4
adds r1, r0
ldrb r2, [r1, 0xC]
movs r0, 0x4
orrs r0, r2
strb r0, [r1, 0xC]
_080DF126:
ldr r3, [r6]
ldr r1, [r3, 0x4]
subs r0, r7, r4
lsls r0, 2
adds r2, r0, r1
ldrb r1, [r2, 0x15]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _080DF14E
ldrb r0, [r2, 0x16]
cmp r0, 0
beq _080DF14E
ldr r0, [r3, 0x1C]
lsls r1, r4, 4
adds r1, r0
ldrb r2, [r1, 0xC]
movs r0, 0x8
orrs r0, r2
strb r0, [r1, 0xC]
_080DF14E:
movs r3, 0
movs r5, 0
_080DF152:
cmp r3, r4
beq _080DF180
ldr r1, [r6]
ldr r0, [r1, 0x4]
adds r0, r5, r0
ldrb r0, [r0, 0xE]
cmp r0, 0
beq _080DF180
ldr r0, [r1, 0x1C]
lsls r2, r4, 4
adds r2, r0
ldrb r0, [r2, 0xC]
movs r1, 0x10
orrs r0, r1
strb r0, [r2, 0xC]
ldr r0, [r6]
ldr r0, [r0, 0x1C]
lsls r2, r3, 4
adds r2, r0
ldrb r0, [r2, 0xC]
movs r1, 0x40
orrs r0, r1
strb r0, [r2, 0xC]
_080DF180:
adds r5, 0x1C
adds r3, 0x1
cmp r3, 0x3
ble _080DF152
ldr r2, [r6]
ldr r1, [r2, 0x4]
subs r0, r7, r4
lsls r5, r0, 2
adds r1, r5, r1
ldrb r3, [r1, 0xC]
movs r0, 0x6
ands r0, r3
cmp r0, 0
bne _080DF1A6
ldrb r1, [r1, 0xB]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _080DF1BC
_080DF1A6:
ldr r0, [r2, 0x1C]
lsls r1, r4, 4
adds r1, r0
ldrb r2, [r1, 0xC]
movs r0, 0x20
orrs r0, r2
strb r0, [r1, 0xC]
b _080DF1F6
.pool
_080DF1BC:
movs r0, 0x1
ands r0, r3
cmp r0, 0
bne _080DF1F6
ldr r2, [r2, 0x1C]
lsls r3, r4, 4
adds r2, r3, r2
ldrb r0, [r2, 0xC]
movs r1, 0x80
orrs r0, r1
strb r0, [r2, 0xC]
ldr r0, [r6]
ldr r1, [r0, 0x1C]
adds r1, r3, r1
ldrb r0, [r1, 0xE]
movs r2, 0x1
orrs r0, r2
strb r0, [r1, 0xE]
ldr r1, [r6]
ldr r0, [r1, 0x1C]
adds r3, r0
ldr r0, [r1]
ldrb r0, [r0, 0x1]
lsls r0, 1
adds r3, r0
ldr r0, [r1, 0x4]
adds r0, r5, r0
ldrh r0, [r0, 0x6]
strh r0, [r3]
_080DF1F6:
ldr r2, [r6]
ldr r1, [r2, 0x4]
subs r0, r7, r4
lsls r0, 2
adds r0, r1
ldrb r1, [r0, 0x15]
movs r5, 0x1
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _080DF21A
ldr r0, [r2, 0x1C]
lsls r1, r4, 4
adds r1, r0
ldrb r2, [r1, 0xD]
movs r0, 0x2
orrs r0, r2
strb r0, [r1, 0xD]
_080DF21A:
ldr r2, [r6]
ldr r0, [r2]
ldrb r0, [r0, 0x13]
lsls r0, 24
asrs r0, 24
cmp r0, 0x4
bne _080DF24A
ldr r3, [r2, 0x10]
ldrb r1, [r3, 0x1]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _080DF24A
movs r0, 0
ldrsb r0, [r3, r0]
cmp r0, 0
bge _080DF24A
ldr r0, [r2, 0x1C]
lsls r1, r4, 4
adds r1, r0
ldrb r2, [r1, 0xD]
movs r0, 0x20
orrs r0, r2
strb r0, [r1, 0xD]
_080DF24A:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80DF080
thumb_func_start sub_80DF250
sub_80DF250: @ 80DF250
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x38
movs r1, 0
movs r0, 0
str r0, [sp, 0x20]
movs r4, 0
2017-10-14 16:55:25 +02:00
ldr r6, =gContestResources
2016-11-01 18:08:48 +01:00
mov r2, sp
adds r2, 0xC
str r2, [sp, 0x28]
mov r3, sp
adds r3, 0x14
str r3, [sp, 0x2C]
mov r7, sp
adds r7, 0x2
str r7, [sp, 0x24]
2018-05-02 01:47:11 +02:00
ldr r5, =gContestFinalStandings
2016-11-01 18:08:48 +01:00
movs r2, 0
movs r3, 0x80
lsls r3, 17
_080DF280:
adds r0, r4, r5
ldrb r0, [r0]
cmp r0, 0
bne _080DF298
lsrs r0, r2, 24
str r0, [sp, 0x20]
b _080DF29E
.pool
_080DF298:
cmp r0, 0x3
bne _080DF29E
lsrs r1, r2, 24
_080DF29E:
adds r2, r3
adds r4, 0x1
cmp r4, 0x3
ble _080DF280
ldr r0, [r6]
ldr r0, [r0, 0x1C]
lsls r1, 4
adds r1, r0
ldrb r2, [r1, 0xD]
movs r0, 0x1
orrs r0, r2
strb r0, [r1, 0xD]
movs r4, 0
ldr r1, [sp, 0x20]
lsls r1, 4
str r1, [sp, 0x30]
mov r9, r4
mov r10, r4
_080DF2C2:
ldr r2, [sp, 0x20]
cmp r4, r2
beq _080DF2EE
2016-11-01 19:35:16 +01:00
ldr r1, =gUnknown_02039F08
2016-11-01 18:08:48 +01:00
lsls r0, r2, 1
adds r0, r1
movs r3, 0
ldrsh r2, [r0, r3]
add r1, r10
movs r6, 0
ldrsh r0, [r1, r6]
subs r2, r0
cmp r2, 0x32
bgt _080DF2EE
2017-10-14 16:55:25 +02:00
ldr r7, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r7]
ldr r2, [r0, 0x1C]
add r2, r9
ldrb r0, [r2, 0xD]
movs r1, 0x4
orrs r0, r1
strb r0, [r2, 0xD]
_080DF2EE:
2017-10-14 16:55:25 +02:00
ldr r1, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r1]
ldr r0, [r0, 0x1C]
mov r3, r9
adds r2, r3, r0
ldrb r1, [r2, 0xE]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080DF30A
ldrb r0, [r2, 0xD]
movs r1, 0x8
orrs r0, r1
strb r0, [r2, 0xD]
_080DF30A:
movs r5, 0
2018-05-11 01:28:52 +02:00
ldr r2, =gContestMonConditions
2016-11-01 18:08:48 +01:00
add r2, r10
movs r6, 0
ldrsh r1, [r2, r6]
2018-05-11 01:28:52 +02:00
ldr r7, =gContestMonConditions
2016-11-01 18:08:48 +01:00
movs r3, 0
ldrsh r0, [r7, r3]
cmp r1, r0
blt _080DF336
adds r3, r2, 0
adds r2, r7, 0
_080DF322:
adds r2, 0x2
adds r5, 0x1
cmp r5, 0x3
bgt _080DF336
movs r6, 0
ldrsh r1, [r3, r6]
movs r7, 0
ldrsh r0, [r2, r7]
cmp r1, r0
bge _080DF322
_080DF336:
cmp r5, 0x4
bne _080DF354
2018-05-02 01:47:11 +02:00
ldr r1, =gContestFinalStandings
2016-11-01 18:08:48 +01:00
adds r0, r4, r1
ldrb r0, [r0]
cmp r0, 0
beq _080DF354
2017-10-14 16:55:25 +02:00
ldr r2, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r2]
ldr r2, [r0, 0x1C]
add r2, r9
ldrb r0, [r2, 0xD]
movs r1, 0x10
orrs r0, r1
strb r0, [r2, 0xD]
_080DF354:
movs r3, 0
mov r12, r3
mov r8, r3
movs r5, 0
2018-05-11 01:28:52 +02:00
ldr r0, =gContestMonConditions
2016-11-01 18:08:48 +01:00
add r0, r10
movs r7, 0
ldrsh r6, [r0, r7]
str r6, [sp, 0x34]
2018-05-11 01:28:52 +02:00
ldr r2, =gContestMonConditions
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02039F18
2016-11-01 18:08:48 +01:00
mov r1, r10
adds r6, r1, r0
adds r3, r0, 0
_080DF370:
movs r7, 0
ldrsh r0, [r2, r7]
ldr r1, [sp, 0x34]
cmp r1, r0
ble _080DF37E
movs r7, 0x1
mov r12, r7
_080DF37E:
movs r0, 0
ldrsh r1, [r6, r0]
movs r7, 0
ldrsh r0, [r3, r7]
cmp r1, r0
ble _080DF38E
movs r0, 0x1
mov r8, r0
_080DF38E:
adds r2, 0x2
adds r3, 0x2
adds r5, 0x1
cmp r5, 0x3
ble _080DF370
mov r1, r12
cmp r1, 0
bne _080DF3B4
mov r2, r8
cmp r2, 0
bne _080DF3B4
2017-10-14 16:55:25 +02:00
ldr r3, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r3]
ldr r2, [r0, 0x1C]
add r2, r9
ldrb r0, [r2, 0xD]
movs r1, 0x40
orrs r0, r1
strb r0, [r2, 0xD]
_080DF3B4:
2017-10-14 16:55:25 +02:00
ldr r6, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r6]
ldr r0, [r0, 0x1C]
mov r7, r9
adds r2, r7, r0
ldrb r1, [r2, 0xE]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080DF3D0
ldrb r0, [r2, 0xD]
movs r1, 0x80
orrs r0, r1
strb r0, [r2, 0xD]
_080DF3D0:
movs r0, 0x10
add r9, r0
movs r1, 0x2
add r10, r1
adds r4, 0x1
cmp r4, 0x3
bgt _080DF3E0
b _080DF2C2
_080DF3E0:
movs r4, 0
movs r5, 0
movs r3, 0
ldr r2, [sp, 0x28]
mov r1, sp
_080DF3EA:
strh r3, [r1]
adds r0, r2, r4
strb r5, [r0]
adds r1, 0x2
adds r4, 0x1
cmp r4, 0x4
ble _080DF3EA
mov r1, sp
ldr r0, =0x0000ffff
strh r0, [r1, 0xA]
movs r0, 0
ldr r2, [sp, 0x28]
strb r0, [r2, 0x5]
movs r4, 0
2017-10-14 16:55:25 +02:00
ldr r0, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
mov r8, r0
ldr r7, [sp, 0x30]
_080DF40E:
mov r3, r8
ldr r0, [r3, 0x1C]
adds r0, r7, r0
lsls r1, r4, 1
adds r0, r1
ldrh r0, [r0]
adds r4, 0x1
mov r12, r4
cmp r0, 0
beq _080DF450
2017-10-14 16:55:25 +02:00
ldr r0, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r6, [r0]
ldr r3, [sp, 0x28]
mov r4, sp
movs r5, 0x4
_080DF42C:
ldr r0, [r6, 0x1C]
adds r0, r7, r0
adds r0, r1
ldrh r0, [r0]
ldrh r2, [r4]
cmp r0, r2
beq _080DF440
cmp r2, 0
bne _080DF446
strh r0, [r4]
_080DF440:
ldrb r0, [r3]
adds r0, 0x1
strb r0, [r3]
_080DF446:
adds r3, 0x1
adds r4, 0x2
subs r5, 0x1
cmp r5, 0
bge _080DF42C
_080DF450:
mov r4, r12
cmp r4, 0x4
ble _080DF40E
mov r0, sp
ldrh r0, [r0]
ldr r6, [sp, 0x2C]
strh r0, [r6]
ldr r7, [sp, 0x28]
ldrb r3, [r7]
movs r6, 0
movs r4, 0x1
ldr r1, [sp, 0x24]
ldrh r0, [r1]
ldr r1, =0x0000ffff
cmp r0, r1
beq _080DF4C0
ldr r5, [sp, 0x2C]
adds r7, r1, 0
mov r2, sp
adds r2, 0x2
_080DF478:
ldr r0, [sp, 0x28]
adds r1, r0, r4
ldrb r0, [r1]
cmp r3, r0
bcs _080DF4A4
ldrh r0, [r2]
strh r0, [r5]
ldrb r3, [r1]
movs r6, 0x1
b _080DF4B6
.pool
_080DF4A4:
cmp r3, r0
bne _080DF4B6
lsls r0, r6, 1
adds r0, r5, r0
ldrh r1, [r2]
strh r1, [r0]
adds r0, r6, 0x1
lsls r0, 24
lsrs r6, r0, 24
_080DF4B6:
adds r2, 0x2
adds r4, 0x1
ldrh r0, [r2]
cmp r0, r7
bne _080DF478
_080DF4C0:
bl Random
2017-10-14 16:55:25 +02:00
ldr r1, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r1, [r1]
ldr r4, [r1, 0x1C]
ldr r1, [sp, 0x30]
adds r4, r1, r4
lsls r0, 16
lsrs r0, 16
adds r1, r6, 0
bl __modsi3
lsls r0, 1
ldr r2, [sp, 0x2C]
adds r0, r2, r0
ldrh r0, [r0]
strh r0, [r4, 0xA]
add sp, 0x38
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_80DF250
thumb_func_start sub_80DF4F8
sub_80DF4F8: @ 80DF4F8
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
2018-05-02 01:47:11 +02:00
ldr r1, =gContestFinalStandings
ldr r0, =gContestPlayerMonIndex
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _080DF514
b _080DF6EE
_080DF514:
movs r7, 0
movs r3, 0
2017-10-14 16:55:25 +02:00
ldr r0, =gContestResources
2016-11-01 18:08:48 +01:00
mov r12, r0
_080DF51C:
adds r0, r3, r1
ldrb r0, [r0]
cmp r0, 0
bne _080DF528
lsls r0, r3, 24
lsrs r7, r0, 24
_080DF528:
adds r3, 0x1
cmp r3, 0x3
ble _080DF51C
movs r1, 0
mov r9, r1
mov r10, r1
movs r3, 0
lsls r2, r7, 1
lsls r4, r7, 4
mov r8, r4
2018-05-11 01:28:52 +02:00
ldr r1, =gContestMonConditions
2016-11-01 18:08:48 +01:00
adds r0, r2, r1
movs r6, 0
ldrsh r5, [r0, r6]
str r5, [sp, 0x8]
adds r5, r1, 0
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02039F18
2016-11-01 18:08:48 +01:00
adds r2, r0
adds r4, r0, 0
_080DF54E:
movs r1, 0
ldrsh r0, [r5, r1]
ldr r6, [sp, 0x8]
cmp r6, r0
bge _080DF562
mov r0, r9
adds r0, 0x1
lsls r0, 24
lsrs r0, 24
mov r9, r0
_080DF562:
movs r0, 0
ldrsh r1, [r2, r0]
movs r6, 0
ldrsh r0, [r4, r6]
cmp r1, r0
bge _080DF578
mov r0, r10
adds r0, 0x1
lsls r0, 24
lsrs r0, 24
mov r10, r0
_080DF578:
adds r5, 0x2
adds r4, 0x2
adds r3, 0x1
cmp r3, 0x3
ble _080DF54E
mov r1, r12
ldr r0, [r1]
ldr r0, [r0, 0x1C]
add r0, r8
ldrb r1, [r0, 0xC]
movs r4, 0
movs r2, 0x1
movs r3, 0x7
_080DF592:
adds r0, r1, 0
ands r0, r2
cmp r0, 0
beq _080DF5A0
adds r0, r4, 0x1
lsls r0, 24
lsrs r4, r0, 24
_080DF5A0:
lsrs r1, 1
subs r3, 0x1
cmp r3, 0
bge _080DF592
bl Random
2016-11-01 18:08:48 +01:00
lsls r0, 16
lsrs r0, 16
adds r1, r4, 0
bl __modsi3
lsls r0, 24
lsrs r5, r0, 24
2017-10-14 16:55:25 +02:00
ldr r0, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldr r0, [r0, 0x1C]
add r0, r8
ldrb r1, [r0, 0xC]
movs r4, 0
movs r2, 0
movs r3, 0
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080DF5DC
cmp r5, 0
beq _080DF5F6
_080DF5D6:
adds r0, r4, 0x1
lsls r0, 24
lsrs r4, r0, 24
_080DF5DC:
lsrs r1, 1
adds r0, r2, 0x1
lsls r0, 24
lsrs r2, r0, 24
adds r3, 0x1
cmp r3, 0x7
bgt _080DF5F6
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080DF5DC
cmp r5, r4
bne _080DF5D6
_080DF5F6:
movs r1, 0x1
adds r0, r1, 0
lsls r0, r2
lsls r0, 16
lsrs r2, r0, 16
cmp r7, 0
bne _080DF628
mov r0, sp
strb r1, [r0]
2017-10-14 16:55:25 +02:00
ldr r1, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r1]
ldr r0, [r0, 0x1C]
ldrb r4, [r0, 0x1D]
movs r3, 0x2
b _080DF638
.pool
_080DF628:
mov r1, sp
movs r0, 0
strb r0, [r1]
2017-10-14 16:55:25 +02:00
ldr r1, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r1]
ldr r0, [r0, 0x1C]
ldrb r4, [r0, 0xD]
movs r3, 0x1
_080DF638:
mov r12, r1
movs r5, 0x1
lsls r2, 24
str r2, [sp, 0x4]
cmp r3, 0x3
bgt _080DF682
_080DF644:
cmp r3, r7
beq _080DF67C
mov r6, r12
ldr r2, [r6]
ldr r0, [r2, 0x1C]
lsls r1, r3, 4
adds r0, r1, r0
ldrb r0, [r0, 0xD]
cmp r4, r0
bcs _080DF66C
mov r0, sp
strb r3, [r0]
ldr r0, [r2, 0x1C]
adds r0, r1, r0
ldrb r4, [r0, 0xD]
movs r5, 0x1
b _080DF67C
.pool
_080DF66C:
cmp r4, r0
bne _080DF67C
mov r1, sp
adds r0, r1, r5
strb r3, [r0]
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
_080DF67C:
adds r3, 0x1
cmp r3, 0x3
ble _080DF644
_080DF682:
bl Random
2016-11-01 18:08:48 +01:00
lsls r0, 16
lsrs r0, 16
adds r1, r5, 0
bl __modsi3
add r0, sp
ldrb r6, [r0]
movs r2, 0x80
movs r3, 0
2017-10-14 16:55:25 +02:00
ldr r5, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r5]
ldr r0, [r0, 0x1C]
lsls r1, r6, 4
adds r0, r1, r0
ldrb r0, [r0, 0xD]
ands r0, r2
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _080DF6C4
_080DF6AE:
lsrs r2, 1
adds r3, 0x1
cmp r3, 0x7
bgt _080DF6C4
ldr r0, [r5]
ldr r0, [r0, 0x1C]
adds r0, r1, r0
ldrb r4, [r0, 0xD]
ands r4, r2
cmp r4, 0
beq _080DF6AE
_080DF6C4:
mov r0, r9
Decompile TV (#80) * ClearTVShowData * special_0x44 * DoTVShow (nonmatching because align) * DoTVShowBravoTrainerPokemonProfile * Update field names * DoTVShowBravoTrainerBattleTower * Renaming of struct fields * sub_80EBFF4 and UpdateTVScreensOnMap * SetTVMetatilesOnMap * Power buttons for the TV screens on the map * special_0x45 * sub_80EC18C * special_0x4a * ResetGabbyAndTy * GabbyAndTyBeforeInterview * GabbyAndTyAfterInterview * Through IsTVShowInSearchOfTrainersAiring * GabbyAndTyGetLastQuote * GabbyAndTyGetLastBattleTrivia * GabbyAndTySetScriptVarsToFieldObjectLocalIds * InterviewAfter; use TVShow as a precursor for making the individual show structs anonymous * Make TV structs anonymous within the union * Move the TV union to its own subheader * Move TV show enums to the global.tv.h subheader * Funcion renaming * Apply static attributes where able * PutPokemonTodayCaughtOnAir * sub_80EC8A4 * PutPokemonTodayFailedOnTheAir * sub_80EC9E8, sub_80ECA10 * sub_80ECA38 * sub_80ECB00 * Put3CheersForPokeblocksOnTheAir * PutFanClubSpecialOnTheAir * ContestLiveUpdates_BeforeInterview * Other before-interview Contest Live Updates functions * ContestLiveUpdates_BeforeInterview_5 * InterviewAfter_BravoTrainerPokemonProfile * BravoTrainerPokemonProfile_BeforeInterview1 * BravoTrainerPokemonProfile_BeforeInterview2 * Disassemble TV data * Decompile TV data * InterviewAfter_BravoTrainerBattleTowerProfile * SaveRecordedItemPurchasesForTVShow * PutNameRaterShowOnTheAir * StartMassOutbreak * PutLilycoveContestLadyShowOnTheAir * InterviewAfter_FanClubLetter * Rip TV strings * InterviewAfter_RecentHappenings * InterviewAfter_PkmnFanClubOpinions * sub_80ED718 * EndMassOutbreak * sub_80ED888 * sub_80ED8B4 * UpdateMassOutbreakTimeLeft * sub_80ED950 * PutFishingAdviceShowOnTheAir * through sub_80EDA80 * ewram and common syms are now fetched from the object files * BSS symbols are taken from the tv.o file * through sub_80EDC60 * sub_80EDCE8 * sub_80EDD78 * through sub_80EDE84 * nomatching sub_80EDE98 * sub_80EDFB4 * sub_80EE104 * sub_80EE104 * sub_80EE184 * sub_80EE2CC * sub_80EE35C * sub_80EE44C * sub_80EE4DC * sub_80EE5A4 * sub_80EE69C * sub_80EE72C * sub_80EE7C0 * sub_80EE818 * sub_80EE8C8 * sub_80EEA70 * sub_80EEB98 * sub_80EEBF4 * through sub_80EED60 * Functions relating to Pokemon News * sub_80EEF6C * GetPriceReduction * IsPriceDiscounted * sub_80EF120 * through sub_80EF370 * sub_80EF40C * HasMixableShowAlreadyBeenSpawnedWithPlayerID * TV_SortPurchasesByQuantity * FindActiveBroadcastByShowType_SetScriptResult * InterviewBefore * through sub_80EF88C * through sub_80EF93C * through sub_80EFA24 * through TV_BernoulliTrial * sub_80EFB58 * sub_80EFBA4 * sub_80EFBDC * through sub_80EFD98 * ChangePokemonNickname * ChangeBoxPokemonNickname * sub_80EFF9C * through player_id_to_dword * CheckForBigMovieOrEmergencyNewsOnTV * GetMomOrDadStringForTVMessage * sub_80F01E8 * sub_80F0358 * sub_80F049C * TV record mixing functions * sub_80F06D0 * sub_80F0708 nonmatching * through sub_80F0B24 * sub_80F0B64 * through sub_80F0C04 * sub_80F0C7C * sub_80F0D60 * sub_80F0E58 * sub_80F0E84 * through sub_80F0F24 * sub_80F0F64 * sub_80F1208 * sub_80F1254 * sub_80F1290 * sub_80F12A4 * sub_80F14F8 * DoTVShowTodaysSmartShopper * DoTVShowTheNameRaterShow * DoTVShowPokemonTodaySuccessfulCapture * DoTVShowPokemonTodayFailedCapture * DoTVShowPokemonFanClubLetter * DoTVShowRecentHappenings * DoTVShowPokemonFanClubOpinions * DoTVShowPokemonNewsMassOutbreak * DoTVShowPokemonContestLiveUpdates * DoTVShowPokemonBattleUpdate * DoTVShow3CheersForPokeblocks * DoTVShowInSearchOfTrainers * Label GabbyAndTyData fields; remove ddump comments from data/text/tv.inc * DoTVShowPokemonAngler * DoTVShowTheWorldOfMasters; update RAM symbols and field names * Decorate static functions * DoTVShowTodaysRivalTrainer; region map enums * TVDewfordTrendWatcherNetworkTextGroup * DoTVShowHoennTreasureInvestigators * DoTVShowFindThatGamer * DoTVShowBreakingNewsTV * DoTVShowSecretBaseVisit * DoTVShowPokemonLotterWinnerFlashReport * DoTVShowThePokemonBattleSeminar * DoTVShowTrainerFanClubSpecial, DoTVShowTrainerFanClub * DoTVShowSpotTheCuties * DoTVShowPokemonNewsBattleFrontier * DoTVShowWhatsNo1InHoennToday * Helpers for DoTVShowSecretBaseSecrets * DoTVShowSecretBaseSecrets * DoTVShowSafariFanClub * Finish decompilation of tv.s * Some renaming * Rename text group pointers * revoke statis; pokenews enums * Labels are number one * Label all TV struct fields * Make data/text/tv.inc more readable * Split data/text/tv.inc * Rename pokenews text pointers * Frontier Symbol constants; indicate static rodata objects with 's' prefix * Fix leading spaces/tabs F*** CLion sometimes * Fix inconsequential warning
2017-10-13 17:09:36 +02:00
bl ContestLiveUpdates_BeforeInterview_1
2016-11-01 18:08:48 +01:00
mov r0, r10
Decompile TV (#80) * ClearTVShowData * special_0x44 * DoTVShow (nonmatching because align) * DoTVShowBravoTrainerPokemonProfile * Update field names * DoTVShowBravoTrainerBattleTower * Renaming of struct fields * sub_80EBFF4 and UpdateTVScreensOnMap * SetTVMetatilesOnMap * Power buttons for the TV screens on the map * special_0x45 * sub_80EC18C * special_0x4a * ResetGabbyAndTy * GabbyAndTyBeforeInterview * GabbyAndTyAfterInterview * Through IsTVShowInSearchOfTrainersAiring * GabbyAndTyGetLastQuote * GabbyAndTyGetLastBattleTrivia * GabbyAndTySetScriptVarsToFieldObjectLocalIds * InterviewAfter; use TVShow as a precursor for making the individual show structs anonymous * Make TV structs anonymous within the union * Move the TV union to its own subheader * Move TV show enums to the global.tv.h subheader * Funcion renaming * Apply static attributes where able * PutPokemonTodayCaughtOnAir * sub_80EC8A4 * PutPokemonTodayFailedOnTheAir * sub_80EC9E8, sub_80ECA10 * sub_80ECA38 * sub_80ECB00 * Put3CheersForPokeblocksOnTheAir * PutFanClubSpecialOnTheAir * ContestLiveUpdates_BeforeInterview * Other before-interview Contest Live Updates functions * ContestLiveUpdates_BeforeInterview_5 * InterviewAfter_BravoTrainerPokemonProfile * BravoTrainerPokemonProfile_BeforeInterview1 * BravoTrainerPokemonProfile_BeforeInterview2 * Disassemble TV data * Decompile TV data * InterviewAfter_BravoTrainerBattleTowerProfile * SaveRecordedItemPurchasesForTVShow * PutNameRaterShowOnTheAir * StartMassOutbreak * PutLilycoveContestLadyShowOnTheAir * InterviewAfter_FanClubLetter * Rip TV strings * InterviewAfter_RecentHappenings * InterviewAfter_PkmnFanClubOpinions * sub_80ED718 * EndMassOutbreak * sub_80ED888 * sub_80ED8B4 * UpdateMassOutbreakTimeLeft * sub_80ED950 * PutFishingAdviceShowOnTheAir * through sub_80EDA80 * ewram and common syms are now fetched from the object files * BSS symbols are taken from the tv.o file * through sub_80EDC60 * sub_80EDCE8 * sub_80EDD78 * through sub_80EDE84 * nomatching sub_80EDE98 * sub_80EDFB4 * sub_80EE104 * sub_80EE104 * sub_80EE184 * sub_80EE2CC * sub_80EE35C * sub_80EE44C * sub_80EE4DC * sub_80EE5A4 * sub_80EE69C * sub_80EE72C * sub_80EE7C0 * sub_80EE818 * sub_80EE8C8 * sub_80EEA70 * sub_80EEB98 * sub_80EEBF4 * through sub_80EED60 * Functions relating to Pokemon News * sub_80EEF6C * GetPriceReduction * IsPriceDiscounted * sub_80EF120 * through sub_80EF370 * sub_80EF40C * HasMixableShowAlreadyBeenSpawnedWithPlayerID * TV_SortPurchasesByQuantity * FindActiveBroadcastByShowType_SetScriptResult * InterviewBefore * through sub_80EF88C * through sub_80EF93C * through sub_80EFA24 * through TV_BernoulliTrial * sub_80EFB58 * sub_80EFBA4 * sub_80EFBDC * through sub_80EFD98 * ChangePokemonNickname * ChangeBoxPokemonNickname * sub_80EFF9C * through player_id_to_dword * CheckForBigMovieOrEmergencyNewsOnTV * GetMomOrDadStringForTVMessage * sub_80F01E8 * sub_80F0358 * sub_80F049C * TV record mixing functions * sub_80F06D0 * sub_80F0708 nonmatching * through sub_80F0B24 * sub_80F0B64 * through sub_80F0C04 * sub_80F0C7C * sub_80F0D60 * sub_80F0E58 * sub_80F0E84 * through sub_80F0F24 * sub_80F0F64 * sub_80F1208 * sub_80F1254 * sub_80F1290 * sub_80F12A4 * sub_80F14F8 * DoTVShowTodaysSmartShopper * DoTVShowTheNameRaterShow * DoTVShowPokemonTodaySuccessfulCapture * DoTVShowPokemonTodayFailedCapture * DoTVShowPokemonFanClubLetter * DoTVShowRecentHappenings * DoTVShowPokemonFanClubOpinions * DoTVShowPokemonNewsMassOutbreak * DoTVShowPokemonContestLiveUpdates * DoTVShowPokemonBattleUpdate * DoTVShow3CheersForPokeblocks * DoTVShowInSearchOfTrainers * Label GabbyAndTyData fields; remove ddump comments from data/text/tv.inc * DoTVShowPokemonAngler * DoTVShowTheWorldOfMasters; update RAM symbols and field names * Decorate static functions * DoTVShowTodaysRivalTrainer; region map enums * TVDewfordTrendWatcherNetworkTextGroup * DoTVShowHoennTreasureInvestigators * DoTVShowFindThatGamer * DoTVShowBreakingNewsTV * DoTVShowSecretBaseVisit * DoTVShowPokemonLotterWinnerFlashReport * DoTVShowThePokemonBattleSeminar * DoTVShowTrainerFanClubSpecial, DoTVShowTrainerFanClub * DoTVShowSpotTheCuties * DoTVShowPokemonNewsBattleFrontier * DoTVShowWhatsNo1InHoennToday * Helpers for DoTVShowSecretBaseSecrets * DoTVShowSecretBaseSecrets * DoTVShowSafariFanClub * Finish decompilation of tv.s * Some renaming * Rename text group pointers * revoke statis; pokenews enums * Labels are number one * Label all TV struct fields * Make data/text/tv.inc more readable * Split data/text/tv.inc * Rename pokenews text pointers * Frontier Symbol constants; indicate static rodata objects with 's' prefix * Fix leading spaces/tabs F*** CLion sometimes * Fix inconsequential warning
2017-10-13 17:09:36 +02:00
bl ContestLiveUpdates_BeforeInterview_2
2016-11-01 18:08:48 +01:00
ldr r5, [sp, 0x4]
lsrs r0, r5, 24
Decompile TV (#80) * ClearTVShowData * special_0x44 * DoTVShow (nonmatching because align) * DoTVShowBravoTrainerPokemonProfile * Update field names * DoTVShowBravoTrainerBattleTower * Renaming of struct fields * sub_80EBFF4 and UpdateTVScreensOnMap * SetTVMetatilesOnMap * Power buttons for the TV screens on the map * special_0x45 * sub_80EC18C * special_0x4a * ResetGabbyAndTy * GabbyAndTyBeforeInterview * GabbyAndTyAfterInterview * Through IsTVShowInSearchOfTrainersAiring * GabbyAndTyGetLastQuote * GabbyAndTyGetLastBattleTrivia * GabbyAndTySetScriptVarsToFieldObjectLocalIds * InterviewAfter; use TVShow as a precursor for making the individual show structs anonymous * Make TV structs anonymous within the union * Move the TV union to its own subheader * Move TV show enums to the global.tv.h subheader * Funcion renaming * Apply static attributes where able * PutPokemonTodayCaughtOnAir * sub_80EC8A4 * PutPokemonTodayFailedOnTheAir * sub_80EC9E8, sub_80ECA10 * sub_80ECA38 * sub_80ECB00 * Put3CheersForPokeblocksOnTheAir * PutFanClubSpecialOnTheAir * ContestLiveUpdates_BeforeInterview * Other before-interview Contest Live Updates functions * ContestLiveUpdates_BeforeInterview_5 * InterviewAfter_BravoTrainerPokemonProfile * BravoTrainerPokemonProfile_BeforeInterview1 * BravoTrainerPokemonProfile_BeforeInterview2 * Disassemble TV data * Decompile TV data * InterviewAfter_BravoTrainerBattleTowerProfile * SaveRecordedItemPurchasesForTVShow * PutNameRaterShowOnTheAir * StartMassOutbreak * PutLilycoveContestLadyShowOnTheAir * InterviewAfter_FanClubLetter * Rip TV strings * InterviewAfter_RecentHappenings * InterviewAfter_PkmnFanClubOpinions * sub_80ED718 * EndMassOutbreak * sub_80ED888 * sub_80ED8B4 * UpdateMassOutbreakTimeLeft * sub_80ED950 * PutFishingAdviceShowOnTheAir * through sub_80EDA80 * ewram and common syms are now fetched from the object files * BSS symbols are taken from the tv.o file * through sub_80EDC60 * sub_80EDCE8 * sub_80EDD78 * through sub_80EDE84 * nomatching sub_80EDE98 * sub_80EDFB4 * sub_80EE104 * sub_80EE104 * sub_80EE184 * sub_80EE2CC * sub_80EE35C * sub_80EE44C * sub_80EE4DC * sub_80EE5A4 * sub_80EE69C * sub_80EE72C * sub_80EE7C0 * sub_80EE818 * sub_80EE8C8 * sub_80EEA70 * sub_80EEB98 * sub_80EEBF4 * through sub_80EED60 * Functions relating to Pokemon News * sub_80EEF6C * GetPriceReduction * IsPriceDiscounted * sub_80EF120 * through sub_80EF370 * sub_80EF40C * HasMixableShowAlreadyBeenSpawnedWithPlayerID * TV_SortPurchasesByQuantity * FindActiveBroadcastByShowType_SetScriptResult * InterviewBefore * through sub_80EF88C * through sub_80EF93C * through sub_80EFA24 * through TV_BernoulliTrial * sub_80EFB58 * sub_80EFBA4 * sub_80EFBDC * through sub_80EFD98 * ChangePokemonNickname * ChangeBoxPokemonNickname * sub_80EFF9C * through player_id_to_dword * CheckForBigMovieOrEmergencyNewsOnTV * GetMomOrDadStringForTVMessage * sub_80F01E8 * sub_80F0358 * sub_80F049C * TV record mixing functions * sub_80F06D0 * sub_80F0708 nonmatching * through sub_80F0B24 * sub_80F0B64 * through sub_80F0C04 * sub_80F0C7C * sub_80F0D60 * sub_80F0E58 * sub_80F0E84 * through sub_80F0F24 * sub_80F0F64 * sub_80F1208 * sub_80F1254 * sub_80F1290 * sub_80F12A4 * sub_80F14F8 * DoTVShowTodaysSmartShopper * DoTVShowTheNameRaterShow * DoTVShowPokemonTodaySuccessfulCapture * DoTVShowPokemonTodayFailedCapture * DoTVShowPokemonFanClubLetter * DoTVShowRecentHappenings * DoTVShowPokemonFanClubOpinions * DoTVShowPokemonNewsMassOutbreak * DoTVShowPokemonContestLiveUpdates * DoTVShowPokemonBattleUpdate * DoTVShow3CheersForPokeblocks * DoTVShowInSearchOfTrainers * Label GabbyAndTyData fields; remove ddump comments from data/text/tv.inc * DoTVShowPokemonAngler * DoTVShowTheWorldOfMasters; update RAM symbols and field names * Decorate static functions * DoTVShowTodaysRivalTrainer; region map enums * TVDewfordTrendWatcherNetworkTextGroup * DoTVShowHoennTreasureInvestigators * DoTVShowFindThatGamer * DoTVShowBreakingNewsTV * DoTVShowSecretBaseVisit * DoTVShowPokemonLotterWinnerFlashReport * DoTVShowThePokemonBattleSeminar * DoTVShowTrainerFanClubSpecial, DoTVShowTrainerFanClub * DoTVShowSpotTheCuties * DoTVShowPokemonNewsBattleFrontier * DoTVShowWhatsNo1InHoennToday * Helpers for DoTVShowSecretBaseSecrets * DoTVShowSecretBaseSecrets * DoTVShowSafariFanClub * Finish decompilation of tv.s * Some renaming * Rename text group pointers * revoke statis; pokenews enums * Labels are number one * Label all TV struct fields * Make data/text/tv.inc more readable * Split data/text/tv.inc * Rename pokenews text pointers * Frontier Symbol constants; indicate static rodata objects with 's' prefix * Fix leading spaces/tabs F*** CLion sometimes * Fix inconsequential warning
2017-10-13 17:09:36 +02:00
bl ContestLiveUpdates_BeforeInterview_3
2017-10-14 16:55:25 +02:00
ldr r0, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldr r0, [r0, 0x1C]
add r0, r8
ldrh r0, [r0, 0xA]
Decompile TV (#80) * ClearTVShowData * special_0x44 * DoTVShow (nonmatching because align) * DoTVShowBravoTrainerPokemonProfile * Update field names * DoTVShowBravoTrainerBattleTower * Renaming of struct fields * sub_80EBFF4 and UpdateTVScreensOnMap * SetTVMetatilesOnMap * Power buttons for the TV screens on the map * special_0x45 * sub_80EC18C * special_0x4a * ResetGabbyAndTy * GabbyAndTyBeforeInterview * GabbyAndTyAfterInterview * Through IsTVShowInSearchOfTrainersAiring * GabbyAndTyGetLastQuote * GabbyAndTyGetLastBattleTrivia * GabbyAndTySetScriptVarsToFieldObjectLocalIds * InterviewAfter; use TVShow as a precursor for making the individual show structs anonymous * Make TV structs anonymous within the union * Move the TV union to its own subheader * Move TV show enums to the global.tv.h subheader * Funcion renaming * Apply static attributes where able * PutPokemonTodayCaughtOnAir * sub_80EC8A4 * PutPokemonTodayFailedOnTheAir * sub_80EC9E8, sub_80ECA10 * sub_80ECA38 * sub_80ECB00 * Put3CheersForPokeblocksOnTheAir * PutFanClubSpecialOnTheAir * ContestLiveUpdates_BeforeInterview * Other before-interview Contest Live Updates functions * ContestLiveUpdates_BeforeInterview_5 * InterviewAfter_BravoTrainerPokemonProfile * BravoTrainerPokemonProfile_BeforeInterview1 * BravoTrainerPokemonProfile_BeforeInterview2 * Disassemble TV data * Decompile TV data * InterviewAfter_BravoTrainerBattleTowerProfile * SaveRecordedItemPurchasesForTVShow * PutNameRaterShowOnTheAir * StartMassOutbreak * PutLilycoveContestLadyShowOnTheAir * InterviewAfter_FanClubLetter * Rip TV strings * InterviewAfter_RecentHappenings * InterviewAfter_PkmnFanClubOpinions * sub_80ED718 * EndMassOutbreak * sub_80ED888 * sub_80ED8B4 * UpdateMassOutbreakTimeLeft * sub_80ED950 * PutFishingAdviceShowOnTheAir * through sub_80EDA80 * ewram and common syms are now fetched from the object files * BSS symbols are taken from the tv.o file * through sub_80EDC60 * sub_80EDCE8 * sub_80EDD78 * through sub_80EDE84 * nomatching sub_80EDE98 * sub_80EDFB4 * sub_80EE104 * sub_80EE104 * sub_80EE184 * sub_80EE2CC * sub_80EE35C * sub_80EE44C * sub_80EE4DC * sub_80EE5A4 * sub_80EE69C * sub_80EE72C * sub_80EE7C0 * sub_80EE818 * sub_80EE8C8 * sub_80EEA70 * sub_80EEB98 * sub_80EEBF4 * through sub_80EED60 * Functions relating to Pokemon News * sub_80EEF6C * GetPriceReduction * IsPriceDiscounted * sub_80EF120 * through sub_80EF370 * sub_80EF40C * HasMixableShowAlreadyBeenSpawnedWithPlayerID * TV_SortPurchasesByQuantity * FindActiveBroadcastByShowType_SetScriptResult * InterviewBefore * through sub_80EF88C * through sub_80EF93C * through sub_80EFA24 * through TV_BernoulliTrial * sub_80EFB58 * sub_80EFBA4 * sub_80EFBDC * through sub_80EFD98 * ChangePokemonNickname * ChangeBoxPokemonNickname * sub_80EFF9C * through player_id_to_dword * CheckForBigMovieOrEmergencyNewsOnTV * GetMomOrDadStringForTVMessage * sub_80F01E8 * sub_80F0358 * sub_80F049C * TV record mixing functions * sub_80F06D0 * sub_80F0708 nonmatching * through sub_80F0B24 * sub_80F0B64 * through sub_80F0C04 * sub_80F0C7C * sub_80F0D60 * sub_80F0E58 * sub_80F0E84 * through sub_80F0F24 * sub_80F0F64 * sub_80F1208 * sub_80F1254 * sub_80F1290 * sub_80F12A4 * sub_80F14F8 * DoTVShowTodaysSmartShopper * DoTVShowTheNameRaterShow * DoTVShowPokemonTodaySuccessfulCapture * DoTVShowPokemonTodayFailedCapture * DoTVShowPokemonFanClubLetter * DoTVShowRecentHappenings * DoTVShowPokemonFanClubOpinions * DoTVShowPokemonNewsMassOutbreak * DoTVShowPokemonContestLiveUpdates * DoTVShowPokemonBattleUpdate * DoTVShow3CheersForPokeblocks * DoTVShowInSearchOfTrainers * Label GabbyAndTyData fields; remove ddump comments from data/text/tv.inc * DoTVShowPokemonAngler * DoTVShowTheWorldOfMasters; update RAM symbols and field names * Decorate static functions * DoTVShowTodaysRivalTrainer; region map enums * TVDewfordTrendWatcherNetworkTextGroup * DoTVShowHoennTreasureInvestigators * DoTVShowFindThatGamer * DoTVShowBreakingNewsTV * DoTVShowSecretBaseVisit * DoTVShowPokemonLotterWinnerFlashReport * DoTVShowThePokemonBattleSeminar * DoTVShowTrainerFanClubSpecial, DoTVShowTrainerFanClub * DoTVShowSpotTheCuties * DoTVShowPokemonNewsBattleFrontier * DoTVShowWhatsNo1InHoennToday * Helpers for DoTVShowSecretBaseSecrets * DoTVShowSecretBaseSecrets * DoTVShowSafariFanClub * Finish decompilation of tv.s * Some renaming * Rename text group pointers * revoke statis; pokenews enums * Labels are number one * Label all TV struct fields * Make data/text/tv.inc more readable * Split data/text/tv.inc * Rename pokenews text pointers * Frontier Symbol constants; indicate static rodata objects with 's' prefix * Fix leading spaces/tabs F*** CLion sometimes * Fix inconsequential warning
2017-10-13 17:09:36 +02:00
bl ContestLiveUpdates_BeforeInterview_4
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
adds r1, r6, 0
Decompile TV (#80) * ClearTVShowData * special_0x44 * DoTVShow (nonmatching because align) * DoTVShowBravoTrainerPokemonProfile * Update field names * DoTVShowBravoTrainerBattleTower * Renaming of struct fields * sub_80EBFF4 and UpdateTVScreensOnMap * SetTVMetatilesOnMap * Power buttons for the TV screens on the map * special_0x45 * sub_80EC18C * special_0x4a * ResetGabbyAndTy * GabbyAndTyBeforeInterview * GabbyAndTyAfterInterview * Through IsTVShowInSearchOfTrainersAiring * GabbyAndTyGetLastQuote * GabbyAndTyGetLastBattleTrivia * GabbyAndTySetScriptVarsToFieldObjectLocalIds * InterviewAfter; use TVShow as a precursor for making the individual show structs anonymous * Make TV structs anonymous within the union * Move the TV union to its own subheader * Move TV show enums to the global.tv.h subheader * Funcion renaming * Apply static attributes where able * PutPokemonTodayCaughtOnAir * sub_80EC8A4 * PutPokemonTodayFailedOnTheAir * sub_80EC9E8, sub_80ECA10 * sub_80ECA38 * sub_80ECB00 * Put3CheersForPokeblocksOnTheAir * PutFanClubSpecialOnTheAir * ContestLiveUpdates_BeforeInterview * Other before-interview Contest Live Updates functions * ContestLiveUpdates_BeforeInterview_5 * InterviewAfter_BravoTrainerPokemonProfile * BravoTrainerPokemonProfile_BeforeInterview1 * BravoTrainerPokemonProfile_BeforeInterview2 * Disassemble TV data * Decompile TV data * InterviewAfter_BravoTrainerBattleTowerProfile * SaveRecordedItemPurchasesForTVShow * PutNameRaterShowOnTheAir * StartMassOutbreak * PutLilycoveContestLadyShowOnTheAir * InterviewAfter_FanClubLetter * Rip TV strings * InterviewAfter_RecentHappenings * InterviewAfter_PkmnFanClubOpinions * sub_80ED718 * EndMassOutbreak * sub_80ED888 * sub_80ED8B4 * UpdateMassOutbreakTimeLeft * sub_80ED950 * PutFishingAdviceShowOnTheAir * through sub_80EDA80 * ewram and common syms are now fetched from the object files * BSS symbols are taken from the tv.o file * through sub_80EDC60 * sub_80EDCE8 * sub_80EDD78 * through sub_80EDE84 * nomatching sub_80EDE98 * sub_80EDFB4 * sub_80EE104 * sub_80EE104 * sub_80EE184 * sub_80EE2CC * sub_80EE35C * sub_80EE44C * sub_80EE4DC * sub_80EE5A4 * sub_80EE69C * sub_80EE72C * sub_80EE7C0 * sub_80EE818 * sub_80EE8C8 * sub_80EEA70 * sub_80EEB98 * sub_80EEBF4 * through sub_80EED60 * Functions relating to Pokemon News * sub_80EEF6C * GetPriceReduction * IsPriceDiscounted * sub_80EF120 * through sub_80EF370 * sub_80EF40C * HasMixableShowAlreadyBeenSpawnedWithPlayerID * TV_SortPurchasesByQuantity * FindActiveBroadcastByShowType_SetScriptResult * InterviewBefore * through sub_80EF88C * through sub_80EF93C * through sub_80EFA24 * through TV_BernoulliTrial * sub_80EFB58 * sub_80EFBA4 * sub_80EFBDC * through sub_80EFD98 * ChangePokemonNickname * ChangeBoxPokemonNickname * sub_80EFF9C * through player_id_to_dword * CheckForBigMovieOrEmergencyNewsOnTV * GetMomOrDadStringForTVMessage * sub_80F01E8 * sub_80F0358 * sub_80F049C * TV record mixing functions * sub_80F06D0 * sub_80F0708 nonmatching * through sub_80F0B24 * sub_80F0B64 * through sub_80F0C04 * sub_80F0C7C * sub_80F0D60 * sub_80F0E58 * sub_80F0E84 * through sub_80F0F24 * sub_80F0F64 * sub_80F1208 * sub_80F1254 * sub_80F1290 * sub_80F12A4 * sub_80F14F8 * DoTVShowTodaysSmartShopper * DoTVShowTheNameRaterShow * DoTVShowPokemonTodaySuccessfulCapture * DoTVShowPokemonTodayFailedCapture * DoTVShowPokemonFanClubLetter * DoTVShowRecentHappenings * DoTVShowPokemonFanClubOpinions * DoTVShowPokemonNewsMassOutbreak * DoTVShowPokemonContestLiveUpdates * DoTVShowPokemonBattleUpdate * DoTVShow3CheersForPokeblocks * DoTVShowInSearchOfTrainers * Label GabbyAndTyData fields; remove ddump comments from data/text/tv.inc * DoTVShowPokemonAngler * DoTVShowTheWorldOfMasters; update RAM symbols and field names * Decorate static functions * DoTVShowTodaysRivalTrainer; region map enums * TVDewfordTrendWatcherNetworkTextGroup * DoTVShowHoennTreasureInvestigators * DoTVShowFindThatGamer * DoTVShowBreakingNewsTV * DoTVShowSecretBaseVisit * DoTVShowPokemonLotterWinnerFlashReport * DoTVShowThePokemonBattleSeminar * DoTVShowTrainerFanClubSpecial, DoTVShowTrainerFanClub * DoTVShowSpotTheCuties * DoTVShowPokemonNewsBattleFrontier * DoTVShowWhatsNo1InHoennToday * Helpers for DoTVShowSecretBaseSecrets * DoTVShowSecretBaseSecrets * DoTVShowSafariFanClub * Finish decompilation of tv.s * Some renaming * Rename text group pointers * revoke statis; pokenews enums * Labels are number one * Label all TV struct fields * Make data/text/tv.inc more readable * Split data/text/tv.inc * Rename pokenews text pointers * Frontier Symbol constants; indicate static rodata objects with 's' prefix * Fix leading spaces/tabs F*** CLion sometimes * Fix inconsequential warning
2017-10-13 17:09:36 +02:00
bl ContestLiveUpdates_BeforeInterview_5
2016-11-01 18:08:48 +01:00
_080DF6EE:
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_80DF4F8
thumb_func_start sub_80DF704
sub_80DF704: @ 80DF704
push {r4,lr}
lsls r0, 24
lsrs r3, r0, 24
ldr r0, =gHeap
2016-11-01 18:08:48 +01:00
movs r1, 0xD0
lsls r1, 9
adds r2, r0, r1
ldrb r1, [r2]
adds r4, r0, 0
cmp r1, 0
bne _080DF72C
cmp r3, 0
bne _080DF728
movs r0, 0x2
b _080DF72E
.pool
_080DF728:
movs r0, 0x3
b _080DF72E
_080DF72C:
movs r0, 0
_080DF72E:
strb r0, [r2]
movs r1, 0xD0
lsls r1, 9
adds r0, r4, r1
ldrb r0, [r0]
cmp r0, 0
bne _080DF746
bl sub_80DAEA4
bl sub_80DB2BC
b _080DF74A
_080DF746:
bl sub_80DF750
_080DF74A:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80DF704
thumb_func_start sub_80DF750
sub_80DF750: @ 80DF750
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x34
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020322D5
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
cmp r0, 0
bne _080DF766
b _080DF924
_080DF766:
ldr r0, =gHeap
2016-11-01 18:08:48 +01:00
movs r1, 0xD0
lsls r1, 9
adds r0, r1
ldrb r0, [r0]
subs r0, 0x2
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bls _080DF77C
b _080DF924
_080DF77C:
movs r7, 0
mov r2, sp
adds r2, 0x18
str r2, [sp, 0x30]
_080DF784:
adds r0, r7, 0
movs r1, 0
bl FillWindowPixelBuffer
adds r0, r7, 0x1
lsls r0, 24
lsrs r7, r0, 24
cmp r7, 0x3
bls _080DF784
ldr r0, =gHeap
2016-11-01 18:08:48 +01:00
movs r1, 0xD0
lsls r1, 9
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x2
bne _080DF874
movs r7, 0
movs r2, 0x7
mov r10, r2
ldr r0, [sp, 0x30]
mov r9, r0
_080DF7AE:
add r0, sp, 0x4
2017-09-20 21:38:05 +02:00
ldr r1, =gText_CDot
2017-01-14 20:53:20 +01:00
bl StringCopy
2016-11-01 18:08:48 +01:00
adds r5, r0, 0
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02039F26
2016-11-01 18:08:48 +01:00
adds r0, r7, r0
ldrb r0, [r0]
mov r1, r10
str r1, [sp]
add r1, sp, 0x4
movs r2, 0x5
movs r3, 0x1
2018-05-11 16:51:38 +02:00
bl Contest_PrintTextToBg0WindowAt
2017-10-14 16:55:25 +02:00
ldr r0, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldr r1, [r0, 0x1C]
lsls r0, r7, 4
adds r0, r1
ldrb r4, [r0, 0xC]
movs r6, 0x7
adds r2, r7, 0x1
mov r8, r2
_080DF7DE:
movs r1, 0x1
ands r1, r4
adds r0, r5, 0
movs r2, 0
movs r3, 0x1
2017-01-14 20:53:20 +01:00
bl ConvertIntToDecimalStringN
2016-11-01 18:08:48 +01:00
adds r5, r0, 0
lsrs r4, 1
lsls r0, r6, 24
movs r1, 0xFF
lsls r1, 24
adds r0, r1
lsrs r6, r0, 24
asrs r0, 24
movs r2, 0x1
negs r2, r2
cmp r0, r2
bgt _080DF7DE
movs r6, 0
2016-11-01 19:35:16 +01:00
ldr r4, =gUnknown_02039F26
2016-11-01 18:08:48 +01:00
ldr r3, [sp, 0x30]
_080DF80A:
lsls r0, r6, 24
asrs r0, 24
adds r2, r3, r0
mov r1, sp
adds r1, r0
adds r1, 0x4
ldrb r1, [r1]
strb r1, [r2]
adds r0, 0x1
lsls r0, 24
lsrs r6, r0, 24
asrs r5, r0, 24
cmp r5, 0x4
ble _080DF80A
mov r0, r9
adds r1, r0, r5
movs r0, 0xFF
strb r0, [r1]
adds r4, r7, r4
ldrb r0, [r4]
mov r1, r10
str r1, [sp]
mov r1, r9
movs r2, 0x5
movs r3, 0x1
2018-05-11 16:51:38 +02:00
bl Contest_PrintTextToBg0WindowAt
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
mov r1, sp
adds r1, r5
adds r1, 0x4
mov r2, r10
str r2, [sp]
movs r2, 0x37
movs r3, 0x1
2018-05-11 16:51:38 +02:00
bl Contest_PrintTextToBg0WindowAt
2016-11-01 18:08:48 +01:00
mov r1, r8
lsls r0, r1, 24
lsrs r7, r0, 24
cmp r7, 0x3
bls _080DF7AE
b _080DF920
.pool
_080DF874:
movs r7, 0
mov r2, sp
adds r2, 0x6
str r2, [sp, 0x2C]
ldr r0, [sp, 0x30]
mov r9, r0
movs r1, 0x7
mov r10, r1
_080DF884:
add r0, sp, 0x4
2017-09-20 21:38:05 +02:00
ldr r1, =gText_BDot
2017-01-14 20:53:20 +01:00
bl StringCopy
2017-10-14 16:55:25 +02:00
ldr r0, =gContestResources
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldr r1, [r0, 0x1C]
lsls r0, r7, 4
adds r0, r1
ldrb r4, [r0, 0xD]
ldr r5, [sp, 0x2C]
movs r6, 0x7
adds r2, r7, 0x1
mov r8, r2
_080DF8A0:
movs r1, 0x1
ands r1, r4
adds r0, r5, 0
movs r2, 0
movs r3, 0x1
2017-01-14 20:53:20 +01:00
bl ConvertIntToDecimalStringN
2016-11-01 18:08:48 +01:00
adds r5, r0, 0
lsrs r4, 1
lsls r0, r6, 24
movs r1, 0xFF
lsls r1, 24
adds r0, r1
lsrs r6, r0, 24
asrs r0, 24
movs r2, 0x1
negs r2, r2
cmp r0, r2
bgt _080DF8A0
movs r6, 0
2016-11-01 19:35:16 +01:00
ldr r4, =gUnknown_02039F26
2016-11-01 18:08:48 +01:00
ldr r3, [sp, 0x30]
_080DF8CC:
lsls r0, r6, 24
asrs r0, 24
adds r2, r3, r0
mov r1, sp
adds r1, r0
adds r1, 0x4
ldrb r1, [r1]
strb r1, [r2]
adds r0, 0x1
lsls r0, 24
lsrs r6, r0, 24
asrs r5, r0, 24
cmp r5, 0x4
ble _080DF8CC
mov r0, r9
adds r1, r0, r5
movs r0, 0xFF
strb r0, [r1]
adds r4, r7, r4
ldrb r0, [r4]
mov r1, r10
str r1, [sp]
mov r1, r9
movs r2, 0x5
movs r3, 0x1
2018-05-11 16:51:38 +02:00
bl Contest_PrintTextToBg0WindowAt
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
mov r1, sp
adds r1, r5
adds r1, 0x4
mov r2, r10
str r2, [sp]
movs r2, 0x37
movs r3, 0x1
2018-05-11 16:51:38 +02:00
bl Contest_PrintTextToBg0WindowAt
2016-11-01 18:08:48 +01:00
mov r1, r8
lsls r0, r1, 24
lsrs r7, r0, 24
cmp r7, 0x3
bls _080DF884
_080DF920:
bl sub_80DB2BC
_080DF924:
add sp, 0x34
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_80DF750
thumb_func_start sub_80DF940
sub_80DF940: @ 80DF940
push {r4,r5,lr}
adds r4, r0, 0
movs r5, 0x2
ldrb r0, [r4]
cmp r0, 0xFC
bne _080DF956
ldrb r0, [r4, 0x1]
cmp r0, 0x15
bne _080DF956
movs r0, 0x2
b _080DF9CC
_080DF956:
adds r0, r4, 0
2017-01-14 20:53:20 +01:00
bl StringLength
2016-11-01 18:08:48 +01:00
lsls r0, 16
lsrs r0, 16
cmp r0, 0x5
bhi _080DF9CA
ldrb r0, [r4]
cmp r0, 0xFF
beq _080DF9CA
_080DF96A:
ldrb r1, [r4]
adds r0, r1, 0
adds r0, 0x45
lsls r0, 24
lsrs r0, 24
cmp r0, 0x33
bls _080DF9BE
adds r0, r1, 0
adds r0, 0x5F
lsls r0, 24
lsrs r0, 24
cmp r0, 0x9
bls _080DF9BE
adds r0, r1, 0
cmp r0, 0
beq _080DF9BE
cmp r0, 0xAD
beq _080DF9BE
cmp r0, 0xB8
beq _080DF9BE
cmp r0, 0xAB
beq _080DF9BE
cmp r0, 0xAC
beq _080DF9BE
cmp r0, 0xB5
beq _080DF9BE
cmp r0, 0xB6
beq _080DF9BE
cmp r0, 0xBA
beq _080DF9BE
cmp r0, 0xAE
beq _080DF9BE
cmp r0, 0xB0
beq _080DF9BE
cmp r0, 0xB1
beq _080DF9BE
cmp r0, 0xB2
beq _080DF9BE
cmp r0, 0xB3
beq _080DF9BE
cmp r0, 0xB1
bne _080DF9C8
_080DF9BE:
adds r4, 0x1
ldrb r0, [r4]
cmp r0, 0xFF
bne _080DF96A
b _080DF9CA
_080DF9C8:
movs r5, 0x1
_080DF9CA:
adds r0, r5, 0
_080DF9CC:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80DF940
thumb_func_start sub_80DF9D4
sub_80DF9D4: @ 80DF9D4
ldrb r2, [r0, 0x5]
movs r1, 0xFF
strb r1, [r0, 0x5]
strb r2, [r0, 0x7]
bx lr
thumb_func_end sub_80DF9D4
thumb_func_start sub_80DF9E0
sub_80DF9E0: @ 80DF9E0
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
2017-01-14 20:53:20 +01:00
bl StripExtCtrlCodes
2016-11-01 18:08:48 +01:00
cmp r4, 0x1
bne _080DF9F8
movs r0, 0xFF
strb r0, [r5, 0x5]
movs r0, 0xFC
strb r0, [r5, 0xA]
b _080DFA00
_080DF9F8:
ldrb r1, [r5, 0x5]
movs r0, 0xFF
strb r0, [r5, 0x5]
strb r1, [r5, 0xA]
_080DFA00:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80DF9E0
thumb_func_start sub_80DFA08
sub_80DFA08: @ 80DFA08
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
adds r4, r5, 0x2
cmp r6, 0x1
bne _080DFA28
adds r0, r4, 0
bl sub_80DF940
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
2017-01-14 20:53:20 +01:00
bl ConvertInternationalString
2016-11-01 18:08:48 +01:00
b _080DFA3E
_080DFA28:
ldrb r0, [r4, 0xA]
cmp r0, 0xFC
bne _080DFA38
adds r0, r4, 0
movs r1, 0x1
2017-01-14 20:53:20 +01:00
bl ConvertInternationalString
2016-11-01 18:08:48 +01:00
b _080DFA3E
_080DFA38:
strb r0, [r4, 0x5]
movs r0, 0xFF
strb r0, [r4, 0xA]
_080DFA3E:
adds r4, r5, 0
adds r4, 0xD
cmp r6, 0x1
bne _080DFA68
movs r0, 0xFF
strb r0, [r4, 0x7]
ldrb r0, [r4, 0x4]
strb r0, [r4, 0x6]
ldrb r0, [r4, 0x3]
strb r0, [r4, 0x5]
ldrb r0, [r4, 0x2]
strb r0, [r4, 0x4]
ldrb r0, [r4, 0x1]
strb r0, [r4, 0x3]
ldrb r0, [r5, 0xD]
strb r0, [r4, 0x2]
movs r0, 0x15
strb r0, [r4, 0x1]
movs r0, 0xFC
strb r0, [r5, 0xD]
b _080DFA70
_080DFA68:
ldrb r0, [r4, 0x7]
strb r0, [r4, 0x5]
movs r0, 0xFF
strb r0, [r4, 0x7]
_080DFA70:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_80DFA08
.align 2, 0 @ Don't pad with nop.