Merge pull request #89 from HookedBehemoth:more_enemies

More enemies
This commit is contained in:
notyouraveragehooman
2020-09-28 21:15:37 -07:00
committed by GitHub
93 changed files with 6070 additions and 10802 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# The Legend of Zelda: The Minish Cap
**Progress:** [⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜] 10%
**Progress:** [⬛⬛⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜] 20%
```diff
- WARNING! -
-784
View File
@@ -1,784 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Bobomb
Bobomb: @ 0x0802C660
push {lr}
ldr r1, _0802C66C @ =gUnk_080CD5D4
bl EnemyFunctionHandler
pop {pc}
.align 2, 0
_0802C66C: .4byte gUnk_080CD5D4
thumb_func_start sub_0802C670
sub_0802C670: @ 0x0802C670
push {lr}
ldr r2, _0802C684 @ =gUnk_080CD5EC
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802C684: .4byte gUnk_080CD5EC
thumb_func_start sub_0802C688
sub_0802C688: @ 0x0802C688
push {r4, lr}
adds r4, r0, #0
adds r0, #0x41
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
bne _0802C69A
b _0802C79E
_0802C69A:
movs r0, #0x7f
ands r0, r1
cmp r0, #0x16
bhi _0802C740
lsls r0, r0, #2
ldr r1, _0802C6AC @ =_0802C6B0
adds r0, r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0802C6AC: .4byte _0802C6B0
_0802C6B0: @ jump table
.4byte _0802C70C @ case 0
.4byte _0802C70C @ case 1
.4byte _0802C740 @ case 2
.4byte _0802C740 @ case 3
.4byte _0802C740 @ case 4
.4byte _0802C740 @ case 5
.4byte _0802C740 @ case 6
.4byte _0802C740 @ case 7
.4byte _0802C740 @ case 8
.4byte _0802C740 @ case 9
.4byte _0802C740 @ case 10
.4byte _0802C740 @ case 11
.4byte _0802C740 @ case 12
.4byte _0802C740 @ case 13
.4byte _0802C72C @ case 14
.4byte _0802C740 @ case 15
.4byte _0802C740 @ case 16
.4byte _0802C740 @ case 17
.4byte _0802C740 @ case 18
.4byte _0802C740 @ case 19
.4byte _0802C72C @ case 20
.4byte _0802C72C @ case 21
.4byte _0802C72C @ case 22
_0802C70C:
adds r0, r4, #0
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #0
beq _0802C7A6
adds r1, r4, #0
adds r1, #0x42
movs r0, #0
strb r0, [r1]
ldr r0, _0802C728 @ =gPlayerEntity
adds r0, #0x42
movs r1, #4
strb r1, [r0]
b _0802C7A6
.align 2, 0
_0802C728: .4byte gPlayerEntity
_0802C72C:
movs r1, #0
movs r0, #3
strb r0, [r4, #0xc]
adds r0, r4, #0
adds r0, #0x42
strb r1, [r0]
adds r0, r4, #0
bl sub_0802CBC4
b _0802C7A6
_0802C740:
adds r2, r4, #0
adds r2, #0x82
ldrb r0, [r2]
adds r0, #1
strb r0, [r2]
adds r1, r4, #0
adds r1, #0x80
movs r0, #0x1c
strb r0, [r1]
ldrb r0, [r2]
cmp r0, #1
beq _0802C75E
cmp r0, #2
beq _0802C770
b _0802C79E
_0802C75E:
adds r0, r4, #0
bl sub_0802CB68
ldr r0, _0802C76C @ =0x0000014D
bl EnqueueSFX
b _0802C79E
.align 2, 0
_0802C76C: .4byte 0x0000014D
_0802C770:
movs r0, #3
strb r0, [r4, #0xc]
adds r1, r4, #0
adds r1, #0x3f
movs r0, #0x6e
strb r0, [r1]
movs r1, #1
strb r1, [r4, #0xf]
movs r0, #0xc0
lsls r0, r0, #9
str r0, [r4, #0x20]
movs r0, #0
strh r0, [r4, #0x24]
adds r0, r4, #0
adds r0, #0x81
strb r1, [r0]
ldrb r1, [r4, #0x15]
lsrs r1, r1, #4
movs r0, #6
orrs r1, r0
adds r0, r4, #0
bl InitializeAnimation
_0802C79E:
ldr r1, _0802C7A8 @ =gUnk_080CD5D4
adds r0, r4, #0
bl sub_0804AA30
_0802C7A6:
pop {r4, pc}
.align 2, 0
_0802C7A8: .4byte gUnk_080CD5D4
thumb_func_start sub_0802C7AC
sub_0802C7AC: @ 0x0802C7AC
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xd]
cmp r0, #2
bhi _0802C7F6
adds r0, r4, #0
bl sub_0806F520
adds r1, r0, #0
cmp r1, #0
bne _0802C7F6
strb r1, [r4, #0xd]
movs r0, #1
strb r0, [r4, #0xf]
strh r1, [r4, #0x36]
adds r0, r4, #0
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #2
beq _0802C7E2
movs r1, #0x80
cmp r0, #0
beq _0802C7E0
movs r0, #0x80
lsls r0, r0, #2
adds r1, r0, #0
_0802C7E0:
strh r1, [r4, #0x24]
_0802C7E2:
movs r0, #0xc0
lsls r0, r0, #9
str r0, [r4, #0x20]
adds r0, r4, #0
adds r0, #0x83
movs r1, #0
strb r1, [r0]
subs r0, #2
strb r1, [r0]
b _0802C816
_0802C7F6:
ldr r0, _0802C818 @ =0x0000FFFF
strh r0, [r4, #0x36]
ldr r1, _0802C81C @ =gUnk_080CD600
ldrb r0, [r4, #0xd]
lsls r0, r0, #2
adds r0, r0, r1
ldr r1, [r0]
adds r0, r4, #0
bl _call_via_r1
ldrb r0, [r4, #0xe]
cmp r0, #0
beq _0802C816
adds r0, r4, #0
bl GetNextFrame
_0802C816:
pop {r4, pc}
.align 2, 0
_0802C818: .4byte 0x0000FFFF
_0802C81C: .4byte gUnk_080CD600
thumb_func_start sub_0802C820
sub_0802C820: @ 0x0802C820
movs r1, #1
strb r1, [r0, #0xd]
movs r1, #0x3c
strb r1, [r0, #0x1d]
bx lr
.align 2, 0
thumb_func_start sub_0802C82C
sub_0802C82C: @ 0x0802C82C
push {lr}
bl sub_0806F4E8
pop {pc}
thumb_func_start sub_0802C834
sub_0802C834: @ 0x0802C834
push {lr}
bl sub_0806F3E4
pop {pc}
thumb_func_start sub_0802C83C
sub_0802C83C: @ 0x0802C83C
push {r4, lr}
adds r4, r0, #0
adds r1, r4, #0
adds r1, #0x82
ldrb r0, [r1]
cmp r0, #0
beq _0802C88C
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802C884
movs r0, #3
strb r0, [r4, #0xc]
ldr r0, _0802C86C @ =gPlayerEntity
ldrb r0, [r0, #0x14]
movs r1, #6
ands r1, r0
cmp r1, #2
beq _0802C870
cmp r1, #6
beq _0802C876
b _0802C87C
.align 2, 0
_0802C86C: .4byte gPlayerEntity
_0802C870:
ldrh r0, [r4, #0x2e]
subs r0, #6
b _0802C87A
_0802C876:
ldrh r0, [r4, #0x2e]
adds r0, #6
_0802C87A:
strh r0, [r4, #0x2e]
_0802C87C:
adds r0, r4, #0
bl sub_0802CBC4
b _0802C8B2
_0802C884:
adds r0, r4, #0
bl sub_0802CC18
b _0802C8A2
_0802C88C:
movs r0, #2
strb r0, [r1]
movs r0, #0x78
strb r0, [r4, #0xe]
ldrb r1, [r4, #0x15]
lsrs r1, r1, #4
movs r0, #6
orrs r1, r0
adds r0, r4, #0
bl InitializeAnimation
_0802C8A2:
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
adds r1, r4, #0
adds r1, #0x3f
movs r0, #0x6e
strb r0, [r1]
_0802C8B2:
pop {r4, pc}
thumb_func_start nullsub_149
nullsub_149: @ 0x0802C8B4
bx lr
.align 2, 0
thumb_func_start sub_0802C8B8
sub_0802C8B8: @ 0x0802C8B8
push {lr}
movs r1, #3
strb r1, [r0, #0xc]
bl sub_0802CBC4
pop {pc}
thumb_func_start sub_0802C8C4
sub_0802C8C4: @ 0x0802C8C4
push {r4, lr}
adds r4, r0, #0
bl sub_0804A7D4
ldrb r1, [r4, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
strb r0, [r4, #0x18]
pop {r4, pc}
thumb_func_start sub_0802C8D8
sub_0802C8D8: @ 0x0802C8D8
push {r4, r5, lr}
adds r5, r0, #0
movs r4, #0
movs r0, #1
strb r0, [r5, #0xc]
movs r0, #0x3c
strb r0, [r5, #0xe]
strb r4, [r5, #0xf]
bl Random
movs r1, #0x18
ands r0, r1
movs r1, #4
orrs r0, r1
strb r0, [r5, #0x15]
strb r4, [r5, #0x16]
movs r0, #0x12
strb r0, [r5, #0x1c]
adds r0, r5, #0
adds r0, #0x82
strb r4, [r0]
adds r0, #1
strb r4, [r0]
subs r0, #3
strb r4, [r0]
adds r0, #1
strb r4, [r0]
ldrb r1, [r5, #0x15]
lsrs r1, r1, #4
adds r0, r5, #0
bl InitializeAnimation
pop {r4, r5, pc}
.align 2, 0
thumb_func_start sub_0802C91C
sub_0802C91C: @ 0x0802C91C
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
bl ProcessMovement
adds r0, r4, #0
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #0
beq _0802C97A
ldrh r0, [r4, #0x2a]
cmp r0, #0
beq _0802C950
adds r1, r0, #0
adds r0, r4, #0
bl sub_0800417E
ldrb r1, [r4, #0x15]
lsrs r1, r1, #4
movs r0, #2
orrs r1, r0
adds r0, r4, #0
bl InitializeAnimation
_0802C950:
ldrb r0, [r4, #0xe]
subs r1, r0, #1
strb r1, [r4, #0xe]
lsls r0, r1, #0x18
cmp r0, #0
bne _0802C964
adds r0, r4, #0
bl sub_0802CBC4
b _0802C9B4
_0802C964:
movs r0, #0xf
ands r1, r0
cmp r1, #8
bne _0802C972
adds r0, r4, #0
bl CreateDustSmall
_0802C972:
adds r0, r4, #0
bl sub_0802CC18
b _0802C9B4
_0802C97A:
ldrh r0, [r4, #0x2a]
cmp r0, #0
beq _0802C992
adds r1, r0, #0
adds r0, r4, #0
bl sub_0800417E
ldrb r1, [r4, #0x15]
lsrs r1, r1, #4
adds r0, r4, #0
bl InitializeAnimation
_0802C992:
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802C9B4
movs r0, #0x3c
strb r0, [r4, #0xe]
ldrb r1, [r4, #0x15]
adds r1, #8
movs r0, #0x1c
ands r1, r0
strb r1, [r4, #0x15]
lsrs r1, r1, #4
adds r0, r4, #0
bl InitializeAnimation
_0802C9B4:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802C9B8
sub_0802C9B8: @ 0x0802C9B8
push {lr}
ldr r2, _0802C9CC @ =gUnk_080CD618
ldrb r1, [r0, #0xd]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802C9CC: .4byte gUnk_080CD618
thumb_func_start sub_0802C9D0
sub_0802C9D0: @ 0x0802C9D0
push {r4, lr}
adds r4, r0, #0
movs r2, #1
strb r2, [r4, #0xd]
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
adds r3, r4, #0
adds r3, #0x29
ldrb r1, [r3]
movs r0, #0x39
rsbs r0, r0, #0
ands r0, r1
strb r0, [r3]
adds r0, r4, #0
adds r0, #0x83
strb r2, [r0]
adds r0, r4, #0
bl sub_0802CC18
ldrb r1, [r4, #0x15]
lsrs r1, r1, #4
movs r0, #6
orrs r1, r0
adds r0, r4, #0
bl InitializeAnimation
adds r0, r4, #0
bl GetNextFrame
pop {r4, pc}
thumb_func_start sub_0802CA10
sub_0802CA10: @ 0x0802CA10
push {r4, lr}
adds r4, r0, #0
ldr r0, _0802CA30 @ =gPlayerState
ldrb r0, [r0, #5]
cmp r0, #5
beq _0802CA42
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802CA34
adds r0, r4, #0
bl sub_0802CBC4
b _0802CA66
.align 2, 0
_0802CA30: .4byte gPlayerState
_0802CA34:
adds r0, r4, #0
bl sub_0802CC18
adds r0, r4, #0
bl GetNextFrame
b _0802CA66
_0802CA42:
adds r1, r4, #0
adds r1, #0x83
movs r0, #2
strb r0, [r1]
ldr r0, _0802CA68 @ =gPlayerEntity
ldrb r0, [r0, #0x14]
lsls r0, r0, #2
movs r1, #4
orrs r0, r1
movs r1, #0x1c
ands r0, r1
strb r0, [r4, #0x15]
adds r0, r4, #0
bl sub_0802CC18
adds r0, r4, #0
bl GetNextFrame
_0802CA66:
pop {r4, pc}
.align 2, 0
_0802CA68: .4byte gPlayerEntity
thumb_func_start sub_0802CA6C
sub_0802CA6C: @ 0x0802CA6C
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802CA84
adds r0, r4, #0
bl sub_0802CBC4
b _0802CA90
_0802CA84:
adds r0, r4, #0
bl sub_0802CC18
adds r0, r4, #0
bl GetNextFrame
_0802CA90:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802CA94
sub_0802CA94: @ 0x0802CA94
push {lr}
adds r3, r0, #0
movs r2, #0
movs r0, #3
strb r0, [r3, #0xc]
ldrb r1, [r3, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r3, #0x10]
movs r0, #1
strb r0, [r3, #0xf]
movs r0, #0x29
adds r0, r0, r3
mov ip, r0
ldrb r1, [r0]
movs r0, #0x39
rsbs r0, r0, #0
ands r0, r1
movs r1, #8
orrs r0, r1
mov r1, ip
strb r0, [r1]
movs r0, #0xc0
lsls r0, r0, #9
str r0, [r3, #0x20]
movs r0, #0
strh r2, [r3, #0x24]
adds r1, r3, #0
adds r1, #0x83
strb r0, [r1]
subs r1, #2
strb r0, [r1]
ldr r0, _0802CAF4 @ =gPlayerEntity
ldrb r1, [r0, #0x14]
lsls r1, r1, #2
movs r0, #4
orrs r1, r0
movs r0, #0x1c
ands r1, r0
strb r1, [r3, #0x15]
lsrs r1, r1, #4
movs r0, #6
orrs r1, r0
adds r0, r3, #0
bl InitializeAnimation
pop {pc}
.align 2, 0
_0802CAF4: .4byte gPlayerEntity
thumb_func_start sub_0802CAF8
sub_0802CAF8: @ 0x0802CAF8
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802CB10
adds r0, r4, #0
bl sub_0802CBC4
b _0802CB62
_0802CB10:
adds r0, r4, #0
adds r0, #0x81
ldrb r0, [r0]
cmp r0, #0
beq _0802CB30
movs r1, #0xa0
lsls r1, r1, #6
adds r0, r4, #0
bl sub_080044EC
cmp r0, #1
bne _0802CB30
movs r0, #0x82
lsls r0, r0, #1
bl EnqueueSFX
_0802CB30:
adds r0, r4, #0
bl sub_0802CC18
adds r0, r4, #0
bl sub_08078930
ldrb r0, [r4, #0xf]
cmp r0, #0
beq _0802CB5C
movs r1, #0x36
ldrsh r0, [r4, r1]
cmp r0, #0
bne _0802CB5C
strb r0, [r4, #0xf]
ldrb r0, [r4, #0x10]
movs r1, #0x80
orrs r1, r0
strb r1, [r4, #0x10]
adds r1, r4, #0
adds r1, #0x3f
movs r0, #0x6e
strb r0, [r1]
_0802CB5C:
adds r0, r4, #0
bl GetNextFrame
_0802CB62:
pop {r4, pc}
thumb_func_start nullsub_150
nullsub_150: @ 0x0802CB64
bx lr
.align 2, 0
thumb_func_start sub_0802CB68
sub_0802CB68: @ 0x0802CB68
push {r4, r5, lr}
adds r5, r0, #0
movs r4, #0
movs r1, #0
movs r0, #1
strb r0, [r5, #0xc]
strb r1, [r5, #0xd]
bl Random
adds r2, r0, #0
movs r0, #0x18
ands r2, r0
movs r0, #4
orrs r2, r0
orrs r2, r4
strb r2, [r5, #0x15]
ldrb r0, [r5, #0x10]
movs r1, #0x80
orrs r0, r1
strb r0, [r5, #0x10]
adds r0, r5, #0
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #0
beq _0802CBB2
movs r0, #0xc8
strb r0, [r5, #0xe]
movs r0, #0x80
lsls r0, r0, #2
strh r0, [r5, #0x24]
lsrs r1, r2, #4
movs r0, #2
orrs r1, r0
adds r0, r5, #0
bl InitializeAnimation
b _0802CBC2
_0802CBB2:
movs r0, #0x3c
strb r0, [r5, #0xe]
movs r0, #0x80
strh r0, [r5, #0x24]
lsrs r1, r2, #4
adds r0, r5, #0
bl InitializeAnimation
_0802CBC2:
pop {r4, r5, pc}
thumb_func_start sub_0802CBC4
sub_0802CBC4: @ 0x0802CBC4
push {r4, lr}
adds r4, r0, #0
movs r2, #0
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, #0x45
strb r2, [r0]
adds r0, #0x3e
ldrb r0, [r0]
cmp r0, #0
beq _0802CBF0
bl sub_08079184
_0802CBF0:
adds r0, r4, #0
bl sub_08078954
adds r0, r4, #0
movs r1, #0x20
movs r2, #0
movs r3, #0
bl CreateObjectWithParent
adds r2, r0, #0
cmp r2, #0
beq _0802CC14
adds r0, r4, #0
adds r0, #0x38
ldrb r1, [r0]
adds r0, r2, #0
adds r0, #0x38
strb r1, [r0]
_0802CC14:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802CC18
sub_0802CC18: @ 0x0802CC18
push {lr}
adds r1, r0, #0
adds r1, #0x80
ldrb r0, [r1]
subs r0, #1
strb r0, [r1]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802CC34
movs r0, #0x1c
strb r0, [r1]
ldr r0, _0802CC38 @ =0x0000014D
bl EnqueueSFX
_0802CC34:
pop {pc}
.align 2, 0
_0802CC38: .4byte 0x0000014D
-1319
View File
File diff suppressed because it is too large Load Diff
-1281
View File
File diff suppressed because it is too large Load Diff
-159
View File
@@ -1,159 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Chaser
Chaser: @ 0x0802B4D8
push {r4, r5, lr}
adds r5, r0, #0
bl sub_080012DC
adds r1, r0, #0
cmp r1, #0
beq _0802B4FC
ldr r0, _0802B4F8 @ =gUnk_080012C8
lsls r1, r1, #2
adds r1, r1, r0
ldr r1, [r1]
adds r0, r5, #0
bl _call_via_r1
b _0802B510
.align 2, 0
_0802B4F8: .4byte gUnk_080012C8
_0802B4FC:
ldr r4, _0802B514 @ =gUnk_080CD27C
adds r0, r5, #0
bl GetNextFunction
lsls r0, r0, #2
adds r0, r0, r4
ldr r1, [r0]
adds r0, r5, #0
bl _call_via_r1
_0802B510:
pop {r4, r5, pc}
.align 2, 0
_0802B514: .4byte gUnk_080CD27C
thumb_func_start sub_0802B518
sub_0802B518: @ 0x0802B518
push {lr}
ldr r2, _0802B52C @ =gUnk_080CD298
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802B52C: .4byte gUnk_080CD298
thumb_func_start sub_0802B530
sub_0802B530: @ 0x0802B530
push {lr}
movs r1, #1
strb r1, [r0, #0xc]
movs r1, #0
bl InitializeAnimation
pop {pc}
.align 2, 0
thumb_func_start sub_0802B540
sub_0802B540: @ 0x0802B540
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
cmp r0, #0
beq _0802B550
subs r0, #1
strb r0, [r4, #0xe]
b _0802B56A
_0802B550:
adds r0, r4, #0
movs r1, #1
movs r2, #0xc
bl sub_0804A024
adds r1, r0, #0
cmp r1, #0xff
beq _0802B56A
movs r0, #2
strb r0, [r4, #0xc]
movs r0, #0x40
strh r0, [r4, #0x24]
strb r1, [r4, #0x15]
_0802B56A:
pop {r4, pc}
thumb_func_start sub_0802B56C
sub_0802B56C: @ 0x0802B56C
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
adds r0, #0x41
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
beq _0802B586
movs r0, #0x40
strh r0, [r4, #0x24]
_0802B586:
adds r0, r4, #0
bl sub_080AF038
cmp r0, #0
beq _0802B5B8
adds r0, r4, #0
adds r0, #0x58
ldrb r0, [r0]
cmp r0, #1
beq _0802B5A2
adds r0, r4, #0
movs r1, #1
bl InitializeAnimation
_0802B5A2:
ldrh r2, [r4, #0x24]
movs r0, #0x24
ldrsh r1, [r4, r0]
ldr r0, _0802B5B4 @ =0x0000021F
cmp r1, r0
bgt _0802B5C4
adds r0, r2, #4
strh r0, [r4, #0x24]
b _0802B5C4
.align 2, 0
_0802B5B4: .4byte 0x0000021F
_0802B5B8:
movs r0, #3
strb r0, [r4, #0xc]
adds r0, r4, #0
movs r1, #2
bl InitializeAnimation
_0802B5C4:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802B5C8
sub_0802B5C8: @ 0x0802B5C8
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
adds r0, #0x5a
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
beq _0802B5EE
movs r0, #1
strb r0, [r4, #0xc]
movs r0, #0x1e
strb r0, [r4, #0xe]
adds r0, r4, #0
movs r1, #0
bl InitializeAnimation
_0802B5EE:
pop {r4, pc}
-579
View File
@@ -1,579 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start FallingBoulder
FallingBoulder: @ 0x0802C228
push {lr}
ldr r1, _0802C234 @ =gUnk_080CD540
bl EnemyFunctionHandler
pop {pc}
.align 2, 0
_0802C234: .4byte gUnk_080CD540
thumb_func_start sub_0802C238
sub_0802C238: @ 0x0802C238
push {lr}
ldr r2, _0802C24C @ =gUnk_080CD558
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802C24C: .4byte gUnk_080CD558
thumb_func_start sub_0802C250
sub_0802C250: @ 0x0802C250
bx lr
.align 2, 0
thumb_func_start sub_0802C254
sub_0802C254: @ 0x0802C254
bx lr
.align 2, 0
thumb_func_start sub_0802C258
sub_0802C258: @ 0x0802C258
push {r4, r5, lr}
adds r4, r0, #0
bl sub_0804A720
movs r0, #0x80
lsls r0, r0, #0xa
str r0, [r4, #0x20]
movs r0, #2
strb r0, [r4, #0xe]
bl Random
adds r2, r0, #0
movs r0, #0x70
ands r2, r0
adds r3, r4, #0
adds r3, #0x7a
movs r1, #0
strh r2, [r3]
ldrb r0, [r4, #0xa]
cmp r0, #1
beq _0802C288
cmp r0, #2
beq _0802C290
b _0802C29C
_0802C288:
movs r0, #0x80
lsls r0, r0, #1
adds r1, r0, #0
b _0802C296
_0802C290:
movs r5, #0x80
lsls r5, r5, #2
adds r1, r5, #0
_0802C296:
adds r0, r2, #0
orrs r0, r1
strh r0, [r3]
_0802C29C:
ldrh r1, [r4, #0x2e]
adds r0, r4, #0
adds r0, #0x80
movs r2, #0
strh r1, [r0]
ldrh r0, [r4, #0x32]
adds r1, r4, #0
adds r1, #0x82
strh r0, [r1]
ldr r0, _0802C310 @ =0x0000FFF0
strh r0, [r4, #0x36]
subs r1, #0x4a
movs r0, #3
strb r0, [r1]
ldrb r1, [r4, #0x19]
movs r0, #0x3f
ands r0, r1
movs r1, #0x40
orrs r0, r1
strb r0, [r4, #0x19]
adds r3, r4, #0
adds r3, #0x29
ldrb r1, [r3]
movs r0, #8
rsbs r0, r0, #0
ands r0, r1
movs r1, #2
orrs r0, r1
strb r0, [r3]
adds r0, r4, #0
adds r0, #0x7c
strh r2, [r0]
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, _0802C314 @ =gRoomControls
ldrh r0, [r2, #6]
subs r1, r1, r0
asrs r1, r1, #4
movs r3, #0x3f
ands r1, r3
movs r5, #0x32
ldrsh r0, [r4, r5]
ldrh r2, [r2, #8]
subs r0, r0, r2
asrs r0, r0, #4
ands r0, r3
lsls r0, r0, #6
orrs r1, r0
adds r0, r4, #0
adds r0, #0x7e
strh r1, [r0]
adds r0, r4, #0
bl sub_0802C62C
adds r0, r4, #0
bl sub_0802C4B0
pop {r4, r5, pc}
.align 2, 0
_0802C310: .4byte 0x0000FFF0
_0802C314: .4byte gRoomControls
thumb_func_start sub_0802C318
sub_0802C318: @ 0x0802C318
push {lr}
adds r2, r0, #0
adds r1, r2, #0
adds r1, #0x7a
ldrh r0, [r1]
subs r0, #1
strh r0, [r1]
lsls r0, r0, #0x10
cmp r0, #0
bne _0802C330
movs r0, #2
strb r0, [r2, #0xc]
_0802C330:
pop {pc}
.align 2, 0
thumb_func_start sub_0802C334
sub_0802C334: @ 0x0802C334
push {r4, r5, r6, r7, lr}
adds r4, r0, #0
adds r3, r4, #0
adds r3, #0x7c
ldrh r0, [r3]
cmp r0, #0
bne _0802C36A
ldr r0, _0802C3C4 @ =gRoomControls
ldrh r1, [r0, #8]
ldr r2, _0802C3C8 @ =gPlayerEntity
cmp r2, #0
bne _0802C34E
b _0802C4AA
_0802C34E:
movs r5, #0x32
ldrsh r0, [r2, r5]
subs r0, r0, r1
cmp r0, #0x38
bhi _0802C35A
b _0802C4AA
_0802C35A:
movs r0, #1
strh r0, [r3]
ldrb r1, [r4, #0x18]
subs r0, #5
ands r0, r1
movs r1, #1
orrs r0, r1
strb r0, [r4, #0x18]
_0802C36A:
adds r0, r4, #0
bl GetNextFrame
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, _0802C3C4 @ =gRoomControls
ldrh r0, [r2, #6]
subs r1, r1, r0
asrs r1, r1, #4
movs r3, #0x3f
ands r1, r3
movs r5, #0x32
ldrsh r0, [r4, r5]
ldrh r2, [r2, #8]
subs r0, r0, r2
asrs r0, r0, #4
ands r0, r3
lsls r0, r0, #6
orrs r1, r0
adds r0, r4, #0
adds r0, #0x7e
strh r1, [r0]
adds r0, #6
ldr r1, [r0]
adds r0, r4, #0
bl sub_080044EC
cmp r0, #1
bne _0802C3CC
movs r0, #0xa6
lsls r0, r0, #1
bl EnqueueSFX
ldrb r1, [r4, #0x10]
movs r0, #0x80
orrs r0, r1
strb r0, [r4, #0x10]
adds r1, r4, #0
adds r1, #0x7a
movs r0, #0xc
strh r0, [r1]
adds r0, r4, #0
bl sub_0802C4B0
b _0802C48C
.align 2, 0
_0802C3C4: .4byte gRoomControls
_0802C3C8: .4byte gPlayerEntity
_0802C3CC:
adds r0, r4, #0
adds r0, #0x7a
ldrh r1, [r0]
adds r7, r0, #0
cmp r1, #0
beq _0802C442
subs r0, r1, #1
strh r0, [r7]
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
cmp r0, #0
beq _0802C3EA
cmp r0, #8
beq _0802C3F4
b _0802C442
_0802C3EA:
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
b _0802C442
_0802C3F4:
ldrb r0, [r4, #0xb]
cmp r0, #0
beq _0802C442
adds r0, r4, #0
bl sub_08049FA0
cmp r0, #0
bne _0802C442
movs r6, #0
movs r5, #1
_0802C408:
adds r0, r4, #0
movs r1, #0x15
movs r2, #0
bl CreateFx
adds r2, r0, #0
cmp r2, #0
beq _0802C420
ldrh r0, [r2, #0x2e]
adds r0, #0xc
subs r0, r0, r6
strh r0, [r2, #0x2e]
_0802C420:
adds r6, #0x18
subs r5, #1
cmp r5, #0
bge _0802C408
adds r0, r4, #0
bl sub_0802C62C
bl Random
movs r1, #0xff
ands r0, r1
movs r2, #0x80
lsls r2, r2, #1
adds r1, r2, #0
orrs r0, r1
strh r0, [r7]
b _0802C4AA
_0802C442:
ldr r0, _0802C45C @ =gRoomControls
ldrh r1, [r0, #8]
ldrh r0, [r0, #0x20]
adds r1, r1, r0
movs r5, #0x32
ldrsh r0, [r4, r5]
subs r5, r1, r0
cmp r5, #4
ble _0802C460
adds r0, r4, #0
bl sub_080AEFB4
b _0802C48C
.align 2, 0
_0802C45C: .4byte gRoomControls
_0802C460:
adds r0, r4, #0
bl sub_0806F69C
movs r1, #0x36
ldrsh r0, [r4, r1]
subs r0, r0, r5
cmp r0, #0x38
ble _0802C48C
adds r0, r4, #0
bl sub_0802C62C
bl Random
movs r1, #0x7f
ands r0, r1
movs r1, #0x80
orrs r0, r1
strh r0, [r7]
ldrb r0, [r4, #0xa]
cmp r0, #3
bne _0802C48C
strb r0, [r4, #0xc]
_0802C48C:
adds r1, r4, #0
adds r1, #0x38
movs r0, #3
strb r0, [r1]
adds r2, r4, #0
adds r2, #0x29
ldrb r1, [r2]
subs r0, #0xb
ands r0, r1
movs r1, #1
orrs r0, r1
strb r0, [r2]
adds r0, r4, #0
bl UpdateSpriteForCollisionLayer
_0802C4AA:
pop {r4, r5, r6, r7, pc}
thumb_func_start nullsub_148
nullsub_148: @ 0x0802C4AC
bx lr
.align 2, 0
thumb_func_start sub_0802C4B0
sub_0802C4B0: @ 0x0802C4B0
push {r4, r5, r6, lr}
adds r5, r0, #0
adds r0, #0x7e
ldrh r0, [r0]
adds r1, r5, #0
adds r1, #0x38
ldrb r1, [r1]
bl sub_080001DA
adds r1, r0, #0
ldr r0, _0802C4D8 @ =0x000001AB
cmp r1, r0
blo _0802C4E4
adds r0, #4
cmp r1, r0
bls _0802C4DC
adds r0, #0x15
cmp r1, r0
beq _0802C4E0
b _0802C4E4
.align 2, 0
_0802C4D8: .4byte 0x000001AB
_0802C4DC:
movs r6, #8
b _0802C4E6
_0802C4E0:
movs r6, #4
b _0802C4E6
_0802C4E4:
movs r6, #0
_0802C4E6:
bl Random
adds r4, r0, #0
movs r0, #7
ands r4, r0
movs r0, #4
ands r0, r4
cmp r0, #0
beq _0802C518
movs r0, #3
ands r4, r0
cmp r4, #0
beq _0802C50C
ldr r0, _0802C508 @ =gUnk_080CD568
movs r1, #2
orrs r1, r6
b _0802C532
.align 2, 0
_0802C508: .4byte gUnk_080CD568
_0802C50C:
ldr r0, _0802C514 @ =gUnk_080CD568
lsls r1, r6, #1
b _0802C534
.align 2, 0
_0802C514: .4byte gUnk_080CD568
_0802C518:
movs r2, #3
ands r4, r2
cmp r4, #0
beq _0802C52C
ldr r0, _0802C528 @ =gUnk_080CD568
movs r1, #1
orrs r1, r6
b _0802C532
.align 2, 0
_0802C528: .4byte gUnk_080CD568
_0802C52C:
ldr r0, _0802C570 @ =gUnk_080CD568
adds r1, r6, #0
orrs r1, r2
_0802C532:
lsls r1, r1, #1
_0802C534:
adds r1, r1, r0
ldrh r0, [r1]
strh r0, [r5, #0x24]
bl Random
adds r4, r0, #0
movs r0, #7
ands r4, r0
movs r0, #4
ands r0, r4
cmp r0, #0
beq _0802C584
ldrb r0, [r5, #0xe]
cmp r0, #0
beq _0802C55E
movs r0, #0
strb r0, [r5, #0xe]
adds r0, r5, #0
movs r1, #0
bl InitializeAnimation
_0802C55E:
movs r0, #3
ands r4, r0
cmp r4, #0
beq _0802C578
ldr r0, _0802C574 @ =gUnk_080CD580
movs r1, #1
orrs r1, r6
b _0802C5B2
.align 2, 0
_0802C570: .4byte gUnk_080CD568
_0802C574: .4byte gUnk_080CD580
_0802C578:
ldr r0, _0802C580 @ =gUnk_080CD580
adds r0, r6, r0
ldrb r0, [r0]
b _0802C5B6
.align 2, 0
_0802C580: .4byte gUnk_080CD580
_0802C584:
ldrb r0, [r5, #0xe]
cmp r0, #1
beq _0802C596
movs r0, #1
strb r0, [r5, #0xe]
adds r0, r5, #0
movs r1, #1
bl InitializeAnimation
_0802C596:
movs r2, #3
ands r4, r2
cmp r4, #0
beq _0802C5AC
ldr r0, _0802C5A8 @ =gUnk_080CD580
movs r1, #2
orrs r1, r6
b _0802C5B2
.align 2, 0
_0802C5A8: .4byte gUnk_080CD580
_0802C5AC:
ldr r0, _0802C5E4 @ =gUnk_080CD580
adds r1, r6, #0
orrs r1, r2
_0802C5B2:
adds r1, r1, r0
ldrb r0, [r1]
_0802C5B6:
strb r0, [r5, #0x15]
bl Random
adds r4, r0, #0
movs r0, #7
ands r4, r0
movs r0, #0x80
lsls r0, r0, #0xa
str r0, [r5, #0x20]
movs r0, #4
ands r0, r4
cmp r0, #0
beq _0802C5FC
movs r0, #3
ands r4, r0
cmp r4, #0
beq _0802C5EC
adds r2, r5, #0
adds r2, #0x84
ldr r1, _0802C5E8 @ =gUnk_080CD58C
movs r0, #1
orrs r6, r0
b _0802C61A
.align 2, 0
_0802C5E4: .4byte gUnk_080CD580
_0802C5E8: .4byte gUnk_080CD58C
_0802C5EC:
adds r2, r5, #0
adds r2, #0x84
ldr r1, _0802C5F8 @ =gUnk_080CD58C
orrs r6, r0
b _0802C61A
.align 2, 0
_0802C5F8: .4byte gUnk_080CD58C
_0802C5FC:
movs r0, #3
ands r4, r0
cmp r4, #0
beq _0802C614
adds r2, r5, #0
adds r2, #0x84
ldr r1, _0802C610 @ =gUnk_080CD58C
movs r0, #2
orrs r6, r0
b _0802C61A
.align 2, 0
_0802C610: .4byte gUnk_080CD58C
_0802C614:
adds r2, r5, #0
adds r2, #0x84
ldr r1, _0802C628 @ =gUnk_080CD58C
_0802C61A:
lsls r0, r6, #1
adds r0, r0, r1
movs r1, #0
ldrsh r0, [r0, r1]
str r0, [r2]
pop {r4, r5, r6, pc}
.align 2, 0
_0802C628: .4byte gUnk_080CD58C
thumb_func_start sub_0802C62C
sub_0802C62C: @ 0x0802C62C
adds r3, r0, #0
movs r2, #0
movs r0, #1
strb r0, [r3, #0xc]
adds r0, r3, #0
adds r0, #0x82
ldrh r0, [r0]
strh r0, [r3, #0x32]
adds r0, r3, #0
adds r0, #0x80
ldrh r0, [r0]
strh r0, [r3, #0x2e]
ldrb r1, [r3, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
strb r0, [r3, #0x18]
ldrb r1, [r3, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r3, #0x10]
adds r0, r3, #0
adds r0, #0x7c
strh r2, [r0]
bx lr
.align 2, 0
-936
View File
@@ -1,936 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Helmasaur
Helmasaur: @ 0x0802BB6C
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xa]
cmp r0, #0
bne _0802BB94
ldr r1, _0802BB90 @ =gUnk_080CD3E4
adds r0, r4, #0
bl EnemyFunctionHandler
movs r3, #0x10
rsbs r3, r3, #0
adds r0, r4, #0
movs r1, #0
movs r2, #1
bl SetChildOffset
b _0802BBA4
.align 2, 0
_0802BB90: .4byte gUnk_080CD3E4
_0802BB94:
ldr r0, _0802BBA8 @ =gUnk_080CD3FC
ldrb r1, [r4, #0xc]
lsls r1, r1, #2
adds r1, r1, r0
ldr r1, [r1]
adds r0, r4, #0
bl _call_via_r1
_0802BBA4:
pop {r4, pc}
.align 2, 0
_0802BBA8: .4byte gUnk_080CD3FC
thumb_func_start sub_0802BBAC
sub_0802BBAC: @ 0x0802BBAC
push {lr}
ldr r2, _0802BBC0 @ =gUnk_080CD408
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802BBC0: .4byte gUnk_080CD408
thumb_func_start sub_0802BBC4
sub_0802BBC4: @ 0x0802BBC4
push {r4, lr}
adds r4, r0, #0
adds r0, #0x3f
ldrb r0, [r0]
cmp r0, #0x19
beq _0802BBFE
adds r0, r4, #0
adds r0, #0x41
ldrb r0, [r0]
movs r1, #0x7f
ands r1, r0
cmp r1, #0
beq _0802BBEA
cmp r1, #0
blt _0802BBFE
cmp r1, #3
bgt _0802BBFE
cmp r1, #2
blt _0802BBFE
_0802BBEA:
ldrb r0, [r4, #0xc]
cmp r0, #4
bne _0802BBFE
adds r1, r4, #0
adds r1, #0x42
movs r0, #0
strb r0, [r1]
adds r0, r4, #0
bl sub_0802C218
_0802BBFE:
adds r0, r4, #0
adds r0, #0x43
ldrb r0, [r0]
cmp r0, #0
beq _0802BC10
adds r0, r4, #0
movs r1, #0x1c
bl sub_0804A9FC
_0802BC10:
ldr r1, _0802BC1C @ =gUnk_080CD3E4
adds r0, r4, #0
bl sub_0804AA30
pop {r4, pc}
.align 2, 0
_0802BC1C: .4byte gUnk_080CD3E4
thumb_func_start sub_0802BC20
sub_0802BC20: @ 0x0802BC20
push {r4, lr}
adds r4, r0, #0
adds r0, #0x3f
ldrb r0, [r0]
cmp r0, #0x19
beq _0802BC4C
adds r0, r4, #0
bl sub_0806F520
cmp r0, #0
beq _0802BC6C
ldr r0, _0802BC48 @ =gUnk_080CD42C
ldrb r1, [r4, #0xd]
lsls r1, r1, #2
adds r1, r1, r0
ldr r1, [r1]
adds r0, r4, #0
bl _call_via_r1
b _0802BC6C
.align 2, 0
_0802BC48: .4byte gUnk_080CD42C
_0802BC4C:
ldrb r0, [r4, #0xd]
cmp r0, #2
bhi _0802BC5C
adds r0, r4, #0
bl sub_0806F520
cmp r0, #0
beq _0802BC6C
_0802BC5C:
ldr r0, _0802BC70 @ =gUnk_080CD438
ldrb r1, [r4, #0xd]
lsls r1, r1, #2
adds r1, r1, r0
ldr r1, [r1]
adds r0, r4, #0
bl _call_via_r1
_0802BC6C:
pop {r4, pc}
.align 2, 0
_0802BC70: .4byte gUnk_080CD438
thumb_func_start sub_0802BC74
sub_0802BC74: @ 0x0802BC74
push {r4, lr}
adds r4, r0, #0
bl sub_0802C1C0
movs r0, #1
strb r0, [r4, #0xd]
movs r0, #0x3c
strb r0, [r4, #0x1d]
ldr r0, _0802BC9C @ =gPlayerEntity
ldrb r0, [r0, #0x14]
lsrs r0, r0, #1
movs r1, #2
eors r0, r1
strb r0, [r4, #0x14]
ldrb r1, [r4, #0x14]
adds r0, r4, #0
bl InitializeAnimation
pop {r4, pc}
.align 2, 0
_0802BC9C: .4byte gPlayerEntity
thumb_func_start sub_0802BCA0
sub_0802BCA0: @ 0x0802BCA0
push {lr}
bl sub_0806F4E8
pop {pc}
thumb_func_start sub_0802BCA8
sub_0802BCA8: @ 0x0802BCA8
push {r4, lr}
adds r4, r0, #0
adds r1, r4, #0
adds r1, #0x3f
ldrb r0, [r1]
cmp r0, #0x19
beq _0802BCFA
movs r0, #7
strb r0, [r4, #0xc]
movs r0, #0x5a
strb r0, [r4, #0xe]
movs r0, #0xc0
lsls r0, r0, #9
str r0, [r4, #0x20]
movs r0, #0x19
strb r0, [r1]
adds r2, r4, #0
adds r2, #0x3a
ldrb r1, [r2]
movs r0, #0xfb
ands r0, r1
strb r0, [r2]
movs r0, #0x12
strb r0, [r4, #0x1c]
movs r0, #0x20
movs r1, #1
bl CreateEnemy
adds r1, r0, #0
cmp r1, #0
beq _0802BCF0
ldrb r0, [r4, #0x14]
strb r0, [r1, #0x14]
adds r0, r4, #0
bl CopyPosition
_0802BCF0:
ldrb r1, [r4, #0x14]
adds r1, #4
adds r0, r4, #0
bl InitializeAnimation
_0802BCFA:
pop {r4, pc}
thumb_func_start sub_0802BCFC
sub_0802BCFC: @ 0x0802BCFC
movs r1, #1
strb r1, [r0, #0xd]
movs r1, #0x3c
strb r1, [r0, #0x1d]
bx lr
.align 2, 0
thumb_func_start sub_0802BD08
sub_0802BD08: @ 0x0802BD08
push {lr}
bl sub_0806F3E4
pop {pc}
thumb_func_start sub_0802BD10
sub_0802BD10: @ 0x0802BD10
push {lr}
ldrb r2, [r0, #0x10]
movs r1, #0x7f
ands r1, r2
strb r1, [r0, #0x10]
movs r1, #2
bl UpdateAnimationVariableFrames
pop {pc}
.align 2, 0
thumb_func_start nullsub_145
nullsub_145: @ 0x0802BD24
bx lr
.align 2, 0
thumb_func_start sub_0802BD28
sub_0802BD28: @ 0x0802BD28
push {lr}
adds r2, r0, #0
ldrb r3, [r2, #0x10]
movs r0, #0x80
ands r0, r3
lsls r0, r0, #0x18
lsrs r1, r0, #0x18
cmp r1, #0
beq _0802BD4C
movs r0, #0x80
orrs r0, r3
strb r0, [r2, #0x10]
adds r2, #0x3a
ldrb r1, [r2]
movs r0, #0xfb
ands r0, r1
strb r0, [r2]
b _0802BD52
_0802BD4C:
adds r0, r2, #0
adds r0, #0x45
strb r1, [r0]
_0802BD52:
pop {pc}
thumb_func_start sub_0802BD54
sub_0802BD54: @ 0x0802BD54
push {r4, lr}
adds r4, r0, #0
bl sub_0804A720
movs r0, #1
strb r0, [r4, #0xc]
bl Random
adds r1, r4, #0
adds r1, #0x78
strb r0, [r1]
movs r0, #0x3c
strb r0, [r4, #0x1d]
adds r1, #1
movs r0, #0xff
strb r0, [r1]
bl Random
movs r1, #0x18
ands r0, r1
strb r0, [r4, #0x15]
lsrs r0, r0, #3
strb r0, [r4, #0x14]
ldrb r1, [r4, #0x14]
adds r0, r4, #0
bl InitializeAnimation
pop {r4, pc}
thumb_func_start sub_0802BD8C
sub_0802BD8C: @ 0x0802BD8C
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
cmp r0, #0
beq _0802BD9C
subs r0, #1
strb r0, [r4, #0xe]
b _0802BDDE
_0802BD9C:
adds r0, r4, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _0802BDCA
adds r0, r4, #0
movs r1, #1
movs r2, #0x10
bl sub_0804A024
adds r1, r0, #0
cmp r1, #0xff
beq _0802BDCA
adds r0, r4, #0
adds r0, #0x79
ldrb r0, [r0]
cmp r1, r0
beq _0802BDCA
adds r0, r4, #0
bl sub_0802C058
b _0802BDDE
_0802BDCA:
adds r0, r4, #0
bl sub_0802C020
adds r1, r0, #0
ldrb r0, [r4, #0x15]
cmp r1, r0
beq _0802BDDE
adds r0, r4, #0
bl sub_0802C058
_0802BDDE:
pop {r4, pc}
thumb_func_start sub_0802BDE0
sub_0802BDE0: @ 0x0802BDE0
push {r4, lr}
adds r4, r0, #0
bl sub_0802C06C
cmp r0, #0
beq _0802BDFE
movs r0, #3
strb r0, [r4, #0xc]
movs r0, #0x3c
strb r0, [r4, #0xe]
adds r1, r4, #0
adds r1, #0x79
movs r0, #0xff
strb r0, [r1]
b _0802BE16
_0802BDFE:
movs r0, #1
strb r0, [r4, #0xc]
bl Random
movs r1, #0xf
ands r0, r1
adds r0, #0xf
strb r0, [r4, #0xe]
ldrb r1, [r4, #0x15]
adds r0, r4, #0
adds r0, #0x79
strb r1, [r0]
_0802BE16:
pop {r4, pc}
thumb_func_start sub_0802BE18
sub_0802BE18: @ 0x0802BE18
push {r4, lr}
adds r4, r0, #0
movs r1, #2
bl UpdateAnimationVariableFrames
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802BE3E
movs r0, #4
strb r0, [r4, #0xc]
movs r0, #0x1e
strb r0, [r4, #0xe]
movs r0, #0xc0
lsls r0, r0, #2
strh r0, [r4, #0x24]
b _0802BE44
_0802BE3E:
adds r0, r4, #0
bl sub_0802C18C
_0802BE44:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802BE48
sub_0802BE48: @ 0x0802BE48
push {r4, lr}
adds r4, r0, #0
bl sub_080AEFE0
cmp r0, #0
bne _0802BE64
adds r0, r4, #0
bl sub_0802C218
movs r0, #8
movs r1, #0
bl sub_08080964
b _0802BE7E
_0802BE64:
adds r0, r4, #0
bl GetNextFrame
adds r0, r4, #0
bl sub_0802C1CC
adds r0, r4, #0
bl sub_0802C0E8
cmp r0, #0
beq _0802BE7E
movs r0, #5
strb r0, [r4, #0xc]
_0802BE7E:
pop {r4, pc}
thumb_func_start sub_0802BE80
sub_0802BE80: @ 0x0802BE80
push {r4, lr}
adds r4, r0, #0
ldrh r0, [r4, #0x24]
subs r0, #0x20
strh r0, [r4, #0x24]
lsls r0, r0, #0x10
asrs r0, r0, #0x10
cmp r0, #0xff
ble _0802BE98
adds r0, r4, #0
bl sub_0802C1CC
_0802BE98:
movs r1, #0x24
ldrsh r0, [r4, r1]
cmp r0, #0
ble _0802BEAE
adds r0, r4, #0
bl sub_080AEFE0
adds r0, r4, #0
bl sub_0802C18C
b _0802BEBA
_0802BEAE:
adds r0, r4, #0
bl sub_0802C1C0
ldrb r0, [r4, #0xe]
adds r0, #0x1e
strb r0, [r4, #0xe]
_0802BEBA:
pop {r4, pc}
thumb_func_start sub_0802BEBC
sub_0802BEBC: @ 0x0802BEBC
push {r4, r5, lr}
adds r5, r0, #0
ldrb r0, [r5, #0x15]
movs r4, #0x10
eors r0, r4
strb r0, [r5, #0x15]
adds r0, r5, #0
bl sub_080AEFE0
ldrb r0, [r5, #0x15]
eors r0, r4
strb r0, [r5, #0x15]
movs r1, #0x80
lsls r1, r1, #6
adds r0, r5, #0
bl sub_080044EC
cmp r0, #0
bne _0802BEE8
adds r0, r5, #0
bl sub_0802C1C0
_0802BEE8:
pop {r4, r5, pc}
.align 2, 0
thumb_func_start sub_0802BEEC
sub_0802BEEC: @ 0x0802BEEC
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
cmp r0, #0
beq _0802BF1E
subs r0, #1
strb r0, [r4, #0xe]
movs r1, #0xff
ands r0, r1
movs r1, #0x1f
ands r0, r1
cmp r0, #0
bne _0802BF3A
ldrb r0, [r4, #0x14]
movs r1, #2
eors r0, r1
strb r0, [r4, #0x14]
lsls r0, r0, #3
strb r0, [r4, #0x15]
ldrb r1, [r4, #0x14]
adds r1, #4
adds r0, r4, #0
bl InitializeAnimation
b _0802BF3A
_0802BF1E:
movs r1, #0xe0
lsls r1, r1, #5
adds r0, r4, #0
bl sub_08003FC4
cmp r0, #0
bne _0802BF3A
movs r0, #8
strb r0, [r4, #0xc]
movs r0, #0x1e
strb r0, [r4, #0xe]
movs r0, #0x90
lsls r0, r0, #1
strh r0, [r4, #0x24]
_0802BF3A:
pop {r4, pc}
thumb_func_start sub_0802BF3C
sub_0802BF3C: @ 0x0802BF3C
push {r4, lr}
adds r4, r0, #0
bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802BF76
movs r0, #0x1e
strb r0, [r4, #0xe]
adds r0, r4, #0
bl sub_0802C020
strb r0, [r4, #0x15]
lsls r0, r0, #0x18
lsrs r0, r0, #0x1b
ldrb r1, [r4, #0x14]
cmp r0, r1
beq _0802BF76
strb r0, [r4, #0x14]
adds r1, r0, #4
adds r0, r4, #0
bl InitializeAnimation
_0802BF76:
pop {r4, pc}
thumb_func_start sub_0802BF78
sub_0802BF78: @ 0x0802BF78
push {lr}
movs r2, #1
strb r2, [r0, #0xc]
adds r3, r0, #0
adds r3, #0x3b
movs r1, #4
strb r1, [r3]
strb r2, [r0, #0x1c]
ldrb r1, [r0, #0x14]
lsls r1, r1, #3
strb r1, [r0, #0x15]
ldrb r1, [r0, #0x14]
adds r1, #8
bl InitializeAnimation
pop {pc}
thumb_func_start sub_0802BF98
sub_0802BF98: @ 0x0802BF98
push {r4, lr}
adds r4, r0, #0
bl sub_0806F520
cmp r0, #0
beq _0802BFBC
ldr r0, _0802BFB8 @ =gUnk_080CD450
ldrb r1, [r4, #0xd]
lsls r1, r1, #2
adds r1, r1, r0
ldr r1, [r1]
adds r0, r4, #0
bl _call_via_r1
b _0802BFCC
.align 2, 0
_0802BFB8: .4byte gUnk_080CD450
_0802BFBC:
movs r0, #2
strb r0, [r4, #0xc]
movs r0, #0x1e
strb r0, [r4, #0xe]
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
_0802BFCC:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802BFD0
sub_0802BFD0: @ 0x0802BFD0
movs r1, #2
strb r1, [r0, #0xd]
bx lr
.align 2, 0
thumb_func_start sub_0802BFD8
sub_0802BFD8: @ 0x0802BFD8
push {lr}
bl sub_0806F4E8
pop {pc}
thumb_func_start sub_0802BFE0
sub_0802BFE0: @ 0x0802BFE0
push {r4, lr}
adds r4, r0, #0
bl sub_0806F3E4
cmp r0, #0
beq _0802BFF2
adds r0, r4, #0
bl DeleteEntity
_0802BFF2:
pop {r4, pc}
thumb_func_start sub_0802BFF4
sub_0802BFF4: @ 0x0802BFF4
push {lr}
adds r3, r0, #0
ldrb r2, [r3, #0x18]
lsls r1, r2, #0x1e
lsrs r1, r1, #0x1e
movs r0, #1
eors r1, r0
subs r0, #5
ands r0, r2
orrs r0, r1
strb r0, [r3, #0x18]
ldrb r0, [r3, #0xe]
subs r0, #1
strb r0, [r3, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802C01C
adds r0, r3, #0
bl DeleteEntity
_0802C01C:
pop {pc}
.align 2, 0
thumb_func_start sub_0802C020
sub_0802C020: @ 0x0802C020
push {r4, r5, r6, lr}
adds r5, r0, #0
bl Random
adds r4, r0, #0
adds r0, r5, #0
bl sub_08049FA0
cmp r0, #0
bne _0802C03E
movs r6, #1
adds r0, r4, #0
ands r0, r6
cmp r0, #0
beq _0802C044
_0802C03E:
movs r0, #0x18
ands r0, r4
b _0802C056
_0802C044:
adds r0, r5, #0
bl sub_08049EE4
lsrs r1, r4, #0x10
ands r1, r6
lsls r1, r1, #2
adds r0, r0, r1
movs r1, #0x18
ands r0, r1
_0802C056:
pop {r4, r5, r6, pc}
thumb_func_start sub_0802C058
sub_0802C058: @ 0x0802C058
push {lr}
movs r2, #2
strb r2, [r0, #0xc]
strb r1, [r0, #0x15]
lsrs r1, r1, #3
strb r1, [r0, #0x14]
ldrb r1, [r0, #0x14]
bl InitializeAnimation
pop {pc}
thumb_func_start sub_0802C06C
sub_0802C06C: @ 0x0802C06C
push {r4, r5, r6, r7, lr}
mov r7, sb
mov r6, r8
push {r6, r7}
movs r1, #0x2e
ldrsh r2, [r0, r1]
ldr r3, [r0, #0x48]
movs r1, #0
ldrsb r1, [r3, r1]
adds r6, r2, r1
movs r1, #0x32
ldrsh r2, [r0, r1]
movs r1, #1
ldrsb r1, [r3, r1]
adds r5, r2, r1
ldr r3, _0802C0CC @ =gUnk_080CD45C
ldrb r1, [r0, #0x15]
lsrs r1, r1, #2
adds r2, r1, r3
ldrb r2, [r2]
lsls r2, r2, #0x18
asrs r2, r2, #0x18
mov sb, r2
adds r1, #1
adds r1, r1, r3
ldrb r1, [r1]
lsls r1, r1, #0x18
asrs r1, r1, #0x18
mov r8, r1
adds r0, #0x38
ldrb r0, [r0]
ldr r7, _0802C0D0 @ =gUnk_02027EB4
cmp r0, #2
bne _0802C0B2
ldr r7, _0802C0D4 @ =gUnk_0200D654
_0802C0B2:
movs r4, #0
_0802C0B4:
add r6, sb
add r5, r8
adds r0, r7, #0
adds r1, r6, #0
adds r2, r5, #0
movs r3, #0
bl sub_080AE4CC
cmp r0, #0
beq _0802C0D8
movs r0, #0
b _0802C0E0
.align 2, 0
_0802C0CC: .4byte gUnk_080CD45C
_0802C0D0: .4byte gUnk_02027EB4
_0802C0D4: .4byte gUnk_0200D654
_0802C0D8:
adds r4, #1
cmp r4, #7
bls _0802C0B4
movs r0, #1
_0802C0E0:
pop {r3, r4}
mov r8, r3
mov sb, r4
pop {r4, r5, r6, r7, pc}
thumb_func_start sub_0802C0E8
sub_0802C0E8: @ 0x0802C0E8
push {r4, r5, r6, r7, lr}
adds r5, r0, #0
ldrb r0, [r5, #0xe]
subs r0, #1
strb r0, [r5, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802C0FC
movs r0, #1
b _0802C178
_0802C0FC:
ldrb r3, [r5, #0x15]
lsrs r3, r3, #2
ldr r0, _0802C17C @ =gUnk_080CD45C
adds r3, r3, r0
movs r0, #0x2e
ldrsh r2, [r5, r0]
ldr r4, [r5, #0x48]
movs r0, #0
ldrsb r0, [r4, r0]
adds r2, r2, r0
movs r1, #0
ldrsb r1, [r3, r1]
lsls r0, r1, #1
adds r0, r0, r1
lsls r0, r0, #1
adds r6, r2, r0
movs r0, #0x32
ldrsh r2, [r5, r0]
movs r0, #1
ldrsb r0, [r4, r0]
adds r2, r2, r0
movs r1, #1
ldrsb r1, [r3, r1]
lsls r0, r1, #1
adds r0, r0, r1
lsls r0, r0, #1
adds r4, r2, r0
adds r0, r5, #0
adds r0, #0x38
ldrb r0, [r0]
ldr r7, _0802C180 @ =gUnk_02027EB4
cmp r0, #2
bne _0802C140
ldr r7, _0802C184 @ =gUnk_0200D654
_0802C140:
movs r5, #0
ldr r1, _0802C188 @ =gRoomControls
ldrh r0, [r1, #6]
subs r0, r6, r0
asrs r0, r0, #4
movs r2, #0x3f
ands r0, r2
ldrh r1, [r1, #8]
subs r1, r4, r1
asrs r1, r1, #4
ands r1, r2
lsls r1, r1, #6
orrs r0, r1
movs r1, #9
bl sub_0806FC24
cmp r0, #0
bne _0802C176
adds r0, r7, #0
adds r1, r6, #0
adds r2, r4, #0
movs r3, #0
bl sub_080AE4CC
rsbs r1, r0, #0
orrs r1, r0
lsrs r5, r1, #0x1f
_0802C176:
adds r0, r5, #0
_0802C178:
pop {r4, r5, r6, r7, pc}
.align 2, 0
_0802C17C: .4byte gUnk_080CD45C
_0802C180: .4byte gUnk_02027EB4
_0802C184: .4byte gUnk_0200D654
_0802C188: .4byte gRoomControls
thumb_func_start sub_0802C18C
sub_0802C18C: @ 0x0802C18C
push {r4, lr}
adds r4, r0, #0
adds r0, #0x78
ldrb r1, [r0]
subs r1, #1
strb r1, [r0]
movs r0, #7
ands r1, r0
cmp r1, #0
bne _0802C1BC
movs r0, #0xf
movs r1, #0x11
movs r2, #0x40
bl CreateObject
adds r1, r0, #0
cmp r1, #0
beq _0802C1BC
movs r3, #0x80
lsls r3, r3, #9
adds r0, r4, #0
movs r2, #0
bl PositionRelative
_0802C1BC:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802C1C0
sub_0802C1C0: @ 0x0802C1C0
movs r1, #1
strb r1, [r0, #0xc]
movs r1, #0x1e
strb r1, [r0, #0xe]
bx lr
.align 2, 0
thumb_func_start sub_0802C1CC
sub_0802C1CC: @ 0x0802C1CC
push {r4, r5, lr}
adds r5, r0, #0
ldrb r4, [r5, #0x14]
lsls r4, r4, #2
ldr r0, _0802C214 @ =gUnk_080CD464
adds r4, r4, r0
movs r0, #0x2e
ldrsh r2, [r5, r0]
movs r0, #0
ldrsb r0, [r4, r0]
adds r2, r2, r0
movs r0, #0x32
ldrsh r3, [r5, r0]
movs r0, #1
ldrsb r0, [r4, r0]
adds r3, r3, r0
adds r0, r5, #0
movs r1, #9
bl sub_08008796
movs r0, #0x2e
ldrsh r2, [r5, r0]
movs r0, #2
ldrsb r0, [r4, r0]
adds r2, r2, r0
movs r0, #0x32
ldrsh r3, [r5, r0]
movs r0, #3
ldrsb r0, [r4, r0]
adds r3, r3, r0
adds r0, r5, #0
movs r1, #9
bl sub_08008796
pop {r4, r5, pc}
.align 2, 0
_0802C214: .4byte gUnk_080CD464
thumb_func_start sub_0802C218
sub_0802C218: @ 0x0802C218
movs r1, #6
strb r1, [r0, #0xc]
movs r1, #0xe0
strh r1, [r0, #0x24]
movs r1, #0xc0
lsls r1, r1, #9
str r1, [r0, #0x20]
bx lr
-652
View File
@@ -1,652 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start LikeLike
LikeLike: @ 0x08027D6C
push {r4, lr}
adds r4, r0, #0
ldr r1, _08027D88 @ =gUnk_080CC6FC
bl EnemyFunctionHandler
movs r3, #0x10
rsbs r3, r3, #0
adds r0, r4, #0
movs r1, #0
movs r2, #1
bl SetChildOffset
pop {r4, pc}
.align 2, 0
_08027D88: .4byte gUnk_080CC6FC
thumb_func_start sub_08027D8C
sub_08027D8C: @ 0x08027D8C
push {lr}
ldr r2, _08027DA0 @ =gUnk_080CC714
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_08027DA0: .4byte gUnk_080CC714
thumb_func_start sub_08027DA4
sub_08027DA4: @ 0x08027DA4
push {r4, lr}
adds r4, r0, #0
adds r2, r4, #0
adds r2, #0x3f
ldrb r0, [r2]
cmp r0, #1
bne _08027DC4
movs r0, #3
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
movs r0, #0x8c
strb r0, [r2]
b _08027E0E
_08027DC4:
ldrb r0, [r4, #0xc]
cmp r0, #7
bne _08027DD2
adds r0, r4, #0
bl sub_0802810C
b _08027E0E
_08027DD2:
adds r0, r4, #0
adds r0, #0x41
ldrb r2, [r0]
movs r0, #0x80
ands r0, r2
cmp r0, #0
beq _08027E0E
movs r1, #0x7f
ands r1, r2
cmp r1, #0
bne _08027E0E
movs r0, #7
strb r0, [r4, #0xc]
movs r0, #0x5f
strb r0, [r4, #0xe]
strb r1, [r4, #0xf]
adds r2, r4, #0
adds r2, #0x3b
ldrb r1, [r2]
movs r0, #0xfc
ands r0, r1
strb r0, [r2]
ldr r0, _08027E38 @ =gPlayerEntity
adds r0, #0x29
ldrb r0, [r0]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1d
adds r1, r4, #0
adds r1, #0x83
strb r0, [r1]
_08027E0E:
adds r0, r4, #0
adds r0, #0x45
ldrb r0, [r0]
cmp r0, #0
bne _08027E1C
movs r0, #0x20
strb r0, [r4, #0xe]
_08027E1C:
adds r0, r4, #0
adds r0, #0x43
ldrb r0, [r0]
cmp r0, #0
beq _08027E2E
adds r0, r4, #0
movs r1, #0x1c
bl sub_0804A9FC
_08027E2E:
ldr r1, _08027E3C @ =gUnk_080CC6FC
adds r0, r4, #0
bl sub_0804AA30
pop {r4, pc}
.align 2, 0
_08027E38: .4byte gPlayerEntity
_08027E3C: .4byte gUnk_080CC6FC
thumb_func_start sub_08027E40
sub_08027E40: @ 0x08027E40
push {r4, r5, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
cmp r0, #2
bne _08027E62
adds r5, r4, #0
adds r5, #0x80
ldrb r0, [r5]
cmp r0, #0xff
beq _08027E62
adds r0, r4, #0
movs r1, #3
bl sub_0805E3A0
ldrb r0, [r5]
bl sub_08028224
_08027E62:
adds r0, r4, #0
bl sub_0804A7D4
pop {r4, r5, pc}
.align 2, 0
thumb_func_start nullsub_139
nullsub_139: @ 0x08027E6C
bx lr
.align 2, 0
thumb_func_start sub_08027E70
sub_08027E70: @ 0x08027E70
push {r4, lr}
adds r4, r0, #0
bl sub_0804A720
ldrb r3, [r4, #0xa]
cmp r3, #1
beq _08027EA6
cmp r3, #1
bgt _08027E88
cmp r3, #0
beq _08027E8E
b _08027EE4
_08027E88:
cmp r3, #2
beq _08027EC4
b _08027EE4
_08027E8E:
movs r0, #3
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x18]
subs r0, #7
ands r0, r1
strb r0, [r4, #0x18]
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
strb r3, [r4, #0xe]
b _08027EE4
_08027EA6:
movs r2, #1
strb r3, [r4, #0xc]
ldrb r1, [r4, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
orrs r0, r2
strb r0, [r4, #0x18]
movs r0, #8
strb r0, [r4, #0xe]
adds r0, r4, #0
movs r1, #1
bl InitializeAnimation
b _08027EE4
_08027EC4:
movs r3, #0
movs r2, #1
strb r2, [r4, #0xc]
ldrb r1, [r4, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
strb r0, [r4, #0x18]
strb r3, [r4, #0xe]
adds r0, r4, #0
adds r0, #0x3f
strb r2, [r0]
adds r0, r4, #0
movs r1, #0
bl InitializeAnimation
_08027EE4:
movs r0, #0
strb r0, [r4, #0x15]
adds r1, r4, #0
adds r1, #0x82
strb r0, [r1]
strb r0, [r4, #0x14]
adds r1, #1
strb r0, [r1]
subs r1, #3
movs r0, #0xff
strb r0, [r1]
pop {r4, pc}
thumb_func_start sub_08027EFC
sub_08027EFC: @ 0x08027EFC
push {r4, lr}
adds r4, r0, #0
adds r0, #0x3f
ldrb r0, [r0]
cmp r0, #1
beq _08027F7C
adds r0, r4, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _08027F68
adds r0, r4, #0
bl sub_08049FA0
cmp r0, #0
bne _08027F32
bl Random
movs r1, #0x30
ands r1, r0
cmp r1, #0
beq _08027F32
adds r0, r4, #0
bl sub_08049EE4
b _08027F38
_08027F32:
adds r0, r4, #0
adds r0, #0x82
ldrb r0, [r0]
_08027F38:
strb r0, [r4, #0x15]
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _08027F5A
adds r0, r4, #0
movs r1, #1
bl sub_08049F84
strb r0, [r4, #0x15]
adds r1, r4, #0
adds r1, #0x82
strb r0, [r1]
movs r0, #8
strb r0, [r4, #0xe]
_08027F5A:
adds r0, r4, #0
bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
b _08027F7C
_08027F68:
movs r0, #6
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
adds r0, r4, #0
movs r1, #2
bl InitializeAnimation
_08027F7C:
pop {r4, pc}
.align 2, 0
thumb_func_start nullsub_12
nullsub_12: @ 0x08027F80
bx lr
.align 2, 0
thumb_func_start sub_08027F84
sub_08027F84: @ 0x08027F84
push {r4, lr}
adds r4, r0, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _08027FB0
movs r0, #5
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x18]
subs r0, #9
ands r0, r1
movs r1, #1
orrs r0, r1
strb r0, [r4, #0x18]
adds r0, r4, #0
movs r1, #0
bl InitializeAnimation
adds r0, r4, #0
bl CreateDust
_08027FB0:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_08027FB4
sub_08027FB4: @ 0x08027FB4
push {lr}
adds r2, r0, #0
ldrb r0, [r2, #0xe]
subs r0, #1
strb r0, [r2, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _08027FD6
movs r1, #1
movs r0, #1
strb r0, [r2, #0xc]
strb r0, [r2, #0xe]
adds r3, r2, #0
adds r3, #0x3b
ldrb r0, [r3]
orrs r0, r1
strb r0, [r3]
_08027FD6:
adds r0, r2, #0
bl GetNextFrame
pop {pc}
.align 2, 0
thumb_func_start sub_08027FE0
sub_08027FE0: @ 0x08027FE0
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
adds r0, #0x5a
ldrb r1, [r0]
movs r2, #1
adds r0, r2, #0
ands r0, r1
cmp r0, #0
beq _08028028
strb r2, [r4, #0xc]
ldrb r1, [r4, #0x10]
movs r0, #0x80
orrs r0, r1
strb r0, [r4, #0x10]
adds r0, r4, #0
movs r1, #1
bl sub_08049F84
strb r0, [r4, #0x15]
movs r2, #8
movs r0, #8
strb r0, [r4, #0xe]
adds r3, r4, #0
adds r3, #0x29
ldrb r1, [r3]
subs r0, #0x41
ands r0, r1
orrs r0, r2
strb r0, [r3]
adds r0, r4, #0
movs r1, #1
bl InitializeAnimation
_08028028:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802802C
sub_0802802C: @ 0x0802802C
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
adds r0, #0x5a
ldrb r1, [r0]
movs r0, #1
ands r0, r1
cmp r0, #0
beq _0802805A
movs r2, #0
movs r0, #3
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x18]
subs r0, #7
ands r0, r1
strb r0, [r4, #0x18]
strb r2, [r4, #0x15]
strb r2, [r4, #0xe]
adds r0, r4, #0
bl CreateDust
_0802805A:
pop {r4, pc}
thumb_func_start sub_0802805C
sub_0802805C: @ 0x0802805C
push {r4, r5, lr}
adds r5, r0, #0
movs r1, #2
bl UpdateAnimationVariableFrames
bl sub_0807953C
cmp r0, #0
beq _0802807E
bl Random
ldrb r2, [r5, #0xf]
adds r2, #1
movs r1, #1
ands r1, r0
adds r2, r2, r1
strb r2, [r5, #0xf]
_0802807E:
ldrb r0, [r5, #0xf]
cmp r0, #0x18
bhi _0802808E
ldr r0, _08028098 @ =gUnk_02002A40
adds r0, #0xaa
ldrb r0, [r0]
cmp r0, #0
bne _0802809C
_0802808E:
adds r0, r5, #0
bl sub_0802810C
b _08028102
.align 2, 0
_08028098: .4byte gUnk_02002A40
_0802809C:
bl ResetPlayer
ldr r2, _08028104 @ =gPlayerState
ldrb r1, [r2, #0x1a]
movs r0, #0x80
orrs r0, r1
strb r0, [r2, #0x1a]
ldr r4, _08028108 @ =gPlayerEntity
movs r3, #0x80
lsls r3, r3, #9
adds r0, r5, #0
adds r1, r4, #0
movs r2, #0
bl PositionRelative
ldrh r0, [r5, #0x12]
ldrb r1, [r5, #0x1e]
bl GetSpriteSubEntryOffsetDataPointer
ldrb r1, [r0]
adds r2, r4, #0
adds r2, #0x62
strb r1, [r2]
ldrb r0, [r0, #1]
adds r1, r4, #0
adds r1, #0x63
strb r0, [r1]
adds r4, #0x29
ldrb r1, [r4]
movs r0, #0x39
rsbs r0, r0, #0
ands r0, r1
strb r0, [r4]
ldrb r0, [r5, #0xe]
subs r0, #1
strb r0, [r5, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _080280F0
adds r0, r5, #0
bl sub_080281A0
_080280F0:
ldrb r1, [r5, #0xe]
movs r0, #3
ands r0, r1
cmp r0, #0
bne _08028102
movs r0, #0x82
lsls r0, r0, #1
bl EnqueueSFX
_08028102:
pop {r4, r5, pc}
.align 2, 0
_08028104: .4byte gPlayerState
_08028108: .4byte gPlayerEntity
thumb_func_start sub_0802810C
sub_0802810C: @ 0x0802810C
push {r4, r5, lr}
adds r4, r0, #0
ldr r2, _08028198 @ =gPlayerState
movs r1, #0
movs r0, #0x41
strb r0, [r2, #2]
strb r1, [r2, #0xa]
ldr r0, [r2, #0x30]
subs r1, #0x11
ands r0, r1
str r0, [r2, #0x30]
ldr r0, _0802819C @ =gPlayerEntity
mov ip, r0
ldrb r0, [r0, #0x10]
movs r1, #0x80
orrs r0, r1
mov r1, ip
strb r0, [r1, #0x10]
movs r0, #0xc0
lsls r0, r0, #9
str r0, [r1, #0x20]
adds r1, #0x3d
movs r0, #0xc4
strb r0, [r1]
movs r3, #0
mov r2, ip
ldrb r0, [r2, #0x14]
lsls r0, r0, #2
strb r0, [r2, #0x15]
adds r0, r4, #0
adds r0, #0x83
ldrb r0, [r0]
mov r5, ip
adds r5, #0x29
movs r1, #7
ands r1, r0
lsls r1, r1, #3
ldrb r2, [r5]
movs r0, #0x39
rsbs r0, r0, #0
ands r0, r2
orrs r0, r1
strb r0, [r5]
mov r1, ip
adds r1, #0x63
movs r0, #0
ldrsb r0, [r1, r0]
mov r2, ip
strh r0, [r2, #0x36]
strb r3, [r1]
movs r0, #4
strb r0, [r4, #0xc]
movs r0, #0x50
strb r0, [r4, #0xe]
strb r3, [r4, #0xf]
adds r2, r4, #0
adds r2, #0x3b
ldrb r1, [r2]
movs r0, #2
orrs r0, r1
strb r0, [r2]
adds r1, r4, #0
adds r1, #0x3d
movs r0, #0
ldrsb r0, [r1, r0]
cmp r0, #0
bne _08028196
movs r0, #0xee
strb r0, [r1]
_08028196:
pop {r4, r5, pc}
.align 2, 0
_08028198: .4byte gPlayerState
_0802819C: .4byte gPlayerEntity
thumb_func_start sub_080281A0
sub_080281A0: @ 0x080281A0
push {r4, lr}
adds r4, r0, #0
movs r0, #0x19
strb r0, [r4, #0xf]
movs r0, #0xe
bl sub_080281E0
cmp r0, #0
beq _080281BA
adds r0, r4, #0
adds r0, #0x80
movs r1, #0xe
b _080281CA
_080281BA:
movs r0, #0xd
bl sub_080281E0
cmp r0, #0
beq _080281D6
adds r0, r4, #0
adds r0, #0x80
movs r1, #0xd
_080281CA:
strb r1, [r0]
movs r0, #0xaf
lsls r0, r0, #3
bl TextboxNoOverlapFollow
b _080281DE
_080281D6:
movs r0, #1
rsbs r0, r0, #0
bl ModHealth
_080281DE:
pop {r4, pc}
thumb_func_start sub_080281E0
sub_080281E0: @ 0x080281E0
push {r4, r5, r6, r7, lr}
adds r7, r0, #0
movs r4, #0
bl GetInventoryValue
cmp r0, #1
bne _0802821A
ldr r6, _08028220 @ =gUnk_02002A40
adds r5, r6, #0
adds r5, #0xb4
ldrb r0, [r5]
bl sub_080544B4
cmp r0, #0
beq _08028200
strb r4, [r5]
_08028200:
adds r5, r6, #0
adds r5, #0xb5
ldrb r0, [r5]
bl sub_080544B4
cmp r0, #0
beq _08028210
strb r4, [r5]
_08028210:
adds r0, r7, #0
movs r1, #0
bl sub_0807CAA0
movs r4, #1
_0802821A:
adds r0, r4, #0
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08028220: .4byte gUnk_02002A40
thumb_func_start sub_08028224
sub_08028224: @ 0x08028224
push {lr}
movs r1, #0
movs r2, #1
bl sub_080A7C18
ldr r0, _08028238 @ =0x00000579
bl TextboxNoOverlapFollow
pop {pc}
.align 2, 0
_08028238: .4byte 0x00000579
-1292
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,76 @@
.syntax unified
.text
push {r4, r5, r6, r7, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xf]
movs r7, #8
cmp r0, #0x28
bhi _0802B022
movs r7, #4
adds r1, r4, #0
adds r1, #0x82
ldrh r2, [r1]
movs r0, #0x80
lsls r0, r0, #8
ands r0, r2
cmp r0, #0
beq _0802AFEC
adds r0, r2, #0
subs r0, #0x10
b _0802AFF0
_0802AFEC:
adds r0, r2, #0
adds r0, #0x10
_0802AFF0:
strh r0, [r1]
adds r5, r1, #0
ldrh r2, [r5]
movs r6, #0xf0
adds r3, r6, #0
ands r3, r2
subs r0, r3, #1
cmp r0, #0x7f
bls _0802B00C
movs r3, #0x80
lsls r3, r3, #8
adds r0, r3, #0
eors r0, r2
strh r0, [r5]
_0802B00C:
ldrh r0, [r1]
adds r3, r6, #0
ands r3, r0
movs r2, #0x98
lsls r2, r2, #1
subs r2, r2, r3
adds r0, r4, #0
adds r1, r2, #0
movs r3, #0
bl sub_0805EC9C
_0802B022:
ldrb r0, [r4, #0xf]
ands r0, r7
cmp r0, #0
beq _0802B03A
ldrb r0, [r4, #0x1a]
lsrs r2, r0, #4
movs r1, #0x10
rsbs r1, r1, #0
ands r1, r0
orrs r1, r2
strb r1, [r4, #0x1a]
b _0802B044
_0802B03A:
ldrb r1, [r4, #0x1a]
movs r0, #0x10
rsbs r0, r0, #0
ands r0, r1
strb r0, [r4, #0x1a]
_0802B044:
pop {r4, r5, r6, r7, pc}
.align 2, 0
.syntax divided
@@ -0,0 +1,30 @@
.syntax unified
.text
push {r4, lr}
adds r4, r0, #0
movs r0, #0
movs r1, #6
strb r1, [r4, #0xc]
adds r1, r4, #0
adds r1, #0x81
strb r0, [r1]
ldr r0, [r4, #0x7c]
ldrb r0, [r0, #8]
cmp r0, #0x6c
beq _08029252
cmp r0, #0x6c
bgt _08029252
cmp r0, #0x1c
bne _08029252
movs r0, #0x5a
bl SetGlobalFlag
_08029252:
adds r0, r4, #0
movs r1, #3
bl sub_080290E0
pop {r4, pc}
.syntax divided
@@ -0,0 +1,193 @@
.syntax unified
.text
push {r4, r5, r6, r7, lr}
adds r4, r0, #0
adds r3, r4, #0
adds r3, #0x7c
ldrh r0, [r3]
cmp r0, #0
bne _0802C36A
ldr r0, _0802C3C4 @ =gRoomControls
ldrh r1, [r0, #8]
ldr r2, _0802C3C8 @ =gPlayerEntity
cmp r2, #0
bne _0802C34E
b _0802C4AA
_0802C34E:
movs r5, #0x32
ldrsh r0, [r2, r5]
subs r0, r0, r1
cmp r0, #0x38
bhi _0802C35A
b _0802C4AA
_0802C35A:
movs r0, #1
strh r0, [r3]
ldrb r1, [r4, #0x18]
subs r0, #5
ands r0, r1
movs r1, #1
orrs r0, r1
strb r0, [r4, #0x18]
_0802C36A:
adds r0, r4, #0
bl GetNextFrame
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, _0802C3C4 @ =gRoomControls
ldrh r0, [r2, #6]
subs r1, r1, r0
asrs r1, r1, #4
movs r3, #0x3f
ands r1, r3
movs r5, #0x32
ldrsh r0, [r4, r5]
ldrh r2, [r2, #8]
subs r0, r0, r2
asrs r0, r0, #4
ands r0, r3
lsls r0, r0, #6
orrs r1, r0
adds r0, r4, #0
adds r0, #0x7e
strh r1, [r0]
adds r0, #6
ldr r1, [r0]
adds r0, r4, #0
bl sub_080044EC
cmp r0, #1
bne _0802C3CC
movs r0, #0xa6
lsls r0, r0, #1
bl EnqueueSFX
ldrb r1, [r4, #0x10]
movs r0, #0x80
orrs r0, r1
strb r0, [r4, #0x10]
adds r1, r4, #0
adds r1, #0x7a
movs r0, #0xc
strh r0, [r1]
adds r0, r4, #0
bl sub_0802C4B0
b _0802C48C
.align 2, 0
_0802C3C4: .4byte gRoomControls
_0802C3C8: .4byte gPlayerEntity
_0802C3CC:
adds r0, r4, #0
adds r0, #0x7a
ldrh r1, [r0]
adds r7, r0, #0
cmp r1, #0
beq _0802C442
subs r0, r1, #1
strh r0, [r7]
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
cmp r0, #0
beq _0802C3EA
cmp r0, #8
beq _0802C3F4
b _0802C442
_0802C3EA:
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
b _0802C442
_0802C3F4:
ldrb r0, [r4, #0xb]
cmp r0, #0
beq _0802C442
adds r0, r4, #0
bl sub_08049FA0
cmp r0, #0
bne _0802C442
movs r6, #0
movs r5, #1
_0802C408:
adds r0, r4, #0
movs r1, #0x15
movs r2, #0
bl CreateFx
adds r2, r0, #0
cmp r2, #0
beq _0802C420
ldrh r0, [r2, #0x2e]
adds r0, #0xc
subs r0, r0, r6
strh r0, [r2, #0x2e]
_0802C420:
adds r6, #0x18
subs r5, #1
cmp r5, #0
bge _0802C408
adds r0, r4, #0
bl sub_0802C62C
bl Random
movs r1, #0xff
ands r0, r1
movs r2, #0x80
lsls r2, r2, #1
adds r1, r2, #0
orrs r0, r1
strh r0, [r7]
b _0802C4AA
_0802C442:
ldr r0, _0802C45C @ =gRoomControls
ldrh r1, [r0, #8]
ldrh r0, [r0, #0x20]
adds r1, r1, r0
movs r5, #0x32
ldrsh r0, [r4, r5]
subs r5, r1, r0
cmp r5, #4
ble _0802C460
adds r0, r4, #0
bl sub_080AEFB4
b _0802C48C
.align 2, 0
_0802C45C: .4byte gRoomControls
_0802C460:
adds r0, r4, #0
bl sub_0806F69C
movs r1, #0x36
ldrsh r0, [r4, r1]
subs r0, r0, r5
cmp r0, #0x38
ble _0802C48C
adds r0, r4, #0
bl sub_0802C62C
bl Random
movs r1, #0x7f
ands r0, r1
movs r1, #0x80
orrs r0, r1
strh r0, [r7]
ldrb r0, [r4, #0xa]
cmp r0, #3
bne _0802C48C
strb r0, [r4, #0xc]
_0802C48C:
adds r1, r4, #0
adds r1, #0x38
movs r0, #3
strb r0, [r1]
adds r2, r4, #0
adds r2, #0x29
ldrb r1, [r2]
subs r0, #0xb
ands r0, r1
movs r1, #1
orrs r0, r1
strb r0, [r2]
adds r0, r4, #0
bl UpdateSpriteForCollisionLayer
_0802C4AA:
pop {r4, r5, r6, r7, pc}
.syntax divided
@@ -0,0 +1,47 @@
.syntax unified
.text
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
cmp r0, #0
beq _0802BD9C
subs r0, #1
strb r0, [r4, #0xe]
b _0802BDDE
_0802BD9C:
adds r0, r4, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _0802BDCA
adds r0, r4, #0
movs r1, #1
movs r2, #0x10
bl sub_0804A024
adds r1, r0, #0
cmp r1, #0xff
beq _0802BDCA
adds r0, r4, #0
adds r0, #0x79
ldrb r0, [r0]
cmp r1, r0
beq _0802BDCA
adds r0, r4, #0
bl sub_0802C058
b _0802BDDE
_0802BDCA:
adds r0, r4, #0
bl sub_0802C020
adds r1, r0, #0
ldrb r0, [r4, #0x15]
cmp r1, r0
beq _0802BDDE
adds r0, r4, #0
bl sub_0802C058
_0802BDDE:
pop {r4, pc}
.syntax divided
@@ -0,0 +1,81 @@
.syntax unified
.text
push {r4, r5, lr}
adds r4, r0, #0
ldr r2, _08028198 @ =gPlayerState
movs r1, #0
movs r0, #0x41
strb r0, [r2, #2]
strb r1, [r2, #0xa]
ldr r0, [r2, #0x30]
subs r1, #0x11
ands r0, r1
str r0, [r2, #0x30]
ldr r0, _0802819C @ =gPlayerEntity
mov ip, r0
ldrb r0, [r0, #0x10]
movs r1, #0x80
orrs r0, r1
mov r1, ip
strb r0, [r1, #0x10]
movs r0, #0xc0
lsls r0, r0, #9
str r0, [r1, #0x20]
adds r1, #0x3d
movs r0, #0xc4
strb r0, [r1]
movs r3, #0
mov r2, ip
ldrb r0, [r2, #0x14]
lsls r0, r0, #2
strb r0, [r2, #0x15]
adds r0, r4, #0
adds r0, #0x83
ldrb r0, [r0]
mov r5, ip
adds r5, #0x29
movs r1, #7
ands r1, r0
lsls r1, r1, #3
ldrb r2, [r5]
movs r0, #0x39
rsbs r0, r0, #0
ands r0, r2
orrs r0, r1
strb r0, [r5]
mov r1, ip
adds r1, #0x63
movs r0, #0
ldrsb r0, [r1, r0]
mov r2, ip
strh r0, [r2, #0x36]
strb r3, [r1]
movs r0, #4
strb r0, [r4, #0xc]
movs r0, #0x50
strb r0, [r4, #0xe]
strb r3, [r4, #0xf]
adds r2, r4, #0
adds r2, #0x3b
ldrb r1, [r2]
movs r0, #2
orrs r0, r1
strb r0, [r2]
adds r1, r4, #0
adds r1, #0x3d
movs r0, #0
ldrsb r0, [r1, r0]
cmp r0, #0
bne _08028196
movs r0, #0xee
strb r0, [r1]
_08028196:
pop {r4, r5, pc}
.align 2, 0
_08028198: .4byte gPlayerState
_0802819C: .4byte gPlayerEntity
.syntax divided
@@ -0,0 +1,115 @@
.syntax unified
.text
push {r4, r5, r6, r7, lr}
mov r7, sl
mov r6, sb
mov r5, r8
push {r5, r6, r7}
sub sp, #8
adds r5, r0, #0
ldrb r0, [r5, #0x15]
lsrs r0, r0, #3
lsls r1, r0, #1
adds r1, r1, r0
ldr r0, _08029EE0 @ =gUnk_080CCDC8
adds r1, r1, r0
str r1, [sp]
bl Random
movs r1, #1
ands r1, r0
lsls r1, r1, #1
subs r1, #1
mov sl, r1
bl Random
adds r1, r0, #0
movs r0, #0xf
ands r0, r1
movs r1, #3
bl __modsi3
mov sb, r0
movs r1, #0x2e
ldrsh r0, [r5, r1]
ldr r3, _08029EE4 @ =gRoomControls
ldrh r1, [r3, #6]
subs r0, r0, r1
asrs r0, r0, #4
mov r8, r0
movs r2, #0x3f
ands r0, r2
mov r8, r0
movs r1, #0x32
ldrsh r0, [r5, r1]
ldrh r1, [r3, #8]
subs r0, r0, r1
asrs r0, r0, #4
ands r0, r2
lsls r0, r0, #6
mov r1, r8
orrs r1, r0
mov r8, r1
movs r7, #0
_08029E72:
ldr r0, [sp]
add r0, sb
ldrb r4, [r0]
lsrs r0, r4, #3
lsls r0, r0, #1
ldr r1, _08029EE8 @ =gUnk_080B4488
adds r0, r0, r1
movs r1, #0
ldrsh r0, [r0, r1]
add r0, r8
adds r1, r5, #0
adds r1, #0x38
ldrb r1, [r1]
bl sub_080002E0
adds r6, r5, #0
adds r6, #0x74
cmp r0, #0
bne _08029EA6
str r4, [sp, #4]
ldrb r1, [r5, #0x15]
ldrb r0, [r6]
subs r0, r1, r0
subs r1, r4, r1
cmp r0, r1
bne _08029EBA
_08029EA6:
mov r0, sb
add r0, sl
adds r0, #3
movs r1, #3
bl __modsi3
mov sb, r0
adds r7, #1
cmp r7, #2
bls _08029E72
_08029EBA:
cmp r7, #3
bne _08029EC0
ldr r4, [sp, #4]
_08029EC0:
ldrb r1, [r5, #0x15]
ldrb r0, [r6]
cmp r0, r1
beq _08029ECA
strb r1, [r6]
_08029ECA:
strb r4, [r5, #0x15]
adds r0, r5, #0
bl sub_08029F0C
add sp, #8
pop {r3, r4, r5}
mov r8, r3
mov sb, r4
mov sl, r5
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08029EE0: .4byte gUnk_080CCDC8
_08029EE4: .4byte gRoomControls
_08029EE8: .4byte gUnk_080B4488
.syntax divided
@@ -1,77 +0,0 @@
.syntax unified
.text
push {r4, lr}
adds r4, r0, #0
movs r0, #1
bl sub_08049DF4
adds r2, r0, #0
cmp r2, #0
beq _08025922
movs r0, #0x2e
ldrsh r1, [r2, r0]
movs r3, #0x2e
ldrsh r0, [r4, r3]
subs r3, r1, r0
adds r0, r3, #0
muls r0, r3, r0
adds r3, r0, #0
movs r1, #0x32
ldrsh r0, [r2, r1]
movs r2, #0x32
ldrsh r1, [r4, r2]
subs r0, r0, r1
adds r1, r0, #0
muls r1, r0, r1
adds r0, r1, #0
adds r3, r3, r0
adds r0, r4, #0
adds r0, #0x84
ldrh r0, [r0]
cmp r0, #0
bne _0802591A
adds r0, r4, #0
adds r0, #0x81
ldrb r1, [r0]
cmp r1, #0
bne _0802591A
movs r0, #0x80
lsls r0, r0, #3
cmp r3, r0
bgt _0802591A
movs r0, #9
strb r0, [r4, #0xc]
strb r1, [r4, #0xe]
b _08025942
_0802591A:
movs r0, #0x90
lsls r0, r0, #4
cmp r3, r0
ble _08025926
_08025922:
movs r0, #0
b _08025944
_08025926:
movs r0, #0xb
strb r0, [r4, #0xc]
movs r0, #1
strb r0, [r4, #0xe]
bl Random
ldr r2, _08025948 @ =gUnk_080CC050
movs r1, #0xf
ands r1, r0
adds r1, r1, r2
ldrb r1, [r1]
adds r0, r4, #0
adds r0, #0x78
strh r1, [r0]
_08025942:
movs r0, #1
_08025944:
pop {r4, pc}
.align 2, 0
_08025948: .4byte gUnk_080CC050
.syntax divided
@@ -0,0 +1,104 @@
.syntax unified
.text
push {r4, r5, r6, lr}
adds r4, r0, #0
movs r1, #0
strb r1, [r4, #0xf]
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #1
bne _080286B0
bl Random
ldr r2, _08028650 @ =gUnk_080CC7BC
movs r1, #3
ands r1, r0
adds r1, r1, r2
ldrb r0, [r1]
strb r0, [r4, #0xe]
movs r0, #0x80
strh r0, [r4, #0x24]
adds r0, r4, #0
bl sub_08049FA0
cmp r0, #0
beq _08028658
bl Random
ldr r2, _08028654 @ =gUnk_080CC7D0
movs r1, #7
ands r1, r0
adds r1, r1, r2
movs r0, #0
ldrsb r0, [r1, r0]
adds r0, #0x18
ldrb r1, [r4, #0x15]
adds r0, r0, r1
movs r1, #0x18
ands r0, r1
strb r0, [r4, #0x15]
b _080286B8
.align 2, 0
_08028650: .4byte gUnk_080CC7BC
_08028654: .4byte gUnk_080CC7D0
_08028658:
adds r0, r4, #0
bl sub_08049EE4
adds r5, r0, #0
adds r6, r4, #0
adds r6, #0x83
ldrb r0, [r6]
cmp r0, #0
bne _08028684
bl Random
ldr r2, _08028680 @ =gUnk_080CC7C0
movs r1, #0xf
ands r1, r0
adds r1, r1, r2
movs r0, #0
ldrsb r0, [r1, r0]
adds r5, r5, r0
b _080286A2
.align 2, 0
_08028680: .4byte gUnk_080CC7C0
_08028684:
bl Random
ldr r2, _080286AC @ =gUnk_080CC7C0
movs r1, #7
ands r1, r0
adds r1, r1, r2
movs r0, #0
ldrsb r0, [r1, r0]
adds r5, r5, r0
ldrb r0, [r4, #0xe]
adds r0, #0x10
strb r0, [r4, #0xe]
ldrb r0, [r6]
subs r0, #1
strb r0, [r6]
_080286A2:
adds r0, r5, #4
movs r1, #0x18
ands r0, r1
strb r0, [r4, #0x15]
b _080286B8
.align 2, 0
_080286AC: .4byte gUnk_080CC7C0
_080286B0:
movs r0, #0xc
strb r0, [r4, #0xe]
strh r1, [r4, #0x24]
ldrb r0, [r4, #0x15]
_080286B8:
lsrs r5, r0, #2
ldrb r0, [r4, #0x14]
cmp r5, r0
beq _080286C8
strb r5, [r4, #0x14]
adds r0, r4, #0
bl sub_080287E0
_080286C8:
pop {r4, r5, r6, pc}
.align 2, 0
.syntax divided
-238
View File
@@ -1,238 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start SensorBladeTrap
SensorBladeTrap: @ 0x0802B9D4
push {lr}
ldr r2, _0802B9E8 @ =gUnk_080CD3C4
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802B9E8: .4byte gUnk_080CD3C4
thumb_func_start sub_0802B9EC
sub_0802B9EC: @ 0x0802B9EC
adds r2, r0, #0
movs r0, #1
strb r0, [r2, #0xc]
ldr r1, _0802BA14 @ =gUnk_080CD3D4
ldrb r0, [r2, #0xa]
lsls r0, r0, #1
adds r0, r0, r1
ldrh r1, [r0]
adds r0, r2, #0
adds r0, #0x78
strh r1, [r0]
adds r0, #0xc
ldrh r1, [r0]
subs r0, #8
strh r1, [r0]
adds r0, #0xa
ldrh r1, [r0]
subs r0, #8
strh r1, [r0]
bx lr
.align 2, 0
_0802BA14: .4byte gUnk_080CD3D4
thumb_func_start sub_0802BA18
sub_0802BA18: @ 0x0802BA18
push {r4, r5, lr}
adds r4, r0, #0
movs r1, #1
movs r2, #0xe
bl sub_0804A024
adds r5, r0, #0
cmp r5, #0xff
beq _0802BA88
adds r0, r4, #0
adds r1, r5, #0
bl sub_0802BB2C
cmp r0, #0
bne _0802BA88
movs r0, #2
strb r0, [r4, #0xc]
adds r0, r4, #0
adds r0, #0x78
ldrh r0, [r0]
strh r0, [r4, #0x24]
strb r5, [r4, #0x15]
lsrs r0, r5, #3
cmp r0, #1
beq _0802BA60
cmp r0, #1
blo _0802BA58
cmp r0, #2
beq _0802BA6C
cmp r0, #3
beq _0802BA78
b _0802BA88
_0802BA58:
adds r1, r4, #0
adds r1, #0x7e
ldrh r0, [r4, #0x32]
b _0802BA7E
_0802BA60:
adds r0, r4, #0
adds r0, #0x7c
ldrh r0, [r0]
ldrh r1, [r4, #0x2e]
adds r0, r0, r1
b _0802BA82
_0802BA6C:
adds r0, r4, #0
adds r0, #0x7e
ldrh r0, [r0]
ldrh r1, [r4, #0x32]
adds r0, r0, r1
b _0802BA82
_0802BA78:
adds r1, r4, #0
adds r1, #0x7c
ldrh r0, [r4, #0x2e]
_0802BA7E:
ldrh r1, [r1]
subs r0, r0, r1
_0802BA82:
adds r1, r4, #0
adds r1, #0x7a
strh r0, [r1]
_0802BA88:
pop {r4, r5, pc}
.align 2, 0
thumb_func_start sub_0802BA8C
sub_0802BA8C: @ 0x0802BA8C
push {r4, lr}
adds r4, r0, #0
bl sub_080AF038
cmp r0, #0
beq _0802BADE
ldrb r0, [r4, #0x15]
lsrs r0, r0, #3
cmp r0, #1
beq _0802BAC4
cmp r0, #1
bgt _0802BAAA
cmp r0, #0
beq _0802BAB4
b _0802BAFA
_0802BAAA:
cmp r0, #2
beq _0802BAD0
cmp r0, #3
beq _0802BAE6
b _0802BAFA
_0802BAB4:
adds r0, r4, #0
adds r0, #0x7a
ldrh r1, [r0]
movs r2, #0x32
ldrsh r0, [r4, r2]
cmp r1, r0
blt _0802BAFA
b _0802BADE
_0802BAC4:
adds r0, r4, #0
adds r0, #0x7a
ldrh r1, [r0]
movs r2, #0x2e
ldrsh r0, [r4, r2]
b _0802BADA
_0802BAD0:
adds r0, r4, #0
adds r0, #0x7a
ldrh r1, [r0]
movs r2, #0x32
ldrsh r0, [r4, r2]
_0802BADA:
cmp r1, r0
bgt _0802BAFA
_0802BADE:
adds r0, r4, #0
bl sub_0802BB10
b _0802BAFA
_0802BAE6:
adds r0, r4, #0
adds r0, #0x7a
ldrh r1, [r0]
movs r2, #0x2e
ldrsh r0, [r4, r2]
cmp r1, r0
blt _0802BAFA
adds r0, r4, #0
bl sub_0802BB10
_0802BAFA:
pop {r4, pc}
thumb_func_start sub_0802BAFC
sub_0802BAFC: @ 0x0802BAFC
push {r4, lr}
adds r4, r0, #0
bl sub_080AF038
cmp r0, #0
bne _0802BB0C
movs r0, #1
strb r0, [r4, #0xc]
_0802BB0C:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802BB10
sub_0802BB10: @ 0x0802BB10
push {lr}
movs r1, #3
strb r1, [r0, #0xc]
movs r1, #0xc0
strh r1, [r0, #0x24]
ldrb r1, [r0, #0x15]
movs r2, #0x10
eors r1, r2
strb r1, [r0, #0x15]
movs r0, #0x74
bl EnqueueSFX
pop {pc}
.align 2, 0
thumb_func_start sub_0802BB2C
sub_0802BB2C: @ 0x0802BB2C
push {r4, lr}
adds r2, r0, #0
adds r0, #0x38
ldrb r0, [r0]
ldr r4, _0802BB60 @ =gUnk_02027EB4
cmp r0, #2
bne _0802BB3C
ldr r4, _0802BB64 @ =gUnk_0200D654
_0802BB3C:
lsrs r3, r1, #2
ldr r0, _0802BB68 @ =gUnk_080CD3DC
adds r3, r3, r0
movs r0, #0x2e
ldrsh r1, [r2, r0]
movs r0, #0
ldrsb r0, [r3, r0]
adds r1, r1, r0
movs r0, #0x32
ldrsh r2, [r2, r0]
movs r0, #1
ldrsb r0, [r3, r0]
adds r2, r2, r0
adds r0, r4, #0
movs r3, #0
bl sub_080AE4CC
pop {r4, pc}
.align 2, 0
_0802BB60: .4byte gUnk_02027EB4
_0802BB64: .4byte gUnk_0200D654
_0802BB68: .4byte gUnk_080CD3DC
-319
View File
@@ -1,319 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Spark
Spark: @ 0x0802B2AC
push {r4, r5, lr}
adds r5, r0, #0
ldr r4, _0802B2C4 @ =gUnk_080CD234
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
_0802B2C4: .4byte gUnk_080CD234
thumb_func_start sub_0802B2C8
sub_0802B2C8: @ 0x0802B2C8
push {lr}
ldr r2, _0802B2DC @ =gUnk_080CD24C
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802B2DC: .4byte gUnk_080CD24C
thumb_func_start sub_0802B2E0
sub_0802B2E0: @ 0x0802B2E0
push {r4, lr}
adds r4, r0, #0
adds r0, #0x41
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
beq _0802B334
movs r2, #0x7f
adds r0, r2, #0
ands r0, r1
cmp r0, #0x14
bne _0802B334
ldrb r1, [r4, #0x10]
adds r0, r2, #0
ands r0, r1
movs r1, #0
strb r0, [r4, #0x10]
adds r0, r4, #0
adds r0, #0x3d
strb r1, [r0]
ldrb r1, [r4, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
strb r0, [r4, #0x18]
movs r0, #2
strb r0, [r4, #0xc]
adds r0, r4, #0
movs r1, #2
movs r2, #0
bl CreateFx
adds r1, r0, #0
cmp r1, #0
beq _0802B334
str r1, [r4, #0x54]
movs r0, #0xe
strb r0, [r4, #0xe]
adds r0, r4, #0
bl CopyPosition
_0802B334:
pop {r4, pc}
.align 2, 0
thumb_func_start nullsub_15
nullsub_15: @ 0x0802B338
bx lr
.align 2, 0
thumb_func_start sub_0802B33C
sub_0802B33C: @ 0x0802B33C
push {r4, lr}
adds r4, r0, #0
bl sub_0804A720
movs r0, #1
strb r0, [r4, #0xc]
ldrb r0, [r4, #0xb]
strb r0, [r4, #0x15]
movs r0, #0x78
strb r0, [r4, #0xf]
adds r0, r4, #0
movs r1, #0
bl InitializeAnimation
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802B35C
sub_0802B35C: @ 0x0802B35C
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
bl ProcessMovement
movs r3, #0
ldrb r0, [r4, #0xa]
cmp r0, #0
bne _0802B374
movs r3, #1
_0802B374:
ldrh r0, [r4, #0x2a]
adds r2, r0, #0
cmp r2, #0
bne _0802B3A4
ldrb r0, [r4, #0xf]
subs r0, #1
strb r0, [r4, #0xf]
lsls r0, r0, #0x18
cmp r0, #0
beq _0802B38A
b _0802B4A6
_0802B38A:
movs r0, #0x78
strb r0, [r4, #0xf]
ldrb r0, [r4, #0x15]
cmp r3, #0
beq _0802B39A
adds r1, r0, #0
adds r1, #8
b _0802B39E
_0802B39A:
adds r1, r0, #0
adds r1, #0x18
_0802B39E:
movs r0, #0x18
ands r0, r1
b _0802B4A4
_0802B3A4:
movs r0, #0x78
strb r0, [r4, #0xf]
ldrb r0, [r4, #0x15]
movs r1, #0x18
ands r1, r0
cmp r1, #8
beq _0802B474
cmp r1, #8
bgt _0802B3BC
cmp r1, #0
beq _0802B3C6
b _0802B4A6
_0802B3BC:
cmp r1, #0x10
beq _0802B404
cmp r1, #0x18
beq _0802B442
b _0802B4A6
_0802B3C6:
movs r0, #0xe
ands r0, r2
cmp r0, #0
beq _0802B3D8
movs r0, #8
cmp r3, #0
beq _0802B4A4
movs r0, #0x18
b _0802B4A4
_0802B3D8:
movs r0, #0xe0
lsls r0, r0, #8
ands r0, r2
movs r1, #0x80
lsls r1, r1, #7
cmp r0, r1
bne _0802B3EE
cmp r3, #0
beq _0802B3EE
movs r0, #8
strb r0, [r4, #0x15]
_0802B3EE:
movs r0, #0xe0
lsls r0, r0, #4
ands r0, r2
movs r1, #0x80
lsls r1, r1, #3
cmp r0, r1
bne _0802B4A6
cmp r3, #0
bne _0802B4A6
movs r0, #0x18
b _0802B4A4
_0802B404:
movs r0, #0xe0
ands r0, r2
cmp r0, #0
beq _0802B416
movs r0, #0x18
cmp r3, #0
beq _0802B4A4
movs r0, #8
b _0802B4A4
_0802B416:
movs r0, #0xe0
lsls r0, r0, #8
ands r0, r2
movs r1, #0x80
lsls r1, r1, #6
cmp r0, r1
bne _0802B42C
cmp r3, #0
bne _0802B42C
movs r0, #8
strb r0, [r4, #0x15]
_0802B42C:
movs r0, #0xe0
lsls r0, r0, #4
ands r0, r2
movs r1, #0x80
lsls r1, r1, #2
cmp r0, r1
bne _0802B4A6
cmp r3, #0
beq _0802B4A6
movs r0, #0x18
b _0802B4A4
_0802B442:
movs r1, #0xe0
lsls r1, r1, #4
ands r1, r2
cmp r1, #0
beq _0802B458
rsbs r0, r3, #0
orrs r0, r3
asrs r0, r0, #0x1f
movs r1, #0x10
ands r0, r1
b _0802B4A4
_0802B458:
movs r0, #0xe
ands r0, r2
cmp r0, #4
bne _0802B466
cmp r3, #0
beq _0802B466
strb r1, [r4, #0x15]
_0802B466:
movs r0, #0xe0
ands r0, r2
cmp r0, #0x40
bne _0802B4A6
cmp r3, #0
bne _0802B4A6
b _0802B4A2
_0802B474:
movs r0, #0xe0
lsls r0, r0, #8
ands r0, r2
cmp r0, #0
beq _0802B488
movs r0, #0
cmp r3, #0
bne _0802B4A4
movs r0, #0x10
b _0802B4A4
_0802B488:
movs r0, #0xe
ands r0, r2
cmp r0, #2
bne _0802B496
cmp r3, #0
bne _0802B496
strb r3, [r4, #0x15]
_0802B496:
movs r0, #0xe0
ands r0, r2
cmp r0, #0x20
bne _0802B4A6
cmp r3, #0
beq _0802B4A6
_0802B4A2:
movs r0, #0x10
_0802B4A4:
strb r0, [r4, #0x15]
_0802B4A6:
pop {r4, pc}
thumb_func_start sub_0802B4A8
sub_0802B4A8: @ 0x0802B4A8
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802B4D6
adds r0, r4, #0
movs r1, #0
movs r2, #0x60
movs r3, #0
bl CreateObjectWithParent
adds r1, r0, #0
cmp r1, #0
beq _0802B4D0
ldrh r0, [r1, #0x32]
subs r0, #4
strh r0, [r1, #0x32]
_0802B4D0:
adds r0, r4, #0
bl DeleteEntity
_0802B4D6:
pop {r4, pc}
-921
View File
@@ -1,921 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start SpearMoblin
SpearMoblin: @ 0x0802823C
push {r4, lr}
adds r4, r0, #0
ldr r1, _08028268 @ =gUnk_080CC790
bl EnemyFunctionHandler
movs r3, #0x20
rsbs r3, r3, #0
adds r0, r4, #0
movs r1, #0
movs r2, #1
bl SetChildOffset
ldr r1, [r4, #0x54]
cmp r1, #0
beq _08028266
ldr r0, [r1, #4]
cmp r0, #0
beq _08028266
adds r0, r4, #0
bl CopyPosition
_08028266:
pop {r4, pc}
.align 2, 0
_08028268: .4byte gUnk_080CC790
thumb_func_start sub_0802826C
sub_0802826C: @ 0x0802826C
push {lr}
ldr r2, _08028280 @ =gUnk_080CC7A8
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_08028280: .4byte gUnk_080CC7A8
thumb_func_start sub_08028284
sub_08028284: @ 0x08028284
push {r4, r5, lr}
adds r4, r0, #0
adds r0, #0x43
ldrb r0, [r0]
cmp r0, #0
beq _08028298
adds r0, r4, #0
movs r1, #0x1c
bl sub_0804A9FC
_08028298:
ldr r1, _080282BC @ =gUnk_080CC790
adds r0, r4, #0
bl sub_0804AA30
adds r0, r4, #0
adds r0, #0x41
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
beq _080282DE
ldrb r0, [r4, #0xc]
cmp r0, #4
beq _080282C0
adds r0, r4, #0
bl sub_08028754
b _080282DE
.align 2, 0
_080282BC: .4byte gUnk_080CC790
_080282C0:
movs r0, #0x3f
ands r0, r1
cmp r0, #0
bne _080282DE
adds r1, r4, #0
adds r1, #0x7a
ldrb r0, [r1]
adds r0, #1
strb r0, [r1]
adds r1, #7
movs r0, #0x16
strb r0, [r1]
adds r0, r4, #0
bl sub_08028784
_080282DE:
ldr r0, [r4, #0x54]
adds r1, r4, #0
adds r1, #0x3d
ldrb r1, [r1]
adds r0, #0x3d
strb r1, [r0]
adds r0, r4, #0
adds r0, #0x45
ldrb r5, [r0]
cmp r5, #0
bne _0802830C
movs r0, #0
strh r5, [r4, #0x24]
adds r1, r4, #0
adds r1, #0x82
strb r0, [r1]
adds r0, r4, #0
bl sub_080287E0
ldr r0, [r4, #0x54]
bl DeleteEntity
str r5, [r4, #0x54]
_0802830C:
pop {r4, r5, pc}
.align 2, 0
thumb_func_start nullsub_13
nullsub_13: @ 0x08028310
bx lr
.align 2, 0
thumb_func_start sub_08028314
sub_08028314: @ 0x08028314
push {r4, lr}
adds r4, r0, #0
bl sub_0804A720
movs r1, #0
movs r2, #1
strb r2, [r4, #0xc]
strb r1, [r4, #0x14]
adds r0, r4, #0
adds r0, #0x7b
strb r1, [r0]
adds r0, #5
strb r1, [r0]
adds r0, #3
strb r1, [r0]
subs r0, #2
strb r1, [r0]
subs r0, #7
strb r1, [r0]
adds r0, #8
strb r2, [r0]
ldrb r0, [r4, #0xe]
cmp r0, #0
beq _0802835E
ldrb r1, [r4, #0xb]
lsls r0, r1, #1
strb r0, [r4, #0x14]
movs r0, #0x1e
strb r0, [r4, #0xe]
movs r0, #0x80
strh r0, [r4, #0x24]
lsls r1, r1, #3
strb r1, [r4, #0x15]
adds r0, r4, #0
bl sub_080287E0
b _08028368
_0802835E:
movs r0, #0x10
strb r0, [r4, #0x14]
adds r0, r4, #0
bl sub_08028604
_08028368:
movs r0, #3
bl sub_080A7EE0
cmp r0, #0
beq _08028376
str r4, [r0, #0x50]
str r0, [r4, #0x54]
_08028376:
pop {r4, pc}
thumb_func_start sub_08028378
sub_08028378: @ 0x08028378
push {r4, lr}
adds r4, r0, #0
adds r1, r4, #0
adds r1, #0x81
ldrb r0, [r1]
cmp r0, #0
beq _0802838A
subs r0, #1
strb r0, [r1]
_0802838A:
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
movs r2, #0xff
lsls r0, r0, #0x18
cmp r0, #0
bne _080283B8
adds r1, r4, #0
adds r1, #0x80
ldrb r0, [r1]
adds r0, #1
strb r0, [r1]
ands r0, r2
cmp r0, #0xf
bls _080283B0
adds r0, r4, #0
bl sub_08028728
b _080283FC
_080283B0:
adds r0, r4, #0
bl sub_08028604
b _080283FC
_080283B8:
adds r0, r4, #0
bl sub_080286CC
cmp r0, #0
beq _080283CE
adds r2, r4, #0
adds r2, #0x7b
ldrb r0, [r2]
movs r1, #1
orrs r0, r1
strb r0, [r2]
_080283CE:
adds r0, r4, #0
bl sub_080288A4
cmp r0, #0
beq _080283FC
ldrh r1, [r4, #0x2a]
adds r0, r4, #0
bl sub_0800417E
ldrb r0, [r4, #0x15]
adds r0, #4
movs r1, #0x18
ands r0, r1
asrs r0, r0, #2
strb r0, [r4, #0x14]
adds r1, r4, #0
adds r1, #0x83
ldrb r0, [r1]
adds r0, #1
strb r0, [r1]
adds r0, r4, #0
bl sub_080287E0
_080283FC:
ldrb r0, [r4, #0xf]
cmp r0, #0xb
bls _08028414
adds r0, r4, #0
adds r0, #0x7b
ldrb r0, [r0]
cmp r0, #0
beq _08028418
adds r0, r4, #0
bl sub_08028754
b _08028418
_08028414:
adds r0, #1
strb r0, [r4, #0xf]
_08028418:
adds r0, r4, #0
bl sub_08028858
pop {r4, pc}
thumb_func_start sub_08028420
sub_08028420: @ 0x08028420
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
lsrs r1, r0, #0x18
cmp r1, #0
bne _0802844C
movs r0, #3
strb r0, [r4, #0xc]
adds r0, r4, #0
adds r0, #0x82
strb r1, [r0]
subs r0, #2
strb r1, [r0]
movs r0, #0x10
strb r0, [r4, #0x14]
adds r0, r4, #0
bl sub_08028604
b _08028462
_0802844C:
adds r0, r4, #0
bl sub_080286CC
cmp r0, #0
beq _08028462
adds r2, r4, #0
adds r2, #0x7b
ldrb r0, [r2]
movs r1, #1
orrs r0, r1
strb r0, [r2]
_08028462:
ldrb r0, [r4, #0xf]
cmp r0, #0xb
bls _0802847A
adds r0, r4, #0
adds r0, #0x7b
ldrb r0, [r0]
cmp r0, #0
beq _0802847E
adds r0, r4, #0
bl sub_08028754
b _0802847E
_0802847A:
adds r0, #1
strb r0, [r4, #0xf]
_0802847E:
adds r0, r4, #0
bl sub_08028858
pop {r4, pc}
.align 2, 0
thumb_func_start sub_08028488
sub_08028488: @ 0x08028488
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
lsrs r2, r0, #0x18
cmp r2, #0
bne _08028520
adds r0, r4, #0
adds r0, #0x82
ldrb r1, [r0]
adds r3, r0, #0
cmp r1, #2
beq _080284D2
cmp r1, #2
ble _080284F0
cmp r1, #3
beq _080284B4
cmp r1, #4
beq _080284E6
b _080284F0
_080284B4:
movs r0, #4
strb r0, [r4, #0xc]
movs r0, #0xc0
lsls r0, r0, #1
strh r0, [r4, #0x24]
adds r0, r4, #0
movs r1, #1
bl sub_08049F84
strb r0, [r4, #0x15]
movs r0, #0x8f
lsls r0, r0, #1
bl EnqueueSFX
b _0802850A
_080284D2:
strb r1, [r4, #0xc]
strh r2, [r4, #0x24]
bl Random
movs r1, #7
ands r0, r1
lsls r1, r0, #1
adds r1, r1, r0
adds r1, #0x40
b _08028508
_080284E6:
ldrb r0, [r4, #0x15]
adds r0, #0x10
movs r1, #0x18
ands r0, r1
strb r0, [r4, #0x15]
_080284F0:
movs r0, #1
strb r0, [r4, #0xc]
strb r0, [r3]
movs r0, #0x80
strh r0, [r4, #0x24]
bl Random
movs r1, #7
ands r0, r1
lsls r1, r0, #1
adds r1, r1, r0
adds r1, #0x22
_08028508:
strb r1, [r4, #0xe]
_0802850A:
movs r0, #0
strb r0, [r4, #0xf]
ldrb r0, [r4, #0x15]
adds r0, #4
movs r1, #0x18
ands r0, r1
asrs r0, r0, #2
strb r0, [r4, #0x14]
adds r0, r4, #0
bl sub_080287E0
_08028520:
adds r0, r4, #0
bl sub_08028858
pop {r4, pc}
thumb_func_start sub_08028528
sub_08028528: @ 0x08028528
push {r4, r5, r6, lr}
adds r4, r0, #0
movs r0, #1
bl sub_08049DF4
adds r5, r0, #0
cmp r5, #0
bne _08028542
strb r5, [r4, #0xf]
adds r0, r4, #0
bl sub_08028728
b _08028600
_08028542:
adds r0, r4, #0
bl sub_080288C0
ldr r1, _08028590 @ =gUnk_080CC944
ldrb r0, [r4, #0x14]
lsrs r0, r0, #1
lsls r0, r0, #2
adds r0, r0, r1
ldr r2, [r0]
ldr r1, [r4, #0x48]
ldrb r0, [r2]
strb r0, [r1]
ldr r1, [r4, #0x48]
ldrb r0, [r2, #1]
strb r0, [r1, #1]
ldr r1, [r4, #0x48]
ldrb r0, [r2, #6]
strb r0, [r1, #6]
ldr r1, [r4, #0x48]
ldrb r0, [r2, #7]
strb r0, [r1, #7]
adds r0, r4, #0
adds r0, #0x7a
ldrb r1, [r0]
adds r6, r0, #0
cmp r1, #0
beq _08028594
movs r0, #0
strb r0, [r6]
adds r1, r4, #0
adds r1, #0x81
movs r0, #0x16
strb r0, [r1]
adds r0, r4, #0
bl sub_08028784
adds r1, r4, #0
adds r1, #0x7b
b _080285EE
.align 2, 0
_08028590: .4byte gUnk_080CC944
_08028594:
ldrb r0, [r4, #0xe]
adds r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
lsrs r0, r0, #0x18
cmp r0, #0x20
bne _080285BC
strb r1, [r4, #0xe]
adds r0, r4, #0
adds r1, r5, #0
bl GetFacingDirection
adds r5, r0, #0
ldrb r0, [r4, #0x15]
adds r1, r5, #0
bl sub_08028828
cmp r0, #0
beq _080285BC
strb r5, [r4, #0x15]
_080285BC:
ldrb r1, [r4, #0xe]
movs r0, #7
ands r0, r1
cmp r0, #0
bne _080285D6
movs r0, #0xf0
bl EnqueueSFX
adds r0, r4, #0
movs r1, #2
movs r2, #0x40
bl CreateFx
_080285D6:
adds r1, r4, #0
adds r1, #0x7b
ldrb r0, [r1]
adds r0, #1
strb r0, [r1]
lsls r0, r0, #0x18
lsrs r0, r0, #0x18
cmp r0, #0x80
bne _080285EE
ldrb r0, [r6]
adds r0, #1
strb r0, [r6]
_080285EE:
ldrb r0, [r1]
cmp r0, #0x20
bls _080285FA
adds r0, r4, #0
bl ProcessMovement
_080285FA:
adds r0, r4, #0
bl GetNextFrame
_08028600:
pop {r4, r5, r6, pc}
.align 2, 0
thumb_func_start sub_08028604
sub_08028604: @ 0x08028604
push {r4, r5, r6, lr}
adds r4, r0, #0
movs r1, #0
strb r1, [r4, #0xf]
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #1
bne _080286B0
bl Random
ldr r2, _08028650 @ =gUnk_080CC7BC
movs r1, #3
ands r1, r0
adds r1, r1, r2
ldrb r0, [r1]
strb r0, [r4, #0xe]
movs r0, #0x80
strh r0, [r4, #0x24]
adds r0, r4, #0
bl sub_08049FA0
cmp r0, #0
beq _08028658
bl Random
ldr r2, _08028654 @ =gUnk_080CC7D0
movs r1, #7
ands r1, r0
adds r1, r1, r2
movs r0, #0
ldrsb r0, [r1, r0]
adds r0, #0x18
ldrb r1, [r4, #0x15]
adds r0, r0, r1
movs r1, #0x18
ands r0, r1
strb r0, [r4, #0x15]
b _080286B8
.align 2, 0
_08028650: .4byte gUnk_080CC7BC
_08028654: .4byte gUnk_080CC7D0
_08028658:
adds r0, r4, #0
bl sub_08049EE4
adds r5, r0, #0
adds r6, r4, #0
adds r6, #0x83
ldrb r0, [r6]
cmp r0, #0
bne _08028684
bl Random
ldr r2, _08028680 @ =gUnk_080CC7C0
movs r1, #0xf
ands r1, r0
adds r1, r1, r2
movs r0, #0
ldrsb r0, [r1, r0]
adds r5, r5, r0
b _080286A2
.align 2, 0
_08028680: .4byte gUnk_080CC7C0
_08028684:
bl Random
ldr r2, _080286AC @ =gUnk_080CC7C0
movs r1, #7
ands r1, r0
adds r1, r1, r2
movs r0, #0
ldrsb r0, [r1, r0]
adds r5, r5, r0
ldrb r0, [r4, #0xe]
adds r0, #0x10
strb r0, [r4, #0xe]
ldrb r0, [r6]
subs r0, #1
strb r0, [r6]
_080286A2:
adds r0, r5, #4
movs r1, #0x18
ands r0, r1
strb r0, [r4, #0x15]
b _080286B8
.align 2, 0
_080286AC: .4byte gUnk_080CC7C0
_080286B0:
movs r0, #0xc
strb r0, [r4, #0xe]
strh r1, [r4, #0x24]
ldrb r0, [r4, #0x15]
_080286B8:
lsrs r5, r0, #2
ldrb r0, [r4, #0x14]
cmp r5, r0
beq _080286C8
strb r5, [r4, #0x14]
adds r0, r4, #0
bl sub_080287E0
_080286C8:
pop {r4, r5, r6, pc}
.align 2, 0
thumb_func_start sub_080286CC
sub_080286CC: @ 0x080286CC
push {r4, r5, lr}
adds r5, r0, #0
adds r0, #0x81
ldrb r0, [r0]
cmp r0, #0
bne _08028724
movs r0, #1
bl sub_08049DF4
adds r4, r0, #0
cmp r4, #0
beq _08028724
adds r0, r5, #0
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #2
bne _080286FC
adds r0, r5, #0
adds r1, r4, #0
movs r2, #0x30
bl sub_0806FC80
cmp r0, #0
bne _08028720
_080286FC:
adds r0, r5, #0
adds r1, r4, #0
movs r2, #0x40
bl sub_0806FC80
cmp r0, #0
beq _08028724
adds r0, r5, #0
adds r1, r4, #0
bl GetFacingDirection
adds r0, #4
movs r1, #0x18
ands r0, r1
lsrs r0, r0, #2
ldrb r5, [r5, #0x14]
cmp r0, r5
bne _08028724
_08028720:
movs r0, #1
b _08028726
_08028724:
movs r0, #0
_08028726:
pop {r4, r5, pc}
thumb_func_start sub_08028728
sub_08028728: @ 0x08028728
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0x15]
adds r0, #4
movs r1, #0x18
ands r0, r1
asrs r0, r0, #2
strb r0, [r4, #0x14]
lsls r0, r0, #2
strb r0, [r4, #0x15]
adds r1, r4, #0
adds r1, #0x83
ldrb r0, [r1]
lsrs r0, r0, #1
strb r0, [r1]
adds r0, r4, #0
bl sub_080287B4
adds r4, #0x82
movs r0, #2
strb r0, [r4]
pop {r4, pc}
thumb_func_start sub_08028754
sub_08028754: @ 0x08028754
push {r4, lr}
adds r4, r0, #0
movs r1, #1
bl sub_08049F84
movs r2, #0
strb r0, [r4, #0x15]
ldrb r0, [r4, #0x15]
adds r0, #4
movs r1, #0x18
ands r0, r1
asrs r0, r0, #2
strb r0, [r4, #0x14]
adds r0, r4, #0
adds r0, #0x83
strb r2, [r0]
adds r0, r4, #0
bl sub_080287B4
adds r4, #0x82
movs r0, #3
strb r0, [r4]
pop {r4, pc}
.align 2, 0
thumb_func_start sub_08028784
sub_08028784: @ 0x08028784
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0x15]
adds r0, #4
movs r1, #0x18
ands r0, r1
asrs r0, r0, #2
movs r1, #0
strb r0, [r4, #0x14]
lsls r0, r0, #2
strb r0, [r4, #0x15]
adds r0, r4, #0
adds r0, #0x83
strb r1, [r0]
adds r0, r4, #0
bl sub_080287B4
ldrb r0, [r4, #0xe]
lsls r0, r0, #1
strb r0, [r4, #0xe]
adds r4, #0x82
movs r0, #4
strb r0, [r4]
pop {r4, pc}
thumb_func_start sub_080287B4
sub_080287B4: @ 0x080287B4
push {lr}
adds r2, r0, #0
movs r1, #0
movs r0, #3
strb r0, [r2, #0xc]
movs r0, #0x20
strb r0, [r2, #0xe]
strb r1, [r2, #0xf]
adds r0, r2, #0
adds r0, #0x80
strb r1, [r0]
subs r0, #5
strb r1, [r0]
movs r0, #0
strh r1, [r2, #0x24]
adds r1, r2, #0
adds r1, #0x82
strb r0, [r1]
adds r0, r2, #0
bl sub_080287E0
pop {pc}
thumb_func_start sub_080287E0
sub_080287E0: @ 0x080287E0
push {lr}
adds r3, r0, #0
ldrb r0, [r3, #0x14]
lsrs r2, r0, #1
adds r0, r3, #0
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #4
bhi _0802881E
lsls r0, r0, #2
ldr r1, _080287FC @ =_08028800
adds r0, r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_080287FC: .4byte _08028800
_08028800: @ jump table
.4byte _0802881E @ case 0
.4byte _08028814 @ case 1
.4byte _0802881C @ case 2
.4byte _08028818 @ case 3
.4byte _08028814 @ case 4
_08028814:
adds r2, #4
b _0802881E
_08028818:
adds r2, #8
b _0802881E
_0802881C:
adds r2, #0xc
_0802881E:
adds r0, r3, #0
adds r1, r2, #0
bl InitializeAnimation
pop {pc}
thumb_func_start sub_08028828
sub_08028828: @ 0x08028828
push {r4, lr}
adds r4, r0, #0
adds r3, r1, #0
adds r0, r3, #4
movs r2, #0x18
ands r0, r2
adds r1, r4, #4
ands r1, r2
cmp r0, r1
bne _08028852
adds r0, r3, #5
movs r1, #7
ands r0, r1
adds r2, r4, #5
ands r2, r1
cmp r0, #2
bhi _08028852
cmp r2, #2
bhi _08028852
movs r0, #1
b _08028854
_08028852:
movs r0, #0
_08028854:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_08028858
sub_08028858: @ 0x08028858
push {r4, lr}
adds r4, r0, #0
bl sub_080288C0
ldr r1, _080288A0 @ =gUnk_080CC944
ldrb r0, [r4, #0x14]
lsrs r0, r0, #1
lsls r0, r0, #2
adds r0, r0, r1
ldr r2, [r0]
ldr r1, [r4, #0x48]
ldrb r0, [r2]
strb r0, [r1]
ldr r1, [r4, #0x48]
ldrb r0, [r2, #1]
strb r0, [r1, #1]
ldr r1, [r4, #0x48]
ldrb r0, [r2, #6]
strb r0, [r1, #6]
ldr r1, [r4, #0x48]
ldrb r0, [r2, #7]
strb r0, [r1, #7]
adds r0, r4, #0
adds r0, #0x82
ldrb r0, [r0]
cmp r0, #0
bne _08028890
strh r0, [r4, #0x24]
_08028890:
adds r0, r4, #0
bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
pop {r4, pc}
.align 2, 0
_080288A0: .4byte gUnk_080CC944
thumb_func_start sub_080288A4
sub_080288A4: @ 0x080288A4
ldr r2, _080288BC @ =gUnk_080CC7D8
ldrb r1, [r0, #0x14]
lsrs r1, r1, #1
lsls r1, r1, #1
adds r1, r1, r2
ldrh r0, [r0, #0x2a]
ldrh r1, [r1]
ands r1, r0
rsbs r0, r1, #0
orrs r0, r1
lsrs r0, r0, #0x1f
bx lr
.align 2, 0
_080288BC: .4byte gUnk_080CC7D8
thumb_func_start sub_080288C0
sub_080288C0: @ 0x080288C0
push {lr}
mov ip, r0
ldr r2, [r0, #0x54]
cmp r2, #0
beq _08028908
adds r0, r2, #0
adds r0, #0x41
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
beq _08028908
adds r0, r2, #0
adds r0, #0x3e
ldrb r0, [r0]
mov r1, ip
adds r1, #0x3e
strb r0, [r1]
adds r0, r2, #0
adds r0, #0x3d
ldrb r0, [r0]
rsbs r0, r0, #0
subs r1, #1
strb r0, [r1]
adds r0, r2, #0
adds r0, #0x46
ldrh r0, [r0]
adds r1, #9
movs r3, #0
strh r0, [r1]
adds r2, #0x42
ldrb r1, [r2]
mov r0, ip
adds r0, #0x42
strb r1, [r0]
strb r3, [r2]
_08028908:
pop {pc}
.align 2, 0
-500
View File
@@ -1,500 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start SpikedBeetle
SpikedBeetle: @ 0x0802B5F0
push {r4, lr}
adds r4, r0, #0
ldr r1, _0802B60C @ =gUnk_080CD2D8
bl EnemyFunctionHandler
movs r3, #0x10
rsbs r3, r3, #0
adds r0, r4, #0
movs r1, #0
movs r2, #1
bl SetChildOffset
pop {r4, pc}
.align 2, 0
_0802B60C: .4byte gUnk_080CD2D8
thumb_func_start sub_0802B610
sub_0802B610: @ 0x0802B610
push {lr}
ldr r2, _0802B624 @ =gUnk_080CD2F0
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802B624: .4byte gUnk_080CD2F0
thumb_func_start sub_0802B628
sub_0802B628: @ 0x0802B628
push {r4, lr}
adds r4, r0, #0
adds r0, #0x41
ldrb r0, [r0]
movs r1, #0x7f
ands r1, r0
cmp r1, #0x1d
bhi _0802B706
lsls r0, r1, #2
ldr r1, _0802B644 @ =_0802B648
adds r0, r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0802B644: .4byte _0802B648
_0802B648: @ jump table
.4byte _0802B6C0 @ case 0
.4byte _0802B706 @ case 1
.4byte _0802B6CC @ case 2
.4byte _0802B6CC @ case 3
.4byte _0802B6C0 @ case 4
.4byte _0802B6C0 @ case 5
.4byte _0802B6C0 @ case 6
.4byte _0802B706 @ case 7
.4byte _0802B6C0 @ case 8
.4byte _0802B6C0 @ case 9
.4byte _0802B6C0 @ case 10
.4byte _0802B6C0 @ case 11
.4byte _0802B6C0 @ case 12
.4byte _0802B706 @ case 13
.4byte _0802B706 @ case 14
.4byte _0802B706 @ case 15
.4byte _0802B706 @ case 16
.4byte _0802B706 @ case 17
.4byte _0802B706 @ case 18
.4byte _0802B706 @ case 19
.4byte _0802B706 @ case 20
.4byte _0802B706 @ case 21
.4byte _0802B6CC @ case 22
.4byte _0802B706 @ case 23
.4byte _0802B6CC @ case 24
.4byte _0802B6CC @ case 25
.4byte _0802B6CC @ case 26
.4byte _0802B706 @ case 27
.4byte _0802B706 @ case 28
.4byte _0802B6CC @ case 29
_0802B6C0:
ldrb r0, [r4, #0xc]
cmp r0, #4
bne _0802B706
movs r0, #1
strb r0, [r4, #0xe]
b _0802B706
_0802B6CC:
ldrb r0, [r4, #0xc]
cmp r0, #5
bhi _0802B706
movs r0, #6
strb r0, [r4, #0xc]
movs r0, #0xc0
lsls r0, r0, #9
str r0, [r4, #0x20]
movs r1, #0
movs r0, #0xc0
strh r0, [r4, #0x24]
adds r0, r4, #0
adds r0, #0x3e
ldrb r0, [r0]
strb r0, [r4, #0x15]
adds r0, r4, #0
adds r0, #0x42
strb r1, [r0]
adds r1, r4, #0
adds r1, #0x3d
movs r0, #0xf8
strb r0, [r1]
adds r1, #2
movs r0, #0x64
strb r0, [r1]
adds r0, r4, #0
movs r1, #9
bl InitializeAnimation
_0802B706:
adds r0, r4, #0
adds r0, #0x43
ldrb r0, [r0]
cmp r0, #0
beq _0802B718
adds r0, r4, #0
movs r1, #0x1c
bl sub_0804A9FC
_0802B718:
ldr r1, _0802B724 @ =gUnk_080CD2D8
adds r0, r4, #0
bl sub_0804AA30
pop {r4, pc}
.align 2, 0
_0802B724: .4byte gUnk_080CD2D8
thumb_func_start nullsub_144
nullsub_144: @ 0x0802B728
bx lr
.align 2, 0
thumb_func_start sub_0802B72C
sub_0802B72C: @ 0x0802B72C
push {r4, lr}
adds r4, r0, #0
bl sub_0804A720
movs r0, #1
strb r0, [r4, #0xe]
movs r0, #0xff
strb r0, [r4, #0x14]
adds r0, r4, #0
bl sub_0802B7A4
pop {r4, pc}
thumb_func_start sub_0802B744
sub_0802B744: @ 0x0802B744
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _0802B780
adds r0, r4, #0
movs r1, #1
movs r2, #0xc
bl sub_0804A024
adds r1, r0, #0
cmp r1, #0xff
beq _0802B780
movs r0, #3
strb r0, [r4, #0xc]
movs r0, #0x1e
strb r0, [r4, #0xe]
movs r0, #0x18
ands r1, r0
strb r1, [r4, #0x15]
adds r0, r4, #0
movs r1, #8
bl InitializeAnimation
b _0802B7A2
_0802B780:
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802B794
movs r0, #2
strb r0, [r4, #0xc]
movs r0, #0x1e
b _0802B7A0
_0802B794:
adds r0, r4, #0
bl ProcessMovement
cmp r0, #0
bne _0802B7A2
movs r0, #1
_0802B7A0:
strb r0, [r4, #0xe]
_0802B7A2:
pop {r4, pc}
thumb_func_start sub_0802B7A4
sub_0802B7A4: @ 0x0802B7A4
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802B7F4
movs r0, #1
strb r0, [r4, #0xc]
bl Random
ldr r2, _0802B7F8 @ =gUnk_080CD314
movs r1, #3
ands r1, r0
adds r1, r1, r2
ldrb r0, [r1]
strb r0, [r4, #0xe]
movs r0, #0x60
strh r0, [r4, #0x24]
adds r0, r4, #0
bl sub_0802B960
ldrb r0, [r4, #0x15]
lsls r1, r0, #0x18
lsrs r0, r1, #0x18
cmp r0, #0xff
beq _0802B7F4
lsrs r2, r1, #0x1b
ldrb r0, [r4, #0x14]
cmp r2, r0
beq _0802B7F4
movs r1, #3
adds r0, r2, #0
ands r0, r1
strb r0, [r4, #0x14]
adds r0, r4, #0
adds r1, r2, #0
bl InitializeAnimation
_0802B7F4:
pop {r4, pc}
.align 2, 0
_0802B7F8: .4byte gUnk_080CD314
thumb_func_start sub_0802B7FC
sub_0802B7FC: @ 0x0802B7FC
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802B81E
movs r0, #4
strb r0, [r4, #0xc]
movs r0, #0x78
strb r0, [r4, #0xe]
movs r0, #0xe0
lsls r0, r0, #1
strh r0, [r4, #0x24]
_0802B81E:
pop {r4, pc}
thumb_func_start sub_0802B820
sub_0802B820: @ 0x0802B820
push {r4, lr}
adds r4, r0, #0
bl sub_080AEFE0
cmp r0, #0
bne _0802B830
movs r0, #1
strb r0, [r4, #0xe]
_0802B830:
adds r0, r4, #0
bl GetNextFrame
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802B84A
adds r0, r4, #0
bl sub_0802B9B4
b _0802B87E
_0802B84A:
adds r0, r4, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _0802B878
ldrb r1, [r4, #0xe]
movs r0, #0xf
ands r0, r1
cmp r0, #0
bne _0802B87E
ldr r0, _0802B874 @ =gUnk_020000B0
ldr r1, [r0]
adds r0, r4, #0
bl GetFacingDirection
adds r1, r0, #0
adds r0, r4, #0
bl sub_08004596
b _0802B87E
.align 2, 0
_0802B874: .4byte gUnk_020000B0
_0802B878:
adds r0, r4, #0
bl sub_0802B9B4
_0802B87E:
pop {r4, pc}
thumb_func_start sub_0802B880
sub_0802B880: @ 0x0802B880
push {lr}
adds r2, r0, #0
ldrb r0, [r2, #0xe]
subs r0, #1
strb r0, [r2, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802B8AC
movs r0, #2
strb r0, [r2, #0xc]
movs r0, #0x3c
strb r0, [r2, #0xe]
ldrb r0, [r2, #0x15]
adds r0, #4
movs r1, #0x18
ands r0, r1
asrs r0, r0, #3
strb r0, [r2, #0x14]
ldrb r1, [r2, #0x14]
adds r0, r2, #0
bl InitializeAnimation
_0802B8AC:
pop {pc}
.align 2, 0
thumb_func_start sub_0802B8B0
sub_0802B8B0: @ 0x0802B8B0
push {r4, lr}
adds r4, r0, #0
bl sub_080AEFE0
movs r1, #0xc0
lsls r1, r1, #5
adds r0, r4, #0
bl sub_080044EC
cmp r0, #0
beq _0802B8CC
cmp r0, #1
beq _0802B8D4
b _0802B8DA
_0802B8CC:
movs r0, #7
strb r0, [r4, #0xc]
movs r0, #0x96
strb r0, [r4, #0xe]
_0802B8D4:
ldr r0, _0802B8DC @ =0x0000012B
bl EnqueueSFX
_0802B8DA:
pop {r4, pc}
.align 2, 0
_0802B8DC: .4byte 0x0000012B
thumb_func_start sub_0802B8E0
sub_0802B8E0: @ 0x0802B8E0
push {r4, lr}
adds r3, r0, #0
ldrb r0, [r3, #0xe]
subs r1, r0, #1
strb r1, [r3, #0xe]
lsls r0, r1, #0x18
cmp r0, #0
beq _0802B91C
adds r4, r0, #0
lsrs r0, r4, #0x18
cmp r0, #0x3b
bhi _0802B940
movs r0, #1
ands r1, r0
cmp r1, #0
beq _0802B940
adds r3, #0x62
ldr r2, _0802B918 @ =gUnk_080CD318
lsrs r0, r4, #0x19
movs r1, #3
ands r0, r1
adds r0, r0, r2
ldrb r0, [r0]
ldrb r1, [r3]
adds r0, r0, r1
strb r0, [r3]
b _0802B940
.align 2, 0
_0802B918: .4byte gUnk_080CD318
_0802B91C:
movs r0, #8
strb r0, [r3, #0xc]
movs r0, #0x80
lsls r0, r0, #9
str r0, [r3, #0x20]
movs r0, #0x60
strh r0, [r3, #0x24]
adds r1, r3, #0
adds r1, #0x3f
movs r0, #0x63
strb r0, [r1]
ldrb r1, [r3, #0x14]
adds r0, r3, #0
bl InitializeAnimation
ldr r0, _0802B944 @ =0x0000012B
bl EnqueueSFX
_0802B940:
pop {r4, pc}
.align 2, 0
_0802B944: .4byte 0x0000012B
thumb_func_start sub_0802B948
sub_0802B948: @ 0x0802B948
push {r4, lr}
adds r4, r0, #0
movs r1, #0xc0
lsls r1, r1, #5
bl sub_08003FC4
cmp r0, #0
bne _0802B95E
movs r0, #1
strb r0, [r4, #0xc]
strb r0, [r4, #0xe]
_0802B95E:
pop {r4, pc}
thumb_func_start sub_0802B960
sub_0802B960: @ 0x0802B960
push {r4, lr}
adds r4, r0, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _0802B986
bl Random
movs r1, #7
ands r1, r0
cmp r1, #0
bne _0802B9A6
adds r0, r4, #0
movs r1, #1
bl sub_08049F84
adds r0, #4
b _0802B9AA
_0802B986:
adds r0, r4, #0
bl sub_08049FA0
cmp r0, #0
bne _0802B9A6
bl Random
movs r1, #3
ands r1, r0
cmp r1, #0
bne _0802B9A6
adds r0, r4, #0
bl sub_08049EE4
adds r0, #4
b _0802B9AA
_0802B9A6:
bl Random
_0802B9AA:
movs r1, #0x18
ands r0, r1
strb r0, [r4, #0x15]
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802B9B4
sub_0802B9B4: @ 0x0802B9B4
push {lr}
movs r1, #5
strb r1, [r0, #0xc]
movs r1, #0x3c
strb r1, [r0, #0xe]
ldrb r1, [r0, #0x15]
lsrs r1, r1, #3
movs r2, #3
ands r1, r2
strb r1, [r0, #0x14]
ldrb r1, [r0, #0x14]
adds r1, #4
bl InitializeAnimation
pop {pc}
.align 2, 0
-538
View File
@@ -1,538 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start WallMaster
WallMaster: @ 0x0802A408
push {r4, r5, lr}
adds r4, r0, #0
ldr r5, _0802A430 @ =gUnk_080CD07C
bl GetNextFunction
lsls r0, r0, #2
adds r0, r0, r5
ldr r1, [r0]
adds r0, r4, #0
bl _call_via_r1
movs r3, #0x10
rsbs r3, r3, #0
adds r0, r4, #0
movs r1, #0
movs r2, #1
bl SetChildOffset
pop {r4, r5, pc}
.align 2, 0
_0802A430: .4byte gUnk_080CD07C
thumb_func_start sub_0802A434
sub_0802A434: @ 0x0802A434
push {r4, lr}
adds r4, r0, #0
bl sub_0802A78C
ldr r1, _0802A450 @ =gUnk_080CD094
ldrb r0, [r4, #0xc]
lsls r0, r0, #2
adds r0, r0, r1
ldr r1, [r0]
adds r0, r4, #0
bl _call_via_r1
pop {r4, pc}
.align 2, 0
_0802A450: .4byte gUnk_080CD094
thumb_func_start sub_0802A454
sub_0802A454: @ 0x0802A454
push {r4, lr}
adds r4, r0, #0
adds r0, #0x3f
ldrb r0, [r0]
cmp r0, #0x75
beq _0802A4A8
adds r0, r4, #0
adds r0, #0x41
ldrb r0, [r0]
movs r2, #0x7f
adds r1, r2, #0
ands r1, r0
cmp r1, #0
beq _0802A474
cmp r1, #0x1e
bne _0802A4A8
_0802A474:
movs r0, #5
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x10]
adds r0, r2, #0
ands r0, r1
strb r0, [r4, #0x10]
ldr r1, _0802A4D8 @ =gPlayerEntity
ldrh r0, [r1, #0x2e]
adds r2, r4, #0
adds r2, #0x7e
strh r0, [r2]
ldrh r2, [r1, #0x32]
adds r0, r4, #0
adds r0, #0x80
strh r2, [r0]
ldrh r0, [r1, #0x36]
adds r1, r4, #0
adds r1, #0x82
strh r0, [r1]
ldrb r0, [r4, #0xc]
cmp r0, #3
beq _0802A4A8
adds r0, r4, #0
movs r1, #1
bl InitializeAnimation
_0802A4A8:
adds r2, r4, #0
adds r2, #0x42
ldrb r0, [r2]
adds r1, r0, #0
cmp r1, #0
beq _0802A4BC
cmp r1, #4
bls _0802A4BC
subs r0, #4
strb r0, [r2]
_0802A4BC:
adds r0, r4, #0
adds r0, #0x43
ldrb r0, [r0]
cmp r0, #0
beq _0802A4CE
adds r0, r4, #0
movs r1, #0x1c
bl sub_0804A9FC
_0802A4CE:
ldr r1, _0802A4DC @ =gUnk_080CD07C
adds r0, r4, #0
bl sub_0804AA30
pop {r4, pc}
.align 2, 0
_0802A4D8: .4byte gPlayerEntity
_0802A4DC: .4byte gUnk_080CD07C
thumb_func_start nullsub_142
nullsub_142: @ 0x0802A4E0
bx lr
.align 2, 0
thumb_func_start sub_0802A4E4
sub_0802A4E4: @ 0x0802A4E4
push {r4, lr}
adds r4, r0, #0
bl sub_0804A720
movs r0, #1
strb r0, [r4, #0xc]
adds r1, r4, #0
adds r1, #0x38
movs r0, #3
strb r0, [r1]
bl Random
adds r1, r4, #0
adds r1, #0x7d
strb r0, [r1]
ldrb r1, [r4, #0xb]
lsls r0, r1, #4
subs r0, r0, r1
lsls r0, r0, #2
adds r1, r4, #0
adds r1, #0x7a
strh r0, [r1]
ldrb r1, [r4, #0xe]
adds r0, r4, #0
adds r0, #0x7c
strb r1, [r0]
ldrb r1, [r4, #0xe]
lsls r0, r1, #4
subs r0, r0, r1
lsls r0, r0, #2
adds r1, r4, #0
adds r1, #0x78
strh r0, [r1]
adds r0, r4, #0
bl UpdateSpriteForCollisionLayer
adds r0, r4, #0
bl sub_0802A7D0
pop {r4, pc}
thumb_func_start sub_0802A534
sub_0802A534: @ 0x0802A534
push {r4, lr}
adds r4, r0, #0
adds r1, r4, #0
adds r1, #0x78
ldrh r0, [r1]
cmp r0, #0
beq _0802A548
subs r0, #1
strh r0, [r1]
b _0802A5B0
_0802A548:
adds r0, r4, #0
adds r0, #0x7a
ldrh r0, [r0]
cmp r0, #0
bne _0802A5B0
movs r0, #1
bl sub_08049DF4
adds r2, r0, #0
cmp r2, #0
beq _0802A5B0
movs r0, #2
strb r0, [r4, #0xc]
movs r0, #0x5a
strb r0, [r4, #0xe]
ldrb r1, [r4, #0x10]
movs r0, #0x80
orrs r0, r1
strb r0, [r4, #0x10]
ldrb r0, [r4, #0x18]
movs r1, #3
orrs r0, r1
strb r0, [r4, #0x18]
ldrh r0, [r2, #0x2e]
strh r0, [r4, #0x2e]
ldrh r0, [r2, #0x32]
strh r0, [r4, #0x32]
ldr r0, _0802A5B4 @ =0x0000FF80
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]
ldrb r1, [r4, #0x18]
movs r0, #0x31
rsbs r0, r0, #0
ands r0, r1
movs r1, #0x20
orrs r0, r1
strb r0, [r4, #0x18]
adds r0, r4, #0
movs r1, #2
bl InitializeAnimation
adds r0, r4, #0
bl sub_0802A7D0
_0802A5B0:
pop {r4, pc}
.align 2, 0
_0802A5B4: .4byte 0x0000FF80
thumb_func_start sub_0802A5B8
sub_0802A5B8: @ 0x0802A5B8
push {r4, lr}
adds r4, r0, #0
bl sub_0802A7D0
ldrb r0, [r4, #0xe]
adds r2, r0, #0
cmp r2, #0
beq _0802A5E8
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802A60E
ldr r0, _0802A5E4 @ =0x0000012D
bl EnqueueSFX
adds r0, r4, #0
movs r1, #0
bl InitializeAnimation
b _0802A60E
.align 2, 0
_0802A5E4: .4byte 0x0000012D
_0802A5E8:
ldrh r0, [r4, #0x36]
adds r0, #3
strh r0, [r4, #0x36]
lsls r0, r0, #0x10
cmp r0, #0
blt _0802A60E
movs r0, #3
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x18]
subs r0, #7
ands r0, r1
movs r1, #1
orrs r0, r1
strb r0, [r4, #0x18]
strh r2, [r4, #0x36]
adds r0, r4, #0
movs r1, #1
bl InitializeAnimation
_0802A60E:
pop {r4, pc}
thumb_func_start sub_0802A610
sub_0802A610: @ 0x0802A610
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
bl sub_0802A7D0
adds r3, r4, #0
adds r3, #0x5a
ldrb r1, [r3]
movs r0, #0x80
ands r0, r1
lsls r0, r0, #0x18
lsrs r2, r0, #0x18
cmp r2, #0
beq _0802A63A
movs r0, #4
strb r0, [r4, #0xc]
movs r0, #0x1e
strb r0, [r4, #0xe]
b _0802A64C
_0802A63A:
movs r0, #1
ands r0, r1
cmp r0, #0
beq _0802A64C
strb r2, [r3]
adds r1, r4, #0
adds r1, #0x3f
movs r0, #0x75
strb r0, [r1]
_0802A64C:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802A650
sub_0802A650: @ 0x0802A650
push {r4, lr}
adds r4, r0, #0
bl sub_0802A7D0
ldrh r0, [r4, #0x36]
subs r0, #2
strh r0, [r4, #0x36]
lsls r0, r0, #0x10
asrs r0, r0, #0x10
movs r1, #0xa0
rsbs r1, r1, #0
cmp r0, r1
bge _0802A69A
movs r0, #1
strb r0, [r4, #0xc]
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
ldrb r1, [r4, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
strb r0, [r4, #0x18]
adds r1, r4, #0
adds r1, #0x3f
movs r0, #0x74
strb r0, [r1]
adds r0, r4, #0
adds r0, #0x7c
ldrb r1, [r0]
lsls r0, r1, #4
subs r0, r0, r1
lsls r0, r0, #2
adds r1, r4, #0
adds r1, #0x78
strh r0, [r1]
_0802A69A:
pop {r4, pc}
thumb_func_start sub_0802A69C
sub_0802A69C: @ 0x0802A69C
push {r4, lr}
adds r4, r0, #0
bl sub_0802A7D0
ldr r2, _0802A6E4 @ =gPlayerState
ldrb r1, [r2, #0xa]
movs r0, #0x80
orrs r1, r0
strb r1, [r2, #0xa]
ldrb r1, [r2, #0x1a]
orrs r0, r1
strb r0, [r2, #0x1a]
ldr r1, _0802A6E8 @ =gPlayerEntity
adds r0, r4, #0
adds r0, #0x7e
ldrh r0, [r0]
strh r0, [r1, #0x2e]
adds r0, r4, #0
adds r0, #0x80
ldrh r0, [r0]
strh r0, [r1, #0x32]
adds r0, r4, #0
adds r0, #0x82
ldrh r0, [r0]
strh r0, [r1, #0x36]
lsls r0, r0, #0x10
asrs r0, r0, #0x10
ldrh r2, [r4, #0x36]
movs r3, #0x36
ldrsh r1, [r4, r3]
cmp r0, r1
beq _0802A6F0
cmp r0, r1
bge _0802A6EC
subs r0, r2, #1
b _0802A6EE
.align 2, 0
_0802A6E4: .4byte gPlayerState
_0802A6E8: .4byte gPlayerEntity
_0802A6EC:
adds r0, r2, #1
_0802A6EE:
strh r0, [r4, #0x36]
_0802A6F0:
adds r0, r4, #0
bl GetNextFrame
adds r3, r4, #0
adds r3, #0x5a
ldrb r1, [r3]
movs r0, #0x80
ands r0, r1
lsls r0, r0, #0x18
lsrs r2, r0, #0x18
cmp r2, #0
beq _0802A712
movs r0, #6
strb r0, [r4, #0xc]
movs r0, #0x1e
strb r0, [r4, #0xe]
b _0802A72E
_0802A712:
movs r0, #1
ands r0, r1
cmp r0, #0
beq _0802A72E
strb r2, [r3]
adds r1, r4, #0
adds r1, #0x63
movs r0, #3
strb r0, [r1]
ldr r2, _0802A730 @ =gPlayerEntity
ldrb r1, [r2, #0x18]
subs r0, #7
ands r0, r1
strb r0, [r2, #0x18]
_0802A72E:
pop {r4, pc}
.align 2, 0
_0802A730: .4byte gPlayerEntity
thumb_func_start sub_0802A734
sub_0802A734: @ 0x0802A734
push {r4, lr}
adds r4, r0, #0
bl sub_0802A7D0
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
cmp r0, #0
bne _0802A768
bl sub_0805E5A8
ldr r1, _0802A760 @ =gUnk_0813AB1C
ldr r0, _0802A764 @ =gArea
ldrb r0, [r0, #3]
lsls r0, r0, #2
adds r0, r0, r1
ldr r0, [r0]
bl DoExitTransition
b _0802A780
.align 2, 0
_0802A760: .4byte gUnk_0813AB1C
_0802A764: .4byte gArea
_0802A768:
ldr r0, [r4, #0x34]
ldr r1, _0802A784 @ =0xFFFE0000
adds r0, r0, r1
str r0, [r4, #0x34]
ldr r1, _0802A788 @ =gPlayerState
ldrb r0, [r1, #0xa]
movs r2, #0x80
orrs r0, r2
strb r0, [r1, #0xa]
ldrb r0, [r1, #0x1a]
orrs r0, r2
strb r0, [r1, #0x1a]
_0802A780:
pop {r4, pc}
.align 2, 0
_0802A784: .4byte 0xFFFE0000
_0802A788: .4byte gPlayerState
thumb_func_start sub_0802A78C
sub_0802A78C: @ 0x0802A78C
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xc]
cmp r0, #0
beq _0802A7CC
adds r0, r4, #0
movs r1, #1
bl sub_08049FDC
cmp r0, #0
beq _0802A7BC
adds r0, r4, #0
adds r0, #0x78
ldrh r0, [r0]
cmp r0, #0
bne _0802A7CC
adds r1, r4, #0
adds r1, #0x7a
ldrh r0, [r1]
cmp r0, #0
beq _0802A7CC
subs r0, #1
strh r0, [r1]
b _0802A7CC
_0802A7BC:
ldrb r0, [r4, #0xb]
lsls r1, r0, #4
subs r1, r1, r0
lsls r1, r1, #2
adds r1, #1
adds r0, r4, #0
adds r0, #0x7a
strh r1, [r0]
_0802A7CC:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0802A7D0
sub_0802A7D0: @ 0x0802A7D0
push {r4, lr}
ldr r3, _0802A800 @ =gUnk_080CD0B0
movs r1, #0x7d
adds r1, r1, r0
mov ip, r1
ldrb r1, [r1]
adds r2, r1, #1
mov r4, ip
strb r2, [r4]
lsls r1, r1, #0x18
lsrs r1, r1, #0x1b
movs r2, #7
ands r1, r2
adds r1, r1, r3
movs r2, #0
ldrsb r2, [r1, r2]
movs r1, #0x80
lsls r1, r1, #1
adds r2, r2, r1
adds r1, r2, #0
movs r3, #0
bl sub_0805EC9C
pop {r4, pc}
.align 2, 0
_0802A800: .4byte gUnk_080CD0B0
-246
View File
@@ -1,246 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start WaterDrop
WaterDrop: @ 0x0802A238
push {lr}
ldr r2, _0802A24C @ =gUnk_080CD030
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0802A24C: .4byte gUnk_080CD030
thumb_func_start sub_0802A250
sub_0802A250: @ 0x0802A250
push {r4, r5, lr}
adds r5, r0, #0
movs r1, #0
movs r0, #1
strb r0, [r5, #0xc]
strb r1, [r5, #0xe]
ldr r0, _0802A2A8 @ =0xFFFD0000
str r0, [r5, #0x20]
bl Random
ldr r1, _0802A2AC @ =gUnk_080CD03C
movs r4, #3
ands r0, r4
adds r0, r0, r1
ldrb r0, [r0]
strh r0, [r5, #0x24]
bl Random
ldr r1, _0802A2B0 @ =gUnk_080CD040
ands r0, r4
adds r0, r0, r1
ldrb r0, [r0]
adds r0, #0x18
strb r0, [r5, #0x15]
adds r1, r5, #0
adds r1, #0x38
movs r0, #2
strb r0, [r1]
adds r0, r5, #0
movs r1, #0
bl InitializeAnimation
adds r0, r5, #0
bl UpdateSpriteForCollisionLayer
movs r0, #0x66
movs r1, #0
movs r2, #0
bl CreateObject
cmp r0, #0
beq _0802A2A6
str r5, [r0, #0x50]
_0802A2A6:
pop {r4, r5, pc}
.align 2, 0
_0802A2A8: .4byte 0xFFFD0000
_0802A2AC: .4byte gUnk_080CD03C
_0802A2B0: .4byte gUnk_080CD040
thumb_func_start sub_0802A2B4
sub_0802A2B4: @ 0x0802A2B4
push {r4, lr}
adds r4, r0, #0
movs r1, #0xa0
lsls r1, r1, #6
bl sub_08003FC4
cmp r0, #0
bne _0802A2DC
movs r0, #2
strb r0, [r4, #0xc]
adds r2, r4, #0
adds r2, #0x29
ldrb r0, [r2]
movs r1, #7
orrs r0, r1
strb r0, [r2]
movs r0, #0x84
bl EnqueueSFX
b _0802A2E2
_0802A2DC:
adds r0, r4, #0
bl sub_0806F69C
_0802A2E2:
adds r0, r4, #0
bl sub_0802A39C
movs r0, #0x36
ldrsh r1, [r4, r0]
movs r0, #8
rsbs r0, r0, #0
cmp r1, r0
ble _0802A2FA
adds r0, r4, #0
bl sub_0802A334
_0802A2FA:
pop {r4, pc}
thumb_func_start sub_0802A2FC
sub_0802A2FC: @ 0x0802A2FC
push {r4, lr}
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
adds r0, #0x5a
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
beq _0802A31A
adds r0, r4, #0
bl DeleteEntity
b _0802A332
_0802A31A:
movs r0, #1
ands r0, r1
cmp r0, #0
beq _0802A32C
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
b _0802A332
_0802A32C:
adds r0, r4, #0
bl sub_0802A39C
_0802A332:
pop {r4, pc}
thumb_func_start sub_0802A334
sub_0802A334: @ 0x0802A334
push {r4, r5, lr}
adds r4, r0, #0
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, _0802A380 @ =gRoomControls
movs r3, #0xa
ldrsh r0, [r2, r3]
ldr r3, _0802A384 @ =gScreen
subs r1, r1, r0
ldrh r5, [r3, #0x16]
adds r1, r1, r5
asrs r1, r1, #3
movs r5, #0x32
ldrsh r0, [r4, r5]
movs r5, #0xc
ldrsh r2, [r2, r5]
subs r0, r0, r2
ldrh r3, [r3, #0x18]
adds r0, r0, r3
asrs r0, r0, #3
ldr r3, _0802A388 @ =gUnk_02001A40
movs r2, #0x1f
ands r1, r2
ands r0, r2
lsls r0, r0, #5
adds r1, r1, r0
movs r0, #0x80
lsls r0, r0, #3
adds r1, r1, r0
lsls r1, r1, #1
adds r1, r1, r3
ldrh r0, [r1]
cmp r0, #0
beq _0802A38C
adds r1, r4, #0
adds r1, #0x38
movs r0, #2
b _0802A392
.align 2, 0
_0802A380: .4byte gRoomControls
_0802A384: .4byte gScreen
_0802A388: .4byte gUnk_02001A40
_0802A38C:
adds r1, r4, #0
adds r1, #0x38
movs r0, #1
_0802A392:
strb r0, [r1]
adds r0, r4, #0
bl UpdateSpriteForCollisionLayer
pop {r4, r5, pc}
thumb_func_start sub_0802A39C
sub_0802A39C: @ 0x0802A39C
push {r4, r5, r6, lr}
adds r5, r0, #0
ldr r4, _0802A3EC @ =gPlayerEntity
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, _0802A3F0 @ =gRoomControls
movs r3, #0xa
ldrsh r0, [r2, r3]
ldr r3, _0802A3F4 @ =gScreen
subs r1, r1, r0
ldrh r6, [r3, #0x16]
adds r1, r1, r6
asrs r1, r1, #3
movs r6, #0x32
ldrsh r0, [r4, r6]
movs r4, #0xc
ldrsh r2, [r2, r4]
subs r0, r0, r2
ldrh r3, [r3, #0x18]
adds r0, r0, r3
subs r0, #0xa
asrs r0, r0, #3
ldr r3, _0802A3F8 @ =gUnk_02001A40
movs r2, #0x1f
ands r1, r2
ands r0, r2
lsls r0, r0, #5
adds r1, r1, r0
movs r6, #0x80
lsls r6, r6, #3
adds r1, r1, r6
lsls r1, r1, #1
adds r1, r1, r3
ldrh r0, [r1]
cmp r0, #0
beq _0802A3FC
ldrb r1, [r5, #0x10]
movs r0, #0x7f
ands r0, r1
b _0802A402
.align 2, 0
_0802A3EC: .4byte gPlayerEntity
_0802A3F0: .4byte gRoomControls
_0802A3F4: .4byte gScreen
_0802A3F8: .4byte gUnk_02001A40
_0802A3FC:
ldrb r1, [r5, #0x10]
movs r0, #0x80
orrs r0, r1
_0802A402:
strb r0, [r5, #0x10]
pop {r4, r5, r6, pc}
.align 2, 0
+37
View File
@@ -0,0 +1,37 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD628:: @ 080CD628
.incbin "baserom.gba", 0x0CD628, 0x0000011
gUnk_080CD639:: @ 080CD639
.incbin "baserom.gba", 0x0CD639, 0x0000011
gUnk_080CD64A:: @ 080CD64A
.incbin "baserom.gba", 0x0CD64A, 0x0000011
gUnk_080CD65B:: @ 080CD65B
.incbin "baserom.gba", 0x0CD65B, 0x0000011
gUnk_080CD66C:: @ 080CD66C
.incbin "baserom.gba", 0x0CD66C, 0x0000005
gUnk_080CD671:: @ 080CD671
.incbin "baserom.gba", 0x0CD671, 0x0000005
gUnk_080CD676:: @ 080CD676
.incbin "baserom.gba", 0x0CD676, 0x0000009
gUnk_080CD67F:: @ 080CD67F
.incbin "baserom.gba", 0x0CD67F, 0x0000009
gUnk_080CD688:: @ 080CD688
.incbin "baserom.gba", 0x0CD688, 0x0000024
gUnk_080CD6AC:: @ 080CD6AC
.incbin "baserom.gba", 0x0CD6AC, 0x0000024
gUnk_080CD6D0:: @ 080CD6D0
.incbin "baserom.gba", 0x0CD6D0, 0x000002C
+19
View File
@@ -0,0 +1,19 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD184:: @ 080CD184
.incbin "baserom.gba", 0x0CD184, 0x0000011
gUnk_080CD195:: @ 080CD195
.incbin "baserom.gba", 0x0CD195, 0x0000041
gUnk_080CD1D6:: @ 080CD1D6
.incbin "baserom.gba", 0x0CD1D6, 0x0000041
gUnk_080CD217:: @ 080CD217
.incbin "baserom.gba", 0x0CD217, 0x0000009
gUnk_080CD220:: @ 080CD220
.incbin "baserom.gba", 0x0CD220, 0x0000014
+86
View File
@@ -0,0 +1,86 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CCA0A:: @ 080CCA0A
.incbin "baserom.gba", 0x0CCA0A, 0x0000015
gUnk_080CCA1F:: @ 080CCA1F
.incbin "baserom.gba", 0x0CCA1F, 0x0000015
gUnk_080CCA34:: @ 080CCA34
.incbin "baserom.gba", 0x0CCA34, 0x0000015
gUnk_080CCA49:: @ 080CCA49
.incbin "baserom.gba", 0x0CCA49, 0x0000015
gUnk_080CCA5E:: @ 080CCA5E
.incbin "baserom.gba", 0x0CCA5E, 0x0000011
gUnk_080CCA6F:: @ 080CCA6F
.incbin "baserom.gba", 0x0CCA6F, 0x0000011
gUnk_080CCA80:: @ 080CCA80
.incbin "baserom.gba", 0x0CCA80, 0x0000011
gUnk_080CCA91:: @ 080CCA91
.incbin "baserom.gba", 0x0CCA91, 0x0000011
gUnk_080CCAA2:: @ 080CCAA2
.incbin "baserom.gba", 0x0CCAA2, 0x0000005
gUnk_080CCAA7:: @ 080CCAA7
.incbin "baserom.gba", 0x0CCAA7, 0x0000005
gUnk_080CCAAC:: @ 080CCAAC
.incbin "baserom.gba", 0x0CCAAC, 0x0000005
gUnk_080CCAB1:: @ 080CCAB1
.incbin "baserom.gba", 0x0CCAB1, 0x0000005
gUnk_080CCAB6:: @ 080CCAB6
.incbin "baserom.gba", 0x0CCAB6, 0x0000010
gUnk_080CCAC6:: @ 080CCAC6
.incbin "baserom.gba", 0x0CCAC6, 0x0000010
gUnk_080CCAD6:: @ 080CCAD6
.incbin "baserom.gba", 0x0CCAD6, 0x0000010
gUnk_080CCAE6:: @ 080CCAE6
.incbin "baserom.gba", 0x0CCAE6, 0x0000010
gUnk_080CCAF6:: @ 080CCAF6
.incbin "baserom.gba", 0x0CCAF6, 0x0000011
gUnk_080CCB07:: @ 080CCB07
.incbin "baserom.gba", 0x0CCB07, 0x0000011
gUnk_080CCB18:: @ 080CCB18
.incbin "baserom.gba", 0x0CCB18, 0x0000011
gUnk_080CCB29:: @ 080CCB29
.incbin "baserom.gba", 0x0CCB29, 0x0000011
gUnk_080CCB3A:: @ 080CCB3A
.incbin "baserom.gba", 0x0CCB3A, 0x000000D
gUnk_080CCB47:: @ 080CCB47
.incbin "baserom.gba", 0x0CCB47, 0x000000D
gUnk_080CCB54:: @ 080CCB54
.incbin "baserom.gba", 0x0CCB54, 0x000000D
gUnk_080CCB61:: @ 080CCB61
.incbin "baserom.gba", 0x0CCB61, 0x000000D
gUnk_080CCB6E:: @ 080CCB6E
.incbin "baserom.gba", 0x0CCB6E, 0x0000011
gUnk_080CCB7F:: @ 080CCB7F
.incbin "baserom.gba", 0x0CCB7F, 0x0000015
gUnk_080CCB94:: @ 080CCB94
.incbin "baserom.gba", 0x0CCB94, 0x000006C
+16
View File
@@ -0,0 +1,16 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD2A8:: @ 080CD2A8
.incbin "baserom.gba", 0x0CD2A8, 0x0000004
gUnk_080CD2AC:: @ 080CD2AC
.incbin "baserom.gba", 0x0CD2AC, 0x0000011
gUnk_080CD2BD:: @ 080CD2BD
.incbin "baserom.gba", 0x0CD2BD, 0x000000B
gUnk_080CD2C8:: @ 080CD2C8
.incbin "baserom.gba", 0x0CD2C8, 0x0000010
+97
View File
@@ -0,0 +1,97 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CC2DF:: @ 080CC2DF
.incbin "baserom.gba", 0x0CC2DF, 0x0000004
gUnk_080CC2E3:: @ 080CC2E3
.incbin "baserom.gba", 0x0CC2E3, 0x0000004
gUnk_080CC2E7:: @ 080CC2E7
.incbin "baserom.gba", 0x0CC2E7, 0x0000004
gUnk_080CC2EB:: @ 080CC2EB
.incbin "baserom.gba", 0x0CC2EB, 0x0000004
gUnk_080CC2EF:: @ 080CC2EF
.incbin "baserom.gba", 0x0CC2EF, 0x0000005
gUnk_080CC2F4:: @ 080CC2F4
.incbin "baserom.gba", 0x0CC2F4, 0x0000011
gUnk_080CC305:: @ 080CC305
.incbin "baserom.gba", 0x0CC305, 0x0000019
gUnk_080CC31E:: @ 080CC31E
.incbin "baserom.gba", 0x0CC31E, 0x000000D
gUnk_080CC32B:: @ 080CC32B
.incbin "baserom.gba", 0x0CC32B, 0x000000D
gUnk_080CC338:: @ 080CC338
.incbin "baserom.gba", 0x0CC338, 0x0000005
gUnk_080CC33D:: @ 080CC33D
.incbin "baserom.gba", 0x0CC33D, 0x0000009
gUnk_080CC346:: @ 080CC346
.incbin "baserom.gba", 0x0CC346, 0x000000D
gUnk_080CC353:: @ 080CC353
.incbin "baserom.gba", 0x0CC353, 0x0000009
gUnk_080CC35C:: @ 080CC35C
.incbin "baserom.gba", 0x0CC35C, 0x000000D
gUnk_080CC369:: @ 080CC369
.incbin "baserom.gba", 0x0CC369, 0x0000009
gUnk_080CC372:: @ 080CC372
.incbin "baserom.gba", 0x0CC372, 0x0000009
gUnk_080CC37B:: @ 080CC37B
.incbin "baserom.gba", 0x0CC37B, 0x0000021
gUnk_080CC39C:: @ 080CC39C
.incbin "baserom.gba", 0x0CC39C, 0x0000038
gUnk_080CC3D4:: @ 080CC3D4
.incbin "baserom.gba", 0x0CC3D4, 0x0000038
gUnk_080CC40C:: @ 080CC40C
.incbin "baserom.gba", 0x0CC40C, 0x0000034
gUnk_080CC440:: @ 080CC440
.incbin "baserom.gba", 0x0CC440, 0x0000038
gUnk_080CC478:: @ 080CC478
.incbin "baserom.gba", 0x0CC478, 0x0000038
gUnk_080CC4B0:: @ 080CC4B0
.incbin "baserom.gba", 0x0CC4B0, 0x0000065
gUnk_080CC515:: @ 080CC515
.incbin "baserom.gba", 0x0CC515, 0x000006D
gUnk_080CC582:: @ 080CC582
.incbin "baserom.gba", 0x0CC582, 0x000006D
gUnk_080CC5EF:: @ 080CC5EF
.incbin "baserom.gba", 0x0CC5EF, 0x000006D
gUnk_080CC65C:: @ 080CC65C
.incbin "baserom.gba", 0x0CC65C, 0x0000021
gUnk_080CC67D:: @ 080CC67D
.incbin "baserom.gba", 0x0CC67D, 0x0000007
gUnk_080CC684:: @ 080CC684
.incbin "baserom.gba", 0x0CC684, 0x0000018
gUnk_080CC69C:: @ 080CC69C
.incbin "baserom.gba", 0x0CC69C, 0x0000038
gUnk_080CC6D4:: @ 080CC6D4
.incbin "baserom.gba", 0x0CC6D4, 0x0000028
+13
View File
@@ -0,0 +1,13 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD5A4:: @ 080CD5A4
.incbin "baserom.gba", 0x0CD5A4, 0x0000011
gUnk_080CD5B5:: @ 080CD5B5
.incbin "baserom.gba", 0x0CD5B5, 0x0000013
gUnk_080CD5C8:: @ 080CD5C8
.incbin "baserom.gba", 0x0CD5C8, 0x000000C
+43
View File
@@ -0,0 +1,43 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD474:: @ 080CD474
.incbin "baserom.gba", 0x0CD474, 0x0000011
gUnk_080CD485:: @ 080CD485
.incbin "baserom.gba", 0x0CD485, 0x0000011
gUnk_080CD496:: @ 080CD496
.incbin "baserom.gba", 0x0CD496, 0x0000011
gUnk_080CD4A7:: @ 080CD4A7
.incbin "baserom.gba", 0x0CD4A7, 0x0000011
gUnk_080CD4B8:: @ 080CD4B8
.incbin "baserom.gba", 0x0CD4B8, 0x0000011
gUnk_080CD4C9:: @ 080CD4C9
.incbin "baserom.gba", 0x0CD4C9, 0x0000011
gUnk_080CD4DA:: @ 080CD4DA
.incbin "baserom.gba", 0x0CD4DA, 0x0000011
gUnk_080CD4EB:: @ 080CD4EB
.incbin "baserom.gba", 0x0CD4EB, 0x0000011
gUnk_080CD4FC:: @ 080CD4FC
.incbin "baserom.gba", 0x0CD4FC, 0x0000004
gUnk_080CD500:: @ 080CD500
.incbin "baserom.gba", 0x0CD500, 0x0000004
gUnk_080CD504:: @ 080CD504
.incbin "baserom.gba", 0x0CD504, 0x0000004
gUnk_080CD508:: @ 080CD508
.incbin "baserom.gba", 0x0CD508, 0x0000004
gUnk_080CD50C:: @ 080CD50C
.incbin "baserom.gba", 0x0CD50C, 0x0000034
+16
View File
@@ -0,0 +1,16 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CC734:: @ 080CC734
.incbin "baserom.gba", 0x0CC734, 0x0000025
gUnk_080CC759:: @ 080CC759
.incbin "baserom.gba", 0x0CC759, 0x0000015
gUnk_080CC76E:: @ 080CC76E
.incbin "baserom.gba", 0x0CC76E, 0x0000012
gUnk_080CC780:: @ 080CC780
.incbin "baserom.gba", 0x0CC780, 0x0000010
+94
View File
@@ -0,0 +1,94 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CCDDC:: @ 080CCDDC
.incbin "baserom.gba", 0x0CCDDC, 0x0000011
gUnk_080CCDED:: @ 080CCDED
.incbin "baserom.gba", 0x0CCDED, 0x0000011
gUnk_080CCDFE:: @ 080CCDFE
.incbin "baserom.gba", 0x0CCDFE, 0x0000011
gUnk_080CCE0F:: @ 080CCE0F
.incbin "baserom.gba", 0x0CCE0F, 0x0000011
gUnk_080CCE20:: @ 080CCE20
.incbin "baserom.gba", 0x0CCE20, 0x0000011
gUnk_080CCE31:: @ 080CCE31
.incbin "baserom.gba", 0x0CCE31, 0x0000011
gUnk_080CCE42:: @ 080CCE42
.incbin "baserom.gba", 0x0CCE42, 0x0000011
gUnk_080CCE53:: @ 080CCE53
.incbin "baserom.gba", 0x0CCE53, 0x0000011
gUnk_080CCE64:: @ 080CCE64
.incbin "baserom.gba", 0x0CCE64, 0x0000024
gUnk_080CCE88:: @ 080CCE88
.incbin "baserom.gba", 0x0CCE88, 0x0000011
gUnk_080CCE99:: @ 080CCE99
.incbin "baserom.gba", 0x0CCE99, 0x0000011
gUnk_080CCEAA:: @ 080CCEAA
.incbin "baserom.gba", 0x0CCEAA, 0x0000011
gUnk_080CCEBB:: @ 080CCEBB
.incbin "baserom.gba", 0x0CCEBB, 0x0000011
gUnk_080CCECC:: @ 080CCECC
.incbin "baserom.gba", 0x0CCECC, 0x0000011
gUnk_080CCEDD:: @ 080CCEDD
.incbin "baserom.gba", 0x0CCEDD, 0x0000011
gUnk_080CCEEE:: @ 080CCEEE
.incbin "baserom.gba", 0x0CCEEE, 0x0000011
gUnk_080CCEFF:: @ 080CCEFF
.incbin "baserom.gba", 0x0CCEFF, 0x0000011
gUnk_080CCF10:: @ 080CCF10
.incbin "baserom.gba", 0x0CCF10, 0x0000005
gUnk_080CCF15:: @ 080CCF15
.incbin "baserom.gba", 0x0CCF15, 0x0000005
gUnk_080CCF1A:: @ 080CCF1A
.incbin "baserom.gba", 0x0CCF1A, 0x0000005
gUnk_080CCF1F:: @ 080CCF1F
.incbin "baserom.gba", 0x0CCF1F, 0x0000005
gUnk_080CCF24:: @ 080CCF24
.incbin "baserom.gba", 0x0CCF24, 0x000001D
gUnk_080CCF41:: @ 080CCF41
.incbin "baserom.gba", 0x0CCF41, 0x000001D
gUnk_080CCF5E:: @ 080CCF5E
.incbin "baserom.gba", 0x0CCF5E, 0x000001D
gUnk_080CCF7B:: @ 080CCF7B
.incbin "baserom.gba", 0x0CCF7B, 0x000001D
gUnk_080CCF98:: @ 080CCF98
.incbin "baserom.gba", 0x0CCF98, 0x0000011
gUnk_080CCFA9:: @ 080CCFA9
.incbin "baserom.gba", 0x0CCFA9, 0x0000011
gUnk_080CCFBA:: @ 080CCFBA
.incbin "baserom.gba", 0x0CCFBA, 0x0000011
gUnk_080CCFCB:: @ 080CCFCB
.incbin "baserom.gba", 0x0CCFCB, 0x0000011
gUnk_080CCFDC:: @ 080CCFDC
.incbin "baserom.gba", 0x0CCFDC, 0x0000054
+31
View File
@@ -0,0 +1,31 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CCC4A:: @ 080CCC4A
.incbin "baserom.gba", 0x0CCC4A, 0x0000015
gUnk_080CCC5F:: @ 080CCC5F
.incbin "baserom.gba", 0x0CCC5F, 0x0000015
gUnk_080CCC74:: @ 080CCC74
.incbin "baserom.gba", 0x0CCC74, 0x0000028
gUnk_080CCC9C:: @ 080CCC9C
.incbin "baserom.gba", 0x0CCC9C, 0x0000018
gUnk_080CCCB4:: @ 080CCCB4
.incbin "baserom.gba", 0x0CCCB4, 0x0000015
gUnk_080CCCC9:: @ 080CCCC9
.incbin "baserom.gba", 0x0CCCC9, 0x0000015
gUnk_080CCCDE:: @ 080CCCDE
.incbin "baserom.gba", 0x0CCCDE, 0x0000028
gUnk_080CCD06:: @ 080CCD06
.incbin "baserom.gba", 0x0CCD06, 0x000001A
gUnk_080CCD20:: @ 080CCD20
.incbin "baserom.gba", 0x0CCD20, 0x0000024
+10
View File
@@ -0,0 +1,10 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD258:: @ 080CD258
.incbin "baserom.gba", 0x0CD258, 0x000001C
gUnk_080CD274:: @ 080CD274
.incbin "baserom.gba", 0x0CD274, 0x0000008
+71
View File
@@ -0,0 +1,71 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CC7E0:: @ 080CC7E0
.incbin "baserom.gba", 0x0CC7E0, 0x0000009
gUnk_080CC7E9:: @ 080CC7E9
.incbin "baserom.gba", 0x0CC7E9, 0x0000009
gUnk_080CC7F2:: @ 080CC7F2
.incbin "baserom.gba", 0x0CC7F2, 0x0000009
gUnk_080CC7FB:: @ 080CC7FB
.incbin "baserom.gba", 0x0CC7FB, 0x0000009
gUnk_080CC804:: @ 080CC804
.incbin "baserom.gba", 0x0CC804, 0x0000011
gUnk_080CC815:: @ 080CC815
.incbin "baserom.gba", 0x0CC815, 0x0000011
gUnk_080CC826:: @ 080CC826
.incbin "baserom.gba", 0x0CC826, 0x0000011
gUnk_080CC837:: @ 080CC837
.incbin "baserom.gba", 0x0CC837, 0x0000011
gUnk_080CC848:: @ 080CC848
.incbin "baserom.gba", 0x0CC848, 0x0000011
gUnk_080CC859:: @ 080CC859
.incbin "baserom.gba", 0x0CC859, 0x0000011
gUnk_080CC86A:: @ 080CC86A
.incbin "baserom.gba", 0x0CC86A, 0x0000011
gUnk_080CC87B:: @ 080CC87B
.incbin "baserom.gba", 0x0CC87B, 0x0000011
gUnk_080CC88C:: @ 080CC88C
.incbin "baserom.gba", 0x0CC88C, 0x0000015
gUnk_080CC8A1:: @ 080CC8A1
.incbin "baserom.gba", 0x0CC8A1, 0x0000015
gUnk_080CC8B6:: @ 080CC8B6
.incbin "baserom.gba", 0x0CC8B6, 0x0000015
gUnk_080CC8CB:: @ 080CC8CB
.incbin "baserom.gba", 0x0CC8CB, 0x0000015
gUnk_080CC8E0:: @ 080CC8E0
.incbin "baserom.gba", 0x0CC8E0, 0x0000044
gUnk_080CC924:: @ 080CC924
.incbin "baserom.gba", 0x0CC924, 0x0000008
gUnk_080CC92C:: @ 080CC92C
.incbin "baserom.gba", 0x0CC92C, 0x0000008
gUnk_080CC934:: @ 080CC934
.incbin "baserom.gba", 0x0CC934, 0x0000008
gUnk_080CC93C:: @ 080CC93C
.incbin "baserom.gba", 0x0CC93C, 0x0000008
gUnk_080CC944:: @ 080CC944
.incbin "baserom.gba", 0x0CC944, 0x0000010
+37
View File
@@ -0,0 +1,37 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD31C:: @ 080CD31C
.incbin "baserom.gba", 0x0CD31C, 0x0000011
gUnk_080CD32D:: @ 080CD32D
.incbin "baserom.gba", 0x0CD32D, 0x0000011
gUnk_080CD33E:: @ 080CD33E
.incbin "baserom.gba", 0x0CD33E, 0x0000011
gUnk_080CD34F:: @ 080CD34F
.incbin "baserom.gba", 0x0CD34F, 0x0000011
gUnk_080CD360:: @ 080CD360
.incbin "baserom.gba", 0x0CD360, 0x0000008
gUnk_080CD368:: @ 080CD368
.incbin "baserom.gba", 0x0CD368, 0x0000008
gUnk_080CD370:: @ 080CD370
.incbin "baserom.gba", 0x0CD370, 0x0000008
gUnk_080CD378:: @ 080CD378
.incbin "baserom.gba", 0x0CD378, 0x0000008
gUnk_080CD380:: @ 080CD380
.incbin "baserom.gba", 0x0CD380, 0x0000011
gUnk_080CD391:: @ 080CD391
.incbin "baserom.gba", 0x0CD391, 0x0000007
gUnk_080CD398:: @ 080CD398
.incbin "baserom.gba", 0x0CD398, 0x000002C
+16
View File
@@ -0,0 +1,16 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD0B8:: @ 080CD0B8
.incbin "baserom.gba", 0x0CD0B8, 0x000000D
gUnk_080CD0C5:: @ 080CD0C5
.incbin "baserom.gba", 0x0CD0C5, 0x0000015
gUnk_080CD0DA:: @ 080CD0DA
.incbin "baserom.gba", 0x0CD0DA, 0x0000006
gUnk_080CD0E0:: @ 080CD0E0
.incbin "baserom.gba", 0x0CD0E0, 0x0000010
+14
View File
@@ -0,0 +1,14 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnk_080CD044:: @ 080CD044
.incbin "baserom.gba", 0x0CD044, 0x0000025
gUnk_080CD069:: @ 080CD069
.incbin "baserom.gba", 0x0CD069, 0x0000007
gUnk_080CD070:: @ 080CD070
.incbin "baserom.gba", 0x0CD070, 0x000000C
@@ -3,801 +3,6 @@
.section .rodata
gUnk_080CC19C:: @ 080CC19C
.incbin "baserom.gba", 0x0CC19C, 0x0000014
gUnk_080CC1B0:: @ 080CC1B0
.incbin "baserom.gba", 0x0CC1B0, 0x0000008
gUnk_080CC1B8:: @ 080CC1B8
.incbin "baserom.gba", 0x0CC1B8, 0x0000010
gUnk_080CC1C8:: @ 080CC1C8
.incbin "baserom.gba", 0x0CC1C8, 0x0000014
gUnk_080CC1DC:: @ 080CC1DC
.incbin "baserom.gba", 0x0CC1DC, 0x0000030
gUnk_080CC20C:: @ 080CC20C
.incbin "baserom.gba", 0x0CC20C, 0x0000028
gUnk_080CC234:: @ 080CC234
.incbin "baserom.gba", 0x0CC234, 0x000001B
gUnk_080CC24F:: @ 080CC24F
.incbin "baserom.gba", 0x0CC24F, 0x0000009
gUnk_080CC258:: @ 080CC258
.incbin "baserom.gba", 0x0CC258, 0x000000C
gUnk_080CC264:: @ 080CC264
.incbin "baserom.gba", 0x0CC264, 0x0000008
gUnk_080CC26C:: @ 080CC26C
.incbin "baserom.gba", 0x0CC26C, 0x000000C
gUnk_080CC278:: @ 080CC278
.incbin "baserom.gba", 0x0CC278, 0x0000004
gUnk_080CC27C:: @ 080CC27C
.incbin "baserom.gba", 0x0CC27C, 0x0000020
gUnk_080CC29C:: @ 080CC29C
.incbin "baserom.gba", 0x0CC29C, 0x0000020
gUnk_080CC2BC:: @ 080CC2BC
.incbin "baserom.gba", 0x0CC2BC, 0x0000020
gUnk_080CC2DC:: @ 080CC2DC
.incbin "baserom.gba", 0x0CC2DC, 0x0000003
gUnk_080CC2DF:: @ 080CC2DF
.incbin "baserom.gba", 0x0CC2DF, 0x0000004
gUnk_080CC2E3:: @ 080CC2E3
.incbin "baserom.gba", 0x0CC2E3, 0x0000004
gUnk_080CC2E7:: @ 080CC2E7
.incbin "baserom.gba", 0x0CC2E7, 0x0000004
gUnk_080CC2EB:: @ 080CC2EB
.incbin "baserom.gba", 0x0CC2EB, 0x0000004
gUnk_080CC2EF:: @ 080CC2EF
.incbin "baserom.gba", 0x0CC2EF, 0x0000005
gUnk_080CC2F4:: @ 080CC2F4
.incbin "baserom.gba", 0x0CC2F4, 0x0000011
gUnk_080CC305:: @ 080CC305
.incbin "baserom.gba", 0x0CC305, 0x0000019
gUnk_080CC31E:: @ 080CC31E
.incbin "baserom.gba", 0x0CC31E, 0x000000D
gUnk_080CC32B:: @ 080CC32B
.incbin "baserom.gba", 0x0CC32B, 0x000000D
gUnk_080CC338:: @ 080CC338
.incbin "baserom.gba", 0x0CC338, 0x0000005
gUnk_080CC33D:: @ 080CC33D
.incbin "baserom.gba", 0x0CC33D, 0x0000009
gUnk_080CC346:: @ 080CC346
.incbin "baserom.gba", 0x0CC346, 0x000000D
gUnk_080CC353:: @ 080CC353
.incbin "baserom.gba", 0x0CC353, 0x0000009
gUnk_080CC35C:: @ 080CC35C
.incbin "baserom.gba", 0x0CC35C, 0x000000D
gUnk_080CC369:: @ 080CC369
.incbin "baserom.gba", 0x0CC369, 0x0000009
gUnk_080CC372:: @ 080CC372
.incbin "baserom.gba", 0x0CC372, 0x0000009
gUnk_080CC37B:: @ 080CC37B
.incbin "baserom.gba", 0x0CC37B, 0x0000021
gUnk_080CC39C:: @ 080CC39C
.incbin "baserom.gba", 0x0CC39C, 0x0000038
gUnk_080CC3D4:: @ 080CC3D4
.incbin "baserom.gba", 0x0CC3D4, 0x0000038
gUnk_080CC40C:: @ 080CC40C
.incbin "baserom.gba", 0x0CC40C, 0x0000034
gUnk_080CC440:: @ 080CC440
.incbin "baserom.gba", 0x0CC440, 0x0000038
gUnk_080CC478:: @ 080CC478
.incbin "baserom.gba", 0x0CC478, 0x0000038
gUnk_080CC4B0:: @ 080CC4B0
.incbin "baserom.gba", 0x0CC4B0, 0x0000065
gUnk_080CC515:: @ 080CC515
.incbin "baserom.gba", 0x0CC515, 0x000006D
gUnk_080CC582:: @ 080CC582
.incbin "baserom.gba", 0x0CC582, 0x000006D
gUnk_080CC5EF:: @ 080CC5EF
.incbin "baserom.gba", 0x0CC5EF, 0x000006D
gUnk_080CC65C:: @ 080CC65C
.incbin "baserom.gba", 0x0CC65C, 0x0000021
gUnk_080CC67D:: @ 080CC67D
.incbin "baserom.gba", 0x0CC67D, 0x0000007
gUnk_080CC684:: @ 080CC684
.incbin "baserom.gba", 0x0CC684, 0x0000018
gUnk_080CC69C:: @ 080CC69C
.incbin "baserom.gba", 0x0CC69C, 0x0000038
gUnk_080CC6D4:: @ 080CC6D4
.incbin "baserom.gba", 0x0CC6D4, 0x0000028
gUnk_080CC6FC:: @ 080CC6FC
.incbin "baserom.gba", 0x0CC6FC, 0x0000018
gUnk_080CC714:: @ 080CC714
.incbin "baserom.gba", 0x0CC714, 0x0000020
gUnk_080CC734:: @ 080CC734
.incbin "baserom.gba", 0x0CC734, 0x0000025
gUnk_080CC759:: @ 080CC759
.incbin "baserom.gba", 0x0CC759, 0x0000015
gUnk_080CC76E:: @ 080CC76E
.incbin "baserom.gba", 0x0CC76E, 0x0000012
gUnk_080CC780:: @ 080CC780
.incbin "baserom.gba", 0x0CC780, 0x0000010
gUnk_080CC790:: @ 080CC790
.incbin "baserom.gba", 0x0CC790, 0x0000018
gUnk_080CC7A8:: @ 080CC7A8
.incbin "baserom.gba", 0x0CC7A8, 0x0000014
gUnk_080CC7BC:: @ 080CC7BC
.incbin "baserom.gba", 0x0CC7BC, 0x0000004
gUnk_080CC7C0:: @ 080CC7C0
.incbin "baserom.gba", 0x0CC7C0, 0x0000010
gUnk_080CC7D0:: @ 080CC7D0
.incbin "baserom.gba", 0x0CC7D0, 0x0000008
gUnk_080CC7D8:: @ 080CC7D8
.incbin "baserom.gba", 0x0CC7D8, 0x0000008
gUnk_080CC7E0:: @ 080CC7E0
.incbin "baserom.gba", 0x0CC7E0, 0x0000009
gUnk_080CC7E9:: @ 080CC7E9
.incbin "baserom.gba", 0x0CC7E9, 0x0000009
gUnk_080CC7F2:: @ 080CC7F2
.incbin "baserom.gba", 0x0CC7F2, 0x0000009
gUnk_080CC7FB:: @ 080CC7FB
.incbin "baserom.gba", 0x0CC7FB, 0x0000009
gUnk_080CC804:: @ 080CC804
.incbin "baserom.gba", 0x0CC804, 0x0000011
gUnk_080CC815:: @ 080CC815
.incbin "baserom.gba", 0x0CC815, 0x0000011
gUnk_080CC826:: @ 080CC826
.incbin "baserom.gba", 0x0CC826, 0x0000011
gUnk_080CC837:: @ 080CC837
.incbin "baserom.gba", 0x0CC837, 0x0000011
gUnk_080CC848:: @ 080CC848
.incbin "baserom.gba", 0x0CC848, 0x0000011
gUnk_080CC859:: @ 080CC859
.incbin "baserom.gba", 0x0CC859, 0x0000011
gUnk_080CC86A:: @ 080CC86A
.incbin "baserom.gba", 0x0CC86A, 0x0000011
gUnk_080CC87B:: @ 080CC87B
.incbin "baserom.gba", 0x0CC87B, 0x0000011
gUnk_080CC88C:: @ 080CC88C
.incbin "baserom.gba", 0x0CC88C, 0x0000015
gUnk_080CC8A1:: @ 080CC8A1
.incbin "baserom.gba", 0x0CC8A1, 0x0000015
gUnk_080CC8B6:: @ 080CC8B6
.incbin "baserom.gba", 0x0CC8B6, 0x0000015
gUnk_080CC8CB:: @ 080CC8CB
.incbin "baserom.gba", 0x0CC8CB, 0x0000015
gUnk_080CC8E0:: @ 080CC8E0
.incbin "baserom.gba", 0x0CC8E0, 0x0000044
gUnk_080CC924:: @ 080CC924
.incbin "baserom.gba", 0x0CC924, 0x0000008
gUnk_080CC92C:: @ 080CC92C
.incbin "baserom.gba", 0x0CC92C, 0x0000008
gUnk_080CC934:: @ 080CC934
.incbin "baserom.gba", 0x0CC934, 0x0000008
gUnk_080CC93C:: @ 080CC93C
.incbin "baserom.gba", 0x0CC93C, 0x0000008
gUnk_080CC944:: @ 080CC944
.incbin "baserom.gba", 0x0CC944, 0x0000010
gUnk_080CC954:: @ 080CC954
.incbin "baserom.gba", 0x0CC954, 0x000006C
gUnk_080CC9C0:: @ 080CC9C0
.incbin "baserom.gba", 0x0CC9C0, 0x0000008
gUnk_080CC9C8:: @ 080CC9C8
.incbin "baserom.gba", 0x0CC9C8, 0x0000018
gUnk_080CC9E0:: @ 080CC9E0
.incbin "baserom.gba", 0x0CC9E0, 0x0000024
gUnk_080CCA04:: @ 080CCA04
.incbin "baserom.gba", 0x0CCA04, 0x0000006
gUnk_080CCA0A:: @ 080CCA0A
.incbin "baserom.gba", 0x0CCA0A, 0x0000015
gUnk_080CCA1F:: @ 080CCA1F
.incbin "baserom.gba", 0x0CCA1F, 0x0000015
gUnk_080CCA34:: @ 080CCA34
.incbin "baserom.gba", 0x0CCA34, 0x0000015
gUnk_080CCA49:: @ 080CCA49
.incbin "baserom.gba", 0x0CCA49, 0x0000015
gUnk_080CCA5E:: @ 080CCA5E
.incbin "baserom.gba", 0x0CCA5E, 0x0000011
gUnk_080CCA6F:: @ 080CCA6F
.incbin "baserom.gba", 0x0CCA6F, 0x0000011
gUnk_080CCA80:: @ 080CCA80
.incbin "baserom.gba", 0x0CCA80, 0x0000011
gUnk_080CCA91:: @ 080CCA91
.incbin "baserom.gba", 0x0CCA91, 0x0000011
gUnk_080CCAA2:: @ 080CCAA2
.incbin "baserom.gba", 0x0CCAA2, 0x0000005
gUnk_080CCAA7:: @ 080CCAA7
.incbin "baserom.gba", 0x0CCAA7, 0x0000005
gUnk_080CCAAC:: @ 080CCAAC
.incbin "baserom.gba", 0x0CCAAC, 0x0000005
gUnk_080CCAB1:: @ 080CCAB1
.incbin "baserom.gba", 0x0CCAB1, 0x0000005
gUnk_080CCAB6:: @ 080CCAB6
.incbin "baserom.gba", 0x0CCAB6, 0x0000010
gUnk_080CCAC6:: @ 080CCAC6
.incbin "baserom.gba", 0x0CCAC6, 0x0000010
gUnk_080CCAD6:: @ 080CCAD6
.incbin "baserom.gba", 0x0CCAD6, 0x0000010
gUnk_080CCAE6:: @ 080CCAE6
.incbin "baserom.gba", 0x0CCAE6, 0x0000010
gUnk_080CCAF6:: @ 080CCAF6
.incbin "baserom.gba", 0x0CCAF6, 0x0000011
gUnk_080CCB07:: @ 080CCB07
.incbin "baserom.gba", 0x0CCB07, 0x0000011
gUnk_080CCB18:: @ 080CCB18
.incbin "baserom.gba", 0x0CCB18, 0x0000011
gUnk_080CCB29:: @ 080CCB29
.incbin "baserom.gba", 0x0CCB29, 0x0000011
gUnk_080CCB3A:: @ 080CCB3A
.incbin "baserom.gba", 0x0CCB3A, 0x000000D
gUnk_080CCB47:: @ 080CCB47
.incbin "baserom.gba", 0x0CCB47, 0x000000D
gUnk_080CCB54:: @ 080CCB54
.incbin "baserom.gba", 0x0CCB54, 0x000000D
gUnk_080CCB61:: @ 080CCB61
.incbin "baserom.gba", 0x0CCB61, 0x000000D
gUnk_080CCB6E:: @ 080CCB6E
.incbin "baserom.gba", 0x0CCB6E, 0x0000011
gUnk_080CCB7F:: @ 080CCB7F
.incbin "baserom.gba", 0x0CCB7F, 0x0000015
gUnk_080CCB94:: @ 080CCB94
.incbin "baserom.gba", 0x0CCB94, 0x000006C
gUnk_080CCC00:: @ 080CCC00
.incbin "baserom.gba", 0x0CCC00, 0x0000018
gUnk_080CCC18:: @ 080CCC18
.incbin "baserom.gba", 0x0CCC18, 0x000001C
gUnk_080CCC34:: @ 080CCC34
.incbin "baserom.gba", 0x0CCC34, 0x0000008
gUnk_080CCC3C:: @ 080CCC3C
.incbin "baserom.gba", 0x0CCC3C, 0x0000008
gUnk_080CCC44:: @ 080CCC44
.incbin "baserom.gba", 0x0CCC44, 0x0000003
gUnk_080CCC47:: @ 080CCC47
.incbin "baserom.gba", 0x0CCC47, 0x0000003
gUnk_080CCC4A:: @ 080CCC4A
.incbin "baserom.gba", 0x0CCC4A, 0x0000015
gUnk_080CCC5F:: @ 080CCC5F
.incbin "baserom.gba", 0x0CCC5F, 0x0000015
gUnk_080CCC74:: @ 080CCC74
.incbin "baserom.gba", 0x0CCC74, 0x0000028
gUnk_080CCC9C:: @ 080CCC9C
.incbin "baserom.gba", 0x0CCC9C, 0x0000018
gUnk_080CCCB4:: @ 080CCCB4
.incbin "baserom.gba", 0x0CCCB4, 0x0000015
gUnk_080CCCC9:: @ 080CCCC9
.incbin "baserom.gba", 0x0CCCC9, 0x0000015
gUnk_080CCCDE:: @ 080CCCDE
.incbin "baserom.gba", 0x0CCCDE, 0x0000028
gUnk_080CCD06:: @ 080CCD06
.incbin "baserom.gba", 0x0CCD06, 0x000001A
gUnk_080CCD20:: @ 080CCD20
.incbin "baserom.gba", 0x0CCD20, 0x0000024
gUnk_080CCD44:: @ 080CCD44
.incbin "baserom.gba", 0x0CCD44, 0x000001C
gUnk_080CCD60:: @ 080CCD60
.incbin "baserom.gba", 0x0CCD60, 0x0000018
gUnk_080CCD78:: @ 080CCD78
.incbin "baserom.gba", 0x0CCD78, 0x0000010
gUnk_080CCD88:: @ 080CCD88
.incbin "baserom.gba", 0x0CCD88, 0x0000018
gUnk_080CCDA0:: @ 080CCDA0
.incbin "baserom.gba", 0x0CCDA0, 0x0000008
gUnk_080CCDA8:: @ 080CCDA8
.incbin "baserom.gba", 0x0CCDA8, 0x0000020
gUnk_080CCDC8:: @ 080CCDC8
.incbin "baserom.gba", 0x0CCDC8, 0x000000C
gUnk_080CCDD4:: @ 080CCDD4
.incbin "baserom.gba", 0x0CCDD4, 0x0000008
gUnk_080CCDDC:: @ 080CCDDC
.incbin "baserom.gba", 0x0CCDDC, 0x0000011
gUnk_080CCDED:: @ 080CCDED
.incbin "baserom.gba", 0x0CCDED, 0x0000011
gUnk_080CCDFE:: @ 080CCDFE
.incbin "baserom.gba", 0x0CCDFE, 0x0000011
gUnk_080CCE0F:: @ 080CCE0F
.incbin "baserom.gba", 0x0CCE0F, 0x0000011
gUnk_080CCE20:: @ 080CCE20
.incbin "baserom.gba", 0x0CCE20, 0x0000011
gUnk_080CCE31:: @ 080CCE31
.incbin "baserom.gba", 0x0CCE31, 0x0000011
gUnk_080CCE42:: @ 080CCE42
.incbin "baserom.gba", 0x0CCE42, 0x0000011
gUnk_080CCE53:: @ 080CCE53
.incbin "baserom.gba", 0x0CCE53, 0x0000011
gUnk_080CCE64:: @ 080CCE64
.incbin "baserom.gba", 0x0CCE64, 0x0000024
gUnk_080CCE88:: @ 080CCE88
.incbin "baserom.gba", 0x0CCE88, 0x0000011
gUnk_080CCE99:: @ 080CCE99
.incbin "baserom.gba", 0x0CCE99, 0x0000011
gUnk_080CCEAA:: @ 080CCEAA
.incbin "baserom.gba", 0x0CCEAA, 0x0000011
gUnk_080CCEBB:: @ 080CCEBB
.incbin "baserom.gba", 0x0CCEBB, 0x0000011
gUnk_080CCECC:: @ 080CCECC
.incbin "baserom.gba", 0x0CCECC, 0x0000011
gUnk_080CCEDD:: @ 080CCEDD
.incbin "baserom.gba", 0x0CCEDD, 0x0000011
gUnk_080CCEEE:: @ 080CCEEE
.incbin "baserom.gba", 0x0CCEEE, 0x0000011
gUnk_080CCEFF:: @ 080CCEFF
.incbin "baserom.gba", 0x0CCEFF, 0x0000011
gUnk_080CCF10:: @ 080CCF10
.incbin "baserom.gba", 0x0CCF10, 0x0000005
gUnk_080CCF15:: @ 080CCF15
.incbin "baserom.gba", 0x0CCF15, 0x0000005
gUnk_080CCF1A:: @ 080CCF1A
.incbin "baserom.gba", 0x0CCF1A, 0x0000005
gUnk_080CCF1F:: @ 080CCF1F
.incbin "baserom.gba", 0x0CCF1F, 0x0000005
gUnk_080CCF24:: @ 080CCF24
.incbin "baserom.gba", 0x0CCF24, 0x000001D
gUnk_080CCF41:: @ 080CCF41
.incbin "baserom.gba", 0x0CCF41, 0x000001D
gUnk_080CCF5E:: @ 080CCF5E
.incbin "baserom.gba", 0x0CCF5E, 0x000001D
gUnk_080CCF7B:: @ 080CCF7B
.incbin "baserom.gba", 0x0CCF7B, 0x000001D
gUnk_080CCF98:: @ 080CCF98
.incbin "baserom.gba", 0x0CCF98, 0x0000011
gUnk_080CCFA9:: @ 080CCFA9
.incbin "baserom.gba", 0x0CCFA9, 0x0000011
gUnk_080CCFBA:: @ 080CCFBA
.incbin "baserom.gba", 0x0CCFBA, 0x0000011
gUnk_080CCFCB:: @ 080CCFCB
.incbin "baserom.gba", 0x0CCFCB, 0x0000011
gUnk_080CCFDC:: @ 080CCFDC
.incbin "baserom.gba", 0x0CCFDC, 0x0000054
gUnk_080CD030:: @ 080CD030
.incbin "baserom.gba", 0x0CD030, 0x000000C
gUnk_080CD03C:: @ 080CD03C
.incbin "baserom.gba", 0x0CD03C, 0x0000004
gUnk_080CD040:: @ 080CD040
.incbin "baserom.gba", 0x0CD040, 0x0000004
gUnk_080CD044:: @ 080CD044
.incbin "baserom.gba", 0x0CD044, 0x0000025
gUnk_080CD069:: @ 080CD069
.incbin "baserom.gba", 0x0CD069, 0x0000007
gUnk_080CD070:: @ 080CD070
.incbin "baserom.gba", 0x0CD070, 0x000000C
gUnk_080CD07C:: @ 080CD07C
.incbin "baserom.gba", 0x0CD07C, 0x0000018
gUnk_080CD094:: @ 080CD094
.incbin "baserom.gba", 0x0CD094, 0x000001C
gUnk_080CD0B0:: @ 080CD0B0
.incbin "baserom.gba", 0x0CD0B0, 0x0000008
gUnk_080CD0B8:: @ 080CD0B8
.incbin "baserom.gba", 0x0CD0B8, 0x000000D
gUnk_080CD0C5:: @ 080CD0C5
.incbin "baserom.gba", 0x0CD0C5, 0x0000015
gUnk_080CD0DA:: @ 080CD0DA
.incbin "baserom.gba", 0x0CD0DA, 0x0000006
gUnk_080CD0E0:: @ 080CD0E0
.incbin "baserom.gba", 0x0CD0E0, 0x0000010
gUnk_080CD0F0:: @ 080CD0F0
.incbin "baserom.gba", 0x0CD0F0, 0x0000018
gUnk_080CD108:: @ 080CD108
.incbin "baserom.gba", 0x0CD108, 0x0000018
gUnk_080CD120:: @ 080CD120
.incbin "baserom.gba", 0x0CD120, 0x0000014
gUnk_080CD134:: @ 080CD134
.incbin "baserom.gba", 0x0CD134, 0x000000C
gUnk_080CD140:: @ 080CD140
.incbin "baserom.gba", 0x0CD140, 0x0000018
gUnk_080CD158:: @ 080CD158
.incbin "baserom.gba", 0x0CD158, 0x0000014
gUnk_080CD16C:: @ 080CD16C
.incbin "baserom.gba", 0x0CD16C, 0x0000008
gUnk_080CD174:: @ 080CD174
.incbin "baserom.gba", 0x0CD174, 0x0000008
gUnk_080CD17C:: @ 080CD17C
.incbin "baserom.gba", 0x0CD17C, 0x0000008
gUnk_080CD184:: @ 080CD184
.incbin "baserom.gba", 0x0CD184, 0x0000011
gUnk_080CD195:: @ 080CD195
.incbin "baserom.gba", 0x0CD195, 0x0000041
gUnk_080CD1D6:: @ 080CD1D6
.incbin "baserom.gba", 0x0CD1D6, 0x0000041
gUnk_080CD217:: @ 080CD217
.incbin "baserom.gba", 0x0CD217, 0x0000009
gUnk_080CD220:: @ 080CD220
.incbin "baserom.gba", 0x0CD220, 0x0000014
gUnk_080CD234:: @ 080CD234
.incbin "baserom.gba", 0x0CD234, 0x0000018
gUnk_080CD24C:: @ 080CD24C
.incbin "baserom.gba", 0x0CD24C, 0x000000C
gUnk_080CD258:: @ 080CD258
.incbin "baserom.gba", 0x0CD258, 0x000001C
gUnk_080CD274:: @ 080CD274
.incbin "baserom.gba", 0x0CD274, 0x0000008
gUnk_080CD27C:: @ 080CD27C
.incbin "baserom.gba", 0x0CD27C, 0x000001C
gUnk_080CD298:: @ 080CD298
.incbin "baserom.gba", 0x0CD298, 0x0000010
gUnk_080CD2A8:: @ 080CD2A8
.incbin "baserom.gba", 0x0CD2A8, 0x0000004
gUnk_080CD2AC:: @ 080CD2AC
.incbin "baserom.gba", 0x0CD2AC, 0x0000011
gUnk_080CD2BD:: @ 080CD2BD
.incbin "baserom.gba", 0x0CD2BD, 0x000000B
gUnk_080CD2C8:: @ 080CD2C8
.incbin "baserom.gba", 0x0CD2C8, 0x0000010
gUnk_080CD2D8:: @ 080CD2D8
.incbin "baserom.gba", 0x0CD2D8, 0x0000018
gUnk_080CD2F0:: @ 080CD2F0
.incbin "baserom.gba", 0x0CD2F0, 0x0000024
gUnk_080CD314:: @ 080CD314
.incbin "baserom.gba", 0x0CD314, 0x0000004
gUnk_080CD318:: @ 080CD318
.incbin "baserom.gba", 0x0CD318, 0x0000004
gUnk_080CD31C:: @ 080CD31C
.incbin "baserom.gba", 0x0CD31C, 0x0000011
gUnk_080CD32D:: @ 080CD32D
.incbin "baserom.gba", 0x0CD32D, 0x0000011
gUnk_080CD33E:: @ 080CD33E
.incbin "baserom.gba", 0x0CD33E, 0x0000011
gUnk_080CD34F:: @ 080CD34F
.incbin "baserom.gba", 0x0CD34F, 0x0000011
gUnk_080CD360:: @ 080CD360
.incbin "baserom.gba", 0x0CD360, 0x0000008
gUnk_080CD368:: @ 080CD368
.incbin "baserom.gba", 0x0CD368, 0x0000008
gUnk_080CD370:: @ 080CD370
.incbin "baserom.gba", 0x0CD370, 0x0000008
gUnk_080CD378:: @ 080CD378
.incbin "baserom.gba", 0x0CD378, 0x0000008
gUnk_080CD380:: @ 080CD380
.incbin "baserom.gba", 0x0CD380, 0x0000011
gUnk_080CD391:: @ 080CD391
.incbin "baserom.gba", 0x0CD391, 0x0000007
gUnk_080CD398:: @ 080CD398
.incbin "baserom.gba", 0x0CD398, 0x000002C
gUnk_080CD3C4:: @ 080CD3C4
.incbin "baserom.gba", 0x0CD3C4, 0x0000010
gUnk_080CD3D4:: @ 080CD3D4
.incbin "baserom.gba", 0x0CD3D4, 0x0000008
gUnk_080CD3DC:: @ 080CD3DC
.incbin "baserom.gba", 0x0CD3DC, 0x0000008
gUnk_080CD3E4:: @ 080CD3E4
.incbin "baserom.gba", 0x0CD3E4, 0x0000018
gUnk_080CD3FC:: @ 080CD3FC
.incbin "baserom.gba", 0x0CD3FC, 0x000000C
gUnk_080CD408:: @ 080CD408
.incbin "baserom.gba", 0x0CD408, 0x0000024
gUnk_080CD42C:: @ 080CD42C
.incbin "baserom.gba", 0x0CD42C, 0x000000C
gUnk_080CD438:: @ 080CD438
.incbin "baserom.gba", 0x0CD438, 0x0000018
gUnk_080CD450:: @ 080CD450
.incbin "baserom.gba", 0x0CD450, 0x000000C
gUnk_080CD45C:: @ 080CD45C
.incbin "baserom.gba", 0x0CD45C, 0x0000008
gUnk_080CD464:: @ 080CD464
.incbin "baserom.gba", 0x0CD464, 0x0000010
gUnk_080CD474:: @ 080CD474
.incbin "baserom.gba", 0x0CD474, 0x0000011
gUnk_080CD485:: @ 080CD485
.incbin "baserom.gba", 0x0CD485, 0x0000011
gUnk_080CD496:: @ 080CD496
.incbin "baserom.gba", 0x0CD496, 0x0000011
gUnk_080CD4A7:: @ 080CD4A7
.incbin "baserom.gba", 0x0CD4A7, 0x0000011
gUnk_080CD4B8:: @ 080CD4B8
.incbin "baserom.gba", 0x0CD4B8, 0x0000011
gUnk_080CD4C9:: @ 080CD4C9
.incbin "baserom.gba", 0x0CD4C9, 0x0000011
gUnk_080CD4DA:: @ 080CD4DA
.incbin "baserom.gba", 0x0CD4DA, 0x0000011
gUnk_080CD4EB:: @ 080CD4EB
.incbin "baserom.gba", 0x0CD4EB, 0x0000011
gUnk_080CD4FC:: @ 080CD4FC
.incbin "baserom.gba", 0x0CD4FC, 0x0000004
gUnk_080CD500:: @ 080CD500
.incbin "baserom.gba", 0x0CD500, 0x0000004
gUnk_080CD504:: @ 080CD504
.incbin "baserom.gba", 0x0CD504, 0x0000004
gUnk_080CD508:: @ 080CD508
.incbin "baserom.gba", 0x0CD508, 0x0000004
gUnk_080CD50C:: @ 080CD50C
.incbin "baserom.gba", 0x0CD50C, 0x0000034
gUnk_080CD540:: @ 080CD540
.incbin "baserom.gba", 0x0CD540, 0x0000018
gUnk_080CD558:: @ 080CD558
.incbin "baserom.gba", 0x0CD558, 0x0000010
gUnk_080CD568:: @ 080CD568
.incbin "baserom.gba", 0x0CD568, 0x0000018
gUnk_080CD580:: @ 080CD580
.incbin "baserom.gba", 0x0CD580, 0x000000C
gUnk_080CD58C:: @ 080CD58C
.incbin "baserom.gba", 0x0CD58C, 0x0000018
gUnk_080CD5A4:: @ 080CD5A4
.incbin "baserom.gba", 0x0CD5A4, 0x0000011
gUnk_080CD5B5:: @ 080CD5B5
.incbin "baserom.gba", 0x0CD5B5, 0x0000013
gUnk_080CD5C8:: @ 080CD5C8
.incbin "baserom.gba", 0x0CD5C8, 0x000000C
gUnk_080CD5D4:: @ 080CD5D4
.incbin "baserom.gba", 0x0CD5D4, 0x0000018
gUnk_080CD5EC:: @ 080CD5EC
.incbin "baserom.gba", 0x0CD5EC, 0x0000014
gUnk_080CD600:: @ 080CD600
.incbin "baserom.gba", 0x0CD600, 0x0000018
gUnk_080CD618:: @ 080CD618
.incbin "baserom.gba", 0x0CD618, 0x0000010
gUnk_080CD628:: @ 080CD628
.incbin "baserom.gba", 0x0CD628, 0x0000011
gUnk_080CD639:: @ 080CD639
.incbin "baserom.gba", 0x0CD639, 0x0000011
gUnk_080CD64A:: @ 080CD64A
.incbin "baserom.gba", 0x0CD64A, 0x0000011
gUnk_080CD65B:: @ 080CD65B
.incbin "baserom.gba", 0x0CD65B, 0x0000011
gUnk_080CD66C:: @ 080CD66C
.incbin "baserom.gba", 0x0CD66C, 0x0000005
gUnk_080CD671:: @ 080CD671
.incbin "baserom.gba", 0x0CD671, 0x0000005
gUnk_080CD676:: @ 080CD676
.incbin "baserom.gba", 0x0CD676, 0x0000009
gUnk_080CD67F:: @ 080CD67F
.incbin "baserom.gba", 0x0CD67F, 0x0000009
gUnk_080CD688:: @ 080CD688
.incbin "baserom.gba", 0x0CD688, 0x0000024
gUnk_080CD6AC:: @ 080CD6AC
.incbin "baserom.gba", 0x0CD6AC, 0x0000024
gUnk_080CD6D0:: @ 080CD6D0
.incbin "baserom.gba", 0x0CD6D0, 0x000002C
gUnk_080CD6FC:: @ 080CD6FC
.incbin "baserom.gba", 0x0CD6FC, 0x0000018
+1
View File
@@ -8,6 +8,7 @@ typedef struct {
u8 areaMetadata;
u8 locationIndex;
u8 unk;
u8 regret;
u16 localFlagOffset;
u8 filler[10];
u16 field_0x10;
+16 -7
View File
@@ -135,16 +135,18 @@ typedef struct Entity {
/*0x80*/ union SplitHWord field_0x80;
/*0x82*/ union SplitHWord field_0x82;
/*0x84*/ union SplitHWord cutsceneBeh;
/*0x86*/ u16 field_0x86;
/*0x86*/ union SplitHWord field_0x86;
} Entity;
#define COORD_TO_TILE(entity) \
((((entity->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 0x3fU) | \
(((entity->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 0x3fU) << 6)
#define TILE(x, y) \
((((x - gRoomControls.roomOriginX) >> 4) & 0x3fU) | \
(((y - gRoomControls.roomOriginY) >> 4) & 0x3fU) << 6)
#define COORD_TO_TILE_OFFSET(entity, xOff, yOff) \
((((entity->x.HALF.HI - xOff - gRoomControls.roomOriginX) >> 4) & 0x3fU) | \
(((entity->y.HALF.HI - yOff - gRoomControls.roomOriginY) >> 4) & 0x3fU) << 6)
#define COORD_TO_TILE(entity) \
TILE(entity->x.HALF.HI, entity->y.HALF.HI)
#define COORD_TO_TILE_OFFSET(entity, xOff, yOff) \
TILE(entity->x.HALF.HI - xOff, entity->y.HALF.HI - yOff)
extern Entity* CreateEnemy(u32 subtype, u32 form);
extern Entity* CreateObject(u32 subtype, u32 form, u32 parameter);
@@ -169,6 +171,13 @@ extern void CopyPosition(Entity*, Entity*);
extern void DeleteEntity(Entity*);
extern void PositionRelative(Entity*, Entity*, s32, s32);
enum {
DirectionNorth = 0x00,
DirectionEast = 0x08,
DirectionSouth = 0x10,
DirectionWest = 0x18,
};
#define DirectionRound(expr) ((expr) & 0x18)
#define DirectionRoundUp(expr) DirectionRound((expr) + 4)
#define DirectionIsHorizontal(expr) ((expr) & 0x08)
+1
View File
@@ -195,6 +195,7 @@ extern u32 sub_080043E8(Entity*);
extern void sub_08001290(Entity*, u32);
extern void EnqueueSFX(u32);
extern void sub_08004596(Entity*, u32);
extern u32 sub_080045B4(Entity*, u32, u32);
extern u32 sub_0807953C(void);
extern void ResetPlayer(void);
extern void CreateDust(Entity*);
-4
View File
@@ -15,13 +15,9 @@ extern void sub_0805EC9C();
extern void sub_0805EC60();
extern void sub_080873D0();
extern void DeleteEntity();
extern u32 sub_080045D4();
extern void sub_0806F69C();
extern u32 Random();
extern void sub_0805E3A0(Entity*, u32);
extern Entity* FindEntityInListBySubtype(u32, u32, u32);
extern void sub_080791D0();
extern u32 FindEntityInListByForm(u32, u32, u32, u32, u32);
extern void (*const GreatFairy_Main[])(Entity*);
extern void (*const GreatFairy_Behaviors[])(Entity*);
extern void (*const GreatFairy_WingsBehaviors[])(Entity*);
+1
View File
@@ -106,6 +106,7 @@ typedef struct {
} ItemBehavior;
extern u8 gBombBagSizes[];
extern u8 gQuiverSizes[];
extern PlayerState gPlayerState;
extern Stats gStats;
+45 -15
View File
@@ -345,22 +345,21 @@ SECTIONS {
src/enemy/pesto.o(.text);
src/enemy/puffstool.o(.text);
asm/chuchuBoss.o(.text);
asm/likeLike.o(.text);
asm/spearMoblin.o(.text);
asm/businessScrub.o(.text);
src/enemy/likeLike.o(.text);
src/enemy/spearMoblin.o(.text);
src/enemy/businessScrub.o(.text);
src/enemy/rupeeLike.o(.text);
asm/madderpillar.o(.text);
asm/waterDrop.o(.text);
asm/wallMaster.o(.text);
src/enemy/madderpillar.o(.text);
src/enemy/waterDrop.o(.text);
src/enemy/wallMaster.o(.text);
src/enemy/bombPeahat.o(.text);
asm/bombPeahat.o(.text);
asm/spark.o(.text);
asm/chaser.o(.text);
asm/spikedBeetle.o(.text);
asm/sensorBladeTrap.o(.text);
asm/helmasaur.o(.text);
asm/fallingBoulder.o(.text);
asm/bobomb.o(.text);
src/enemy/spark.o(.text);
src/enemy/chaser.o(.text);
src/enemy/spikedBeetle.o(.text);
src/enemy/sensorBladeTrap.o(.text);
src/enemy/helmasaur.o(.text);
src/enemy/fallingBoulder.o(.text);
src/enemy/bobomb.o(.text);
asm/wallMaster2.o(.text);
asm/gleerok.o(.text);
asm/vaatiEyesMacro.o(.text);
@@ -941,7 +940,38 @@ SECTIONS {
data/animations/pesto.o(.rodata);
src/enemy/puffstool.o(.rodata);
data/animations/puffstool.o(.rodata);
data/data_080CC19C.o(.rodata);
src/enemy/chuchuBoss.o(.rodata);
data/animations/chuchuBoss.o(.rodata);
src/enemy/likeLike.o(.rodata);
data/animations/likeLike.o(.rodata);
src/enemy/spearMoblin.o(.rodata);
data/animations/spearMoblin.o(.rodata);
src/enemy/businessScrub.o(.rodata);
data/animations/businessScrub.o(.rodata);
src/enemy/rupeeLike.o(.rodata);
data/animations/rupeeLike.o(.rodata);
src/enemy/madderpillar.o(.rodata);
data/animations/madderpillar.o(.rodata);
src/enemy/waterDrop.o(.rodata);
data/animations/waterDrop.o(.rodata);
src/enemy/wallMaster.o(.rodata);
data/animations/wallMaster.o(.rodata);
src/enemy/bombPeahat.o(.rodata);
data/animations/bombPeahat.o(.rodata);
src/enemy/spark.o(.rodata);
data/animations/spark.o(.rodata);
src/enemy/chaser.o(.rodata);
data/animations/chaser.o(.rodata);
src/enemy/spikedBeetle.o(.rodata);
data/animations/spikedBeetle.o(.rodata);
src/enemy/sensorBladeTrap.o(.rodata);
src/enemy/helmasaur.o(.rodata);
data/animations/helmasaur.o(.rodata);
src/enemy/fallingBoulder.o(.rodata);
data/animations/fallingBoulder.o(.rodata);
src/enemy/bobomb.o(.rodata);
data/animations/bobomb.o(.rodata);
data/data_080CC6FC.o(.rodata);
src/enemy.o(.rodata);
data/data_080D3D94.o(.rodata);
data/areaPropertyLists.o(.rodata);
+1 -1
View File
@@ -78,7 +78,7 @@ Entity* sub_080A2A3C(Entity* parent, u32 form, u32 subtype, u32 param_4) {
ent = CreateObjectWithParent(parent, 0, form, subtype);
if (ent != NULL) {
ent->actionDelay = 5;
ent->field_0x86 = param_4;
ent->field_0x86.HWORD = param_4;
}
return ent;
}
-1
View File
@@ -16,7 +16,6 @@ extern void sub_0804AA30(Entity*, void (*const funcs[])(Entity*));
extern u32 sub_0806FCB8(Entity*, u32, u32, u32);
extern u32 GetNextFunction(Entity*);
extern void SetChildOffset(Entity*, s32, s32, s32);
extern u32 Random(void);
extern Entity* gUnk_020000B0;
extern u8 gEntCount;
+331
View File
@@ -0,0 +1,331 @@
#include "enemy.h"
#include "functions.h"
extern void CreateDustSmall(Entity*);
extern void sub_08078930(Entity*);
extern void sub_08078954(Entity*);
void sub_0802CB68(Entity*);
void sub_0802CBC4(Entity*);
void sub_0802CC18(Entity*);
extern void (*const gUnk_080CD5D4[])(Entity*);
extern void (*const gUnk_080CD5EC[])(Entity*);
extern void (*const gUnk_080CD600[])(Entity*);
extern void (*const gUnk_080CD618[])(Entity*);
void Bobomb(Entity* this) {
EnemyFunctionHandler(this, gUnk_080CD5D4);
}
void sub_0802C670(Entity* this) {
gUnk_080CD5EC[this->action](this);
}
void sub_0802C688(Entity* this) {
if (this->bitfield & 0x80) {
switch (this->bitfield & 0x7f) {
case 0:
case 1:
if (this->field_0x82.HALF.LO) {
this->field_0x42 = 0;
gPlayerEntity.field_0x42 = 4;
}
return;
case 0xe:
case 0x14:
case 0x15:
case 0x16:
this->action = 3;
this->field_0x42 = 0;
sub_0802CBC4(this);
return;
}
this->field_0x82.HALF.LO++;
this->field_0x80.HALF.LO = 28;
switch (this->field_0x82.HALF.LO) {
case 1:
sub_0802CB68(this);
EnqueueSFX(0x14d);
break;
case 2:
this->action = 3;
this->damageType = 0x6e;
this->field_0xf = 1;
this->field_0x20 = 0x18000;
this->nonPlanarMovement = 0;
this->field_0x80.HALF.HI = 1;
InitializeAnimation(this, this->direction >> 4 | 6);
break;
}
}
sub_0804AA30(this, gUnk_080CD5D4);
}
void sub_0802C7AC(Entity* this) {
if (this->previousActionFlag < 3 && !sub_0806F520(this)) {
this->previousActionFlag = 0;
this->field_0xf = 1;
this->height.HALF.HI = 0;
if (this->field_0x82.HALF.LO != 2) {
this->nonPlanarMovement = this->field_0x82.HALF.LO ? 0x200 : 0x80;
}
this->field_0x20 = 0x18000;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
} else {
this->height.HALF.HI = -1;
gUnk_080CD600[this->previousActionFlag](this);
if (this->actionDelay != 0) {
GetNextFrame(this);
}
}
}
void sub_0802C820(Entity* this) {
this->previousActionFlag = 1;
this->field_0x1d = 60;
}
void sub_0802C82C(Entity* this) {
sub_0806F4E8(this);
}
void sub_0802C834(Entity* this) {
sub_0806F3E4(this);
}
void sub_0802C83C(Entity* this) {
if (this->field_0x82.HALF.LO) {
if (--this->actionDelay == 0) {
this->action = 3;
switch (gPlayerEntity.animationState & 6) {
case 2:
this->x.HALF.HI -= 6;
break;
case 6:
this->x.HALF.HI += 6;
break;
}
sub_0802CBC4(this);
} else {
sub_0802CC18(this);
this->flags &= ~0x80;
this->damageType = 0x6e;
}
} else {
this->field_0x82.HALF.LO = 2;
this->actionDelay = 120;
InitializeAnimation(this, (this->direction >> 4) | 6);
this->flags &= ~0x80;
this->damageType = 0x6e;
}
}
void nullsub_149(Entity* this) {
/* ... */
}
void sub_0802C8B8(Entity* this) {
this->action = 3;
sub_0802CBC4(this);
}
void sub_0802C8C4(Entity* this) {
sub_0804A7D4(this);
this->spriteSettings.b.draw = 0;
}
void sub_0802C8D8(Entity* this) {
this->action = 1;
this->actionDelay = 0x3c;
this->field_0xf = 0;
this->direction = (Random() & 0x18) | 4;
this->field_0x16 = 0;
this->field_0x1c = 0x12;
this->field_0x82.HALF.LO = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.LO = 0;
this->field_0x80.HALF.HI = 0;
InitializeAnimation(this, this->direction >> 4);
}
void sub_0802C91C(Entity* this) {
GetNextFrame(this);
ProcessMovement(this);
if (this->field_0x82.HALF.LO) {
if (this->collisions) {
sub_0800417E(this, this->collisions);
InitializeAnimation(this, (this->direction >> 4) | 2);
}
if (--this->actionDelay == 0) {
sub_0802CBC4(this);
} else {
if ((this->actionDelay & 0xf) == 8) {
CreateDustSmall(this);
}
sub_0802CC18(this);
}
} else {
if (this->collisions) {
sub_0800417E(this, this->collisions);
InitializeAnimation(this, this->direction >> 4);
}
if (--this->actionDelay == 0) {
this->actionDelay = 60;
this->direction = (this->direction + 8) & 0x1c;
InitializeAnimation(this, this->direction >> 4);
}
}
}
void sub_0802C9B8(Entity* this) {
gUnk_080CD618[this->previousActionFlag](this);
}
void sub_0802C9D0(Entity* this) {
this->previousActionFlag = 1;
this->flags &= ~0x80;
this->spritePriority.b1 = 0;
this->field_0x82.HALF.HI = 1;
sub_0802CC18(this);
InitializeAnimation(this, (this->direction >> 4) | 6);
GetNextFrame(this);
}
void sub_0802CA10(Entity* this) {
if (gPlayerState.heldObject != 5) {
if (--this->actionDelay == 0) {
sub_0802CBC4(this);
} else {
sub_0802CC18(this);
GetNextFrame(this);
}
} else {
this->field_0x82.HALF.HI = 2;
this->direction = (((gPlayerEntity.animationState) << 2) | 4) & 0x1c;
sub_0802CC18(this);
GetNextFrame(this);
}
}
void sub_0802CA6C(Entity* this) {
if (--this->actionDelay == 0) {
sub_0802CBC4(this);
} else {
sub_0802CC18(this);
GetNextFrame(this);
}
}
void sub_0802CA94(Entity* this) {
this->action = 3;
this->flags &= ~0x80;
this->field_0xf = 1;
this->spritePriority.b1 = 1;
this->field_0x20 = 0x18000;
this->nonPlanarMovement = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
this->direction = ((gPlayerEntity.animationState << 2) | 4) & 0x1c;
InitializeAnimation(this, (this->direction >> 4) | 6);
}
void sub_0802CAF8(Entity* this) {
if (--this->actionDelay == 0) {
sub_0802CBC4(this);
} else {
if (this->field_0x80.HALF.HI && sub_080044EC(this, 0x2800) == 1) {
EnqueueSFX(0x104);
}
sub_0802CC18(this);
sub_08078930(this);
if (this->field_0xf && this->height.HALF.HI == 0) {
this->field_0xf = 0;
this->flags = this->flags | 0x80;
this->damageType = 0x6e;
}
GetNextFrame(this);
}
}
void nullsub_150(Entity* this) {
/* ... */
}
void sub_0802CB68(Entity* this) {
this->action = 1;
this->previousActionFlag = 0;
this->direction = Random() & 0x18;
this->direction |= 4;
this->flags |= 0x80;
if (this->field_0x82.HALF.LO) {
this->actionDelay = 200;
this->nonPlanarMovement = 0x200;
InitializeAnimation(this, (this->direction >> 4) | 2);
} else {
this->actionDelay = 0x3c;
this->nonPlanarMovement = 0x80;
InitializeAnimation(this, this->direction >> 4);
}
}
void sub_0802CBC4(Entity* this) {
Entity* ent;
this->action = 4;
this->spriteSettings.b.draw = 0;
this->flags &= ~0x80;
this->currentHealth = 0;
if (this->field_0x82.HALF.HI) {
sub_08079184();
}
sub_08078954(this);
ent = CreateObjectWithParent(this, 0x20, 0, 0);
if (ent) {
ent->collisionLayer = this->collisionLayer;
}
}
void sub_0802CC18(Entity* this) {
if (--this->field_0x80.HALF.LO == 0) {
this->field_0x80.HALF.LO = 28;
EnqueueSFX(0x14d);
}
}
// clang-format off
void (*const gUnk_080CD5D4[])(Entity*) = {
sub_0802C670,
sub_0802C688,
sub_08001324,
sub_0802C8C4,
sub_08001242,
sub_0802C7AC,
};
void (*const gUnk_080CD5EC[])(Entity*) = {
sub_0802C8D8,
sub_0802C91C,
sub_0802C9B8,
sub_0802CAF8,
nullsub_150,
};
void (*const gUnk_080CD600[])(Entity*) = {
sub_0802C820,
sub_0802C82C,
sub_0802C834,
sub_0802C83C,
nullsub_149,
sub_0802C8B8,
};
void (*const gUnk_080CD618[])(Entity*) = {
sub_0802C9D0,
sub_0802CA10,
sub_0802CA6C,
sub_0802CA94,
};
// clang-format on
+612 -29
View File
@@ -3,24 +3,43 @@
#include "functions.h"
#include "player.h"
extern void sub_08078954(Entity*);
extern u32 sub_0800442E(Entity*);
extern void sub_08078930(Entity*);
extern s32 sub_080012DC(Entity*);
extern u32 GetNextFunction(Entity*);
extern void sub_0802AD54(Entity*);
extern void sub_0802B048(Entity*);
extern void sub_0806F4E8(Entity*);
extern Entity* sub_08049DF4(u32);
extern void sub_08079BD8(Entity*);
extern u32 GetTileTypeByEntity(Entity*);
void sub_0802AD1C(Entity*, u32);
void sub_0802AD54(Entity*);
void sub_0802B048(Entity*);
void sub_0802ACDC(Entity*, u32);
void sub_0802ADDC(Entity*);
void sub_0802AC40(Entity*);
bool32 sub_0802B234(Entity*);
Entity* sub_0802B250(Entity*);
void sub_0802B264(Entity*);
extern void (*const gUnk_080012C8[])(Entity*);
extern void (*const gUnk_080CD0F0[])(Entity*);
extern void (*const gUnk_080CD108[])(Entity*);
extern void (*const gUnk_080CD120[])(Entity*);
extern void (*const gUnk_080CD134[])(Entity*);
extern void (*const gUnk_080CD108[])(Entity*);
extern void (*const gUnk_080CD140[])(Entity*);
extern void (*const gUnk_080CD158[])(Entity*);
extern const BoundingBox gUnk_080CD16C;
extern const BoundingBox gUnk_080CD174;
extern const BoundingBox gUnk_080CD17C;
void BombPeahat(Entity* this) {
s32 iVar1;
u32 uVar2;
if (((this->entityType).form == 2) && (iVar1 = sub_080012DC(this), iVar1)) {
if ((this->entityType.form == 2) && (iVar1 = sub_080012DC(this), iVar1)) {
gUnk_080012C8[iVar1](this);
} else {
gUnk_080CD0F0[GetNextFunction(this)](this);
@@ -32,54 +51,618 @@ void sub_0802A84C(Entity* this) {
default:
gUnk_080CD108[this->action](this);
sub_0802AD54(this);
return;
break;
case 2:
gUnk_080CD120[this->action](this);
sub_0802B048(this);
return;
break;
case 3:
gUnk_080CD134[this->action](this);
break;
}
}
void sub_0802A8AC(Entity *this) {
void sub_0802A8AC(Entity* this) {
this->field_0x80.HALF.HI = 0;
if (this->entityType.form < 2) {
InitializeAnimation(this, 0);
}
}
void sub_0802A8C8(Entity* this)
{
gUnk_080CD140[this->previousActionFlag](this);
void sub_0802A8C8(Entity* this) {
gUnk_080CD140[this->previousActionFlag](this);
}
void sub_0802A8E0(Entity *this)
{
this->previousActionFlag = 1;
this->field_0x1d = 0x3c;
void sub_0802A8E0(Entity* this) {
this->previousActionFlag = 1;
this->field_0x1d = 60;
}
void sub_0802A8EC(Entity *this)
{
void sub_0802A8EC(Entity* this) {
sub_0806F4E8(this);
}
void sub_0802A8F4(Entity *this)
{
void sub_0802A8F4(Entity* this) {
sub_0806F3E4(this);
}
void sub_0802A8FC(Entity *this)
{
if ((gPlayerState.field_0x1c & 0xf) == 0) {
this->currentHealth = gPlayerState.field_0x1c & 0xf;
}
void sub_0802A8FC(Entity* this) {
if ((gPlayerState.field_0x1c & 0xf) == 0) {
this->currentHealth = gPlayerState.field_0x1c & 0xf;
}
}
void nullsub_143(Entity* this){}
void sub_0802A91C(Entity *this)
{
this->currentHealth = 0;
void nullsub_143(Entity* this) {
/* ... */
}
void sub_0802A91C(Entity* this) {
this->currentHealth = 0;
}
void sub_0802A924(Entity* this) {
this->action = 1;
this->previousActionFlag = 0;
this->actionDelay = 0;
this->field_0xf = 0;
this->boundingBox = (BoundingBox*)&gUnk_080CD16C;
this->height.HALF.HI = -0x30;
this->field_0x80.HALF.LO = Random() & 1;
this->field_0x82.HWORD = 0;
this->field_0x7a.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
this->field_0x7a.HALF.LO = 0;
this->field_0x78.HALF.LO = 0;
this->field_0x78.HALF.HI = 0;
this->collisionLayer = 3;
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 1;
InitializeAnimation(this, this->entityType.form + 1);
}
void sub_0802A9A8(Entity* this) {
if (this->field_0xf) {
this->field_0xf--;
} else {
if (this->actionDelay) {
if (--this->actionDelay == 0) {
this->action = 2;
this->previousActionFlag = 0;
this->actionDelay = 0x40;
sub_0802ACDC(this, 8);
}
} else {
if (gRoomControls.unk2 != 0) {
return;
}
this->spriteSettings.b.draw = 1;
this->field_0x82.HWORD = 1;
if (this->field_0x80.HALF.LO) {
this->x.HALF.HI = gRoomControls.roomScrollX - 0x10;
this->direction = 8;
} else {
this->x.HALF.HI = gRoomControls.roomScrollX + 0x100;
this->direction = 0x18;
}
this->y.HALF.HI = gRoomControls.roomScrollY + 0x40;
this->actionDelay = 0x80;
sub_0802ADDC(this);
}
sub_0802AC40(this);
}
}
void sub_0802AA40(Entity* this) {
sub_0802AC40(this);
if (--this->field_0xf == 0) {
sub_0802ACDC(this, 8);
this->field_0x7a.HALF.HI++;
}
if (this->actionDelay) {
this->actionDelay--;
} else {
Entity* ent = this->attachedEntity;
if (ent) {
if (ent->next == NULL) {
this->attachedEntity = NULL;
} else {
u32 direction = DirectionRound(this->field_0x80.HALF.LO * 0x10 + 0x18);
if (0x20 < this->field_0x7a.HALF.HI) {
this->direction = direction;
}
if (this->direction == direction) {
this->action = 3;
this->nonPlanarMovement = 0x180;
this->field_0x7a.HALF.HI = 0;
ent->field_0x80.HALF.LO = 1;
ent->actionDelay = 0x96;
}
}
}
}
}
void sub_0802AAC0(Entity* this) {
sub_0802AC40(this);
if (--this->field_0xf == 0) {
sub_0802AD1C(this, 4);
}
if (this->field_0x80.HALF.HI) {
Entity* ent = this->attachedEntity;
if (ent == NULL) {
this->field_0x80.HALF.HI = 0;
} else if (ent->next == NULL) {
this->field_0x80.HALF.HI = 0;
this->attachedEntity = NULL;
} else if (ent->actionDelay == 0 && ent->field_0xf < 0x51) {
this->field_0x80.HALF.HI = 0;
}
} else {
this->action = 4;
this->actionDelay = 0xc0;
this->field_0xf = 4;
this->field_0x80.HALF.LO ^= 1;
this->field_0x78.HALF.LO = 0;
this->field_0x78.HALF.HI = 4;
this->direction = 0xff;
InitializeAnimation(this, 0);
}
}
void sub_0802AB40(Entity* this) {
sub_0802AC40(this);
switch (this->field_0x78.HALF.LO) {
case 0:
if (this->height.HALF.HI) {
if (--this->field_0x78.HALF.HI == 0) {
this->field_0x78.HALF.HI = 4;
this->height.HALF.HI++;
}
} else {
this->field_0x78.HALF.LO = 1;
this->field_0x78.HALF.HI = 0x30;
this->direction = sub_08049F84(this, 0);
}
break;
case 1:
if (--this->field_0x78.HALF.HI == 0) {
this->field_0x78.HALF.LO = 2;
this->field_0x78.HALF.HI = 4;
} else if ((this->field_0x78.HALF.HI & 7) == 0) {
this->direction = sub_08049F84(this, 0);
}
break;
case 2:
if (-0x30 < this->height.HALF.HI) {
if (--this->field_0x78.HALF.HI == 0) {
this->field_0x78.HALF.HI = 4;
this->height.HALF.HI--;
sub_0802ACDC(this, 4);
}
} else {
this->action = 5;
this->nonPlanarMovement = 0;
InitializeAnimation(this, this->entityType.form + 1);
}
break;
}
}
void sub_0802AC08(Entity* this) {
if (this->frames.all & 0x80) {
this->action = 2;
this->previousActionFlag = 0;
this->actionDelay = 0x40;
this->nonPlanarMovement = 0xc0;
sub_0802ACDC(this, 8);
sub_0802ADDC(this);
}
GetNextFrame(this);
}
void sub_0802AC40(Entity* this) {
GetNextFrame(this);
sub_0806F69C(this);
if (this->field_0x7a.HALF.LO) {
if (sub_0802B234(this) == 0) {
this->field_0x7a.HALF.LO = 0;
this->spritePriority.b1 = 0;
} else {
if (this->height.HALF.HI == 0) {
if (this->spritePriority.b1 != 1) {
this->spritePriority.b1 = 1;
}
} else {
if (this->spritePriority.b1 != 3) {
this->spritePriority.b1 = 3;
}
}
}
} else {
if (sub_0802B234(this)) {
this->field_0x7a.HALF.LO = 1;
if (this->height.HALF.HI == 0) {
this->spritePriority.b1 = 1;
} else {
this->spritePriority.b1 = 3;
}
}
}
}
void sub_0802ACDC(Entity* this, u32 param_2) {
u32 x;
if (this->field_0x80.HALF.LO) {
x = sub_080045B4(this, gRoomControls.roomScrollX + 0x20, gRoomControls.roomScrollY + 0x60);
} else {
x = sub_080045B4(this, gRoomControls.roomScrollX + 0xd0, gRoomControls.roomScrollY + 0x60);
}
sub_08004596(this, x);
this->field_0xf = param_2;
}
void sub_0802AD1C(Entity* this, u32 param_2) {
Entity* ent = sub_08049DF4(1);
if (ent) {
u32 y = ent->y.HALF.HI - 0x18;
u32 x = ent->x.HALF.HI;
sub_08004596(this, sub_080045B4(this, x, y));
this->field_0xf = param_2;
} else {
sub_0802ACDC(this, param_2);
}
}
void sub_0802AD54(Entity* this) {
if (this->field_0x82.HWORD != 0) {
if (gRoomControls.unk2 != 0) {
this->spriteSettings.b.draw = 0;
DeleteEntity(this);
return;
}
if (gRoomControls.roomOriginY > this->y.HALF.HI ||
(gRoomControls.roomOriginY + gRoomControls.height + 0x20) < this->y.HALF.HI) {
this->spriteSettings.b.draw = 0;
} else {
this->spriteSettings.b.draw = 1;
}
}
if (this->field_0x80.HALF.HI) {
if (this->attachedEntity == NULL || this->attachedEntity->next == NULL) {
this->action = 4;
this->actionDelay = 0xc0;
this->field_0xf = 4;
this->field_0x80.HALF.LO ^= 1;
}
}
}
void sub_0802ADDC(Entity* this) {
Entity* ent = CreateEnemy(0x1b, this->entityType.form + 2);
if (ent != NULL) {
ent->entityType.parameter = !!sub_0802B234(this);
ent->parent = this;
this->attachedEntity = ent;
CopyPosition(this, ent);
this->field_0x80.HALF.HI = 1;
if (this->entityType.form == 0) {
this->field_0x7a.HALF.LO++;
}
}
}
void sub_0802AE24(Entity* this) {
this->action = 1;
this->actionDelay = 0xf0;
this->field_0x20 = 0x8000;
this->boundingBox = (BoundingBox*)&gUnk_080CD174;
this->field_0x3c = 3;
this->field_0x16 = 0;
this->field_0x1c = 2;
this->field_0x80.HALF.HI = 0;
this->field_0x7a.HALF.HI = 1;
InitializeAnimation(this, 3);
}
void sub_0802AE68(Entity* this) {
Entity* ent = sub_0802B250(this);
if (ent == 0) {
this->action = 3;
this->field_0x80.HALF.LO = 1;
sub_0802B264(this);
} else {
if (ent->field_0x80.HALF.HI) {
CopyPosition(ent, this);
this->spriteSettings.b.draw = 0;
} else {
this->action = 3;
this->field_0x80.HALF.LO = 1;
sub_0802B264(this);
}
}
}
void sub_0802AEBC(Entity* this) {
gUnk_080CD158[this->previousActionFlag](this);
}
void sub_0802AED4(Entity* this) {
GetNextFrame(this);
if (this->field_0x80.HALF.HI < 2) {
if (sub_080044EC(this, 0x2800) == 1) {
this->field_0x80.HALF.HI++;
}
} else {
if (!sub_0800442E(this)) {
sub_08078930(this);
}
}
if (this->entityType.parameter != 0 && this->field_0x80.HALF.HI) {
this->actionDelay = 0;
this->field_0xf = 1;
}
}
void sub_0802AF28(Entity* this) {
this->previousActionFlag = 1;
sub_08079BD8(this);
this->spritePriority.b1 = 2;
GetNextFrame(this);
}
void sub_0802AF50(Entity* this) {
GetNextFrame(this);
}
void sub_0802AF58(Entity* this) {
GetNextFrame(this);
this->spritePriority.b1 = 3;
}
void sub_0802AF74(Entity* this) {
this->action = 3;
this->previousActionFlag = 0;
if (this->actionDelay > 60) {
this->actionDelay = 60;
}
GetNextFrame(this);
}
void sub_0802AF94(Entity* this) {
DeleteEntity(this);
}
void sub_0802AF9C(Entity* this) {
GetNextFrame(this);
if (--this->actionDelay == 0) {
if (this->parent->field_0x7a.HALF.LO) {
this->parent->field_0x7a.HALF.LO--;
}
DeleteEntity(this);
}
}
#if NON_MATCHING
void sub_0802AFC8(Entity* this) {
u32 flag = 8;
if (this->field_0xf < 0x29) {
u32 tmp;
flag = 4;
if (this->field_0x82.HWORD & 0x8000) {
this->field_0x82.HWORD -= 0x10;
} else {
this->field_0x82.HWORD += 0x10;
}
if (0x7f < (this->field_0x82.HWORD & 0xf0) - 1) {
this->field_0x82.HWORD ^= 0x8000;
}
tmp = 0x130 - (this->field_0x82.HWORD & 0xf0);
sub_0805EC9C(this, tmp, tmp, 0);
}
if (this->field_0xf & flag) {
this->palette.b.b0 = 0;
} else {
this->palette.b.b0 = this->palette.b.b4;
}
}
#else
NAKED
void sub_0802AFC8(Entity* this) {
asm(".include \"asm/non_matching/bombPeahat/sub_0802AFC8.inc\"");
}
#endif
void sub_0802B048(Entity* this) {
Entity* ent;
u32 action;
if (this->field_0x7a.HALF.HI) {
if (gRoomControls.roomOriginY > this->y.HALF.HI ||
(gRoomControls.roomOriginY + gRoomControls.height + 0x20) < this->y.HALF.HI) {
this->flags &= ~0x80;
} else {
this->flags |= 0x80;
}
}
ent = this->parent;
if (ent && this->action == 1) {
this->spriteRendering.b3 = ent->spriteRendering.b3;
this->spritePriority.b0 = ent->spritePriority.b0;
this->spriteOrientation.flipY = ent->spriteOrientation.flipY;
}
action = this->action;
if (action != 4 && this->field_0x80.HALF.LO) {
if (this->actionDelay) {
if (--this->actionDelay == 0) {
this->field_0xf = 0x50;
this->field_0x82.HWORD = 0;
this->spriteRendering.b0 = 3;
sub_0805EC9C(this, 0x100, 0x100, 0);
}
} else {
if (this->field_0xf) {
if (--this->field_0xf == 0) {
if (action == 2 && this->previousActionFlag == 1) {
gPlayerState.heldObject = 0;
}
sub_0805EC60(this);
this->action = 4;
this->boundingBox = (BoundingBox*)&gUnk_080CD17C;
this->actionDelay = 0xf;
this->spriteSettings.b.draw = 0;
this->flags |= 0x80;
this->field_0x7a.HALF.HI = 0;
sub_08078954(this);
if (this->parent->next) {
this->parent->field_0x80.HALF.HI = 0;
}
ent = CreateObjectWithParent(this, 0x20, 0, 0);
if (ent != NULL) {
this->collisionLayer = 1;
} else {
DeleteEntity(this);
}
} else {
sub_0802AFC8(this);
}
}
}
}
}
void sub_0802B1A0(Entity* this) {
this->action = 1;
this->actionDelay = 0;
this->field_0xf = 0x4f;
this->field_0x80.HALF.HI = 1;
InitializeAnimation(this, 0);
}
void sub_0802B1BC(Entity* this) {
Entity* ent;
if (this->actionDelay) {
this->actionDelay--;
}
ent = sub_0802B250(this);
if (ent == 0) {
this->action = 2;
sub_0802B264(this);
} else {
if (ent->field_0x80.HALF.HI) {
CopyPosition(ent, this);
} else {
this->action = 2;
sub_0802B264(this);
}
}
}
void sub_0802B204(Entity* this) {
if (sub_080044EC(this, 0x2800) == 1) {
Entity* ent = CreateEnemy(0x22, 1);
if (ent) {
CopyPosition(this, ent);
ent->parent = this->parent;
}
DeleteThisEntity();
}
}
bool32 sub_0802B234(Entity* this) {
bool32 ret = FALSE;
if (GetTileTypeByEntity(this) - 0x1c4 > 1)
ret = TRUE;
return ret;
}
Entity* sub_0802B250(Entity* this) {
Entity* parent = this->parent;
if (parent && parent->next == NULL) {
parent = NULL;
}
return parent;
}
void sub_0802B264(Entity* this) {
this->spriteSettings.b.draw = 1;
if (sub_0802B234(this)) {
this->spritePriority.b1 = 3;
} else {
this->spritePriority.b1 = 0;
}
GetNextFrame(this);
}
// clang-format off
void (*const gUnk_080CD0F0[])(Entity*) = {
sub_0802A84C,
sub_0802A8AC,
sub_08001324,
sub_0804A7D4,
sub_08001242,
sub_0802A8C8,
};
void (*const gUnk_080CD108[])(Entity*) = {
sub_0802A924,
sub_0802A9A8,
sub_0802AA40,
sub_0802AAC0,
sub_0802AB40,
sub_0802AC08,
};
void (*const gUnk_080CD120[])(Entity*) = {
sub_0802AE24,
sub_0802AE68,
sub_0802AEBC,
sub_0802AED4,
sub_0802AF9C,
};
void (*const gUnk_080CD134[])(Entity*) = {
sub_0802B1A0,
sub_0802B1BC,
sub_0802B204,
};
void (*const gUnk_080CD140[])(Entity*) = {
sub_0802A8E0,
sub_0802A8EC,
sub_0802A8F4,
sub_0802A8FC,
nullsub_143,
sub_0802A91C,
};
void (*const gUnk_080CD158[])(Entity*) = {
sub_0802AF28,
sub_0802AF50,
sub_0802AF58,
sub_0802AF74,
sub_0802AF94,
};
const BoundingBox gUnk_080CD16C = {
0x00, 0xFB, 0x05, 0x03, 0x03, 0x05, 0x06, 0x06,
};
const BoundingBox gUnk_080CD174 = {
0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x04, 0x04,
};
const BoundingBox gUnk_080CD17C = {
0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x16, 0x16,
};
// clang-format on
+608
View File
@@ -0,0 +1,608 @@
#include "enemy.h"
#include "entity.h"
#include "flags.h"
#include "functions.h"
#include "textbox.h"
extern void sub_0801D040(Entity*, u32);
extern Entity* sub_08049DF4(u32);
extern bool32 sub_08056338(void);
extern void UnloadOBJPalette(Entity*);
bool32 sub_0802915C(Entity*);
bool32 sub_080291DC(Entity*);
void sub_0802922C(Entity*);
void sub_08028E9C(Entity*);
u32 sub_080001DA(u32, u32);
void sub_08028FFC(Entity*);
void sub_0802925C(Entity*);
void sub_080290E0(Entity*, u32);
bool32 sub_08028F98(Entity*, u32);
void sub_08029078(Entity*);
bool32 sub_08028FDC(Entity*);
void sub_080290FC(Entity*);
void sub_08028EDC(Entity*);
extern const struct SalesOffering gUnk_080CC954[];
extern const u8 gUnk_080CC9C0[];
extern void (*const gUnk_080CC9C8[])(Entity*);
extern void (*const gUnk_080CC9E0[])(Entity*);
extern const u8 gUnk_080CCA04[];
struct SalesOffering {
u8 field_0x0;
u8 field_0x1;
u16 price;
u16 field_0x4;
u16 field_0x6;
u8 field_0x8;
u8 field_0x9;
u16 field_0xa;
};
void BusinessScrub(Entity* this) {
EnemyFunctionHandler(this, gUnk_080CC9C8);
}
void sub_0802891C(Entity* this) {
gUnk_080CC9E0[this->action](this);
}
void sub_08028934(Entity* this) {
Entity* pEVar1;
if (this->damageType == 1 && (this->bitfield & 0x7f) == 0x42) {
this->action = 3;
this->previousActionFlag = 0;
this->actionDelay = 0x28;
this->flags &= ~0x80;
sub_080290E0(this, 4);
pEVar1 = CreateFx(this, 3, 0);
if (pEVar1 != NULL) {
pEVar1->height.HALF.HI -= 8;
}
EnqueueSFX(0x1bb);
}
}
void nullsub_140(Entity* this) {
/* ... */
}
void sub_08028994(Entity* this) {
this->field_0xf = 0;
this->field_0x78.HWORD = this->x.HALF.HI;
this->field_0x7a.HWORD = this->y.HALF.HI;
this->animationState = 0;
this->direction = 0x10;
sub_08028E9C(this);
if ((*(u8*)this->field_0x7c.WORD & 1) || CheckFlags(this->field_0x86.HWORD)) {
this->action = 4;
this->actionDelay = 0x78;
this->spritePriority.b1 = 1;
sub_0802925C(this);
sub_080290E0(this, 0);
} else {
this->actionDelay = 0;
this->field_0x76.HWORD = COORD_TO_TILE(this);
this->field_0x74.HWORD = sub_080001DA(this->field_0x76.HWORD, this->collisionLayer);
this->field_0x40 = 0x41;
sub_08028FFC(this);
}
}
void sub_08028A48(Entity* this) {
if (this->actionDelay) {
this->actionDelay--;
} else if (sub_08028F98(this, 0)) {
sub_08029078(this);
this->previousActionFlag = 0;
this->field_0xf = 1;
}
}
void sub_08028A74(Entity* this) {
u32 unk;
GetNextFrame(this);
switch (this->previousActionFlag) {
case 0:
unk = 1;
if (this->frames.all & 0x80) {
this->previousActionFlag = 1;
this->actionDelay = 0x3c;
this->field_0xf = 0x10;
sub_08028FDC(this);
sub_080290E0(this, 1);
}
break;
case 1:
unk = 1;
if (--this->actionDelay == 0) {
this->previousActionFlag = 2;
this->actionDelay = 0x20;
this->field_0xf = 0;
sub_08028FDC(this);
sub_080290E0(this, 2);
} else if (--this->field_0xf == 0) {
if (sub_08028FDC(this)) {
sub_080290E0(this, 1);
}
this->field_0xf = 0x10;
}
break;
case 2:
unk = 1;
sub_080290FC(this);
if (this->frames.all & 1) {
Entity* ent = sub_0804A98C(this, 4, 0);
if (ent != NULL) {
ent->parent = this;
ent->direction = this->direction;
this->frames.all &= ~1;
this->previousActionFlag = 3;
}
}
break;
case 3:
unk = 2;
if (this->frames.all & 0x80) {
this->previousActionFlag = 4;
this->actionDelay = 0x50;
sub_080290E0(this, 1);
}
break;
case 4:
unk = 2;
if (--this->actionDelay == 0) {
if (sub_08028F98(this, 0)) {
this->previousActionFlag = 1;
this->actionDelay = 0x3c;
this->field_0xf = 0x10;
sub_08028FDC(this);
} else {
sub_08028FFC(this);
this->previousActionFlag = 0;
this->actionDelay = 0x50;
this->field_0xf = 0;
}
return;
}
break;
}
if (!sub_08028F98(this, unk)) {
sub_08028FFC(this);
this->previousActionFlag = 0;
this->actionDelay = 0x50;
this->field_0xf = 0;
}
}
void sub_08028BC4(Entity* this) {
Entity* iVar1;
switch (this->previousActionFlag) {
case 0:
if (this->actionDelay == 0) {
if (this->frames.all & 0x80) {
this->previousActionFlag = 1;
sub_08028FDC(this);
sub_080290E0(this, 5);
this->spritePriority.b1 = 1;
}
} else {
this->actionDelay--;
}
break;
case 1:
if (this->frames.all & 0x80) {
this->action = 4;
this->previousActionFlag = 0;
this->actionDelay = 0x1e;
this->field_0xf = 5;
sub_080290E0(this, 0);
iVar1 = sub_0804A9FC(this, 0x1c);
if (iVar1 != NULL) {
iVar1->spritePriority.b0 = 3;
iVar1->height.HALF.HI -= 12;
sub_0805E3A0(iVar1, 2);
}
SetFlag(this->field_0x86.HWORD);
sub_0802925C(this);
}
break;
}
GetNextFrame(this);
sub_0800445C(this);
}
extern void sub_0804AA1C(Entity*);
void sub_08028F0C(Entity*);
void sub_08028C84(Entity* this) {
if (--this->actionDelay == 0) {
this->actionDelay = 0x30;
if (this->field_0xf) {
if (--this->field_0xf == 0) {
sub_0804AA1C(this);
}
} else if (sub_08028FDC(this) || this->field_0x80.HALF.LO) {
this->field_0x80.HALF.LO = 0;
sub_080290E0(this, 0);
}
}
GetNextFrame(this);
sub_0800445C(this);
sub_08028F0C(this);
}
void sub_08028CE8(Entity* this) {
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
u32 subtype;
if ((gTextBox.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
if (offer->price <= gUnk_02002A40.stats.rupees) {
if (sub_080291DC(this)) {
/* Bag full. */
TextboxNoOverlapFollow(0x2904);
sub_08078A90(0);
} else {
ModRupees(-offer->price);
switch (offer->field_0x0 >> 2) {
case 0:
subtype = offer->field_0x9;
if (subtype == 0xff) {
subtype = gUnk_080CC9C0[Random() & 7];
}
CreateItemEntity(offer->field_0x8, subtype, 0);
this->action = 6;
this->actionDelay = 4;
this->field_0x80.HALF.HI = 0;
sub_080290E0(this, 3);
SetLocalFlag(0x87);
return;
case 1:
CreateItemEntity(offer->field_0x8, offer->field_0x9, 0);
this->actionDelay = 4;
sub_0802922C(this);
return;
case 2:
CreateItemEntity(offer->field_0x8, offer->field_0x9, 0);
this->actionDelay = 8;
sub_0802922C(this);
return;
}
}
} else {
/* Not enough money. */
TextboxNoOverlapFollow(0x2903);
sub_08078A90(0);
}
}
sub_0800445C(this);
this->action = 4;
this->actionDelay = 0x30;
sub_080290E0(this, 0);
}
void sub_08028DE8(Entity* this) {
if (gPlayerEntity.action == 8) {
if (this->field_0x80.HALF.HI == 0) {
sub_08078A90(1);
this->field_0x80.HALF.HI = 1;
}
} else {
TextboxNoOverlapFollow(0x2902);
this->action = 4;
this->field_0x80.HALF.HI = 0;
this->actionDelay = 1;
sub_08028EDC(this);
sub_08078A90(0);
sub_0800445C(this);
GetNextFrame(this);
}
}
void sub_08028E40(Entity* this) {
if ((gTextBox.doTextBox & 0x7f) == 0) {
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
this->action = 4;
this->previousActionFlag = gTextBox.doTextBox & 0x7f;
this->actionDelay = 1;
if (CheckLocalFlag(offer->field_0xa) == 0) {
SetLocalFlag(offer->field_0xa);
}
sub_08078A90(0);
}
sub_0800445C(this);
GetNextFrame(this);
}
void sub_08028E84(Entity* this) {
if (UpdateFuseInteraction()) {
this->action = 4;
this->actionDelay = 1;
}
}
bool32 sub_08029198(const struct SalesOffering*);
void sub_08028E9C(Entity* this) {
const struct SalesOffering* offer = &gUnk_080CC954[this->entityType.form];
if (sub_08029198(offer) && (offer->field_0x0 & 2)) {
offer = &gUnk_080CC954[offer->field_0xa];
}
this->field_0x7c.WORD = (u32)offer;
this->field_0x80.HALF.LO = 0;
}
void sub_08028EDC(Entity* this) {
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
if (sub_08029198(offer) && (offer->field_0x0 & 2)) {
offer = &gUnk_080CC954[offer->field_0xa];
this->field_0x7c.WORD = (u32)offer;
}
}
void sub_08028F0C(Entity* this) {
if (this->interactType == 2) {
this->action = 8;
this->interactType = 0;
sub_0806F118(this);
} else if (this->interactType != 0) {
u16 dialog;
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
this->interactType = 0;
sub_0804AA1C(this);
this->direction = (GetAnimationState(this) << 3);
sub_080290E0(this, 3);
this->field_0x80.HALF.LO = 1;
this->actionDelay = 0x20;
this->field_0xf = 0;
if (sub_08029198(offer)) {
dialog = offer->field_0x6;
} else {
if ((offer->field_0x0 & 0xfc) != 0xc) {
this->action = 5;
} else {
this->action = 7;
}
dialog = offer->field_0x4;
sub_08078A90(1);
}
TextboxNoOverlapFollow(dialog);
gTextBox.field_0x10 = offer->price;
}
}
bool32 sub_08028F98(Entity* this, u32 param_2) {
Entity* ent = sub_08049DF4(1);
if (ent == NULL || sub_080041A0(this, ent, 0x28, 0x28)) {
return FALSE;
}
if (param_2 != 2) {
u32 distance = param_2 ? 0x58 : 0x50;
if (!sub_080041A0(this, ent, distance, distance)) {
return FALSE;
}
}
return TRUE;
}
bool32 sub_08028FDC(Entity* this) {
u32 direction = DirectionRoundUp(sub_08049F84(this, 1));
if (direction == this->direction) {
return FALSE;
} else {
this->direction = direction;
return TRUE;
}
}
void sub_08028FFC(Entity* this) {
this->action = 1;
this->flags &= ~0x80;
this->spritePriority.b1 = 0;
sub_080AE068(this);
UnloadOBJPalette(this);
this->spriteVramOffset = 0xe8;
this->palette.b.b0 = 2;
this->palette.b.b4 = 2;
this->spriteIndex = 0xa7;
this->x.HALF.HI = this->field_0x78.HWORD;
this->y.HALF.HI = this->field_0x7a.HWORD;
InitializeAnimation(this, 0);
SetTile(0x4022, this->field_0x76.HWORD, this->collisionLayer);
}
void sub_08029078(Entity* this) {
this->action = 2;
this->flags = this->flags | 0x80;
this->spritePriority.b1 = 1;
if (LoadFixedGFX(this, 0x72) == 0) {
DeleteEntity(this);
} else {
sub_0801D040(this, 0x6e);
this->spriteIndex = 0xd0;
sub_08028FDC(this);
sub_080290E0(this, 1);
SetTile(this->field_0x74.HWORD, this->field_0x76.HWORD, this->collisionLayer);
}
}
void sub_080290E0(Entity* this, u32 param_2) {
InitializeAnimation(this, this->direction >> 3 | gUnk_080CCA04[param_2]);
}
void sub_080290FC(Entity* this) {
if (this->actionDelay != 0) {
if (--this->actionDelay < 0x10 && (this->actionDelay & 1) == 0) {
s32 sVar3 = (this->direction & 0x10) ? -1 : 1;
if ((this->direction & 8)) {
this->x.HALF.HI += (this->actionDelay & 8) ? -sVar3 : sVar3;
} else {
this->y.HALF.HI += (this->actionDelay & 8) ? sVar3 : -sVar3;
}
}
}
}
bool32 sub_0802915C(Entity* this) {
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
switch (offer->field_0x8) {
case 0x44:
if (GetInventoryValue(0x44) == 0)
return TRUE;
break;
case 0x1c:
if (CheckGlobalFlag(0x5a) == 0)
return TRUE;
break;
case 0x5c:
case 0x6c:
case 0x6f:
return TRUE;
}
return FALSE;
}
bool32 sub_08029198(const struct SalesOffering* offer) {
u32 tmp;
if ((offer->field_0x0 & 0xfc) != 0xc) {
switch (offer->field_0x8) {
case 0x1c:
tmp = CheckGlobalFlag(0x5a);
break;
case 0x9:
case 0x44:
tmp = GetInventoryValue(offer->field_0x8);
break;
default:
return 0;
}
} else {
tmp = CheckLocalFlag(offer->field_0xa);
}
if (tmp == 0) {
return FALSE;
}
return TRUE;
}
bool32 sub_080291DC(Entity* this) {
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
switch (offer->field_0x8) {
case 0x6c:
if (gBombBagSizes[gUnk_02002A40.stats.bombBagType] <= gUnk_02002A40.stats.bombCount)
return TRUE;
break;
case 0x6f:
if (gQuiverSizes[gUnk_02002A40.stats.quiverType] <= gUnk_02002A40.stats.arrowCount)
return TRUE;
break;
}
return FALSE;
}
#if NON_MATCHING
void sub_0802922C(Entity* this) {
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
this->action = 6;
this->field_0x80.HALF.HI = 0;
switch (offer->field_0x8) {
case 0x1c:
SetGlobalFlag(0x5a);
break;
}
sub_080290E0(this, 3);
}
#else
NAKED
void sub_0802922C(Entity* this) {
asm(".include \"asm/non_matching/businessScrub/sub_0802925C.inc\"");
}
#endif
void sub_0802925C(Entity* this) {
sub_08078784(this, sub_0801E99C(this));
}
void sub_08029270(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = 1;
InitializeAnimation(this, 0xe);
} else {
GetNextFrame(this);
}
}
// clang-format off
const struct SalesOffering gUnk_080CC954[] = {
{0x06, 0x00, 0xffff, 0x290f, 0x2902, 0x09, 0xff, 0x0001},
{0x04, 0x00, 0x001e, 0x290e, 0x2902, 0x6f, 0xff, 0xffff},
{0x04, 0x00, 0x001e, 0x290b, 0x2902, 0x6c, 0xff, 0xffff},
{0x08, 0x00, 0x0028, 0x290c, 0x2911, 0x44, 0xff, 0xffff},
{0x00, 0x00, 0x0064, 0x290d, 0x2902, 0x5c, 0xff, 0xffff},
{0x04, 0x00, 0x0014, 0x2910, 0x2911, 0x1c, 0xff, 0xffff},
{0x0c, 0x00, 0xffff, 0x2912, 0x2913, 0xff, 0xff, 0x0046},
{0x04, 0x00, 0x0064, 0x2913, 0x2902, 0x5c, 0x75, 0xffff},
{0x00, 0x00, 0x00C8, 0x290d, 0x2902, 0x5c, 0xff, 0xffff},
};
const u8 gUnk_080CC9C0[] = {
0x6e,
0x6f,
0x70,
0x71,
0x72,
0x73,
0x74,
0x75,
};
void (*const gUnk_080CC9C8[])(Entity*) = {
sub_0802891C,
sub_08028934,
sub_08001324,
sub_0804A7D4,
sub_08001242,
nullsub_140,
};
void (*const gUnk_080CC9E0[])(Entity*) = {
sub_08028994,
sub_08028A48,
sub_08028A74,
sub_08028BC4,
sub_08028C84,
sub_08028CE8,
sub_08028DE8,
sub_08028E40,
sub_08028E84,
};
const u8 gUnk_080CCA04[] = {
0, 4, 8, 12, 16, 20,
};
// clang-format on
+91
View File
@@ -0,0 +1,91 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
extern s32 sub_080012DC(Entity*);
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AF038(Entity*);
extern void (*const gUnk_080012C8[])(Entity*);
extern void (*const gUnk_080CD27C[])(Entity*);
extern void (*const gUnk_080CD298[])(Entity*);
void Chaser(Entity* this) {
u32 idx = sub_080012DC(this);
if (idx) {
gUnk_080012C8[idx](this);
} else {
gUnk_080CD27C[GetNextFunction(this)](this);
}
}
void sub_0802B518(Entity* this) {
gUnk_080CD298[this->action](this);
}
void sub_0802B530(Entity* this) {
this->action = 1;
InitializeAnimation(this, 0);
}
void sub_0802B540(Entity* this) {
if (this->actionDelay) {
this->actionDelay--;
} else {
u32 direction = sub_0804A024(this, 1, 0xc);
if (direction != 0xff) {
this->action = 2;
this->nonPlanarMovement = 0x40;
this->direction = direction;
}
}
}
void sub_0802B56C(Entity* this) {
GetNextFrame(this);
if (this->bitfield & 0x80) {
this->nonPlanarMovement = 0x40;
}
if (sub_080AF038(this)) {
if (this->animIndex != 1) {
InitializeAnimation(this, 1);
}
if (this->nonPlanarMovement < 0x220) {
this->nonPlanarMovement += 4;
}
} else {
this->action = 3;
InitializeAnimation(this, 2);
}
}
void sub_0802B5C8(Entity *this) {
GetNextFrame(this);
if (this->frames.all & 0x80) {
this->action = 1;
this->actionDelay = 30;
InitializeAnimation(this,0);
}
}
// clang-format off
void (*const gUnk_080CD27C[])(Entity*) = {
sub_0802B518,
sub_0802B518,
sub_08001324,
sub_0804A7D4,
sub_08001242,
sub_0802B518,
sub_0802B518,
};
void (*const gUnk_080CD298[])(Entity*) = {
sub_0802B530,
sub_0802B540,
sub_0802B56C,
sub_0802B5C8,
};
// clang-format on
+190
View File
@@ -0,0 +1,190 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
extern void sub_08078B48(void);
void sub_08027870(Entity*);
extern void (*const gUnk_080CC19C[])(Entity*);
extern void (*const gUnk_080CC1B0[])(Entity*);
extern const u8 gUnk_080CC1B8[];
extern void (*const gUnk_080CC1C8[])(Entity*);
extern void (*const gUnk_080CC1DC[])(Entity*);
extern void (*const gUnk_080CC20C[])(Entity*);
extern const u8 gUnk_080CC234[];
extern const u8 gUnk_080CC24F[];
extern void (*const gUnk_080CC258[])(Entity*);
extern void (*const gUnk_080CC264[])(Entity*);
extern void (*const gUnk_080CC26C[])(Entity*);
extern const u8 gUnk_080CC278[];
extern const u16 gUnk_080CC27C[];
extern const u16 gUnk_080CC29C[];
extern const u16 gUnk_080CC2BC[];
extern const s8 gUnk_080CC2DC[];
void sub_08025DC0(Entity*);
void sub_08025CBC(Entity*);
void sub_08025CD4(Entity*);
void sub_08001242(Entity*);
void sub_08025DD8(Entity*);
void sub_08026060(Entity*);
void sub_08026110(Entity*);
void sub_080272D4(Entity*);
void sub_0802720C(Entity*);
void sub_0802720C(Entity*);
void sub_08026090(Entity*);
void sub_0802626C(Entity*);
void sub_08026580(Entity*);
void sub_08026634(Entity*);
void sub_08026750(Entity*);
void sub_0802686C(Entity*);
void sub_080268C8(Entity*);
void sub_0802694C(Entity*);
void sub_08026C40(Entity*);
void sub_08026E1C(Entity*);
void sub_08026FA4(Entity*);
void sub_08027064(Entity*);
void sub_08026F1C(Entity*);
void sub_080262A8(Entity*);
void sub_08026328(Entity*);
void sub_08026358(Entity*);
void sub_080263B4(Entity*);
void sub_08026414(Entity*);
void sub_0802647C(Entity*);
void sub_080264AC(Entity*);
void sub_080264D4(Entity*);
void sub_0802650C(Entity*);
void sub_0802653C(Entity*);
void sub_08026774(Entity*);
void sub_080267D0(Entity*);
void sub_08026808(Entity*);
void sub_080268EC(Entity*);
void sub_08026914(Entity*);
void sub_08026968(Entity*);
void sub_080269CC(Entity*);
void sub_08026BE8(Entity*);
// clang-format off
void (*const gUnk_080CC19C[])(Entity*) = {
sub_08025DC0,
sub_08025DC0,
sub_08025CBC,
sub_08025CD4,
sub_08001242,
};
void (*const gUnk_080CC1B0[])(Entity*) = {
sub_08025DD8,
sub_08026060,
};
const u8 gUnk_080CC1B8[] = {
0, 4,
0, 0,
0, 4,
0, 0,
1, 4,
0, 0,
2, 4,
0, 0,
};
void (*const gUnk_080CC1C8[])(Entity*) = {
sub_08026110,
sub_080272D4,
sub_0802720C,
sub_0802720C,
sub_08026090,
};
void (*const gUnk_080CC1DC[])(Entity*) = {
sub_0802626C,
sub_08026580,
sub_08026634,
sub_08026750,
sub_0802686C,
sub_080268C8,
sub_0802694C,
sub_08026C40,
sub_08026E1C,
sub_08026FA4,
sub_08027064,
sub_08026F1C,
};
void (*const gUnk_080CC20C[])(Entity*) = {
sub_080262A8,
sub_08026328,
sub_08026358,
sub_080263B4,
sub_08026414,
sub_0802647C,
sub_080264AC,
sub_080264D4,
sub_0802650C,
sub_0802653C,
};
const u8 gUnk_080CC234[] = {
0x3C, 0x1E, 0x1E, 0x1E,
0x1E, 0x0F, 0x0F, 0x0F,
0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x0A, 0x0A,
0x0A, 0x0F, 0x0F, 0x0F,
0x1E, 0x1E, 0x2D, 0x0A,
0x5A, 0x1E, 0xFF,
};
const u8 gUnk_080CC24F[] = {
2, 2, 4, 4,
4, 6, 6, 8,
};
void (*const gUnk_080CC258[])(Entity*) = {
sub_08026774,
sub_080267D0,
sub_08026808,
};
void (*const gUnk_080CC264[])(Entity*) = {
sub_080268EC,
sub_08026914,
};
void (*const gUnk_080CC26C[])(Entity*) = {
sub_08026968,
sub_080269CC,
sub_08026BE8,
};
const u8 gUnk_080CC278[] = {
150, 180, 210, 250,
};
const u16 gUnk_080CC27C[] = {
0x80, 0x8, 0x100, 0x6,
0x80, 0x18, 0x100, 0x8,
0x180, 0x6, 0x100, 0x10,
0x0, 0x0, 0xA0, 0x18,
};
const u16 gUnk_080CC29C[] = {
0x80, 0x8, 0x100, 0x4,
0x80, 0xC, 0x80, 0x6,
0x200, 0x6, 0x100, 0xC,
0x0, 0x0, 0xA0, 0x14,
};
const u16 gUnk_080CC2BC[] = {
0x80, 0x8, 0x100, 0x0,
0x60, 0x2, 0x80, 0x2,
0x200, 0x6, 0x100, 0x8,
0x0, 0x0, 0xA0, 0x10,
};
const s8 gUnk_080CC2DC[] = {
-7, -9, -7,
};
// clang-format on
+1 -26
View File
@@ -15,11 +15,7 @@ typedef struct {
extern void (*const gUnk_080CB734[])(Entity*);
extern void (*const gUnk_080CB74C[])(Entity*);
#if NON_MATCHING
extern const PosOffset gUnk_080CB764[];
#else
extern const s8 gUnk_080CB764[];
#endif
extern const PosOffset gUnk_080CB76C[4][6];
extern const u16 gUnk_080CB79C[];
extern const BoundingBox* const* const gUnk_080CB8A4[];
@@ -46,27 +42,15 @@ void sub_08022004(Entity* this) {
DeleteThisEntity();
}
#if NON_MATCHING
void sub_08022034(Entity* this) {
this->action = 1;
this->entityType.parameter = this->entityType.form & 3;
this->spritePriority.b0 = 5;
this->field_0x78.HWORD = gUnk_080CB764[this->entityType.parameter].h + this->x.HALF.HI;
this->field_0x7a.HWORD = gUnk_080CB764[this->entityType.parameter].v + this->y.HALF.HI;
InitializeAnimation(this, this->entityType.parameter);
sub_080221C0(this);
}
#else
void sub_08022034(Entity* this) {
this->action = 1;
this->entityType.parameter = this->entityType.form & 3;
this->spritePriority.b0 = 5;
this->field_0x78.HWORD = gUnk_080CB764[this->entityType.parameter * 2] + this->x.HALF.HI;
this->field_0x78.HWORD = gUnk_080CB764[this->entityType.parameter * 2 + 0] + this->x.HALF.HI;
this->field_0x7a.HWORD = gUnk_080CB764[this->entityType.parameter * 2 + 1] + this->y.HALF.HI;
InitializeAnimation(this, this->entityType.parameter);
sub_080221C0(this);
}
#endif
void sub_0802209C(Entity* this) {
if (this->actionDelay == 0) {
@@ -151,21 +135,12 @@ void (*const gUnk_080CB74C[])(Entity*) = {
sub_08022198,
};
#if NON_MATCHING
const PosOffset gUnk_080CB764[] = {
{-0x08, 0x00},
{-0x10, -0x08},
{-0x08, -0x10},
{ 0x00, -0x08},
};
#else
const s8 gUnk_080CB764[] = {
-0x08, 0x00,
-0x10, -0x08,
-0x08, -0x10,
0x00, -0x08,
};
#endif
const PosOffset gUnk_080CB76C[][6] = {
{
+254
View File
@@ -0,0 +1,254 @@
#include "enemy.h"
#include "functions.h"
void sub_0802C4B0(Entity*);
void sub_0802C62C(Entity*);
extern void (*const gUnk_080CD540[])(Entity*);
extern void (*const gUnk_080CD558[])(Entity*);
extern const u16 gUnk_080CD568[];
extern const u8 gUnk_080CD580[];
extern const s16 gUnk_080CD58C[];
void FallingBoulder(Entity* this) {
EnemyFunctionHandler(this, gUnk_080CD540);
}
void sub_0802C238(Entity* this) {
gUnk_080CD558[this->action](this);
}
void sub_0802C250(Entity* this) {
/* ... */
}
void sub_0802C254(Entity* this) {
/* ... */
}
void sub_0802C258(Entity* this) {
sub_0804A720(this);
this->field_0x20 = 0x20000;
this->actionDelay = 2;
this->field_0x7a.HWORD = Random() & 0x70;
switch (this->entityType.form) {
case 1:
this->field_0x7a.HWORD |= 0x100;
break;
case 2:
this->field_0x7a.HWORD |= 0x200;
break;
}
this->field_0x80.HWORD = this->x.HALF.HI;
this->field_0x82.HWORD = this->y.HALF.HI;
this->height.HALF.HI = -0x10;
this->collisionLayer = 3;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 2;
this->field_0x7c.HALF.LO = 0;
this->field_0x7c.HALF.HI = COORD_TO_TILE(this);
sub_0802C62C(this);
sub_0802C4B0(this);
}
void sub_0802C318(Entity* this) {
if (--this->field_0x7a.HWORD == 0) {
this->action = 2;
}
}
#if NON_MATCHING
void sub_0802C334(Entity* this) {
if ((u16)this->field_0x7c.HALF.LO == 0) {
u32 tmp = gRoomControls.roomOriginY;
if (&gPlayerEntity == NULL)
return;
if (tmp - gPlayerEntity.y.HALF.HI <= 0x38) {
return;
}
this->field_0x7c.HALF.LO = 1;
this->spriteSettings.b.draw = 1;
}
GetNextFrame(this);
this->field_0x7c.HALF.HI = COORD_TO_TILE(this);
if (sub_080044EC(this, *(u32*)&this->cutsceneBeh) == 1) {
EnqueueSFX(0x14c);
this->flags = this->flags | 0x80;
this->field_0x7a.HWORD = 0xc;
sub_0802C4B0(this);
} else {
s32 y;
if (this->field_0x7a.HWORD) {
u16 tmp = --this->field_0x7a.HWORD;
switch (tmp) {
case 0:
this->flags &= ~0x80;
break;
case 8:
if (this->entityType.parameter != 0 && !sub_08049FA0(this)) {
u32 diff = 0;
s32 i;
for (i = 1; i > -1; i--) {
Entity* ent = CreateFx(this, 0x15, 0);
if (ent) {
ent->x.HALF.HI += 12;
ent->x.HALF.HI -= diff;
}
diff += 0x18;
}
sub_0802C62C(this);
this->field_0x7a.HWORD = Random() & 0xff | 0x100;
return;
}
break;
}
}
y = gRoomControls.roomOriginY + gRoomControls.height - this->y.HALF.HI;
if (y >= 5) {
sub_080AEFB4(this);
} else {
sub_0806F69C(this);
if (this->height.HALF.HI - y > 0x38) {
sub_0802C62C(this);
this->field_0x7a.HWORD = (Random() & 0x7f) | 0x80;
if (this->entityType.form == 3) {
this->action = 3;
}
}
}
}
this->collisionLayer = 3;
this->spritePriority.b0 = 1;
UpdateSpriteForCollisionLayer(this);
}
#else
NAKED
void sub_0802C334(Entity* this) {
asm(".include \"asm/non_matching/fallingBoulder/sub_0802C334.inc\"");
}
#endif
void nullsub_148(Entity* this) {
/* ... */
}
extern u32 sub_080001DA(u32, u32);
void sub_0802C4B0(Entity* this) {
u32 offset;
u32 index;
u32 rand;
switch (sub_080001DA(this->field_0x7c.HALF_U.HI, this->collisionLayer)) {
case 0x1ab ... 0x1af:
offset = 8;
break;
case 0x1c4:
offset = 4;
break;
default:
offset = 0;
break;
}
rand = Random() & 7;
if (rand & 4) {
if (rand & 3) {
this->nonPlanarMovement = gUnk_080CD568[offset | 2];
} else {
this->nonPlanarMovement = gUnk_080CD568[offset | 0];
}
} else {
if (rand & 3) {
this->nonPlanarMovement = gUnk_080CD568[offset | 1];
} else {
this->nonPlanarMovement = gUnk_080CD568[offset | 3];
}
}
rand = Random() & 7;
if (rand & 4) {
if (this->actionDelay != 0) {
this->actionDelay = 0;
InitializeAnimation(this, 0);
}
if (rand & 3) {
this->direction = gUnk_080CD580[offset | 1];
} else {
this->direction = gUnk_080CD580[offset | 0];
}
} else {
if (this->actionDelay != 1) {
this->actionDelay = 1;
InitializeAnimation(this, 1);
}
if (rand & 3) {
this->direction = gUnk_080CD580[offset | 2];
} else {
this->direction = gUnk_080CD580[offset | 3];
}
}
rand = Random() & 7;
this->field_0x20 = 0x20000;
if (rand & 4) {
if (rand & 3) {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 1];
} else {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 3];
}
} else {
if (rand & 3) {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 2];
} else {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 0];
}
}
}
void sub_0802C62C(Entity *this) {
this->action = 1;
this->y.HALF.HI = this->field_0x82.HWORD;
this->x.HALF.HI = this->field_0x80.HWORD;
this->spriteSettings.b.draw = 0;
this->flags &= ~0x80;
this->field_0x7c.HALF.LO = 0;
}
// clang-format off
void (*const gUnk_080CD540[])(Entity*) = {
sub_0802C238,
sub_0802C250,
sub_08001324,
sub_0804A7D4,
sub_08001242,
sub_0802C254,
};
void (*const gUnk_080CD558[])(Entity*) = {
sub_0802C258,
sub_0802C318,
sub_0802C334,
nullsub_148,
};
const u16 gUnk_080CD568[] = {
0x80, 0x100, 0x180, 0x200,
0x80, 0x100, 0x180, 0x200,
0x100, 0x200, 0x300, 0x400,
};
const u8 gUnk_080CD580[] = {
10, 14, 18, 22,
10, 14, 18, 22,
10, 14, 18, 22,
};
const s16 gUnk_080CD58C[] = {
0x1800, 0x2000, 0x2800, 0x3000,
0x1800, 0x2000, 0x2800, 0x3000,
0x1800, 0x2000, 0x2800, 0x3000,
};
// clang-format on
+436
View File
@@ -0,0 +1,436 @@
#include "enemy.h"
#include "functions.h"
extern void sub_08008796(Entity*, u32, u32, u32);
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AE4CC(Entity*, u32, u32, u32);
extern Entity gUnk_0200D654;
extern Entity gUnk_02027EB4;
void sub_0802C18C(Entity*);
void sub_0802C218(Entity*);
void sub_0802C1C0(Entity*);
u32 sub_0802C020(Entity*);
void sub_0802C058(Entity*, u32);
bool32 sub_0802C06C(Entity*);
void sub_08080964(u32, u32);
void sub_0802C1CC(Entity*);
bool32 sub_0802C0E8(Entity*);
extern void (*const gUnk_080CD3E4[])(Entity*);
extern void (*const gUnk_080CD3FC[])(Entity*);
extern void (*const gUnk_080CD408[])(Entity*);
extern void (*const gUnk_080CD42C[])(Entity*);
extern void (*const gUnk_080CD438[])(Entity*);
extern void (*const gUnk_080CD450[])(Entity*);
extern const s8 gUnk_080CD45C[];
extern const s8 gUnk_080CD464[];
void Helmasaur(Entity* this) {
if (this->entityType.form == 0) {
EnemyFunctionHandler(this, gUnk_080CD3E4);
SetChildOffset(this, 0, 1, -0x10);
} else {
gUnk_080CD3FC[this->action](this);
}
}
void sub_0802BBAC(Entity* this) {
gUnk_080CD408[this->action](this);
}
void sub_0802BBC4(Entity* this) {
if (this->damageType != 0x19) {
switch (this->bitfield & 0x7f) {
case 0:
case 2:
case 3:
if (this->action == 4) {
this->field_0x42 = 0;
sub_0802C218(this);
}
break;
}
}
if (this->field_0x43 != 0) {
sub_0804A9FC(this, 0x1c);
}
sub_0804AA30(this, gUnk_080CD3E4);
}
void sub_0802BC20(Entity* this) {
if (this->damageType != 0x19) {
if (sub_0806F520(this)) {
gUnk_080CD42C[this->previousActionFlag](this);
}
} else if (2 < this->previousActionFlag || sub_0806F520(this)) {
gUnk_080CD438[this->previousActionFlag](this);
}
}
void sub_0802BC74(Entity* this) {
sub_0802C1C0(this);
this->previousActionFlag = 1;
this->field_0x1d = 60;
this->animationState = (gPlayerEntity.animationState >> 1) ^ 2;
InitializeAnimation(this, this->animationState);
}
void sub_0802BCA0(Entity* this) {
sub_0806F4E8(this);
}
void sub_0802BCA8(Entity* this) {
if (this->damageType != 0x19) {
Entity* ent;
this->action = 7;
this->actionDelay = 0x5a;
this->field_0x20 = 0x18000;
this->damageType = 0x19;
this->field_0x3a = this->field_0x3a & 0xfb;
this->field_0x1c = 0x12;
ent = CreateEnemy(0x20, 1);
if (ent) {
ent->animationState = this->animationState;
CopyPosition(this, ent);
}
InitializeAnimation(this, this->animationState + 4);
}
}
void sub_0802BCFC(Entity* this) {
this->previousActionFlag = 1;
this->field_0x1d = 60;
}
void sub_0802BD08(Entity* this) {
sub_0806F3E4(this);
}
void sub_0802BD10(Entity* this) {
this->flags &= ~0x80;
UpdateAnimationVariableFrames(this, 2);
}
void nullsub_145(Entity* this) {
/* ... */
}
void sub_0802BD28(Entity* this) {
if (this->flags & 0x80) {
this->flags |= 0x80;
this->field_0x3a &= ~0x4;
} else {
this->currentHealth = 0;
}
}
void sub_0802BD54(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->field_0x78.HALF.LO = Random();
this->field_0x1d = 60;
this->field_0x78.HALF.HI = 0xff;
this->direction = DirectionRound(Random());
this->animationState = this->direction >> 3;
InitializeAnimation(this, this->animationState);
}
void sub_0802BD8C(Entity* this) {
if (this->actionDelay) {
this->actionDelay--;
} else {
u32 direction;
if (sub_08049FDC(this, 1)) {
direction = sub_0804A024(this, 1, 0x10);
if (direction != 0xff && direction != this->field_0x78.HALF.HI) {
sub_0802C058(this, direction);
return;
}
}
direction = sub_0802C020(this);
if (direction != this->direction) {
sub_0802C058(this, direction);
}
}
}
void sub_0802BDE0(Entity* this) {
if (sub_0802C06C(this)) {
this->action = 3;
this->actionDelay = 60;
this->field_0x78.HALF.HI = 0xff;
} else {
this->action = 1;
this->actionDelay = (Random() & 0xf) + 0xf;
this->field_0x78.HALF.HI = this->direction;
}
}
void sub_0802BE18(Entity* this) {
UpdateAnimationVariableFrames(this, 2);
if (--this->actionDelay == 0) {
this->action = 4;
this->actionDelay = 0x1e;
this->nonPlanarMovement = 0x300;
} else {
sub_0802C18C(this);
}
}
void sub_0802BE48(Entity* this) {
if (!sub_080AEFE0(this)) {
sub_0802C218(this);
sub_08080964(8, 0);
} else {
GetNextFrame(this);
sub_0802C1CC(this);
if (sub_0802C0E8(this)) {
this->action = 5;
}
}
}
void sub_0802BE80(Entity* this) {
this->nonPlanarMovement -= 0x20;
if (0xff < this->nonPlanarMovement) {
sub_0802C1CC(this);
}
if (this->nonPlanarMovement > 0) {
sub_080AEFE0(this);
sub_0802C18C(this);
} else {
sub_0802C1C0(this);
this->actionDelay += 30;
}
}
void sub_0802BEBC(Entity* this) {
this->direction ^= 0x10;
sub_080AEFE0(this);
this->direction ^= 0x10;
if (!sub_080044EC(this, 0x2000)) {
sub_0802C1C0(this);
}
}
void sub_0802BEEC(Entity* this) {
if (this->actionDelay) {
if ((--this->actionDelay & 0x1f) == 0) {
this->animationState ^= 2;
this->direction = this->animationState << 3;
InitializeAnimation(this, this->animationState + 4);
}
} else if (!sub_08003FC4(this, 0x1c00)) {
this->action = 8;
this->actionDelay = 30;
this->nonPlanarMovement = 0x120;
}
}
void sub_0802BF3C(Entity* this) {
ProcessMovement(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
u32 sprite;
this->actionDelay = 30;
this->direction = sub_0802C020(this);
sprite = this->direction >> 3;
if (sprite != this->animationState) {
this->animationState = sprite;
InitializeAnimation(this, sprite + 4);
}
}
}
void sub_0802BF78(Entity* this) {
this->action = 1;
this->flags2 = 4;
this->field_0x1c = 1;
this->direction = this->animationState << 3;
InitializeAnimation(this, this->animationState + 8);
}
void sub_0802BF98(Entity* this) {
if (sub_0806F520(this)) {
gUnk_080CD450[this->previousActionFlag](this);
} else {
this->action = 2;
this->actionDelay = 30;
this->flags &= ~0x80;
}
}
void sub_0802BFD0(Entity* this) {
this->previousActionFlag = 2;
}
void sub_0802BFD8(Entity* this) {
sub_0806F4E8(this);
}
void sub_0802BFE0(Entity* this) {
if (sub_0806F3E4(this)) {
DeleteEntity(this);
}
}
void sub_0802BFF4(Entity* this) {
this->spriteSettings.b.draw ^= 1;
if (--this->actionDelay == 0) {
DeleteEntity(this);
}
}
u32 sub_0802C020(Entity* this) {
u32 uVar1 = Random();
if (sub_08049FA0(this) || (uVar1 & 1))
return DirectionRound(uVar1);
return (sub_08049EE4(this) + (uVar1 >> 0x10 & 1) * 4) & 0x18;
}
void sub_0802C058(Entity* this, u32 param_2) {
this->action = 2;
this->direction = param_2;
this->animationState = param_2 >> 3;
InitializeAnimation(this, this->animationState);
}
bool32 sub_0802C06C(Entity* this) {
u32 x = this->x.HALF.HI + (s8)this->boundingBox->unknown[0];
u32 y = this->y.HALF.HI + (s8)this->boundingBox->unknown[1];
u32 xdiff = gUnk_080CD45C[(this->direction >> 2) + 0];
u32 ydiff = gUnk_080CD45C[(this->direction >> 2) + 1];
Entity* ent = this->collisionLayer == 2 ? &gUnk_0200D654 : &gUnk_02027EB4;
u32 i;
for (i = 0; i < 8; i++) {
x += xdiff;
y += ydiff;
if (sub_080AE4CC(ent, x, y, 0))
return FALSE;
}
return TRUE;
}
bool32 sub_0806FC24(u32, u32);
bool32 sub_0802C0E8(Entity* this) {
if (--this->actionDelay == 0) {
return TRUE;
} else {
const s8* ptr = &gUnk_080CD45C[this->direction >> 2];
s32 x = this->x.HALF.HI + (s8)this->boundingBox->unknown[0] + ptr[0] * 6;
s32 y = this->y.HALF.HI + (s8)this->boundingBox->unknown[1] + ptr[1] * 6;
Entity* ent = this->collisionLayer == 2 ? &gUnk_0200D654 : &gUnk_02027EB4;
u32 ret = FALSE;
if (!sub_0806FC24(TILE(x, y), 9)) {
u32 tmp = sub_080AE4CC(ent, x, y, 0);
ret = (-tmp | tmp) >> 0x1f;
}
return ret;
}
}
void sub_0802C18C(Entity* this) {
this->field_0x78.HALF.LO--;
if ((this->field_0x78.HALF.LO & 7) == 0) {
Entity* ent = CreateObject(0xf, 0x11, 0x40);
if (ent) {
PositionRelative(this, ent, 0, 0x10000);
}
}
}
void sub_0802C1C0(Entity* this) {
this->action = 1;
this->actionDelay = 30;
}
void sub_0802C1CC(Entity* this) {
const s8* ptr = &gUnk_080CD464[this->animationState << 2];
sub_08008796(this, 9, this->x.HALF.HI + ptr[0], this->y.HALF.HI + ptr[1]);
sub_08008796(this, 9, this->x.HALF.HI + ptr[2], this->y.HALF.HI + ptr[3]);
}
void sub_0802C218(Entity* this) {
this->action = 6;
this->nonPlanarMovement = 0xe0;
this->field_0x20 = 0x18000;
}
// clang-format off
void (*const gUnk_080CD3E4[])(Entity*) = {
sub_0802BBAC,
sub_0802BBC4,
sub_08001324,
sub_0804A7D4,
sub_08001242,
sub_0802BC20,
};
void (*const gUnk_080CD3FC[])(Entity*) = {
sub_0802BF78,
sub_0802BF98,
sub_0802BFF4,
};
void (*const gUnk_080CD408[])(Entity*) = {
sub_0802BD54,
sub_0802BD8C,
sub_0802BDE0,
sub_0802BE18,
sub_0802BE48,
sub_0802BE80,
sub_0802BEBC,
sub_0802BEEC,
sub_0802BF3C,
};
void (*const gUnk_080CD42C[])(Entity*) = {
sub_0802BC74,
sub_0802BCA0,
sub_0802BCA8,
};
void (*const gUnk_080CD438[])(Entity*) = {
sub_0802BCFC,
sub_0802BCA0,
sub_0802BD08,
sub_0802BD10,
nullsub_145,
sub_0802BD28,
};
void (*const gUnk_080CD450[])(Entity*) = {
sub_0802BFD0,
sub_0802BFD8,
sub_0802BFE0,
};
const s8 gUnk_080CD45C[] = {
0, -8,
8, 0,
0, 8,
-8, 0,
};
const s8 gUnk_080CD464[] = {
-3, -8, 3, -8,
8, -3, 8, 3,
-3, 8, 3, 8,
-8, -3, -8, 3,
};
// clang-format on
+287
View File
@@ -0,0 +1,287 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
#include "textbox.h"
extern bool32 sub_080544B4(u32);
extern void sub_0807CAA0(u32, u32);
void sub_0802810C(Entity*);
void sub_080281A0(Entity*);
bool32 sub_080281E0(u32);
void sub_08028224(u32);
extern void (*const gUnk_080CC6FC[])(Entity*);
extern void (*const gUnk_080CC714[])(Entity*);
void LikeLike(Entity* this) {
EnemyFunctionHandler(this, gUnk_080CC6FC);
SetChildOffset(this, 0, 1, -0x10);
}
void sub_08027D8C(Entity* this) {
gUnk_080CC714[this->action](this);
}
void sub_08027DA4(Entity* this) {
if (this->damageType == 1) {
this->action = 3;
this->flags &= ~0x80;
this->damageType = 0x8c;
} else {
if (this->action == 7) {
sub_0802810C(this);
} else if (this->bitfield & 0x80) {
u8 tmp = this->bitfield & ~0x80;
if (!tmp) {
this->action = 7;
this->actionDelay = 0x5f;
this->field_0xf = tmp;
this->flags2 &= 0xfc;
this->field_0x82.HALF.HI = gPlayerEntity.spritePriority.b1;
}
}
}
if (this->currentHealth == 0) {
this->actionDelay = 0x20;
}
if (this->field_0x43) {
sub_0804A9FC(this, 0x1c);
}
sub_0804AA30(this, gUnk_080CC6FC);
}
void sub_08027E40(Entity* this) {
if (this->actionDelay == 2 && this->field_0x80.HALF.LO != 0xff) {
sub_0805E3A0(this, 3);
sub_08028224(this->field_0x80.HALF.LO);
}
sub_0804A7D4(this);
}
void nullsub_139(Entity* this) {
/* ... */
}
void sub_08027E70(Entity* this) {
sub_0804A720(this);
switch (this->entityType.form) {
case 0:
this->action = 3;
this->spriteSettings.b.draw = 0;
this->flags = this->flags & 0x7f;
this->actionDelay = 0;
break;
case 1:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->actionDelay = 8;
InitializeAnimation(this, 1);
break;
case 2:
this->action = 1;
this->spriteSettings.b.draw = 0;
this->actionDelay = 0;
this->damageType = 1;
InitializeAnimation(this, 0);
break;
}
this->direction = 0;
this->field_0x82.HALF.LO = 0;
this->animationState = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.LO = 0xff;
}
void sub_08027EFC(Entity* this) {
if (this->damageType == 1)
return;
if (sub_08049FDC(this, 1)) {
if (!sub_08049FA0(this) && (Random() & 0x30)) {
this->direction = sub_08049EE4(this);
} else {
this->direction = this->field_0x82.HALF.LO;
}
if (--this->actionDelay == 0) {
this->direction = sub_08049F84(this, 1);
this->field_0x82.HALF.LO = this->direction;
this->actionDelay = 8;
}
ProcessMovement(this);
GetNextFrame(this);
} else {
this->action = 6;
this->flags &= ~0x80;
InitializeAnimation(this, 2);
}
}
void nullsub_12(Entity* this) {
/* ... */
}
void sub_08027F84(Entity* this) {
if (sub_08049FDC(this, 1)) {
this->action = 5;
this->spriteSettings.b.draw = 1;
InitializeAnimation(this, 0);
CreateDust(this);
}
}
void sub_08027FB4(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 1;
this->actionDelay = 1;
this->flags2 |= 1;
}
GetNextFrame(this);
}
void sub_08027FE0(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 1) {
this->action = 1;
this->flags |= 0x80;
this->direction = sub_08049F84(this, 1);
this->actionDelay = 8;
this->spritePriority.b1 = 1;
InitializeAnimation(this, 1);
}
}
void sub_0802802C(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 1) {
this->action = 3;
this->spriteSettings.b.draw = 0;
this->direction = 0;
this->actionDelay = 0;
CreateDust(this);
}
}
void sub_0802805C(Entity* this) {
u8* tmp;
UpdateAnimationVariableFrames(this, 2);
if (sub_0807953C()) {
u32 tmp2 = Random();
u32 tmp3 = this->field_0xf + 1;
tmp3 += (tmp2 & 1);
this->field_0xf = tmp3;
}
if (this->field_0xf >= 0x19 || gUnk_02002A40.stats.health == 0) {
sub_0802810C(this);
} else {
ResetPlayer();
gPlayerState.field_0x1a[0] |= 0x80;
PositionRelative(this, &gPlayerEntity, 0, 0x10000);
tmp = GetSpriteSubEntryOffsetDataPointer((u16)this->spriteIndex, this->frameIndex);
gPlayerEntity.spriteOffsetX = tmp[0];
gPlayerEntity.spriteOffsetY = tmp[1];
gPlayerEntity.spritePriority.b1 = 0;
if (--this->actionDelay == 0) {
sub_080281A0(this);
}
if ((this->actionDelay & 3) == 0) {
EnqueueSFX(0x104);
}
}
}
#if NON_MATCHING
void sub_0802810C(Entity* this) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.field_0xa = 0;
gPlayerState.flags.all &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.field_0x20 = 0x18000;
gPlayerEntity.hurtBlinkTime = -60;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.spritePriority.b1 = this->field_0x82.HALF.HI;
gPlayerEntity.height.HALF.HI = gPlayerEntity.spriteOffsetY;
gPlayerEntity.spriteOffsetY = 0;
this->action = 4;
this->actionDelay = 0x50;
this->field_0xf = 0;
this->flags2 |= 2;
if (this->hurtBlinkTime == 0) {
this->hurtBlinkTime = -18;
}
}
#else
NAKED
void sub_0802810C(Entity* this) {
asm(".include \"asm/non_matching/likeLike/sub_0802810C.inc\"");
}
#endif
void sub_080281A0(Entity* this) {
this->field_0xf = 0x19;
if (sub_080281E0(0xe)) {
this->field_0x80.HALF.LO = 0xe;
TextboxNoOverlapFollow(0x578);
} else if (sub_080281E0(0xd)) {
this->field_0x80.HALF.LO = 0xd;
TextboxNoOverlapFollow(0x578);
} else {
ModHealth(-1);
}
}
bool32 sub_080281E0(u32 param_1) {
bool32 ret = FALSE;
if (GetInventoryValue(param_1) == 1) {
if (sub_080544B4(gUnk_02002A40.stats.itemOnA)) {
gUnk_02002A40.stats.itemOnA = 0;
}
if (sub_080544B4(gUnk_02002A40.stats.itemOnB)) {
gUnk_02002A40.stats.itemOnB = 0;
}
sub_0807CAA0(param_1, 0);
ret = TRUE;
}
return ret;
}
void sub_08028224(u32 param_1) {
sub_080A7C18(param_1, 0, 1);
TextboxNoOverlapFollow(0x579);
}
void (*const gUnk_080CC6FC[])(Entity *) = {
sub_08027D8C,
sub_08027DA4,
sub_08001324,
sub_08027E40,
sub_08001242,
nullsub_139,
};
void (*const gUnk_080CC714[])(Entity *) = {
sub_08027E70,
sub_08027EFC,
nullsub_12,
sub_08027F84,
sub_08027FB4,
sub_08027FE0,
sub_0802802C,
sub_0802805C,
};
+582
View File
@@ -0,0 +1,582 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
extern u8 gEntCount;
extern BoundingBox gUnk_080FD298;
extern BoundingBox gUnk_080FD2A0;
void sub_08029E0C(Entity*);
void sub_08029EEC(Entity*);
void sub_0802A098(Entity*);
void sub_0802A16C(Entity*);
void sub_0802A058(Entity*);
bool32 sub_0802A14C(Entity*);
void sub_0802A18C(Entity*);
bool32 sub_08029FE4(Entity*);
void sub_08029FB4(Entity*, u32, u32);
void sub_0802A0F8(Entity*);
extern void (*const gUnk_080CCD44[])(Entity*);
extern void (*const gUnk_080CCD60[])(Entity*);
extern void (*const gUnk_080CCD78[])(Entity*);
extern void (*const gUnk_080CCD88[])(Entity*);
extern const u8 gUnk_080CCDA0[];
extern void (*const gUnk_080CCDA8[])(Entity*);
extern const u8 gUnk_080CCDC8[];
extern const u16 gUnk_080CCDD4[];
void Madderpillar(Entity* this) {
gUnk_080CCD44[this->entityType.form](this);
}
void sub_08029870(Entity* this) {
gUnk_080CCD60[GetNextFunction(this)](this);
}
void sub_0802988C(Entity* this) {
gUnk_080CCD78[this->action](this);
}
void sub_080298A4(Entity* this) {
if (this->action == 1) {
switch (this->bitfield & 0x7f) {
case 0:
case 1:
case 2:
case 3:
case 0xf:
case 0x13:
case 0x1b:
case 0x1e:
break;
default:
this->action = 2;
this->actionDelay = 0;
this->damageType = 0x6b;
this->field_0x76.HALF.HI = 0;
sub_0801D2B4(this, 0x7f);
EnqueueSFX(0xfe);
this->attachedEntity->action = 2;
break;
}
}
sub_0804AA30(this, gUnk_080CCD60);
}
void sub_08029980(Entity* this) {
if (this->field_0xf) {
this->field_0xf--;
} else {
sub_0804A7D4(this);
}
}
void nullsub_14(Entity* this) {
/* ... */
}
void sub_0802999C(Entity* this) {
if (gEntCount < 0x44) {
Entity *ent1, *ent2, *ent3, *ent4, *ent5, *ent6;
ent1 = CreateEnemy(0x18, 1);
ent1->parent = this;
PositionRelative(this, ent1, 0, 5);
this->attachedEntity = ent1;
ent2 = CreateEnemy(0x18, 2);
ent2->parent = this;
PositionRelative(this, ent2, 0, 4);
ent1->attachedEntity = ent2;
ent3 = CreateEnemy(0x18, 3);
ent3->parent = this;
PositionRelative(this, ent3, 0, 3);
ent2->attachedEntity = ent3;
ent4 = CreateEnemy(0x18, 4);
ent4->parent = this;
PositionRelative(this, ent4, 0, 2);
ent3->attachedEntity = ent4;
ent5 = CreateEnemy(0x18, 5);
ent5->parent = this;
PositionRelative(this, ent5, 0, 1);
ent4->attachedEntity = ent5;
ent6 = CreateEnemy(0x18, 6);
ent6->attachedEntity = this;
ent6->parent = this;
PositionRelative(this, ent6, 0, 0);
ent5->attachedEntity = ent6;
this->action = 1;
this->flags |= 0x80;
this->direction = DirectionRound(Random());
this->nonPlanarMovement = 0xa0;
this->animationState = 0xff;
this->y.WORD += 6;
this->parent = this;
this->field_0x74.HALF.LO = 0xff;
this->field_0x74.HALF.HI = 0;
this->field_0x76.HALF.HI = 1;
sub_08029E0C(this);
sub_08029EEC(this);
}
}
void sub_08029A94(Entity* this) {
UpdateAnimationSingleFrame(this);
sub_0802A098(this);
}
void sub_08029AA4(Entity* this) {
if (this->field_0x76.HALF.HI != 0) {
this->action = 3;
this->nonPlanarMovement = 0x108;
this->damageType = 0x6a;
this->field_0x7a.HWORD = 0x168;
this->field_0x74.HALF.HI = 4;
sub_08029EEC(this);
EnqueueSFX(0x19d);
}
}
void sub_08029AE0(Entity* this) {
UpdateAnimationSingleFrame(this);
sub_0802A16C(this);
sub_0802A098(this);
if (--this->field_0x7a.HWORD == 0) {
this->action = 1;
this->nonPlanarMovement = 0xa0;
this->field_0x74.HALF.HI = 0;
sub_08029EEC(this);
sub_0801D2B4(this, 0x77);
EnqueueSFX(0x182);
}
}
void sub_08029B2C(Entity* this) {
if (sub_0802A14C(this)) {
if (this->field_0x86.HALF.LO) {
if (--this->actionDelay == 0) {
CreateFx(this, 0x48, 0);
DeleteEntity(this);
}
} else {
this->flags &= ~0x80;
this->actionDelay = -(this->entityType.form * 15 - 90);
this->field_0x86.HALF.LO = 1;
}
} else {
gUnk_080CCD88[this->action](this);
}
}
void sub_08029B90(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
sub_0802A058(this);
if (this->entityType.form < 2) {
InitializeAnimation(this, 0);
} else {
InitializeAnimation(this, 4);
}
}
void sub_08029BC4(Entity* this) {
u32 uVar1;
u32 uVar2;
sub_0802A18C(this);
uVar1 = this->x.HALF.HI;
uVar2 = this->y.HALF.HI;
if (sub_08029FE4(this)) {
u32 index;
if (this->entityType.form < 2) {
index = 0;
} else {
index = 4;
}
InitializeAnimation(this, this->animationState + index);
}
sub_08029FB4(this, this->x.HALF.HI - uVar1, this->y.HALF.HI - uVar2);
}
void sub_08029C08(Entity* this) {
this->action = 3;
this->actionDelay = gUnk_080CCDA0[this->entityType.form];
this->damageType = 0x6b;
this->attachedEntity->action = 2;
}
void sub_08029C2C(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 4;
sub_0801D2B4(this, 0x7f);
EnqueueSFX(0x6c);
}
}
void sub_08029C50(Entity* this) {
if (this->parent->field_0x76.HALF.HI != 0) {
this->action = 5;
this->damageType = 0x6a;
}
}
void sub_08029C6C(Entity* this) {
sub_0802A18C(this);
sub_08029BC4(this);
if (this->parent->action != 3) {
this->action = 1;
sub_0801D2B4(this, 0x77);
} else {
sub_0802A16C(this);
}
}
void sub_08029C98(Entity* this) {
if (sub_0802A14C(this)) {
CreateFx(this, 0x48, 0);
DeleteEntity(this);
} else {
gUnk_080CCDA8[this->action](this);
}
}
void sub_08029CCC(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
sub_0802A058(this);
InitializeAnimation(this, 8);
}
void sub_08029CF0(Entity* this) {
if (sub_08029FE4(this)) {
InitializeAnimation(this, this->animationState + 8);
}
}
void sub_08029D08(Entity* this) {
this->action = 3;
this->actionDelay = 0x47;
}
void sub_08029D14(Entity* this) {
if (this->actionDelay) {
if (--this->actionDelay == 0) {
InitializeAnimation(this, this->animationState + 0xc);
sub_0801D2B4(this, 0x7f);
EnqueueSFX(0x6c);
}
} else {
GetNextFrame(this);
if (this->frames.all & 0x80) {
this->action = 4;
this->actionDelay = 0x78;
this->damageType = 0x6c;
this->boundingBox = &gUnk_080FD298;
EnqueueSFX(0x6b);
}
}
}
void sub_08029D78(Entity* this) {
sub_0802A0F8(this);
if (--this->actionDelay == 0) {
this->action = 5;
this->damageType = 0x6a;
this->boundingBox = (BoundingBox*)&gUnk_080FD2A0;
InitializeAnimation(this, this->animationState + 0x10);
}
}
void sub_08029DAC(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 0x80) {
this->action = 6;
this->parent->field_0x76.HALF.HI = 1;
InitializeAnimation(this, this->animationState + 8);
}
}
void sub_08029DDC(Entity* this) {
this->action = 7;
}
void sub_08029DE4(Entity* this) {
sub_08029CF0(this);
if (this->parent->action != 3) {
this->action = 1;
sub_0801D2B4(this, 0x77);
} else {
sub_0802A16C(this);
}
}
NAKED
void sub_08029E0C(Entity* this) {
asm(".include \"asm/non_matching/madderpillar/sub_08029E0C.inc\"");
}
void sub_08029EEC(Entity* this) {
u32 uVar1 = (this->direction >> 3) + this->field_0x74.HALF.HI;
if (uVar1 != this->animationState) {
this->animationState = uVar1;
InitAnimationForceUpdate(this, uVar1);
}
}
void sub_08029F0C(Entity* this) {
switch (this->direction >> 3) {
case 0:
this->field_0x78.HWORD = this->y.HALF.HI - 0x10;
break;
case 1:
this->field_0x78.HWORD = this->x.HALF.HI + 0x10;
break;
case 2:
this->field_0x78.HWORD = this->y.HALF.HI + 0x10;
break;
case 3:
this->field_0x78.HWORD = this->x.HALF.HI - 0x10;
break;
}
}
bool32 sub_08029F48(Entity* this) {
switch (this->direction >> 3) {
case 0:
if (this->y.HALF.HI <= this->field_0x78.HWORD) {
this->y.HALF.HI = this->field_0x78.HWORD;
return TRUE;
}
break;
case 1:
if (this->x.HALF.HI >= this->field_0x78.HWORD) {
this->x.HALF.HI = this->field_0x78.HWORD;
return TRUE;
}
break;
case 2:
if (this->y.HALF.HI >= this->field_0x78.HWORD) {
this->y.HALF.HI = this->field_0x78.HWORD;
return TRUE;
}
break;
case 3:
if (this->x.HALF.HI <= this->field_0x78.HWORD) {
this->x.HALF.HI = this->field_0x78.HWORD;
return TRUE;
}
break;
}
return FALSE;
}
void sub_08029FB4(Entity* this, u32 x, u32 y) {
u8* dst = (u8*)&this->attachedEntity->field_0x78;
s32 unk = this->parent->field_0x7c.BYTES.byte2;
u8 idx = unk % 0xe;
dst[idx] = ((x + 8) & 0xf) | (((y + 8) & 0xf) << 4);
}
/* The optimizer is strong within you. */
bool32 sub_08029FE4(Entity* this) {
u8 state;
u8* dst = (u8*)&this->field_0x78;
s32 unk = this->parent->field_0x7c.BYTES.byte2 + 1;
s8 iVar6 = (dst[unk % 0xe] & 0xf) - 8;
s8 iVar5 = (dst[unk % 0xe] >> 4) - 8;
this->x.HALF.HI += iVar6;
this->y.HALF.HI += iVar5;
GetNextFrame(this);
state = 0xff;
if (iVar6 != 0) {
if (0 < iVar6) {
state = 1;
} else {
state = 3;
}
}
if (iVar5 != 0) {
if (0 < iVar5) {
state = 2;
} else {
state = 0;
}
}
if (state != 0xff && state != this->animationState) {
this->animationState = state;
return TRUE;
} else {
return FALSE;
}
}
void sub_0802A058(Entity* this) {
this->field_0x78.HALF.LO = 0x88;
this->field_0x78.HALF.HI = 0x88;
this->field_0x7a.HALF.LO = 0x88;
this->field_0x7a.HALF.HI = 0x88;
this->field_0x7c.BYTES.byte0 = 0x88;
this->field_0x7c.BYTES.byte1 = 0x88;
this->field_0x7c.BYTES.byte2 = 0x88;
this->field_0x7c.BYTES.byte3 = 0x88;
this->field_0x80.HALF.LO = 0x88;
this->field_0x80.HALF.HI = 0x88;
this->field_0x82.HALF.LO = 0x88;
this->field_0x82.HALF.HI = 0x88;
this->cutsceneBeh.HALF.LO = 0x88;
this->cutsceneBeh.HALF.HI = 0x88;
}
void sub_0802A098(Entity* this) {
u32 uVar1;
u32 uVar2;
s32 unk = (++this->field_0x7c.BYTES.byte2, this->field_0x7c.BYTES.byte2);
u8 idx = unk % 0xe;
if (idx == 0) {
this->field_0x7c.BYTES.byte2 = 0;
}
uVar1 = this->x.HALF.HI;
uVar2 = this->y.HALF.HI;
ProcessMovement(this);
if (sub_08029F48(this)) {
sub_08029E0C(this);
sub_08029EEC(this);
EnqueueSFX(0x104);
}
sub_08029FB4(this, this->x.HALF.HI - uVar1, this->y.HALF.HI - uVar2);
}
void sub_0802A0F8(Entity* this) {
if (this->currentHealth != 0) {
if ((this->bitfield & 0x80) && this->hurtBlinkTime != 0) {
Entity* ent = this;
u32 i;
for (i = 0; i < 6; i++) {
ent = ent->attachedEntity;
ent->hurtBlinkTime = this->hurtBlinkTime;
}
}
} else {
this->parent->flags &= ~0x80;
this->parent->currentHealth = 0;
this->parent->field_0xf = 0x69;
}
}
bool32 sub_0802A14C(Entity* this) {
u32 ret = FALSE;
if (this->parent->currentHealth == 0 || this->field_0x86.HALF.LO) {
ret = TRUE;
} else {
ret = FALSE;
}
return ret;
}
void sub_0802A16C(Entity* this) {
sub_0801D2B4(this, gUnk_080CCDD4[this->parent->field_0x7a.HWORD >> 2 & 3]);
}
void sub_0802A18C(Entity* this) {
if (this->bitfield & 0x80) {
switch (this->bitfield & 0x7f) {
case 0:
case 1:
case 2:
case 3:
case 0xf:
case 0x13:
case 0x1b:
case 0x1e:
break;
default:
EnqueueSFX(0x12e);
break;
}
}
}
// clang-format off
void (*const gUnk_080CCD44[])(Entity*) = {
sub_08029870,
sub_08029B2C,
sub_08029B2C,
sub_08029B2C,
sub_08029B2C,
sub_08029B2C,
sub_08029C98,
};
void (*const gUnk_080CCD60[])(Entity*) = {
sub_0802988C,
sub_080298A4,
sub_0802988C,
sub_08029980,
sub_08001242,
nullsub_14,
};
void (*const gUnk_080CCD78[])(Entity*) = {
sub_0802999C,
sub_08029A94,
sub_08029AA4,
sub_08029AE0,
};
void (*const gUnk_080CCD88[])(Entity*) = {
sub_08029B90,
sub_08029BC4,
sub_08029C08,
sub_08029C2C,
sub_08029C50,
sub_08029C6C,
};
const u8 gUnk_080CCDA0[] = {
0x00, 0x24,
0x30,
0x3A,
0x41,
0x45,
0x00,
0x00,
};
void (*const gUnk_080CCDA8[])(Entity*) = {
sub_08029CCC,
sub_08029CF0,
sub_08029D08,
sub_08029D14,
sub_08029D78,
sub_08029DAC,
sub_08029DDC,
sub_08029DE4,
};
const u8 gUnk_080CCDC8[] = {
0x08, 0x00,
0x18, 0x00,
0x10, 0x08,
0x10, 0x08,
0x18, 0x00,
0x18, 0x10,
};
const u16 gUnk_080CCDD4[] = {
0x80, 0x81,
0x82, 0x81,
};
// clang-format on
+4 -2
View File
@@ -10,7 +10,6 @@ extern u32 sub_0806F520();
extern void sub_0806F4E8();
extern void UpdateAnimationVariableFrames();
extern void sub_0804A720();
extern u32 Random();
extern Entity* sub_08049DF4(u32);
void Octorok_Pause();
@@ -233,7 +232,10 @@ const u8 gOctorokSpitChanceModifier[] = {
};
const u8 gOctorokNutOffset[] = {
0, -3, 4, 0, 0, 2, -4, 0,
0, -3,
4, 0,
0, 2,
-4, 0,
};
const s8 gUnk_080CA17E[] = {
+11 -11
View File
@@ -49,7 +49,7 @@ void sub_08023F44(Entity* this) {
void sub_08023F5C(Entity* this) {
if (this->damageType != 0x6e) {
if (this->bitfield == 0x80) {
*(u8*)&this->field_0x86 = 0x30;
this->field_0x86.HALF.LO = 0x30;
if ((this->field_0x82.HALF.HI & 0xf) == 3 && this->action == 6) {
switch (this->field_0x80.HALF.LO) {
@@ -155,8 +155,8 @@ void sub_080240B8(Entity* this) {
this->field_0x80.HALF.HI = Random() & 0x40;
this->field_0x82.HALF.LO = 0;
this->field_0x82.HALF.HI = 0x80;
*((u8*)&this->field_0x86 + 0) = 0;
*((u8*)&this->field_0x86 + 1) = 0;
this->field_0x86.HALF.LO = 0;
this->field_0x86.HALF.HI = 0;
this->actionDelay = 0;
this->field_0xf = 0x20;
this->field_0x3c |= 0x10;
@@ -727,19 +727,19 @@ void sub_08024C94(Entity* this) {
bool32 sub_08024CC0(Entity* this) {
bool32 uVar2;
uVar2 = 1;
uVar2 = TRUE;
if (!sub_08024C48(this, 1)) {
uVar2 = 0;
uVar2 = FALSE;
} else if (!sub_08049F1C(this, gUnk_020000B0, 0x50) || !sub_08049FDC(this, 3)) {
uVar2 = 0;
uVar2 = FALSE;
sub_08024C7C(this);
}
return uVar2;
}
void sub_08024D00(Entity* this) {
if (*(u8*)&this->field_0x86) {
(*(u8*)&this->field_0x86)--;
if (this->field_0x86.HALF.LO) {
this->field_0x86.HALF.LO--;
GetNextFrame(this);
} else {
sub_08024940(this);
@@ -804,9 +804,9 @@ void sub_08024E4C(Entity* this) {
this->cutsceneBeh.HALF.LO += 1 + (Random() & 1);
}
if (gUnk_02002A40.stats.health == 0 || *((u8*)&this->field_0x86 + 1) == 4) {
if (gUnk_02002A40.stats.health == 0 || this->field_0x86.HALF.HI == 4) {
this->cutsceneBeh.HALF.LO = 0x30;
*((u8*)&this->field_0x86 + 1) = 0;
this->field_0x86.HALF.HI = 0;
sub_08024F50(this);
this->field_0x80.HALF.LO = 0;
this->nonPlanarMovement = 0x40;
@@ -828,7 +828,7 @@ void sub_08024E4C(Entity* this) {
player->animationState = 4;
player->spritePriority.b1 = 0;
if (this->field_0xf == 0) {
(*((u8*)&this->field_0x86 + 1))++;
(this->field_0x86.HALF.HI++;
player->hurtBlinkTime = 8;
ModHealth(-2);
sub_0800449C(player, 0x7a);
+3 -3
View File
@@ -169,7 +169,7 @@ void sub_08025230(Entity* this) {
if (sub_0802571C(this)) {
this->action = 2;
this->actionDelay = 240;
this->field_0x86 = COORD_TO_TILE(this);
this->field_0x86.HWORD = COORD_TO_TILE(this);
}
} else {
this->field_0x78.HWORD--;
@@ -186,12 +186,12 @@ void sub_080252E0(Entity* this) {
GetNextFrame(this);
tile = COORD_TO_TILE(this);
if (tile == this->field_0x86) {
if (tile == this->field_0x86.HWORD) {
if (--this->actionDelay == 0) {
sub_080256B4(this);
}
} else {
this->field_0x86 = tile;
this->field_0x86.HWORD = tile;
this->actionDelay = 240;
}
+44 -5
View File
@@ -17,8 +17,9 @@ extern void (*const gUnk_080CCC00[])(Entity*);
extern void (*const gUnk_080CCC18[])(Entity*);
extern void (*const gUnk_080CCC3C[])(Entity*);
extern u8 gUnk_080CCC34[];
extern u8 gUnk_080CCC47[];
extern const u8 gUnk_080CCC34[];
extern const s8 gUnk_080CCC44[];
extern const u8 gUnk_080CCC47[];
extern BoundingBox gUnk_080FD260;
void RupeeLike(Entity* this) {
@@ -146,8 +147,6 @@ void sub_080294D4(Entity* this) {
}
}
extern s8 gUnk_080CCC44[];
void sub_0802953C(Entity* this) {
u8* pbVar3;
@@ -279,4 +278,44 @@ void sub_080297F0(Entity* this) {
this->palette.b.b0 = temp;
this->spriteVramOffset = 9;
InitializeAnimation(this, 0x54);
}
}
// clang-format off
void (*const gUnk_080CCC00[])(Entity*) = {
sub_08029300,
sub_08029318,
sub_08001324,
sub_080293B4,
sub_08001242,
nullsub_141,
};
void (*const gUnk_080CCC18[])(Entity*) = {
sub_0802940C,
sub_0802944C,
sub_08029474,
sub_080294D4,
sub_0802953C,
sub_08029610,
sub_08029630,
};
const u8 gUnk_080CCC34[] = {
0x54, 0x55,
0x56, 0x55,
0x56, 0x57,
};
void (*const gUnk_080CCC3C[])(Entity*) = {
sub_08029660,
sub_08029688,
};
const s8 gUnk_080CCC44[] = {
-1, -5, -20,
};
const u8 gUnk_080CCC47[] = {
2, 1, 0,
};
// clang-format on
+120
View File
@@ -0,0 +1,120 @@
#include "enemy.h"
#include "functions.h"
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AE4CC(Entity*, u32, u32, u32);
extern bool32 sub_080AF038(Entity*);
extern Entity gUnk_02027EB4;
extern Entity gUnk_0200D654;
void sub_0802BB10(Entity*);
bool32 sub_0802BB2C(Entity*, u32);
extern void (*const gUnk_080CD3C4[])(Entity*);
extern const u16 gUnk_080CD3D4[];
extern const s8 gUnk_080CD3DC[];
void SensorBladeTrap(Entity* this) {
gUnk_080CD3C4[this->action](this);
}
void sub_0802B9EC(Entity* this) {
this->action = 1;
this->field_0x78.HWORD = gUnk_080CD3D4[this->entityType.form];
this->field_0x7c.HALF.LO = this->cutsceneBeh.HWORD;
this->field_0x7c.HALF.HI = this->field_0x86.HWORD;
}
void sub_0802BA18(Entity* this) {
u32 direction = sub_0804A024(this, 1, 0xe);
if (direction == 0xff)
return;
if (sub_0802BB2C(this, direction))
return;
this->action = 2;
this->nonPlanarMovement = this->field_0x78.HWORD;
this->direction = direction;
switch (direction >> 3) {
case 0:
this->field_0x7a.HWORD = this->y.HALF.HI - this->field_0x7c.HALF.HI;
break;
case 1:
this->field_0x7a.HWORD = this->x.HALF.HI + this->field_0x7c.HALF.LO;
break;
case 2:
this->field_0x7a.HWORD = this->y.HALF.HI + this->field_0x7c.HALF.HI;
break;
case 3:
this->field_0x7a.HWORD = this->x.HALF.HI - this->field_0x7c.HALF.LO;
break;
}
}
void sub_0802BA8C(Entity* this) {
if (!sub_080AF038(this)) {
sub_0802BB10(this);
} else {
switch (this->direction >> 3) {
case 0:
if (this->field_0x7a.HWORD >= this->y.HALF.HI)
sub_0802BB10(this);
break;
case 1:
if (this->field_0x7a.HWORD <= this->x.HALF.HI)
sub_0802BB10(this);
break;
case 2:
if (this->field_0x7a.HWORD <= this->y.HALF.HI)
sub_0802BB10(this);
break;
case 3:
if (this->field_0x7a.HWORD >= this->x.HALF.HI)
sub_0802BB10(this);
break;
}
}
}
void sub_0802BAFC(Entity* this) {
if (!sub_080AF038(this)) {
this->action = 1;
}
}
void sub_0802BB10(Entity* this) {
this->action = 3;
this->nonPlanarMovement = 0xc0;
this->direction = this->direction ^ 0x10;
EnqueueSFX(0x74);
}
bool32 sub_0802BB2C(Entity* this, u32 param_2) {
Entity* ent = this->collisionLayer == 2 ? &gUnk_0200D654 : &gUnk_02027EB4;
const s8* ptr = &gUnk_080CD3DC[param_2 >> 2];
return sub_080AE4CC(ent, this->x.HALF.HI + ptr[0], this->y.HALF.HI + ptr[1], 0);
}
// clang-format off
void (*const gUnk_080CD3C4[])(Entity*) = {
sub_0802B9EC,
sub_0802BA18,
sub_0802BA8C,
sub_0802BAFC,
};
const u16 gUnk_080CD3D4[] = {
0x100, 0x180,
0x200, 0x280,
};
const s8 gUnk_080CD3DC[] = {
0, -12,
12, 0,
0, 12,
-12, 0,
};
// clang-format on
+140
View File
@@ -0,0 +1,140 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
extern void (*const gUnk_080CD234[])(Entity*);
extern void (*const gUnk_080CD24C[])(Entity*);
void Spark(Entity* this) {
gUnk_080CD234[GetNextFunction(this)](this);
}
void sub_0802B2C8(Entity* this) {
gUnk_080CD24C[this->action](this);
}
void sub_0802B2E0(Entity* this) {
Entity* ent;
if (this->bitfield & 0x80) {
if ((this->bitfield & 0x7f) == 0x14) {
this->flags &= ~0x80;
this->hurtBlinkTime = 0;
this->spriteSettings.b.draw = 0;
this->action = 2;
ent = CreateFx(this, 2, 0);
if (ent) {
this->attachedEntity = ent;
this->actionDelay = 14;
CopyPosition(this, ent);
}
}
}
}
void nullsub_15(Entity* this) {
/* ... */
}
void sub_0802B33C(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->direction = (this->entityType).parameter;
this->field_0xf = 0x78;
InitializeAnimation(this, 0);
}
void sub_0802B35C(Entity* this) {
bool32 is_head;
GetNextFrame(this);
ProcessMovement(this);
is_head = this->entityType.form == 0;
if (this->collisions == 0) {
if (--this->field_0xf == 0) {
this->field_0xf = 0x78;
this->direction += is_head ? 0x08 : 0x18;
this->direction = DirectionRound(this->direction);
}
} else {
this->field_0xf = 0x78;
switch (DirectionRound(this->direction)) {
case DirectionNorth:
if (this->collisions & 0xe) {
this->direction = is_head ? DirectionWest : DirectionEast;
} else {
if ((this->collisions & 0xe000) == 0x4000 && is_head) {
this->direction = DirectionEast;
}
if ((this->collisions & 0xe00) == 0x400 && !is_head) {
this->direction = DirectionWest;
}
}
break;
case DirectionSouth:
if (this->collisions & 0xe0) {
this->direction = is_head ? DirectionEast : DirectionWest;
} else {
if ((this->collisions & 0xe000) == 0x2000 && !is_head) {
this->direction = DirectionEast;
}
if ((this->collisions & 0xe00) == 0x200 && is_head) {
this->direction = DirectionWest;
}
}
break;
case DirectionWest:
if (this->collisions & 0xe00) {
this->direction = is_head ? DirectionSouth : DirectionNorth;
} else {
if ((this->collisions & 0xe) == 4 && is_head) {
this->direction = DirectionNorth;
}
if ((this->collisions & 0xe0) == 0x40 && !is_head) {
this->direction = DirectionSouth;
}
}
break;
case DirectionEast:
if (this->collisions & 0xe000) {
this->direction = is_head ? DirectionNorth : DirectionSouth;
} else {
if ((this->collisions & 0xe) == 2 && !is_head) {
this->direction = DirectionNorth;
}
if ((this->collisions & 0xe0) == 0x20 && is_head) {
this->direction = DirectionSouth;
}
}
break;
}
}
}
void sub_0802B4A8(Entity* this) {
if (--this->actionDelay == 0) {
Entity* ent = CreateObjectWithParent(this, 0, 0x60, 0);
if (ent) {
ent->y.HALF.HI -= 4;
}
DeleteEntity(this);
}
}
// clang-format off
void (*const gUnk_080CD234[])(Entity*) = {
sub_0802B2C8,
sub_0802B2E0,
sub_08001324,
sub_0804A7D4,
sub_08001242,
nullsub_15,
};
void (*const gUnk_080CD24C[])(Entity*) = {
sub_0802B33C,
sub_0802B35C,
sub_0802B4A8,
};
// clang-format on
+439
View File
@@ -0,0 +1,439 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
extern bool32 sub_0806FC80(Entity*, Entity*, u32);
extern Entity* sub_080A7EE0(u32);
extern Entity* sub_08049DF4(u32);
void sub_08028604(Entity*);
void sub_08028754(Entity*);
void sub_08028784(Entity*);
void sub_080287E0(Entity*);
void sub_08028728(Entity*);
bool32 sub_080286CC(Entity*);
bool32 sub_080288A4(Entity*);
void sub_08028858(Entity*);
void sub_080288C0(Entity*);
bool32 sub_08028828(u32, u32);
void sub_080287B4(Entity*);
extern void (*const gUnk_080CC790[])(Entity*);
extern void (*const gUnk_080CC7A8[])(Entity*);
extern const u8 gUnk_080CC7BC[];
extern const s8 gUnk_080CC7C0[];
extern const u8 gUnk_080CC7D0[];
extern const u16 gUnk_080CC7D8[];
extern const BoundingBox* const gUnk_080CC944[];
void SpearMoblin(Entity* this) {
EnemyFunctionHandler(this, gUnk_080CC790);
SetChildOffset(this, 0, 1, -0x20);
if (this->attachedEntity && this->attachedEntity->next) {
CopyPosition(this, this->attachedEntity);
}
}
void sub_0802826C(Entity* this) {
gUnk_080CC7A8[this->action](this);
}
void sub_08028284(Entity* this) {
if (this->field_0x43 != 0)
sub_0804A9FC(this, 0x1c);
sub_0804AA30(this, gUnk_080CC790);
if (this->bitfield & 0x80) {
if (this->action != 4) {
sub_08028754(this);
} else {
if ((this->bitfield & 0x3f) == 0) {
this->field_0x7a.HALF.LO++;
this->field_0x80.HALF.HI = 0x16;
sub_08028784(this);
}
}
}
this->attachedEntity->hurtBlinkTime = this->hurtBlinkTime;
if (this->currentHealth == 0) {
this->nonPlanarMovement = 0;
this->field_0x82.HALF.LO = 0;
sub_080287E0(this);
DeleteEntity(this->attachedEntity);
this->attachedEntity = NULL;
}
}
void nullsub_13(Entity* this) {
/* ... */
}
void sub_08028314(Entity* this) {
Entity* pEVar2;
sub_0804A720(this);
this->action = 1;
this->animationState = 0;
this->field_0x7a.HALF.HI = 0;
this->field_0x80.HALF.LO = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
this->field_0x7a.HALF.LO = 0;
this->field_0x82.HALF.LO = 1;
if (this->actionDelay) {
this->animationState = this->entityType.parameter << 1;
this->actionDelay = 0x1e;
this->nonPlanarMovement = 0x80;
this->direction = this->animationState << 2;
sub_080287E0(this);
} else {
this->animationState = 0x10;
sub_08028604(this);
}
pEVar2 = sub_080A7EE0(3);
if (pEVar2 != NULL) {
pEVar2->parent = this;
this->attachedEntity = pEVar2;
}
}
void sub_08028378(Entity* this) {
if (this->field_0x80.HALF.HI != 0) {
this->field_0x80.HALF.HI--;
}
if (--this->actionDelay == 0) {
if (++this->field_0x80.HALF.LO >= 0x10) {
sub_08028728(this);
} else {
sub_08028604(this);
}
} else {
if (sub_080286CC(this)) {
this->field_0x7a.HALF.HI |= 1;
}
if (sub_080288A4(this)) {
sub_0800417E(this, this->collisions);
this->animationState = DirectionRoundUp(this->direction) >> 2;
this->field_0x82.HALF.HI++;
sub_080287E0(this);
}
}
if (this->field_0xf >= 0xc) {
if (this->field_0x7a.HALF.HI != 0) {
sub_08028754(this);
}
} else {
this->field_0xf++;
}
sub_08028858(this);
}
void sub_08028420(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 3;
this->field_0x82.HALF.LO = 0;
this->field_0x80.HALF.LO = 0;
this->animationState = 0x10;
sub_08028604(this);
} else {
if (sub_080286CC(this)) {
this->field_0x7a.HALF.HI |= 1;
}
}
if (this->field_0xf >= 0xc) {
if (this->field_0x7a.HALF.HI != 0) {
sub_08028754(this);
}
} else {
this->field_0xf++;
}
sub_08028858(this);
}
void sub_08028488(Entity* this) {
if (--this->actionDelay == 0) {
switch (this->field_0x82.HALF.LO) {
case 3:
this->action = 4;
this->nonPlanarMovement = 0x180;
this->direction = sub_08049F84(this, 1);
EnqueueSFX(0x11e);
break;
case 2:
this->action = 2;
this->nonPlanarMovement = 0;
this->actionDelay = (Random() & 7) * 3 + 0x40;
break;
case 4:
this->direction = (this->direction + 0x10) & 0x18;
/* fallthrough */
case 1:
default:
this->action = 1;
this->field_0x82.HALF.LO = 1;
this->nonPlanarMovement = 0x80;
this->actionDelay = (Random() & 7) * 3 + 0x22;
break;
}
this->field_0xf = 0;
this->animationState = DirectionRoundUp(this->direction) >> 2;
sub_080287E0(this);
}
sub_08028858(this);
}
void sub_08028528(Entity* this) {
Entity* ent = sub_08049DF4(1);
const BoundingBox* box;
if (ent == NULL) {
this->field_0xf = 0;
sub_08028728(this);
} else {
sub_080288C0(this);
box = gUnk_080CC944[this->animationState >> 1];
this->boundingBox->unknown[0] = box->unknown[0];
this->boundingBox->unknown[1] = box->unknown[1];
this->boundingBox->unknown[6] = box->unknown[6];
this->boundingBox->unknown[7] = box->unknown[7];
if (this->field_0x7a.HALF.LO != 0) {
this->field_0x7a.HALF.LO = 0;
this->field_0x80.HALF.HI = 0x16;
sub_08028784(this);
} else {
if (++this->actionDelay == 0x20) {
u32 direction;
this->actionDelay = 0;
direction = GetFacingDirection(this, ent);
if (sub_08028828(this->direction, direction)) {
this->direction = direction;
}
}
if ((this->actionDelay & 7) == 0) {
EnqueueSFX(0xf0);
CreateFx(this, 2, 0x40);
}
if (++this->field_0x7a.HALF.HI == 0x80) {
this->field_0x7a.HALF.LO++;
}
}
if (0x20 < this->field_0x7a.HALF.HI) {
ProcessMovement(this);
}
GetNextFrame(this);
}
}
#if NON_MATCHING
void sub_08028604(Entity* this) {
this->field_0xf = 0;
if (this->field_0x82.HALF.LO == 1) {
this->actionDelay = gUnk_080CC7BC[Random() & 3];
this->nonPlanarMovement = 0x80;
if (sub_08049FA0(this) != 0) {
this->direction = gUnk_080CC7D0[Random() & 7] + 0x18 + this->direction & 0x18;
} else {
u32 iVar3 = sub_08049EE4(this);
u32 uVar1;
if (this->field_0x82.HALF.HI == '\0') {
uVar1 = gUnk_080CC7C0[Random() & 0xf];
} else {
uVar1 = gUnk_080CC7C0[Random() & 7];
this->actionDelay = this->actionDelay + 0x10;
this->field_0x82.HALF.HI--;
}
this->direction = iVar3 + uVar1 + 4U & 0x18;
}
} else {
this->actionDelay = 0xc;
this->nonPlanarMovement = 0;
}
if (this->direction >> 2 != this->animationState) {
this->animationState = this->direction >> 2;
sub_080287E0(this);
}
}
#else
NAKED
void sub_08028604(Entity* this) {
asm(".include \"asm/non_matching/spearMoblin/sub_08028604.inc\"");
}
#endif
bool32 sub_080286CC(Entity* this) {
if (this->field_0x80.HALF.HI == 0) {
Entity* ent = sub_08049DF4(1);
if (ent != NULL) {
if (this->field_0x82.HALF.LO == 2 && sub_0806FC80(this, ent, 0x30))
return TRUE;
if (sub_0806FC80(this, ent, 0x40) &&
DirectionRoundUp(GetFacingDirection(this, ent)) >> 2 == this->animationState)
return TRUE;
}
}
return FALSE;
}
void sub_08028728(Entity* this) {
this->animationState = DirectionRoundUp(this->direction) >> 2;
this->direction = this->animationState << 2;
this->field_0x82.HALF.HI >>= 1;
sub_080287B4(this);
this->field_0x82.HALF.LO = 2;
}
void sub_08028754(Entity* this) {
this->direction = sub_08049F84(this, 1);
this->animationState = DirectionRoundUp(this->direction) >> 2;
this->field_0x82.HALF.HI = 0;
sub_080287B4(this);
this->field_0x82.HALF.LO = 3;
}
void sub_08028784(Entity* this) {
this->animationState = DirectionRoundUp(this->direction) >> 2;
this->direction = this->animationState << 2;
this->field_0x82.HALF.HI = 0;
sub_080287B4(this);
this->actionDelay <<= 1;
this->field_0x82.HALF.LO = 4;
}
void sub_080287B4(Entity* this) {
this->action = 3;
this->actionDelay = 0x20;
this->field_0xf = 0;
this->field_0x80.HALF.LO = 0;
this->field_0x7a.HALF.HI = 0;
this->nonPlanarMovement = 0;
this->field_0x82.HALF.LO = 0;
sub_080287E0(this);
}
void sub_080287E0(Entity* this) {
u32 sprite = this->animationState >> 1;
switch (this->field_0x82.HALF.LO) {
case 0:
/* ... */
break;
case 1:
case 4:
sprite += 4;
break;
case 3:
sprite += 8;
break;
case 2:
sprite += 0xc;
break;
}
InitializeAnimation(this, sprite);
}
bool32 sub_08028828(u32 arg0, u32 arg1) {
if (DirectionRoundUp(arg1) == DirectionRoundUp(arg0)) {
u32 angle1 = (arg1 + 5) & 7;
u32 angle0 = (arg0 + 5) & 7;
if (angle1 < 3 && angle0 < 3)
return TRUE;
}
return FALSE;
}
void sub_08028858(Entity* this) {
const BoundingBox* box;
sub_080288C0(this);
box = gUnk_080CC944[this->animationState >> 1];
this->boundingBox->unknown[0] = box->unknown[0];
this->boundingBox->unknown[1] = box->unknown[1];
this->boundingBox->unknown[6] = box->unknown[6];
this->boundingBox->unknown[7] = box->unknown[7];
if (this->field_0x82.HALF.LO == 0) {
this->nonPlanarMovement = 0;
}
ProcessMovement(this);
GetNextFrame(this);
}
bool32 sub_080288A4(Entity* this) {
return (this->collisions & gUnk_080CC7D8[this->animationState >> 1]) != 0;
}
void sub_080288C0(Entity* this) {
Entity* ent = this->attachedEntity;
if (ent && (ent->bitfield & 0x80)) {
this->field_0x3e = ent->field_0x3e;
this->hurtBlinkTime = -ent->hurtBlinkTime;
this->field_0x46 = ent->field_0x46;
this->field_0x42 = ent->field_0x42;
ent->field_0x42 = 0;
}
}
// clang-format off
void (*const gUnk_080CC790[])(Entity*) = {
sub_0802826C,
sub_08028284,
sub_08001324,
sub_0804A7D4,
sub_08001242,
nullsub_13,
};
void (*const gUnk_080CC7A8[])(Entity*) = {
sub_08028314,
sub_08028378,
sub_08028420,
sub_08028488,
sub_08028528,
};
const u8 gUnk_080CC7BC[] = {
0x30, 0x60, 0x6C, 0x91,
};
const s8 gUnk_080CC7C0[] = {
0xF8, 0x0C,
0xF4, 0x08,
0x04, 0xFA,
0x06, 0xFC,
0x00, 0xFD,
0x01, 0x03,
0xFF, 0x02,
0x00, 0xFE,
};
const u8 gUnk_080CC7D0[] = {
0x08, 0x10,
0x08, 0x00,
0x10, 0x08,
0x10, 0x00,
};
const u16 gUnk_080CC7D8[] = {
0xE, 0xE000, 0xE0, 0xE00,
};
// clang-format on
+238
View File
@@ -0,0 +1,238 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
extern u32 sub_0804A024(Entity*, u32, u32);
extern Entity* gUnk_020000B0;
void sub_0802B9B4(Entity*);
void sub_0802B7A4(Entity*);
void sub_0802B960(Entity*);
extern void (*const gUnk_080CD2D8[])(Entity*);
extern void (*const gUnk_080CD2F0[])(Entity*);
extern const u8 gUnk_080CD314[];
extern const s8 gUnk_080CD318[];
void SpikedBeetle(Entity* this) {
EnemyFunctionHandler(this, gUnk_080CD2D8);
SetChildOffset(this, 0, 1, -0x10);
}
void sub_0802B610(Entity* this) {
gUnk_080CD2F0[this->action](this);
}
void sub_0802B628(Entity* this) {
switch (this->bitfield & 0x7f) {
case 0:
case 4:
case 5:
case 6:
case 8:
case 9:
case 10:
case 0xb:
case 0xc:
if (this->action == 4) {
this->actionDelay = 1;
}
break;
case 2:
case 3:
case 0x16:
case 0x18:
case 0x19:
case 0x1a:
case 0x1d:
if (this->action < 6) {
this->action = 6;
this->field_0x20 = 0x18000;
this->nonPlanarMovement = 0xc0;
this->direction = this->field_0x3e;
this->field_0x42 = 0;
this->hurtBlinkTime = -8;
this->damageType = 100;
InitializeAnimation(this, 9);
}
}
if (this->field_0x43) {
sub_0804A9FC(this, 0x1c);
}
sub_0804AA30(this, gUnk_080CD2D8);
}
void nullsub_144(Entity* this) {
/* ... */
}
void sub_0802B72C(Entity* this) {
sub_0804A720(this);
this->actionDelay = 1;
this->animationState = 0xff;
sub_0802B7A4(this);
}
void sub_0802B744(Entity* this) {
u32 direction;
GetNextFrame(this);
if (sub_08049FDC(this, 1) && (direction = sub_0804A024(this, 1, 0xc), direction != 0xff)) {
this->action = 3;
this->actionDelay = 0x1e;
this->direction = DirectionRound(direction);
InitializeAnimation(this, 8);
} else {
if (--this->actionDelay == 0) {
this->action = 2;
this->actionDelay = 0x1e;
} else {
if (!ProcessMovement(this)) {
this->actionDelay = 1;
}
}
}
}
void sub_0802B7A4(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 1;
this->actionDelay = gUnk_080CD314[Random() & 3];
this->nonPlanarMovement = 0x60;
sub_0802B960(this);
if (this->direction != 0xff) {
u32 animation = this->direction >> 3;
if (animation != this->animationState) {
this->animationState = animation & 3;
InitializeAnimation(this, animation);
}
}
}
}
void sub_0802B7FC(Entity* this) {
GetNextFrame(this);
if (--this->actionDelay == 0) {
this->action = 4;
this->actionDelay = 0x78;
this->nonPlanarMovement = 0x1c0;
}
}
void sub_0802B820(Entity* this) {
if (!sub_080AEFE0(this)) {
this->actionDelay = 1;
}
GetNextFrame(this);
if (--this->actionDelay == 0) {
sub_0802B9B4(this);
} else if (sub_08049FDC(this, 1)) {
if ((this->actionDelay & 0xf) == 0) {
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
}
} else {
sub_0802B9B4(this);
}
}
void sub_0802B880(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 2;
this->actionDelay = 0x3c;
this->animationState = DirectionToAnimationState(this->direction);
InitializeAnimation(this, this->animationState);
}
}
void sub_0802B8B0(Entity* this) {
sub_080AEFE0(this);
switch (sub_080044EC(this, 0x1800)) {
case 0:
this->action = 7;
this->actionDelay = 0x96;
/* fallthrough */
case 1:
EnqueueSFX(299);
break;
}
}
void sub_0802B8E0(Entity* this) {
if (--this->actionDelay) {
if (this->actionDelay < 0x3c && (this->actionDelay & 1)) {
this->spriteOffsetX += gUnk_080CD318[(this->actionDelay >> 1) & 3];
}
} else {
this->action = 8;
this->field_0x20 = 0x10000;
this->nonPlanarMovement = 0x60;
this->damageType = 99;
InitializeAnimation(this, this->animationState);
EnqueueSFX(299);
}
}
void sub_0802B948(Entity* this) {
if (!sub_08003FC4(this, 0x1800)) {
this->action = 1;
this->actionDelay = 1;
}
}
void sub_0802B960(Entity* this) {
if (sub_08049FDC(this, 1)) {
if ((Random() & 7) == 0) {
this->direction = DirectionRoundUp(sub_08049F84(this, 1));
return;
}
} else if (!sub_08049FA0(this)) {
if ((Random() & 3) == 0) {
this->direction = DirectionRoundUp(sub_08049EE4(this));
return;
}
}
this->direction = DirectionRound(Random());
}
void sub_0802B9B4(Entity* this) {
this->action = 5;
this->actionDelay = 0x3c;
this->animationState = (this->direction >> 3) & 3;
InitializeAnimation(this, this->animationState + 4);
}
// clang-format off
void (*const gUnk_080CD2D8[])(Entity*) = {
sub_0802B610,
sub_0802B628,
sub_08001324,
sub_0804A7D4,
sub_08001242,
nullsub_144,
};
void (*const gUnk_080CD2F0[])(Entity*) = {
sub_0802B72C,
sub_0802B744,
sub_0802B7A4,
sub_0802B7FC,
sub_0802B820,
sub_0802B880,
sub_0802B8B0,
sub_0802B8E0,
sub_0802B948,
};
const u8 gUnk_080CD314[] = {
0x30,
0x48,
0x60,
0x78,
};
const s8 gUnk_080CD318[] = {
1, -1, -1, 1,
};
// clang-format on
+219
View File
@@ -0,0 +1,219 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
#include "area.h"
extern void sub_08001328(Entity*);
extern Entity* sub_08049DF4(u32);
extern void DoExitTransition(u32*);
extern u32* gUnk_0813AB1C[];
void sub_0802A78C(Entity*);
void sub_0802A7D0(Entity*);
extern void (*const gUnk_080CD07C[])(Entity*);
extern void (*const gUnk_080CD094[])(Entity*);
extern const s8 gUnk_080CD0B0[];
void WallMaster(Entity* this) {
gUnk_080CD07C[GetNextFunction(this)](this);
SetChildOffset(this, 0, 1, -0x10);
}
void sub_0802A434(Entity* this) {
sub_0802A78C(this);
gUnk_080CD094[this->action](this);
}
void sub_0802A454(Entity* this) {
if (this->damageType != 0x75 && ((this->bitfield & 0x7f) == 0 || (this->bitfield & 0x7f) == 0x1e)) {
this->action = 5;
this->flags &= ~0x80;
this->field_0x7c.HALF.HI = gPlayerEntity.x.HALF.HI;
this->field_0x80.HWORD = gPlayerEntity.y.HALF.HI;
this->field_0x82.HWORD = gPlayerEntity.height.HALF.HI;
if (this->action != 3) {
InitializeAnimation(this, 1);
}
}
if (this->field_0x42)
if (this->field_0x42 > 4)
this->field_0x42 -= 4;
if (this->field_0x43 != 0) {
sub_0804A9FC(this, 0x1c);
}
sub_0804AA30(this, gUnk_080CD07C);
}
void nullsub_142(Entity* this) {
/* ... */
}
void sub_0802A4E4(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->collisionLayer = 3;
this->field_0x7c.BYTES.byte1 = Random();
this->field_0x7a.HWORD = this->entityType.parameter * 0x3c;
this->field_0x7c.BYTES.byte0 = this->actionDelay;
this->field_0x78.HWORD = this->actionDelay * 0x3c;
UpdateSpriteForCollisionLayer(this);
sub_0802A7D0(this);
}
void sub_0802A534(Entity* this) {
if (this->field_0x78.HWORD) {
this->field_0x78.HWORD--;
} else if (this->field_0x7a.HWORD == 0) {
Entity* ent = sub_08049DF4(1);
if (ent != NULL) {
this->action = 2;
this->actionDelay = 0x5a;
this->flags |= 0x80;
this->spriteSettings.b.draw = 3;
this->x.HALF.HI = ent->x.HALF.HI;
this->y.HALF.HI = ent->y.HALF.HI;
this->height.HALF.HI = -0x80;
this->spritePriority.b1 = 1;
this->spriteSettings.b.shadow = 2;
InitializeAnimation(this, 2);
sub_0802A7D0(this);
}
}
}
void sub_0802A5B8(Entity* this) {
sub_0802A7D0(this);
if (this->actionDelay) {
if (--this->actionDelay == 0) {
EnqueueSFX(0x12d);
InitializeAnimation(this, 0);
}
} else {
this->height.HALF.HI += 3;
if (-1 < this->height.HALF.HI) {
this->action = 3;
this->spriteSettings.b.draw = 1;
this->height.HALF.HI = 0;
InitializeAnimation(this, 1);
}
}
}
/* Kids... don't try to optimize code like this... */
void sub_0802A610(Entity* this) {
u32 flags;
GetNextFrame(this);
sub_0802A7D0(this);
flags = this->frames.all & 0x80;
if (flags) {
this->action = 4;
this->actionDelay = 0x1e;
} else if (this->frames.all & 1) {
this->frames.all = flags;
this->damageType = 0x75;
}
}
void sub_0802A650(Entity* this) {
sub_0802A7D0(this);
this->height.HALF.HI -= 2;
if (-0xa0 > this->height.HALF.HI) {
this->action = 1;
this->flags &= ~0x80;
this->spriteSettings.b.draw = 0;
this->damageType = 0x74;
this->field_0x78.HWORD = this->field_0x7c.BYTES.byte0 * 0x3c;
}
}
void sub_0802A69C(Entity* this) {
u32 flags;
sub_0802A7D0(this);
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x1a[0] |= 0x80;
gPlayerEntity.x.HALF.HI = this->field_0x7c.HALF.HI;
gPlayerEntity.y.HALF.HI = this->field_0x80.HWORD;
gPlayerEntity.height.HALF.HI = this->field_0x82.HWORD;
if (gPlayerEntity.height.HALF.HI != this->height.HALF.HI) {
if (gPlayerEntity.height.HALF.HI < this->height.HALF.HI) {
this->height.HALF.HI--;
} else {
this->height.HALF.HI++;
}
}
/* sigh... */
GetNextFrame(this);
flags = this->frames.all & 0x80;
if (flags) {
this->action = 6;
this->actionDelay = 0x1e;
} else if (this->frames.all & 0x1) {
this->frames.all = flags;
this->spriteOffsetY = 3;
gPlayerEntity.spriteSettings.b.draw = 0;
}
}
void sub_0802A734(Entity* this) {
sub_0802A7D0(this);
if (--this->actionDelay == 0) {
sub_0805E5A8();
DoExitTransition(gUnk_0813AB1C[gArea.regret]);
} else {
this->height.WORD -= 0x20000;
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x1a[0] |= 0x80;
}
}
void sub_0802A78C(Entity* this) {
if (this->action != 0) {
if (sub_08049FDC(this, 1)) {
if (this->field_0x78.HWORD == 0) {
if (this->field_0x7a.HWORD) {
this->field_0x7a.HWORD--;
}
}
} else {
this->field_0x7a.HWORD = this->entityType.parameter * 0x3c + 1;
}
}
}
void sub_0802A7D0(Entity* this) {
u32 unk = gUnk_080CD0B0[(this->field_0x7c.BYTES.byte1++ >> 3) & 7] + 0x100;
sub_0805EC9C(this, unk, unk, 0);
}
// clang-format off
void (*const gUnk_080CD07C[])(Entity*) = {
sub_0802A434,
sub_0802A454,
sub_08001328,
sub_0804A7D4,
sub_08001242,
nullsub_142,
};
void (*const gUnk_080CD094[])(Entity*) = {
sub_0802A4E4,
sub_0802A534,
sub_0802A5B8,
sub_0802A610,
sub_0802A650,
sub_0802A69C,
sub_0802A734,
};
const s8 gUnk_080CD0B0[] = {
-2, -4, -2, 0, 2, 4, 2, 0,
};
// clang-format on
+99
View File
@@ -0,0 +1,99 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
#include "screen.h"
void sub_0802A39C(Entity*);
void sub_0802A334(Entity*);
extern u16 gUnk_02001A40[];
extern void (*const gUnk_080CD030[])(Entity*);
extern const u8 gUnk_080CD03C[];
extern const s8 gUnk_080CD040[];
void WaterDrop(Entity* this) {
gUnk_080CD030[this->action](this);
}
void sub_0802A250(Entity* this) {
Entity* ent;
this->action = 1;
this->actionDelay = 0;
this->field_0x20 = -0x30000;
this->nonPlanarMovement = gUnk_080CD03C[Random() & 3];
this->direction = gUnk_080CD040[Random() & 3] + 0x18;
this->collisionLayer = 2;
InitializeAnimation(this, 0);
UpdateSpriteForCollisionLayer(this);
ent = CreateObject(0x66, 0, 0);
if (ent) {
ent->parent = this;
}
}
void sub_0802A2B4(Entity* this) {
if (!sub_08003FC4(this, 0x2800)) {
this->action = 2;
this->spritePriority.b0 = 7;
EnqueueSFX(0x84);
} else {
sub_0806F69C(this);
}
sub_0802A39C(this);
if (-8 < this->height.HALF.HI) {
sub_0802A334(this);
}
}
void sub_0802A2FC(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 0x80) {
DeleteEntity(this);
} else if (this->frames.all & 1) {
this->flags &= ~0x80;
} else {
sub_0802A39C(this);
}
}
void sub_0802A334(Entity* this) {
u32 x = (this->x.HALF.HI - gRoomControls.roomScrollX + gScreen.bg.bg1yOffset) >> 3;
u32 y = (this->y.HALF.HI - gRoomControls.roomScrollY + gScreen.bg.bg2xOffset) >> 3;
if (gUnk_02001A40[(x & 0x1fU) + (y & 0x1fU) * 0x20 + 0x400]) {
this->collisionLayer = 2;
} else {
this->collisionLayer = 1;
}
UpdateSpriteForCollisionLayer(this);
}
void sub_0802A39C(Entity* this) {
u32 x = (gPlayerEntity.x.HALF.HI - gRoomControls.roomScrollX + gScreen.bg.bg1yOffset) >> 3;
u32 y = (gPlayerEntity.y.HALF.HI - gRoomControls.roomScrollY + gScreen.bg.bg2xOffset - 10) >> 3;
if (gUnk_02001A40[(x & 0x1fU) + (y & 0x1fU) * 0x20 + 0x400]) {
this->flags &= ~0x80;
} else {
this->flags |= 0x80;
}
}
// clang-format off
void (*const gUnk_080CD030[])(Entity*) = {
sub_0802A250,
sub_0802A2B4,
sub_0802A2FC,
};
const u8 gUnk_080CD03C[] = {
0x60, 0x80,
0xA0, 0xC0,
};
const s8 gUnk_080CD040[] = {
-2, -1, -1, -3,
};
// clang-format on
+1 -1
View File
@@ -22,7 +22,7 @@ extern void DeleteManager(Manager20*);
void sub_0805B7A0(Manager20* this) {
Entity* tmp = CreateObject(this->manager.unk_0e, this->manager.unk_0a, this->manager.unk_0b);
if (!tmp) return;
tmp->field_0x86 = this->unk_3e;
tmp->field_0x86.HWORD = this->unk_3e;
if (CheckFlags(this->unk_3e)) {
tmp->x.HALF.HI = this->unk_36 | (this->unk_37&0xF)<<8;//r1
tmp->y.HALF.HI = this->unk_3c & 0xFFF;
+1 -2
View File
@@ -2,16 +2,15 @@
#include "entity.h"
#include "player.h"
#include "structures.h"
#include "functions.h"
extern void (*gUnk_081140D4[])(Entity*);
extern u16 gUnk_081140CC[];
extern void sub_0805E3A0(Entity*, u32);
extern void sub_0806D0B0(Entity*);
extern void sub_0807DD64(Entity*);
extern void sub_0807DDAC(Entity*, u32);
extern void sub_0807DDE4(Entity*);
extern u32 Random(void);
extern void PlaySFX(u32);
extern void sub_0806D02C(Entity*);
extern Entity* FindEntityInListByForm(u32, u32, u32, u32, u32);
-1
View File
@@ -15,7 +15,6 @@ extern void (*gUnk_08111914[])(Entity*);
extern void (*gUnk_08111928[])(Entity*);
extern Dialog gUnk_08111938[];
extern void PlaySFX(u32);
extern u32 Random();
extern u32 UpdateFuseInteraction(Entity*);
extern PlayerState gPlayerState;
-1
View File
@@ -21,7 +21,6 @@ extern void sub_08060158(Entity*);
extern u32 CheckKinstoneFused(u32);
extern Entity* FindEntityInListBySubtype(u32, u32, u32);
extern void DeleteEntity(Entity*);
extern u32 Random(void);
extern void ModBombs(s32);
extern SpriteLoadData gUnk_0810A348;
-1
View File
@@ -6,7 +6,6 @@
extern void sub_08068780(Entity*);
extern void sub_08078778(Entity*);
extern u32 Random(void);
extern void sub_0807DD50(Entity*);
extern void sub_0806F118(Entity*);
extern void sub_0807DDAC(Entity*, u32);
-1
View File
@@ -8,7 +8,6 @@ extern u32 sub_0806F5A4(u32);
extern void sub_0806F118(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 void sub_0807DD50(Entity*);
-1
View File
@@ -35,7 +35,6 @@ extern void sub_08062048(Entity*);
extern void sub_08078784(Entity*, u32);
extern void sub_08078778(Entity*);
extern u32 sub_0806F5B0(u32);
extern u32 Random(void);
extern void ResolveEntityOnTop(Entity*, Entity*);
extern void sub_08078850(Entity*, u32, u8, u32*);
+2 -2
View File
@@ -23,7 +23,7 @@ void sub_08098D1C(Entity* this) {
this->action = 1;
this->height.HALF.HI = -0x10;
temp = this->field_0x86;
temp = this->field_0x86.HWORD;
if ((temp != 0) && !CheckFlags(temp)) {
this->action = 1;
@@ -39,7 +39,7 @@ void sub_08098D1C(Entity* this) {
void sub_08098D6C(Entity* this) {
Entity* ent;
if (CheckFlags(this->field_0x86)) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 2;
this->actionDelay = 0x2d;
ent = CreateFx(this, 0x43, 0);
+3 -3
View File
@@ -22,7 +22,7 @@ void sub_08081AE0(Entity* this) {
this->field_0x74.HWORD = (((this->x.HALF.HI - gRoomControls.roomOriginX)>>4) & 0x3F) |
((((this->y.HALF.HI - gRoomControls.roomOriginY)>>4) & 0x3F) << 6);
this->field_0x70.HALF.HI = GetTileType(this->field_0x74.HWORD, this->collisionLayer);
if (this->entityType.form == 0 && CheckFlags(this->field_0x86)) {
if (this->entityType.form == 0 && CheckFlags(this->field_0x86.HWORD)) {
this->action = 5;
SetTileType(0x7A, this->field_0x74.HWORD, this->collisionLayer);
} else {
@@ -92,7 +92,7 @@ void sub_08081C30(Entity* this) {
}
} else {
this->action = 2;
ClearFlag(this->field_0x86);
ClearFlag(this->field_0x86.HWORD);
SetTileType(0x77, this->field_0x74.HWORD, this->collisionLayer);
PlaySFX(0x10C);
}
@@ -257,7 +257,7 @@ u32 sub_08081F7C(Entity* this, u32 r7) {
this->attachedEntity->spriteOffsetY = 0xfc;
} else {
if (this->actionDelay == 6) {
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
SetTileType(r7, this->field_0x74.HWORD, this->collisionLayer);
sub_08081F24(this);
PlaySFX(0x10C);
+4 -5
View File
@@ -3,6 +3,7 @@
#include "room.h"
#include "player.h"
#include "flags.h"
#include "functions.h"
extern void sub_0809F7BC(Entity*);
extern void PlaySFX(u32);
@@ -13,7 +14,6 @@ extern void DeleteThisEntity();
extern u32 CheckRoomFlag(u32);
extern void sub_08078A90(u32);
extern void sub_08078B48(void);
extern u32 Random(void);
extern void sub_0806F69C(Entity*);
extern void (*gUnk_08124798[])(Entity*);
extern void (*gUnk_081247A0[])(Entity*);
@@ -23,7 +23,6 @@ extern void PositionEntityOnTop(Entity*, Entity*);
extern void sub_0807BB68(u32*, u32, u32);
extern u8 gUnk_02034490;
extern u32 gScreenTransition;
extern void* gUnk_080DD750;
extern Entity gPlayerEntity;
extern PlayerState gPlayerState;
@@ -62,7 +61,7 @@ void sub_0809F548(Entity* this) {
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
} else {
if ((gScreenTransition & 7) == 0) {
if ((gScreenTransition.frameCount & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -110,7 +109,7 @@ void sub_0809F61C(Entity* this) {
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
} else {
if ((gScreenTransition & 7) == 0) {
if ((gScreenTransition.frameCount & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -145,7 +144,7 @@ void sub_0809F700(Entity* this) {
this->actionDelay = (Random() & 30) + 8;
this->flags = this->flags | 12;
}
if ((gScreenTransition & 3) == 0) {
if ((gScreenTransition.frameCount & 3) == 0) {
uVar2 = Random();
this->spriteOffsetX = gUnk_081247C0[uVar2 & 7];
this->spriteOffsetY = gUnk_081247C0[uVar2 >> 4 & 7];
+2 -2
View File
@@ -40,8 +40,8 @@ void sub_0809ED88(Entity *this)
{
sub_0809F08C();
sub_0809EE44(this);
if (this->field_0x86 != 0) {
if (this->cutsceneBeh.HWORD == this->field_0x86) {
if (this->field_0x86.HWORD != 0) {
if (this->cutsceneBeh.HWORD == this->field_0x86.HWORD) {
if (CheckFlags(this->cutsceneBeh.HWORD)) {
return;
}
+4 -4
View File
@@ -4,6 +4,7 @@
#include "screen.h"
#include "greatFairy.h"
#include "structures.h"
#include "functions.h"
enum {
BEHAVIORS,
@@ -550,14 +551,14 @@ void sub_08087424(Entity* arg0, struct_08087424* arg1) {
void sub_0808747C(u32 arg0, u32 arg1) {
u32 iVar1;
iVar1 = FindEntityInListByForm(0x6, 0xf, 0x6, 0xb, 0x0);
iVar1 = (u32)FindEntityInListByForm(0x6, 0xf, 0x6, 0xb, 0x0);
if (iVar1 != 0) {
iVar1 = 1;
}
*(u32*)(arg1 + 0x14) = iVar1;
}
//clang-format off
// clang-format off
void (*const GreatFairy_Main[])(Entity*) = {
GreatFairy_CallBehavior,
GreatFairy_WingsCallBehavior,
@@ -647,5 +648,4 @@ void (*const GreatFairy_Form2Behaviors[])(Entity*) = {
sub_08087264,
sub_0808727C
};
//clang-format on
// clang-format on
+1 -1
View File
@@ -37,7 +37,7 @@ static void sub_0808E6A0(Entity* this) {
}
static void sub_0808E6E4(Entity* this) {
if (CheckFlags(this->field_0x86)) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 2;
this->spriteSettings.b.draw = 1;
this->spriteRendering.b0 = 3;
+2 -2
View File
@@ -20,7 +20,7 @@ void sub_08091F14(Entity* this) {
this->animIndex = 0;
this->field_0x70.HALF.LO = COORD_TO_TILE(this);
puVar3 = &this->field_0x70.HALF.LO;
if (CheckFlags(this->field_0x86) != 0) {
if (CheckFlags(this->field_0x86.HWORD) != 0) {
this->action = 2;
this->spriteSettings.b.draw = TRUE;
SetTileType(0x1a2, *puVar3 - 0x41, this->collisionLayer);
@@ -39,6 +39,6 @@ void sub_08092000(Entity* this) {
if (GetTileType(*(u16*)&this->field_0x70.HALF.LO, this->collisionLayer) == 0x1a6) {
this->action = 2;
this->spriteSettings.b.draw = TRUE;
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
}
}
+2 -2
View File
@@ -18,7 +18,7 @@ void JailBars(Entity *this)
void sub_080A08C4(Entity *this)
{
if (CheckFlags(this->field_0x86) == 0) {
if (CheckFlags(this->field_0x86.HWORD) == 0) {
this->action = 1;
sub_080A0960(this, 0);
}
@@ -34,7 +34,7 @@ void sub_080A08C4(Entity *this)
void sub_080A0910(Entity *this)
{
if (CheckFlags(this->field_0x86) != 0) {
if (CheckFlags(this->field_0x86.HWORD) != 0) {
this->action = 2;
sub_080A0960(this, 1);
PlaySFX(0x10b);
+6 -6
View File
@@ -45,10 +45,10 @@ void sub_0809EA34(Entity* this) {
void sub_0809EA80(Entity* this) {
if ((this->bitfield & 0x80) != 0) {
if (CheckFlags(this->field_0x86) != 0) {
ClearFlag(this->field_0x86);
if (CheckFlags(this->field_0x86.HWORD) != 0) {
ClearFlag(this->field_0x86.HWORD);
} else {
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
}
EnqueueSFX(0x110);
}
@@ -59,7 +59,7 @@ void sub_0809EABC(Entity* this) {
bool32 anySet;
u32 f;
f = CheckFlags(this->field_0x86);
f = CheckFlags(this->field_0x86.HWORD);
anySet = (-f | f) >> 0x1F;
if (this->frameIndex != anySet) {
this->frameIndex = anySet;
@@ -122,7 +122,7 @@ void sub_0809EBD8(Entity* this) {
this->action = 2;
this->actionDelay = 0x10;
this->frameIndex = 2;
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
EnqueueSFX(0x110);
}
}
@@ -136,7 +136,7 @@ void sub_0809EC08(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 1;
this->frameIndex = 3;
ClearFlag(this->field_0x86);
ClearFlag(this->field_0x86.HWORD);
EnqueueSFX(0x110);
}
}
+3 -3
View File
@@ -31,7 +31,7 @@ void Mask(Entity *this) {
void sub_080929A4(Entity *this) {
if (this->entityType.parameter & 0xC0) {
if (CheckFlags(this->field_0x86)) {
if (CheckFlags(this->field_0x86.HWORD)) {
s32 field_0x0a;
switch (this->entityType.parameter & 0xC0) {
@@ -45,7 +45,7 @@ void sub_080929A4(Entity *this) {
goto switchEnd;
}
ClearFlag(this->field_0x86);
ClearFlag(this->field_0x86.HWORD);
break;
case 0x80:
DeleteThisEntity();
@@ -117,7 +117,7 @@ void sub_08092B0C(Entity *this) {
case 0x80:
EnqueueSFX(0x72);
case 0x40:
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
break;
}
+1 -1
View File
@@ -77,7 +77,7 @@ void sub_080A074C(Entity *this)
void sub_080A07BC(Entity *this)
{
if (CheckFlags(this->field_0x86)) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 4;
this->actionDelay = 0xc;
this->direction = 0x10;
-1
View File
@@ -1,7 +1,6 @@
#include "global.h"
#include "entity.h"
extern u32 Random();
extern bool32 CheckIsDungeon();
extern void sub_080AE068(Entity*);
extern void LoadFixedGFX(Entity*, u32);
+2 -6
View File
@@ -1,10 +1,8 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
extern void sub_08086A6C();
extern s32 sub_080044EC();
extern void ProcessMovement();
extern u32 Random(void);
extern void (*gUnk_081206C4[99])(Entity*);
@@ -33,12 +31,10 @@ void sub_080869DC(Entity* ent) {
}
void sub_08086A28(Entity* ent) {
s32 iVar1;
if (ent->attachedEntity->next == NULL) {
ent->action = 2;
} else {
iVar1 = sub_080044EC(ent, 10240);
u32 iVar1 = sub_080044EC(ent, 10240);
if (iVar1 == 0) {
ent->action = 2;
}
+1 -1
View File
@@ -30,7 +30,7 @@ void sub_08089B18(Entity *this)
CopyPosition(this->parent, this);
break;
case 4:
if (!CheckFlags(this->field_0x86)) {
if (!CheckFlags(this->field_0x86.HWORD)) {
this->spriteSettings.b.draw = FALSE;
this->previousActionFlag = 1;
return;
+2 -2
View File
@@ -20,7 +20,7 @@ void ObjectA(Entity *this) {
uVar2 = 0x34;
}
this->field_0x70.HALF.LO = uVar2;
if (CheckFlags(this->field_0x86) != 0) {
if (CheckFlags(this->field_0x86.HWORD) != 0) {
SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
if ((gRoomControls.unk2 & 1) != 0) {
gUnk_02000070 = 0;
@@ -31,7 +31,7 @@ void ObjectA(Entity *this) {
}
} else if (this->interactType != 0) {
SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
CreateDust(this);
sub_080526F8(-1);
DeleteThisEntity();
+3 -3
View File
@@ -30,7 +30,7 @@ void Pot(Entity* this) {
}
void sub_0808222C(Entity* this) {
if (this->entityType.parameter == 1 && CheckFlags(this->field_0x86)) {
if (this->entityType.parameter == 1 && CheckFlags(this->field_0x86.HWORD)) {
DeleteThisEntity();
}
@@ -271,7 +271,7 @@ static void sub_08082850(Entity* this, Entity* parent) {
}
if (this->entityType.parameter == 1) {
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
}
DeleteThisEntity();
@@ -292,7 +292,7 @@ u32 sub_0808288C(Entity* this, u32 form, u32 arg2, u32 arg3) {
if (entity) {
if (arg3 == 2) {
entity->actionDelay = 5;
entity->field_0x86 = this->field_0x86;
entity->field_0x86.HWORD = this->field_0x86.HWORD;
} else {
entity->actionDelay = 0;
}
+6 -6
View File
@@ -32,7 +32,7 @@ void sub_080851AC(Entity* this) {
}
this->animationState = this->entityType.parameter & 2;
if ((this->entityType).form == 3) {
uVar1 = CheckFlags(this->field_0x86);
uVar1 = CheckFlags(this->field_0x86.HWORD);
this->field_0x7a.HWORD = uVar1;
if ((u16)(uVar1 & -1) != 0) {
this->animationState = (this->animationState + 2) & 3;
@@ -45,11 +45,11 @@ void sub_080851AC(Entity* this) {
}
void sub_08085264(Entity* this) {
if (CheckFlags(this->field_0x86)) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 2;
this->field_0xf = 8;
if (this->entityType.form == 1) {
ClearFlag(this->field_0x86);
ClearFlag(this->field_0x86.HWORD);
}
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
InitializeAnimation(this, this->animationState);
@@ -62,7 +62,7 @@ void sub_080852B4(Entity* this) {
if (--this->field_0xf == 0) {
this->action = 3;
this->field_0xf = this->actionDelay;
this->field_0x7a.HWORD = CheckFlags(this->field_0x86);
this->field_0x7a.HWORD = CheckFlags(this->field_0x86.HWORD);
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
InitializeAnimation(this, this->animationState);
sub_08085394(this);
@@ -77,13 +77,13 @@ void sub_08085308(Entity* this) {
case 1:
break;
case 2:
if (CheckFlags(this->field_0x86) == 0) {
if (CheckFlags(this->field_0x86.HWORD) == 0) {
this->action = 1;
return;
}
break;
case 3:
if (CheckFlags(this->field_0x86) == *(u16*)&this->field_0x7a) {
if (CheckFlags(this->field_0x86.HWORD) == *(u16*)&this->field_0x7a) {
this->field_0xf = 0xff;
} else {
this->field_0xf = 1;
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
extern u32 Random(void);
extern void sub_0806F69C(Entity*);
extern void (*const gUnk_08121060[])(Entity*);
+2 -2
View File
@@ -23,7 +23,7 @@ void TreeHidingPortal(Entity* this) {
}
void sub_0809E83C(Entity* this) {
if (CheckFlags(this->field_0x86)) {
if (CheckFlags(this->field_0x86.HWORD)) {
sub_0809E96C(this);
DeleteThisEntity();
}
@@ -60,7 +60,7 @@ void sub_0809E8BC(Entity* this) {
void sub_0809E8EC(Entity* this) {
if (--this->actionDelay == 0) {
SetFlag(this->field_0x86);
SetFlag(this->field_0x86.HWORD);
sub_08078A90(0);
PlaySFX(0x73);
DeleteThisEntity();