sub_81230C4

This commit is contained in:
PikalaxALT
2017-10-29 21:14:53 -04:00
parent a9afb8b130
commit f07307dc73
3 changed files with 68 additions and 118 deletions
-108
View File
@@ -5,114 +5,6 @@
.text
thumb_func_start sub_81230C4
sub_81230C4: @ 81230C4
push {r4,lr}
movs r4, 0
ldr r2, =gUnknown_0203A144
ldr r0, [r2]
adds r0, 0x7B
strb r4, [r0]
ldr r0, [r2]
adds r0, 0x7C
strb r4, [r0]
ldr r3, =gMain
ldrh r1, [r3, 0x2C]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _081230F6
ldr r1, [r2]
adds r0, r1, 0
adds r0, 0x56
ldrh r0, [r0]
cmp r0, 0x2
bls _081230F6
adds r1, 0x7C
movs r0, 0xFF
strb r0, [r1]
movs r4, 0x1
_081230F6:
ldrh r1, [r3, 0x2C]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08123114
ldr r1, [r2]
adds r0, r1, 0
adds r0, 0x56
ldrh r0, [r0]
cmp r0, 0xF
bhi _08123114
adds r1, 0x7C
movs r0, 0x1
strb r0, [r1]
movs r4, 0x1
_08123114:
ldrh r1, [r3, 0x2C]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _08123132
ldr r1, [r2]
adds r0, r1, 0
adds r0, 0x54
ldrh r0, [r0]
cmp r0, 0x1
bls _08123132
adds r1, 0x7B
movs r0, 0xFF
strb r0, [r1]
movs r4, 0x1
_08123132:
ldrh r1, [r3, 0x2C]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08123150
ldr r1, [r2]
adds r0, r1, 0
adds r0, 0x54
ldrh r0, [r0]
cmp r0, 0x1B
bhi _08123150
adds r1, 0x7B
movs r0, 0x1
strb r0, [r1]
movs r4, 0x1
_08123150:
ldrh r3, [r3, 0x2E]
movs r0, 0x1
ands r0, r3
cmp r0, 0
beq _08123168
movs r4, 0x4
b _08123172
.pool
_08123168:
movs r0, 0x2
ands r0, r3
cmp r0, 0
beq _08123172
movs r4, 0x5
_08123172:
cmp r4, 0x1
bne _08123184
ldr r0, [r2]
adds r0, 0x7A
movs r1, 0x4
strb r1, [r0]
ldr r1, [r2]
ldr r0, =_swiopen
str r0, [r1, 0x18]
_08123184:
adds r0, r4, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_81230C4
thumb_func_start _swiopen
_swiopen: @ 8123190
push {r4,r5,lr}