mirror of
https://github.com/jiangzhengwenjz/katam.git
synced 2024-11-26 22:50:39 +00:00
more intro
This commit is contained in:
parent
44e0bed920
commit
83f9f0bd69
936
asm/intro.s
936
asm/intro.s
@ -3,942 +3,6 @@
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_08149270
|
||||
sub_08149270: @ 0x08149270
|
||||
push {r4, r5, r6, lr}
|
||||
adds r5, r0, #0
|
||||
ldr r1, _08149308 @ =0x000013EC
|
||||
adds r0, r5, r1
|
||||
ldr r1, [r0]
|
||||
cmp r1, #0
|
||||
beq _08149296
|
||||
ldr r0, _0814930C @ =0x000005CC
|
||||
adds r2, r5, r0
|
||||
movs r3, #0
|
||||
_08149284:
|
||||
movs r0, #3
|
||||
ldrsb r0, [r1, r0]
|
||||
cmp r0, #0
|
||||
blt _08149290
|
||||
adds r0, r2, r0
|
||||
strb r3, [r0]
|
||||
_08149290:
|
||||
ldr r1, [r1, #0x18]
|
||||
cmp r1, #0
|
||||
bne _08149284
|
||||
_08149296:
|
||||
ldr r1, _08149308 @ =0x000013EC
|
||||
adds r0, r5, r1
|
||||
ldr r4, [r0]
|
||||
adds r6, r5, #0
|
||||
adds r6, #0x24
|
||||
cmp r4, #0
|
||||
beq _081492B8
|
||||
_081492A4:
|
||||
ldrh r0, [r4, #8]
|
||||
adds r0, #1
|
||||
strh r0, [r4, #8]
|
||||
ldr r1, [r4, #0x1c]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
ldr r4, [r4, #0x18]
|
||||
cmp r4, #0
|
||||
bne _081492A4
|
||||
_081492B8:
|
||||
adds r0, r5, #0
|
||||
bl sub_08146C60
|
||||
adds r0, r6, #0
|
||||
bl sub_0814F274
|
||||
cmp r0, #0
|
||||
beq _081492D0
|
||||
ldrh r1, [r5, #0x2a]
|
||||
ldr r0, _08149310 @ =0x0000FFBF
|
||||
ands r0, r1
|
||||
strh r0, [r5, #0x2a]
|
||||
_081492D0:
|
||||
ldrh r1, [r5, #0x2a]
|
||||
movs r0, #0x20
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08149300
|
||||
ldr r2, _08149314 @ =gDispCnt
|
||||
ldrh r1, [r2]
|
||||
ldr r0, _08149318 @ =0x0000FEFF
|
||||
ands r0, r1
|
||||
strh r0, [r2]
|
||||
ldr r1, _0814931C @ =gBldRegs
|
||||
movs r2, #0
|
||||
movs r0, #0xbf
|
||||
strh r0, [r1]
|
||||
strh r2, [r1, #2]
|
||||
movs r0, #0x10
|
||||
strh r0, [r1, #4]
|
||||
ldr r1, _08149320 @ =0x000013FC
|
||||
adds r0, r5, r1
|
||||
strh r2, [r0]
|
||||
ldr r0, _08149324 @ =0x000013F8
|
||||
adds r1, r5, r0
|
||||
ldr r0, _08149328 @ =sub_0814932C
|
||||
str r0, [r1]
|
||||
_08149300:
|
||||
movs r0, #0
|
||||
pop {r4, r5, r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08149308: .4byte 0x000013EC
|
||||
_0814930C: .4byte 0x000005CC
|
||||
_08149310: .4byte 0x0000FFBF
|
||||
_08149314: .4byte gDispCnt
|
||||
_08149318: .4byte 0x0000FEFF
|
||||
_0814931C: .4byte gBldRegs
|
||||
_08149320: .4byte 0x000013FC
|
||||
_08149324: .4byte 0x000013F8
|
||||
_08149328: .4byte sub_0814932C
|
||||
|
||||
thumb_func_start sub_0814932C
|
||||
sub_0814932C: @ 0x0814932C
|
||||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
ldr r1, _08149398 @ =0x000013EC
|
||||
adds r0, r5, r1
|
||||
ldr r1, [r0]
|
||||
cmp r1, #0
|
||||
beq _08149352
|
||||
ldr r0, _0814939C @ =0x000005CC
|
||||
adds r2, r5, r0
|
||||
movs r3, #0
|
||||
_08149340:
|
||||
movs r0, #3
|
||||
ldrsb r0, [r1, r0]
|
||||
cmp r0, #0
|
||||
blt _0814934C
|
||||
adds r0, r2, r0
|
||||
strb r3, [r0]
|
||||
_0814934C:
|
||||
ldr r1, [r1, #0x18]
|
||||
cmp r1, #0
|
||||
bne _08149340
|
||||
_08149352:
|
||||
ldr r1, _08149398 @ =0x000013EC
|
||||
adds r0, r5, r1
|
||||
ldr r4, [r0]
|
||||
cmp r4, #0
|
||||
beq _08149370
|
||||
_0814935C:
|
||||
ldrh r0, [r4, #8]
|
||||
adds r0, #1
|
||||
strh r0, [r4, #8]
|
||||
ldr r1, [r4, #0x1c]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
ldr r4, [r4, #0x18]
|
||||
cmp r4, #0
|
||||
bne _0814935C
|
||||
_08149370:
|
||||
adds r0, r5, #0
|
||||
bl sub_08146C60
|
||||
ldr r0, _081493A0 @ =0x000013FC
|
||||
adds r1, r5, r0
|
||||
ldrh r0, [r1]
|
||||
adds r0, #1
|
||||
strh r0, [r1]
|
||||
lsls r0, r0, #0x10
|
||||
asrs r0, r0, #0x10
|
||||
cmp r0, #9
|
||||
ble _08149390
|
||||
ldr r0, _081493A4 @ =0x000013F8
|
||||
adds r1, r5, r0
|
||||
ldr r0, _081493A8 @ =sub_08149C68
|
||||
str r0, [r1]
|
||||
_08149390:
|
||||
movs r0, #0
|
||||
pop {r4, r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08149398: .4byte 0x000013EC
|
||||
_0814939C: .4byte 0x000005CC
|
||||
_081493A0: .4byte 0x000013FC
|
||||
_081493A4: .4byte 0x000013F8
|
||||
_081493A8: .4byte sub_08149C68
|
||||
|
||||
thumb_func_start sub_081493AC
|
||||
sub_081493AC: @ 0x081493AC
|
||||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
ldr r0, [r5, #8]
|
||||
movs r1, #9
|
||||
rsbs r1, r1, #0
|
||||
ands r0, r1
|
||||
movs r1, #0x10
|
||||
orrs r0, r1
|
||||
str r0, [r5, #8]
|
||||
ldr r1, _08149430 @ =0x000013EC
|
||||
adds r0, r5, r1
|
||||
ldr r1, [r0]
|
||||
cmp r1, #0
|
||||
beq _081493E0
|
||||
ldr r0, _08149434 @ =0x000005CC
|
||||
adds r2, r5, r0
|
||||
movs r3, #0
|
||||
_081493CE:
|
||||
movs r0, #3
|
||||
ldrsb r0, [r1, r0]
|
||||
cmp r0, #0
|
||||
blt _081493DA
|
||||
adds r0, r2, r0
|
||||
strb r3, [r0]
|
||||
_081493DA:
|
||||
ldr r1, [r1, #0x18]
|
||||
cmp r1, #0
|
||||
bne _081493CE
|
||||
_081493E0:
|
||||
ldr r1, _08149430 @ =0x000013EC
|
||||
adds r0, r5, r1
|
||||
ldr r4, [r0]
|
||||
cmp r4, #0
|
||||
beq _081493FE
|
||||
_081493EA:
|
||||
ldrh r0, [r4, #8]
|
||||
adds r0, #1
|
||||
strh r0, [r4, #8]
|
||||
ldr r1, [r4, #0x1c]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
ldr r4, [r4, #0x18]
|
||||
cmp r4, #0
|
||||
bne _081493EA
|
||||
_081493FE:
|
||||
adds r0, r5, #0
|
||||
bl sub_08146C60
|
||||
ldr r2, _08149438 @ =gDispCnt
|
||||
ldrh r1, [r2]
|
||||
ldr r0, _0814943C @ =0x0000FEFF
|
||||
ands r0, r1
|
||||
strh r0, [r2]
|
||||
ldr r1, _08149440 @ =gBldRegs
|
||||
movs r2, #0
|
||||
movs r0, #0xbf
|
||||
strh r0, [r1]
|
||||
strh r2, [r1, #2]
|
||||
strh r2, [r1, #4]
|
||||
ldr r1, _08149444 @ =0x000013FC
|
||||
adds r0, r5, r1
|
||||
strh r2, [r0]
|
||||
ldr r0, _08149448 @ =0x000013F8
|
||||
adds r1, r5, r0
|
||||
ldr r0, _0814944C @ =sub_08149450
|
||||
str r0, [r1]
|
||||
movs r0, #0
|
||||
pop {r4, r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08149430: .4byte 0x000013EC
|
||||
_08149434: .4byte 0x000005CC
|
||||
_08149438: .4byte gDispCnt
|
||||
_0814943C: .4byte 0x0000FEFF
|
||||
_08149440: .4byte gBldRegs
|
||||
_08149444: .4byte 0x000013FC
|
||||
_08149448: .4byte 0x000013F8
|
||||
_0814944C: .4byte sub_08149450
|
||||
|
||||
thumb_func_start sub_08149450
|
||||
sub_08149450: @ 0x08149450
|
||||
push {r4, r5, r6, lr}
|
||||
adds r6, r0, #0
|
||||
ldr r1, _081494CC @ =0x000013EC
|
||||
adds r0, r6, r1
|
||||
ldr r1, [r0]
|
||||
cmp r1, #0
|
||||
beq _08149476
|
||||
ldr r0, _081494D0 @ =0x000005CC
|
||||
adds r2, r6, r0
|
||||
movs r3, #0
|
||||
_08149464:
|
||||
movs r0, #3
|
||||
ldrsb r0, [r1, r0]
|
||||
cmp r0, #0
|
||||
blt _08149470
|
||||
adds r0, r2, r0
|
||||
strb r3, [r0]
|
||||
_08149470:
|
||||
ldr r1, [r1, #0x18]
|
||||
cmp r1, #0
|
||||
bne _08149464
|
||||
_08149476:
|
||||
ldr r1, _081494CC @ =0x000013EC
|
||||
adds r0, r6, r1
|
||||
ldr r4, [r0]
|
||||
cmp r4, #0
|
||||
beq _08149494
|
||||
_08149480:
|
||||
ldrh r0, [r4, #8]
|
||||
adds r0, #1
|
||||
strh r0, [r4, #8]
|
||||
ldr r1, [r4, #0x1c]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
ldr r4, [r4, #0x18]
|
||||
cmp r4, #0
|
||||
bne _08149480
|
||||
_08149494:
|
||||
adds r0, r6, #0
|
||||
bl sub_08146C60
|
||||
ldr r1, _081494D4 @ =0x000013FC
|
||||
adds r0, r6, r1
|
||||
ldrh r4, [r0]
|
||||
adds r4, #1
|
||||
strh r4, [r0]
|
||||
ldr r5, _081494D8 @ =gBldRegs
|
||||
movs r1, #0
|
||||
ldrsh r0, [r0, r1]
|
||||
lsls r0, r0, #4
|
||||
movs r1, #0x1e
|
||||
bl __divsi3
|
||||
strh r0, [r5, #4]
|
||||
lsls r4, r4, #0x10
|
||||
asrs r4, r4, #0x10
|
||||
cmp r4, #0x1d
|
||||
ble _081494C4
|
||||
ldr r0, _081494DC @ =0x000013F8
|
||||
adds r1, r6, r0
|
||||
ldr r0, _081494E0 @ =sub_08149C68
|
||||
str r0, [r1]
|
||||
_081494C4:
|
||||
movs r0, #0
|
||||
pop {r4, r5, r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_081494CC: .4byte 0x000013EC
|
||||
_081494D0: .4byte 0x000005CC
|
||||
_081494D4: .4byte 0x000013FC
|
||||
_081494D8: .4byte gBldRegs
|
||||
_081494DC: .4byte 0x000013F8
|
||||
_081494E0: .4byte sub_08149C68
|
||||
|
||||
thumb_func_start sub_081494E4
|
||||
sub_081494E4: @ 0x081494E4
|
||||
ldr r2, _081494FC @ =gBldRegs
|
||||
movs r3, #0
|
||||
movs r1, #0xbf
|
||||
strh r1, [r2]
|
||||
strh r3, [r2, #2]
|
||||
strh r3, [r2, #4]
|
||||
movs r1, #0xa0
|
||||
lsls r1, r1, #5
|
||||
adds r0, r0, r1
|
||||
ldr r1, _08149500 @ =sub_08149504
|
||||
str r1, [r0]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_081494FC: .4byte gBldRegs
|
||||
_08149500: .4byte sub_08149504
|
||||
|
||||
thumb_func_start sub_08149504
|
||||
sub_08149504: @ 0x08149504
|
||||
push {r4, r5, r6, lr}
|
||||
adds r6, r0, #0
|
||||
ldr r1, _08149558 @ =gBldRegs
|
||||
ldrh r0, [r1, #4]
|
||||
adds r0, #1
|
||||
strh r0, [r1, #4]
|
||||
lsls r0, r0, #0x10
|
||||
lsrs r0, r0, #0x10
|
||||
cmp r0, #0xf
|
||||
bls _08149550
|
||||
movs r5, #0
|
||||
_0814951A:
|
||||
lsls r0, r5, #2
|
||||
adds r0, r0, r5
|
||||
lsls r0, r0, #3
|
||||
adds r0, #0x48
|
||||
adds r4, r6, r0
|
||||
ldr r0, [r4]
|
||||
cmp r0, #0
|
||||
beq _08149532
|
||||
bl VramFree
|
||||
movs r0, #0
|
||||
str r0, [r4]
|
||||
_08149532:
|
||||
adds r0, r5, #1
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r5, r0, #0x18
|
||||
cmp r5, #0x1f
|
||||
bls _0814951A
|
||||
ldr r2, _0814955C @ =gDispCnt
|
||||
ldrh r1, [r2]
|
||||
ldr r0, _08149560 @ =0x0000FEFF
|
||||
ands r0, r1
|
||||
strh r0, [r2]
|
||||
movs r0, #0xa0
|
||||
lsls r0, r0, #5
|
||||
adds r1, r6, r0
|
||||
ldr r0, _08149564 @ =sub_08149568
|
||||
str r0, [r1]
|
||||
_08149550:
|
||||
pop {r4, r5, r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149558: .4byte gBldRegs
|
||||
_0814955C: .4byte gDispCnt
|
||||
_08149560: .4byte 0x0000FEFF
|
||||
_08149564: .4byte sub_08149568
|
||||
|
||||
thumb_func_start sub_08149568
|
||||
sub_08149568: @ 0x08149568
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r0, _081495A0 @ =gBgScrollRegs
|
||||
movs r5, #0
|
||||
movs r2, #0x80
|
||||
lsls r2, r2, #1
|
||||
strh r2, [r0]
|
||||
ldr r1, _081495A4 @ =gUnk_083871D8
|
||||
ldr r0, _081495A8 @ =gLanguage
|
||||
ldrh r0, [r0]
|
||||
lsls r0, r0, #3
|
||||
adds r1, #6
|
||||
adds r0, r0, r1
|
||||
ldrh r1, [r0]
|
||||
movs r0, #0
|
||||
bl sub_081495B4
|
||||
movs r1, #0xa0
|
||||
lsls r1, r1, #5
|
||||
adds r0, r4, r1
|
||||
str r5, [r0]
|
||||
ldr r0, _081495AC @ =0x000013F8
|
||||
adds r4, r4, r0
|
||||
ldr r0, _081495B0 @ =sub_08149C68
|
||||
str r0, [r4]
|
||||
pop {r4, r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_081495A0: .4byte gBgScrollRegs
|
||||
_081495A4: .4byte gUnk_083871D8
|
||||
_081495A8: .4byte gLanguage
|
||||
_081495AC: .4byte 0x000013F8
|
||||
_081495B0: .4byte sub_08149C68
|
||||
|
||||
thumb_func_start sub_081495B4
|
||||
sub_081495B4: @ 0x081495B4
|
||||
push {r4, r5, r6, r7, lr}
|
||||
lsls r0, r0, #0x18
|
||||
lsls r1, r1, #0x10
|
||||
lsls r2, r2, #0x10
|
||||
ldr r3, _08149620 @ =gUnk_082D7850
|
||||
lsrs r1, r1, #0xe
|
||||
adds r1, r1, r3
|
||||
ldr r1, [r1]
|
||||
ldr r4, [r1, #8]
|
||||
ldr r7, [r1, #0x18]
|
||||
ldrh r5, [r1, #2]
|
||||
ldr r1, _08149624 @ =gBgCntRegs
|
||||
lsrs r0, r0, #0x17
|
||||
adds r0, r0, r1
|
||||
ldrh r0, [r0]
|
||||
lsls r0, r0, #0x10
|
||||
lsrs r1, r0, #0x12
|
||||
movs r3, #3
|
||||
ands r1, r3
|
||||
lsrs r0, r0, #0x18
|
||||
movs r3, #0x1f
|
||||
ands r0, r3
|
||||
lsls r0, r0, #0xb
|
||||
lsrs r2, r2, #0x13
|
||||
lsls r2, r2, #6
|
||||
movs r3, #0xc0
|
||||
lsls r3, r3, #0x13
|
||||
adds r2, r2, r3
|
||||
adds r6, r0, r2
|
||||
lsls r1, r1, #0xe
|
||||
adds r1, r1, r3
|
||||
adds r0, r4, #0
|
||||
bl LZ77UnCompVram
|
||||
movs r4, #0
|
||||
cmp r4, r5
|
||||
bhs _0814961A
|
||||
_081495FE:
|
||||
lsls r0, r4, #4
|
||||
subs r0, r0, r4
|
||||
lsls r0, r0, #2
|
||||
adds r0, r7, r0
|
||||
lsls r1, r4, #6
|
||||
adds r1, r6, r1
|
||||
movs r2, #0x1e
|
||||
bl CpuSet
|
||||
adds r0, r4, #1
|
||||
lsls r0, r0, #0x10
|
||||
lsrs r4, r0, #0x10
|
||||
cmp r4, r5
|
||||
blo _081495FE
|
||||
_0814961A:
|
||||
pop {r4, r5, r6, r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149620: .4byte gUnk_082D7850
|
||||
_08149624: .4byte gBgCntRegs
|
||||
|
||||
thumb_func_start sub_08149628
|
||||
sub_08149628: @ 0x08149628
|
||||
push {lr}
|
||||
ldr r2, _08149638 @ =0x00001410
|
||||
adds r1, r0, r2
|
||||
ldr r1, [r1]
|
||||
bl _call_via_r1
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149638: .4byte 0x00001410
|
||||
|
||||
thumb_func_start sub_0814963C
|
||||
sub_0814963C: @ 0x0814963C
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r1, _08149668 @ =gUnk_083877EE
|
||||
ldr r0, [r4]
|
||||
ldrh r1, [r1, #0x12]
|
||||
cmp r0, r1
|
||||
blo _08149660
|
||||
ldr r0, _0814966C @ =0x00001419
|
||||
adds r1, r4, r0
|
||||
movs r0, #0
|
||||
strb r0, [r1]
|
||||
ldr r0, _08149670 @ =0x00000266
|
||||
bl m4aSongNumStart
|
||||
ldr r0, _08149674 @ =0x00001410
|
||||
adds r1, r4, r0
|
||||
ldr r0, _08149678 @ =sub_08145E84
|
||||
str r0, [r1]
|
||||
_08149660:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149668: .4byte gUnk_083877EE
|
||||
_0814966C: .4byte 0x00001419
|
||||
_08149670: .4byte 0x00000266
|
||||
_08149674: .4byte 0x00001410
|
||||
_08149678: .4byte sub_08145E84
|
||||
|
||||
thumb_func_start nullsub_133
|
||||
nullsub_133: @ 0x0814967C
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08149680
|
||||
sub_08149680: @ 0x08149680
|
||||
push {r4, r5, r6, r7, lr}
|
||||
movs r4, #0
|
||||
ldr r5, _081496BC @ =gBgScrollRegs
|
||||
ldr r1, _081496C0 @ =0x00001414
|
||||
adds r7, r0, r1
|
||||
adds r1, r5, #2
|
||||
mov ip, r1
|
||||
ldr r1, _081496C4 @ =0x00001415
|
||||
adds r6, r0, r1
|
||||
_08149692:
|
||||
lsls r2, r4, #2
|
||||
adds r3, r2, r5
|
||||
movs r1, #0
|
||||
ldrsb r1, [r7, r1]
|
||||
ldrh r0, [r3]
|
||||
subs r0, r0, r1
|
||||
strh r0, [r3]
|
||||
add r2, ip
|
||||
movs r1, #0
|
||||
ldrsb r1, [r6, r1]
|
||||
ldrh r0, [r2]
|
||||
subs r0, r0, r1
|
||||
strh r0, [r2]
|
||||
adds r0, r4, #1
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r4, r0, #0x18
|
||||
cmp r4, #3
|
||||
bls _08149692
|
||||
pop {r4, r5, r6, r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_081496BC: .4byte gBgScrollRegs
|
||||
_081496C0: .4byte 0x00001414
|
||||
_081496C4: .4byte 0x00001415
|
||||
|
||||
thumb_func_start sub_081496C8
|
||||
sub_081496C8: @ 0x081496C8
|
||||
push {r4, r5, r6, r7, lr}
|
||||
movs r3, #0
|
||||
ldr r4, _08149704 @ =gBgScrollRegs
|
||||
ldr r1, _08149708 @ =0x00001414
|
||||
adds r6, r0, r1
|
||||
adds r2, r4, #2
|
||||
mov ip, r2
|
||||
ldr r7, _0814970C @ =0x00001415
|
||||
adds r5, r0, r7
|
||||
_081496DA:
|
||||
lsls r1, r3, #2
|
||||
adds r2, r1, r4
|
||||
movs r0, #0
|
||||
ldrsb r0, [r6, r0]
|
||||
ldrh r7, [r2]
|
||||
adds r0, r0, r7
|
||||
strh r0, [r2]
|
||||
add r1, ip
|
||||
movs r0, #0
|
||||
ldrsb r0, [r5, r0]
|
||||
ldrh r2, [r1]
|
||||
adds r0, r0, r2
|
||||
strh r0, [r1]
|
||||
adds r0, r3, #1
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r3, r0, #0x18
|
||||
cmp r3, #3
|
||||
bls _081496DA
|
||||
pop {r4, r5, r6, r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149704: .4byte gBgScrollRegs
|
||||
_08149708: .4byte 0x00001414
|
||||
_0814970C: .4byte 0x00001415
|
||||
|
||||
thumb_func_start sub_08149710
|
||||
sub_08149710: @ 0x08149710
|
||||
push {r4, r5, r6, lr}
|
||||
adds r3, r0, #0
|
||||
lsls r1, r1, #0x18
|
||||
lsrs r2, r1, #0x18
|
||||
ldr r6, _08149750 @ =gUnk_083877EE
|
||||
lsls r4, r2, #1
|
||||
adds r5, r4, r2
|
||||
adds r0, r5, #3
|
||||
lsls r0, r0, #1
|
||||
adds r0, r0, r6
|
||||
ldr r1, [r3]
|
||||
ldrh r0, [r0]
|
||||
cmp r1, r0
|
||||
blo _0814974A
|
||||
adds r1, r3, #0
|
||||
adds r1, #0x36
|
||||
adds r1, r1, r4
|
||||
adds r0, r5, #4
|
||||
lsls r0, r0, #1
|
||||
adds r0, r0, r6
|
||||
ldrh r0, [r0]
|
||||
lsrs r0, r0, #2
|
||||
strh r0, [r1]
|
||||
lsls r1, r2, #2
|
||||
adds r0, r3, #0
|
||||
adds r0, #0x3c
|
||||
adds r0, r0, r1
|
||||
ldr r1, _08149754 @ =sub_08146308
|
||||
str r1, [r0]
|
||||
_0814974A:
|
||||
pop {r4, r5, r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149750: .4byte gUnk_083877EE
|
||||
_08149754: .4byte sub_08146308
|
||||
|
||||
thumb_func_start sub_08149758
|
||||
sub_08149758: @ 0x08149758
|
||||
push {lr}
|
||||
adds r3, r0, #0
|
||||
ldr r1, _08149794 @ =0x0000140C
|
||||
adds r0, r3, r1
|
||||
ldrh r1, [r0]
|
||||
ldr r0, [r3]
|
||||
adds r0, r0, r1
|
||||
ldr r1, _08149798 @ =gUnk_083877EE
|
||||
ldrh r1, [r1, #0x20]
|
||||
cmp r0, r1
|
||||
blo _08149790
|
||||
ldr r1, _0814979C @ =gBldRegs
|
||||
movs r2, #0
|
||||
movs r0, #0x82
|
||||
strh r0, [r1]
|
||||
strh r2, [r1, #2]
|
||||
strh r2, [r1, #4]
|
||||
ldr r0, [r3, #8]
|
||||
movs r1, #0x20
|
||||
orrs r0, r1
|
||||
str r0, [r3, #8]
|
||||
ldr r1, _081497A0 @ =0x0000140E
|
||||
adds r0, r3, r1
|
||||
strh r2, [r0]
|
||||
ldr r0, _081497A4 @ =0x00001408
|
||||
adds r1, r3, r0
|
||||
ldr r0, _081497A8 @ =sub_0814654C
|
||||
str r0, [r1]
|
||||
_08149790:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149794: .4byte 0x0000140C
|
||||
_08149798: .4byte gUnk_083877EE
|
||||
_0814979C: .4byte gBldRegs
|
||||
_081497A0: .4byte 0x0000140E
|
||||
_081497A4: .4byte 0x00001408
|
||||
_081497A8: .4byte sub_0814654C
|
||||
|
||||
thumb_func_start nullsub_134
|
||||
nullsub_134: @ 0x081497AC
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_081497B0
|
||||
sub_081497B0: @ 0x081497B0
|
||||
movs r0, #0
|
||||
bx lr
|
||||
|
||||
thumb_func_start sub_081497B4
|
||||
sub_081497B4: @ 0x081497B4
|
||||
push {r4, r5, r6, lr}
|
||||
adds r5, r0, #0
|
||||
adds r6, r1, #0
|
||||
ldr r1, [r5, #0x20]
|
||||
ldr r2, _081497F4 @ =0x000013EC
|
||||
adds r0, r1, r2
|
||||
ldr r3, [r0]
|
||||
cmp r3, #0
|
||||
beq _081497FE
|
||||
adds r4, r1, #0
|
||||
adds r4, #0x48
|
||||
_081497CA:
|
||||
cmp r3, r5
|
||||
beq _081497F8
|
||||
movs r0, #3
|
||||
ldrsb r0, [r3, r0]
|
||||
lsls r1, r0, #2
|
||||
adds r1, r1, r0
|
||||
lsls r1, r1, #3
|
||||
adds r1, r4, r1
|
||||
movs r2, #3
|
||||
ldrsb r2, [r5, r2]
|
||||
lsls r0, r2, #2
|
||||
adds r0, r0, r2
|
||||
lsls r0, r0, #3
|
||||
adds r0, r4, r0
|
||||
ldr r1, [r1]
|
||||
ldr r0, [r0]
|
||||
cmp r1, r0
|
||||
bne _081497F8
|
||||
movs r0, #0
|
||||
b _0814980E
|
||||
.align 2, 0
|
||||
_081497F4: .4byte 0x000013EC
|
||||
_081497F8:
|
||||
ldr r3, [r3, #0x18]
|
||||
cmp r3, #0
|
||||
bne _081497CA
|
||||
_081497FE:
|
||||
ldr r0, [r6]
|
||||
cmp r0, #0
|
||||
beq _0814980C
|
||||
bl VramFree
|
||||
movs r0, #0
|
||||
str r0, [r6]
|
||||
_0814980C:
|
||||
movs r0, #1
|
||||
_0814980E:
|
||||
pop {r4, r5, r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
|
||||
thumb_func_start sub_08149814
|
||||
sub_08149814: @ 0x08149814
|
||||
push {r4, r5, lr}
|
||||
ldr r4, [r0, #0x20]
|
||||
movs r3, #0
|
||||
movs r5, #3
|
||||
ldrsb r5, [r0, r5]
|
||||
_0814981E:
|
||||
cmp r3, r5
|
||||
beq _0814983E
|
||||
lsls r0, r3, #2
|
||||
adds r0, r0, r3
|
||||
lsls r0, r0, #3
|
||||
adds r0, #0x48
|
||||
adds r2, r4, r0
|
||||
ldr r0, [r2]
|
||||
cmp r0, #0
|
||||
beq _0814983E
|
||||
ldrb r0, [r2, #0x1f]
|
||||
ldrb r2, [r1, #0x1f]
|
||||
cmp r0, r2
|
||||
bne _0814983E
|
||||
movs r0, #0
|
||||
b _0814985C
|
||||
_0814983E:
|
||||
adds r0, r3, #1
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r3, r0, #0x18
|
||||
cmp r3, #0x1f
|
||||
bls _0814981E
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x12
|
||||
ldrb r1, [r1, #0x1f]
|
||||
adds r0, r0, r1
|
||||
movs r1, #0xff
|
||||
strb r1, [r0]
|
||||
ldrb r0, [r4, #0x11]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0x11]
|
||||
movs r0, #1
|
||||
_0814985C:
|
||||
pop {r4, r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08149864
|
||||
sub_08149864: @ 0x08149864
|
||||
adds r0, #0x24
|
||||
ldrb r2, [r1, #0xf]
|
||||
lsrs r2, r2, #1
|
||||
strb r2, [r0, #1]
|
||||
ldrh r1, [r1, #0x10]
|
||||
strh r1, [r0, #2]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08149874
|
||||
sub_08149874: @ 0x08149874
|
||||
ldr r1, _0814987C @ =sub_08146E3C
|
||||
str r1, [r0, #0x1c]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0814987C: .4byte sub_08146E3C
|
||||
|
||||
thumb_func_start sub_08149880
|
||||
sub_08149880: @ 0x08149880
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
movs r0, #3
|
||||
ldrsb r0, [r4, r0]
|
||||
lsls r1, r0, #2
|
||||
adds r1, r1, r0
|
||||
lsls r1, r1, #3
|
||||
adds r1, #0x48
|
||||
ldr r0, [r4, #0x20]
|
||||
adds r0, r0, r1
|
||||
ldrh r1, [r4, #0xe]
|
||||
ldrh r2, [r4, #0xa]
|
||||
adds r1, r1, r2
|
||||
strh r1, [r4, #0xa]
|
||||
bl sub_08155128
|
||||
cmp r0, #0
|
||||
bne _081498AA
|
||||
strh r0, [r4, #0xe]
|
||||
ldr r0, _081498B0 @ =sub_08146EE8
|
||||
str r0, [r4, #0x1c]
|
||||
_081498AA:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_081498B0: .4byte sub_08146EE8
|
||||
|
||||
thumb_func_start sub_081498B4
|
||||
sub_081498B4: @ 0x081498B4
|
||||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
adds r3, r5, #0
|
||||
adds r3, #0x24
|
||||
ldr r2, [r5, #0x20]
|
||||
ldr r1, _08149904 @ =gUnk_083877E0
|
||||
ldrb r4, [r3, #1]
|
||||
lsls r0, r4, #1
|
||||
adds r0, r0, r1
|
||||
ldr r1, [r2]
|
||||
ldrh r0, [r0]
|
||||
cmp r1, r0
|
||||
blo _081498FC
|
||||
adds r0, r4, #1
|
||||
movs r1, #0
|
||||
strb r0, [r3, #1]
|
||||
strb r1, [r3, #8]
|
||||
movs r0, #0x15
|
||||
strb r0, [r3, #0xa]
|
||||
movs r0, #3
|
||||
ldrsb r0, [r5, r0]
|
||||
lsls r1, r0, #2
|
||||
adds r1, r1, r0
|
||||
lsls r1, r1, #3
|
||||
adds r1, #0x48
|
||||
ldr r0, [r5, #0x20]
|
||||
adds r0, r0, r1
|
||||
ldr r2, _08149908 @ =gUnk_08387208
|
||||
ldrh r1, [r2, #0x14]
|
||||
strh r1, [r0, #0xc]
|
||||
ldrh r1, [r2, #0x16]
|
||||
strb r1, [r0, #0x1a]
|
||||
bl sub_08155128
|
||||
ldr r0, _0814990C @ =sub_08147078
|
||||
str r0, [r5, #0x1c]
|
||||
_081498FC:
|
||||
pop {r4, r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149904: .4byte gUnk_083877E0
|
||||
_08149908: .4byte gUnk_08387208
|
||||
_0814990C: .4byte sub_08147078
|
||||
|
||||
thumb_func_start sub_08149910
|
||||
sub_08149910: @ 0x08149910
|
||||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
adds r2, r5, #0
|
||||
adds r2, #0x24
|
||||
movs r1, #3
|
||||
ldrsb r1, [r5, r1]
|
||||
lsls r0, r1, #2
|
||||
adds r0, r0, r1
|
||||
lsls r0, r0, #3
|
||||
adds r0, #0x48
|
||||
ldr r1, [r5, #0x20]
|
||||
adds r4, r1, r0
|
||||
ldrb r0, [r2, #0xa]
|
||||
adds r0, #1
|
||||
strb r0, [r2, #0xa]
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r0, r0, #0x18
|
||||
cmp r0, #0x19
|
||||
bne _0814993C
|
||||
ldr r0, _08149960 @ =0x00000259
|
||||
bl m4aSongNumStart
|
||||
_0814993C:
|
||||
adds r0, r4, #0
|
||||
bl sub_08155128
|
||||
cmp r0, #0
|
||||
bne _0814995A
|
||||
ldr r1, _08149964 @ =gUnk_08387208
|
||||
ldrh r0, [r1]
|
||||
strh r0, [r4, #0xc]
|
||||
ldrh r0, [r1, #2]
|
||||
strb r0, [r4, #0x1a]
|
||||
adds r0, r4, #0
|
||||
bl sub_08155128
|
||||
ldr r0, _08149968 @ =sub_081470EC
|
||||
str r0, [r5, #0x1c]
|
||||
_0814995A:
|
||||
pop {r4, r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08149960: .4byte 0x00000259
|
||||
_08149964: .4byte gUnk_08387208
|
||||
_08149968: .4byte sub_081470EC
|
||||
|
||||
thumb_func_start sub_0814996C
|
||||
sub_0814996C: @ 0x0814996C
|
||||
adds r2, r0, #0
|
||||
|
@ -17,7 +17,8 @@ struct Unk_08387814 {
|
||||
u16 unkA;
|
||||
s16 unkC;
|
||||
u8 unkE;
|
||||
u8 fillerF[3];
|
||||
u8 unkF;
|
||||
u16 unk10;
|
||||
u16 unk12;
|
||||
u16 filler14;
|
||||
s16 unk16;
|
||||
@ -116,7 +117,7 @@ struct Unk_08145B64 {
|
||||
u8 unk13F5;
|
||||
s8 unk13F6;
|
||||
bool32 (*unk13F8)(struct Unk_08145B64 *);
|
||||
u32 filler13FC;
|
||||
s16 unk13FC;
|
||||
void (*unk1400)(struct Unk_08145B64 *);
|
||||
u32 filler1404;
|
||||
void (*unk1408)(struct Unk_08145B64 *);
|
||||
|
308
src/intro.c
308
src/intro.c
@ -51,7 +51,12 @@ bool32 sub_08148FF8(struct Unk_08145B64 *);
|
||||
bool32 sub_0814908C(struct Unk_08145B64 *);
|
||||
bool32 sub_08149154(struct Unk_08145B64 *);
|
||||
bool32 sub_08149270(struct Unk_08145B64 *);
|
||||
bool32 sub_0814932C(struct Unk_08145B64 *);
|
||||
bool32 sub_08149450(struct Unk_08145B64 *);
|
||||
void sub_081494E4(struct Unk_08145B64 *);
|
||||
void sub_08149504(struct Unk_08145B64 *);
|
||||
void sub_08149568(struct Unk_08145B64 *);
|
||||
void sub_081495B4(u8, u16, u16);
|
||||
void sub_08149628(struct Unk_08145B64 *);
|
||||
void sub_0814963C(struct Unk_08145B64 *);
|
||||
void nullsub_133(struct Unk_08145B64 *);
|
||||
@ -68,6 +73,7 @@ void sub_081498B4(struct Unk_08145B64_5EC *);
|
||||
void sub_08149910(struct Unk_08145B64_5EC *);
|
||||
void sub_08149B30(struct Unk_08145B64_5EC *);
|
||||
void sub_08149B90(struct Unk_08145B64_5EC *);
|
||||
bool32 sub_08149C68(struct Unk_08145B64 *);
|
||||
void sub_08149C80(struct Unk_08145B64 *);
|
||||
|
||||
extern const u16 gUnk_083871D8[][4];
|
||||
@ -2186,11 +2192,311 @@ bool32 sub_08149154(struct Unk_08145B64 *a1) {
|
||||
{
|
||||
register u32 _13F8 asm("r3") = 0x13F8;
|
||||
register bool32 (**unk13F8)(struct Unk_08145B64 *) asm("r1");
|
||||
|
||||
asm("":::"r0");
|
||||
unk13F8 = (void *)a1 + _13F8;
|
||||
|
||||
*unk13F8 = sub_08149270;
|
||||
}
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_08149270(struct Unk_08145B64 *a1) {
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
if (current->unk3 >= 0)
|
||||
a1->unk5CC[current->unk3] = 0;
|
||||
}
|
||||
}
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
++current->unk8;
|
||||
current->unk1C(current);
|
||||
}
|
||||
}
|
||||
sub_08146C60(a1);
|
||||
if (sub_0814F274(&a1->unk24))
|
||||
a1->unk24.unk6 &= ~0x40;
|
||||
if (a1->unk24.unk6 & 0x20) {
|
||||
gDispCnt &= ~DISPCNT_BG0_ON;
|
||||
gBldRegs.bldCnt = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN;
|
||||
gBldRegs.bldAlpha = 0;
|
||||
gBldRegs.bldY = 0x10;
|
||||
a1->unk13FC = 0;
|
||||
a1->unk13F8 = sub_0814932C;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_0814932C(struct Unk_08145B64 *a1) {
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
if (current->unk3 >= 0)
|
||||
a1->unk5CC[current->unk3] = 0;
|
||||
}
|
||||
}
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
++current->unk8;
|
||||
current->unk1C(current);
|
||||
}
|
||||
}
|
||||
sub_08146C60(a1);
|
||||
if (++a1->unk13FC > 9)
|
||||
a1->unk13F8 = sub_08149C68;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_081493AC(struct Unk_08145B64 *a1) {
|
||||
a1->unk8 &= ~8;
|
||||
a1->unk8 |= 0x10;
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
if (current->unk3 >= 0)
|
||||
a1->unk5CC[current->unk3] = 0;
|
||||
}
|
||||
}
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
++current->unk8;
|
||||
current->unk1C(current);
|
||||
}
|
||||
}
|
||||
sub_08146C60(a1);
|
||||
gDispCnt &= ~DISPCNT_BG0_ON;
|
||||
gBldRegs.bldCnt = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN;
|
||||
gBldRegs.bldAlpha = 0;
|
||||
gBldRegs.bldY = 0;
|
||||
a1->unk13FC = 0;
|
||||
a1->unk13F8 = sub_08149450;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_08149450(struct Unk_08145B64 *a1) {
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
if (current->unk3 >= 0)
|
||||
a1->unk5CC[current->unk3] = 0;
|
||||
}
|
||||
}
|
||||
{
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = a1->unk13EC; current; current = current->unk18) {
|
||||
++current->unk8;
|
||||
current->unk1C(current);
|
||||
}
|
||||
}
|
||||
sub_08146C60(a1);
|
||||
++a1->unk13FC;
|
||||
gBldRegs.bldY = 0x10 * a1->unk13FC / 0x1E;
|
||||
if (a1->unk13FC > 0x1D)
|
||||
a1->unk13F8 = sub_08149C68;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_081494E4(struct Unk_08145B64 *a1) {
|
||||
gBldRegs.bldCnt = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN;
|
||||
gBldRegs.bldAlpha = 0;
|
||||
gBldRegs.bldY = 0;
|
||||
a1->unk1400 = sub_08149504;
|
||||
}
|
||||
|
||||
void sub_08149504(struct Unk_08145B64 *a1) {
|
||||
u8 i;
|
||||
|
||||
if (++gBldRegs.bldY > 0xF) {
|
||||
for (i = 0; i < 0x20; ++i) {
|
||||
struct Sprite *sprite = &a1->unk48[i];
|
||||
|
||||
if (sprite->tilesVram) {
|
||||
VramFree(sprite->tilesVram);
|
||||
sprite->tilesVram = 0;
|
||||
}
|
||||
}
|
||||
gDispCnt &= ~DISPCNT_BG0_ON;
|
||||
a1->unk1400 = sub_08149568;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08149568(struct Unk_08145B64 *a1) {
|
||||
gBgScrollRegs[0][0] = 0x100;
|
||||
sub_081495B4(0, gUnk_083871D8[gLanguage][3], 0x100);
|
||||
a1->unk1400 = NULL;
|
||||
a1->unk13F8 = sub_08149C68;
|
||||
}
|
||||
|
||||
void sub_081495B4(u8 a1, u16 a2, u16 a3) {
|
||||
const struct TiledBg_082D7850 *ptr;
|
||||
const u16 *tilemap;
|
||||
u16 height;
|
||||
u16 *vram;
|
||||
const u32 *tileset;
|
||||
u16 i;
|
||||
u32 charbase;
|
||||
u32 screenbase;
|
||||
|
||||
ptr = gUnk_082D7850[a2];
|
||||
tileset = ptr->tileset;
|
||||
tilemap = ptr->tilemap;
|
||||
height = ptr->height;
|
||||
charbase = (gBgCntRegs[a1] >> 2) & 3;
|
||||
screenbase = (gBgCntRegs[a1] >> 8) & 0x1F;
|
||||
vram = (u16 *)(screenbase * 0x800 + ({ (a3 >> 3) * 0x40 + 0x6000000; }));
|
||||
LZ77UnCompVram(tileset, (u16 *)(charbase * 0x4000 + 0x6000000));
|
||||
for (i = 0; i < height; ++i)
|
||||
CpuCopy16(tilemap + i * 0x1E, vram + i * 0x20, 0x1E * sizeof(u16));
|
||||
}
|
||||
|
||||
void sub_08149628(struct Unk_08145B64 *a1) {
|
||||
a1->unk1410(a1);
|
||||
}
|
||||
|
||||
void sub_0814963C(struct Unk_08145B64 *a1) {
|
||||
if (a1->unk0 >= gUnk_083877EE[9]) {
|
||||
a1->unk1419 = 0;
|
||||
m4aSongNumStart(614);
|
||||
a1->unk1410 = sub_08145E84;
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_133(struct Unk_08145B64 *a1 __attribute__((unused))) {}
|
||||
|
||||
void sub_08149680(struct Unk_08145B64 *a1) {
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
gBgScrollRegs[i][0] -= a1->unk1414;
|
||||
gBgScrollRegs[i][1] -= a1->unk1415;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_081496C8(struct Unk_08145B64 *a1) {
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
gBgScrollRegs[i][0] += a1->unk1414;
|
||||
gBgScrollRegs[i][1] += a1->unk1415;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08149710(struct Unk_08145B64 *a1, u8 a2) {
|
||||
if (a1->unk0 >= gUnk_083877EE[3 * a2 + 3]) {
|
||||
a1->unk36[a2] = gUnk_083877EE[3 * a2 + 4] >> 2;
|
||||
a1->unk3C[a2] = sub_08146308;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08149758(struct Unk_08145B64 *a1) {
|
||||
if (a1->unk0 + a1->unk140C >= gUnk_083877EE[0x10]) {
|
||||
gBldRegs.bldCnt = BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_LIGHTEN;
|
||||
gBldRegs.bldAlpha = 0;
|
||||
gBldRegs.bldY = 0;
|
||||
a1->unk8 |= 0x20;
|
||||
a1->unk140E = 0;
|
||||
a1->unk1408 = sub_0814654C;
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_134(struct Unk_08145B64 *a1 __attribute__((unused))) {}
|
||||
|
||||
bool32 sub_081497B0(struct Unk_08145B64 *a1 __attribute__((unused))) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_081497B4(struct Unk_08145B64_5EC *a1, struct Sprite *a2) {
|
||||
struct Unk_08145B64 *v3 = a1->unk20;
|
||||
struct Unk_08145B64_5EC *current;
|
||||
|
||||
for (current = v3->unk13EC; current; current = current->unk18) {
|
||||
if (current != a1 && v3->unk48[current->unk3].tilesVram == v3->unk48[a1->unk3].tilesVram)
|
||||
return FALSE;
|
||||
}
|
||||
if (a2->tilesVram) {
|
||||
VramFree(a2->tilesVram);
|
||||
a2->tilesVram = 0;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_08149814(struct Unk_08145B64_5EC *a1, struct Sprite *a2) {
|
||||
struct Unk_08145B64 *v3 = a1->unk20;
|
||||
u8 i;
|
||||
struct Sprite *sprite;
|
||||
|
||||
for (i = 0; i < 0x20; ++i) {
|
||||
if (i != a1->unk3) {
|
||||
sprite = &v3->unk48[i];
|
||||
if (sprite->tilesVram && sprite->palId == a2->palId)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
v3->unk12[a2->palId] = 0xFF;
|
||||
--v3->unk11;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_08149864(struct Unk_08145B64_5EC *a1, const struct Unk_08387814 *a2) {
|
||||
union Unk_08145B64_5EC_24 *var = &a1->unk24;
|
||||
|
||||
var->pat2.unk1 = a2->unkF >> 1;
|
||||
var->pat2.unk2 = a2->unk10;
|
||||
}
|
||||
|
||||
void sub_08149874(struct Unk_08145B64_5EC *a1) {
|
||||
a1->unk1C = sub_08146E3C;
|
||||
}
|
||||
|
||||
void sub_08149880(struct Unk_08145B64_5EC *a1) {
|
||||
struct Sprite *sprite = &a1->unk20->unk48[a1->unk3];
|
||||
|
||||
a1->unkA += a1->unkE;
|
||||
if (!sub_08155128(sprite)) {
|
||||
a1->unkE = 0;
|
||||
a1->unk1C = sub_08146EE8;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_081498B4(struct Unk_08145B64_5EC *a1) {
|
||||
struct Sprite *sprite;
|
||||
union Unk_08145B64_5EC_24 *var = &a1->unk24;
|
||||
|
||||
if (a1->unk20->unk0 >= gUnk_083877E0[var->pat2.unk1]) {
|
||||
++var->pat2.unk1;
|
||||
var->pat2.unk8 = 0;
|
||||
var->pat2.unkA = 0x15;
|
||||
sprite = &a1->unk20->unk48[a1->unk3];
|
||||
sprite->animId = gUnk_08387208[5][0];
|
||||
sprite->variant = gUnk_08387208[5][1];
|
||||
sub_08155128(sprite);
|
||||
a1->unk1C = sub_08147078;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08149910(struct Unk_08145B64_5EC *a1) {
|
||||
union Unk_08145B64_5EC_24 *var = &a1->unk24;
|
||||
struct Sprite *sprite = &a1->unk20->unk48[a1->unk3];
|
||||
|
||||
if (++var->pat2.unkA == 0x19)
|
||||
m4aSongNumStart(601);
|
||||
if (!sub_08155128(sprite)) {
|
||||
sprite->animId = gUnk_08387208[0][0];
|
||||
sprite->variant = gUnk_08387208[0][1];
|
||||
sub_08155128(sprite);
|
||||
a1->unk1C = sub_081470EC;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user