mirror of https://github.com/zeldaret/tmc.git
Merge pull request #79 from HookedBehemoth:more_enemies
decompile peahat & rollobite
This commit is contained in:
commit
ae7968e006
1549
asm/darkNut.s
1549
asm/darkNut.s
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,43 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
push {lr}
|
||||
adds r2, r0, #0
|
||||
movs r0, #7
|
||||
ands r0, r1
|
||||
subs r0, #3
|
||||
cmp r0, #2
|
||||
bhi _0802129A
|
||||
movs r3, #0x18
|
||||
adds r0, r1, #0
|
||||
ands r0, r3
|
||||
lsrs r0, r0, #3
|
||||
cmp r0, r2
|
||||
beq _080212AA
|
||||
adds r0, r1, #0
|
||||
adds r0, #8
|
||||
ands r0, r3
|
||||
lsrs r0, r0, #3
|
||||
cmp r0, r2
|
||||
beq _080212AA
|
||||
_0802129A:
|
||||
adds r0, r1, #4
|
||||
movs r1, #0x18
|
||||
ands r0, r1
|
||||
lsrs r1, r0, #3
|
||||
cmp r2, r1
|
||||
beq _080212AA
|
||||
adds r0, r1, #0
|
||||
b _080212AC
|
||||
_080212AA:
|
||||
movs r0, #0xff
|
||||
_080212AC:
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
|
||||
.syntax divided
|
|
@ -1,79 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start ObjectB2
|
||||
ObjectB2: @ 0x080A09A4
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xc]
|
||||
cmp r0, #0
|
||||
bne _080A09D4
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0x10
|
||||
strb r0, [r4, #0xe]
|
||||
ldrb r0, [r4, #0xa]
|
||||
lsls r0, r0, #3
|
||||
strb r0, [r4, #0x15]
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x38
|
||||
ldrb r0, [r0]
|
||||
ldr r1, _080A0A2C @ =gUnk_02027EB4
|
||||
cmp r0, #2
|
||||
bne _080A09CA
|
||||
ldr r1, _080A0A30 @ =gUnk_0200D654
|
||||
_080A09CA:
|
||||
str r1, [r4, #0x54]
|
||||
ldrb r1, [r4, #0xa]
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
_080A09D4:
|
||||
ldr r0, [r4, #0x50]
|
||||
ldrh r0, [r0, #0x24]
|
||||
strh r0, [r4, #0x24]
|
||||
adds r0, r4, #0
|
||||
bl sub_0806F69C
|
||||
ldr r0, [r4, #0x54]
|
||||
movs r2, #0x2e
|
||||
ldrsh r1, [r4, r2]
|
||||
movs r3, #0x32
|
||||
ldrsh r2, [r4, r3]
|
||||
movs r3, #9
|
||||
bl sub_080AE4CC
|
||||
cmp r0, #0
|
||||
beq _080A09F8
|
||||
bl DeleteThisEntity
|
||||
_080A09F8:
|
||||
movs r1, #0x24
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, #0x40
|
||||
bgt _080A0A22
|
||||
ldrb r2, [r4, #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, [r4, #0x18]
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _080A0A22
|
||||
bl DeleteThisEntity
|
||||
_080A0A22:
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_080A0A2C: .4byte gUnk_02027EB4
|
||||
_080A0A30: .4byte gUnk_0200D654
|
928
asm/peahat.s
928
asm/peahat.s
|
@ -1,928 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start Peahat
|
||||
Peahat: @ 0x0801FF5C
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xa]
|
||||
cmp r0, #0
|
||||
bne _0801FF84
|
||||
ldr r1, _0801FF80 @ =gUnk_080CA570
|
||||
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 _0801FF94
|
||||
.align 2, 0
|
||||
_0801FF80: .4byte gUnk_080CA570
|
||||
_0801FF84:
|
||||
ldr r0, _0801FF98 @ =gUnk_080CA588
|
||||
ldrb r1, [r4, #0xc]
|
||||
lsls r1, r1, #2
|
||||
adds r1, r1, r0
|
||||
ldr r1, [r1]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
_0801FF94:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_0801FF98: .4byte gUnk_080CA588
|
||||
|
||||
thumb_func_start sub_0801FF9C
|
||||
sub_0801FF9C: @ 0x0801FF9C
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r1, _0801FFD4 @ =gUnk_080CA590
|
||||
ldrb r0, [r4, #0xc]
|
||||
lsls r0, r0, #2
|
||||
adds r0, r0, r1
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x81
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #0
|
||||
beq _0801FFD2
|
||||
ldr r2, _0801FFD8 @ =gUnk_080CA5B8
|
||||
ldrb r1, [r4, #0xf]
|
||||
adds r0, r1, #1
|
||||
strb r0, [r4, #0xf]
|
||||
movs r0, #0x30
|
||||
ands r0, r1
|
||||
lsrs r0, r0, #4
|
||||
adds r0, r0, r2
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
strh r0, [r4, #0x36]
|
||||
_0801FFD2:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_0801FFD4: .4byte gUnk_080CA590
|
||||
_0801FFD8: .4byte gUnk_080CA5B8
|
||||
|
||||
thumb_func_start sub_0801FFDC
|
||||
sub_0801FFDC: @ 0x0801FFDC
|
||||
push {r4, r5, r6, lr}
|
||||
adds r4, r0, #0
|
||||
adds r6, r4, #0
|
||||
adds r6, #0x82
|
||||
ldrb r0, [r6]
|
||||
cmp r0, #0
|
||||
beq _08020068
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x41
|
||||
ldrb r1, [r0]
|
||||
cmp r1, #0x94
|
||||
bne _08020018
|
||||
movs r0, #3
|
||||
movs r1, #1
|
||||
bl CreateEnemy
|
||||
adds r5, r0, #0
|
||||
cmp r5, #0
|
||||
beq _08020010
|
||||
adds r0, r4, #0
|
||||
adds r1, r5, #0
|
||||
bl CopyPosition
|
||||
ldrh r0, [r5, #0x36]
|
||||
subs r0, #8
|
||||
strh r0, [r5, #0x36]
|
||||
_08020010:
|
||||
movs r0, #0
|
||||
strb r0, [r6]
|
||||
movs r0, #2
|
||||
b _0802001E
|
||||
_08020018:
|
||||
cmp r1, #0x9b
|
||||
bne _08020042
|
||||
movs r0, #1
|
||||
_0802001E:
|
||||
strb r0, [r4, #0x14]
|
||||
movs r0, #5
|
||||
strb r0, [r4, #0xc]
|
||||
movs r1, #0
|
||||
movs r0, #0x80
|
||||
strh r0, [r4, #0x24]
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x3d
|
||||
movs r0, #0xe2
|
||||
strb r0, [r2]
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x81
|
||||
strb r1, [r0]
|
||||
ldrb r1, [r4, #0x14]
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
b _08020068
|
||||
_08020042:
|
||||
cmp r1, #0x80
|
||||
bne _08020068
|
||||
ldrb r0, [r4, #0x14]
|
||||
cmp r0, #0
|
||||
bne _08020068
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0x1e
|
||||
strb r0, [r4, #0xe]
|
||||
strh r1, [r4, #0x24]
|
||||
movs r0, #0xff
|
||||
strb r0, [r4, #0x15]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x83
|
||||
movs r0, #0x78
|
||||
strb r0, [r1]
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
_08020068:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x43
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #0
|
||||
beq _0802007A
|
||||
adds r0, r4, #0
|
||||
movs r1, #0x1c
|
||||
bl sub_0804A9FC
|
||||
_0802007A:
|
||||
ldr r1, _08020084 @ =gUnk_080CA570
|
||||
adds r0, r4, #0
|
||||
bl sub_0804AA30
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
_08020084: .4byte gUnk_080CA570
|
||||
|
||||
thumb_func_start sub_08020088
|
||||
sub_08020088: @ 0x08020088
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xd]
|
||||
cmp r0, #2
|
||||
bhi _0802009C
|
||||
adds r0, r4, #0
|
||||
bl sub_0806F520
|
||||
cmp r0, #0
|
||||
beq _080200AC
|
||||
_0802009C:
|
||||
ldr r0, _080200B0 @ =gUnk_080CA5BC
|
||||
ldrb r1, [r4, #0xd]
|
||||
lsls r1, r1, #2
|
||||
adds r1, r1, r0
|
||||
ldr r1, [r1]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
_080200AC:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_080200B0: .4byte gUnk_080CA5BC
|
||||
|
||||
thumb_func_start sub_080200B4
|
||||
sub_080200B4: @ 0x080200B4
|
||||
push {lr}
|
||||
adds r2, r0, #0
|
||||
movs r1, #1
|
||||
strb r1, [r2, #0xd]
|
||||
movs r0, #0x3c
|
||||
strb r0, [r2, #0x1d]
|
||||
ldrb r3, [r2, #0x14]
|
||||
cmp r3, #0
|
||||
bne _080200E2
|
||||
strb r1, [r2, #0x14]
|
||||
movs r0, #5
|
||||
strb r0, [r2, #0xc]
|
||||
adds r1, r2, #0
|
||||
adds r1, #0x3f
|
||||
movs r0, #0x71
|
||||
strb r0, [r1]
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x81
|
||||
strb r3, [r0]
|
||||
ldrb r1, [r2, #0x14]
|
||||
adds r0, r2, #0
|
||||
bl InitializeAnimation
|
||||
_080200E2:
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_080200E4
|
||||
sub_080200E4: @ 0x080200E4
|
||||
push {lr}
|
||||
bl sub_0806F4E8
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_080200EC
|
||||
sub_080200EC: @ 0x080200EC
|
||||
push {lr}
|
||||
bl sub_0806F3E4
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_080200F4
|
||||
sub_080200F4: @ 0x080200F4
|
||||
ldrb r2, [r0, #0x10]
|
||||
movs r1, #0x7f
|
||||
ands r1, r2
|
||||
strb r1, [r0, #0x10]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start nullsub_5
|
||||
nullsub_5: @ 0x08020100
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020104
|
||||
sub_08020104: @ 0x08020104
|
||||
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 _08020128
|
||||
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 _0802012E
|
||||
_08020128:
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x45
|
||||
strb r1, [r0]
|
||||
_0802012E:
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08020130
|
||||
sub_08020130: @ 0x08020130
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_0804A720
|
||||
movs r5, #1
|
||||
strb r5, [r4, #0xc]
|
||||
movs r0, #0x10
|
||||
strb r0, [r4, #0xe]
|
||||
bl Random
|
||||
strb r0, [r4, #0xf]
|
||||
bl Random
|
||||
movs r1, #0x1f
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x15]
|
||||
movs r0, #0x12
|
||||
strb r0, [r4, #0x1c]
|
||||
bl Random
|
||||
ands r0, r5
|
||||
movs r1, #0xfe
|
||||
cmp r0, #0
|
||||
beq _08020162
|
||||
movs r1, #2
|
||||
_08020162:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x80
|
||||
strb r1, [r0]
|
||||
adds r0, #1
|
||||
strb r5, [r0]
|
||||
adds r0, #1
|
||||
strb r5, [r0]
|
||||
movs r0, #0
|
||||
strb r0, [r4, #0x14]
|
||||
adds r0, r4, #0
|
||||
movs r1, #0
|
||||
bl InitializeAnimation
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020180
|
||||
sub_08020180: @ 0x08020180
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
adds r5, r4, #0
|
||||
adds r5, #0x83
|
||||
ldrb r0, [r5]
|
||||
cmp r0, #0
|
||||
beq _08020192
|
||||
subs r0, #1
|
||||
strb r0, [r5]
|
||||
_08020192:
|
||||
adds r0, r4, #0
|
||||
movs r1, #1
|
||||
bl sub_08049FDC
|
||||
cmp r0, #0
|
||||
beq _080201D4
|
||||
ldrb r0, [r5]
|
||||
cmp r0, #0
|
||||
bne _080201D4
|
||||
ldrb r1, [r4, #0xf]
|
||||
movs r0, #0xf
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
bne _080201D4
|
||||
ldr r0, _0802021C @ =gUnk_020000B0
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, #0
|
||||
movs r2, #0x30
|
||||
bl sub_08049F1C
|
||||
cmp r0, #0
|
||||
beq _080201D4
|
||||
movs r0, #2
|
||||
strb r0, [r4, #0xc]
|
||||
bl Random
|
||||
movs r1, #3
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0xd]
|
||||
movs r0, #0x3c
|
||||
strb r0, [r4, #0xe]
|
||||
movs r0, #0xa0
|
||||
strh r0, [r4, #0x24]
|
||||
_080201D4:
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _0802020C
|
||||
movs r0, #0x10
|
||||
strb r0, [r4, #0xe]
|
||||
adds r0, r4, #0
|
||||
bl sub_08020604
|
||||
bl Random
|
||||
movs r1, #3
|
||||
ands r1, r0
|
||||
cmp r1, #0
|
||||
bne _0802020C
|
||||
bl Random
|
||||
movs r1, #1
|
||||
ands r1, r0
|
||||
movs r2, #0xfe
|
||||
cmp r1, #0
|
||||
beq _08020206
|
||||
movs r2, #2
|
||||
_08020206:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x80
|
||||
strb r2, [r0]
|
||||
_0802020C:
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEFE0
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_0802021C: .4byte gUnk_020000B0
|
||||
|
||||
thumb_func_start sub_08020220
|
||||
sub_08020220: @ 0x08020220
|
||||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
movs r1, #1
|
||||
bl sub_08049FDC
|
||||
cmp r0, #0
|
||||
beq _08020284
|
||||
ldrb r0, [r5, #0xe]
|
||||
subs r1, r0, #1
|
||||
strb r1, [r5, #0xe]
|
||||
lsls r0, r1, #0x18
|
||||
cmp r0, #0
|
||||
beq _0802024C
|
||||
lsrs r0, r0, #0x1c
|
||||
movs r1, #3
|
||||
ands r0, r1
|
||||
movs r1, #4
|
||||
subs r1, r1, r0
|
||||
adds r0, r5, #0
|
||||
bl UpdateAnimationVariableFrames
|
||||
b _08020292
|
||||
_0802024C:
|
||||
movs r0, #3
|
||||
strb r0, [r5, #0xc]
|
||||
movs r0, #0x78
|
||||
strb r0, [r5, #0xe]
|
||||
movs r0, #0xc0
|
||||
strh r0, [r5, #0x24]
|
||||
ldr r0, _0802027C @ =gUnk_020000B0
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, #0
|
||||
bl GetFacingDirection
|
||||
adds r4, r0, #0
|
||||
bl Random
|
||||
ldr r2, _08020280 @ =gUnk_080CA5D4
|
||||
movs r1, #1
|
||||
ands r1, r0
|
||||
adds r1, r1, r2
|
||||
ldrb r0, [r1]
|
||||
adds r0, r0, r4
|
||||
movs r1, #0x1f
|
||||
ands r0, r1
|
||||
strb r0, [r5, #0x15]
|
||||
b _0802028A
|
||||
.align 2, 0
|
||||
_0802027C: .4byte gUnk_020000B0
|
||||
_08020280: .4byte gUnk_080CA5D4
|
||||
_08020284:
|
||||
adds r0, r5, #0
|
||||
bl sub_080205F8
|
||||
_0802028A:
|
||||
adds r0, r5, #0
|
||||
movs r1, #4
|
||||
bl UpdateAnimationVariableFrames
|
||||
_08020292:
|
||||
pop {r4, r5, pc}
|
||||
|
||||
thumb_func_start sub_08020294
|
||||
sub_08020294: @ 0x08020294
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
movs r1, #1
|
||||
bl sub_08049FDC
|
||||
cmp r0, #0
|
||||
beq _080202F8
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _080202B4
|
||||
adds r0, r4, #0
|
||||
bl sub_080205F8
|
||||
_080202B4:
|
||||
ldrb r1, [r4, #0xe]
|
||||
cmp r1, #0x3c
|
||||
bls _080202E6
|
||||
movs r0, #1
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _080202C8
|
||||
ldrh r0, [r4, #0x24]
|
||||
adds r0, #4
|
||||
strh r0, [r4, #0x24]
|
||||
_080202C8:
|
||||
ldr r0, _080202F0 @ =gScreenTransition
|
||||
ldr r0, [r0]
|
||||
movs r1, #3
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
bne _080202E6
|
||||
ldr r0, _080202F4 @ =gUnk_020000B0
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, #0
|
||||
bl GetFacingDirection
|
||||
adds r1, r0, #0
|
||||
adds r0, r4, #0
|
||||
bl sub_08004596
|
||||
_080202E6:
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEFE0
|
||||
b _080202FE
|
||||
.align 2, 0
|
||||
_080202F0: .4byte gScreenTransition
|
||||
_080202F4: .4byte gUnk_020000B0
|
||||
_080202F8:
|
||||
adds r0, r4, #0
|
||||
bl sub_080205F8
|
||||
_080202FE:
|
||||
adds r0, r4, #0
|
||||
movs r1, #4
|
||||
bl UpdateAnimationVariableFrames
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_08020308
|
||||
sub_08020308: @ 0x08020308
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r1, r0, #1
|
||||
strb r1, [r4, #0xe]
|
||||
lsls r0, r1, #0x18
|
||||
cmp r0, #0
|
||||
bne _08020332
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
strb r0, [r4, #0xe]
|
||||
movs r0, #0x80
|
||||
strh r0, [r4, #0x24]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x83
|
||||
movs r0, #0x78
|
||||
strb r0, [r1]
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
b _0802034E
|
||||
_08020332:
|
||||
movs r0, #1
|
||||
ands r1, r0
|
||||
cmp r1, #0
|
||||
beq _08020340
|
||||
ldrh r0, [r4, #0x24]
|
||||
subs r0, #8
|
||||
strh r0, [r4, #0x24]
|
||||
_08020340:
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEFE0
|
||||
adds r0, r4, #0
|
||||
movs r1, #4
|
||||
bl UpdateAnimationVariableFrames
|
||||
_0802034E:
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_08020350
|
||||
sub_08020350: @ 0x08020350
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0x14]
|
||||
cmp r0, #2
|
||||
beq _08020398
|
||||
movs r1, #0xc0
|
||||
lsls r1, r1, #5
|
||||
adds r0, r4, #0
|
||||
bl sub_080044EC
|
||||
cmp r0, #0
|
||||
bne _0802037C
|
||||
movs r0, #6
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0xf0
|
||||
strb r0, [r4, #0xe]
|
||||
movs r0, #0xa
|
||||
strb r0, [r4, #0xf]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x3f
|
||||
movs r0, #0x71
|
||||
strb r0, [r1]
|
||||
_0802037C:
|
||||
ldrb r0, [r4, #0x15]
|
||||
cmp r0, #0xff
|
||||
bne _0802038A
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x3e
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r4, #0x15]
|
||||
_0802038A:
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEF88
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
b _080203BE
|
||||
_08020398:
|
||||
movs r1, #0xe0
|
||||
lsls r1, r1, #5
|
||||
adds r0, r4, #0
|
||||
bl sub_08003FC4
|
||||
movs r1, #0x36
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, #0
|
||||
bne _080203BE
|
||||
movs r0, #7
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0x96
|
||||
strb r0, [r4, #0xe]
|
||||
movs r0, #0xa
|
||||
strb r0, [r4, #0xf]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x3f
|
||||
movs r0, #0x71
|
||||
strb r0, [r1]
|
||||
_080203BE:
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_080203C0
|
||||
sub_080203C0: @ 0x080203C0
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xf]
|
||||
cmp r0, #0
|
||||
beq _080203DC
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xf]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _080203DC
|
||||
adds r0, r4, #0
|
||||
movs r1, #0x1c
|
||||
bl sub_0804A9FC
|
||||
_080203DC:
|
||||
adds r0, r4, #0
|
||||
bl sub_0800442E
|
||||
cmp r0, #0
|
||||
bne _080203F2
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08020418
|
||||
_080203F2:
|
||||
movs r0, #9
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0xc0
|
||||
lsls r0, r0, #9
|
||||
str r0, [r4, #0x20]
|
||||
bl Random
|
||||
movs r1, #0x1f
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x15]
|
||||
adds r0, r4, #0
|
||||
bl sub_0804AA1C
|
||||
movs r0, #5
|
||||
strb r0, [r4, #0x14]
|
||||
adds r0, r4, #0
|
||||
movs r1, #5
|
||||
bl InitializeAnimation
|
||||
_08020418:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_0802041C
|
||||
sub_0802041C: @ 0x0802041C
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xf]
|
||||
cmp r0, #0
|
||||
beq _08020438
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xf]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08020438
|
||||
adds r0, r4, #0
|
||||
movs r1, #0x1c
|
||||
bl sub_0804A9FC
|
||||
_08020438:
|
||||
adds r0, r4, #0
|
||||
bl sub_0800442E
|
||||
cmp r0, #0
|
||||
bne _0802044E
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08020466
|
||||
_0802044E:
|
||||
movs r0, #8
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0xf0
|
||||
strb r0, [r4, #0xe]
|
||||
bl Random
|
||||
movs r1, #0x1f
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x15]
|
||||
adds r0, r4, #0
|
||||
bl sub_0804AA1C
|
||||
_08020466:
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_08020468
|
||||
sub_08020468: @ 0x08020468
|
||||
push {r4, r5, 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 _080204A6
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x5a
|
||||
ldrb r1, [r0]
|
||||
movs r0, #0x80
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _080204A2
|
||||
movs r0, #9
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0xc0
|
||||
lsls r0, r0, #9
|
||||
str r0, [r4, #0x20]
|
||||
movs r0, #4
|
||||
strb r0, [r4, #0x14]
|
||||
adds r0, r4, #0
|
||||
movs r1, #4
|
||||
bl InitializeAnimation
|
||||
b _080204A6
|
||||
_080204A2:
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
_080204A6:
|
||||
adds r5, r4, #0
|
||||
adds r5, #0x5a
|
||||
ldrb r1, [r5]
|
||||
movs r0, #2
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _080204C4
|
||||
movs r0, #0xfd
|
||||
ands r0, r1
|
||||
strb r0, [r5]
|
||||
bl Random
|
||||
movs r1, #0x1f
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x15]
|
||||
_080204C4:
|
||||
ldrb r1, [r5]
|
||||
movs r0, #1
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _080204D6
|
||||
adds r0, r4, #0
|
||||
bl sub_0800442E
|
||||
b _080204DC
|
||||
_080204D6:
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEF88
|
||||
_080204DC:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_080204E0
|
||||
sub_080204E0: @ 0x080204E0
|
||||
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 _0802051A
|
||||
movs r2, #0
|
||||
movs r1, #1
|
||||
strb r1, [r4, #0xc]
|
||||
adds r3, r4, #0
|
||||
adds r3, #0x3f
|
||||
movs r0, #0x70
|
||||
strb r0, [r3]
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x82
|
||||
strb r1, [r0]
|
||||
subs r0, #1
|
||||
strb r1, [r0]
|
||||
strb r2, [r4, #0x14]
|
||||
adds r0, r4, #0
|
||||
movs r1, #0
|
||||
bl InitializeAnimation
|
||||
b _0802053A
|
||||
_0802051A:
|
||||
movs r0, #1
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _0802052A
|
||||
adds r0, r4, #0
|
||||
bl sub_0800442E
|
||||
b _0802053A
|
||||
_0802052A:
|
||||
movs r1, #0xe0
|
||||
lsls r1, r1, #5
|
||||
adds r0, r4, #0
|
||||
bl sub_08003FC4
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEF88
|
||||
_0802053A:
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_0802053C
|
||||
sub_0802053C: @ 0x0802053C
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
movs r1, #1
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0xf0
|
||||
strb r0, [r4, #0xe]
|
||||
movs r0, #0x28
|
||||
strb r0, [r4, #0xf]
|
||||
ldrb r0, [r4, #0x18]
|
||||
movs r2, #4
|
||||
rsbs r2, r2, #0
|
||||
ands r2, r0
|
||||
orrs r2, r1
|
||||
ldrb r3, [r4, #0x19]
|
||||
movs r1, #0x3f
|
||||
adds r0, r1, #0
|
||||
ands r0, r3
|
||||
movs r3, #0x40
|
||||
orrs r0, r3
|
||||
strb r0, [r4, #0x19]
|
||||
ldrb r0, [r4, #0x1b]
|
||||
ands r1, r0
|
||||
orrs r1, r3
|
||||
strb r1, [r4, #0x1b]
|
||||
movs r0, #0x31
|
||||
rsbs r0, r0, #0
|
||||
ands r2, r0
|
||||
strb r2, [r4, #0x18]
|
||||
movs r0, #0x20
|
||||
strh r0, [r4, #0x24]
|
||||
bl Random
|
||||
movs r1, #0x10
|
||||
ands r0, r1
|
||||
adds r0, #8
|
||||
strb r0, [r4, #0x15]
|
||||
adds r0, r4, #0
|
||||
movs r1, #3
|
||||
bl InitializeAnimation
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_08020590
|
||||
sub_08020590: @ 0x08020590
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
bl GetNextFrame
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r1, r0, #1
|
||||
strb r1, [r4, #0xe]
|
||||
movs r5, #0xff
|
||||
lsls r0, r1, #0x18
|
||||
cmp r0, #0
|
||||
bne _080205AE
|
||||
adds r0, r4, #0
|
||||
bl DeleteEntity
|
||||
b _080205F2
|
||||
_080205AE:
|
||||
lsls r0, r1, #0x18
|
||||
lsrs r0, r0, #0x18
|
||||
cmp r0, #0x3b
|
||||
bhi _080205C8
|
||||
ldrb r2, [r4, #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, [r4, #0x18]
|
||||
_080205C8:
|
||||
ldr r0, [r4, #0x34]
|
||||
ldr r1, _080205F4 @ =0xFFFF4000
|
||||
adds r0, r0, r1
|
||||
str r0, [r4, #0x34]
|
||||
adds r0, r4, #0
|
||||
bl sub_0806F69C
|
||||
ldrb r0, [r4, #0xf]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xf]
|
||||
ands r0, r5
|
||||
cmp r0, #0
|
||||
bne _080205F2
|
||||
movs r0, #0x28
|
||||
strb r0, [r4, #0xf]
|
||||
bl Random
|
||||
movs r1, #0x10
|
||||
ands r0, r1
|
||||
adds r0, #8
|
||||
strb r0, [r4, #0x15]
|
||||
_080205F2:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_080205F4: .4byte 0xFFFF4000
|
||||
|
||||
thumb_func_start sub_080205F8
|
||||
sub_080205F8: @ 0x080205F8
|
||||
movs r1, #4
|
||||
strb r1, [r0, #0xc]
|
||||
movs r1, #0x3c
|
||||
strb r1, [r0, #0xe]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020604
|
||||
sub_08020604: @ 0x08020604
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_08049FA0
|
||||
cmp r0, #0
|
||||
bne _08020624
|
||||
bl Random
|
||||
movs r1, #3
|
||||
ands r1, r0
|
||||
cmp r1, #0
|
||||
beq _08020624
|
||||
adds r0, r4, #0
|
||||
bl sub_08049EE4
|
||||
b _08020632
|
||||
_08020624:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x80
|
||||
ldrb r0, [r0]
|
||||
ldrb r1, [r4, #0x15]
|
||||
adds r0, r0, r1
|
||||
movs r1, #0x1f
|
||||
ands r0, r1
|
||||
_08020632:
|
||||
strb r0, [r4, #0x15]
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
735
asm/rollobite.s
735
asm/rollobite.s
|
@ -1,735 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start Rollobite
|
||||
Rollobite: @ 0x08020638
|
||||
push {lr}
|
||||
ldr r1, _08020644 @ =gUnk_080CA66C
|
||||
bl EnemyFunctionHandler
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
_08020644: .4byte gUnk_080CA66C
|
||||
|
||||
thumb_func_start sub_08020648
|
||||
sub_08020648: @ 0x08020648
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_08020AD0
|
||||
ldr r1, _08020664 @ =gUnk_080CA684
|
||||
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
|
||||
_08020664: .4byte gUnk_080CA684
|
||||
|
||||
thumb_func_start sub_08020668
|
||||
sub_08020668: @ 0x08020668
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x3f
|
||||
ldrb r0, [r2]
|
||||
cmp r0, #0x22
|
||||
bne _080206A2
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x45
|
||||
ldrb r0, [r1]
|
||||
cmp r0, #0xff
|
||||
beq _080206A2
|
||||
movs r0, #4
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0x80
|
||||
lsls r0, r0, #0xa
|
||||
str r0, [r4, #0x20]
|
||||
movs r0, #0xff
|
||||
strb r0, [r4, #0x15]
|
||||
movs r0, #1
|
||||
rsbs r0, r0, #0
|
||||
strb r0, [r1]
|
||||
movs r0, #0x23
|
||||
strb r0, [r2]
|
||||
ldrb r1, [r4, #0x14]
|
||||
adds r1, #8
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
_080206A2:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x41
|
||||
ldrb r1, [r0]
|
||||
adds r5, r0, #0
|
||||
cmp r1, #0x80
|
||||
beq _080206D0
|
||||
ldrb r0, [r4, #0xc]
|
||||
subs r0, #4
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r0, r0, #0x18
|
||||
cmp r0, #1
|
||||
bhi _080206D0
|
||||
movs r0, #4
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0xb4
|
||||
strb r0, [r4, #0xe]
|
||||
movs r0, #0xff
|
||||
strb r0, [r4, #0x15]
|
||||
ldrb r1, [r4, #0x14]
|
||||
adds r1, #0x10
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
_080206D0:
|
||||
ldrb r0, [r5]
|
||||
cmp r0, #0x93
|
||||
bne _080206DC
|
||||
adds r0, r4, #0
|
||||
bl sub_08020648
|
||||
_080206DC:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_080206E0
|
||||
sub_080206E0: @ 0x080206E0
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_08020AD0
|
||||
cmp r0, #0
|
||||
beq _080206F6
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x42
|
||||
movs r0, #0
|
||||
strb r0, [r1]
|
||||
b _08020730
|
||||
_080206F6:
|
||||
adds r0, r4, #0
|
||||
bl sub_08020B6C
|
||||
cmp r0, #0
|
||||
beq _0802072A
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x42
|
||||
ldrb r0, [r1]
|
||||
subs r0, #1
|
||||
strb r0, [r1]
|
||||
adds r5, r4, #0
|
||||
adds r5, #0x3e
|
||||
ldrb r1, [r5]
|
||||
adds r0, r4, #0
|
||||
movs r2, #0xa
|
||||
bl sub_080AE58C
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x46
|
||||
ldrh r1, [r0]
|
||||
ldrb r2, [r5]
|
||||
adds r0, r4, #0
|
||||
movs r3, #0xa
|
||||
bl sub_080AE7E8
|
||||
b _08020730
|
||||
_0802072A:
|
||||
adds r0, r4, #0
|
||||
bl sub_08001324
|
||||
_08020730:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020734
|
||||
sub_08020734: @ 0x08020734
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xd]
|
||||
cmp r0, #2
|
||||
bhi _08020764
|
||||
adds r0, r4, #0
|
||||
bl sub_0806F520
|
||||
cmp r0, #0
|
||||
bne _08020764
|
||||
movs r0, #4
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r1, [r4, #0x10]
|
||||
movs r0, #0x80
|
||||
orrs r0, r1
|
||||
strb r0, [r4, #0x10]
|
||||
movs r0, #0xff
|
||||
strb r0, [r4, #0x15]
|
||||
ldrb r1, [r4, #0x14]
|
||||
adds r1, #0x10
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
b _08020774
|
||||
_08020764:
|
||||
ldr r0, _08020778 @ =gUnk_080CA6A4
|
||||
ldrb r1, [r4, #0xd]
|
||||
lsls r1, r1, #2
|
||||
adds r1, r1, r0
|
||||
ldr r1, [r1]
|
||||
adds r0, r4, #0
|
||||
bl _call_via_r1
|
||||
_08020774:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_08020778: .4byte gUnk_080CA6A4
|
||||
|
||||
thumb_func_start sub_0802077C
|
||||
sub_0802077C: @ 0x0802077C
|
||||
movs r1, #1
|
||||
strb r1, [r0, #0xd]
|
||||
movs r1, #0x3c
|
||||
strb r1, [r0, #0x1d]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020788
|
||||
sub_08020788: @ 0x08020788
|
||||
push {lr}
|
||||
bl sub_0806F4E8
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08020790
|
||||
sub_08020790: @ 0x08020790
|
||||
push {lr}
|
||||
bl sub_0806F3E4
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08020798
|
||||
sub_08020798: @ 0x08020798
|
||||
ldrb r2, [r0, #0x10]
|
||||
movs r1, #0x7f
|
||||
ands r1, r2
|
||||
strb r1, [r0, #0x10]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start nullsub_6
|
||||
nullsub_6: @ 0x080207A4
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_080207A8
|
||||
sub_080207A8: @ 0x080207A8
|
||||
push {lr}
|
||||
movs r3, #4
|
||||
movs r1, #4
|
||||
strb r1, [r0, #0xc]
|
||||
ldrb r2, [r0, #0x10]
|
||||
movs r1, #0x80
|
||||
orrs r1, r2
|
||||
strb r1, [r0, #0x10]
|
||||
movs r1, #0x29
|
||||
adds r1, r1, r0
|
||||
mov ip, r1
|
||||
ldrb r2, [r1]
|
||||
movs r1, #8
|
||||
rsbs r1, r1, #0
|
||||
ands r1, r2
|
||||
orrs r1, r3
|
||||
mov r2, ip
|
||||
strb r1, [r2]
|
||||
adds r3, r0, #0
|
||||
adds r3, #0x3a
|
||||
ldrb r2, [r3]
|
||||
movs r1, #0xfb
|
||||
ands r1, r2
|
||||
strb r1, [r3]
|
||||
ldrb r1, [r0, #0x15]
|
||||
movs r2, #0x10
|
||||
eors r1, r2
|
||||
strb r1, [r0, #0x15]
|
||||
movs r1, #0xc0
|
||||
lsls r1, r1, #9
|
||||
str r1, [r0, #0x20]
|
||||
movs r1, #0x80
|
||||
strh r1, [r0, #0x24]
|
||||
ldrb r1, [r0, #0x14]
|
||||
adds r1, #0x10
|
||||
bl InitializeAnimation
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_080207F4
|
||||
sub_080207F4: @ 0x080207F4
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_0804A720
|
||||
movs r1, #0
|
||||
movs r0, #0x30
|
||||
strb r0, [r4, #0x16]
|
||||
movs r0, #0x12
|
||||
strb r0, [r4, #0x1c]
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x84
|
||||
strb r1, [r0]
|
||||
bl Random
|
||||
movs r1, #0x18
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x15]
|
||||
adds r0, r4, #0
|
||||
bl sub_08020A30
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020820
|
||||
sub_08020820: @ 0x08020820
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
bl GetNextFrame
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x5a
|
||||
ldrb r1, [r2]
|
||||
movs r5, #1
|
||||
adds r0, r5, #0
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _0802084A
|
||||
movs r0, #0xfe
|
||||
ands r0, r1
|
||||
strb r0, [r2]
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEF88
|
||||
cmp r0, #0
|
||||
bne _0802084A
|
||||
strb r5, [r4, #0xe]
|
||||
_0802084A:
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x5a
|
||||
ldrb r1, [r2]
|
||||
movs r0, #0x10
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08020872
|
||||
movs r0, #0xef
|
||||
ands r0, r1
|
||||
strb r0, [r2]
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08020872
|
||||
movs r0, #3
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0x3c
|
||||
strb r0, [r4, #0xe]
|
||||
_08020872:
|
||||
pop {r4, r5, pc}
|
||||
|
||||
thumb_func_start sub_08020874
|
||||
sub_08020874: @ 0x08020874
|
||||
push {lr}
|
||||
ldr r2, _08020888 @ =gUnk_080CA6BC
|
||||
ldrb r1, [r0, #0xd]
|
||||
lsls r1, r1, #2
|
||||
adds r1, r1, r2
|
||||
ldr r1, [r1]
|
||||
bl _call_via_r1
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
_08020888: .4byte gUnk_080CA6BC
|
||||
|
||||
thumb_func_start sub_0802088C
|
||||
sub_0802088C: @ 0x0802088C
|
||||
movs r1, #1
|
||||
strb r1, [r0, #0xd]
|
||||
ldrb r2, [r0, #0x10]
|
||||
movs r1, #0x7f
|
||||
ands r1, r2
|
||||
strb r1, [r0, #0x10]
|
||||
ldr r1, _080208B0 @ =gPlayerEntity
|
||||
ldrb r1, [r1, #0x14]
|
||||
adds r2, r0, #0
|
||||
adds r2, #0x85
|
||||
strb r1, [r2]
|
||||
adds r0, #0x29
|
||||
ldrb r2, [r0]
|
||||
movs r1, #0x39
|
||||
rsbs r1, r1, #0
|
||||
ands r1, r2
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080208B0: .4byte gPlayerEntity
|
||||
|
||||
thumb_func_start sub_080208B4
|
||||
sub_080208B4: @ 0x080208B4
|
||||
push {r4, r5, lr}
|
||||
adds r2, r0, #0
|
||||
adds r4, r2, #0
|
||||
adds r4, #0x85
|
||||
ldrb r0, [r4]
|
||||
ldr r5, _080208EC @ =gPlayerEntity
|
||||
ldrb r1, [r5, #0x14]
|
||||
subs r0, r0, r1
|
||||
lsrs r1, r0, #0x1f
|
||||
adds r0, r0, r1
|
||||
asrs r0, r0, #1
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r1, r0, #0x18
|
||||
cmp r0, #0
|
||||
beq _080208E6
|
||||
ldrb r0, [r2, #0x14]
|
||||
adds r0, r0, r1
|
||||
movs r1, #3
|
||||
ands r0, r1
|
||||
strb r0, [r2, #0x14]
|
||||
ldrb r1, [r2, #0x14]
|
||||
adds r1, #0x10
|
||||
adds r0, r2, #0
|
||||
bl InitializeAnimation
|
||||
_080208E6:
|
||||
ldrb r0, [r5, #0x14]
|
||||
strb r0, [r4]
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_080208EC: .4byte gPlayerEntity
|
||||
|
||||
thumb_func_start sub_080208F0
|
||||
sub_080208F0: @ 0x080208F0
|
||||
adds r0, #0x29
|
||||
ldrb r2, [r0]
|
||||
movs r1, #0x39
|
||||
rsbs r1, r1, #0
|
||||
ands r1, r2
|
||||
movs r2, #0x18
|
||||
orrs r1, r2
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020904
|
||||
sub_08020904: @ 0x08020904
|
||||
push {lr}
|
||||
movs r1, #4
|
||||
strb r1, [r0, #0xc]
|
||||
ldrb r2, [r0, #0x10]
|
||||
movs r1, #0x80
|
||||
orrs r1, r2
|
||||
strb r1, [r0, #0x10]
|
||||
movs r1, #0xff
|
||||
strb r1, [r0, #0x15]
|
||||
ldrb r1, [r0, #0x14]
|
||||
adds r1, #0x10
|
||||
bl InitializeAnimation
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08020920
|
||||
sub_08020920: @ 0x08020920
|
||||
push {lr}
|
||||
adds r1, r0, #0
|
||||
ldrb r0, [r1, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r1, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08020936
|
||||
adds r0, r1, #0
|
||||
bl sub_08020A30
|
||||
_08020936:
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08020938
|
||||
sub_08020938: @ 0x08020938
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
adds r0, #0x5a
|
||||
ldrb r1, [r0]
|
||||
movs r5, #0x80
|
||||
adds r0, r5, #0
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
bne _08020950
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
_08020950:
|
||||
movs r1, #0xa0
|
||||
lsls r1, r1, #6
|
||||
adds r0, r4, #0
|
||||
bl sub_080044EC
|
||||
cmp r0, #0
|
||||
bne _08020980
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08020978
|
||||
movs r0, #5
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r1, [r4, #0x14]
|
||||
adds r1, #0xc
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
_08020978:
|
||||
adds r0, r4, #0
|
||||
bl sub_08078930
|
||||
b _0802099C
|
||||
_08020980:
|
||||
cmp r0, #1
|
||||
bne _0802098C
|
||||
movs r0, #0x82
|
||||
lsls r0, r0, #1
|
||||
bl sub_08004488
|
||||
_0802098C:
|
||||
ldrb r1, [r4, #0x15]
|
||||
adds r0, r5, #0
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
bne _0802099C
|
||||
adds r0, r4, #0
|
||||
bl sub_080AEFE0
|
||||
_0802099C:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_080209A0
|
||||
sub_080209A0: @ 0x080209A0
|
||||
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 _080209E2
|
||||
ldrb r1, [r4, #0x10]
|
||||
movs r0, #0x80
|
||||
orrs r0, r1
|
||||
strb r0, [r4, #0x10]
|
||||
movs r0, #0x80
|
||||
lsls r0, r0, #1
|
||||
strh r0, [r4, #0x24]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x3f
|
||||
movs r0, #0x22
|
||||
strb r0, [r1]
|
||||
adds r0, r4, #0
|
||||
bl sub_08020A30
|
||||
ldrb r0, [r4, #0x14]
|
||||
lsls r0, r0, #3
|
||||
strb r0, [r4, #0x15]
|
||||
ldrb r1, [r4, #0x14]
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
b _080209F0
|
||||
_080209E2:
|
||||
movs r0, #1
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
bne _080209F0
|
||||
adds r0, r4, #0
|
||||
bl sub_08078930
|
||||
_080209F0:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_080209F4
|
||||
sub_080209F4: @ 0x080209F4
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
movs r1, #0xe0
|
||||
lsls r1, r1, #5
|
||||
bl sub_08003FC4
|
||||
cmp r0, #0
|
||||
bne _08020A14
|
||||
movs r1, #7
|
||||
movs r0, #7
|
||||
strb r0, [r4, #0xc]
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x29
|
||||
ldrb r0, [r2]
|
||||
orrs r0, r1
|
||||
strb r0, [r2]
|
||||
_08020A14:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x5a
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #0
|
||||
bne _08020A24
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
_08020A24:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08020A28
|
||||
sub_08020A28: @ 0x08020A28
|
||||
push {lr}
|
||||
bl GetNextFrame
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08020A30
|
||||
sub_08020A30: @ 0x08020A30
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
adds r5, r4, #0
|
||||
adds r5, #0x84
|
||||
ldrb r0, [r5]
|
||||
cmp r0, #1
|
||||
bhi _08020A68
|
||||
bl Random
|
||||
ldr r2, _08020A64 @ =gUnk_080CA6CC
|
||||
movs r1, #7
|
||||
ands r1, r0
|
||||
adds r1, r1, r2
|
||||
ldrb r0, [r1]
|
||||
strb r0, [r4, #0xe]
|
||||
cmp r0, #0
|
||||
bne _08020A68
|
||||
movs r0, #3
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0x3c
|
||||
strb r0, [r4, #0xe]
|
||||
ldrb r0, [r5]
|
||||
adds r0, #1
|
||||
strb r0, [r5]
|
||||
b _08020A7A
|
||||
.align 2, 0
|
||||
_08020A64: .4byte gUnk_080CA6CC
|
||||
_08020A68:
|
||||
movs r0, #0
|
||||
movs r1, #1
|
||||
strb r1, [r4, #0xc]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x84
|
||||
strb r0, [r1]
|
||||
adds r0, r4, #0
|
||||
bl sub_08020A7C
|
||||
_08020A7A:
|
||||
pop {r4, r5, pc}
|
||||
|
||||
thumb_func_start sub_08020A7C
|
||||
sub_08020A7C: @ 0x08020A7C
|
||||
push {r4, r5, r6, lr}
|
||||
adds r6, r0, #0
|
||||
bl Random
|
||||
ldrb r5, [r6, #0x15]
|
||||
ldr r4, _08020ACC @ =gUnk_080CA6D4
|
||||
movs r1, #3
|
||||
bl __modsi3
|
||||
adds r0, r0, r4
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
adds r5, r5, r0
|
||||
movs r4, #0x18
|
||||
ands r5, r4
|
||||
adds r0, r6, #0
|
||||
bl sub_08049FA0
|
||||
cmp r0, #0
|
||||
bne _08020ABA
|
||||
adds r0, r6, #0
|
||||
bl sub_08049EE4
|
||||
adds r0, #4
|
||||
ands r0, r4
|
||||
movs r1, #0x10
|
||||
eors r1, r5
|
||||
cmp r1, r0
|
||||
bne _08020ABA
|
||||
adds r5, r1, #0
|
||||
_08020ABA:
|
||||
strb r5, [r6, #0x15]
|
||||
lsrs r0, r5, #3
|
||||
strb r0, [r6, #0x14]
|
||||
ldrb r1, [r6, #0x14]
|
||||
adds r0, r6, #0
|
||||
bl InitializeAnimation
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
_08020ACC: .4byte gUnk_080CA6D4
|
||||
|
||||
thumb_func_start sub_08020AD0
|
||||
sub_08020AD0: @ 0x08020AD0
|
||||
push {r4, r5, r6, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_08020B6C
|
||||
cmp r0, #0
|
||||
beq _08020B68
|
||||
movs r1, #0x36
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, #0
|
||||
bne _08020B68
|
||||
movs r1, #0x2e
|
||||
ldrsh r0, [r4, r1]
|
||||
ldr r3, _08020B5C @ =gRoomControls
|
||||
ldrh r1, [r3, #6]
|
||||
subs r0, r0, r1
|
||||
asrs r5, r0, #4
|
||||
movs r2, #0x3f
|
||||
ands r5, r2
|
||||
movs r1, #0x32
|
||||
ldrsh r0, [r4, r1]
|
||||
ldrh r1, [r3, #8]
|
||||
subs r0, r0, r1
|
||||
asrs r0, r0, #4
|
||||
ands r0, r2
|
||||
lsls r0, r0, #6
|
||||
orrs r5, r0
|
||||
adds r6, r4, #0
|
||||
adds r6, #0x38
|
||||
ldrb r1, [r6]
|
||||
adds r0, r5, #0
|
||||
bl GetTileType
|
||||
lsls r0, r0, #0x10
|
||||
ldr r1, _08020B60 @ =0xFF8F0000
|
||||
adds r0, r0, r1
|
||||
lsrs r0, r0, #0x10
|
||||
cmp r0, #1
|
||||
bhi _08020B68
|
||||
movs r0, #6
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r1, [r4, #0x10]
|
||||
movs r0, #0x7f
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x10]
|
||||
ldrh r2, [r4, #0x2e]
|
||||
movs r1, #0x10
|
||||
rsbs r1, r1, #0
|
||||
adds r0, r1, #0
|
||||
ands r0, r2
|
||||
adds r0, #8
|
||||
strh r0, [r4, #0x2e]
|
||||
ldrh r0, [r4, #0x32]
|
||||
ands r1, r0
|
||||
adds r1, #0xd
|
||||
strh r1, [r4, #0x32]
|
||||
movs r0, #0x80
|
||||
lsls r0, r0, #0xa
|
||||
str r0, [r4, #0x20]
|
||||
ldrb r1, [r4, #0x14]
|
||||
adds r1, #0x14
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
ldr r0, _08020B64 @ =0x00004034
|
||||
ldrb r2, [r6]
|
||||
adds r1, r5, #0
|
||||
bl SetTile
|
||||
movs r0, #1
|
||||
b _08020B6A
|
||||
.align 2, 0
|
||||
_08020B5C: .4byte gRoomControls
|
||||
_08020B60: .4byte 0xFF8F0000
|
||||
_08020B64: .4byte 0x00004034
|
||||
_08020B68:
|
||||
movs r0, #0
|
||||
_08020B6A:
|
||||
pop {r4, r5, r6, pc}
|
||||
|
||||
thumb_func_start sub_08020B6C
|
||||
sub_08020B6C: @ 0x08020B6C
|
||||
push {lr}
|
||||
adds r0, #0x58
|
||||
ldrb r0, [r0]
|
||||
subs r0, #0x10
|
||||
cmp r0, #3
|
||||
bls _08020B7C
|
||||
movs r0, #0
|
||||
b _08020B7E
|
||||
_08020B7C:
|
||||
movs r0, #1
|
||||
_08020B7E:
|
||||
pop {pc}
|
|
@ -0,0 +1,41 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CA2B4:: @ 080CA2B4
|
||||
.incbin "baserom.gba", 0x0CA2B4, 0x000000A
|
||||
|
||||
gUnk_080CA2BE:: @ 080CA2BE
|
||||
.incbin "baserom.gba", 0x0CA2BE, 0x000002C
|
||||
|
||||
gUnk_080CA2EA:: @ 080CA2EA
|
||||
.incbin "baserom.gba", 0x0CA2EA, 0x0000011
|
||||
|
||||
gUnk_080CA2FB:: @ 080CA2FB
|
||||
.incbin "baserom.gba", 0x0CA2FB, 0x0000041
|
||||
|
||||
gUnk_080CA33C:: @ 080CA33C
|
||||
.incbin "baserom.gba", 0x0CA33C, 0x000001C
|
||||
|
||||
gUnk_080CA358:: @ 080CA358
|
||||
.incbin "baserom.gba", 0x0CA358, 0x000000C
|
||||
|
||||
gUnk_080CA364:: @ 080CA364
|
||||
.incbin "baserom.gba", 0x0CA364, 0x000000C
|
||||
|
||||
gUnk_080CA370:: @ 080CA370
|
||||
.incbin "baserom.gba", 0x0CA370, 0x0000041
|
||||
|
||||
gUnk_080CA3B1:: @ 080CA3B1
|
||||
.incbin "baserom.gba", 0x0CA3B1, 0x0000014
|
||||
|
||||
gUnk_080CA3C5:: @ 080CA3C5
|
||||
.incbin "baserom.gba", 0x0CA3C5, 0x0000069
|
||||
|
||||
gUnk_080CA42E:: @ 080CA42E
|
||||
.incbin "baserom.gba", 0x0CA42E, 0x0000042
|
||||
|
||||
gUnk_080CA470:: @ 080CA470
|
||||
.incbin "baserom.gba", 0x0CA470, 0x000002C
|
|
@ -0,0 +1,239 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CAB6C:: @ 080CAB6C
|
||||
.incbin "baserom.gba", 0x0CAB6C, 0x0000004
|
||||
|
||||
gUnk_080CAB70:: @ 080CAB70
|
||||
.incbin "baserom.gba", 0x0CAB70, 0x0000004
|
||||
|
||||
gUnk_080CAB74:: @ 080CAB74
|
||||
.incbin "baserom.gba", 0x0CAB74, 0x0000004
|
||||
|
||||
gUnk_080CAB78:: @ 080CAB78
|
||||
.incbin "baserom.gba", 0x0CAB78, 0x0000004
|
||||
|
||||
gUnk_080CAB7C:: @ 080CAB7C
|
||||
.incbin "baserom.gba", 0x0CAB7C, 0x0000010
|
||||
|
||||
gUnk_080CAB8C:: @ 080CAB8C
|
||||
.incbin "baserom.gba", 0x0CAB8C, 0x0000010
|
||||
|
||||
gUnk_080CAB9C:: @ 080CAB9C
|
||||
.incbin "baserom.gba", 0x0CAB9C, 0x0000010
|
||||
|
||||
gUnk_080CABAC:: @ 080CABAC
|
||||
.incbin "baserom.gba", 0x0CABAC, 0x0000010
|
||||
|
||||
gUnk_080CABBC:: @ 080CABBC
|
||||
.incbin "baserom.gba", 0x0CABBC, 0x0000004
|
||||
|
||||
gUnk_080CABC0:: @ 080CABC0
|
||||
.incbin "baserom.gba", 0x0CABC0, 0x0000004
|
||||
|
||||
gUnk_080CABC4:: @ 080CABC4
|
||||
.incbin "baserom.gba", 0x0CABC4, 0x0000004
|
||||
|
||||
gUnk_080CABC8:: @ 080CABC8
|
||||
.incbin "baserom.gba", 0x0CABC8, 0x0000004
|
||||
|
||||
gUnk_080CABCC:: @ 080CABCC
|
||||
.incbin "baserom.gba", 0x0CABCC, 0x0000019
|
||||
|
||||
gUnk_080CABE5:: @ 080CABE5
|
||||
.incbin "baserom.gba", 0x0CABE5, 0x0000019
|
||||
|
||||
gUnk_080CABFE:: @ 080CABFE
|
||||
.incbin "baserom.gba", 0x0CABFE, 0x0000019
|
||||
|
||||
gUnk_080CAC17:: @ 080CAC17
|
||||
.incbin "baserom.gba", 0x0CAC17, 0x0000019
|
||||
|
||||
gUnk_080CAC30:: @ 080CAC30
|
||||
.incbin "baserom.gba", 0x0CAC30, 0x000000C
|
||||
|
||||
gUnk_080CAC3C:: @ 080CAC3C
|
||||
.incbin "baserom.gba", 0x0CAC3C, 0x000000C
|
||||
|
||||
gUnk_080CAC48:: @ 080CAC48
|
||||
.incbin "baserom.gba", 0x0CAC48, 0x000000C
|
||||
|
||||
gUnk_080CAC54:: @ 080CAC54
|
||||
.incbin "baserom.gba", 0x0CAC54, 0x000000C
|
||||
|
||||
gUnk_080CAC60:: @ 080CAC60
|
||||
.incbin "baserom.gba", 0x0CAC60, 0x0000028
|
||||
|
||||
gUnk_080CAC88:: @ 080CAC88
|
||||
.incbin "baserom.gba", 0x0CAC88, 0x0000028
|
||||
|
||||
gUnk_080CACB0:: @ 080CACB0
|
||||
.incbin "baserom.gba", 0x0CACB0, 0x0000028
|
||||
|
||||
gUnk_080CACD8:: @ 080CACD8
|
||||
.incbin "baserom.gba", 0x0CACD8, 0x0000028
|
||||
|
||||
gUnk_080CAD00:: @ 080CAD00
|
||||
.incbin "baserom.gba", 0x0CAD00, 0x0000019
|
||||
|
||||
gUnk_080CAD19:: @ 080CAD19
|
||||
.incbin "baserom.gba", 0x0CAD19, 0x0000019
|
||||
|
||||
gUnk_080CAD32:: @ 080CAD32
|
||||
.incbin "baserom.gba", 0x0CAD32, 0x0000019
|
||||
|
||||
gUnk_080CAD4B:: @ 080CAD4B
|
||||
.incbin "baserom.gba", 0x0CAD4B, 0x0000019
|
||||
|
||||
gUnk_080CAD64:: @ 080CAD64
|
||||
.incbin "baserom.gba", 0x0CAD64, 0x000000C
|
||||
|
||||
gUnk_080CAD70:: @ 080CAD70
|
||||
.incbin "baserom.gba", 0x0CAD70, 0x000000C
|
||||
|
||||
gUnk_080CAD7C:: @ 080CAD7C
|
||||
.incbin "baserom.gba", 0x0CAD7C, 0x000000C
|
||||
|
||||
gUnk_080CAD88:: @ 080CAD88
|
||||
.incbin "baserom.gba", 0x0CAD88, 0x000000C
|
||||
|
||||
gUnk_080CAD94:: @ 080CAD94
|
||||
.incbin "baserom.gba", 0x0CAD94, 0x0000015
|
||||
|
||||
gUnk_080CADA9:: @ 080CADA9
|
||||
.incbin "baserom.gba", 0x0CADA9, 0x0000015
|
||||
|
||||
gUnk_080CADBE:: @ 080CADBE
|
||||
.incbin "baserom.gba", 0x0CADBE, 0x0000015
|
||||
|
||||
gUnk_080CADD3:: @ 080CADD3
|
||||
.incbin "baserom.gba", 0x0CADD3, 0x0000015
|
||||
|
||||
gUnk_080CADE8:: @ 080CADE8
|
||||
.incbin "baserom.gba", 0x0CADE8, 0x0000019
|
||||
|
||||
gUnk_080CAE01:: @ 080CAE01
|
||||
.incbin "baserom.gba", 0x0CAE01, 0x0000019
|
||||
|
||||
gUnk_080CAE1A:: @ 080CAE1A
|
||||
.incbin "baserom.gba", 0x0CAE1A, 0x0000019
|
||||
|
||||
gUnk_080CAE33:: @ 080CAE33
|
||||
.incbin "baserom.gba", 0x0CAE33, 0x0000019
|
||||
|
||||
gUnk_080CAE4C:: @ 080CAE4C
|
||||
.incbin "baserom.gba", 0x0CAE4C, 0x0000019
|
||||
|
||||
gUnk_080CAE65:: @ 080CAE65
|
||||
.incbin "baserom.gba", 0x0CAE65, 0x0000019
|
||||
|
||||
gUnk_080CAE7E:: @ 080CAE7E
|
||||
.incbin "baserom.gba", 0x0CAE7E, 0x0000019
|
||||
|
||||
gUnk_080CAE97:: @ 080CAE97
|
||||
.incbin "baserom.gba", 0x0CAE97, 0x0000019
|
||||
|
||||
gUnk_080CAEB0:: @ 080CAEB0
|
||||
.incbin "baserom.gba", 0x0CAEB0, 0x0000010
|
||||
|
||||
gUnk_080CAEC0:: @ 080CAEC0
|
||||
.incbin "baserom.gba", 0x0CAEC0, 0x0000010
|
||||
|
||||
gUnk_080CAED0:: @ 080CAED0
|
||||
.incbin "baserom.gba", 0x0CAED0, 0x0000010
|
||||
|
||||
gUnk_080CAEE0:: @ 080CAEE0
|
||||
.incbin "baserom.gba", 0x0CAEE0, 0x0000010
|
||||
|
||||
gUnk_080CAEF0:: @ 080CAEF0
|
||||
.incbin "baserom.gba", 0x0CAEF0, 0x0000030
|
||||
|
||||
gUnk_080CAF20:: @ 080CAF20
|
||||
.incbin "baserom.gba", 0x0CAF20, 0x0000030
|
||||
|
||||
gUnk_080CAF50:: @ 080CAF50
|
||||
.incbin "baserom.gba", 0x0CAF50, 0x0000030
|
||||
|
||||
gUnk_080CAF80:: @ 080CAF80
|
||||
.incbin "baserom.gba", 0x0CAF80, 0x0000030
|
||||
|
||||
gUnk_080CAFB0:: @ 080CAFB0
|
||||
.incbin "baserom.gba", 0x0CAFB0, 0x0000018
|
||||
|
||||
gUnk_080CAFC8:: @ 080CAFC8
|
||||
.incbin "baserom.gba", 0x0CAFC8, 0x0000018
|
||||
|
||||
gUnk_080CAFE0:: @ 080CAFE0
|
||||
.incbin "baserom.gba", 0x0CAFE0, 0x0000018
|
||||
|
||||
gUnk_080CAFF8:: @ 080CAFF8
|
||||
.incbin "baserom.gba", 0x0CAFF8, 0x0000018
|
||||
|
||||
gUnk_080CB010:: @ 080CB010
|
||||
.incbin "baserom.gba", 0x0CB010, 0x0000035
|
||||
|
||||
gUnk_080CB045:: @ 080CB045
|
||||
.incbin "baserom.gba", 0x0CB045, 0x0000035
|
||||
|
||||
gUnk_080CB07A:: @ 080CB07A
|
||||
.incbin "baserom.gba", 0x0CB07A, 0x0000035
|
||||
|
||||
gUnk_080CB0AF:: @ 080CB0AF
|
||||
.incbin "baserom.gba", 0x0CB0AF, 0x0000035
|
||||
|
||||
gUnk_080CB0E4:: @ 080CB0E4
|
||||
.incbin "baserom.gba", 0x0CB0E4, 0x0000008
|
||||
|
||||
gUnk_080CB0EC:: @ 080CB0EC
|
||||
.incbin "baserom.gba", 0x0CB0EC, 0x0000008
|
||||
|
||||
gUnk_080CB0F4:: @ 080CB0F4
|
||||
.incbin "baserom.gba", 0x0CB0F4, 0x0000008
|
||||
|
||||
gUnk_080CB0FC:: @ 080CB0FC
|
||||
.incbin "baserom.gba", 0x0CB0FC, 0x0000008
|
||||
|
||||
gUnk_080CB104:: @ 080CB104
|
||||
.incbin "baserom.gba", 0x0CB104, 0x0000070
|
||||
|
||||
gUnk_080CB174:: @ 080CB174
|
||||
.incbin "baserom.gba", 0x0CB174, 0x0000070
|
||||
|
||||
gUnk_080CB1E4:: @ 080CB1E4
|
||||
.incbin "baserom.gba", 0x0CB1E4, 0x0000070
|
||||
|
||||
gUnk_080CB254:: @ 080CB254
|
||||
.incbin "baserom.gba", 0x0CB254, 0x0000070
|
||||
|
||||
gUnk_080CB2C4:: @ 080CB2C4
|
||||
.incbin "baserom.gba", 0x0CB2C4, 0x0000034
|
||||
|
||||
gUnk_080CB2F8:: @ 080CB2F8
|
||||
.incbin "baserom.gba", 0x0CB2F8, 0x0000034
|
||||
|
||||
gUnk_080CB32C:: @ 080CB32C
|
||||
.incbin "baserom.gba", 0x0CB32C, 0x0000034
|
||||
|
||||
gUnk_080CB360:: @ 080CB360
|
||||
.incbin "baserom.gba", 0x0CB360, 0x0000034
|
||||
|
||||
gUnk_080CB394:: @ 080CB394
|
||||
.incbin "baserom.gba", 0x0CB394, 0x0000029
|
||||
|
||||
gUnk_080CB3BD:: @ 080CB3BD
|
||||
.incbin "baserom.gba", 0x0CB3BD, 0x0000029
|
||||
|
||||
gUnk_080CB3E6:: @ 080CB3E6
|
||||
.incbin "baserom.gba", 0x0CB3E6, 0x0000029
|
||||
|
||||
gUnk_080CB40F:: @ 080CB40F
|
||||
.incbin "baserom.gba", 0x0CB40F, 0x0000029
|
||||
|
||||
gUnk_080CB438:: @ 080CB438
|
||||
.incbin "baserom.gba", 0x0CB438, 0x00000C4
|
||||
|
||||
gUnk_080CB4FC:: @ 080CB4FC
|
||||
.incbin "baserom.gba", 0x0CB4FC, 0x0000074
|
|
@ -120,51 +120,3 @@ gUnk_080CA06C:: @ 080CA06C
|
|||
|
||||
gUnk_080CA11C:: @ 080CA11C
|
||||
.incbin "baserom.gba", 0x0CA11C, 0x0000014
|
||||
|
||||
gOctorok:: @ 080CA130
|
||||
.incbin "baserom.gba", 0x0CA130, 0x0000018
|
||||
|
||||
gOctorokIdle:: @ 080CA148
|
||||
.incbin "baserom.gba", 0x0CA148, 0x0000010
|
||||
|
||||
gUnk_080CA158:: @ 080CA158
|
||||
.incbin "baserom.gba", 0x0CA158, 0x0000018
|
||||
|
||||
gUnk_080CA170:: @ 080CA170
|
||||
.incbin "baserom.gba", 0x0CA170, 0x0000004
|
||||
|
||||
gUnk_080CA174:: @ 080CA174
|
||||
.incbin "baserom.gba", 0x0CA174, 0x0000002
|
||||
|
||||
gUnk_080CA176:: @ 080CA176
|
||||
.incbin "baserom.gba", 0x0CA176, 0x0000008
|
||||
|
||||
gUnk_080CA17E:: @ 080CA17E
|
||||
.incbin "baserom.gba", 0x0CA17E, 0x0000002
|
||||
|
||||
gUnk_080CA180:: @ 080CA180
|
||||
.incbin "baserom.gba", 0x0CA180, 0x0000009
|
||||
|
||||
gUnk_080CA189:: @ 080CA189
|
||||
.incbin "baserom.gba", 0x0CA189, 0x0000009
|
||||
|
||||
gUnk_080CA192:: @ 080CA192
|
||||
.incbin "baserom.gba", 0x0CA192, 0x0000009
|
||||
|
||||
gUnk_080CA19B:: @ 080CA19B
|
||||
.incbin "baserom.gba", 0x0CA19B, 0x0000009
|
||||
|
||||
gUnk_080CA1A4:: @ 080CA1A4
|
||||
.incbin "baserom.gba", 0x0CA1A4, 0x0000015
|
||||
|
||||
gUnk_080CA1B9:: @ 080CA1B9
|
||||
.incbin "baserom.gba", 0x0CA1B9, 0x0000015
|
||||
|
||||
gUnk_080CA1CE:: @ 080CA1CE
|
||||
.incbin "baserom.gba", 0x0CA1CE, 0x0000015
|
||||
|
||||
gUnk_080CA1E3:: @ 080CA1E3
|
||||
.incbin "baserom.gba", 0x0CA1E3, 0x0000015
|
||||
|
||||
gUnk_080CA1F8:: @ 080CA1F8
|
||||
.incbin "baserom.gba", 0x0CA1F8, 0x0000024
|
||||
|
|
|
@ -4,474 +4,6 @@
|
|||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CA2B4:: @ 080CA2B4
|
||||
.incbin "baserom.gba", 0x0CA2B4, 0x000000A
|
||||
|
||||
gUnk_080CA2BE:: @ 080CA2BE
|
||||
.incbin "baserom.gba", 0x0CA2BE, 0x000002C
|
||||
|
||||
gUnk_080CA2EA:: @ 080CA2EA
|
||||
.incbin "baserom.gba", 0x0CA2EA, 0x0000011
|
||||
|
||||
gUnk_080CA2FB:: @ 080CA2FB
|
||||
.incbin "baserom.gba", 0x0CA2FB, 0x0000041
|
||||
|
||||
gUnk_080CA33C:: @ 080CA33C
|
||||
.incbin "baserom.gba", 0x0CA33C, 0x000001C
|
||||
|
||||
gUnk_080CA358:: @ 080CA358
|
||||
.incbin "baserom.gba", 0x0CA358, 0x000000C
|
||||
|
||||
gUnk_080CA364:: @ 080CA364
|
||||
.incbin "baserom.gba", 0x0CA364, 0x000000C
|
||||
|
||||
gUnk_080CA370:: @ 080CA370
|
||||
.incbin "baserom.gba", 0x0CA370, 0x0000041
|
||||
|
||||
gUnk_080CA3B1:: @ 080CA3B1
|
||||
.incbin "baserom.gba", 0x0CA3B1, 0x0000014
|
||||
|
||||
gUnk_080CA3C5:: @ 080CA3C5
|
||||
.incbin "baserom.gba", 0x0CA3C5, 0x0000069
|
||||
|
||||
gUnk_080CA42E:: @ 080CA42E
|
||||
.incbin "baserom.gba", 0x0CA42E, 0x0000042
|
||||
|
||||
gUnk_080CA470:: @ 080CA470
|
||||
.incbin "baserom.gba", 0x0CA470, 0x000002C
|
||||
|
||||
gUnk_080CA49C:: @ 080CA49C
|
||||
.incbin "baserom.gba", 0x0CA49C, 0x0000018
|
||||
|
||||
gUnk_080CA4B4:: @ 080CA4B4
|
||||
.incbin "baserom.gba", 0x0CA4B4, 0x0000014
|
||||
|
||||
gUnk_080CA4C8:: @ 080CA4C8
|
||||
.incbin "baserom.gba", 0x0CA4C8, 0x0000002
|
||||
|
||||
gUnk_080CA4CA:: @ 080CA4CA
|
||||
.incbin "baserom.gba", 0x0CA4CA, 0x000000A
|
||||
|
||||
gUnk_080CA4D4:: @ 080CA4D4
|
||||
.incbin "baserom.gba", 0x0CA4D4, 0x000002C
|
||||
|
||||
gUnk_080CA500:: @ 080CA500
|
||||
.incbin "baserom.gba", 0x0CA500, 0x000001C
|
||||
|
||||
gUnk_080CA51C:: @ 080CA51C
|
||||
.incbin "baserom.gba", 0x0CA51C, 0x0000044
|
||||
|
||||
gUnk_080CA560:: @ 080CA560
|
||||
.incbin "baserom.gba", 0x0CA560, 0x0000010
|
||||
|
||||
gUnk_080CA570:: @ 080CA570
|
||||
.incbin "baserom.gba", 0x0CA570, 0x0000018
|
||||
|
||||
gUnk_080CA588:: @ 080CA588
|
||||
.incbin "baserom.gba", 0x0CA588, 0x0000008
|
||||
|
||||
gUnk_080CA590:: @ 080CA590
|
||||
.incbin "baserom.gba", 0x0CA590, 0x0000028
|
||||
|
||||
gUnk_080CA5B8:: @ 080CA5B8
|
||||
.incbin "baserom.gba", 0x0CA5B8, 0x0000004
|
||||
|
||||
gUnk_080CA5BC:: @ 080CA5BC
|
||||
.incbin "baserom.gba", 0x0CA5BC, 0x0000018
|
||||
|
||||
gUnk_080CA5D4:: @ 080CA5D4
|
||||
.incbin "baserom.gba", 0x0CA5D4, 0x0000002
|
||||
|
||||
gUnk_080CA5D6:: @ 080CA5D6
|
||||
.incbin "baserom.gba", 0x0CA5D6, 0x0000011
|
||||
|
||||
gUnk_080CA5E7:: @ 080CA5E7
|
||||
.incbin "baserom.gba", 0x0CA5E7, 0x0000011
|
||||
|
||||
gUnk_080CA5F8:: @ 080CA5F8
|
||||
.incbin "baserom.gba", 0x0CA5F8, 0x000001D
|
||||
|
||||
gUnk_080CA615:: @ 080CA615
|
||||
.incbin "baserom.gba", 0x0CA615, 0x0000011
|
||||
|
||||
gUnk_080CA626:: @ 080CA626
|
||||
.incbin "baserom.gba", 0x0CA626, 0x0000014
|
||||
|
||||
gUnk_080CA63A:: @ 080CA63A
|
||||
.incbin "baserom.gba", 0x0CA63A, 0x0000016
|
||||
|
||||
gUnk_080CA650:: @ 080CA650
|
||||
.incbin "baserom.gba", 0x0CA650, 0x000001C
|
||||
|
||||
gUnk_080CA66C:: @ 080CA66C
|
||||
.incbin "baserom.gba", 0x0CA66C, 0x0000018
|
||||
|
||||
gUnk_080CA684:: @ 080CA684
|
||||
.incbin "baserom.gba", 0x0CA684, 0x0000020
|
||||
|
||||
gUnk_080CA6A4:: @ 080CA6A4
|
||||
.incbin "baserom.gba", 0x0CA6A4, 0x0000018
|
||||
|
||||
gUnk_080CA6BC:: @ 080CA6BC
|
||||
.incbin "baserom.gba", 0x0CA6BC, 0x0000010
|
||||
|
||||
gUnk_080CA6CC:: @ 080CA6CC
|
||||
.incbin "baserom.gba", 0x0CA6CC, 0x0000008
|
||||
|
||||
gUnk_080CA6D4:: @ 080CA6D4
|
||||
.incbin "baserom.gba", 0x0CA6D4, 0x0000003
|
||||
|
||||
gUnk_080CA6D7:: @ 080CA6D7
|
||||
.incbin "baserom.gba", 0x0CA6D7, 0x0000021
|
||||
|
||||
gUnk_080CA6F8:: @ 080CA6F8
|
||||
.incbin "baserom.gba", 0x0CA6F8, 0x0000021
|
||||
|
||||
gUnk_080CA719:: @ 080CA719
|
||||
.incbin "baserom.gba", 0x0CA719, 0x0000021
|
||||
|
||||
gUnk_080CA73A:: @ 080CA73A
|
||||
.incbin "baserom.gba", 0x0CA73A, 0x0000021
|
||||
|
||||
gUnk_080CA75B:: @ 080CA75B
|
||||
.incbin "baserom.gba", 0x0CA75B, 0x0000011
|
||||
|
||||
gUnk_080CA76C:: @ 080CA76C
|
||||
.incbin "baserom.gba", 0x0CA76C, 0x0000011
|
||||
|
||||
gUnk_080CA77D:: @ 080CA77D
|
||||
.incbin "baserom.gba", 0x0CA77D, 0x0000011
|
||||
|
||||
gUnk_080CA78E:: @ 080CA78E
|
||||
.incbin "baserom.gba", 0x0CA78E, 0x0000011
|
||||
|
||||
gUnk_080CA79F:: @ 080CA79F
|
||||
.incbin "baserom.gba", 0x0CA79F, 0x0000058
|
||||
|
||||
gUnk_080CA7F7:: @ 080CA7F7
|
||||
.incbin "baserom.gba", 0x0CA7F7, 0x0000058
|
||||
|
||||
gUnk_080CA84F:: @ 080CA84F
|
||||
.incbin "baserom.gba", 0x0CA84F, 0x0000058
|
||||
|
||||
gUnk_080CA8A7:: @ 080CA8A7
|
||||
.incbin "baserom.gba", 0x0CA8A7, 0x0000058
|
||||
|
||||
gUnk_080CA8FF:: @ 080CA8FF
|
||||
.incbin "baserom.gba", 0x0CA8FF, 0x0000008
|
||||
|
||||
gUnk_080CA907:: @ 080CA907
|
||||
.incbin "baserom.gba", 0x0CA907, 0x0000008
|
||||
|
||||
gUnk_080CA90F:: @ 080CA90F
|
||||
.incbin "baserom.gba", 0x0CA90F, 0x0000008
|
||||
|
||||
gUnk_080CA917:: @ 080CA917
|
||||
.incbin "baserom.gba", 0x0CA917, 0x0000008
|
||||
|
||||
gUnk_080CA91F:: @ 080CA91F
|
||||
.incbin "baserom.gba", 0x0CA91F, 0x0000004
|
||||
|
||||
gUnk_080CA923:: @ 080CA923
|
||||
.incbin "baserom.gba", 0x0CA923, 0x0000004
|
||||
|
||||
gUnk_080CA927:: @ 080CA927
|
||||
.incbin "baserom.gba", 0x0CA927, 0x0000004
|
||||
|
||||
gUnk_080CA92B:: @ 080CA92B
|
||||
.incbin "baserom.gba", 0x0CA92B, 0x0000004
|
||||
|
||||
gUnk_080CA92F:: @ 080CA92F
|
||||
.incbin "baserom.gba", 0x0CA92F, 0x0000041
|
||||
|
||||
gUnk_080CA970:: @ 080CA970
|
||||
.incbin "baserom.gba", 0x0CA970, 0x0000041
|
||||
|
||||
gUnk_080CA9B1:: @ 080CA9B1
|
||||
.incbin "baserom.gba", 0x0CA9B1, 0x0000041
|
||||
|
||||
gUnk_080CA9F2:: @ 080CA9F2
|
||||
.incbin "baserom.gba", 0x0CA9F2, 0x0000042
|
||||
|
||||
gUnk_080CAA34:: @ 080CAA34
|
||||
.incbin "baserom.gba", 0x0CAA34, 0x0000064
|
||||
|
||||
gUnk_080CAA98:: @ 080CAA98
|
||||
.incbin "baserom.gba", 0x0CAA98, 0x0000018
|
||||
|
||||
gUnk_080CAAB0:: @ 080CAAB0
|
||||
.incbin "baserom.gba", 0x0CAAB0, 0x0000050
|
||||
|
||||
gUnk_080CAB00:: @ 080CAB00
|
||||
.incbin "baserom.gba", 0x0CAB00, 0x0000004
|
||||
|
||||
gUnk_080CAB04:: @ 080CAB04
|
||||
.incbin "baserom.gba", 0x0CAB04, 0x0000004
|
||||
|
||||
gUnk_080CAB08:: @ 080CAB08
|
||||
.incbin "baserom.gba", 0x0CAB08, 0x0000004
|
||||
|
||||
gUnk_080CAB0C:: @ 080CAB0C
|
||||
.incbin "baserom.gba", 0x0CAB0C, 0x0000004
|
||||
|
||||
gUnk_080CAB10:: @ 080CAB10
|
||||
.incbin "baserom.gba", 0x0CAB10, 0x0000004
|
||||
|
||||
gUnk_080CAB14:: @ 080CAB14
|
||||
.incbin "baserom.gba", 0x0CAB14, 0x0000026
|
||||
|
||||
gUnk_080CAB3A:: @ 080CAB3A
|
||||
.incbin "baserom.gba", 0x0CAB3A, 0x0000008
|
||||
|
||||
gUnk_080CAB42:: @ 080CAB42
|
||||
.incbin "baserom.gba", 0x0CAB42, 0x0000008
|
||||
|
||||
gUnk_080CAB4A:: @ 080CAB4A
|
||||
.incbin "baserom.gba", 0x0CAB4A, 0x0000008
|
||||
|
||||
gUnk_080CAB52:: @ 080CAB52
|
||||
.incbin "baserom.gba", 0x0CAB52, 0x0000006
|
||||
|
||||
gUnk_080CAB58:: @ 080CAB58
|
||||
.incbin "baserom.gba", 0x0CAB58, 0x0000010
|
||||
|
||||
gUnk_080CAB68:: @ 080CAB68
|
||||
.incbin "baserom.gba", 0x0CAB68, 0x0000004
|
||||
|
||||
gUnk_080CAB6C:: @ 080CAB6C
|
||||
.incbin "baserom.gba", 0x0CAB6C, 0x0000004
|
||||
|
||||
gUnk_080CAB70:: @ 080CAB70
|
||||
.incbin "baserom.gba", 0x0CAB70, 0x0000004
|
||||
|
||||
gUnk_080CAB74:: @ 080CAB74
|
||||
.incbin "baserom.gba", 0x0CAB74, 0x0000004
|
||||
|
||||
gUnk_080CAB78:: @ 080CAB78
|
||||
.incbin "baserom.gba", 0x0CAB78, 0x0000004
|
||||
|
||||
gUnk_080CAB7C:: @ 080CAB7C
|
||||
.incbin "baserom.gba", 0x0CAB7C, 0x0000010
|
||||
|
||||
gUnk_080CAB8C:: @ 080CAB8C
|
||||
.incbin "baserom.gba", 0x0CAB8C, 0x0000010
|
||||
|
||||
gUnk_080CAB9C:: @ 080CAB9C
|
||||
.incbin "baserom.gba", 0x0CAB9C, 0x0000010
|
||||
|
||||
gUnk_080CABAC:: @ 080CABAC
|
||||
.incbin "baserom.gba", 0x0CABAC, 0x0000010
|
||||
|
||||
gUnk_080CABBC:: @ 080CABBC
|
||||
.incbin "baserom.gba", 0x0CABBC, 0x0000004
|
||||
|
||||
gUnk_080CABC0:: @ 080CABC0
|
||||
.incbin "baserom.gba", 0x0CABC0, 0x0000004
|
||||
|
||||
gUnk_080CABC4:: @ 080CABC4
|
||||
.incbin "baserom.gba", 0x0CABC4, 0x0000004
|
||||
|
||||
gUnk_080CABC8:: @ 080CABC8
|
||||
.incbin "baserom.gba", 0x0CABC8, 0x0000004
|
||||
|
||||
gUnk_080CABCC:: @ 080CABCC
|
||||
.incbin "baserom.gba", 0x0CABCC, 0x0000019
|
||||
|
||||
gUnk_080CABE5:: @ 080CABE5
|
||||
.incbin "baserom.gba", 0x0CABE5, 0x0000019
|
||||
|
||||
gUnk_080CABFE:: @ 080CABFE
|
||||
.incbin "baserom.gba", 0x0CABFE, 0x0000019
|
||||
|
||||
gUnk_080CAC17:: @ 080CAC17
|
||||
.incbin "baserom.gba", 0x0CAC17, 0x0000019
|
||||
|
||||
gUnk_080CAC30:: @ 080CAC30
|
||||
.incbin "baserom.gba", 0x0CAC30, 0x000000C
|
||||
|
||||
gUnk_080CAC3C:: @ 080CAC3C
|
||||
.incbin "baserom.gba", 0x0CAC3C, 0x000000C
|
||||
|
||||
gUnk_080CAC48:: @ 080CAC48
|
||||
.incbin "baserom.gba", 0x0CAC48, 0x000000C
|
||||
|
||||
gUnk_080CAC54:: @ 080CAC54
|
||||
.incbin "baserom.gba", 0x0CAC54, 0x000000C
|
||||
|
||||
gUnk_080CAC60:: @ 080CAC60
|
||||
.incbin "baserom.gba", 0x0CAC60, 0x0000028
|
||||
|
||||
gUnk_080CAC88:: @ 080CAC88
|
||||
.incbin "baserom.gba", 0x0CAC88, 0x0000028
|
||||
|
||||
gUnk_080CACB0:: @ 080CACB0
|
||||
.incbin "baserom.gba", 0x0CACB0, 0x0000028
|
||||
|
||||
gUnk_080CACD8:: @ 080CACD8
|
||||
.incbin "baserom.gba", 0x0CACD8, 0x0000028
|
||||
|
||||
gUnk_080CAD00:: @ 080CAD00
|
||||
.incbin "baserom.gba", 0x0CAD00, 0x0000019
|
||||
|
||||
gUnk_080CAD19:: @ 080CAD19
|
||||
.incbin "baserom.gba", 0x0CAD19, 0x0000019
|
||||
|
||||
gUnk_080CAD32:: @ 080CAD32
|
||||
.incbin "baserom.gba", 0x0CAD32, 0x0000019
|
||||
|
||||
gUnk_080CAD4B:: @ 080CAD4B
|
||||
.incbin "baserom.gba", 0x0CAD4B, 0x0000019
|
||||
|
||||
gUnk_080CAD64:: @ 080CAD64
|
||||
.incbin "baserom.gba", 0x0CAD64, 0x000000C
|
||||
|
||||
gUnk_080CAD70:: @ 080CAD70
|
||||
.incbin "baserom.gba", 0x0CAD70, 0x000000C
|
||||
|
||||
gUnk_080CAD7C:: @ 080CAD7C
|
||||
.incbin "baserom.gba", 0x0CAD7C, 0x000000C
|
||||
|
||||
gUnk_080CAD88:: @ 080CAD88
|
||||
.incbin "baserom.gba", 0x0CAD88, 0x000000C
|
||||
|
||||
gUnk_080CAD94:: @ 080CAD94
|
||||
.incbin "baserom.gba", 0x0CAD94, 0x0000015
|
||||
|
||||
gUnk_080CADA9:: @ 080CADA9
|
||||
.incbin "baserom.gba", 0x0CADA9, 0x0000015
|
||||
|
||||
gUnk_080CADBE:: @ 080CADBE
|
||||
.incbin "baserom.gba", 0x0CADBE, 0x0000015
|
||||
|
||||
gUnk_080CADD3:: @ 080CADD3
|
||||
.incbin "baserom.gba", 0x0CADD3, 0x0000015
|
||||
|
||||
gUnk_080CADE8:: @ 080CADE8
|
||||
.incbin "baserom.gba", 0x0CADE8, 0x0000019
|
||||
|
||||
gUnk_080CAE01:: @ 080CAE01
|
||||
.incbin "baserom.gba", 0x0CAE01, 0x0000019
|
||||
|
||||
gUnk_080CAE1A:: @ 080CAE1A
|
||||
.incbin "baserom.gba", 0x0CAE1A, 0x0000019
|
||||
|
||||
gUnk_080CAE33:: @ 080CAE33
|
||||
.incbin "baserom.gba", 0x0CAE33, 0x0000019
|
||||
|
||||
gUnk_080CAE4C:: @ 080CAE4C
|
||||
.incbin "baserom.gba", 0x0CAE4C, 0x0000019
|
||||
|
||||
gUnk_080CAE65:: @ 080CAE65
|
||||
.incbin "baserom.gba", 0x0CAE65, 0x0000019
|
||||
|
||||
gUnk_080CAE7E:: @ 080CAE7E
|
||||
.incbin "baserom.gba", 0x0CAE7E, 0x0000019
|
||||
|
||||
gUnk_080CAE97:: @ 080CAE97
|
||||
.incbin "baserom.gba", 0x0CAE97, 0x0000019
|
||||
|
||||
gUnk_080CAEB0:: @ 080CAEB0
|
||||
.incbin "baserom.gba", 0x0CAEB0, 0x0000010
|
||||
|
||||
gUnk_080CAEC0:: @ 080CAEC0
|
||||
.incbin "baserom.gba", 0x0CAEC0, 0x0000010
|
||||
|
||||
gUnk_080CAED0:: @ 080CAED0
|
||||
.incbin "baserom.gba", 0x0CAED0, 0x0000010
|
||||
|
||||
gUnk_080CAEE0:: @ 080CAEE0
|
||||
.incbin "baserom.gba", 0x0CAEE0, 0x0000010
|
||||
|
||||
gUnk_080CAEF0:: @ 080CAEF0
|
||||
.incbin "baserom.gba", 0x0CAEF0, 0x0000030
|
||||
|
||||
gUnk_080CAF20:: @ 080CAF20
|
||||
.incbin "baserom.gba", 0x0CAF20, 0x0000030
|
||||
|
||||
gUnk_080CAF50:: @ 080CAF50
|
||||
.incbin "baserom.gba", 0x0CAF50, 0x0000030
|
||||
|
||||
gUnk_080CAF80:: @ 080CAF80
|
||||
.incbin "baserom.gba", 0x0CAF80, 0x0000030
|
||||
|
||||
gUnk_080CAFB0:: @ 080CAFB0
|
||||
.incbin "baserom.gba", 0x0CAFB0, 0x0000018
|
||||
|
||||
gUnk_080CAFC8:: @ 080CAFC8
|
||||
.incbin "baserom.gba", 0x0CAFC8, 0x0000018
|
||||
|
||||
gUnk_080CAFE0:: @ 080CAFE0
|
||||
.incbin "baserom.gba", 0x0CAFE0, 0x0000018
|
||||
|
||||
gUnk_080CAFF8:: @ 080CAFF8
|
||||
.incbin "baserom.gba", 0x0CAFF8, 0x0000018
|
||||
|
||||
gUnk_080CB010:: @ 080CB010
|
||||
.incbin "baserom.gba", 0x0CB010, 0x0000035
|
||||
|
||||
gUnk_080CB045:: @ 080CB045
|
||||
.incbin "baserom.gba", 0x0CB045, 0x0000035
|
||||
|
||||
gUnk_080CB07A:: @ 080CB07A
|
||||
.incbin "baserom.gba", 0x0CB07A, 0x0000035
|
||||
|
||||
gUnk_080CB0AF:: @ 080CB0AF
|
||||
.incbin "baserom.gba", 0x0CB0AF, 0x0000035
|
||||
|
||||
gUnk_080CB0E4:: @ 080CB0E4
|
||||
.incbin "baserom.gba", 0x0CB0E4, 0x0000008
|
||||
|
||||
gUnk_080CB0EC:: @ 080CB0EC
|
||||
.incbin "baserom.gba", 0x0CB0EC, 0x0000008
|
||||
|
||||
gUnk_080CB0F4:: @ 080CB0F4
|
||||
.incbin "baserom.gba", 0x0CB0F4, 0x0000008
|
||||
|
||||
gUnk_080CB0FC:: @ 080CB0FC
|
||||
.incbin "baserom.gba", 0x0CB0FC, 0x0000008
|
||||
|
||||
gUnk_080CB104:: @ 080CB104
|
||||
.incbin "baserom.gba", 0x0CB104, 0x0000070
|
||||
|
||||
gUnk_080CB174:: @ 080CB174
|
||||
.incbin "baserom.gba", 0x0CB174, 0x0000070
|
||||
|
||||
gUnk_080CB1E4:: @ 080CB1E4
|
||||
.incbin "baserom.gba", 0x0CB1E4, 0x0000070
|
||||
|
||||
gUnk_080CB254:: @ 080CB254
|
||||
.incbin "baserom.gba", 0x0CB254, 0x0000070
|
||||
|
||||
gUnk_080CB2C4:: @ 080CB2C4
|
||||
.incbin "baserom.gba", 0x0CB2C4, 0x0000034
|
||||
|
||||
gUnk_080CB2F8:: @ 080CB2F8
|
||||
.incbin "baserom.gba", 0x0CB2F8, 0x0000034
|
||||
|
||||
gUnk_080CB32C:: @ 080CB32C
|
||||
.incbin "baserom.gba", 0x0CB32C, 0x0000034
|
||||
|
||||
gUnk_080CB360:: @ 080CB360
|
||||
.incbin "baserom.gba", 0x0CB360, 0x0000034
|
||||
|
||||
gUnk_080CB394:: @ 080CB394
|
||||
.incbin "baserom.gba", 0x0CB394, 0x0000029
|
||||
|
||||
gUnk_080CB3BD:: @ 080CB3BD
|
||||
.incbin "baserom.gba", 0x0CB3BD, 0x0000029
|
||||
|
||||
gUnk_080CB3E6:: @ 080CB3E6
|
||||
.incbin "baserom.gba", 0x0CB3E6, 0x0000029
|
||||
|
||||
gUnk_080CB40F:: @ 080CB40F
|
||||
.incbin "baserom.gba", 0x0CB40F, 0x0000029
|
||||
|
||||
gUnk_080CB438:: @ 080CB438
|
||||
.incbin "baserom.gba", 0x0CB438, 0x00000C4
|
||||
|
||||
gUnk_080CB4FC:: @ 080CB4FC
|
||||
.incbin "baserom.gba", 0x0CB4FC, 0x0000074
|
||||
|
||||
gUnk_080CB570:: @ 080CB570
|
||||
.incbin "baserom.gba", 0x0CB570, 0x0000018
|
||||
|
||||
|
@ -6032,4 +5564,4 @@ gUnk_080D3BC8:: @ 080D3BC8
|
|||
.incbin "baserom.gba", 0x0D3BC8, 0x0000020
|
||||
|
||||
gUnk_080D3BE8:: @ 080D3BE8
|
||||
.incbin "baserom.gba", 0x0D3BE8, 0x0000010
|
||||
.incbin "baserom.gba", 0x0D3BE8, 0x0000010
|
|
@ -0,0 +1,17 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CA4D4:: @ 080CA4D4
|
||||
.incbin "baserom.gba", 0x0CA4D4, 0x000002C
|
||||
|
||||
gUnk_080CA500:: @ 080CA500
|
||||
.incbin "baserom.gba", 0x0CA500, 0x000001C
|
||||
|
||||
gUnk_080CA51C:: @ 080CA51C
|
||||
.incbin "baserom.gba", 0x0CA51C, 0x0000044
|
||||
|
||||
gUnk_080CA560:: @ 080CA560
|
||||
.incbin "baserom.gba", 0x0CA560, 0x0000010
|
|
@ -0,0 +1,32 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CA180:: @ 080CA180
|
||||
.incbin "baserom.gba", 0x0CA180, 0x0000009
|
||||
|
||||
gUnk_080CA189:: @ 080CA189
|
||||
.incbin "baserom.gba", 0x0CA189, 0x0000009
|
||||
|
||||
gUnk_080CA192:: @ 080CA192
|
||||
.incbin "baserom.gba", 0x0CA192, 0x0000009
|
||||
|
||||
gUnk_080CA19B:: @ 080CA19B
|
||||
.incbin "baserom.gba", 0x0CA19B, 0x0000009
|
||||
|
||||
gUnk_080CA1A4:: @ 080CA1A4
|
||||
.incbin "baserom.gba", 0x0CA1A4, 0x0000015
|
||||
|
||||
gUnk_080CA1B9:: @ 080CA1B9
|
||||
.incbin "baserom.gba", 0x0CA1B9, 0x0000015
|
||||
|
||||
gUnk_080CA1CE:: @ 080CA1CE
|
||||
.incbin "baserom.gba", 0x0CA1CE, 0x0000015
|
||||
|
||||
gUnk_080CA1E3:: @ 080CA1E3
|
||||
.incbin "baserom.gba", 0x0CA1E3, 0x0000015
|
||||
|
||||
gUnk_080CA1F8:: @ 080CA1F8
|
||||
.incbin "baserom.gba", 0x0CA1F8, 0x0000024
|
|
@ -0,0 +1,29 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CA5D4:: @ 080CA5D4
|
||||
.incbin "baserom.gba", 0x0CA5D4, 0x0000002
|
||||
|
||||
gUnk_080CA5D6:: @ 080CA5D6
|
||||
.incbin "baserom.gba", 0x0CA5D6, 0x0000011
|
||||
|
||||
gUnk_080CA5E7:: @ 080CA5E7
|
||||
.incbin "baserom.gba", 0x0CA5E7, 0x0000011
|
||||
|
||||
gUnk_080CA5F8:: @ 080CA5F8
|
||||
.incbin "baserom.gba", 0x0CA5F8, 0x000001D
|
||||
|
||||
gUnk_080CA615:: @ 080CA615
|
||||
.incbin "baserom.gba", 0x0CA615, 0x0000011
|
||||
|
||||
gUnk_080CA626:: @ 080CA626
|
||||
.incbin "baserom.gba", 0x0CA626, 0x0000014
|
||||
|
||||
gUnk_080CA63A:: @ 080CA63A
|
||||
.incbin "baserom.gba", 0x0CA63A, 0x0000016
|
||||
|
||||
gUnk_080CA650:: @ 080CA650
|
||||
.incbin "baserom.gba", 0x0CA650, 0x000001C
|
|
@ -0,0 +1,83 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CA6D4:: @ 080CA6D4
|
||||
.incbin "baserom.gba", 0x0CA6D4, 0x0000003
|
||||
|
||||
gUnk_080CA6D7:: @ 080CA6D7
|
||||
.incbin "baserom.gba", 0x0CA6D7, 0x0000021
|
||||
|
||||
gUnk_080CA6F8:: @ 080CA6F8
|
||||
.incbin "baserom.gba", 0x0CA6F8, 0x0000021
|
||||
|
||||
gUnk_080CA719:: @ 080CA719
|
||||
.incbin "baserom.gba", 0x0CA719, 0x0000021
|
||||
|
||||
gUnk_080CA73A:: @ 080CA73A
|
||||
.incbin "baserom.gba", 0x0CA73A, 0x0000021
|
||||
|
||||
gUnk_080CA75B:: @ 080CA75B
|
||||
.incbin "baserom.gba", 0x0CA75B, 0x0000011
|
||||
|
||||
gUnk_080CA76C:: @ 080CA76C
|
||||
.incbin "baserom.gba", 0x0CA76C, 0x0000011
|
||||
|
||||
gUnk_080CA77D:: @ 080CA77D
|
||||
.incbin "baserom.gba", 0x0CA77D, 0x0000011
|
||||
|
||||
gUnk_080CA78E:: @ 080CA78E
|
||||
.incbin "baserom.gba", 0x0CA78E, 0x0000011
|
||||
|
||||
gUnk_080CA79F:: @ 080CA79F
|
||||
.incbin "baserom.gba", 0x0CA79F, 0x0000058
|
||||
|
||||
gUnk_080CA7F7:: @ 080CA7F7
|
||||
.incbin "baserom.gba", 0x0CA7F7, 0x0000058
|
||||
|
||||
gUnk_080CA84F:: @ 080CA84F
|
||||
.incbin "baserom.gba", 0x0CA84F, 0x0000058
|
||||
|
||||
gUnk_080CA8A7:: @ 080CA8A7
|
||||
.incbin "baserom.gba", 0x0CA8A7, 0x0000058
|
||||
|
||||
gUnk_080CA8FF:: @ 080CA8FF
|
||||
.incbin "baserom.gba", 0x0CA8FF, 0x0000008
|
||||
|
||||
gUnk_080CA907:: @ 080CA907
|
||||
.incbin "baserom.gba", 0x0CA907, 0x0000008
|
||||
|
||||
gUnk_080CA90F:: @ 080CA90F
|
||||
.incbin "baserom.gba", 0x0CA90F, 0x0000008
|
||||
|
||||
gUnk_080CA917:: @ 080CA917
|
||||
.incbin "baserom.gba", 0x0CA917, 0x0000008
|
||||
|
||||
gUnk_080CA91F:: @ 080CA91F
|
||||
.incbin "baserom.gba", 0x0CA91F, 0x0000004
|
||||
|
||||
gUnk_080CA923:: @ 080CA923
|
||||
.incbin "baserom.gba", 0x0CA923, 0x0000004
|
||||
|
||||
gUnk_080CA927:: @ 080CA927
|
||||
.incbin "baserom.gba", 0x0CA927, 0x0000004
|
||||
|
||||
gUnk_080CA92B:: @ 080CA92B
|
||||
.incbin "baserom.gba", 0x0CA92B, 0x0000004
|
||||
|
||||
gUnk_080CA92F:: @ 080CA92F
|
||||
.incbin "baserom.gba", 0x0CA92F, 0x0000041
|
||||
|
||||
gUnk_080CA970:: @ 080CA970
|
||||
.incbin "baserom.gba", 0x0CA970, 0x0000041
|
||||
|
||||
gUnk_080CA9B1:: @ 080CA9B1
|
||||
.incbin "baserom.gba", 0x0CA9B1, 0x0000041
|
||||
|
||||
gUnk_080CA9F2:: @ 080CA9F2
|
||||
.incbin "baserom.gba", 0x0CA9F2, 0x0000042
|
||||
|
||||
gUnk_080CAA34:: @ 080CAA34
|
||||
.incbin "baserom.gba", 0x0CAA34, 0x0000064
|
|
@ -44,12 +44,12 @@ typedef struct Entity {
|
|||
/*0x18*/ union {
|
||||
/* */ u8 raw;
|
||||
/* */ struct {
|
||||
/* */ u8 draw : 2; // 1-2
|
||||
/* */ u8 ss2 : 1; // 4
|
||||
/* */ u8 ss3 : 1; // 8
|
||||
/* */ u8 shadow : 2; //0x10-0x20
|
||||
/* */ u8 flipX : 1; //0x40
|
||||
/* */ u8 flipY : 1; //0x80
|
||||
/* */ u32 draw : 2; // 1-2
|
||||
/* */ u32 ss2 : 1; // 4
|
||||
/* */ u32 ss3 : 1; // 8
|
||||
/* */ u32 shadow : 2; //0x10-0x20
|
||||
/* */ u32 flipX : 1; //0x40
|
||||
/* */ u32 flipY : 1; //0x80
|
||||
/* */ } PACKED b;
|
||||
/* */ } PACKED spriteSettings;
|
||||
/*0x19*/ struct {
|
||||
|
@ -100,7 +100,7 @@ typedef struct Entity {
|
|||
/*0x43*/ u8 field_0x43;
|
||||
/*0x44*/ u8 field_0x44;
|
||||
/*0x45*/ u8 currentHealth;
|
||||
/*0x46*/ s16 field_0x46;
|
||||
/*0x46*/ u16 field_0x46;
|
||||
/*0x48*/ BoundingBox* boundingBox;
|
||||
/*0x4c*/ u8 field_0x4c;
|
||||
/*0x4d*/ u8 field_0x4d;
|
||||
|
|
|
@ -60,7 +60,7 @@ extern void sub_080791D0();
|
|||
extern void sub_0805EC9C();
|
||||
extern void sub_0805EC60();
|
||||
extern void sub_080873D0();
|
||||
extern u8 sub_080045D4(s16, s16, u16, u16);
|
||||
extern u8 sub_080045D4(s16, s16, u32, u32);
|
||||
extern void sub_0806F69C(Entity*);
|
||||
extern void sub_0805E3A0(void*, u32);
|
||||
extern void sub_0806D0B0(Entity*);
|
||||
|
@ -186,6 +186,7 @@ extern void sub_080A4398(void);
|
|||
extern void sub_0801E738(u32);
|
||||
extern void sub_080A70AC(const void*);
|
||||
extern void sub_080A7114(u32);
|
||||
extern void sub_08001324(Entity*);
|
||||
extern void sub_08001242(Entity*);
|
||||
extern u32 sub_08003FC4(Entity*, u32);
|
||||
extern u32 sub_080043E8(Entity*);
|
||||
|
|
20
linker.ld
20
linker.ld
|
@ -328,9 +328,9 @@ SECTIONS {
|
|||
src/enemy/octorok.o(.text);
|
||||
src/enemy/chuchu.o(.text);
|
||||
src/enemy/leever.o(.text);
|
||||
asm/peahat.o(.text);
|
||||
asm/rollobite.o(.text);
|
||||
asm/darkNut.o(.text);
|
||||
src/enemy/peahat.o(.text);
|
||||
src/enemy/rollobite.o(.text);
|
||||
src/enemy/darkNut.o(.text);
|
||||
src/enemy/hangingSeed.o(.text);
|
||||
asm/beetle.o(.text);
|
||||
src/enemy/keese.o(.text);
|
||||
|
@ -857,7 +857,6 @@ SECTIONS {
|
|||
src/object/metalDoor.o(.text);
|
||||
src/object/jailBars.o(.text);
|
||||
src/object/objectB2.o(.text);
|
||||
asm/objectB2.o(.text);
|
||||
asm/objectB3.o(.text);
|
||||
asm/objectB4.o(.text);
|
||||
asm/objectB5.o(.text);
|
||||
|
@ -906,8 +905,19 @@ SECTIONS {
|
|||
data/data_080B3740.o(.rodata);
|
||||
src/trig.o(.rodata);
|
||||
data/data_080C93E0.o(.rodata);
|
||||
src/enemy/octorok.o(.rodata);
|
||||
data/octorokAnimations.o(.rodata);
|
||||
src/enemy/chuchu.o(.rodata);
|
||||
data/data_080CA2B4.o(.rodata);
|
||||
data/chuchuAnimations.o(.rodata);
|
||||
src/enemy/leever.o(.rodata);
|
||||
data/leeverAnimations.o(.rodata);
|
||||
src/enemy/peahat.o(.rodata);
|
||||
data/peahatAnimations.o(.rodata);
|
||||
src/enemy/rollobite.o(.rodata);
|
||||
data/rollobiteAnimations.o(.rodata);
|
||||
src/enemy/darkNut.o(.rodata);
|
||||
data/darkNutAnimations.o(.rodata);
|
||||
data/data_080CB570.o(.rodata);
|
||||
src/enemy.o(.rodata);
|
||||
data/data_080D3D94.o(.rodata);
|
||||
data/areaPropertyLists.o(.rodata);
|
||||
|
|
|
@ -32,7 +32,7 @@ Entity* CreateObjectWithParent(Entity* parentEnt, u32 subtype, u32 form, u32 par
|
|||
}
|
||||
|
||||
Entity* CreateFx(Entity* parentEnt, u32 form, u32 parameter) {
|
||||
CreateObjectWithParent(parentEnt, 0xf, form, parameter);
|
||||
return CreateObjectWithParent(parentEnt, 0xf, form, parameter);
|
||||
}
|
||||
|
||||
void CreateDust(Entity* parent) {
|
||||
|
|
|
@ -411,9 +411,9 @@ void sub_08032008(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->direction & 0xf) {
|
||||
this->spriteSettings.b.flipX = !(!(this->direction & 0x10) ^ 1);
|
||||
}
|
||||
if (this->direction & 0xf)
|
||||
this->spriteSettings.b.flipX = (this->direction >> 4 ^ 1);
|
||||
|
||||
|
||||
sub_080AEF88(this);
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,754 @@
|
|||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
u8 field_0x0;
|
||||
u8 field_0x1;
|
||||
} PACKED stuct_080CAB14;
|
||||
|
||||
void sub_08021218();
|
||||
void sub_08021588();
|
||||
void sub_080213D0();
|
||||
void sub_08021390();
|
||||
void sub_0802159C();
|
||||
void sub_0804AA1C();
|
||||
void sub_080213F0();
|
||||
u32 sub_080214FC();
|
||||
void sub_08021540();
|
||||
void sub_08021600();
|
||||
void sub_080213B0();
|
||||
u32 sub_08049F64();
|
||||
u32 sub_0802169C();
|
||||
void sub_0802124C();
|
||||
void sub_08021644();
|
||||
void sub_08021414();
|
||||
void sub_08021400();
|
||||
u32 sub_08021274(u32, u32);
|
||||
u32 sub_08021664(Entity*, Entity*);
|
||||
u32 sub_0804A044(Entity*, Entity*, u32);
|
||||
void sub_08021424(Entity*);
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
|
||||
extern void (*const gUnk_080CAA98[])(Entity*);
|
||||
extern void (*const gUnk_080CAAB0[])(Entity*);
|
||||
|
||||
extern const s8 gUnk_080CAB00[];
|
||||
extern const s8 gUnk_080CAB04[];
|
||||
extern const u8 gUnk_080CAB08[];
|
||||
extern const s8 gUnk_080CAB0C[];
|
||||
extern const s8 gUnk_080CAB10[];
|
||||
extern const stuct_080CAB14 gUnk_080CAB14[];
|
||||
extern const u8 gUnk_080CAB3A[];
|
||||
extern const u8 gUnk_080CAB42[];
|
||||
extern const u8 gUnk_080CAB4A[];
|
||||
extern const u8 gUnk_080CAB52[];
|
||||
extern const u8 gUnk_080CAB68[];
|
||||
|
||||
extern void (*const gUnk_080CAB58[])(Entity*);
|
||||
|
||||
void DarkNut(Entity* this) {
|
||||
EnemyFunctionHandler(this, gUnk_080CAA98);
|
||||
SetChildOffset(this, 0, 1, -22);
|
||||
}
|
||||
|
||||
void sub_08020BA0(Entity* this) {
|
||||
gUnk_080CAAB0[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08020BB8(Entity* this) {
|
||||
switch (this->bitfield & 0x7f) {
|
||||
case 0x1c:
|
||||
this->action = 11;
|
||||
this->actionDelay = gUnk_080CAB0C[this->entityType.form];
|
||||
this->damageType = 81;
|
||||
sub_08021218(this, 8, (((this->field_0x3e ^ 0x10) + 4) & 0x18) >> 3);
|
||||
sub_08021588(this);
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
break;
|
||||
case 0x16:
|
||||
this->action = 11;
|
||||
this->actionDelay = gUnk_080CAB10[this->entityType.form];
|
||||
this->damageType = 81;
|
||||
sub_08021218(this, 8, (((this->field_0x3e ^ 0x10) + 4) & 0x18) >> 3);
|
||||
sub_08021588(this);
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
break;
|
||||
case 0x4b:
|
||||
if (this->action == 13 || this->action == 15 || this->action == 19 || this->action == 18)
|
||||
break;
|
||||
switch (this->field_0x78.HALF.HI) {
|
||||
case 8 ... 12:
|
||||
this->field_0x7a.HALF.LO = gUnk_080CAB04[this->entityType.form];
|
||||
break;
|
||||
case 4 ... 6:
|
||||
this->field_0x7a.HALF.LO = gUnk_080CAB00[this->entityType.form];
|
||||
break;
|
||||
default:
|
||||
this->field_0x7a.HALF.LO = 0;
|
||||
break;
|
||||
}
|
||||
this->action = 10;
|
||||
sub_08021218(this, 0xb, this->animationState);
|
||||
sub_08004488(0x15d);
|
||||
sub_08021588(this);
|
||||
break;
|
||||
case 0x4c:
|
||||
if (this->action == 15) {
|
||||
u8 bVar3 = 0xff;
|
||||
if (this->attachedEntity != NULL) {
|
||||
bVar3 = this->attachedEntity->bitfield & 0x7f;
|
||||
}
|
||||
if (bVar3 == 2) {
|
||||
sub_080213D0(this, gUnk_080CAB08[this->entityType.form]);
|
||||
} else {
|
||||
sub_080213D0(this, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (this->currentHealth != this->field_0x78.HALF.LO) {
|
||||
sub_08021588(this);
|
||||
sub_08021390(this);
|
||||
sub_0804AA1C(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
this->field_0x78.HALF.LO = this->currentHealth;
|
||||
sub_0804AA30(this, gUnk_080CAA98);
|
||||
}
|
||||
|
||||
void nullsub_129(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08020D70(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
this->action = 1;
|
||||
this->field_0x74.HALF.HI = 0;
|
||||
this->field_0x78.HALF.LO = this->currentHealth;
|
||||
this->animationState = -1;
|
||||
sub_08021218(this, 0, 2);
|
||||
}
|
||||
|
||||
void sub_08020D9C(Entity* this) {
|
||||
if (sub_08049FDC(this, 1))
|
||||
sub_080213F0(this);
|
||||
}
|
||||
|
||||
void sub_08020DB4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 0x80)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
void sub_08020DD4(Entity* this) {
|
||||
if (sub_080214FC(this)) {
|
||||
sub_080213F0(this);
|
||||
} else if (--this->field_0x76.HWORD == 0) {
|
||||
this->action = 5;
|
||||
sub_08021218(this, 5, this->animationState);
|
||||
} else {
|
||||
if (--this->actionDelay == 0)
|
||||
sub_08021540(this);
|
||||
sub_080AEF88(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020E28(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 0x80)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
|
||||
void sub_08020E48(Entity* this) {
|
||||
if (sub_080214FC(this)) {
|
||||
sub_080213F0(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 0x80)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020E78(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 0x80)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
void sub_08020E98(Entity* this) {
|
||||
if (sub_08049F64(this, 1, 0x38)) {
|
||||
if (sub_0802169C(this, gUnk_020000B0)) {
|
||||
this->action = 8;
|
||||
sub_08021218(this, 7, this->animationState);
|
||||
} else {
|
||||
this->direction = GetFacingDirection(gUnk_020000B0, this);
|
||||
if (sub_080AEF88(this) == 0) {
|
||||
this->action = 8;
|
||||
sub_08021218(this, 7, this->animationState);
|
||||
} else {
|
||||
this->direction ^= 0x10;
|
||||
sub_0802124C(this);
|
||||
sub_08021644(this);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (gUnk_020000B0 == NULL) {
|
||||
sub_08021414(this);
|
||||
} else {
|
||||
this->direction = GetFacingDirection(this, gUnk_020000B0);
|
||||
sub_080AEF88(this);
|
||||
sub_0802124C(this);
|
||||
sub_08021644(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020F28(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 0x80)
|
||||
sub_08021400(this);
|
||||
}
|
||||
|
||||
void sub_08020F48(Entity* this) {
|
||||
if (sub_08049F64(this, 1, 0x48)) {
|
||||
if (sub_08021664(this, gUnk_020000B0)) {
|
||||
u32 uVar2 = sub_0804A044(this, gUnk_020000B0, 9);
|
||||
if (uVar2 == 0xff) {
|
||||
sub_08021424(this);
|
||||
} else {
|
||||
Entity* pEVar3;
|
||||
|
||||
this->action = 14;
|
||||
sub_08021218(this, 13, uVar2 >> 3);
|
||||
pEVar3 = sub_0804A98C(this, 0, 1);
|
||||
if (pEVar3) {
|
||||
pEVar3->parent = this;
|
||||
this->attachedEntity = pEVar3;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sub_08021424(this);
|
||||
}
|
||||
} else {
|
||||
sub_08021390(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020FAC(Entity* this) {
|
||||
if (this->frames.all & 0x80) {
|
||||
if (this->field_0x7a.HALF.LO) {
|
||||
this->field_0x7a.HALF.LO--;
|
||||
} else {
|
||||
this->hurtBlinkTime = -8;
|
||||
sub_08021390(this);
|
||||
}
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020FE4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 12;
|
||||
sub_08021218(this, 9, this->animationState);
|
||||
sub_0804AA1C(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08021010(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
this->damageType = 0x56;
|
||||
sub_080213F0(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08021038(Entity* this) {
|
||||
if (this->attachedEntity == NULL && this->frames.all) {
|
||||
Entity* pEVar2 = (Entity*)sub_0804A98C(this, 0, 0);
|
||||
if (pEVar2) {
|
||||
pEVar2->parent = this;
|
||||
this->attachedEntity = pEVar2;
|
||||
}
|
||||
sub_08004488(270);
|
||||
}
|
||||
|
||||
if (this->frames.all & 0x80) {
|
||||
sub_08021588(this);
|
||||
if (this->field_0x7c.BYTES.byte0) {
|
||||
this->field_0x7c.BYTES.byte0--;
|
||||
} else {
|
||||
sub_08021390(this);
|
||||
}
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all == 4)
|
||||
this->damageType = 81;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080210A8(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 1) {
|
||||
this->frames.all = 0;
|
||||
sub_08021588(this);
|
||||
sub_08004488(349);
|
||||
} else if (this->frames.all & 0x80) {
|
||||
sub_08021390(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080210E4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 1) {
|
||||
Entity* ent;
|
||||
|
||||
this->frames.all &= ~1;
|
||||
ent = sub_0804A98C(this, 0, 2);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
this->attachedEntity = ent;
|
||||
}
|
||||
|
||||
sub_08004488(270);
|
||||
}
|
||||
|
||||
sub_08021644(this);
|
||||
if ((this->frames.all & 0x10) &&
|
||||
(!sub_080AEF88(this) || (this->attachedEntity && (this->attachedEntity->bitfield & 0x80)))) {
|
||||
sub_080213D0(this, 0);
|
||||
} else {
|
||||
if (--this->field_0x76.HWORD == 0)
|
||||
sub_080213D0(this, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08021170(Entity* this) {
|
||||
if (this->frames.all & 0x80) {
|
||||
if (this->field_0x7a.HALF.HI) {
|
||||
this->field_0x7a.HALF.HI--;
|
||||
} else {
|
||||
sub_08021390(this);
|
||||
}
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080211A0(Entity* this) {
|
||||
if (sub_080214FC(this)) {
|
||||
sub_08021390(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frames.all & 0x80)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080211D0(Entity* this)
|
||||
|
||||
{
|
||||
UpdateAnimationSingleFrame(this);
|
||||
sub_0802159C(this);
|
||||
|
||||
if (this->frames.all & 0x80)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
void sub_080211F4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
sub_08021600(this);
|
||||
|
||||
if (this->frames.all & 0x80)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
void sub_08021218(Entity* this, u32 param_2, u32 param_3) {
|
||||
const stuct_080CAB14* unk;
|
||||
|
||||
if (this->field_0x74.HALF.LO == param_2 && this->animationState == param_3)
|
||||
return;
|
||||
|
||||
this->animationState = param_3;
|
||||
this->field_0x74.HALF.LO = param_2;
|
||||
|
||||
unk = &gUnk_080CAB14[param_2];
|
||||
this->spriteIndex = unk->field_0x1;
|
||||
InitAnimationForceUpdate(this, unk->field_0x0 + param_3);
|
||||
}
|
||||
|
||||
void sub_0802124C(Entity* this) {
|
||||
u32 iVar1 = sub_08021274(this->animationState, this->direction);
|
||||
if (iVar1 != 0xff) {
|
||||
sub_08021218(this, this->field_0x74.HALF.LO, iVar1);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
}
|
||||
|
||||
NAKED
|
||||
u32 sub_08021274(u32 a, u32 b) {
|
||||
asm(".include \"asm/non_matching/darkNut/sub_08021274.inc\"");
|
||||
}
|
||||
|
||||
void sub_080212B0(Entity* this) {
|
||||
u8 tmp;
|
||||
|
||||
switch (this->field_0x74.HALF.HI) {
|
||||
default:
|
||||
this->field_0x74.HALF.HI = 1;
|
||||
tmp = gUnk_080CAB3A[Random() & 7];
|
||||
break;
|
||||
case 1:
|
||||
this->field_0x74.HALF.HI = 2;
|
||||
tmp = gUnk_080CAB42[Random() & 7];
|
||||
break;
|
||||
case 2:
|
||||
this->field_0x74.HALF.HI = 0;
|
||||
tmp = gUnk_080CAB4A[Random() & 7];
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->entityType.form < 2 && tmp == 2)
|
||||
tmp = gUnk_080CAB52[Random() & 3];
|
||||
|
||||
this->attachedEntity = NULL;
|
||||
gUnk_080CAB58[tmp](this);
|
||||
}
|
||||
|
||||
void sub_08021328(Entity* this) {
|
||||
this->action = 13;
|
||||
this->field_0x7c.BYTES.byte0 = gUnk_080CAB68[this->entityType.form];
|
||||
sub_08021218(this, 0xc, this->animationState);
|
||||
}
|
||||
|
||||
void sub_0802134C(Entity* this) {
|
||||
this->action = 15;
|
||||
this->direction = this->animationState << 3;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->field_0x76.HWORD = 0x78;
|
||||
sub_08021218(this, 0xe, this->animationState);
|
||||
}
|
||||
|
||||
void sub_08021370(Entity* this) {
|
||||
this->action = 18;
|
||||
sub_08021218(this, 0x10, this->animationState);
|
||||
}
|
||||
|
||||
void sub_08021380(Entity* this) {
|
||||
this->action = 19;
|
||||
sub_08021218(this, 0x11, this->animationState);
|
||||
}
|
||||
|
||||
void sub_08021390(Entity* this) {
|
||||
this->action = 7;
|
||||
this->nonPlanarMovement = 0x200;
|
||||
this->damageType = 0x56;
|
||||
sub_08021218(this, 6, this->animationState);
|
||||
}
|
||||
|
||||
void sub_080213B0(Entity* this) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 1;
|
||||
this->nonPlanarMovement = 0xc0;
|
||||
this->field_0x76.HWORD = 0xf0;
|
||||
sub_08021218(this, 3, this->animationState);
|
||||
}
|
||||
|
||||
void sub_080213D0(Entity* this, u32 param_2) {
|
||||
this->action = 16;
|
||||
this->field_0x7a.HALF.HI = param_2;
|
||||
sub_08021218(this, 0xf, this->animationState);
|
||||
sub_08021588(this);
|
||||
}
|
||||
|
||||
void sub_080213F0(Entity* this) {
|
||||
this->action = 6;
|
||||
sub_08021218(this, 1, this->animationState);
|
||||
}
|
||||
|
||||
void sub_08021400(Entity* this) {
|
||||
this->action = 9;
|
||||
this->nonPlanarMovement = 0x60;
|
||||
sub_08021218(this, 10, this->animationState);
|
||||
}
|
||||
|
||||
void sub_08021414(Entity* this) {
|
||||
this->action = 17;
|
||||
sub_08021218(this, 5, this->animationState);
|
||||
}
|
||||
|
||||
void sub_08021424(Entity* this) {
|
||||
s32 x, y;
|
||||
u32 tmp;
|
||||
|
||||
u32 dir = GetFacingDirection(this, gUnk_020000B0);
|
||||
tmp = sub_08021274(this->animationState, dir);
|
||||
if (tmp != 0xff) {
|
||||
sub_08021218(this, this->field_0x74.HALF.LO, tmp);
|
||||
} else {
|
||||
tmp = this->animationState;
|
||||
}
|
||||
|
||||
switch (tmp) {
|
||||
case 0:
|
||||
x = gUnk_020000B0->x.HALF.HI;
|
||||
y = gUnk_020000B0->y.HALF.HI + 0x2c;
|
||||
break;
|
||||
case 1:
|
||||
x = gUnk_020000B0->x.HALF.HI - 0x24;
|
||||
y = gUnk_020000B0->y.HALF.HI;
|
||||
break;
|
||||
case 2:
|
||||
x = gUnk_020000B0->x.HALF.HI;
|
||||
y = gUnk_020000B0->y.HALF.HI - 0x1d;
|
||||
break;
|
||||
default:
|
||||
x = gUnk_020000B0->x.HALF.HI + 0x24;
|
||||
y = gUnk_020000B0->y.HALF.HI;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(6 < (x - this->x.HALF.HI) + 3U) && !(4 < (y - this->y.HALF.HI) + 2U)) {
|
||||
sub_080212B0(this);
|
||||
} else {
|
||||
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y);
|
||||
if (!sub_080AEF88(this)) {
|
||||
sub_080212B0(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_080214FC(Entity* this) {
|
||||
u32 direction;
|
||||
|
||||
if (!sub_08049FDC(this, 1))
|
||||
return 0;
|
||||
|
||||
direction = GetFacingDirection(this, gUnk_020000B0);
|
||||
if (4 < (direction - (this->frames.all & 0x1f)) - 2)
|
||||
return 0;
|
||||
|
||||
this->animationState = ((direction + 4) & 0x18) >> 3;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void sub_08021540(Entity* this) {
|
||||
u32 tmp, tmp2;
|
||||
u32 rand;
|
||||
|
||||
rand = Random();
|
||||
if (!sub_08049FA0(this) && (rand & 1)) {
|
||||
tmp2 = (sub_08049EE4(this) + 4) & 0x18;
|
||||
} else {
|
||||
tmp2 = (rand >> 0x10) & 0x18;
|
||||
}
|
||||
this->direction = tmp2;
|
||||
|
||||
tmp = sub_08021274(this->animationState, tmp2);
|
||||
if (tmp != 0xff)
|
||||
sub_08021218(this, 3, tmp);
|
||||
|
||||
this->actionDelay = 30;
|
||||
}
|
||||
|
||||
void sub_08021588(Entity* this) {
|
||||
if (this->attachedEntity) {
|
||||
this->attachedEntity->parent = NULL;
|
||||
this->attachedEntity = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0802159C(Entity* this) {
|
||||
if (this->frames.all == 1) {
|
||||
Entity* ent;
|
||||
|
||||
this->frames.all = 0;
|
||||
this->damageType = 0x51;
|
||||
ent = sub_0804A98C(this, 0, 3);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
this->attachedEntity = ent;
|
||||
}
|
||||
sub_08004488(0x116);
|
||||
} else if (this->frames.all == 2) {
|
||||
this->frames.all = 0;
|
||||
sub_08021588(this);
|
||||
} else if (this->frames.all & 0x20) {
|
||||
this->frames.all &= ~0x20;
|
||||
sub_08004488(0x115);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08021600(Entity* this) {
|
||||
if (this->frames.all == 1) {
|
||||
Entity* ent;
|
||||
|
||||
this->frames.all = 0;
|
||||
this->damageType = 0x51;
|
||||
ent = sub_0804A98C(this, 0, 4);
|
||||
if (ent) {
|
||||
ent->parent = this;
|
||||
this->attachedEntity = ent;
|
||||
}
|
||||
sub_08004488(0x10e);
|
||||
} else if (this->frames.all == 2) {
|
||||
this->frames.all = 0;
|
||||
sub_08021588(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08021644(Entity* this) {
|
||||
if (this->frames.all & 0x20) {
|
||||
this->frames.all &= ~0x20;
|
||||
sub_08004488(0x7d);
|
||||
}
|
||||
}
|
||||
|
||||
extern u32 sub_08049F1C(Entity*, Entity*, u32);
|
||||
|
||||
u32 sub_08021664(Entity* this, Entity* ent) {
|
||||
switch (this->animationState) {
|
||||
case 0:
|
||||
return sub_08049F1C(this, ent, 0x22);
|
||||
case 1:
|
||||
return sub_08049F1C(this, ent, 0x1a);
|
||||
case 2:
|
||||
return sub_08049F1C(this, ent, 0x13);
|
||||
case 3:
|
||||
return sub_08049F1C(this, ent, 0x1a);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_0802169C(Entity* this, Entity* ent) {
|
||||
u32 ret;
|
||||
|
||||
switch (this->animationState) {
|
||||
case 0:
|
||||
ret = 0x2c;
|
||||
break;
|
||||
case 2:
|
||||
ret = 0x1d;
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
ret = 0x24;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sub_08049F1C(this, ent, ret)) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
void (*const gUnk_080CAA98[])(Entity*) = {
|
||||
sub_08020BA0,
|
||||
sub_08020BB8,
|
||||
sub_08001324,
|
||||
sub_0804A7D4,
|
||||
sub_08001242,
|
||||
nullsub_129,
|
||||
};
|
||||
void (*const gUnk_080CAAB0[])(Entity*) = {
|
||||
sub_08020D70,
|
||||
sub_08020D9C,
|
||||
sub_08020DB4,
|
||||
sub_08020DD4,
|
||||
sub_08020E28,
|
||||
sub_08020E48,
|
||||
sub_08020E78,
|
||||
sub_08020E98,
|
||||
sub_08020F28,
|
||||
sub_08020F48,
|
||||
sub_08020FAC,
|
||||
sub_08020FE4,
|
||||
sub_08021010,
|
||||
sub_08021038,
|
||||
sub_080210A8,
|
||||
sub_080210E4,
|
||||
sub_08021170,
|
||||
sub_080211A0,
|
||||
sub_080211D0,
|
||||
sub_080211F4,
|
||||
};
|
||||
|
||||
const s8 gUnk_080CAB00[] = {
|
||||
30, 30, 20, 10,
|
||||
};
|
||||
|
||||
const s8 gUnk_080CAB04[] = {
|
||||
60, 60, 45, 30,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CAB08[] = {
|
||||
90, 90, 60, 30,
|
||||
};
|
||||
|
||||
const s8 gUnk_080CAB0C[] = {
|
||||
90, 90, 60, 30,
|
||||
};
|
||||
|
||||
const s8 gUnk_080CAB10[] = {
|
||||
90, 90, 45, 8,
|
||||
};
|
||||
|
||||
const stuct_080CAB14 gUnk_080CAB14[] = {
|
||||
{0x00, 0x62},
|
||||
{0x04, 0x62},
|
||||
{0x08, 0x62},
|
||||
{0x0C, 0x62},
|
||||
{0x10, 0x62},
|
||||
{0x14, 0x62},
|
||||
{0x18, 0x62},
|
||||
{0x1C, 0x62},
|
||||
{0x20, 0x62},
|
||||
{0x24, 0x62},
|
||||
{0x28, 0x62},
|
||||
{0x2C, 0x62},
|
||||
{0x00, 0x63},
|
||||
{0x04, 0x63},
|
||||
{0x08, 0x63},
|
||||
{0x0C, 0x63},
|
||||
{0x10, 0x63},
|
||||
{0x14, 0x63},
|
||||
{0x18, 0x63},
|
||||
};
|
||||
|
||||
const u8 gUnk_080CAB3A[] = {
|
||||
0, 1, 1, 0, 3, 0, 1, 0,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CAB42[] = {
|
||||
1, 1, 3, 0, 1, 2, 0, 0,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CAB4A[] = {
|
||||
0, 0, 3, 1, 2, 2, 3, 1,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CAB52[] = {
|
||||
0, 3, 1, 0, 0, 0
|
||||
};
|
||||
|
||||
void (*const gUnk_080CAB58[])(Entity*) = {
|
||||
sub_08021328,
|
||||
sub_0802134C,
|
||||
sub_08021370,
|
||||
sub_08021380,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CAB68[] = {
|
||||
90, 90, 45, 7,
|
||||
};
|
||||
// clang-format on
|
|
@ -18,9 +18,10 @@ bool32 sub_0801FDE4(Entity*, s32, s32);
|
|||
extern void (*const gUnk_080CA49C[])(Entity*);
|
||||
extern void (*const gUnk_080CA4B4[])(Entity*);
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern u8 gUnk_080CA4C8[];
|
||||
extern u16 gUnk_080CA4CA[];
|
||||
extern const u8 gUnk_080CA4C8[];
|
||||
extern const u16 gUnk_080CA4CA[];
|
||||
extern s16 gSineTable[];
|
||||
|
||||
void Leever(Entity* this) {
|
||||
EnemyFunctionHandler(this, gUnk_080CA49C);
|
||||
SetChildOffset(this, 0, 1, -0x10);
|
||||
|
@ -113,7 +114,7 @@ void sub_0801FDB4(Entity* this) {
|
|||
|
||||
u32 sub_0801FDE4(Entity* ent, s32 x, s32 y) {
|
||||
u32 uVar3;
|
||||
u16* puVar4;
|
||||
const u16* puVar4;
|
||||
|
||||
if (sub_080002D4(x, y, gUnk_020000B0->collisionLayer) != 0) {
|
||||
return 0;
|
||||
|
@ -176,3 +177,35 @@ void sub_0801FED4(Entity* this) {
|
|||
}
|
||||
sub_080AEF88(this);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
void (*const gUnk_080CA49C[])(Entity*) = {
|
||||
sub_0801FC28,
|
||||
sub_0801FC40,
|
||||
sub_08001324,
|
||||
sub_0801FC7C,
|
||||
sub_08001242,
|
||||
sub_0801FC28,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA4B4[])(Entity*) = {
|
||||
sub_0801FC9C,
|
||||
sub_0801FCB0,
|
||||
sub_0801FD2C,
|
||||
sub_0801FD80,
|
||||
sub_0801FDB4,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CA4C8[] = {
|
||||
0x06,
|
||||
0xFA,
|
||||
};
|
||||
|
||||
const u16 gUnk_080CA4CA[] = {
|
||||
0x000A,
|
||||
0x0009,
|
||||
0x000C,
|
||||
0x000B,
|
||||
0xFFFF,
|
||||
};
|
||||
// clang-format on
|
||||
|
|
|
@ -14,17 +14,18 @@ extern void sub_0804A720();
|
|||
extern u32 Random();
|
||||
extern void sub_0801ED14();
|
||||
extern u32 sub_0801EDEC();
|
||||
extern Entity *sub_08049DF4(u32);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
|
||||
extern void (*const gOctorok[6])(Entity*);
|
||||
extern void (*const gOctorokIdle[4])(Entity*);
|
||||
extern void (*const gUnk_080CA158[4])(Entity*);
|
||||
extern void (*const gUnk_080CA158[6])(Entity*);
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern s8 gUnk_080CA17E[2];
|
||||
extern u8 gUnk_080CA170[8];
|
||||
extern u8 gUnk_080CA174[2];
|
||||
extern u8 gUnk_080CA176[8];
|
||||
extern const u8 gUnk_080CA170[4];
|
||||
extern const u8 gUnk_080CA174[2];
|
||||
extern const u8 gUnk_080CA176[8];
|
||||
extern const s8 gUnk_080CA17E[2];
|
||||
|
||||
// Main
|
||||
void Octorok(Entity* this) {
|
||||
EnemyFunctionHandler(this, gOctorok);
|
||||
|
@ -82,7 +83,7 @@ void sub_0801EB84(Entity* this) {
|
|||
UpdateAnimationVariableFrames(this, 2);
|
||||
}
|
||||
|
||||
void nullsub_3() {
|
||||
void nullsub_3(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0801EB9C(Entity* this) {
|
||||
|
@ -137,7 +138,7 @@ void sub_0801EC80(Entity* this) {
|
|||
if (this->frames.all & 1) {
|
||||
Entity* ent = sub_0804A98C(this, 1, 0);
|
||||
if (ent) {
|
||||
s8* off;
|
||||
const s8* off;
|
||||
ent->direction = this->direction;
|
||||
off = &gUnk_080CA176[this->direction / 4];
|
||||
ent->x.HALF.HI += off[0];
|
||||
|
@ -187,14 +188,69 @@ void sub_0801ED14(Entity* this) {
|
|||
InitializeAnimation(this, this->animationState);
|
||||
}
|
||||
|
||||
u32 sub_0801EDEC(Entity *this) {
|
||||
u32 sub_0801EDEC(Entity* this) {
|
||||
Entity* ent = sub_08049DF4(1);
|
||||
|
||||
|
||||
if (ent == NULL)
|
||||
return 0;
|
||||
|
||||
|
||||
if (((GetFacingDirection(this, ent) + 4) & 0x18) != this->direction)
|
||||
return 0;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
void (*const gOctorok[])(Entity*) = {
|
||||
sub_0801EAD0,
|
||||
sub_0801EAE8,
|
||||
sub_08001324,
|
||||
sub_0801EB0C,
|
||||
sub_08001242,
|
||||
sub_0801EB2C,
|
||||
};
|
||||
|
||||
void (*const gOctorokIdle[])(Entity*) = {
|
||||
sub_0801EBC8,
|
||||
sub_0801EBF4,
|
||||
sub_0801EC2C,
|
||||
sub_0801EC80,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA158[])(Entity*) = {
|
||||
sub_0801EB68,
|
||||
sub_0801EB74,
|
||||
sub_0801EB7C,
|
||||
sub_0801EB84,
|
||||
nullsub_3,
|
||||
sub_0801EB9C,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CA170[] = {
|
||||
30,
|
||||
60,
|
||||
60,
|
||||
90,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CA174[] = {
|
||||
1,
|
||||
0,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CA176[] = {
|
||||
0x00,
|
||||
0xFD,
|
||||
0x04,
|
||||
0x00,
|
||||
0x00,
|
||||
0x02,
|
||||
0xFC,
|
||||
0x00,
|
||||
};
|
||||
|
||||
const s8 gUnk_080CA17E[] = {
|
||||
0x04,
|
||||
0xFC,
|
||||
};
|
||||
// clang-format on
|
||||
|
|
|
@ -0,0 +1,400 @@
|
|||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void (*const gUnk_080CA570[])(Entity*);
|
||||
extern void (*const gUnk_080CA588[])(Entity*);
|
||||
extern void (*const gUnk_080CA590[])(Entity*);
|
||||
extern void (*const gUnk_080CA5BC[])(Entity*);
|
||||
|
||||
extern const s8 gUnk_080CA5B8[];
|
||||
extern const s8 gUnk_080CA5D4[];
|
||||
|
||||
void sub_080205F8(Entity*);
|
||||
void sub_08020604(Entity*);
|
||||
|
||||
extern u32 sub_0800442E(Entity*);
|
||||
extern u32 sub_08049F1C(Entity*, Entity*, u32);
|
||||
extern void sub_0804AA1C(Entity*);
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
|
||||
void Peahat(Entity* this) {
|
||||
if (this->entityType.form == 0) {
|
||||
EnemyFunctionHandler(this, gUnk_080CA570);
|
||||
SetChildOffset(this, 0, 1, -0x10);
|
||||
} else {
|
||||
gUnk_080CA588[this->action](this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0801FF9C(Entity* this) {
|
||||
gUnk_080CA590[this->action](this);
|
||||
if (this->field_0x80.HALF.HI)
|
||||
this->height.HALF.HI = gUnk_080CA5B8[(this->field_0xf++ & 0x30) >> 4];
|
||||
}
|
||||
|
||||
void sub_0801FFDC(Entity* this) {
|
||||
if (this->field_0x82.HALF.LO) {
|
||||
if (this->bitfield == 0x94) {
|
||||
Entity* ent = CreateEnemy(3, 1);
|
||||
if (ent) {
|
||||
CopyPosition(this, ent);
|
||||
ent->height.HALF.HI -= 8;
|
||||
}
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
this->animationState = 2;
|
||||
this->action = 5;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->hurtBlinkTime = -30;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
} else if (this->bitfield == 0x9b) {
|
||||
this->animationState = 1;
|
||||
this->action = 5;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->hurtBlinkTime = -30;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
} else if (this->bitfield == 0x80) {
|
||||
if (this->animationState == 0) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 30;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->direction = -1;
|
||||
this->field_0x82.HALF.HI = 0x78;
|
||||
GetNextFrame(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->field_0x43)
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
|
||||
sub_0804AA30(this, gUnk_080CA570);
|
||||
}
|
||||
|
||||
void sub_08020088(Entity* this) {
|
||||
if (2 >= this->previousActionFlag && !sub_0806F520(this))
|
||||
return;
|
||||
|
||||
gUnk_080CA5BC[this->previousActionFlag](this);
|
||||
}
|
||||
|
||||
void sub_080200B4(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->field_0x1d = 60;
|
||||
if (this->animationState == 0) {
|
||||
this->animationState = 1;
|
||||
this->action = 5;
|
||||
this->damageType = 0x71;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080200E4(Entity* this) {
|
||||
sub_0806F4E8(this);
|
||||
}
|
||||
|
||||
void sub_080200EC(Entity* this) {
|
||||
sub_0806F3E4(this);
|
||||
}
|
||||
|
||||
void sub_080200F4(Entity* this) {
|
||||
this->flags &= ~0x80;
|
||||
}
|
||||
|
||||
void nullsub_5(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08020104(Entity* this) {
|
||||
if (this->flags & 0x80) {
|
||||
this->flags |= 0x80;
|
||||
this->field_0x3a &= 0xfb;
|
||||
} else {
|
||||
this->currentHealth = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020130(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
this->action = 1;
|
||||
this->actionDelay = 16;
|
||||
this->field_0xf = Random();
|
||||
this->direction = Random() & 0x1f;
|
||||
this->field_0x1c = 18;
|
||||
this->field_0x80.HALF.LO = (Random() & 1) ? 2 : -2;
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
this->field_0x82.HALF.LO = 1;
|
||||
this->animationState = 0;
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
|
||||
void sub_08020180(Entity* this) {
|
||||
if (this->field_0x82.HALF.HI)
|
||||
this->field_0x82.HALF.HI--;
|
||||
|
||||
if (sub_08049FDC(this, 1)) {
|
||||
if (this->field_0x82.HALF.HI == 0 && (this->field_0xf & 0xf) == 0 && sub_08049F1C(this, gUnk_020000B0, 0x30)) {
|
||||
this->action = 2;
|
||||
this->previousActionFlag = Random() & 3;
|
||||
this->actionDelay = 60;
|
||||
this->nonPlanarMovement = 160;
|
||||
}
|
||||
}
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
this->actionDelay = 16;
|
||||
sub_08020604(this);
|
||||
if ((Random() & 3) == 0) {
|
||||
this->field_0x80.HALF.LO = (Random() & 1) ? 2 : -2;
|
||||
}
|
||||
}
|
||||
|
||||
sub_080AEFE0(this);
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_08020220(Entity* this) {
|
||||
if (sub_08049FDC(this, 1)) {
|
||||
if (--this->actionDelay) {
|
||||
UpdateAnimationVariableFrames(this, 4 - ((this->actionDelay >> 4) & 0x3));
|
||||
return;
|
||||
} else {
|
||||
this->action = 3;
|
||||
this->actionDelay = 120;
|
||||
this->nonPlanarMovement = 192;
|
||||
this->direction = (GetFacingDirection(this, gUnk_020000B0) + gUnk_080CA5D4[Random() & 1]) & 0x1f;
|
||||
}
|
||||
} else {
|
||||
sub_080205F8(this);
|
||||
}
|
||||
|
||||
UpdateAnimationVariableFrames(this, 4);
|
||||
}
|
||||
|
||||
void sub_08020294(Entity* this) {
|
||||
if (sub_08049FDC(this, 1)) {
|
||||
if (--this->actionDelay == 0) {
|
||||
sub_080205F8(this);
|
||||
}
|
||||
if (60 < this->actionDelay) {
|
||||
if (this->actionDelay & 1)
|
||||
this->nonPlanarMovement += 4;
|
||||
|
||||
if ((gScreenTransition.frameCount & 3) == 0)
|
||||
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
|
||||
}
|
||||
sub_080AEFE0(this);
|
||||
} else {
|
||||
sub_080205F8(this);
|
||||
}
|
||||
UpdateAnimationVariableFrames(this, 4);
|
||||
}
|
||||
|
||||
void sub_08020308(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 1;
|
||||
this->nonPlanarMovement = 128;
|
||||
this->field_0x82.HALF.HI = 120;
|
||||
GetNextFrame(this);
|
||||
} else {
|
||||
if (this->actionDelay & 1)
|
||||
this->nonPlanarMovement -= 8;
|
||||
|
||||
sub_080AEFE0(this);
|
||||
UpdateAnimationVariableFrames(this, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020350(Entity* this) {
|
||||
if (this->animationState != 2) {
|
||||
if (sub_080044EC(this, 0x1800) == 0) {
|
||||
this->action = 6;
|
||||
this->actionDelay = -0x10;
|
||||
this->field_0xf = 10;
|
||||
this->damageType = 113;
|
||||
}
|
||||
|
||||
if (this->direction == 0xff)
|
||||
this->direction = this->field_0x3e;
|
||||
|
||||
sub_080AEF88(this);
|
||||
GetNextFrame(this);
|
||||
} else {
|
||||
sub_08003FC4(this, 0x1c00);
|
||||
if (this->height.HALF.HI == 0) {
|
||||
this->action = 7;
|
||||
this->actionDelay = -106;
|
||||
this->field_0xf = 10;
|
||||
this->damageType = 113;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080203C0(Entity* this) {
|
||||
if (this->field_0xf)
|
||||
if (--this->field_0xf == 0)
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
|
||||
if (!sub_0800442E(this) && --this->actionDelay)
|
||||
return;
|
||||
|
||||
this->action = 9;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->direction = Random() & 0x1f;
|
||||
sub_0804AA1C(this);
|
||||
this->animationState = 5;
|
||||
InitializeAnimation(this, 5);
|
||||
}
|
||||
|
||||
void sub_0802041C(Entity* this) {
|
||||
if (this->field_0xf)
|
||||
if (--this->field_0xf == 0)
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
|
||||
if (!sub_0800442E(this) && --this->actionDelay)
|
||||
return;
|
||||
|
||||
this->action = 8;
|
||||
this->actionDelay = -16;
|
||||
this->direction = Random() & 0x1f;
|
||||
sub_0804AA1C(this);
|
||||
}
|
||||
|
||||
void sub_08020468(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (--this->actionDelay == 0) {
|
||||
if (this->frames.all & 0x80) {
|
||||
this->action = 9;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->animationState = 4;
|
||||
InitializeAnimation(this, 4);
|
||||
} else {
|
||||
this->actionDelay = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->frames.all & 2) {
|
||||
this->frames.all &= 0xfd;
|
||||
this->direction = Random() & 0x1f;
|
||||
}
|
||||
|
||||
if (this->frames.all & 1) {
|
||||
sub_0800442E(this);
|
||||
} else {
|
||||
sub_080AEF88(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080204E0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
this->action = 1;
|
||||
this->damageType = 0x70;
|
||||
this->field_0x82.HALF.LO = 1;
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
this->animationState = 0;
|
||||
InitializeAnimation(this, 0);
|
||||
} else {
|
||||
if (this->frames.all & 1) {
|
||||
sub_0800442E(this);
|
||||
} else {
|
||||
sub_08003FC4(this, 0x1c00);
|
||||
sub_080AEF88(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0802053C(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = -16;
|
||||
this->field_0xf = 40;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->spriteRendering.b3 = 1;
|
||||
this->spriteOrientation.flipY = 1;
|
||||
this->spriteSettings.b.shadow = 0;
|
||||
this->nonPlanarMovement = 0x20;
|
||||
this->direction = (Random() & 0x10) + 8;
|
||||
InitializeAnimation(this, 3);
|
||||
}
|
||||
|
||||
void sub_08020590(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (--this->actionDelay == '\0') {
|
||||
DeleteEntity(this);
|
||||
} else {
|
||||
if (this->actionDelay < 60)
|
||||
this->spriteSettings.b.draw ^= 1;
|
||||
|
||||
this->height.WORD -= 0xc000;
|
||||
sub_0806F69C(this);
|
||||
if (--this->field_0xf == 0) {
|
||||
this->field_0xf = 40;
|
||||
this->direction = (Random() & 0x10) + 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080205F8(Entity* this) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 60;
|
||||
}
|
||||
|
||||
void sub_08020604(Entity *this){
|
||||
if (!sub_08049FA0(this) && (Random() & 3)) {
|
||||
this->direction = sub_08049EE4(this);
|
||||
} else {
|
||||
this->direction += this->field_0x80.HALF.LO;
|
||||
this->direction &= 0x1f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// clang-format off
|
||||
void (*const gUnk_080CA570[])(Entity*) = {
|
||||
sub_0801FF9C,
|
||||
sub_0801FFDC,
|
||||
sub_08001324,
|
||||
sub_0804A7D4,
|
||||
sub_08001242,
|
||||
sub_08020088,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA588[])(Entity*) = {
|
||||
sub_0802053C,
|
||||
sub_08020590,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA590[])(Entity*) = {
|
||||
sub_08020130,
|
||||
sub_08020180,
|
||||
sub_08020220,
|
||||
sub_08020294,
|
||||
sub_08020308,
|
||||
sub_08020350,
|
||||
sub_080203C0,
|
||||
sub_0802041C,
|
||||
sub_08020468,
|
||||
sub_080204E0,
|
||||
};
|
||||
|
||||
const s8 gUnk_080CA5B8[] = {
|
||||
-5,
|
||||
-6,
|
||||
-7,
|
||||
-6,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA5BC[])(Entity*) = {
|
||||
sub_080200B4,
|
||||
sub_080200E4,
|
||||
sub_080200EC,
|
||||
sub_080200F4,
|
||||
nullsub_5,
|
||||
sub_08020104,
|
||||
};
|
||||
// clang-format on
|
||||
|
|
@ -0,0 +1,325 @@
|
|||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void (*const gUnk_080CA66C[])(Entity*);
|
||||
extern void (*const gUnk_080CA684[])(Entity*);
|
||||
extern void (*const gUnk_080CA6A4[])(Entity*);
|
||||
extern void (*const gUnk_080CA6BC[])(Entity*);
|
||||
|
||||
extern const u8 gUnk_080CA6CC[];
|
||||
extern const s8 gUnk_080CA6D4[];
|
||||
|
||||
void sub_08020A30(Entity*);
|
||||
void sub_08020A7C(Entity*);
|
||||
u32 sub_08020AD0(Entity*);
|
||||
u32 sub_08020B6C(Entity*);
|
||||
|
||||
extern void sub_080AE58C();
|
||||
extern void sub_080AE7E8();
|
||||
extern void sub_08078930();
|
||||
extern s32 GetTileType(s32 tilePosition, s32 layerIndex);
|
||||
|
||||
void Rollobite(Entity* this) {
|
||||
EnemyFunctionHandler(this, gUnk_080CA66C);
|
||||
}
|
||||
|
||||
void sub_08020648(Entity* this) {
|
||||
sub_08020AD0(this);
|
||||
gUnk_080CA684[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08020668(Entity* this) {
|
||||
if (this->damageType == 34 && this->currentHealth != 0xff) {
|
||||
this->action = 4;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->direction = -1;
|
||||
this->currentHealth = -1;
|
||||
this->damageType = 35;
|
||||
InitializeAnimation(this, this->animationState + 8);
|
||||
}
|
||||
|
||||
if (this->bitfield != 0x80) {
|
||||
u8 tmp = this->action - 4;
|
||||
if (tmp < 2) {
|
||||
this->action = 4;
|
||||
this->actionDelay = -76;
|
||||
this->direction = -1;
|
||||
InitializeAnimation(this, this->animationState + 0x10);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->bitfield == 0x93)
|
||||
sub_08020648(this);
|
||||
}
|
||||
|
||||
void sub_080206E0(Entity* this) {
|
||||
if (sub_08020AD0(this)) {
|
||||
this->field_0x42 = 0;
|
||||
} else {
|
||||
if (sub_08020B6C(this)) {
|
||||
this->field_0x42--;
|
||||
sub_080AE58C(this, this->field_0x3e, 10);
|
||||
sub_080AE7E8(this, this->field_0x46, this->field_0x3e, 10);
|
||||
} else {
|
||||
sub_08001324(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020734(Entity* this) {
|
||||
if (this->previousActionFlag < 3 && !sub_0806F520(this)) {
|
||||
this->action = 4;
|
||||
this->flags |= 0x80;
|
||||
this->direction = -1;
|
||||
InitializeAnimation(this, this->animationState + 0x10);
|
||||
} else {
|
||||
gUnk_080CA6A4[this->previousActionFlag](this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0802077C(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->field_0x1d = 60;
|
||||
}
|
||||
|
||||
void sub_08020788(Entity* this) {
|
||||
sub_0806F4E8(this);
|
||||
}
|
||||
|
||||
void sub_08020790(Entity* this) {
|
||||
sub_0806F3E4(this);
|
||||
}
|
||||
|
||||
void sub_08020798(Entity* this) {
|
||||
this->flags &= ~0x80;
|
||||
}
|
||||
|
||||
void nullsub_6(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080207A8(Entity* this) {
|
||||
this->action = 4;
|
||||
this->flags |= 0x80;
|
||||
this->spritePriority.b0 = 4;
|
||||
this->field_0x3a &= 0xfb;
|
||||
this->direction ^= 0x10;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
InitializeAnimation(this, this->animationState + 0x10);
|
||||
}
|
||||
|
||||
void sub_080207F4(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
this->field_0x16 = 0x30;
|
||||
this->field_0x1c = 18;
|
||||
this->cutsceneBeh.HALF.LO = 0;
|
||||
this->direction = Random() & 0x18;
|
||||
sub_08020A30(this);
|
||||
}
|
||||
|
||||
void sub_08020820(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x1) {
|
||||
this->frames.all &= ~0x1;
|
||||
if (!sub_080AEF88(this))
|
||||
this->actionDelay = 1;
|
||||
}
|
||||
|
||||
if (this->frames.all & 0x10) {
|
||||
this->frames.all &= ~0x10;
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020874(Entity* this) {
|
||||
gUnk_080CA6BC[this->previousActionFlag](this);
|
||||
}
|
||||
|
||||
void sub_0802088C(Entity* this) {
|
||||
this->previousActionFlag = 1;
|
||||
this->flags &= ~0x80;
|
||||
this->cutsceneBeh.HALF.HI = gPlayerEntity.animationState;
|
||||
this->spritePriority.b1 = 0;
|
||||
}
|
||||
|
||||
void sub_080208B4(Entity* this) {
|
||||
s8 uVar1 = (this->cutsceneBeh.HALF.HI - gPlayerEntity.animationState) / 2;
|
||||
if (uVar1) {
|
||||
this->animationState = (this->animationState + uVar1) & 3;
|
||||
InitializeAnimation(this, this->animationState + 0x10);
|
||||
}
|
||||
this->cutsceneBeh.HALF.HI = gPlayerEntity.animationState;
|
||||
}
|
||||
|
||||
void sub_080208F0(Entity* this) {
|
||||
this->spritePriority.b1 = 3;
|
||||
}
|
||||
|
||||
void sub_08020904(Entity* this) {
|
||||
this->action = 4;
|
||||
this->flags |= 0x80;
|
||||
this->direction = -1;
|
||||
InitializeAnimation(this, this->animationState + 0x10);
|
||||
}
|
||||
|
||||
void sub_08020920(Entity* this) {
|
||||
if (--this->actionDelay == 0)
|
||||
sub_08020A30(this);
|
||||
}
|
||||
|
||||
void sub_08020938(Entity* this) {
|
||||
u32 unk;
|
||||
|
||||
if ((this->frames.all & 0x80) == 0)
|
||||
GetNextFrame(this);
|
||||
|
||||
unk = sub_080044EC(this, 0x2800);
|
||||
|
||||
if (unk == 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 5;
|
||||
InitializeAnimation(this, this->animationState + 12);
|
||||
}
|
||||
sub_08078930(this);
|
||||
} else {
|
||||
if (unk == 1)
|
||||
sub_08004488(260);
|
||||
|
||||
if ((this->direction & 0x80) == 0)
|
||||
sub_080AEFE0(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080209A0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frames.all & 0x80) {
|
||||
this->flags |= 0x80;
|
||||
this->nonPlanarMovement = 0x100;
|
||||
this->damageType = 34;
|
||||
sub_08020A30(this);
|
||||
this->direction = this->animationState << 3;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
} else {
|
||||
if ((this->frames.all & 1) == 0)
|
||||
sub_08078930(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080209F4(Entity* this) {
|
||||
if (sub_08003FC4(this, 0x1c00) == 0) {
|
||||
this->action = 7;
|
||||
this->spritePriority.b0 = 7;
|
||||
}
|
||||
|
||||
if (this->frames.all == 0)
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_08020A28(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_08020A30(Entity* this) {
|
||||
if (this->cutsceneBeh.HALF.LO < 2) {
|
||||
this->actionDelay = gUnk_080CA6CC[Random() & 7];
|
||||
if (this->actionDelay == 0) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 60;
|
||||
this->cutsceneBeh.HALF.LO++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->action = 1;
|
||||
this->cutsceneBeh.HALF.LO = 0;
|
||||
sub_08020A7C(this);
|
||||
}
|
||||
|
||||
void sub_08020A7C(Entity* this) {
|
||||
int tmp = Random();
|
||||
u32 state = (this->direction + gUnk_080CA6D4[tmp % 3]) & 0x18;
|
||||
|
||||
if (sub_08049FA0(this) == 0) {
|
||||
int tmp = (sub_08049EE4(this) + 4) & 0x18;
|
||||
if ((state ^ 0x10) == tmp)
|
||||
state ^= 0x10;
|
||||
}
|
||||
|
||||
this->direction = state;
|
||||
this->animationState = (u8)(state >> 3);
|
||||
InitializeAnimation(this, this->animationState);
|
||||
}
|
||||
|
||||
u32 sub_08020AD0(Entity* this) {
|
||||
if (sub_08020B6C(this) && this->height.HALF.HI == 0) {
|
||||
int tile = COORD_TO_TILE(this);
|
||||
int iVar1 = GetTileType(tile, this->collisionLayer);
|
||||
if ((iVar1 * 0x10000 - 0x710000U) >> 0x10 < 2) {
|
||||
this->action = 6;
|
||||
this->flags &= ~0x80;
|
||||
this->x.HALF.HI &= 0xfff0;
|
||||
this->x.HALF.HI += 8;
|
||||
this->y.HALF.HI &= 0xfff0;
|
||||
this->y.HALF.HI += 13;
|
||||
this->field_0x20 = 0x20000;
|
||||
InitializeAnimation(this, this->animationState + 0x14);
|
||||
SetTile(0x4034, tile, this->collisionLayer);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_08020B6C(Entity* this) {
|
||||
u32 tmp = this->animIndex - 0x10;
|
||||
if (tmp < 4) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
void (*const gUnk_080CA66C[])(Entity*) = {
|
||||
sub_08020648,
|
||||
sub_08020668,
|
||||
sub_080206E0,
|
||||
sub_0804A7D4,
|
||||
sub_08001242,
|
||||
sub_08020734,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA684[])(Entity*) = {
|
||||
sub_080207F4,
|
||||
sub_08020820,
|
||||
sub_08020874,
|
||||
sub_08020920,
|
||||
sub_08020938,
|
||||
sub_080209A0,
|
||||
sub_080209F4,
|
||||
sub_08020A28,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA6A4[])(Entity*) = {
|
||||
sub_0802077C,
|
||||
sub_08020788,
|
||||
sub_08020790,
|
||||
sub_08020798,
|
||||
nullsub_6,
|
||||
sub_080207A8,
|
||||
};
|
||||
|
||||
void (*const gUnk_080CA6BC[])(Entity*) = {
|
||||
sub_0802088C,
|
||||
sub_080208B4,
|
||||
sub_080208F0,
|
||||
sub_08020904,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CA6CC[] = {
|
||||
0,6,9,0,6,6,0,7
|
||||
};
|
||||
// clang-format on
|
||||
|
|
@ -7,38 +7,32 @@ extern u32 sub_080AE4CC(Entity*, u32, u32, u32);
|
|||
extern void* gUnk_02027EB4;
|
||||
extern void* gUnk_0200D654;
|
||||
|
||||
#if 0
|
||||
void ObjectB2(Entity* this) {
|
||||
void* pEVar3;
|
||||
|
||||
void ObjectB2(Entity *this)
|
||||
{
|
||||
void* pEVar3;
|
||||
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0x10;
|
||||
this->direction = (this->entityType).form << 3;
|
||||
if (this->collisionLayer == 2) {
|
||||
pEVar3 = &gUnk_0200D654;
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0x10;
|
||||
this->direction = (this->entityType).form << 3;
|
||||
if (this->collisionLayer == 2) {
|
||||
pEVar3 = &gUnk_0200D654;
|
||||
} else {
|
||||
pEVar3 = &gUnk_02027EB4;
|
||||
}
|
||||
this->attachedEntity = pEVar3;
|
||||
InitializeAnimation(this, this->entityType.form);
|
||||
}
|
||||
else {
|
||||
pEVar3 = &gUnk_02027EB4;
|
||||
this->nonPlanarMovement = this->parent->nonPlanarMovement;
|
||||
sub_0806F69C(this);
|
||||
if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
this->attachedEntity = pEVar3;
|
||||
InitializeAnimation(this, this->entityType.form);
|
||||
}
|
||||
this->nonPlanarMovement = this->parent->nonPlanarMovement;
|
||||
sub_0806F69C(this);
|
||||
if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->nonPlanarMovement < 0x41) {
|
||||
this->spriteSettings.b.draw ^= 1;
|
||||
if (this->nonPlanarMovement < 0x41) {
|
||||
this->spriteSettings.b.draw ^= 1;
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
DeleteThisEntity();
|
||||
if (--this->actionDelay == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
}
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
#endif
|
||||
GetNextFrame(this);
|
||||
}
|
Loading…
Reference in New Issue