mirror of https://github.com/zeldaret/tmc.git
Decompile crow
This commit is contained in:
parent
3cd77bb034
commit
1cac914e23
618
asm/enemy/crow.s
618
asm/enemy/crow.s
|
@ -1,618 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
|
|
||||||
thumb_func_start Crow
|
|
||||||
Crow: @ 0x080327F4
|
|
||||||
push {r4, r5, lr}
|
|
||||||
adds r5, r0, #0
|
|
||||||
ldr r4, _0803280C @ =gUnk_080CE978
|
|
||||||
bl GetNextFunction
|
|
||||||
lsls r0, r0, #2
|
|
||||||
adds r0, r0, r4
|
|
||||||
ldr r1, [r0]
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_0803280C: .4byte gUnk_080CE978
|
|
||||||
|
|
||||||
thumb_func_start sub_08032810
|
|
||||||
sub_08032810: @ 0x08032810
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldr r0, _08032840 @ =gUnk_080CE990
|
|
||||||
ldrb r1, [r4, #0xc]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r1, r1, r0
|
|
||||||
ldr r1, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
ldrb r0, [r4, #0xf]
|
|
||||||
cmp r0, #0
|
|
||||||
beq _0803283C
|
|
||||||
subs r0, #1
|
|
||||||
strb r0, [r4, #0xf]
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
bne _0803283C
|
|
||||||
ldrb r0, [r4, #0x10]
|
|
||||||
movs r1, #0x80
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r4, #0x10]
|
|
||||||
_0803283C:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08032840: .4byte gUnk_080CE990
|
|
||||||
|
|
||||||
thumb_func_start sub_08032844
|
|
||||||
sub_08032844: @ 0x08032844
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
adds r0, #0x41
|
|
||||||
ldrb r1, [r0]
|
|
||||||
movs r2, #0x80
|
|
||||||
adds r0, r2, #0
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080328AE
|
|
||||||
movs r0, #0x3f
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032896
|
|
||||||
ldrb r1, [r4, #0x10]
|
|
||||||
movs r0, #0x7f
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r4, #0x10]
|
|
||||||
movs r3, #0x10
|
|
||||||
strb r3, [r4, #0xf]
|
|
||||||
ldrb r2, [r4, #0x15]
|
|
||||||
adds r0, r2, #4
|
|
||||||
movs r1, #8
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032886
|
|
||||||
adds r0, r2, #0
|
|
||||||
ands r0, r3
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08032882
|
|
||||||
adds r0, r2, #2
|
|
||||||
b _08032884
|
|
||||||
_08032882:
|
|
||||||
subs r0, r2, #2
|
|
||||||
_08032884:
|
|
||||||
strb r0, [r4, #0x15]
|
|
||||||
_08032886:
|
|
||||||
ldrb r1, [r4, #0x15]
|
|
||||||
movs r0, #0x20
|
|
||||||
subs r0, r0, r1
|
|
||||||
strb r0, [r4, #0x15]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
b _080328AE
|
|
||||||
_08032896:
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x3d
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r2, #0
|
|
||||||
ands r0, r1
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
lsrs r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
bne _080328AE
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x45
|
|
||||||
strb r0, [r1]
|
|
||||||
_080328AE:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl GetNextFrame
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_080328B8
|
|
||||||
sub_080328B8: @ 0x080328B8
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldr r0, _080328FC @ =gUnk_080CE9A4
|
|
||||||
ldrb r1, [r4, #0xd]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r1, r1, r0
|
|
||||||
ldr r1, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl _call_via_r1
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl GetNextFrame
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0806F520
|
|
||||||
cmp r0, #0
|
|
||||||
bne _080328F8
|
|
||||||
movs r1, #2
|
|
||||||
strb r1, [r4, #0xc]
|
|
||||||
strb r0, [r4, #0xd]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x84
|
|
||||||
strb r1, [r0]
|
|
||||||
movs r0, #8
|
|
||||||
strb r0, [r4, #0xe]
|
|
||||||
movs r0, #0xe0
|
|
||||||
lsls r0, r0, #1
|
|
||||||
strh r0, [r4, #0x24]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
_080328F8:
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080328FC: .4byte gUnk_080CE9A4
|
|
||||||
|
|
||||||
thumb_func_start sub_08032900
|
|
||||||
sub_08032900: @ 0x08032900
|
|
||||||
movs r1, #1
|
|
||||||
strb r1, [r0, #0xd]
|
|
||||||
movs r1, #0x3c
|
|
||||||
strb r1, [r0, #0x1d]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_0803290C
|
|
||||||
sub_0803290C: @ 0x0803290C
|
|
||||||
push {lr}
|
|
||||||
bl sub_0806F4E8
|
|
||||||
pop {pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_08032914
|
|
||||||
sub_08032914: @ 0x08032914
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl sub_0806F3E4
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08032926
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0804A7D4
|
|
||||||
_08032926:
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_08032928
|
|
||||||
sub_08032928: @ 0x08032928
|
|
||||||
push {r4, r5, r6, lr}
|
|
||||||
adds r6, r0, #0
|
|
||||||
bl sub_0804A720
|
|
||||||
movs r4, #0
|
|
||||||
movs r5, #1
|
|
||||||
strb r5, [r6, #0xc]
|
|
||||||
strb r4, [r6, #0xf]
|
|
||||||
adds r0, r6, #0
|
|
||||||
movs r1, #1
|
|
||||||
bl sub_08049F84
|
|
||||||
strb r0, [r6, #0x15]
|
|
||||||
adds r0, r6, #0
|
|
||||||
adds r0, #0x80
|
|
||||||
strb r4, [r0]
|
|
||||||
adds r0, #1
|
|
||||||
strb r4, [r0]
|
|
||||||
strb r5, [r6, #0x1c]
|
|
||||||
adds r2, r6, #0
|
|
||||||
adds r2, #0x3c
|
|
||||||
ldrb r1, [r2]
|
|
||||||
movs r0, #0x10
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
adds r1, r6, #0
|
|
||||||
adds r1, #0x38
|
|
||||||
movs r0, #3
|
|
||||||
strb r0, [r1]
|
|
||||||
ldrb r1, [r6, #0x1b]
|
|
||||||
movs r0, #0x3f
|
|
||||||
ands r0, r1
|
|
||||||
movs r1, #0x40
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r6, #0x1b]
|
|
||||||
ldrh r1, [r6, #0x2e]
|
|
||||||
adds r0, r6, #0
|
|
||||||
adds r0, #0x78
|
|
||||||
strh r1, [r0]
|
|
||||||
ldrh r0, [r6, #0x32]
|
|
||||||
adds r1, r6, #0
|
|
||||||
adds r1, #0x7a
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r0, r6, #0
|
|
||||||
bl UpdateSpriteForCollisionLayer
|
|
||||||
adds r0, r6, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
pop {r4, r5, r6, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0803298C
|
|
||||||
sub_0803298C: @ 0x0803298C
|
|
||||||
push {r4, r5, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl sub_08032AB0
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl GetNextFrame
|
|
||||||
movs r0, #1
|
|
||||||
bl sub_08049DF4
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080329E2
|
|
||||||
ldr r5, _080329E4 @ =gUnk_020000B0
|
|
||||||
ldr r1, [r5]
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r2, #0x88
|
|
||||||
movs r3, #0x50
|
|
||||||
bl EntityInRectRadius
|
|
||||||
cmp r0, #0
|
|
||||||
beq _080329E2
|
|
||||||
ldr r0, [r5]
|
|
||||||
movs r2, #0x32
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
movs r2, #0x32
|
|
||||||
ldrsh r0, [r4, r2]
|
|
||||||
adds r0, #8
|
|
||||||
cmp r1, r0
|
|
||||||
ble _080329E2
|
|
||||||
movs r1, #0
|
|
||||||
movs r2, #2
|
|
||||||
strb r2, [r4, #0xc]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x84
|
|
||||||
strb r1, [r0]
|
|
||||||
movs r0, #0x10
|
|
||||||
strb r0, [r4, #0xe]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x81
|
|
||||||
strb r2, [r0]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
_080329E2:
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080329E4: .4byte gUnk_020000B0
|
|
||||||
|
|
||||||
thumb_func_start sub_080329E8
|
|
||||||
sub_080329E8: @ 0x080329E8
|
|
||||||
push {lr}
|
|
||||||
bl sub_08032B38
|
|
||||||
pop {pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_080329F0
|
|
||||||
sub_080329F0: @ 0x080329F0
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl CheckOnScreen
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032A3A
|
|
||||||
movs r0, #4
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
ldrb r1, [r4, #0x18]
|
|
||||||
subs r0, #8
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r4, #0x18]
|
|
||||||
ldrb r1, [r4, #0x10]
|
|
||||||
movs r0, #0x7f
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r4, #0x10]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x78
|
|
||||||
ldrh r0, [r0]
|
|
||||||
strh r0, [r4, #0x2e]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x7a
|
|
||||||
ldrh r0, [r0]
|
|
||||||
strh r0, [r4, #0x32]
|
|
||||||
ldrh r0, [r4, #0x36]
|
|
||||||
adds r0, #8
|
|
||||||
strh r0, [r4, #0x36]
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x29
|
|
||||||
ldrb r1, [r2]
|
|
||||||
movs r0, #0x39
|
|
||||||
rsbs r0, r0, #0
|
|
||||||
ands r0, r1
|
|
||||||
movs r1, #8
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
b _08032A46
|
|
||||||
_08032A3A:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_08032B10
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl GetNextFrame
|
|
||||||
_08032A46:
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_08032A48
|
|
||||||
sub_08032A48: @ 0x08032A48
|
|
||||||
push {r4, r5, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl CheckOnScreen
|
|
||||||
adds r5, r0, #0
|
|
||||||
cmp r5, #0
|
|
||||||
bne _08032AAE
|
|
||||||
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]
|
|
||||||
ldrb r1, [r4, #0x10]
|
|
||||||
movs r0, #0x7f
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r4, #0x10]
|
|
||||||
movs r0, #8
|
|
||||||
strb r0, [r4, #0xe]
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #1
|
|
||||||
bl sub_08049F84
|
|
||||||
strb r0, [r4, #0x15]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x80
|
|
||||||
strb r5, [r0]
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x29
|
|
||||||
ldrb r1, [r2]
|
|
||||||
movs r0, #0x39
|
|
||||||
rsbs r0, r0, #0
|
|
||||||
ands r0, r1
|
|
||||||
movs r1, #0x18
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x81
|
|
||||||
strb r5, [r0]
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x38
|
|
||||||
movs r0, #3
|
|
||||||
strb r0, [r1]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl UpdateSpriteForCollisionLayer
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
_08032AAE:
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_08032AB0
|
|
||||||
sub_08032AB0: @ 0x08032AB0
|
|
||||||
push {r4, r5, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldrb r0, [r4, #0xe]
|
|
||||||
subs r0, #1
|
|
||||||
strb r0, [r4, #0xe]
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032AF0
|
|
||||||
ldrb r0, [r4, #0x15]
|
|
||||||
adds r5, r4, #0
|
|
||||||
adds r5, #0x80
|
|
||||||
strb r0, [r5]
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #1
|
|
||||||
bl sub_08049F84
|
|
||||||
cmp r0, #0xff
|
|
||||||
beq _08032AD6
|
|
||||||
strb r0, [r4, #0x15]
|
|
||||||
_08032AD6:
|
|
||||||
movs r0, #8
|
|
||||||
strb r0, [r4, #0xe]
|
|
||||||
ldrb r2, [r5]
|
|
||||||
movs r0, #0x10
|
|
||||||
adds r1, r0, #0
|
|
||||||
ands r1, r2
|
|
||||||
ldrb r2, [r4, #0x15]
|
|
||||||
ands r0, r2
|
|
||||||
cmp r1, r0
|
|
||||||
beq _08032AF0
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
_08032AF0:
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08032AF4
|
|
||||||
sub_08032AF4: @ 0x08032AF4
|
|
||||||
push {lr}
|
|
||||||
ldrb r2, [r0, #0x15]
|
|
||||||
movs r1, #0x10
|
|
||||||
ands r1, r2
|
|
||||||
lsls r1, r1, #0x18
|
|
||||||
lsrs r1, r1, #0x1c
|
|
||||||
adds r2, r0, #0
|
|
||||||
adds r2, #0x81
|
|
||||||
ldrb r2, [r2]
|
|
||||||
adds r1, r1, r2
|
|
||||||
bl InitializeAnimation
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08032B10
|
|
||||||
sub_08032B10: @ 0x08032B10
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
bl LinearMoveUpdate
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x38
|
|
||||||
movs r0, #3
|
|
||||||
strb r0, [r1]
|
|
||||||
ldrb r2, [r4, #0x1b]
|
|
||||||
movs r1, #0x3f
|
|
||||||
adds r0, r1, #0
|
|
||||||
ands r0, r2
|
|
||||||
movs r2, #0x40
|
|
||||||
orrs r0, r2
|
|
||||||
strb r0, [r4, #0x1b]
|
|
||||||
ldrb r0, [r4, #0x19]
|
|
||||||
ands r1, r0
|
|
||||||
orrs r1, r2
|
|
||||||
strb r1, [r4, #0x19]
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_08032B38
|
|
||||||
sub_08032B38: @ 0x08032B38
|
|
||||||
push {r4, r5, r6, lr}
|
|
||||||
adds r5, r0, #0
|
|
||||||
adds r2, r5, #0
|
|
||||||
adds r2, #0x84
|
|
||||||
ldrb r0, [r2]
|
|
||||||
cmp r0, #1
|
|
||||||
beq _08032B88
|
|
||||||
cmp r0, #1
|
|
||||||
bgt _08032B50
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08032B56
|
|
||||||
b _08032C6A
|
|
||||||
_08032B50:
|
|
||||||
cmp r0, #2
|
|
||||||
beq _08032BB2
|
|
||||||
b _08032C6A
|
|
||||||
_08032B56:
|
|
||||||
ldrb r1, [r5, #0xe]
|
|
||||||
movs r3, #1
|
|
||||||
adds r0, r3, #0
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08032B68
|
|
||||||
ldrh r0, [r5, #0x36]
|
|
||||||
subs r0, #1
|
|
||||||
strh r0, [r5, #0x36]
|
|
||||||
_08032B68:
|
|
||||||
subs r0, r1, #1
|
|
||||||
strb r0, [r5, #0xe]
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032C6A
|
|
||||||
strb r3, [r2]
|
|
||||||
movs r0, #0x18
|
|
||||||
strb r0, [r5, #0xe]
|
|
||||||
ldrb r0, [r5, #0x10]
|
|
||||||
movs r1, #0x80
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r5, #0x10]
|
|
||||||
adds r1, r5, #0
|
|
||||||
adds r1, #0x81
|
|
||||||
movs r0, #2
|
|
||||||
b _08032BA8
|
|
||||||
_08032B88:
|
|
||||||
ldrb r0, [r5, #0xe]
|
|
||||||
subs r0, #1
|
|
||||||
strb r0, [r5, #0xe]
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032C6A
|
|
||||||
movs r0, #2
|
|
||||||
strb r0, [r2]
|
|
||||||
movs r0, #8
|
|
||||||
strb r0, [r5, #0xe]
|
|
||||||
movs r0, #0xe0
|
|
||||||
lsls r0, r0, #1
|
|
||||||
strh r0, [r5, #0x24]
|
|
||||||
adds r1, r5, #0
|
|
||||||
adds r1, #0x81
|
|
||||||
movs r0, #4
|
|
||||||
_08032BA8:
|
|
||||||
strb r0, [r1]
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
b _08032C6A
|
|
||||||
_08032BB2:
|
|
||||||
adds r1, r5, #0
|
|
||||||
adds r1, #0x82
|
|
||||||
ldrh r0, [r1]
|
|
||||||
subs r0, #1
|
|
||||||
movs r3, #0
|
|
||||||
strh r0, [r1]
|
|
||||||
lsls r0, r0, #0x10
|
|
||||||
adds r6, r1, #0
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032BF4
|
|
||||||
movs r0, #3
|
|
||||||
strb r0, [r5, #0xc]
|
|
||||||
strb r3, [r2]
|
|
||||||
strb r3, [r5, #0xe]
|
|
||||||
movs r0, #0xc0
|
|
||||||
lsls r0, r0, #1
|
|
||||||
strh r0, [r5, #0x24]
|
|
||||||
ldrb r2, [r5, #0x15]
|
|
||||||
adds r0, r2, #0
|
|
||||||
adds r0, #0x18
|
|
||||||
movs r1, #0x10
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08032BEC
|
|
||||||
movs r0, #0x10
|
|
||||||
subs r0, r0, r2
|
|
||||||
movs r1, #0x1f
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r5, #0x15]
|
|
||||||
_08032BEC:
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl sub_08032AF4
|
|
||||||
b _08032C64
|
|
||||||
_08032BF4:
|
|
||||||
ldrb r0, [r5, #0xe]
|
|
||||||
subs r0, #1
|
|
||||||
strb r0, [r5, #0xe]
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08032C64
|
|
||||||
movs r0, #8
|
|
||||||
strb r0, [r5, #0xe]
|
|
||||||
ldrb r0, [r5, #0x15]
|
|
||||||
adds r4, r5, #0
|
|
||||||
adds r4, #0x80
|
|
||||||
strb r0, [r4]
|
|
||||||
adds r0, r5, #0
|
|
||||||
movs r1, #1
|
|
||||||
bl sub_08049F84
|
|
||||||
adds r1, r0, #0
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl sub_08004596
|
|
||||||
ldrb r3, [r5, #0x15]
|
|
||||||
adds r0, r3, #0
|
|
||||||
adds r0, #0x18
|
|
||||||
movs r1, #0x10
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08032C46
|
|
||||||
ldrb r0, [r4]
|
|
||||||
cmp r0, #0x10
|
|
||||||
bne _08032C3E
|
|
||||||
ands r3, r0
|
|
||||||
cmp r3, #0
|
|
||||||
beq _08032C3A
|
|
||||||
movs r0, #0x12
|
|
||||||
b _08032C3C
|
|
||||||
_08032C3A:
|
|
||||||
movs r0, #0xe
|
|
||||||
_08032C3C:
|
|
||||||
strb r0, [r4]
|
|
||||||
_08032C3E:
|
|
||||||
ldrb r0, [r4]
|
|
||||||
strb r0, [r5, #0x15]
|
|
||||||
movs r0, #1
|
|
||||||
strh r0, [r6]
|
|
||||||
_08032C46:
|
|
||||||
ldrb r2, [r4]
|
|
||||||
movs r0, #0x10
|
|
||||||
adds r1, r0, #0
|
|
||||||
ands r1, r2
|
|
||||||
lsls r1, r1, #0x18
|
|
||||||
ldrb r2, [r5, #0x15]
|
|
||||||
ands r0, r2
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
lsrs r2, r0, #0x1c
|
|
||||||
cmp r1, r0
|
|
||||||
beq _08032C64
|
|
||||||
adds r1, r2, #4
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl InitializeAnimation
|
|
||||||
_08032C64:
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl sub_08032B10
|
|
||||||
_08032C6A:
|
|
||||||
adds r0, r5, #0
|
|
||||||
bl GetNextFrame
|
|
||||||
pop {r4, r5, r6, pc}
|
|
||||||
.align 2, 0
|
|
|
@ -1,25 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
.align 2
|
|
||||||
|
|
||||||
gUnk_080CE978:: @ 080CE978
|
|
||||||
.4byte sub_08032810
|
|
||||||
.4byte sub_08032844
|
|
||||||
.4byte sub_08001324
|
|
||||||
.4byte sub_0804A7D4
|
|
||||||
.4byte sub_08001242
|
|
||||||
.4byte sub_080328B8
|
|
||||||
|
|
||||||
gUnk_080CE990:: @ 080CE990
|
|
||||||
.4byte sub_08032928
|
|
||||||
.4byte sub_0803298C
|
|
||||||
.4byte sub_080329E8
|
|
||||||
.4byte sub_080329F0
|
|
||||||
.4byte sub_08032A48
|
|
||||||
|
|
||||||
gUnk_080CE9A4:: @ 080CE9A4
|
|
||||||
.4byte sub_08032900
|
|
||||||
.4byte sub_0803290C
|
|
||||||
.4byte sub_08032914
|
|
|
@ -370,7 +370,7 @@ SECTIONS {
|
||||||
src/enemy/acroBandits.o(.text);
|
src/enemy/acroBandits.o(.text);
|
||||||
src/enemy/bladeTrap.o(.text);
|
src/enemy/bladeTrap.o(.text);
|
||||||
src/enemy/keaton.o(.text);
|
src/enemy/keaton.o(.text);
|
||||||
asm/enemy/crow.o(.text);
|
src/enemy/crow.o(.text);
|
||||||
asm/enemy/mulldozer.o(.text);
|
asm/enemy/mulldozer.o(.text);
|
||||||
src/enemy/bombarossa.o(.text);
|
src/enemy/bombarossa.o(.text);
|
||||||
src/enemy/wisp.o(.text);
|
src/enemy/wisp.o(.text);
|
||||||
|
@ -1027,7 +1027,7 @@ SECTIONS {
|
||||||
data/animations/enemy/acroBandits.o(.rodata);
|
data/animations/enemy/acroBandits.o(.rodata);
|
||||||
data/const/enemy/keaton.o(.rodata);
|
data/const/enemy/keaton.o(.rodata);
|
||||||
data/animations/enemy/keaton.o(.rodata);
|
data/animations/enemy/keaton.o(.rodata);
|
||||||
data/const/enemy/crow.o(.rodata);
|
src/enemy/crow.o(.rodata);
|
||||||
data/animations/enemy/crow.o(.rodata);
|
data/animations/enemy/crow.o(.rodata);
|
||||||
data/const/enemy/mulldozer.o(.rodata);
|
data/const/enemy/mulldozer.o(.rodata);
|
||||||
data/animations/enemy/mulldozer.o(.rodata);
|
data/animations/enemy/mulldozer.o(.rodata);
|
||||||
|
|
|
@ -0,0 +1,284 @@
|
||||||
|
#define NENT_DEPRECATED
|
||||||
|
#include "entity.h"
|
||||||
|
#include "enemy.h"
|
||||||
|
#include "functions.h"
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
Entity base;
|
||||||
|
u8 filler[0x10];
|
||||||
|
s16 unk_78;
|
||||||
|
s16 unk_7a;
|
||||||
|
u32 filler2;
|
||||||
|
u8 unk_80;
|
||||||
|
u8 unk_81;
|
||||||
|
u16 unk_82;
|
||||||
|
u8 unk_84;
|
||||||
|
} CrowEntity;
|
||||||
|
|
||||||
|
void (*const gUnk_080CE978[])(Entity*);
|
||||||
|
void (*const gUnk_080CE990[])(CrowEntity*);
|
||||||
|
void (*const gUnk_080CE9A4[])(CrowEntity*);
|
||||||
|
extern Entity* gUnk_020000B0;
|
||||||
|
|
||||||
|
extern Entity* sub_08049DF4(u32);
|
||||||
|
|
||||||
|
void sub_08032AF4(CrowEntity* this);
|
||||||
|
void sub_08032AB0(CrowEntity* this);
|
||||||
|
void sub_08032B38(CrowEntity* this);
|
||||||
|
void sub_08032B10(CrowEntity* this);
|
||||||
|
|
||||||
|
void Crow(Entity* this) {
|
||||||
|
gUnk_080CE978[GetNextFunction(this)](this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032810(CrowEntity* this) {
|
||||||
|
gUnk_080CE990[super->action](this);
|
||||||
|
if (super->field_0xf) {
|
||||||
|
if (--super->field_0xf == 0) {
|
||||||
|
COLLISION_ON(super);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032844(CrowEntity* this) {
|
||||||
|
if (super->bitfield & 0x80) {
|
||||||
|
if ((super->bitfield & 0x3f) == 0) {
|
||||||
|
COLLISION_OFF(super);
|
||||||
|
super->field_0xf = 0x10;
|
||||||
|
if (DirectionIsHorizontal(DirectionRoundUp(super->direction)) == 0) {
|
||||||
|
if (DirectionIsVertical(super->direction)) {
|
||||||
|
super->direction += 2;
|
||||||
|
} else {
|
||||||
|
super->direction -= 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super->direction = 0x20 - super->direction;
|
||||||
|
sub_08032AF4(this);
|
||||||
|
} else {
|
||||||
|
u32 iframes = (u8)super->iframes & 0x80;
|
||||||
|
if (iframes == 0) {
|
||||||
|
super->health = iframes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GetNextFrame(super);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080328B8(CrowEntity* this) {
|
||||||
|
gUnk_080CE9A4[super->subAction](this);
|
||||||
|
GetNextFrame(super);
|
||||||
|
|
||||||
|
if (sub_0806F520(super))
|
||||||
|
return;
|
||||||
|
|
||||||
|
super->action = 2;
|
||||||
|
super->subAction = 0;
|
||||||
|
this->unk_84 = 2;
|
||||||
|
super->actionDelay = 8;
|
||||||
|
super->speed = 0x1c0;
|
||||||
|
sub_08032AF4(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032900(CrowEntity* this) {
|
||||||
|
super->subAction = 1;
|
||||||
|
super->field_0x1d = 0x3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0803290C(CrowEntity* this) {
|
||||||
|
sub_0806F4E8(super);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032914(CrowEntity* this) {
|
||||||
|
if (sub_0806F3E4(super)) {
|
||||||
|
sub_0804A7D4(super);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032928(CrowEntity* this) {
|
||||||
|
sub_0804A720(super);
|
||||||
|
|
||||||
|
super->action = 1;
|
||||||
|
super->field_0xf = 0;
|
||||||
|
super->direction = sub_08049F84(super, 1);
|
||||||
|
this->unk_80 = 0;
|
||||||
|
this->unk_81 = 0;
|
||||||
|
super->field_0x1c = 1;
|
||||||
|
super->field_0x3c |= 0x10;
|
||||||
|
super->collisionLayer = 3;
|
||||||
|
super->spriteOrientation.flipY = 1;
|
||||||
|
this->unk_78 = super->x.HALF.HI;
|
||||||
|
this->unk_7a = super->y.HALF.HI;
|
||||||
|
UpdateSpriteForCollisionLayer(super);
|
||||||
|
sub_08032AF4(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_0803298C(CrowEntity* this) {
|
||||||
|
sub_08032AB0(this);
|
||||||
|
GetNextFrame(super);
|
||||||
|
|
||||||
|
if (sub_08049DF4(1) == NULL)
|
||||||
|
return;
|
||||||
|
if (EntityInRectRadius(super, gUnk_020000B0, 0x88, 0x50) == 0)
|
||||||
|
return;
|
||||||
|
if (gUnk_020000B0->y.HALF.HI <= super->y.HALF.HI + 8)
|
||||||
|
return;
|
||||||
|
|
||||||
|
super->action = 2;
|
||||||
|
this->unk_84 = 0;
|
||||||
|
super->actionDelay = 0x10;
|
||||||
|
this->unk_81 = 2;
|
||||||
|
sub_08032AF4(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080329E8(CrowEntity* this) {
|
||||||
|
sub_08032B38(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080329F0(CrowEntity* this) {
|
||||||
|
if (CheckOnScreen(super) == 0) {
|
||||||
|
super->action = 4;
|
||||||
|
super->spriteSettings.draw = 0;
|
||||||
|
COLLISION_OFF(super);
|
||||||
|
super->x.HALF.HI = this->unk_78;
|
||||||
|
super->y.HALF.HI = this->unk_7a;
|
||||||
|
super->z.HALF.HI += 8;
|
||||||
|
super->spritePriority.b1 = 1;
|
||||||
|
} else {
|
||||||
|
sub_08032B10(this);
|
||||||
|
GetNextFrame(super);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032A48(CrowEntity* this) {
|
||||||
|
if (CheckOnScreen(super))
|
||||||
|
return;
|
||||||
|
|
||||||
|
super->action = 1;
|
||||||
|
super->spriteSettings.draw = 1;
|
||||||
|
COLLISION_OFF(super);
|
||||||
|
super->actionDelay = 8;
|
||||||
|
super->direction = sub_08049F84(super, 1);
|
||||||
|
this->unk_80 = 0;
|
||||||
|
super->spritePriority.b1 = 3;
|
||||||
|
this->unk_81 = 0;
|
||||||
|
super->collisionLayer = 3;
|
||||||
|
UpdateSpriteForCollisionLayer(super);
|
||||||
|
sub_08032AF4(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032AB0(CrowEntity* this) {
|
||||||
|
u32 dir;
|
||||||
|
if (--super->actionDelay)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this->unk_80 = super->direction;
|
||||||
|
dir = sub_08049F84(super, 1);
|
||||||
|
if (dir != 0xff) {
|
||||||
|
super->direction = dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
super->actionDelay = 8;
|
||||||
|
if (DirectionIsVertical(this->unk_80) != DirectionIsVertical(super->direction)) {
|
||||||
|
sub_08032AF4(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032AF4(CrowEntity* this) {
|
||||||
|
InitializeAnimation(super, ((super->direction & 0x10) >> 4) + this->unk_81);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032B10(CrowEntity* this) {
|
||||||
|
LinearMoveUpdate(super);
|
||||||
|
|
||||||
|
super->collisionLayer = 3;
|
||||||
|
super->spriteOrientation.flipY = 1;
|
||||||
|
super->spriteRendering.b3 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08032B38(CrowEntity* this) {
|
||||||
|
u32 dir, dir2;
|
||||||
|
u32 temp;
|
||||||
|
switch (this->unk_84) {
|
||||||
|
case 0:
|
||||||
|
if (super->actionDelay & 1) {
|
||||||
|
super->z.HALF.HI--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (--super->actionDelay == 0) {
|
||||||
|
this->unk_84 = 1;
|
||||||
|
super->actionDelay = 0x18;
|
||||||
|
COLLISION_ON(super);
|
||||||
|
this->unk_81 = 2;
|
||||||
|
sub_08032AF4(this);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (--super->actionDelay == 0) {
|
||||||
|
this->unk_84 = 2;
|
||||||
|
super->actionDelay = 8;
|
||||||
|
super->speed = 0x1c0;
|
||||||
|
this->unk_81 = 4;
|
||||||
|
sub_08032AF4(this);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (--this->unk_82 == 0) {
|
||||||
|
super->action = 3;
|
||||||
|
this->unk_84 = 0;
|
||||||
|
super->actionDelay = 0;
|
||||||
|
super->speed = 0x180;
|
||||||
|
if ((super->direction + 0x18) & 0x10) {
|
||||||
|
super->direction = (0x10 - super->direction) & 0x1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub_08032AF4(this);
|
||||||
|
} else if (--super->actionDelay == 0) {
|
||||||
|
super->actionDelay = 8;
|
||||||
|
this->unk_80 = super->direction;
|
||||||
|
sub_08004596(super, sub_08049F84(super, 1));
|
||||||
|
|
||||||
|
if ((super->direction + 0x18) & 0x10) {
|
||||||
|
if (this->unk_80 == 0x10) {
|
||||||
|
if (super->direction & this->unk_80) {
|
||||||
|
this->unk_80 = 0x12;
|
||||||
|
} else {
|
||||||
|
this->unk_80 = 0xe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super->direction = this->unk_80;
|
||||||
|
this->unk_82 = 1;
|
||||||
|
}
|
||||||
|
temp = this->unk_80 & 0x10;
|
||||||
|
|
||||||
|
dir = super->direction;
|
||||||
|
dir2 = super->direction >> 4;
|
||||||
|
|
||||||
|
if (((this->unk_80 & 0x10)) >> 4 != (((super->direction) & 0x10)) >> 4) {
|
||||||
|
InitializeAnimation(super, ((super->direction & 0x10) >> 4) + 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub_08032B10(this);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetNextFrame(super);
|
||||||
|
}
|
||||||
|
|
||||||
|
void (*const gUnk_080CE978[])(Entity*) = {
|
||||||
|
(EntityActionPtr)sub_08032810, (EntityActionPtr)sub_08032844, sub_08001324, sub_0804A7D4, sub_08001242,
|
||||||
|
(EntityActionPtr)sub_080328B8,
|
||||||
|
};
|
||||||
|
|
||||||
|
void (*const gUnk_080CE990[])(CrowEntity*) = {
|
||||||
|
sub_08032928, sub_0803298C, sub_080329E8, sub_080329F0, sub_08032A48,
|
||||||
|
};
|
||||||
|
|
||||||
|
void (*const gUnk_080CE9A4[])(CrowEntity*) = {
|
||||||
|
sub_08032900,
|
||||||
|
sub_0803290C,
|
||||||
|
sub_08032914,
|
||||||
|
};
|
Loading…
Reference in New Issue