WIP sub_8018DAC

This commit is contained in:
PikalaxALT
2019-03-31 11:16:19 -04:00
committed by huderlem
parent 608a217240
commit f88f815cff
6 changed files with 133 additions and 156 deletions

View File

@@ -5,160 +5,6 @@
.text
thumb_func_start sub_8018C4C
sub_8018C4C: @ 8018C4C
push {r4-r6,lr}
sub sp, 0x14
adds r6, r0, 0
adds r5, r1, 0
ldrb r0, [r6]
cmp r0, 0x1
beq _08018CE8
cmp r0, 0x1
bgt _08018C64
cmp r0, 0
beq _08018C6C
b _08018D8C
_08018C64:
cmp r0, 0xFF
bne _08018C6A
b _08018D68
_08018C6A:
b _08018D8C
_08018C6C:
cmp r2, 0
bne _08018C84
ldr r0, =gStringVar4
ldr r1, =gText_WhatToDoWithCards
bl StringExpandPlaceholders
b _08018C8C
.pool
_08018C84:
ldr r0, =gStringVar4
ldr r1, =gText_WhatToDoWithNews
bl StringExpandPlaceholders
_08018C8C:
ldr r0, =gUnknown_082F05D8
bl AddWindow
strh r0, [r5]
lsls r0, 24
lsrs r0, 24
movs r1, 0x11
bl FillWindowPixelBuffer
ldrb r0, [r5]
movs r2, 0
str r2, [sp]
str r2, [sp, 0x4]
ldr r1, =gUnknown_082F0728
str r1, [sp, 0x8]
str r2, [sp, 0xC]
ldr r1, =gStringVar4
str r1, [sp, 0x10]
movs r1, 0x1
movs r3, 0x1
bl AddTextPrinterParameterized4
ldrb r0, [r5]
movs r1, 0x1
movs r2, 0xF
bl sub_8098858
ldrb r0, [r5]
movs r1, 0x2
bl CopyWindowToVram
ldrb r0, [r5]
bl PutWindowTilemap
ldrb r0, [r6]
adds r0, 0x1
strb r0, [r6]
b _08018D8C
.pool
_08018CE8:
cmp r3, 0
beq _08018D10
cmp r2, 0
bne _08018D00
ldr r0, =gUnknown_082F05F8
ldr r1, =gUnknown_082F06C8
b _08018D28
.pool
_08018D00:
ldr r0, =gUnknown_082F0600
ldr r1, =gUnknown_082F06F8
b _08018D28
.pool
_08018D10:
cmp r2, 0
bne _08018D24
ldr r0, =gUnknown_082F05F0
ldr r1, =gUnknown_082F06B0
b _08018D28
.pool
_08018D24:
ldr r0, =gUnknown_082F05F8
ldr r1, =gUnknown_082F06E0
_08018D28:
movs r2, 0xE0
str r2, [sp]
movs r2, 0x1
movs r3, 0xA
bl DoMysteryGiftListMenu
adds r4, r0, 0
movs r0, 0x1
negs r0, r0
cmp r4, r0
beq _08018D8C
movs r0, 0
strb r0, [r6]
ldrb r0, [r5]
bl rbox_fill_rectangle
ldrb r0, [r5]
bl ClearWindowTilemap
ldrb r0, [r5]
movs r1, 0x1
bl CopyWindowToVram
ldrb r0, [r5]
bl RemoveWindow
adds r0, r4, 0
b _08018D90
.pool
_08018D68:
movs r0, 0
strb r0, [r6]
ldrb r0, [r5]
bl rbox_fill_rectangle
ldrb r0, [r5]
bl ClearWindowTilemap
ldrb r0, [r5]
movs r1, 0x1
bl CopyWindowToVram
ldrb r0, [r5]
bl RemoveWindow
movs r0, 0x2
negs r0, r0
b _08018D90
_08018D8C:
movs r0, 0x1
negs r0, r0
_08018D90:
add sp, 0x14
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8018C4C
thumb_func_start sub_8018D98
sub_8018D98: @ 8018D98
push {lr}
cmp r0, 0
beq _08018DA4
bl sub_801B0CC
b _08018DA8
_08018DA4:
bl sub_801B27C
_08018DA8:
pop {r1}
bx r1
thumb_func_end sub_8018D98
thumb_func_start sub_8018DAC
sub_8018DAC: @ 8018DAC
push {r4,r5,lr}