mirror of https://github.com/zeldaret/tmc.git
smith.c OK
This commit is contained in:
parent
9753a51b92
commit
cdeae36d09
|
@ -147,7 +147,7 @@ sub_08063390: @ 0x08063390
|
||||||
movs r0, #1
|
movs r0, #1
|
||||||
strb r0, [r4, #0xc]
|
strb r0, [r4, #0xc]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl InitializeAnimation
|
bl InitializeAnimation
|
||||||
|
|
|
@ -109,7 +109,7 @@ _080635D0:
|
||||||
movs r0, #2
|
movs r0, #2
|
||||||
strb r0, [r4, #0xc]
|
strb r0, [r4, #0xc]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
adds r1, #4
|
adds r1, #4
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
|
|
|
@ -805,7 +805,7 @@ _08028F2C:
|
||||||
adds r0, r5, #0
|
adds r0, r5, #0
|
||||||
bl sub_0804AA1C
|
bl sub_0804AA1C
|
||||||
adds r0, r5, #0
|
adds r0, r5, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
lsls r0, r0, #3
|
lsls r0, r0, #3
|
||||||
strb r0, [r5, #0x15]
|
strb r0, [r5, #0x15]
|
||||||
adds r0, r5, #0
|
adds r0, r5, #0
|
||||||
|
|
|
@ -40,7 +40,7 @@ sub_0806ED9C: @ 0x0806ED9C
|
||||||
cmp r0, #0
|
cmp r0, #0
|
||||||
beq _0806EDBC
|
beq _0806EDBC
|
||||||
adds r0, r5, #0
|
adds r0, r5, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r6, r0, #0
|
adds r6, r0, #0
|
||||||
_0806EDBC:
|
_0806EDBC:
|
||||||
adds r0, r6, #0
|
adds r0, r6, #0
|
||||||
|
@ -48,8 +48,8 @@ _0806EDBC:
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_0806EDC0: .4byte gLinkEntity
|
_0806EDC0: .4byte gLinkEntity
|
||||||
|
|
||||||
thumb_func_start sub_0806EDC4
|
thumb_func_start GetAnimationState
|
||||||
sub_0806EDC4: @ 0x0806EDC4
|
GetAnimationState: @ 0x0806EDC4
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r1, _0806EDD4 @ =gLinkEntity
|
ldr r1, _0806EDD4 @ =gLinkEntity
|
||||||
bl GetFacingDirection
|
bl GetFacingDirection
|
||||||
|
|
|
@ -171,7 +171,7 @@ sub_08069C40: @ 0x08069C40
|
||||||
_08069C68: .4byte gLinkState
|
_08069C68: .4byte gLinkState
|
||||||
_08069C6C:
|
_08069C6C:
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
strb r0, [r4, #0x14]
|
strb r0, [r4, #0x14]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_08069D00
|
bl sub_08069D00
|
||||||
|
@ -426,7 +426,7 @@ sub_08069E44: @ 0x08069E44
|
||||||
sub_08069E50: @ 0x08069E50
|
sub_08069E50: @ 0x08069E50
|
||||||
push {r4, r5, r6, r7, lr}
|
push {r4, r5, r6, r7, lr}
|
||||||
adds r4, r0, #0
|
adds r4, r0, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
strb r0, [r4, #0x14]
|
strb r0, [r4, #0x14]
|
||||||
adds r5, r4, #0
|
adds r5, r4, #0
|
||||||
adds r5, #0x6b
|
adds r5, #0x6b
|
||||||
|
|
151
asm/fan.s
151
asm/fan.s
|
@ -6,157 +6,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_0809ED30
|
|
||||||
sub_0809ED30: @ 0x0809ED30
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldrb r0, [r4, #0xa]
|
|
||||||
movs r1, #2
|
|
||||||
eors r0, r1
|
|
||||||
lsls r0, r0, #3
|
|
||||||
strb r0, [r4, #0x15]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EE34
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EFB0
|
|
||||||
ldrb r1, [r4, #0xa]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl InitializeAnimation
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0809ED54
|
|
||||||
sub_0809ED54: @ 0x0809ED54
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x84
|
|
||||||
ldrh r0, [r1]
|
|
||||||
cmp r0, #0
|
|
||||||
beq _0809ED6A
|
|
||||||
bl CheckFlags
|
|
||||||
cmp r0, #0
|
|
||||||
beq _0809ED86
|
|
||||||
_0809ED6A:
|
|
||||||
ldrb r0, [r4, #0xb]
|
|
||||||
cmp r0, #1
|
|
||||||
bne _0809ED80
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x74
|
|
||||||
ldrh r0, [r1]
|
|
||||||
subs r0, #1
|
|
||||||
strh r0, [r1]
|
|
||||||
lsls r0, r0, #0x10
|
|
||||||
cmp r0, #0
|
|
||||||
bne _0809ED86
|
|
||||||
_0809ED80:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EE08
|
|
||||||
_0809ED86:
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0809ED88
|
|
||||||
sub_0809ED88: @ 0x0809ED88
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl sub_0809F08C
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EE44
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x86
|
|
||||||
ldrh r2, [r0]
|
|
||||||
cmp r2, #0
|
|
||||||
beq _0809EDC6
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x84
|
|
||||||
ldrh r0, [r1]
|
|
||||||
cmp r0, r2
|
|
||||||
bne _0809EDB4
|
|
||||||
bl CheckFlags
|
|
||||||
cmp r0, #0
|
|
||||||
bne _0809EDE2
|
|
||||||
b _0809EDBE
|
|
||||||
_0809EDB4:
|
|
||||||
ldrh r0, [r1]
|
|
||||||
bl CheckFlags
|
|
||||||
cmp r0, #0
|
|
||||||
beq _0809EDE2
|
|
||||||
_0809EDBE:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EE24
|
|
||||||
b _0809EDE2
|
|
||||||
_0809EDC6:
|
|
||||||
ldrb r0, [r4, #0xb]
|
|
||||||
cmp r0, #1
|
|
||||||
bne _0809EDE2
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x74
|
|
||||||
ldrh r0, [r1]
|
|
||||||
subs r0, #1
|
|
||||||
strh r0, [r1]
|
|
||||||
lsls r0, r0, #0x10
|
|
||||||
cmp r0, #0
|
|
||||||
bne _0809EDE2
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EE24
|
|
||||||
_0809EDE2:
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0809EDE4
|
|
||||||
sub_0809EDE4: @ 0x0809EDE4
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl sub_0809F08C
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EE44
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x5a
|
|
||||||
ldrb r1, [r0]
|
|
||||||
movs r0, #0x80
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _0809EE06
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0809EE34
|
|
||||||
_0809EE06:
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0809EE08
|
|
||||||
sub_0809EE08: @ 0x0809EE08
|
|
||||||
push {lr}
|
|
||||||
movs r1, #2
|
|
||||||
strb r1, [r0, #0xc]
|
|
||||||
adds r1, r0, #0
|
|
||||||
adds r1, #0x7f
|
|
||||||
ldrb r1, [r1]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r2, r0, #0
|
|
||||||
adds r2, #0x74
|
|
||||||
strh r1, [r2]
|
|
||||||
ldrb r1, [r0, #0xa]
|
|
||||||
bl InitializeAnimation
|
|
||||||
pop {pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0809EE24
|
|
||||||
sub_0809EE24: @ 0x0809EE24
|
|
||||||
push {lr}
|
|
||||||
movs r1, #3
|
|
||||||
strb r1, [r0, #0xc]
|
|
||||||
ldrb r1, [r0, #0xa]
|
|
||||||
adds r1, #4
|
|
||||||
bl InitializeAnimation
|
|
||||||
pop {pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0809EE34
|
|
||||||
sub_0809EE34: @ 0x0809EE34
|
|
||||||
movs r1, #1
|
|
||||||
strb r1, [r0, #0xc]
|
|
||||||
ldrb r1, [r0, #0xe]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r0, #0x74
|
|
||||||
strh r1, [r0]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_0809EE44
|
thumb_func_start sub_0809EE44
|
||||||
sub_0809EE44: @ 0x0809EE44
|
sub_0809EE44: @ 0x0809EE44
|
||||||
push {r4, r5, r6, r7, lr}
|
push {r4, r5, r6, r7, lr}
|
||||||
|
|
|
@ -76,7 +76,7 @@ sub_08062130: @ 0x08062130
|
||||||
movs r0, #2
|
movs r0, #2
|
||||||
strb r0, [r4, #0xc]
|
strb r0, [r4, #0xc]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl InitAnimationForceUpdate
|
bl InitAnimationForceUpdate
|
||||||
|
|
|
@ -154,7 +154,7 @@ sub_0806C4A8: @ 0x0806C4A8
|
||||||
cmp r0, #0
|
cmp r0, #0
|
||||||
beq _0806C4D8
|
beq _0806C4D8
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
cmp r1, #0
|
cmp r1, #0
|
||||||
bge _0806C4CC
|
bge _0806C4CC
|
||||||
|
|
134
asm/manager1.s
134
asm/manager1.s
|
@ -6,140 +6,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_08057064
|
|
||||||
sub_08057064: @ 0x08057064
|
|
||||||
push {r4, r5, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldr r1, _080570AC @ =gUnk_08107C5C
|
|
||||||
ldrb r0, [r4, #0xc]
|
|
||||||
lsls r0, r0, #2
|
|
||||||
adds r0, r0, r1
|
|
||||||
ldr r1, [r0]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
ldr r1, _080570B0 @ =gUnk_08107C48
|
|
||||||
adds r5, r4, #0
|
|
||||||
adds r5, #0x21
|
|
||||||
ldrb r0, [r5]
|
|
||||||
lsls r0, r0, #2
|
|
||||||
adds r0, r0, r1
|
|
||||||
ldr r1, [r0]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
ldr r1, _080570B4 @ =gUnk_08107C40
|
|
||||||
ldrb r0, [r5]
|
|
||||||
adds r0, r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
cmp r1, #0
|
|
||||||
beq _080570AA
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x20
|
|
||||||
ldrb r0, [r2]
|
|
||||||
cmp r0, r1
|
|
||||||
beq _080570AA
|
|
||||||
strb r1, [r2]
|
|
||||||
adds r0, r1, #0
|
|
||||||
bl sub_0801D7EC
|
|
||||||
_080570AA:
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080570AC: .4byte gUnk_08107C5C
|
|
||||||
_080570B0: .4byte gUnk_08107C48
|
|
||||||
_080570B4: .4byte gUnk_08107C40
|
|
||||||
|
|
||||||
thumb_func_start sub_080570B8
|
|
||||||
sub_080570B8: @ 0x080570B8
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
adds r0, #0x20
|
|
||||||
ldrb r0, [r0]
|
|
||||||
bl sub_0801D7EC
|
|
||||||
movs r0, #0
|
|
||||||
str r0, [r4, #0x34]
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x21
|
|
||||||
ldrb r0, [r1]
|
|
||||||
cmp r0, #3
|
|
||||||
bne _080570E0
|
|
||||||
ldr r1, _080570DC @ =gScreen
|
|
||||||
movs r0, #1
|
|
||||||
strh r0, [r1, #0x32]
|
|
||||||
b _080570F0
|
|
||||||
.align 2, 0
|
|
||||||
_080570DC: .4byte gScreen
|
|
||||||
_080570E0:
|
|
||||||
ldr r0, _080570F4 @ =gUnk_08107C48
|
|
||||||
ldrb r1, [r1]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r1, r1, r0
|
|
||||||
ldr r1, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
_080570F0:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080570F4: .4byte gUnk_08107C48
|
|
||||||
|
|
||||||
thumb_func_start sub_080570F8
|
|
||||||
sub_080570F8: @ 0x080570F8
|
|
||||||
push {lr}
|
|
||||||
ldr r1, _08057110 @ =gScreen
|
|
||||||
ldrh r2, [r1]
|
|
||||||
ldr r0, _08057114 @ =0x0000F7FF
|
|
||||||
ands r0, r2
|
|
||||||
movs r2, #0
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #0x66
|
|
||||||
strh r2, [r1]
|
|
||||||
bl sub_08056250
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08057110: .4byte gScreen
|
|
||||||
_08057114: .4byte 0x0000F7FF
|
|
||||||
|
|
||||||
thumb_func_start sub_08057118
|
|
||||||
sub_08057118: @ 0x08057118
|
|
||||||
push {r4, lr}
|
|
||||||
adds r3, r0, #0
|
|
||||||
movs r1, #0
|
|
||||||
strb r1, [r3, #0xe]
|
|
||||||
adds r0, #0x20
|
|
||||||
strb r1, [r0]
|
|
||||||
adds r0, #1
|
|
||||||
strb r1, [r0]
|
|
||||||
adds r0, #1
|
|
||||||
strb r1, [r0]
|
|
||||||
movs r0, #1
|
|
||||||
strb r0, [r3, #0xc]
|
|
||||||
ldr r1, _08057160 @ =gScreen
|
|
||||||
ldr r0, _08057164 @ =0x00001E04
|
|
||||||
strh r0, [r1, #0x2c]
|
|
||||||
ldrh r0, [r1]
|
|
||||||
movs r4, #0x80
|
|
||||||
lsls r4, r4, #4
|
|
||||||
adds r2, r4, #0
|
|
||||||
orrs r0, r2
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r2, r1, #0
|
|
||||||
adds r2, #0x66
|
|
||||||
ldr r0, _08057168 @ =0x00003648
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r1, #0x68
|
|
||||||
movs r0, #0x80
|
|
||||||
lsls r0, r0, #5
|
|
||||||
strh r0, [r1]
|
|
||||||
ldr r1, _0805716C @ =sub_080570B8
|
|
||||||
ldr r2, _08057170 @ =sub_080570F8
|
|
||||||
adds r0, r3, #0
|
|
||||||
bl sub_08052D74
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08057160: .4byte gScreen
|
|
||||||
_08057164: .4byte 0x00001E04
|
|
||||||
_08057168: .4byte 0x00003648
|
|
||||||
_0805716C: .4byte sub_080570B8
|
|
||||||
_08057170: .4byte sub_080570F8
|
|
||||||
|
|
||||||
thumb_func_start sub_08057174
|
thumb_func_start sub_08057174
|
||||||
sub_08057174: @ 0x08057174
|
sub_08057174: @ 0x08057174
|
||||||
push {r4, r5, r6, r7, lr}
|
push {r4, r5, r6, r7, lr}
|
||||||
|
|
|
@ -6,30 +6,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_0805751C
|
|
||||||
sub_0805751C: @ 0x0805751C
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldrb r1, [r4, #0xc]
|
|
||||||
cmp r1, #0
|
|
||||||
bne _0805753A
|
|
||||||
movs r0, #1
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
ldr r0, _08057544 @ =gScreen
|
|
||||||
strh r1, [r0, #0x32]
|
|
||||||
strh r1, [r0, #0x1a]
|
|
||||||
ldr r1, _08057548 @ =sub_080576A0
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r2, #0
|
|
||||||
bl sub_08052D74
|
|
||||||
_0805753A:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0805754C
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08057544: .4byte gScreen
|
|
||||||
_08057548: .4byte sub_080576A0
|
|
||||||
|
|
||||||
thumb_func_start sub_0805754C
|
thumb_func_start sub_0805754C
|
||||||
sub_0805754C: @ 0x0805754C
|
sub_0805754C: @ 0x0805754C
|
||||||
push {r4, r5, r6, lr}
|
push {r4, r5, r6, lr}
|
||||||
|
|
|
@ -0,0 +1,119 @@
|
||||||
|
.include "asm/macros.inc"
|
||||||
|
|
||||||
|
.include "constants/constants.inc"
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
push {r4, r5, r6, lr}
|
||||||
|
adds r4, r0, #0
|
||||||
|
ldrb r1, [r4, #0x10]
|
||||||
|
movs r0, #2
|
||||||
|
ands r0, r1
|
||||||
|
cmp r0, #0
|
||||||
|
beq _08066028
|
||||||
|
adds r2, r4, #0
|
||||||
|
adds r2, #0x39
|
||||||
|
movs r0, #0
|
||||||
|
ldrsb r0, [r2, r0]
|
||||||
|
adds r6, r4, #0
|
||||||
|
adds r6, #0x58
|
||||||
|
cmp r0, #2
|
||||||
|
bne _0806600C
|
||||||
|
movs r0, #0
|
||||||
|
movs r1, #4
|
||||||
|
strb r1, [r4, #0xc]
|
||||||
|
strb r0, [r2]
|
||||||
|
ldrb r0, [r6]
|
||||||
|
movs r5, #0
|
||||||
|
cmp r0, #0xc
|
||||||
|
bne _08065FF0
|
||||||
|
movs r5, #8
|
||||||
|
_08065FF0:
|
||||||
|
ldr r1, _08066020 @ =gLinkEntity
|
||||||
|
adds r0, r4, #0
|
||||||
|
bl GetFacingDirection
|
||||||
|
bl sub_0806F5A4
|
||||||
|
adds r5, r5, r0
|
||||||
|
adds r0, r4, #0
|
||||||
|
adds r1, r5, #0
|
||||||
|
bl InitAnimationForceUpdate
|
||||||
|
adds r0, r4, #0
|
||||||
|
bl sub_0806F118
|
||||||
|
_0806600C:
|
||||||
|
ldr r0, _08066024 @ =gUnk_0811036C
|
||||||
|
ldrb r1, [r4, #0xc]
|
||||||
|
lsls r1, r1, #2
|
||||||
|
adds r1, r1, r0
|
||||||
|
ldr r1, [r1]
|
||||||
|
adds r0, r4, #0
|
||||||
|
bl _call_via_r1
|
||||||
|
b _08066042
|
||||||
|
.align 2, 0
|
||||||
|
_08066020: .4byte gLinkEntity
|
||||||
|
_08066024: .4byte gUnk_0811036C
|
||||||
|
_08066028:
|
||||||
|
ldr r0, _08066058 @ =gUnk_08110360
|
||||||
|
ldrb r1, [r4, #0xc]
|
||||||
|
lsls r1, r1, #2
|
||||||
|
adds r1, r1, r0
|
||||||
|
ldr r1, [r1]
|
||||||
|
adds r0, r4, #0
|
||||||
|
bl _call_via_r1
|
||||||
|
adds r0, r4, #0
|
||||||
|
bl sub_0806ED78
|
||||||
|
adds r6, r4, #0
|
||||||
|
adds r6, #0x58
|
||||||
|
_08066042:
|
||||||
|
ldrb r0, [r6]
|
||||||
|
cmp r0, #0xc
|
||||||
|
bne _0806605C
|
||||||
|
adds r2, r4, #0
|
||||||
|
adds r2, #0x29
|
||||||
|
ldrb r1, [r2]
|
||||||
|
movs r0, #0x39
|
||||||
|
rsbs r0, r0, #0
|
||||||
|
ands r0, r1
|
||||||
|
strb r0, [r2]
|
||||||
|
b _0806606E
|
||||||
|
.align 2, 0
|
||||||
|
_08066058: .4byte gUnk_08110360
|
||||||
|
_0806605C:
|
||||||
|
adds r2, r4, #0
|
||||||
|
adds r2, #0x29
|
||||||
|
ldrb r0, [r2]
|
||||||
|
movs r1, #0x39
|
||||||
|
rsbs r1, r1, #0
|
||||||
|
ands r1, r0
|
||||||
|
movs r0, #8
|
||||||
|
orrs r1, r0
|
||||||
|
strb r1, [r2]
|
||||||
|
_0806606E:
|
||||||
|
adds r2, r4, #0
|
||||||
|
adds r2, #0x5a
|
||||||
|
ldrb r1, [r2]
|
||||||
|
movs r0, #1
|
||||||
|
ands r0, r1
|
||||||
|
cmp r0, #0
|
||||||
|
beq _080660A0
|
||||||
|
movs r0, #0xfe
|
||||||
|
ands r0, r1
|
||||||
|
strb r0, [r2]
|
||||||
|
adds r0, r4, #0
|
||||||
|
movs r1, #0x3d
|
||||||
|
movs r2, #0x20
|
||||||
|
bl CreateFx
|
||||||
|
ldr r4, _080660A4 @ =gUnk_08110380
|
||||||
|
bl Random
|
||||||
|
movs r1, #7
|
||||||
|
ands r1, r0
|
||||||
|
lsls r1, r1, #1
|
||||||
|
adds r1, r1, r4
|
||||||
|
ldrh r0, [r1]
|
||||||
|
bl PlaySFX
|
||||||
|
_080660A0:
|
||||||
|
pop {r4, r5, r6, pc}
|
||||||
|
.align 2, 0
|
||||||
|
_080660A4: .4byte gUnk_08110380
|
||||||
|
.syntax divided
|
|
@ -109,7 +109,7 @@ _08063B0C:
|
||||||
movs r0, #2
|
movs r0, #2
|
||||||
strb r0, [r4, #0xc]
|
strb r0, [r4, #0xc]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
adds r1, #4
|
adds r1, #4
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
|
|
|
@ -769,7 +769,7 @@ CreateZeldaFollower: @ 0x080609AC
|
||||||
orrs r0, r1
|
orrs r0, r1
|
||||||
strb r0, [r4, #0x10]
|
strb r0, [r4, #0x10]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
strb r0, [r4, #0x14]
|
strb r0, [r4, #0x14]
|
||||||
_080609E0:
|
_080609E0:
|
||||||
pop {r4, pc}
|
pop {r4, pc}
|
||||||
|
|
|
@ -153,7 +153,7 @@ _0806A512:
|
||||||
adds r0, #0x6a
|
adds r0, #0x6a
|
||||||
strh r2, [r0]
|
strh r2, [r0]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl InitializeAnimation
|
bl InitializeAnimation
|
||||||
|
@ -169,7 +169,7 @@ _0806A52C:
|
||||||
movs r0, #2
|
movs r0, #2
|
||||||
strb r0, [r4, #0xd]
|
strb r0, [r4, #0xd]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl InitializeAnimation
|
bl InitializeAnimation
|
||||||
|
|
425
asm/smith.s
425
asm/smith.s
|
@ -1,425 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
|
|
||||||
thumb_func_start Smith
|
|
||||||
Smith: @ 0x08065FC0
|
|
||||||
push {r4, r5, r6, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldrb r1, [r4, #0x10]
|
|
||||||
movs r0, #2
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08066028
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x39
|
|
||||||
movs r0, #0
|
|
||||||
ldrsb r0, [r2, r0]
|
|
||||||
adds r6, r4, #0
|
|
||||||
adds r6, #0x58
|
|
||||||
cmp r0, #2
|
|
||||||
bne _0806600C
|
|
||||||
movs r0, #0
|
|
||||||
movs r1, #4
|
|
||||||
strb r1, [r4, #0xc]
|
|
||||||
strb r0, [r2]
|
|
||||||
ldrb r0, [r6]
|
|
||||||
movs r5, #0
|
|
||||||
cmp r0, #0xc
|
|
||||||
bne _08065FF0
|
|
||||||
movs r5, #8
|
|
||||||
_08065FF0:
|
|
||||||
ldr r1, _08066020 @ =gLinkEntity
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl GetFacingDirection
|
|
||||||
bl sub_0806F5A4
|
|
||||||
adds r5, r5, r0
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r1, r5, #0
|
|
||||||
bl InitAnimationForceUpdate
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0806F118
|
|
||||||
_0806600C:
|
|
||||||
ldr r0, _08066024 @ =gUnk_0811036C
|
|
||||||
ldrb r1, [r4, #0xc]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r1, r1, r0
|
|
||||||
ldr r1, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
b _08066042
|
|
||||||
.align 2, 0
|
|
||||||
_08066020: .4byte gLinkEntity
|
|
||||||
_08066024: .4byte gUnk_0811036C
|
|
||||||
_08066028:
|
|
||||||
ldr r0, _08066058 @ =gUnk_08110360
|
|
||||||
ldrb r1, [r4, #0xc]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r1, r1, r0
|
|
||||||
ldr r1, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0806ED78
|
|
||||||
adds r6, r4, #0
|
|
||||||
adds r6, #0x58
|
|
||||||
_08066042:
|
|
||||||
ldrb r0, [r6]
|
|
||||||
cmp r0, #0xc
|
|
||||||
bne _0806605C
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x29
|
|
||||||
ldrb r1, [r2]
|
|
||||||
movs r0, #0x39
|
|
||||||
rsbs r0, r0, #0
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
b _0806606E
|
|
||||||
.align 2, 0
|
|
||||||
_08066058: .4byte gUnk_08110360
|
|
||||||
_0806605C:
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x29
|
|
||||||
ldrb r0, [r2]
|
|
||||||
movs r1, #0x39
|
|
||||||
rsbs r1, r1, #0
|
|
||||||
ands r1, r0
|
|
||||||
movs r0, #8
|
|
||||||
orrs r1, r0
|
|
||||||
strb r1, [r2]
|
|
||||||
_0806606E:
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x5a
|
|
||||||
ldrb r1, [r2]
|
|
||||||
movs r0, #1
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080660A0
|
|
||||||
movs r0, #0xfe
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #0x3d
|
|
||||||
movs r2, #0x20
|
|
||||||
bl CreateFx
|
|
||||||
ldr r4, _080660A4 @ =gUnk_08110380
|
|
||||||
bl Random
|
|
||||||
movs r1, #7
|
|
||||||
ands r1, r0
|
|
||||||
lsls r1, r1, #1
|
|
||||||
adds r1, r1, r4
|
|
||||||
ldrh r0, [r1]
|
|
||||||
bl PlaySFX
|
|
||||||
_080660A0:
|
|
||||||
pop {r4, r5, r6, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080660A4: .4byte gUnk_08110380
|
|
||||||
|
|
||||||
thumb_func_start Smith_Head
|
|
||||||
Smith_Head: @ 0x080660A8
|
|
||||||
push {r4, r5, lr}
|
|
||||||
adds r5, r0, #0
|
|
||||||
adds r0, #0x5a
|
|
||||||
ldrb r4, [r0]
|
|
||||||
ldrb r2, [r5, #0x1e]
|
|
||||||
adds r0, r5, #0
|
|
||||||
movs r1, #0
|
|
||||||
bl SetExtraSpriteFrame
|
|
||||||
movs r0, #0x40
|
|
||||||
ands r4, r0
|
|
||||||
cmp r4, #0
|
|
||||||
beq _080660CE
|
|
||||||
adds r0, r5, #0
|
|
||||||
movs r1, #1
|
|
||||||
movs r2, #0x16
|
|
||||||
bl SetExtraSpriteFrame
|
|
||||||
b _080660D8
|
|
||||||
_080660CE:
|
|
||||||
adds r0, r5, #0
|
|
||||||
movs r1, #1
|
|
||||||
movs r2, #0xff
|
|
||||||
bl SetExtraSpriteFrame
|
|
||||||
_080660D8:
|
|
||||||
adds r0, r5, #0
|
|
||||||
movs r1, #0
|
|
||||||
movs r2, #1
|
|
||||||
bl SetSpriteSubEntryOffsetData1
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl sub_0807000C
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_080660EC
|
|
||||||
sub_080660EC: @ 0x080660EC
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldr r1, _08066114 @ =gUnk_08110354
|
|
||||||
bl LoadExtraSpriteData
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08066112
|
|
||||||
movs r0, #1
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0801E99C
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x68
|
|
||||||
strb r0, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #2
|
|
||||||
bl InitAnimationForceUpdate
|
|
||||||
_08066112:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08066114: .4byte gUnk_08110354
|
|
||||||
|
|
||||||
thumb_func_start sub_08066118
|
|
||||||
sub_08066118: @ 0x08066118
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
movs r1, #0x28
|
|
||||||
movs r2, #0x28
|
|
||||||
bl sub_0806ED9C
|
|
||||||
adds r1, r0, #0
|
|
||||||
cmp r1, #0
|
|
||||||
bge _0806612E
|
|
||||||
movs r1, #2
|
|
||||||
b _08066144
|
|
||||||
_0806612E:
|
|
||||||
ldrb r0, [r4, #0xf]
|
|
||||||
cmp r0, #0
|
|
||||||
bne _0806613A
|
|
||||||
movs r0, #0x10
|
|
||||||
strb r0, [r4, #0xf]
|
|
||||||
b _08066144
|
|
||||||
_0806613A:
|
|
||||||
subs r0, #1
|
|
||||||
strb r0, [r4, #0xf]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x58
|
|
||||||
ldrb r1, [r0]
|
|
||||||
_08066144:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0806F078
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08066154
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl UpdateAnimationSingleFrame
|
|
||||||
_08066154:
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x39
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
asrs r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
beq _0806616C
|
|
||||||
movs r0, #2
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
movs r0, #0
|
|
||||||
bl TextboxNoOverlapFollow
|
|
||||||
_0806616C:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08066170
|
|
||||||
sub_08066170: @ 0x08066170
|
|
||||||
movs r1, #1
|
|
||||||
strb r1, [r0, #0xc]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08066178
|
|
||||||
sub_08066178: @ 0x08066178
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldr r1, _080661AC @ =gUnk_08110354
|
|
||||||
bl LoadExtraSpriteData
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080661A8
|
|
||||||
movs r2, #1
|
|
||||||
movs r0, #1
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
ldrb r1, [r4, #0x18]
|
|
||||||
subs r0, #5
|
|
||||||
ands r0, r1
|
|
||||||
orrs r0, r2
|
|
||||||
strb r0, [r4, #0x18]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0801E99C
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x68
|
|
||||||
strb r0, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0807DD50
|
|
||||||
_080661A8:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080661AC: .4byte gUnk_08110354
|
|
||||||
|
|
||||||
thumb_func_start sub_080661B0
|
|
||||||
sub_080661B0: @ 0x080661B0
|
|
||||||
push {lr}
|
|
||||||
movs r1, #0
|
|
||||||
bl sub_0807DD94
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_080661BC
|
|
||||||
sub_080661BC: @ 0x080661BC
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
adds r0, #0x58
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r0, #0xc
|
|
||||||
bne _080661F4
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl UpdateAnimationSingleFrame
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x5a
|
|
||||||
ldrb r1, [r0]
|
|
||||||
movs r0, #0x80
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080661FC
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0806EDC4
|
|
||||||
adds r0, #8
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x80
|
|
||||||
strh r0, [r1]
|
|
||||||
ldrh r1, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl InitAnimationForceUpdate
|
|
||||||
b _080661FC
|
|
||||||
_080661F4:
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #0
|
|
||||||
bl sub_0807DD94
|
|
||||||
_080661FC:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08066200
|
|
||||||
sub_08066200: @ 0x08066200
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
movs r1, #0
|
|
||||||
bl sub_0807DDAC
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0807DDE4
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl UpdateAnimationSingleFrame
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_08066218
|
|
||||||
sub_08066218: @ 0x08066218
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl UpdateFuseInteraction
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08066228
|
|
||||||
movs r0, #1
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
_08066228:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_0806622C
|
|
||||||
sub_0806622C: @ 0x0806622C
|
|
||||||
push {lr}
|
|
||||||
adds r2, r0, #0
|
|
||||||
ldr r0, _0806624C @ =gUnk_02002A40
|
|
||||||
ldrb r0, [r0, #8]
|
|
||||||
subs r0, #2
|
|
||||||
cmp r0, #0
|
|
||||||
bge _0806623C
|
|
||||||
movs r0, #0
|
|
||||||
_0806623C:
|
|
||||||
lsls r1, r0, #3
|
|
||||||
ldr r0, _08066250 @ =gUnk_08110390
|
|
||||||
adds r1, r1, r0
|
|
||||||
adds r0, r2, #0
|
|
||||||
bl ShowNPCDialogue
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
_0806624C: .4byte gUnk_02002A40
|
|
||||||
_08066250: .4byte gUnk_08110390
|
|
||||||
|
|
||||||
thumb_func_start nullsub_501
|
|
||||||
nullsub_501: @ 0x08066254
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08066258
|
|
||||||
sub_08066258: @ 0x08066258
|
|
||||||
push {r4, lr}
|
|
||||||
ldr r4, _08066270 @ =gUnk_081103D0
|
|
||||||
bl Random
|
|
||||||
movs r1, #7
|
|
||||||
ands r1, r0
|
|
||||||
lsls r1, r1, #1
|
|
||||||
adds r1, r1, r4
|
|
||||||
ldrh r0, [r1]
|
|
||||||
bl PlaySFX
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08066270: .4byte gUnk_081103D0
|
|
||||||
|
|
||||||
thumb_func_start sub_08066274
|
|
||||||
sub_08066274: @ 0x08066274
|
|
||||||
push {lr}
|
|
||||||
ldr r3, _08066284 @ =gUnk_081103E0
|
|
||||||
movs r1, #1
|
|
||||||
movs r2, #0
|
|
||||||
bl sub_08078850
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08066284: .4byte gUnk_081103E0
|
|
||||||
|
|
||||||
thumb_func_start sub_08066288
|
|
||||||
sub_08066288: @ 0x08066288
|
|
||||||
push {lr}
|
|
||||||
adds r1, r0, #0
|
|
||||||
adds r1, #0x68
|
|
||||||
ldrb r1, [r1]
|
|
||||||
bl sub_08078784
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start Smith_Fusion
|
|
||||||
Smith_Fusion: @ 0x08066298
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldrb r0, [r4, #0xc]
|
|
||||||
cmp r0, #0
|
|
||||||
bne _080662D0
|
|
||||||
ldr r1, _080662CC @ =gUnk_08110354
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl LoadExtraSpriteData
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080662D6
|
|
||||||
ldrb r0, [r4, #0xc]
|
|
||||||
adds r0, #1
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
ldrb r1, [r4, #0x18]
|
|
||||||
movs r0, #4
|
|
||||||
rsbs r0, r0, #0
|
|
||||||
ands r0, r1
|
|
||||||
movs r1, #1
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r4, #0x18]
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #6
|
|
||||||
bl InitAnimationForceUpdate
|
|
||||||
b _080662D6
|
|
||||||
.align 2, 0
|
|
||||||
_080662CC: .4byte gUnk_08110354
|
|
||||||
_080662D0:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl UpdateAnimationSingleFrame
|
|
||||||
_080662D6:
|
|
||||||
pop {r4, pc}
|
|
|
@ -166,7 +166,7 @@ _08064BCE:
|
||||||
movs r0, #3
|
movs r0, #3
|
||||||
strb r0, [r4, #0xc]
|
strb r0, [r4, #0xc]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
cmp r1, #0
|
cmp r1, #0
|
||||||
bge _08064BE0
|
bge _08064BE0
|
||||||
|
@ -187,7 +187,7 @@ _08064BFA:
|
||||||
movs r0, #2
|
movs r0, #2
|
||||||
strb r0, [r4, #0xc]
|
strb r0, [r4, #0xc]
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0806EDC4
|
bl GetAnimationState
|
||||||
adds r1, r0, #0
|
adds r1, r0, #0
|
||||||
cmp r1, #0
|
cmp r1, #0
|
||||||
bge _08064C0C
|
bge _08064C0C
|
||||||
|
|
|
@ -22,7 +22,8 @@ typedef struct {
|
||||||
u16 bg2xOffset;
|
u16 bg2xOffset;
|
||||||
u16 bg2yOffset;
|
u16 bg2yOffset;
|
||||||
u16 unk;
|
u16 unk;
|
||||||
u32 unk2;
|
u16 unk2;
|
||||||
|
u16 unk3;
|
||||||
u16 bg3Control;
|
u16 bg3Control;
|
||||||
u16 bg3xOffset;
|
u16 bg3xOffset;
|
||||||
u16 bg3yOffset;
|
u16 bg3yOffset;
|
||||||
|
@ -67,4 +68,6 @@ typedef struct {
|
||||||
BgControls controls;
|
BgControls controls;
|
||||||
} Screen;
|
} Screen;
|
||||||
|
|
||||||
|
extern Screen gScreen;
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -467,7 +467,9 @@ SECTIONS {
|
||||||
asm/code_08055FF4.o(.text);
|
asm/code_08055FF4.o(.text);
|
||||||
src/textbox.o(.text);
|
src/textbox.o(.text);
|
||||||
asm/code_08056418.o(.text);
|
asm/code_08056418.o(.text);
|
||||||
|
src/manager1.o(.text);
|
||||||
asm/manager1.o(.text);
|
asm/manager1.o(.text);
|
||||||
|
src/manager2.o(.text);
|
||||||
asm/manager2.o(.text);
|
asm/manager2.o(.text);
|
||||||
asm/manager3.o(.text);
|
asm/manager3.o(.text);
|
||||||
asm/manager4.o(.text);
|
asm/manager4.o(.text);
|
||||||
|
@ -562,7 +564,7 @@ SECTIONS {
|
||||||
src/epona.o(.text);
|
src/epona.o(.text);
|
||||||
src/milkCart.o(.text);
|
src/milkCart.o(.text);
|
||||||
asm/ghostBrothers.o(.text);
|
asm/ghostBrothers.o(.text);
|
||||||
asm/smith.o(.text);
|
src/smith.o(.text);
|
||||||
asm/npc23.o(.text);
|
asm/npc23.o(.text);
|
||||||
asm/kingDaltus.o(.text);
|
asm/kingDaltus.o(.text);
|
||||||
asm/ministerPotho.o(.text);
|
asm/ministerPotho.o(.text);
|
||||||
|
|
77
src/fan.c
77
src/fan.c
|
@ -1,9 +1,86 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
|
#include "flags.h"
|
||||||
|
|
||||||
|
extern void sub_0809EE34(Entity*);
|
||||||
|
extern void sub_0809EFB0(Entity*);
|
||||||
|
extern void sub_0809EE08(Entity*);
|
||||||
|
extern void sub_0809F08C(void);
|
||||||
|
extern void sub_0809EE44(Entity*);
|
||||||
|
extern void sub_0809EE24(Entity*);
|
||||||
|
|
||||||
extern void (*const gUnk_081243D4[])(Entity*);
|
extern void (*const gUnk_081243D4[])(Entity*);
|
||||||
|
|
||||||
void Fan(Entity *this)
|
void Fan(Entity *this)
|
||||||
{
|
{
|
||||||
gUnk_081243D4[this->action](this);
|
gUnk_081243D4[this->action](this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0809ED30(Entity *this)
|
||||||
|
{
|
||||||
|
this->direction = (this->entityType.form ^ 2) << 3;
|
||||||
|
sub_0809EE34(this);
|
||||||
|
sub_0809EFB0(this);
|
||||||
|
InitializeAnimation(this, this->entityType.form);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0809ED54(Entity *this)
|
||||||
|
{
|
||||||
|
u16 uVar1;
|
||||||
|
u32 iVar2;
|
||||||
|
|
||||||
|
if (((this->cutsceneBeh.HWORD == 0) || CheckFlags(this->cutsceneBeh.HWORD)) &&
|
||||||
|
((this->entityType.parameter != 1 ||
|
||||||
|
(--this->field_0x74 == 0)))) {
|
||||||
|
sub_0809EE08(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0809ED88(Entity *this)
|
||||||
|
{
|
||||||
|
sub_0809F08C();
|
||||||
|
sub_0809EE44(this);
|
||||||
|
if (this->field_0x86 != 0) {
|
||||||
|
if (this->cutsceneBeh.HWORD == this->field_0x86) {
|
||||||
|
if (CheckFlags(this->cutsceneBeh.HWORD)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!CheckFlags(this->cutsceneBeh.HWORD)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sub_0809EE24(this);
|
||||||
|
}
|
||||||
|
else if (((this->entityType).parameter == 1) &&
|
||||||
|
(--this->field_0x74 == 0)) {
|
||||||
|
sub_0809EE24(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0809EDE4(Entity *this)
|
||||||
|
{
|
||||||
|
sub_0809F08C();
|
||||||
|
sub_0809EE44(this);
|
||||||
|
if (this->frames.b.f3) {
|
||||||
|
sub_0809EE34(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0809EE08(Entity *this)
|
||||||
|
{
|
||||||
|
this->action = 2;
|
||||||
|
this->field_0x74 = *((u8 *)&this->field_0x7c + 3) << 2;
|
||||||
|
InitializeAnimation(this, this->entityType.form);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0809EE24(Entity *this)
|
||||||
|
{
|
||||||
|
this->action = 3;
|
||||||
|
InitializeAnimation(this, this->entityType.form + 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0809EE34(Entity *this)
|
||||||
|
{
|
||||||
|
this->action = 1;
|
||||||
|
this->field_0x74 = this->actionDelay << 2;
|
||||||
}
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
#include "global.h"
|
||||||
|
#include "entity.h"
|
||||||
|
#include "screen.h"
|
||||||
|
|
||||||
|
extern void sub_0801D7EC(u32);
|
||||||
|
extern void sub_08056250(void);
|
||||||
|
extern void sub_080570B8(Entity*);
|
||||||
|
void sub_080570F8(void);
|
||||||
|
extern void sub_08052D74(void*, void*, void*);
|
||||||
|
|
||||||
|
extern void (*const gUnk_08107C5C[])(Entity*);
|
||||||
|
extern void (*const gUnk_08107C48[])(Entity*);
|
||||||
|
|
||||||
|
extern u8 gUnk_08107C40[];
|
||||||
|
|
||||||
|
void Manager1(Entity *this)
|
||||||
|
{
|
||||||
|
u8 bVar1;
|
||||||
|
u8 *pbVar2;
|
||||||
|
|
||||||
|
gUnk_08107C5C[this->action](this);
|
||||||
|
gUnk_08107C48[((u8*)&this->field_0x20)[1]](this);
|
||||||
|
bVar1 = gUnk_08107C40[((u8*)&this->field_0x20)[1]];
|
||||||
|
if ((bVar1 != 0) && (*(u8 *)&this->field_0x20 != bVar1)) {
|
||||||
|
((u8*)&this->field_0x20)[0] = bVar1;
|
||||||
|
sub_0801D7EC(bVar1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080570B8(Entity *this)
|
||||||
|
{
|
||||||
|
u8 *pbVar1;
|
||||||
|
|
||||||
|
sub_0801D7EC(((u8 *)&this->field_0x20)[0]);
|
||||||
|
this->height.WORD = 0;
|
||||||
|
pbVar1 = ((u8 *)&this->field_0x20 + 1);
|
||||||
|
if (*pbVar1 == 3) {
|
||||||
|
gScreen.affine.bg3xOffset = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gUnk_08107C48[*pbVar1](this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080570F8(void)
|
||||||
|
{
|
||||||
|
gScreen.lcd.lcdControl2 &= 0xf7ff;
|
||||||
|
gScreen.controls.windowOutsideControl = 0;
|
||||||
|
sub_08056250();
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08057118(Entity *this)
|
||||||
|
{
|
||||||
|
this->actionDelay = 0;
|
||||||
|
*(u8 *)&this->field_0x20 = 0;
|
||||||
|
((u8 *)&this->field_0x20)[1] = 0;
|
||||||
|
((u8 *)&this->field_0x20)[2] = 0;
|
||||||
|
this->action = 1;
|
||||||
|
gScreen.affine.unk2 = 0x1e04;
|
||||||
|
*(u16 *)&gScreen.lcd.lcdControl2 |= 0x800;
|
||||||
|
gScreen.controls.windowOutsideControl = 0x3648;
|
||||||
|
gScreen.controls.mosaicSize = 0x1000;
|
||||||
|
sub_08052D74(this, sub_080570B8, sub_080570F8);
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
#include "global.h"
|
||||||
|
#include "entity.h"
|
||||||
|
#include "screen.h"
|
||||||
|
|
||||||
|
extern void sub_080576A0();
|
||||||
|
extern void sub_08052D74();
|
||||||
|
extern void sub_0805754C(Entity*);
|
||||||
|
|
||||||
|
void Manager2(Entity *this)
|
||||||
|
{
|
||||||
|
if (this->action == 0) {
|
||||||
|
this->action = 1;
|
||||||
|
gScreen.affine.bg3xOffset = 0;
|
||||||
|
gScreen.bg2.bg0xOffset = 0;
|
||||||
|
sub_08052D74(this, sub_080576A0, 0);
|
||||||
|
}
|
||||||
|
sub_0805754C(this);
|
||||||
|
}
|
|
@ -0,0 +1,225 @@
|
||||||
|
#include "global.h"
|
||||||
|
#include "entity.h"
|
||||||
|
#include "textbox.h"
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
u8 filler[8];
|
||||||
|
u8 unk;
|
||||||
|
} struct_02002A40;
|
||||||
|
|
||||||
|
extern u32 GetFacingDirection(Entity*, Entity*);
|
||||||
|
extern u32 sub_0806F5A4(u32);
|
||||||
|
extern void sub_0806F118(Entity*);
|
||||||
|
extern void sub_0806ED78(Entity*);
|
||||||
|
extern Entity* CreateFx(Entity*, u32, u32);
|
||||||
|
extern void PlaySFX(u32);
|
||||||
|
extern u32 Random(void);
|
||||||
|
extern void sub_0807000C(Entity*);
|
||||||
|
extern u32 sub_0801E99C(Entity*);
|
||||||
|
extern u32 sub_0806ED9C(Entity*, u32, u32);
|
||||||
|
extern u32 sub_0806F078(Entity*, u32);
|
||||||
|
extern void sub_0807DD50(Entity*);
|
||||||
|
extern void sub_0807DD94(Entity*, u32);
|
||||||
|
extern void sub_0807DDAC(Entity*, u32);
|
||||||
|
extern void sub_0807DDE4(Entity*);
|
||||||
|
extern u32 UpdateFuseInteraction(Entity*);
|
||||||
|
extern u32 GetAnimationState(Entity*);
|
||||||
|
extern void ShowNPCDialogue(Entity*, u32*);
|
||||||
|
extern void sub_08078850(u32, u32, u32, u32*);
|
||||||
|
extern void sub_08078784(Entity*, u32);
|
||||||
|
|
||||||
|
extern void (*const gUnk_08110360[])(Entity*);
|
||||||
|
extern void (*const gUnk_0811036C[])(Entity*);
|
||||||
|
|
||||||
|
extern u16 gUnk_08110380[];
|
||||||
|
extern SpriteLoadData gUnk_08110354;
|
||||||
|
extern struct_02002A40 gUnk_02002A40;
|
||||||
|
extern u32 gUnk_08110390[];
|
||||||
|
extern u16 gUnk_081103D0[];
|
||||||
|
extern u32 gUnk_081103E0;
|
||||||
|
|
||||||
|
#if NON_MATCHING //reg-alloc
|
||||||
|
void Smith(Entity *this)
|
||||||
|
{
|
||||||
|
u32 iVar2;
|
||||||
|
u32 iVar4;
|
||||||
|
|
||||||
|
if ((this->flags & 2) != 0) {
|
||||||
|
if (this->interactType == 2) {
|
||||||
|
this->action = 4;
|
||||||
|
this->interactType = 0;
|
||||||
|
iVar4 = (this->animIndex == 0xc) ? 8 : 0;
|
||||||
|
iVar2 = sub_0806F5A4(GetFacingDirection(this, &gLinkEntity));
|
||||||
|
InitAnimationForceUpdate(this, iVar2 + iVar4);
|
||||||
|
sub_0806F118(this);
|
||||||
|
}
|
||||||
|
gUnk_0811036C[this->action](this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gUnk_08110360[this->action](this);
|
||||||
|
sub_0806ED78(this);
|
||||||
|
}
|
||||||
|
if (this->animIndex == 0xc) {
|
||||||
|
this->spritePriority.b1 = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->spritePriority.b1 = 1;
|
||||||
|
}
|
||||||
|
if ((this->frames.all & 1) != 0) {
|
||||||
|
this->frames.all &= 0xfe;
|
||||||
|
CreateFx(this, 0x3d, 0x20);
|
||||||
|
PlaySFX(gUnk_08110380[(Random() & 7)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
NAKED
|
||||||
|
void Smith(Entity *this) {
|
||||||
|
asm(".include \"asm/non_matching/smith/smith.inc\"");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void Smith_Head(Entity *this)
|
||||||
|
{
|
||||||
|
u8 bVar1;
|
||||||
|
|
||||||
|
bVar1 = this->frames.all;
|
||||||
|
SetExtraSpriteFrame(this, 0, this->frameIndex);
|
||||||
|
if ((bVar1 & 0x40) != 0) {
|
||||||
|
SetExtraSpriteFrame(this, 1, 0x16);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SetExtraSpriteFrame(this, 1, 0xff);
|
||||||
|
}
|
||||||
|
SetSpriteSubEntryOffsetData1(this,0,1);
|
||||||
|
sub_0807000C(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080660EC(Entity *this)
|
||||||
|
{
|
||||||
|
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
|
||||||
|
this->action = 1;
|
||||||
|
this->field_0x68 = sub_0801E99C(this);
|
||||||
|
InitAnimationForceUpdate(this, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08066118(Entity *this)
|
||||||
|
{
|
||||||
|
s32 uVar1;
|
||||||
|
u32 iVar2;
|
||||||
|
|
||||||
|
uVar1 = sub_0806ED9C(this, 0x28, 0x28);
|
||||||
|
if (uVar1 < 0) {
|
||||||
|
uVar1 = 2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (this->field_0xf == 0) {
|
||||||
|
this->field_0xf = 0x10;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
--this->field_0xf;
|
||||||
|
uVar1 = this->animIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sub_0806F078(this, uVar1) == 0) {
|
||||||
|
UpdateAnimationSingleFrame(this);
|
||||||
|
}
|
||||||
|
if (this->interactType != 0) {
|
||||||
|
this->action = 2;
|
||||||
|
TextboxNoOverlapFollow(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08066170(Entity *this)
|
||||||
|
{
|
||||||
|
this->action = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08066178(Entity *this)
|
||||||
|
{
|
||||||
|
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
|
||||||
|
this->action = 1;
|
||||||
|
this->spriteSettings.b.draw = 1;
|
||||||
|
this->field_0x68 = sub_0801E99C(this);
|
||||||
|
sub_0807DD50(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080661B0(Entity *this)
|
||||||
|
{
|
||||||
|
sub_0807DD94(this, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080661BC(Entity *this)
|
||||||
|
{
|
||||||
|
u32 sVar1;
|
||||||
|
|
||||||
|
if (this->animIndex == 0xc) {
|
||||||
|
UpdateAnimationSingleFrame(this);
|
||||||
|
if ((this->frames.b.f3) != 0) {
|
||||||
|
this->field_0x80 = GetAnimationState(this) + 8;
|
||||||
|
InitAnimationForceUpdate(this, this->field_0x80);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sub_0807DD94(this,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08066200(Entity *this)
|
||||||
|
{
|
||||||
|
sub_0807DDAC(this, 0);
|
||||||
|
sub_0807DDE4(this);
|
||||||
|
UpdateAnimationSingleFrame(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08066218(Entity *this)
|
||||||
|
{
|
||||||
|
if (UpdateFuseInteraction(this) != 0) {
|
||||||
|
this->action = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0806622C(Entity *this)
|
||||||
|
{
|
||||||
|
u32 iVar1;
|
||||||
|
|
||||||
|
if (gUnk_02002A40.unk - 2 < 0) {
|
||||||
|
iVar1 = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
iVar1 = gUnk_02002A40.unk - 2;
|
||||||
|
}
|
||||||
|
ShowNPCDialogue(this, &gUnk_08110390[iVar1 * 2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void nullsub_501(Entity* this) {}
|
||||||
|
|
||||||
|
void sub_08066258(void)
|
||||||
|
{
|
||||||
|
PlaySFX(gUnk_081103D0[Random() & 7]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08066274(u32 arg0)
|
||||||
|
{
|
||||||
|
sub_08078850(arg0, 1, 0, &gUnk_081103E0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08066288(Entity *arg0)
|
||||||
|
{
|
||||||
|
sub_08078784(arg0, arg0->field_0x68);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Smith_Fusion(Entity *this)
|
||||||
|
{
|
||||||
|
if (this->action == 0) {
|
||||||
|
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
|
||||||
|
this->action++;
|
||||||
|
this->spriteSettings.b.draw = 1;
|
||||||
|
InitAnimationForceUpdate(this, 6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
UpdateAnimationSingleFrame(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ extern Entity* sub_0805EB9C(u32, u32);
|
||||||
void CopyPosition(Entity*, Entity*);
|
void CopyPosition(Entity*, Entity*);
|
||||||
void sub_08068680(Entity*, Entity*);
|
void sub_08068680(Entity*, Entity*);
|
||||||
void sub_08068694(Entity*, Entity*);
|
void sub_08068694(Entity*, Entity*);
|
||||||
u32 sub_0806EDC4(Entity* ent);
|
u32 GetAnimationState(Entity* ent);
|
||||||
void DeleteThisEntity(void);
|
void DeleteThisEntity(void);
|
||||||
extern Entity* GetEntityByType(u32, u32);
|
extern Entity* GetEntityByType(u32, u32);
|
||||||
extern void sub_080686C4(Entity*, Entity*);
|
extern void sub_080686C4(Entity*, Entity*);
|
||||||
|
@ -89,7 +89,7 @@ void sub_08066D94(Entity* ent) {
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
npc->animationState = gLinkEntity.animationState;
|
npc->animationState = gLinkEntity.animationState;
|
||||||
npc->flags |= 0x20;
|
npc->flags |= 0x20;
|
||||||
npc->animationState = sub_0806EDC4(ent);
|
npc->animationState = GetAnimationState(ent);
|
||||||
roomID = gRoomControls.roomID;
|
roomID = gRoomControls.roomID;
|
||||||
npc->field_0x74 = roomID;
|
npc->field_0x74 = roomID;
|
||||||
CopyPosition(ent, npc);
|
CopyPosition(ent, npc);
|
||||||
|
|
Loading…
Reference in New Issue