mirror of
https://github.com/zeldaret/tmc
synced 2026-05-26 07:39:08 -04:00
File diff suppressed because it is too large
Load Diff
@@ -1,57 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start MazaalHand
|
||||
MazaalHand: @ 0x08035164
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xc]
|
||||
cmp r0, #0
|
||||
bne _0803518C
|
||||
movs r2, #1
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r1, [r4, #0xa]
|
||||
ands r1, r2
|
||||
lsls r1, r1, #6
|
||||
ldrb r2, [r4, #0x18]
|
||||
subs r0, #0x42
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
strb r0, [r4, #0x18]
|
||||
adds r0, r4, #0
|
||||
movs r1, #0
|
||||
bl InitAnimationForceUpdate
|
||||
_0803518C:
|
||||
adds r0, r4, #0
|
||||
bl sub_08035194
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_08035194
|
||||
sub_08035194: @ 0x08035194
|
||||
push {lr}
|
||||
adds r2, r0, #0
|
||||
ldrb r0, [r2, #0xa]
|
||||
cmp r0, #0
|
||||
bne _080351A8
|
||||
ldr r0, _080351A4 @ =gUnk_080CEF34
|
||||
b _080351AA
|
||||
.align 2, 0
|
||||
_080351A4: .4byte gUnk_080CEF34
|
||||
_080351A8:
|
||||
ldr r0, _080351B8 @ =gUnk_080CEF58
|
||||
_080351AA:
|
||||
ldrb r1, [r2, #0x1e]
|
||||
lsls r1, r1, #2
|
||||
adds r1, r1, r0
|
||||
ldr r0, [r1]
|
||||
str r0, [r2, #0x48]
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
_080351B8: .4byte gUnk_080CEF58
|
||||
-1853
File diff suppressed because it is too large
Load Diff
@@ -1,673 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start MazaalMacro
|
||||
MazaalMacro: @ 0x08034C60
|
||||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
ldr r4, _08034C78 @ =gUnk_080CEE90
|
||||
bl GetNextFunction
|
||||
lsls r0, r0, #2
|
||||
adds r0, r0, r4
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, #0
|
||||
bl _call_via_r1
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_08034C78: .4byte gUnk_080CEE90
|
||||
|
||||
thumb_func_start sub_08034C7C
|
||||
sub_08034C7C: @ 0x08034C7C
|
||||
push {lr}
|
||||
adds r2, r0, #0
|
||||
ldrb r0, [r2, #0xa]
|
||||
cmp r0, #2
|
||||
beq _08034C9C
|
||||
ldr r0, _08034C98 @ =gUnk_080CEEA4
|
||||
ldrb r1, [r2, #0xc]
|
||||
lsls r1, r1, #2
|
||||
adds r1, r1, r0
|
||||
ldr r1, [r1]
|
||||
adds r0, r2, #0
|
||||
bl _call_via_r1
|
||||
b _08034CA2
|
||||
.align 2, 0
|
||||
_08034C98: .4byte gUnk_080CEEA4
|
||||
_08034C9C:
|
||||
adds r0, r2, #0
|
||||
bl sub_08034E18
|
||||
_08034CA2:
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08034CA4
|
||||
sub_08034CA4: @ 0x08034CA4
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_08034FA0
|
||||
ldr r1, _08034CB8 @ =gUnk_080CEE90
|
||||
adds r0, r4, #0
|
||||
bl sub_0804AA30
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_08034CB8: .4byte gUnk_080CEE90
|
||||
|
||||
thumb_func_start sub_08034CBC
|
||||
sub_08034CBC: @ 0x08034CBC
|
||||
push {lr}
|
||||
bl sub_0804A7D4
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08034CC4
|
||||
sub_08034CC4: @ 0x08034CC4
|
||||
push {r4, r5, r6, lr}
|
||||
adds r5, r0, #0
|
||||
bl sub_08035084
|
||||
cmp r0, #0
|
||||
beq _08034D42
|
||||
ldrb r0, [r5, #0xa]
|
||||
adds r0, #1
|
||||
movs r1, #0
|
||||
strb r0, [r5, #0xc]
|
||||
strb r1, [r5, #0xf]
|
||||
adds r2, r5, #0
|
||||
adds r2, #0x6d
|
||||
ldrb r1, [r2]
|
||||
movs r0, #1
|
||||
orrs r0, r1
|
||||
strb r0, [r2]
|
||||
adds r1, r5, #0
|
||||
adds r1, #0x78
|
||||
movs r0, #0x96
|
||||
lsls r0, r0, #3
|
||||
strh r0, [r1]
|
||||
adds r0, r5, #0
|
||||
bl sub_08034F70
|
||||
ldrb r1, [r5, #0xa]
|
||||
adds r0, r5, #0
|
||||
bl InitializeAnimation
|
||||
ldr r0, _08034D44 @ =0x00004022
|
||||
movs r2, #0x2e
|
||||
ldrsh r1, [r5, r2]
|
||||
ldr r3, _08034D48 @ =gRoomControls
|
||||
ldrh r2, [r3, #6]
|
||||
subs r1, r1, r2
|
||||
asrs r1, r1, #4
|
||||
movs r4, #0x3f
|
||||
ands r1, r4
|
||||
movs r6, #0x32
|
||||
ldrsh r2, [r5, r6]
|
||||
ldrh r3, [r3, #8]
|
||||
subs r2, r2, r3
|
||||
asrs r2, r2, #4
|
||||
ands r2, r4
|
||||
lsls r2, r2, #6
|
||||
orrs r1, r2
|
||||
adds r2, r5, #0
|
||||
adds r2, #0x38
|
||||
ldrb r2, [r2]
|
||||
bl SetTile
|
||||
movs r0, #0x37
|
||||
movs r1, #2
|
||||
bl CreateEnemy
|
||||
adds r1, r0, #0
|
||||
cmp r1, #0
|
||||
beq _08034D42
|
||||
str r1, [r5, #0x54]
|
||||
str r5, [r1, #0x50]
|
||||
adds r0, r5, #0
|
||||
bl CopyPosition
|
||||
_08034D42:
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
_08034D44: .4byte 0x00004022
|
||||
_08034D48: .4byte gRoomControls
|
||||
|
||||
thumb_func_start sub_08034D4C
|
||||
sub_08034D4C: @ 0x08034D4C
|
||||
push {r4, r5, r6, lr}
|
||||
adds r5, r0, #0
|
||||
bl GetNextFrame
|
||||
adds r6, r5, #0
|
||||
adds r6, #0x78
|
||||
ldrh r0, [r6]
|
||||
subs r0, #1
|
||||
strh r0, [r6]
|
||||
lsls r0, r0, #0x10
|
||||
cmp r0, #0
|
||||
bne _08034DC4
|
||||
ldrb r0, [r5, #0xf]
|
||||
cmp r0, #7
|
||||
bhi _08034DBC
|
||||
movs r0, #0x4b
|
||||
movs r1, #0
|
||||
bl CreateEnemy
|
||||
adds r4, r0, #0
|
||||
cmp r4, #0
|
||||
beq _08034DBC
|
||||
bl Random
|
||||
movs r1, #5
|
||||
bl __modsi3
|
||||
adds r0, #0xc
|
||||
strb r0, [r4, #0x15]
|
||||
ldr r1, _08034DB8 @ =gRoomControls
|
||||
ldrh r0, [r1, #0x1e]
|
||||
lsrs r0, r0, #1
|
||||
ldrh r2, [r1, #6]
|
||||
adds r0, r0, r2
|
||||
strh r0, [r4, #0x2e]
|
||||
ldrh r0, [r1, #8]
|
||||
adds r0, #8
|
||||
strh r0, [r4, #0x32]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x38
|
||||
movs r0, #3
|
||||
strb r0, [r1]
|
||||
str r5, [r4, #0x50]
|
||||
adds r0, r4, #0
|
||||
bl UpdateSpriteForCollisionLayer
|
||||
movs r0, #0x96
|
||||
lsls r0, r0, #2
|
||||
strh r0, [r6]
|
||||
ldrb r0, [r5, #0xf]
|
||||
adds r0, #1
|
||||
strb r0, [r5, #0xf]
|
||||
b _08034DC4
|
||||
.align 2, 0
|
||||
_08034DB8: .4byte gRoomControls
|
||||
_08034DBC:
|
||||
adds r1, r5, #0
|
||||
adds r1, #0x78
|
||||
movs r0, #0x78
|
||||
strh r0, [r1]
|
||||
_08034DC4:
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08034DC8
|
||||
sub_08034DC8: @ 0x08034DC8
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r0, _08034E10 @ =gScreenTransition
|
||||
adds r0, #0x39
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #0
|
||||
bne _08034E0E
|
||||
adds r0, r4, #0
|
||||
movs r1, #0x51
|
||||
movs r2, #0
|
||||
bl CreateFx
|
||||
movs r1, #0x2e
|
||||
ldrsh r0, [r4, r1]
|
||||
ldr r2, _08034E14 @ =gRoomControls
|
||||
ldrh r1, [r2, #6]
|
||||
subs r0, r0, r1
|
||||
asrs r0, r0, #4
|
||||
movs r3, #0x3f
|
||||
ands r0, r3
|
||||
movs r5, #0x32
|
||||
ldrsh r1, [r4, r5]
|
||||
ldrh r2, [r2, #8]
|
||||
subs r1, r1, r2
|
||||
asrs r1, r1, #4
|
||||
ands r1, r3
|
||||
lsls r1, r1, #6
|
||||
orrs r0, r1
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x38
|
||||
ldrb r1, [r1]
|
||||
bl sub_0807BA8C
|
||||
bl DeleteThisEntity
|
||||
_08034E0E:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_08034E10: .4byte gScreenTransition
|
||||
_08034E14: .4byte gRoomControls
|
||||
|
||||
thumb_func_start sub_08034E18
|
||||
sub_08034E18: @ 0x08034E18
|
||||
push {lr}
|
||||
ldr r2, _08034E2C @ =gUnk_080CEEB0
|
||||
ldrb r1, [r0, #0xc]
|
||||
lsls r1, r1, #2
|
||||
adds r1, r1, r2
|
||||
ldr r1, [r1]
|
||||
bl _call_via_r1
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
_08034E2C: .4byte gUnk_080CEEB0
|
||||
|
||||
thumb_func_start sub_08034E30
|
||||
sub_08034E30: @ 0x08034E30
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r0, [r4, #0x50]
|
||||
ldrb r0, [r0, #0xa]
|
||||
adds r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x38
|
||||
movs r0, #2
|
||||
strb r0, [r1]
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x29
|
||||
ldrb r0, [r2]
|
||||
movs r1, #7
|
||||
orrs r0, r1
|
||||
movs r1, #0x39
|
||||
rsbs r1, r1, #0
|
||||
ands r0, r1
|
||||
strb r0, [r2]
|
||||
adds r0, r4, #0
|
||||
bl UpdateSpriteForCollisionLayer
|
||||
adds r0, r4, #0
|
||||
movs r1, #2
|
||||
bl InitializeAnimation
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08034E68
|
||||
sub_08034E68: @ 0x08034E68
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r0, [r4, #0x50]
|
||||
ldr r0, [r0, #4]
|
||||
cmp r0, #0
|
||||
bne _08034EBC
|
||||
ldrb r1, [r4, #0x18]
|
||||
lsls r0, r1, #0x1e
|
||||
cmp r0, #0
|
||||
beq _08034E8A
|
||||
movs r0, #4
|
||||
rsbs r0, r0, #0
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x18]
|
||||
adds r0, r4, #0
|
||||
bl sub_08035120
|
||||
_08034E8A:
|
||||
ldr r0, _08034EB0 @ =gScreenTransition
|
||||
adds r0, #0x39
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #0
|
||||
bne _08034EB8
|
||||
bl sub_08079F8C
|
||||
cmp r0, #0
|
||||
beq _08034EBC
|
||||
movs r0, #3
|
||||
strb r0, [r4, #0xc]
|
||||
ldr r1, _08034EB4 @ =script_08012E20
|
||||
adds r0, r4, #0
|
||||
bl StartCutscene
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x84
|
||||
str r0, [r1]
|
||||
b _08034EBC
|
||||
.align 2, 0
|
||||
_08034EB0: .4byte gScreenTransition
|
||||
_08034EB4: .4byte script_08012E20
|
||||
_08034EB8:
|
||||
bl DeleteThisEntity
|
||||
_08034EBC:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08034EC0
|
||||
sub_08034EC0: @ 0x08034EC0
|
||||
push {lr}
|
||||
adds r1, r0, #0
|
||||
ldr r0, [r1, #0x50]
|
||||
ldr r0, [r0, #4]
|
||||
cmp r0, #0
|
||||
bne _08034ED6
|
||||
adds r0, r1, #0
|
||||
bl sub_08035120
|
||||
bl DeleteThisEntity
|
||||
_08034ED6:
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start sub_08034ED8
|
||||
sub_08034ED8: @ 0x08034ED8
|
||||
push {lr}
|
||||
movs r1, #0
|
||||
bl ExecuteScriptForEntity
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08034EE4
|
||||
sub_08034EE4: @ 0x08034EE4
|
||||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
ldrb r0, [r5, #0xe]
|
||||
adds r0, #1
|
||||
strb r0, [r5, #0xe]
|
||||
movs r1, #0xff
|
||||
ands r0, r1
|
||||
movs r1, #0xf
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
bne _08034F46
|
||||
bl Random
|
||||
adds r4, r0, #0
|
||||
ldr r0, _08034F50 @ =gUnk_080CEEC8
|
||||
movs r1, #3
|
||||
ands r1, r4
|
||||
adds r1, r1, r0
|
||||
ldrb r1, [r1]
|
||||
adds r0, r5, #0
|
||||
movs r2, #0
|
||||
bl CreateFx
|
||||
adds r3, r0, #0
|
||||
cmp r3, #0
|
||||
beq _08034F46
|
||||
lsrs r1, r4, #2
|
||||
movs r0, #0x77
|
||||
ands r1, r0
|
||||
lsls r1, r1, #1
|
||||
adds r1, #1
|
||||
ldr r2, _08034F54 @ =gRoomControls
|
||||
ldrh r0, [r2, #0xa]
|
||||
adds r0, r0, r1
|
||||
strh r0, [r3, #0x2e]
|
||||
lsrs r1, r4, #9
|
||||
movs r0, #0x7e
|
||||
ands r1, r0
|
||||
adds r1, #1
|
||||
ldrh r0, [r2, #0xc]
|
||||
adds r0, r0, r1
|
||||
strh r0, [r3, #0x32]
|
||||
adds r1, r3, #0
|
||||
adds r1, #0x38
|
||||
movs r0, #2
|
||||
strb r0, [r1]
|
||||
adds r0, r3, #0
|
||||
bl UpdateSpriteForCollisionLayer
|
||||
_08034F46:
|
||||
adds r0, r5, #0
|
||||
movs r1, #0
|
||||
bl ExecuteScriptForEntity
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_08034F50: .4byte gUnk_080CEEC8
|
||||
_08034F54: .4byte gRoomControls
|
||||
|
||||
thumb_func_start sub_08034F58
|
||||
sub_08034F58: @ 0x08034F58
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r0, _08034F6C @ =gUnk_0813ABA8
|
||||
bl DoExitTransition
|
||||
adds r0, r4, #0
|
||||
bl DeleteEntity
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_08034F6C: .4byte gUnk_0813ABA8
|
||||
|
||||
thumb_func_start sub_08034F70
|
||||
sub_08034F70: @ 0x08034F70
|
||||
push {lr}
|
||||
adds r2, r0, #0
|
||||
ldr r0, _08034F8C @ =gScreenTransition
|
||||
adds r0, #0x39
|
||||
ldrb r0, [r0]
|
||||
adds r1, r2, #0
|
||||
adds r1, #0x45
|
||||
strb r0, [r1]
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r0, r0, #0x18
|
||||
cmp r0, #0x3c
|
||||
bls _08034F90
|
||||
movs r0, #0
|
||||
b _08034F9A
|
||||
.align 2, 0
|
||||
_08034F8C: .4byte gScreenTransition
|
||||
_08034F90:
|
||||
cmp r0, #0x1e
|
||||
bls _08034F98
|
||||
movs r0, #1
|
||||
b _08034F9A
|
||||
_08034F98:
|
||||
movs r0, #2
|
||||
_08034F9A:
|
||||
strb r0, [r2, #0xb]
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_08034FA0
|
||||
sub_08034FA0: @ 0x08034FA0
|
||||
push {r4, r5, r6, lr}
|
||||
adds r4, r0, #0
|
||||
adds r0, #0x3d
|
||||
ldrb r1, [r0]
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
ble _08034FC0
|
||||
ldr r0, [r4, #0x54]
|
||||
adds r0, #0x3d
|
||||
strb r1, [r0]
|
||||
movs r0, #0xc
|
||||
movs r1, #1
|
||||
bl sub_08080964
|
||||
_08034FC0:
|
||||
ldrb r0, [r4, #0xb]
|
||||
cmp r0, #0
|
||||
beq _08035008
|
||||
cmp r0, #1
|
||||
beq _08035020
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x45
|
||||
ldrb r1, [r0]
|
||||
adds r5, r0, #0
|
||||
cmp r1, #0
|
||||
bne _08035040
|
||||
movs r1, #0x2e
|
||||
ldrsh r0, [r4, r1]
|
||||
ldr r2, _08035004 @ =gRoomControls
|
||||
ldrh r1, [r2, #6]
|
||||
subs r0, r0, r1
|
||||
asrs r0, r0, #4
|
||||
movs r3, #0x3f
|
||||
ands r0, r3
|
||||
movs r6, #0x32
|
||||
ldrsh r1, [r4, r6]
|
||||
ldrh r2, [r2, #8]
|
||||
subs r1, r1, r2
|
||||
asrs r1, r1, #4
|
||||
ands r1, r3
|
||||
lsls r1, r1, #6
|
||||
orrs r0, r1
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x38
|
||||
ldrb r1, [r1]
|
||||
bl sub_0807BA8C
|
||||
b _08035040
|
||||
.align 2, 0
|
||||
_08035004: .4byte gRoomControls
|
||||
_08035008:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x45
|
||||
ldrb r1, [r0]
|
||||
adds r5, r0, #0
|
||||
cmp r1, #0x3b
|
||||
bhi _08035040
|
||||
ldr r0, _0803501C @ =gScreenTransition
|
||||
adds r0, #0x39
|
||||
movs r1, #0x3c
|
||||
b _08035032
|
||||
.align 2, 0
|
||||
_0803501C: .4byte gScreenTransition
|
||||
_08035020:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x45
|
||||
ldrb r1, [r0]
|
||||
adds r5, r0, #0
|
||||
cmp r1, #0x1d
|
||||
bhi _08035040
|
||||
ldr r0, _0803503C @ =gScreenTransition
|
||||
adds r0, #0x39
|
||||
movs r1, #0x1e
|
||||
_08035032:
|
||||
strb r1, [r0]
|
||||
adds r0, r4, #0
|
||||
bl sub_08035050
|
||||
b _08035048
|
||||
.align 2, 0
|
||||
_0803503C: .4byte gScreenTransition
|
||||
_08035040:
|
||||
ldr r0, _0803504C @ =gScreenTransition
|
||||
ldrb r1, [r5]
|
||||
adds r0, #0x39
|
||||
strb r1, [r0]
|
||||
_08035048:
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
_0803504C: .4byte gScreenTransition
|
||||
|
||||
thumb_func_start sub_08035050
|
||||
sub_08035050: @ 0x08035050
|
||||
push {r4, lr}
|
||||
ldrb r2, [r0, #0x10]
|
||||
movs r1, #0x7f
|
||||
ands r1, r2
|
||||
movs r4, #0
|
||||
strb r1, [r0, #0x10]
|
||||
adds r0, #0x45
|
||||
strb r4, [r0]
|
||||
movs r0, #0x4b
|
||||
movs r1, #0
|
||||
bl CreateEnemy
|
||||
adds r2, r0, #0
|
||||
cmp r2, #0
|
||||
beq _08035082
|
||||
movs r0, #1
|
||||
strb r0, [r2, #0xb]
|
||||
adds r1, r2, #0
|
||||
adds r1, #0x38
|
||||
movs r0, #3
|
||||
strb r0, [r1]
|
||||
str r4, [r2, #0x50]
|
||||
adds r0, r2, #0
|
||||
bl UpdateSpriteForCollisionLayer
|
||||
_08035082:
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start sub_08035084
|
||||
sub_08035084: @ 0x08035084
|
||||
push {r4, r5, r6, r7, lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
mov r8, r0
|
||||
ldrb r0, [r0, #0xa]
|
||||
cmp r0, #0
|
||||
bne _08035118
|
||||
ldr r0, _080350A0 @ =gEntCount
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #0x42
|
||||
bls _080350A4
|
||||
movs r0, #0
|
||||
b _0803511A
|
||||
.align 2, 0
|
||||
_080350A0: .4byte gEntCount
|
||||
_080350A4:
|
||||
ldr r4, _080350D8 @ =gUnk_030010D8
|
||||
_080350A6:
|
||||
bl Random
|
||||
movs r1, #6
|
||||
bl __modsi3
|
||||
adds r6, r0, #0
|
||||
ldrb r0, [r4]
|
||||
lsrs r0, r0, #4
|
||||
cmp r6, r0
|
||||
beq _080350A6
|
||||
ldr r2, _080350DC @ =gScreenTransition
|
||||
adds r2, #0x38
|
||||
ldrb r1, [r2]
|
||||
movs r0, #0xf
|
||||
ands r0, r1
|
||||
lsls r1, r6, #4
|
||||
orrs r0, r1
|
||||
strb r0, [r2]
|
||||
movs r5, #0
|
||||
ldr r4, _080350E0 @ =gUnk_080CEECC
|
||||
ldr r7, _080350E4 @ =gRoomControls
|
||||
_080350D0:
|
||||
cmp r5, r6
|
||||
bne _080350E8
|
||||
mov r2, r8
|
||||
b _080350F2
|
||||
.align 2, 0
|
||||
_080350D8: .4byte gUnk_030010D8
|
||||
_080350DC: .4byte gScreenTransition
|
||||
_080350E0: .4byte gUnk_080CEECC
|
||||
_080350E4: .4byte gRoomControls
|
||||
_080350E8:
|
||||
movs r0, #0x37
|
||||
movs r1, #1
|
||||
bl CreateEnemy
|
||||
adds r2, r0, #0
|
||||
_080350F2:
|
||||
ldrh r0, [r7, #6]
|
||||
ldrb r1, [r4]
|
||||
adds r0, r0, r1
|
||||
strh r0, [r2, #0x2e]
|
||||
ldrh r0, [r7, #8]
|
||||
ldrb r1, [r4, #1]
|
||||
adds r0, r0, r1
|
||||
strh r0, [r2, #0x32]
|
||||
adds r1, r2, #0
|
||||
adds r1, #0x38
|
||||
movs r0, #1
|
||||
strb r0, [r1]
|
||||
adds r0, r2, #0
|
||||
bl UpdateSpriteForCollisionLayer
|
||||
adds r5, #1
|
||||
adds r4, #2
|
||||
cmp r5, #5
|
||||
bls _080350D0
|
||||
_08035118:
|
||||
movs r0, #1
|
||||
_0803511A:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4, r5, r6, r7, pc}
|
||||
|
||||
thumb_func_start sub_08035120
|
||||
sub_08035120: @ 0x08035120
|
||||
push {r4, r5, r6, lr}
|
||||
movs r2, #0x2e
|
||||
ldrsh r1, [r0, r2]
|
||||
ldr r3, _0803515C @ =gRoomControls
|
||||
ldrh r2, [r3, #6]
|
||||
subs r1, r1, r2
|
||||
asrs r4, r1, #4
|
||||
movs r2, #0x3f
|
||||
ands r4, r2
|
||||
movs r1, #0x32
|
||||
ldrsh r0, [r0, r1]
|
||||
ldrh r1, [r3, #8]
|
||||
subs r0, r0, r1
|
||||
asrs r0, r0, #4
|
||||
ands r0, r2
|
||||
lsls r0, r0, #6
|
||||
orrs r4, r0
|
||||
movs r6, #0
|
||||
ldr r5, _08035160 @ =gUnk_080CEED8
|
||||
_08035146:
|
||||
movs r2, #0
|
||||
ldrsh r0, [r5, r2]
|
||||
adds r0, r4, r0
|
||||
bl sub_0807B600
|
||||
adds r5, #2
|
||||
adds r6, #1
|
||||
cmp r6, #0x17
|
||||
bls _08035146
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
_0803515C: .4byte gRoomControls
|
||||
_08035160: .4byte gUnk_080CEED8
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
.syntax unified
|
||||
push {r4, r5, lr}
|
||||
adds r3, r0, #0
|
||||
adds r0, #0x7d
|
||||
ldrb r1, [r0]
|
||||
movs r0, #0x10
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08034764
|
||||
ldr r0, [r3, #0x74]
|
||||
ldrb r0, [r0, #0xc]
|
||||
cmp r0, #0x28
|
||||
bhi _080347B0
|
||||
ldr r0, _08034760 @ =gPlayerEntity
|
||||
movs r1, #0x2e
|
||||
ldrsh r0, [r0, r1]
|
||||
adds r2, r0, #0
|
||||
subs r2, #0x60
|
||||
b _08034776
|
||||
.align 2, 0
|
||||
_08034760: .4byte gPlayerEntity
|
||||
_08034764:
|
||||
ldr r0, [r3, #0x78]
|
||||
ldrb r0, [r0, #0xc]
|
||||
cmp r0, #0x28
|
||||
bhi _080347B0
|
||||
ldr r0, _08034790 @ =gPlayerEntity
|
||||
movs r5, #0x2e
|
||||
ldrsh r0, [r0, r5]
|
||||
adds r2, r0, #0
|
||||
adds r2, #0x60
|
||||
_08034776:
|
||||
ldr r0, _08034794 @ =gRoomControls
|
||||
ldrh r4, [r0, #6]
|
||||
subs r0, r2, #4
|
||||
movs r5, #0x2e
|
||||
ldrsh r1, [r3, r5]
|
||||
cmp r0, r1
|
||||
bls _08034798
|
||||
adds r0, r4, #0
|
||||
adds r0, #0xe0
|
||||
cmp r0, r1
|
||||
blo _080347B0
|
||||
movs r0, #8
|
||||
b _080347A8
|
||||
.align 2, 0
|
||||
_08034790: .4byte gPlayerEntity
|
||||
_08034794: .4byte gRoomControls
|
||||
_08034798:
|
||||
adds r0, r2, #4
|
||||
cmp r0, r1
|
||||
bhs _080347B0
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x90
|
||||
cmp r0, r1
|
||||
bhi _080347B0
|
||||
movs r0, #0x18
|
||||
_080347A8:
|
||||
strb r0, [r3, #0x15]
|
||||
adds r0, r3, #0
|
||||
bl sub_0806F69C
|
||||
_080347B0:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
.syntax divided
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
.syntax unified
|
||||
push {r4, r5, lr}
|
||||
adds r2, r0, #0
|
||||
ldr r0, _080347D8 @ =gPlayerEntity
|
||||
movs r1, #0x2e
|
||||
ldrsh r3, [r0, r1]
|
||||
ldr r0, _080347DC @ =gRoomControls
|
||||
ldrh r4, [r0, #6]
|
||||
subs r0, r3, #4
|
||||
movs r5, #0x2e
|
||||
ldrsh r1, [r2, r5]
|
||||
cmp r0, r1
|
||||
bls _080347E0
|
||||
adds r0, r4, #0
|
||||
adds r0, #0xe0
|
||||
cmp r0, r1
|
||||
blo _080347F8
|
||||
movs r0, #8
|
||||
b _080347F0
|
||||
.align 2, 0
|
||||
_080347D8: .4byte gPlayerEntity
|
||||
_080347DC: .4byte gRoomControls
|
||||
_080347E0:
|
||||
adds r0, r3, #4
|
||||
cmp r0, r1
|
||||
bhs _080347F8
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x90
|
||||
cmp r0, r1
|
||||
bhi _080347F8
|
||||
movs r0, #0x18
|
||||
_080347F0:
|
||||
strb r0, [r2, #0x15]
|
||||
adds r0, r2, #0
|
||||
bl sub_0806F69C
|
||||
_080347F8:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
.syntax divided
|
||||
@@ -0,0 +1,130 @@
|
||||
.syntax unified
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
adds r3, r1, #0
|
||||
adds r5, r2, #0
|
||||
ldrb r0, [r3, #0xa]
|
||||
cmp r0, #0
|
||||
bne _080348C6
|
||||
movs r2, #5
|
||||
movs r0, #0x7d
|
||||
adds r0, r0, r4
|
||||
mov ip, r0
|
||||
ldrb r1, [r0]
|
||||
movs r0, #0x10
|
||||
orrs r0, r1
|
||||
mov r1, ip
|
||||
strb r0, [r1]
|
||||
b _080348C8
|
||||
_080348C6:
|
||||
movs r2, #0xa
|
||||
_080348C8:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x80
|
||||
ldrb r0, [r0]
|
||||
ands r0, r2
|
||||
cmp r0, #0
|
||||
beq _080348F0
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x7d
|
||||
ldrb r2, [r0]
|
||||
ldrb r1, [r3, #0xa]
|
||||
adds r3, r0, #0
|
||||
cmp r1, #0
|
||||
bne _080348E6
|
||||
movs r0, #1
|
||||
b _080348E8
|
||||
_080348E6:
|
||||
movs r0, #2
|
||||
_080348E8:
|
||||
orrs r0, r2
|
||||
strb r0, [r3]
|
||||
movs r0, #0
|
||||
b _08034998
|
||||
_080348F0:
|
||||
cmp r5, #8
|
||||
bhi _08034996
|
||||
lsls r0, r5, #2
|
||||
ldr r1, _08034900 @ =_08034904
|
||||
adds r0, r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08034900: .4byte _08034904
|
||||
_08034904: @ jump table
|
||||
.4byte _08034928 @ case 0
|
||||
.4byte _0803492E @ case 1
|
||||
.4byte _0803493C @ case 2
|
||||
.4byte _0803494A @ case 3
|
||||
.4byte _0803493C @ case 4
|
||||
.4byte _08034958 @ case 5
|
||||
.4byte _08034966 @ case 6
|
||||
.4byte _0803496C @ case 7
|
||||
.4byte _08034982 @ case 8
|
||||
_08034928:
|
||||
movs r0, #3
|
||||
strb r0, [r3, #0xc]
|
||||
b _08034996
|
||||
_0803492E:
|
||||
movs r0, #4
|
||||
strb r0, [r3, #0xc]
|
||||
adds r1, r3, #0
|
||||
adds r1, #0x7c
|
||||
movs r0, #3
|
||||
strb r0, [r1]
|
||||
b _08034996
|
||||
_0803493C:
|
||||
movs r0, #4
|
||||
strb r0, [r3, #0xc]
|
||||
adds r1, r3, #0
|
||||
adds r1, #0x7c
|
||||
movs r0, #1
|
||||
strb r0, [r1]
|
||||
b _08034996
|
||||
_0803494A:
|
||||
movs r0, #0xf
|
||||
strb r0, [r3, #0xc]
|
||||
adds r1, r3, #0
|
||||
adds r1, #0x7e
|
||||
movs r0, #0xb4
|
||||
strh r0, [r1]
|
||||
b _08034996
|
||||
_08034958:
|
||||
movs r0, #0xf
|
||||
strb r0, [r3, #0xc]
|
||||
adds r1, r3, #0
|
||||
adds r1, #0x7e
|
||||
movs r0, #1
|
||||
strh r0, [r1]
|
||||
b _08034996
|
||||
_08034966:
|
||||
movs r0, #0x1e
|
||||
strb r0, [r3, #0xc]
|
||||
b _08034996
|
||||
_0803496C:
|
||||
movs r0, #0x1b
|
||||
strb r0, [r3, #0xc]
|
||||
ldrb r1, [r3, #0x10]
|
||||
movs r0, #0x7f
|
||||
ands r0, r1
|
||||
strb r0, [r3, #0x10]
|
||||
adds r0, r3, #0
|
||||
movs r1, #5
|
||||
bl InitializeAnimation
|
||||
b _08034996
|
||||
_08034982:
|
||||
ldrb r0, [r3, #0xa]
|
||||
adds r2, r0, #2
|
||||
movs r0, #0x36
|
||||
adds r1, r2, #0
|
||||
bl CreateEnemy
|
||||
adds r3, r0, #0
|
||||
cmp r3, #0
|
||||
beq _08034996
|
||||
str r4, [r3, #0x50]
|
||||
_08034996:
|
||||
movs r0, #1
|
||||
_08034998:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
.syntax divided
|
||||
@@ -0,0 +1,67 @@
|
||||
|
||||
.syntax unified
|
||||
push {r4, lr}
|
||||
adds r1, r0, #0
|
||||
adds r3, r1, #0
|
||||
adds r3, #0x7d
|
||||
ldrb r2, [r3]
|
||||
movs r0, #0x60
|
||||
ands r0, r2
|
||||
cmp r0, #0x40
|
||||
beq _08034A52
|
||||
movs r0, #0x10
|
||||
ands r0, r2
|
||||
cmp r0, #0
|
||||
beq _08034A56
|
||||
adds r4, r1, #0
|
||||
adds r4, #0x80
|
||||
ldrb r1, [r4]
|
||||
movs r0, #5
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08034A3E
|
||||
movs r0, #0x40
|
||||
orrs r0, r2
|
||||
strb r0, [r3]
|
||||
_08034A3E:
|
||||
ldrb r1, [r4]
|
||||
movs r0, #0xa
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08034A7E
|
||||
ldrb r1, [r3]
|
||||
movs r0, #3
|
||||
ands r0, r1
|
||||
cmp r0, #1
|
||||
bne _08034A7E
|
||||
_08034A52:
|
||||
movs r0, #1
|
||||
b _08034A80
|
||||
_08034A56:
|
||||
adds r4, r1, #0
|
||||
adds r4, #0x80
|
||||
ldrb r1, [r4]
|
||||
movs r0, #0xa
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08034A6A
|
||||
movs r0, #0x40
|
||||
orrs r0, r2
|
||||
strb r0, [r3]
|
||||
_08034A6A:
|
||||
ldrb r1, [r4]
|
||||
movs r0, #5
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08034A7E
|
||||
ldrb r1, [r3]
|
||||
movs r0, #3
|
||||
ands r0, r1
|
||||
cmp r0, #2
|
||||
beq _08034A52
|
||||
_08034A7E:
|
||||
movs r0, #0
|
||||
_08034A80:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
.syntax divided
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
.syntax unified
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08034B58
|
||||
movs r0, #3
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r1, [r4, #0xa]
|
||||
adds r1, #3
|
||||
adds r0, r4, #0
|
||||
bl InitializeAnimation
|
||||
b _08034B9A
|
||||
_08034B58:
|
||||
movs r0, #0xe
|
||||
bl sub_080A7EE0
|
||||
adds r5, r0, #0
|
||||
cmp r5, #0
|
||||
beq _08034B9A
|
||||
ldrb r0, [r4, #0xa]
|
||||
subs r0, #2
|
||||
strb r0, [r5, #0xa]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08034B78
|
||||
ldrb r1, [r4, #0xe]
|
||||
movs r0, #0xa8
|
||||
subs r0, r0, r1
|
||||
b _08034B7C
|
||||
_08034B78:
|
||||
ldrb r0, [r4, #0xe]
|
||||
adds r0, #0x58
|
||||
_08034B7C:
|
||||
strb r0, [r5, #0x15]
|
||||
ldrb r0, [r5, #0xa]
|
||||
lsls r0, r0, #1
|
||||
ldr r1, _08034B9C @ =gUnk_080CED84
|
||||
adds r0, r0, r1
|
||||
movs r2, #0
|
||||
ldrsb r2, [r0, r2]
|
||||
lsls r2, r2, #0x10
|
||||
movs r3, #1
|
||||
ldrsb r3, [r0, r3]
|
||||
lsls r3, r3, #0x10
|
||||
adds r0, r4, #0
|
||||
adds r1, r5, #0
|
||||
bl PositionRelative
|
||||
_08034B9A:
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_08034B9C: .4byte gUnk_080CED84
|
||||
.syntax divided
|
||||
@@ -0,0 +1,105 @@
|
||||
|
||||
.syntax unified
|
||||
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r3, [r4, #0xa]
|
||||
cmp r3, #1
|
||||
bhi _0803A23E
|
||||
ldrb r0, [r4, #0xc]
|
||||
cmp r0, #0x2b
|
||||
beq _0803A210
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x3d
|
||||
movs r1, #0
|
||||
ldrsb r1, [r0, r1]
|
||||
adds r5, r0, #0
|
||||
cmp r1, #0
|
||||
ble _0803A23E
|
||||
adds r0, #4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #0x95
|
||||
beq _0803A1B2
|
||||
cmp r0, #0x8e
|
||||
bne _0803A23E
|
||||
_0803A1B2:
|
||||
movs r0, #0x28
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r1, [r4, #0x10]
|
||||
movs r0, #0x7f
|
||||
ands r0, r1
|
||||
strb r0, [r4, #0x10]
|
||||
ldr r2, [r4, #0x50]
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x7d
|
||||
ldrb r1, [r0]
|
||||
cmp r3, #0
|
||||
bne _0803A1CE
|
||||
movs r0, #1
|
||||
b _0803A1D0
|
||||
_0803A1CE:
|
||||
movs r0, #2
|
||||
_0803A1D0:
|
||||
orrs r1, r0
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x7d
|
||||
strb r1, [r0]
|
||||
adds r0, #3
|
||||
ldrb r2, [r0]
|
||||
ldrb r1, [r4, #0xa]
|
||||
adds r3, r0, #0
|
||||
cmp r1, #0
|
||||
bne _0803A1E8
|
||||
movs r0, #1
|
||||
b _0803A1EA
|
||||
_0803A1E8:
|
||||
movs r0, #2
|
||||
_0803A1EA:
|
||||
orrs r0, r2
|
||||
strb r0, [r3]
|
||||
ldr r2, [r4, #0x54]
|
||||
ldrb r1, [r5]
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x3d
|
||||
strb r1, [r0]
|
||||
ldr r2, [r4, #0x74]
|
||||
ldrb r1, [r5]
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x3d
|
||||
strb r1, [r0]
|
||||
ldr r0, _0803A20C @ =0x00000127
|
||||
bl SoundReq
|
||||
b _0803A23E
|
||||
.align 2, 0
|
||||
_0803A20C: .4byte 0x00000127
|
||||
_0803A210:
|
||||
ldr r2, [r4, #0x54]
|
||||
adds r3, r4, #0
|
||||
adds r3, #0x3d
|
||||
ldrb r1, [r3]
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x3d
|
||||
strb r1, [r0]
|
||||
ldr r2, [r4, #0x74]
|
||||
ldrb r1, [r3]
|
||||
adds r0, r2, #0
|
||||
adds r0, #0x3d
|
||||
strb r1, [r0]
|
||||
adds r0, r4, #0
|
||||
movs r1, #0x18
|
||||
bl InitializeAnimation
|
||||
ldr r0, [r4, #0x54]
|
||||
movs r1, #9
|
||||
bl InitAnimationForceUpdate
|
||||
ldr r0, _0803A248 @ =0x00000127
|
||||
bl SoundReq
|
||||
_0803A23E:
|
||||
ldr r1, _0803A24C @ =gUnk_080CFC14
|
||||
adds r0, r4, #0
|
||||
bl sub_0804AA30
|
||||
pop {r4, r5, pc}
|
||||
.align 2, 0
|
||||
_0803A248: .4byte 0x00000127
|
||||
_0803A24C: .4byte gUnk_080CFC14
|
||||
|
||||
.syntax divided
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
.syntax unified
|
||||
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r2, _0803AB0C @ =gUnk_080CED6C
|
||||
ldr r0, [r4, #0x50]
|
||||
ldrb r0, [r0, #0xf]
|
||||
lsrs r0, r0, #4
|
||||
adds r0, #3
|
||||
ldrb r1, [r4, #0xa]
|
||||
lsls r1, r1, #1
|
||||
adds r0, r0, r1
|
||||
movs r1, #7
|
||||
ands r0, r1
|
||||
adds r0, r0, r2
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
adds r0, #4
|
||||
strh r0, [r4, #0x36]
|
||||
adds r0, r4, #0
|
||||
bl sub_0803B870
|
||||
cmp r0, #0
|
||||
bne _0803AB0A
|
||||
adds r0, r4, #0
|
||||
bl sub_0806F69C
|
||||
adds r0, r4, #0
|
||||
bl sub_0803B6F4
|
||||
cmp r0, #0
|
||||
beq _0803AB0A
|
||||
movs r0, #0x14
|
||||
strb r0, [r4, #0xc]
|
||||
movs r0, #0x40
|
||||
strh r0, [r4, #0x24]
|
||||
adds r0, r4, #0
|
||||
movs r1, #0xa
|
||||
bl InitializeAnimation
|
||||
ldr r2, [r4, #0x74]
|
||||
ldrb r1, [r2, #0x10]
|
||||
movs r0, #0x80
|
||||
orrs r0, r1
|
||||
strb r0, [r2, #0x10]
|
||||
ldr r2, [r4, #0x54]
|
||||
adds r1, r2, #0
|
||||
adds r1, #0x3f
|
||||
movs r0, #0x13
|
||||
strb r0, [r1]
|
||||
adds r0, r2, #0
|
||||
movs r1, #5
|
||||
bl InitAnimationForceUpdate
|
||||
movs r0, #0xb7
|
||||
lsls r0, r0, #1
|
||||
bl SoundReq
|
||||
_0803AB0A:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_0803AB0C: .4byte gUnk_080CED6C
|
||||
|
||||
.syntax divided
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
.syntax unified
|
||||
|
||||
push {r4, r5, r6, lr}
|
||||
adds r6, r0, #0
|
||||
adds r5, r1, #0
|
||||
movs r1, #0
|
||||
adds r4, r6, #0
|
||||
adds r4, #0x74
|
||||
ldrb r3, [r4]
|
||||
movs r2, #0xe0
|
||||
ands r2, r3
|
||||
cmp r2, #0
|
||||
bne _0803BAEC
|
||||
cmp r3, #0
|
||||
bne _0803BAD2
|
||||
adds r2, r6, #0
|
||||
adds r2, #0x75
|
||||
ldrb r0, [r2]
|
||||
adds r0, #1
|
||||
strb r0, [r2]
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r0, r0, #0x18
|
||||
cmp r0, #9
|
||||
bls _0803BABA
|
||||
strb r1, [r2]
|
||||
_0803BABA:
|
||||
ldrb r0, [r6, #0xa]
|
||||
cmp r0, #2
|
||||
bne _0803BAC8
|
||||
ldr r1, _0803BAC4 @ =gUnk_080CFD30
|
||||
b _0803BACA
|
||||
.align 2, 0
|
||||
_0803BAC4: .4byte gUnk_080CFD30
|
||||
_0803BAC8:
|
||||
ldr r1, _0803BAE8 @ =gUnk_080CFD44
|
||||
_0803BACA:
|
||||
ldrb r0, [r2]
|
||||
lsls r0, r0, #1
|
||||
adds r0, r0, r1
|
||||
ldrh r1, [r0]
|
||||
_0803BAD2:
|
||||
adds r2, r6, #0
|
||||
adds r2, #0x74
|
||||
ldrb r0, [r2]
|
||||
adds r0, #1
|
||||
strb r0, [r2]
|
||||
cmp r5, r0
|
||||
bhi _0803BB18
|
||||
movs r0, #0
|
||||
strb r0, [r2]
|
||||
b _0803BB18
|
||||
.align 2, 0
|
||||
_0803BAE8: .4byte gUnk_080CFD44
|
||||
_0803BAEC:
|
||||
movs r0, #0x80
|
||||
ands r0, r2
|
||||
cmp r0, #0
|
||||
bne _0803BB18
|
||||
movs r0, #0x80
|
||||
orrs r0, r3
|
||||
strb r0, [r4]
|
||||
movs r0, #0x20
|
||||
ands r2, r0
|
||||
cmp r2, #0
|
||||
beq _0803BB0C
|
||||
ldr r1, _0803BB08 @ =gUnk_080CFD58
|
||||
b _0803BB0E
|
||||
.align 2, 0
|
||||
_0803BB08: .4byte gUnk_080CFD58
|
||||
_0803BB0C:
|
||||
ldr r1, _0803BB78 @ =gUnk_080CFD5C
|
||||
_0803BB0E:
|
||||
ldrb r0, [r6, #0xa]
|
||||
subs r0, #2
|
||||
lsls r0, r0, #1
|
||||
adds r0, r0, r1
|
||||
ldrh r1, [r0]
|
||||
_0803BB18:
|
||||
cmp r1, #0
|
||||
beq _0803BB74
|
||||
adds r0, r6, #0
|
||||
bl sub_0801D2B4
|
||||
ldr r0, [r6, #0x50]
|
||||
ldr r4, [r0, #0x78]
|
||||
ldrb r1, [r6, #0x1a]
|
||||
lsls r1, r1, #0x1c
|
||||
lsrs r1, r1, #0x1c
|
||||
ldrb r2, [r4, #0x1a]
|
||||
movs r3, #0x10
|
||||
rsbs r3, r3, #0
|
||||
adds r0, r3, #0
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
strb r0, [r4, #0x1a]
|
||||
ldr r0, [r6, #0x50]
|
||||
ldr r5, [r0, #0x78]
|
||||
ldrb r1, [r6, #0x1a]
|
||||
lsls r1, r1, #0x1c
|
||||
lsrs r1, r1, #0x18
|
||||
ldrb r4, [r5, #0x1a]
|
||||
movs r2, #0xf
|
||||
adds r0, r2, #0
|
||||
ands r0, r4
|
||||
orrs r0, r1
|
||||
strb r0, [r5, #0x1a]
|
||||
ldr r0, [r6, #0x50]
|
||||
ldr r4, [r0, #0x54]
|
||||
ldrb r0, [r6, #0x1a]
|
||||
lsls r0, r0, #0x1c
|
||||
lsrs r0, r0, #0x1c
|
||||
ldrb r1, [r4, #0x1a]
|
||||
ands r3, r1
|
||||
orrs r3, r0
|
||||
strb r3, [r4, #0x1a]
|
||||
ldr r0, [r6, #0x50]
|
||||
ldr r3, [r0, #0x54]
|
||||
ldrb r0, [r6, #0x1a]
|
||||
lsls r0, r0, #0x1c
|
||||
lsrs r0, r0, #0x18
|
||||
ldrb r1, [r3, #0x1a]
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
strb r2, [r3, #0x1a]
|
||||
_0803BB74:
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
_0803BB78: .4byte gUnk_080CFD5C
|
||||
.syntax divided
|
||||
@@ -1,109 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
|
||||
gUnk_080CFC14:: @ 080CFC14
|
||||
.4byte sub_0803A170
|
||||
.4byte sub_0803A188
|
||||
.4byte sub_08001324
|
||||
.4byte sub_0804A7D4
|
||||
.4byte sub_08001242
|
||||
.4byte nullsub_167
|
||||
|
||||
gUnk_080CFC2C:: @ 080CFC2C
|
||||
.4byte sub_0803A254
|
||||
.4byte sub_0803A254
|
||||
.4byte sub_0803B8F8
|
||||
.4byte sub_0803B8F8
|
||||
|
||||
gUnk_080CFC3C:: @ 080CFC3C
|
||||
.4byte sub_0803A274
|
||||
.4byte sub_0803A364
|
||||
.4byte sub_0803A548
|
||||
.4byte sub_0803A58C
|
||||
.4byte sub_0803A5D0
|
||||
.4byte sub_0803A60C
|
||||
.4byte sub_0803A660
|
||||
.4byte sub_0803A6E8
|
||||
.4byte sub_0803A720
|
||||
.4byte sub_0803A740
|
||||
.4byte sub_0803A780
|
||||
.4byte sub_0803A7AC
|
||||
.4byte sub_0803A7CC
|
||||
.4byte sub_0803A814
|
||||
.4byte sub_0803A86C
|
||||
.4byte sub_0803A8B8
|
||||
.4byte sub_0803A90C
|
||||
.4byte sub_0803A978
|
||||
.4byte sub_0803AA00
|
||||
.4byte sub_0803AA98
|
||||
.4byte sub_0803AB10
|
||||
.4byte sub_0803AB5C
|
||||
.4byte sub_0803ABB4
|
||||
.4byte sub_0803AC1C
|
||||
.4byte sub_0803AC60
|
||||
.4byte sub_0803ACC0
|
||||
.4byte sub_0803ADAC
|
||||
.4byte sub_0803ADF4
|
||||
.4byte sub_0803AE48
|
||||
.4byte sub_0803AEC4
|
||||
.4byte sub_0803AF18
|
||||
.4byte sub_0803AF50
|
||||
.4byte sub_0803AF7C
|
||||
.4byte sub_0803AF9C
|
||||
.4byte sub_0803AFC8
|
||||
.4byte sub_0803AFE0
|
||||
.4byte sub_0803B01C
|
||||
.4byte sub_0803B04C
|
||||
.4byte sub_0803B074
|
||||
.4byte sub_0803B0D4
|
||||
.4byte sub_0803B100
|
||||
.4byte sub_0803B144
|
||||
.4byte sub_0803B17C
|
||||
.4byte sub_0803B1B8
|
||||
.4byte sub_0803B2D0
|
||||
.4byte sub_0803B30C
|
||||
.4byte sub_0803B338
|
||||
.4byte sub_0803B35C
|
||||
.4byte sub_0803B398
|
||||
.4byte sub_0803B3F4
|
||||
.4byte sub_0803B480
|
||||
|
||||
gUnk_080CFD08:: @ 080CFD08
|
||||
.incbin "baserom.gba", 0x0CFD08, 0x0000002
|
||||
|
||||
gUnk_080CFD0A:: @ 080CFD0A
|
||||
.incbin "baserom.gba", 0x0CFD0A, 0x0000002
|
||||
|
||||
gUnk_080CFD0C:: @ 080CFD0C
|
||||
.incbin "baserom.gba", 0x0CFD0C, 0x000000D
|
||||
|
||||
gUnk_080CFD19:: @ 080CFD19
|
||||
.incbin "baserom.gba", 0x0CFD19, 0x0000002
|
||||
|
||||
gUnk_080CFD1B:: @ 080CFD1B
|
||||
.incbin "baserom.gba", 0x0CFD1B, 0x0000002
|
||||
|
||||
gUnk_080CFD1D:: @ 080CFD1D
|
||||
.incbin "baserom.gba", 0x0CFD1D, 0x0000003
|
||||
|
||||
gUnk_080CFD20:: @ 080CFD20
|
||||
.4byte sub_0803B910
|
||||
.4byte sub_0803B978
|
||||
.4byte sub_0803BA6C
|
||||
.4byte sub_0803BA80
|
||||
|
||||
gUnk_080CFD30:: @ 080CFD30
|
||||
.incbin "baserom.gba", 0x0CFD30, 0x0000014
|
||||
|
||||
gUnk_080CFD44:: @ 080CFD44
|
||||
.incbin "baserom.gba", 0x0CFD44, 0x0000014
|
||||
|
||||
gUnk_080CFD58:: @ 080CFD58
|
||||
.incbin "baserom.gba", 0x0CFD58, 0x0000004
|
||||
|
||||
gUnk_080CFD5C:: @ 080CFD5C
|
||||
.incbin "baserom.gba", 0x0CFD5C, 0x0000004
|
||||
@@ -1,27 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CEF34:: @ 080CEF34
|
||||
.4byte gUnk_080FD394
|
||||
.4byte gUnk_080FD394
|
||||
.4byte gUnk_080FD394
|
||||
.4byte gUnk_080FD39C
|
||||
.4byte gUnk_080FD3A4
|
||||
.4byte gUnk_080FD3AC
|
||||
.4byte gUnk_080FD3AC
|
||||
.4byte gUnk_080FD3AC
|
||||
.4byte gUnk_080FD3AC
|
||||
|
||||
gUnk_080CEF58:: @ 080CEF58
|
||||
.4byte gUnk_080FD3B4
|
||||
.4byte gUnk_080FD3B4
|
||||
.4byte gUnk_080FD3B4
|
||||
.4byte gUnk_080FD3BC
|
||||
.4byte gUnk_080FD3A4
|
||||
.4byte gUnk_080FD3C4
|
||||
.4byte gUnk_080FD3C4
|
||||
.4byte gUnk_080FD3C4
|
||||
.4byte gUnk_080FD3C4
|
||||
@@ -1,96 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CEC88:: @ 080CEC88
|
||||
.4byte sub_08033EF0
|
||||
.4byte sub_08033F08
|
||||
.4byte sub_08001324
|
||||
.4byte sub_0804A7D4
|
||||
.4byte sub_08001242
|
||||
.4byte nullsub_160
|
||||
|
||||
gUnk_080CECA0:: @ 080CECA0
|
||||
.4byte sub_08033F1C
|
||||
.4byte sub_08034A84
|
||||
.4byte sub_08034AC4
|
||||
.4byte sub_08034AC4
|
||||
.4byte sub_08034BC8
|
||||
|
||||
gUnk_080CECB4:: @ 080CECB4
|
||||
.4byte sub_08033F3C
|
||||
.4byte sub_08033FFC
|
||||
.4byte sub_0803414C
|
||||
.4byte sub_080341B8
|
||||
.4byte sub_080341D0
|
||||
.4byte sub_080341F4
|
||||
.4byte sub_08034210
|
||||
.4byte sub_08034240
|
||||
.4byte sub_08034274
|
||||
.4byte sub_080342A0
|
||||
.4byte sub_080342B4
|
||||
.4byte sub_080342C8
|
||||
.4byte sub_08034348
|
||||
.4byte sub_0803438C
|
||||
|
||||
gUnk_080CECEC:: @ 080CECEC
|
||||
.incbin "baserom.gba", 0x0CECEC, 0x0000008
|
||||
|
||||
gUnk_080CECF4:: @ 080CECF4
|
||||
.incbin "baserom.gba", 0x0CECF4, 0x000000E
|
||||
|
||||
gUnk_080CED02:: @ 080CED02
|
||||
.incbin "baserom.gba", 0x0CED02, 0x0000004
|
||||
|
||||
gUnk_080CED06:: @ 080CED06
|
||||
.incbin "baserom.gba", 0x0CED06, 0x0000006
|
||||
|
||||
gUnk_080CED0C:: @ 080CED0C
|
||||
.4byte sub_08034578
|
||||
.4byte sub_080344E0
|
||||
.4byte sub_0803451C
|
||||
.4byte sub_080344E0
|
||||
.4byte sub_08034558
|
||||
.4byte sub_080344E0
|
||||
.4byte sub_0803451C
|
||||
.4byte sub_080346A0
|
||||
|
||||
gUnk_080CED2C:: @ 080CED2C
|
||||
.4byte sub_08034578
|
||||
.4byte sub_080345D0
|
||||
.4byte sub_0803451C
|
||||
.4byte sub_080346A0
|
||||
.4byte sub_08034558
|
||||
.4byte sub_080345D0
|
||||
.4byte sub_08034558
|
||||
.4byte sub_080346A0
|
||||
|
||||
gUnk_080CED4C:: @ 080CED4C
|
||||
.4byte sub_08034578
|
||||
.4byte sub_080345D0
|
||||
.4byte sub_080346C8
|
||||
.4byte sub_080346A0
|
||||
.4byte sub_08034558
|
||||
.4byte sub_080346C8
|
||||
.4byte sub_080346A0
|
||||
.4byte sub_080346C8
|
||||
|
||||
gUnk_080CED6C:: @ 080CED6C
|
||||
.incbin "baserom.gba", 0x0CED6C, 0x0000008
|
||||
|
||||
gUnk_080CED74:: @ 080CED74
|
||||
.4byte sub_08034AEC
|
||||
.4byte sub_08034B0C
|
||||
.4byte sub_08034B38
|
||||
.4byte sub_08034BA0
|
||||
|
||||
gUnk_080CED84:: @ 080CED84
|
||||
.incbin "baserom.gba", 0x0CED84, 0x0000004
|
||||
|
||||
gUnk_080CED88:: @ 080CED88
|
||||
.incbin "baserom.gba", 0x0CED88, 0x0000014
|
||||
|
||||
gUnk_080CED9C:: @ 080CED9C
|
||||
.incbin "baserom.gba", 0x0CED9C, 0x0000014
|
||||
@@ -1,37 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_080CEE90:: @ 080CEE90
|
||||
.4byte sub_08034C7C
|
||||
.4byte sub_08034CA4
|
||||
.4byte sub_08001324
|
||||
.4byte sub_08034CBC
|
||||
.4byte sub_08001242
|
||||
|
||||
gUnk_080CEEA4:: @ 080CEEA4
|
||||
.4byte sub_08034CC4
|
||||
.4byte sub_08034D4C
|
||||
.4byte sub_08034DC8
|
||||
|
||||
gUnk_080CEEB0:: @ 080CEEB0
|
||||
.4byte sub_08034E30
|
||||
.4byte sub_08034E68
|
||||
.4byte sub_08034EC0
|
||||
.4byte sub_08034ED8
|
||||
.4byte sub_08034EE4
|
||||
.4byte sub_08034F58
|
||||
|
||||
gUnk_080CEEC8:: @ 080CEEC8
|
||||
.incbin "baserom.gba", 0x0CEEC8, 0x0000004
|
||||
|
||||
gUnk_080CEECC:: @ 080CEECC
|
||||
.incbin "baserom.gba", 0x0CEECC, 0x000000C
|
||||
|
||||
gUnk_080CEED8:: @ 080CEED8
|
||||
.incbin "baserom.gba", 0x0CEED8, 0x0000004
|
||||
|
||||
gUnk_080CEEDC:: @ 080CEEDC
|
||||
.incbin "baserom.gba", 0x0CEEDC, 0x000002C
|
||||
@@ -185,7 +185,6 @@ SECTIONS {
|
||||
. = 0x00001020; gUnk_03001020 = .;
|
||||
. = 0x000010A0; gScreenTransition = .;
|
||||
. = 0x000010AC; gUnk_030010AC = .;
|
||||
. = 0x000010D8; gUnk_030010D8 = .;
|
||||
. = 0x000010EC; gUnk_030010EC = .;
|
||||
. = 0x0000110C; gUnk_0300110C = .;
|
||||
. = 0x00001150; gRand = .;
|
||||
@@ -396,9 +395,9 @@ SECTIONS {
|
||||
asm/bombarossa.o(.text);
|
||||
src/enemy/wisp.o(.text);
|
||||
asm/spinyBeetle.o(.text);
|
||||
asm/mazaalHead.o(.text);
|
||||
asm/mazaalMacro.o(.text);
|
||||
asm/mazaalHand.o(.text);
|
||||
src/enemy/mazaalHead.o(.text);
|
||||
src/enemy/mazaalMacro.o(.text);
|
||||
src/enemy/mazaalHand.o(.text);
|
||||
asm/octorokBoss.o(.text);
|
||||
asm/flyingPot.o(.text);
|
||||
src/enemy/gibdo.o(.text);
|
||||
@@ -410,7 +409,7 @@ SECTIONS {
|
||||
asm/cuccoAggr.o(.text);
|
||||
asm/stalfos.o(.text);
|
||||
asm/flyingSkull.o(.text);
|
||||
asm/mazaalBracelet.o(.text);
|
||||
src/enemy/mazaalBracelet.o(.text);
|
||||
asm/takkuri.o(.text);
|
||||
src/enemy/bowMoblin.o(.text);
|
||||
asm/bowMoblin.o(.text);
|
||||
@@ -1093,11 +1092,11 @@ SECTIONS {
|
||||
data/animations/enemy/wisp.o(.rodata);
|
||||
data/const/enemy/spinyBeetle.o(.rodata);
|
||||
data/animations/enemy/spinyBeetle.o(.rodata);
|
||||
data/const/enemy/mazaalHead.o(.rodata);
|
||||
src/enemy/mazaalHead.o(.rodata);
|
||||
data/animations/enemy/mazaalHead.o(.rodata);
|
||||
data/const/enemy/mazaalMacro.o(.rodata);
|
||||
src/enemy/mazaalMacro.o(.rodata);
|
||||
data/animations/enemy/mazaalMacro.o(.rodata);
|
||||
data/const/enemy/mazaalHand.o(.rodata);
|
||||
src/enemy/mazaalHand.o(.rodata);
|
||||
data/animations/enemy/mazaalHand.o(.rodata);
|
||||
data/const/enemy/octorokBoss.o(.rodata);
|
||||
data/animations/enemy/octorokBoss.o(.rodata);
|
||||
@@ -1117,7 +1116,7 @@ SECTIONS {
|
||||
data/animations/enemy/stalfos.o(.rodata);
|
||||
data/const/enemy/flyingSkull.o(.rodata);
|
||||
data/animations/enemy/flyingSkull.o(.rodata);
|
||||
data/const/enemy/mazaalBracelet.o(.rodata);
|
||||
src/enemy/mazaalBracelet.o(.rodata);
|
||||
data/animations/enemy/mazaalBracelet.o(.rodata);
|
||||
data/const/enemy/takkuri.o(.rodata);
|
||||
data/const/enemy/bowMoblin.o(.rodata);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
void sub_08035194(Entity*);
|
||||
|
||||
extern const Hitbox gUnk_080FD394;
|
||||
extern const Hitbox gUnk_080FD39C;
|
||||
extern const Hitbox gUnk_080FD3A4;
|
||||
extern const Hitbox gUnk_080FD3AC;
|
||||
extern const Hitbox gUnk_080FD3B4;
|
||||
extern const Hitbox gUnk_080FD3BC;
|
||||
extern const Hitbox gUnk_080FD3C4;
|
||||
|
||||
const Hitbox* const gUnk_080CEF34[] = {
|
||||
&gUnk_080FD394, &gUnk_080FD394, &gUnk_080FD394, &gUnk_080FD39C, &gUnk_080FD3A4,
|
||||
&gUnk_080FD3AC, &gUnk_080FD3AC, &gUnk_080FD3AC, &gUnk_080FD3AC,
|
||||
};
|
||||
const Hitbox* const gUnk_080CEF58[] = {
|
||||
&gUnk_080FD3B4, &gUnk_080FD3B4, &gUnk_080FD3B4, &gUnk_080FD3BC, &gUnk_080FD3A4,
|
||||
&gUnk_080FD3C4, &gUnk_080FD3C4, &gUnk_080FD3C4, &gUnk_080FD3C4,
|
||||
};
|
||||
|
||||
void MazaalHand(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.flipX = this->type;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
sub_08035194(this);
|
||||
}
|
||||
|
||||
void sub_08035194(Entity* this) {
|
||||
if (this->type == 0) {
|
||||
this->hitbox = (Hitbox*)gUnk_080CEF34[this->frameIndex];
|
||||
} else {
|
||||
this->hitbox = (Hitbox*)gUnk_080CEF58[this->frameIndex];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,827 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "screen.h"
|
||||
#include "audio.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void UnloadOBJPalette(Entity*);
|
||||
extern void DoExitTransition(ScreenTransitionData*);
|
||||
|
||||
extern u8 gEntCount;
|
||||
|
||||
void sub_0803499C(Entity*);
|
||||
void sub_08034420(Entity*);
|
||||
void sub_08034830(Entity*);
|
||||
u32 sub_080349D8(Entity*);
|
||||
void sub_0803442C(Entity*, u32);
|
||||
void sub_0803443C(Entity*);
|
||||
void sub_080347B4(Entity*);
|
||||
void sub_0803473C(Entity*);
|
||||
u32 sub_08034A10(Entity*);
|
||||
void sub_080347FC(Entity*);
|
||||
void sub_080344BC(Entity*);
|
||||
void sub_08034498(Entity*);
|
||||
void sub_08034474(Entity*);
|
||||
void sub_080345A0(Entity*);
|
||||
void sub_080345B8(Entity*);
|
||||
void sub_08034638(Entity*);
|
||||
void sub_08034618(Entity*);
|
||||
void sub_08034658(Entity*);
|
||||
void sub_0803467C(Entity*);
|
||||
u32 sub_080348A4(Entity*, Entity*, u32);
|
||||
void sub_08034C00(Entity*);
|
||||
|
||||
void sub_08033EF0(Entity* this);
|
||||
void sub_08033F08(Entity* this);
|
||||
void nullsub_160(Entity* this);
|
||||
void sub_08033F1C(Entity* this);
|
||||
void sub_08034A84(Entity* this);
|
||||
void sub_08034AC4(Entity* this);
|
||||
void sub_08034BC8(Entity* this);
|
||||
void sub_08033F3C(Entity* this);
|
||||
void sub_08033FFC(Entity* this);
|
||||
void sub_0803414C(Entity* this);
|
||||
void sub_080341B8(Entity* this);
|
||||
void sub_080341D0(Entity* this);
|
||||
void sub_080341F4(Entity* this);
|
||||
void sub_08034210(Entity* this);
|
||||
void sub_08034240(Entity* this);
|
||||
void sub_08034274(Entity* this);
|
||||
void sub_080342A0(Entity* this);
|
||||
void sub_080342B4(Entity* this);
|
||||
void sub_080342C8(Entity* this);
|
||||
void sub_08034348(Entity* this);
|
||||
void sub_0803438C(Entity* this);
|
||||
void sub_08034578(Entity* this);
|
||||
void sub_080344E0(Entity* this);
|
||||
void sub_0803451C(Entity* this);
|
||||
void sub_08034558(Entity* this);
|
||||
void sub_080346A0(Entity* this);
|
||||
void sub_080345D0(Entity* this);
|
||||
void sub_080346C8(Entity* this);
|
||||
void sub_08034AEC(Entity* this);
|
||||
void sub_08034B0C(Entity* this);
|
||||
void sub_08034B38(Entity* this);
|
||||
void sub_08034BA0(Entity* this);
|
||||
|
||||
void (*const gUnk_080CEC88[])(Entity*) = {
|
||||
sub_08033EF0, sub_08033F08, sub_08001324, sub_0804A7D4, sub_08001242, nullsub_160,
|
||||
};
|
||||
void (*const gUnk_080CECA0[])(Entity*) = {
|
||||
sub_08033F1C, sub_08034A84, sub_08034AC4, sub_08034AC4, sub_08034BC8,
|
||||
};
|
||||
void (*const gUnk_080CECB4[])(Entity*) = {
|
||||
sub_08033F3C, sub_08033FFC, sub_0803414C, sub_080341B8, sub_080341D0, sub_080341F4, sub_08034210,
|
||||
sub_08034240, sub_08034274, sub_080342A0, sub_080342B4, sub_080342C8, sub_08034348, sub_0803438C,
|
||||
};
|
||||
const u8 gUnk_080CECEC[] = { 0xff, 0xfe, 0xff, 0x00, 0x01, 0x02, 0x01, 0x00 };
|
||||
const s8 gUnk_080CECF4[] = { -2, 0x01, -8, -4, -0x14, 0x08, 0x0e, -0x10, -6, 0x0c, 0x12, -2, 0x00, 0x00 };
|
||||
const u8 gUnk_080CED02[] = { 0x46, 0x46, 0x47, 0x48 };
|
||||
const u8 gUnk_080CED06[] = { 0xff, 0x00, 0x01, 0x00, 0x00, 0x00 };
|
||||
void (*const gUnk_080CED0C[])(Entity*) = {
|
||||
sub_08034578, sub_080344E0, sub_0803451C, sub_080344E0, sub_08034558, sub_080344E0, sub_0803451C, sub_080346A0,
|
||||
};
|
||||
void (*const gUnk_080CED2C[])(Entity*) = {
|
||||
sub_08034578, sub_080345D0, sub_0803451C, sub_080346A0, sub_08034558, sub_080345D0, sub_08034558, sub_080346A0,
|
||||
};
|
||||
void (*const gUnk_080CED4C[])(Entity*) = {
|
||||
sub_08034578, sub_080345D0, sub_080346C8, sub_080346A0, sub_08034558, sub_080346C8, sub_080346A0, sub_080346C8,
|
||||
};
|
||||
const s8 gUnk_080CED6C[] = { -0xa, -0xb, -0xc, -0xb, -0xa, -0x9, -0x8, -0x9 };
|
||||
void (*const gUnk_080CED74[])(Entity*) = {
|
||||
sub_08034AEC,
|
||||
sub_08034B0C,
|
||||
sub_08034B38,
|
||||
sub_08034BA0,
|
||||
};
|
||||
const s8 gUnk_080CED84[] = { 0x0d, 0x10, -0xd, 0x10 };
|
||||
const ScreenTransitionData gUnk_080CED88 = { 1, { 0, 0, 0, 0 }, 0x88, 0xf8, 0, 0x5a, 1, 1, 0, 0, 0 };
|
||||
const ScreenTransitionData gUnk_080CED9C = { 1, { 0, 0, 0, 0 }, 0x88, 0xf8, 0, 0x5a, 0, 1, 0, 0, 0 };
|
||||
|
||||
void MazaalHead(Entity* this) {
|
||||
gUnk_080CEC88[GetNextFunction(this)](this);
|
||||
}
|
||||
|
||||
void sub_08033EF0(Entity* this) {
|
||||
gUnk_080CECA0[this->type](this);
|
||||
}
|
||||
|
||||
void sub_08033F08(Entity* this) {
|
||||
sub_0804AA30(this, gUnk_080CEC88);
|
||||
}
|
||||
|
||||
void nullsub_160(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08033F1C(Entity* this) {
|
||||
gUnk_080CECB4[this->action](this);
|
||||
sub_0803499C(this);
|
||||
}
|
||||
|
||||
void sub_08033F3C(Entity* this) {
|
||||
Entity* pEVar1;
|
||||
Entity* pEVar2;
|
||||
|
||||
if (gEntCount < 0x43) {
|
||||
if (gScreenTransition.field_0x38 != 0) {
|
||||
sub_08034420(this);
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
} else {
|
||||
this->action = 1;
|
||||
}
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->field_0x6c.HALF.HI |= 1;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
InitializeAnimation(this, 0);
|
||||
pEVar1 = CreateEnemy(0x36, 1);
|
||||
pEVar1->parent = this;
|
||||
pEVar2 = CreateObject(0x7e, 0, 0);
|
||||
pEVar2->parent = this;
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
this->action = 0xd;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0xfc;
|
||||
this->flags = this->flags & 0x7f;
|
||||
} else {
|
||||
pEVar2 = CreateEnemy(0x44, 0);
|
||||
pEVar2->parent = this;
|
||||
*(Entity**)&pEVar2->field_0x78 = this;
|
||||
*(Entity**)&this->field_0x74 = pEVar2;
|
||||
pEVar2 = CreateEnemy(0x44, 1);
|
||||
pEVar2->parent = this;
|
||||
*(Entity**)&pEVar2->field_0x78 = pEVar1;
|
||||
*(Entity**)&this->field_0x78 = pEVar2;
|
||||
CreateEnemy(0x36, 4)->parent = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08033FFC(Entity* this) {
|
||||
u16 temp;
|
||||
Entity* entity;
|
||||
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
case 2:
|
||||
case 5:
|
||||
break;
|
||||
case 1:
|
||||
this->subAction = 2;
|
||||
this->actionDelay = 0x1e;
|
||||
entity = *(Entity**)&(*(Entity**)&this->field_0x74)->field_0x74;
|
||||
entity->subAction = 1;
|
||||
entity = *(Entity**)&(*(Entity**)&this->field_0x78)->field_0x74;
|
||||
entity->subAction = 1;
|
||||
UnloadOBJPalette(this);
|
||||
break;
|
||||
case 3:
|
||||
if (--this->actionDelay == 0) {
|
||||
this->subAction = 4;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
this->height.WORD += -0x8000;
|
||||
if (this->height.HALF.HI == -10) {
|
||||
this->subAction = 5;
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
this->subAction = 7;
|
||||
this->actionDelay = 0;
|
||||
entity = *(Entity**)&this->field_0x74;
|
||||
entity->subAction = 1;
|
||||
entity = *(Entity**)&entity->field_0x74;
|
||||
entity->subAction = 4;
|
||||
entity = *(Entity**)&this->field_0x78;
|
||||
entity->subAction = 1;
|
||||
entity = *(Entity**)&entity->field_0x74;
|
||||
entity->subAction = 4;
|
||||
gScreen.controls.layerFXControl = 0xf40;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
break;
|
||||
case 7:
|
||||
temp = ++this->actionDelay >> 1;
|
||||
gScreen.controls.alphaBlend = (temp) | (0x10 - (temp)) * 0x100;
|
||||
if (0x1f < (this->actionDelay & 0xff)) {
|
||||
this->subAction = 8;
|
||||
entity = *(Entity**)&this->field_0x74;
|
||||
entity->subAction = 3;
|
||||
entity = *(Entity**)&entity->field_0x74;
|
||||
entity->subAction = 6;
|
||||
entity = *(Entity**)&this->field_0x78;
|
||||
entity->subAction = 3;
|
||||
entity = *(Entity**)&entity->field_0x74;
|
||||
entity->subAction = 6;
|
||||
this->spriteRendering.alphaBlend = 0;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (((*(Entity**)&this->field_0x74)->flags & 0x80) != 0) {
|
||||
gRoomControls.cameraTarget = &gPlayerEntity;
|
||||
sub_08034420(this);
|
||||
gPlayerState.field_0x8b = 1;
|
||||
sub_080791D0();
|
||||
SoundReq(BGM_BOSS_THEME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803414C(Entity* this) {
|
||||
u32 x, y;
|
||||
|
||||
x = gRoomControls.roomOriginX + 0xb8;
|
||||
y = gRoomControls.roomOriginY + 0x48;
|
||||
|
||||
if (this->x.HALF.HI - x + 1 < 3 && this->y.HALF.HI - y + 1 < 3) {
|
||||
if (sub_080349D8(this)) {
|
||||
if (this->subAction != 0) {
|
||||
this->subAction = 0;
|
||||
sub_0803442C(this, 0x1e);
|
||||
} else {
|
||||
sub_0803442C(this, 0x5a);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y);
|
||||
sub_0806F69C(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080341B8(Entity* this) {
|
||||
if (sub_080349D8(this) != 0) {
|
||||
sub_0803442C(this, 0x2d);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080341D0(Entity* this) {
|
||||
if (((this->field_0x80.HALF.LO & 3) != 3) && (--this->actionDelay == 0)) {
|
||||
sub_0803443C(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080341F4(Entity* this) {
|
||||
sub_080347B4(this);
|
||||
if (sub_080349D8(this) != 0) {
|
||||
sub_08034420(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034210(Entity* this) {
|
||||
sub_080347B4(this);
|
||||
if ((this->field_0x7c.BYTES.byte1 & 0x80) != 0 && sub_080349D8(this) != 0) {
|
||||
sub_08034420(this);
|
||||
} else {
|
||||
sub_08034830(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034240(Entity* this) {
|
||||
if ((this->field_0x7c.HALF_U.HI != 0) && (--this->field_0x7c.HALF_U.HI < 0x96)) {
|
||||
sub_0803473C(this);
|
||||
}
|
||||
if (sub_080349D8(this) != 0) {
|
||||
sub_08034420(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034274(Entity* this) {
|
||||
if (sub_080349D8(this) != 0) {
|
||||
sub_08034420(this);
|
||||
} else {
|
||||
sub_0803473C(this);
|
||||
if (sub_08034A10(this) != 0) {
|
||||
sub_080347FC(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080342A0(Entity* this) {
|
||||
if (sub_080349D8(this) != 0) {
|
||||
sub_08034420(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080342B4(Entity* this) {
|
||||
if (this->field_0x7c.HALF_U.HI == 0xff) {
|
||||
sub_08034420(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080342C8(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
SoundReq(SFX_115);
|
||||
}
|
||||
this->spriteOffsetX = gUnk_080CECEC[this->actionDelay >> 1 & 7];
|
||||
} else {
|
||||
this->spriteOffsetX = 0;
|
||||
if (sub_08003FC4(this, 0x2000) == 0) {
|
||||
this->action = 0xc;
|
||||
this->field_0x7c.HALF.HI = 0x708;
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
sub_08080964(0x1e, 0);
|
||||
SoundReq(SFX_1A1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034348(Entity* this) {
|
||||
if (this->field_0x7c.HALF_U.HI != 0) {
|
||||
this->field_0x7c.HALF.HI--;
|
||||
} else {
|
||||
if (this->height.HALF.HI > -10) {
|
||||
this->height.HALF.HI--;
|
||||
} else {
|
||||
if (sub_080349D8(this) != 0) {
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
sub_08034420(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803438C(Entity* this) {
|
||||
Entity* pEVar3;
|
||||
const s8* pVar;
|
||||
|
||||
if (this->actionDelay == 0) {
|
||||
this->currentHealth = 0;
|
||||
} else {
|
||||
this->actionDelay--;
|
||||
if (this->actionDelay > 0xc0) {
|
||||
this->spriteOffsetX = gUnk_080CED06[this->actionDelay & 3];
|
||||
} else {
|
||||
if ((this->actionDelay & 0x1f) == 0) {
|
||||
pEVar3 = CreateFx(this, gUnk_080CED02[Random() & 3], 0);
|
||||
if (pEVar3 != NULL) {
|
||||
pVar = &gUnk_080CECF4[this->actionDelay >> 4];
|
||||
pEVar3->x.HALF.HI = *pVar + pEVar3->x.HALF.HI;
|
||||
pVar++;
|
||||
pEVar3->y.HALF.HI = *pVar + pEVar3->y.HALF.HI;
|
||||
pEVar3->spritePriority.b0 = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034420(Entity* this) {
|
||||
this->action = 2;
|
||||
this->field_0x7c.BYTES.byte1 = 3;
|
||||
}
|
||||
|
||||
void sub_0803442C(Entity* this, u32 unk) {
|
||||
this->action = 4;
|
||||
this->actionDelay = unk;
|
||||
this->field_0x7c.BYTES.byte1 = 3;
|
||||
}
|
||||
|
||||
void sub_0803443C(Entity* this) {
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
if (gScreenTransition.field_0x39 < 0x1f) {
|
||||
sub_080344BC(this);
|
||||
} else {
|
||||
if (gScreenTransition.field_0x39 < 0x3d) {
|
||||
sub_08034498(this);
|
||||
} else {
|
||||
sub_08034474(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034474(Entity* this) {
|
||||
gUnk_080CED0C[this->field_0x7c.BYTES.byte0](this);
|
||||
this->field_0x7c.BYTES.byte0 = (this->field_0x7c.BYTES.byte0 + 1) & 7;
|
||||
}
|
||||
|
||||
void sub_08034498(Entity* this) {
|
||||
gUnk_080CED2C[this->field_0x7c.BYTES.byte0](this);
|
||||
this->field_0x7c.BYTES.byte0 = (this->field_0x7c.BYTES.byte0 + 1) & 7;
|
||||
}
|
||||
|
||||
void sub_080344BC(Entity* this) {
|
||||
gUnk_080CED4C[this->field_0x7c.BYTES.byte0](this);
|
||||
this->field_0x7c.BYTES.byte0 = (this->field_0x7c.BYTES.byte0 + 1) & 7;
|
||||
}
|
||||
|
||||
void sub_080344E0(Entity* this) {
|
||||
if ((this->field_0x80.HALF.LO & 5) != 0) {
|
||||
sub_080345A0(this);
|
||||
} else {
|
||||
if ((this->field_0x80.HALF.LO & 10) != 0 || (Random() & 1) != 0) {
|
||||
sub_080345B8(this);
|
||||
} else {
|
||||
sub_080345A0(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803451C(Entity* this) {
|
||||
if ((this->field_0x80.HALF.LO & 5) != 0) {
|
||||
sub_08034618(this);
|
||||
} else if ((this->field_0x80.HALF.LO & 10) != 0) {
|
||||
sub_08034638(this);
|
||||
} else if ((Random() & 1) != 0) {
|
||||
sub_08034618(this);
|
||||
} else {
|
||||
sub_08034638(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034558(Entity* this) {
|
||||
if ((Random() & 1) != 0) {
|
||||
sub_08034658(this);
|
||||
} else {
|
||||
sub_0803467C(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034578(Entity* this) {
|
||||
this->action = 3;
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 0);
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 0);
|
||||
}
|
||||
|
||||
void sub_080345A0(Entity* this) {
|
||||
this->action = 5;
|
||||
this->field_0x7c.BYTES.byte1 = 1;
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 1);
|
||||
}
|
||||
|
||||
void sub_080345B8(Entity* this) {
|
||||
this->action = 5;
|
||||
this->field_0x7c.BYTES.byte1 = 2;
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 1);
|
||||
}
|
||||
|
||||
void sub_080345D0(Entity* this) {
|
||||
this->action = 6;
|
||||
if ((Random() & 1) != 0) {
|
||||
if (sub_080348A4(this, *(Entity**)&this->field_0x74, 2) == 0) {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 2);
|
||||
}
|
||||
} else {
|
||||
if (sub_080348A4(this, *(Entity**)&this->field_0x78, 2) == 0) {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034618(Entity* this) {
|
||||
this->action = 7;
|
||||
this->field_0x7c.BYTES.byte1 = 1;
|
||||
this->field_0x7c.HALF.HI = 0xb4;
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 3);
|
||||
}
|
||||
|
||||
void sub_08034638(Entity* this) {
|
||||
this->action = 7;
|
||||
this->field_0x7c.BYTES.byte1 = 2;
|
||||
this->field_0x7c.HALF.HI = 0xb4;
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 3);
|
||||
}
|
||||
|
||||
void sub_08034658(Entity* this) {
|
||||
this->action = 8;
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
if (sub_080348A4(this, *(Entity**)&this->field_0x78, 4) == 0) {
|
||||
this->field_0x7c.BYTES.byte1 |= 0x40;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0803467C(Entity* this) {
|
||||
this->action = 8;
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
if (sub_080348A4(this, *(Entity**)&this->field_0x74, 4) == 0) {
|
||||
this->field_0x7c.BYTES.byte1 |= 0x40;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080346A0(Entity* this) {
|
||||
this->action = 9;
|
||||
this->field_0x7c.BYTES.byte1 = 0;
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 6);
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 6);
|
||||
}
|
||||
|
||||
void sub_080346C8(Entity* this) {
|
||||
Entity* hand;
|
||||
|
||||
this->action = 10;
|
||||
this->field_0x7c.HALF.HI = 0;
|
||||
if ((Random() & 1) != 0) {
|
||||
if (sub_080348A4(this, *(Entity**)&this->field_0x74, 8) != 0) {
|
||||
hand = *(Entity**)&this->field_0x78;
|
||||
sub_080348A4(this, hand, 7);
|
||||
} else {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 7);
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 8);
|
||||
}
|
||||
} else {
|
||||
if (sub_080348A4(this, *(Entity**)&this->field_0x78, 8) != 0) {
|
||||
hand = *(Entity**)&this->field_0x74;
|
||||
sub_080348A4(this, hand, 7);
|
||||
} else {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 8);
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/mazaal/sub_0803473C.inc", void sub_0803473C(Entity* this)) {
|
||||
u32 direction;
|
||||
u32 playerX;
|
||||
u32 roomX;
|
||||
|
||||
if ((this->field_0x7c.BYTES.byte1 & 0x10) != 0) {
|
||||
if (0x28 < (*(Entity**)&this->field_0x74)->action) {
|
||||
return;
|
||||
}
|
||||
playerX = gPlayerEntity.x.HALF.HI - 0x60;
|
||||
} else {
|
||||
if (0x28 < (*(Entity**)&this->field_0x78)->action) {
|
||||
return;
|
||||
}
|
||||
playerX = gPlayerEntity.x.HALF.HI + 0x60;
|
||||
}
|
||||
roomX = gRoomControls.roomOriginX;
|
||||
if (playerX - 4 > this->x.HALF.HI) {
|
||||
if (roomX + 0xe0 < this->x.HALF.HI) {
|
||||
return;
|
||||
}
|
||||
direction = 8;
|
||||
} else {
|
||||
if (playerX + 4 >= this->x.HALF.HI) {
|
||||
return;
|
||||
}
|
||||
if (roomX + 0x90 > this->x.HALF.HI) {
|
||||
return;
|
||||
}
|
||||
direction = 0x18;
|
||||
}
|
||||
this->direction = direction;
|
||||
sub_0806F69C(this);
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
NONMATCH("asm/non_matching/mazaal/sub_080347B4.inc", void sub_080347B4(Entity* this)) {
|
||||
u32 direction;
|
||||
u32 playerX = gPlayerEntity.x.HALF.HI;
|
||||
u32 roomX = gRoomControls.roomOriginX;
|
||||
if (playerX - 4 > this->x.HALF.HI) {
|
||||
if (roomX + 0xe0 < this->x.HALF.HI) {
|
||||
return;
|
||||
}
|
||||
direction = 8;
|
||||
} else {
|
||||
if (playerX + 4 >= this->x.HALF.HI) {
|
||||
return;
|
||||
}
|
||||
if (roomX + 0x90 > this->x.HALF.HI) {
|
||||
return;
|
||||
}
|
||||
direction = 0x18;
|
||||
}
|
||||
this->direction = direction;
|
||||
sub_0806F69C(this);
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_080347FC(Entity* this) {
|
||||
if ((this->field_0x7c.BYTES.byte1 & 0x10) != 0) {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 5);
|
||||
} else {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 5);
|
||||
}
|
||||
this->field_0x7c.BYTES.byte1 |= 0x20;
|
||||
}
|
||||
|
||||
void sub_08034830(Entity* this) {
|
||||
if (sub_080349D8(this) != 0) {
|
||||
this->field_0x7c.BYTES.byte1 = 0x80;
|
||||
sub_080345D0(this);
|
||||
} else {
|
||||
if (sub_08034A10(this) != 0) {
|
||||
if ((this->field_0x80.HALF.LO & 0xf) != 0) {
|
||||
if (sub_080349D8(this) != 0) {
|
||||
sub_08034420(this);
|
||||
}
|
||||
} else {
|
||||
this->field_0x7c.BYTES.byte1 |= 0x20;
|
||||
if ((this->field_0x7c.BYTES.byte1 & 0x10) != 0) {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x78, 2);
|
||||
} else {
|
||||
sub_080348A4(this, *(Entity**)&this->field_0x74, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/mazaal/sub_080348A4.inc", u32 sub_080348A4(Entity* this, Entity* hand_, u32 unk)) {
|
||||
u8 bVar1;
|
||||
Entity* pEVar4;
|
||||
u32 temp;
|
||||
|
||||
if (hand_->type == 0) {
|
||||
bVar1 = 5;
|
||||
this->field_0x7c.BYTES.byte1 |= 0x10;
|
||||
} else {
|
||||
bVar1 = 10;
|
||||
}
|
||||
|
||||
if (this->field_0x80.HALF.LO & bVar1) {
|
||||
this->field_0x7c.BYTES.byte1 |= (hand_->type == 0) ? 1 : 2;
|
||||
return 0;
|
||||
} else {
|
||||
switch (unk) {
|
||||
case 0:
|
||||
hand_->action = 3;
|
||||
break;
|
||||
case 1:
|
||||
hand_->action = 4;
|
||||
hand_->field_0x7c.BYTES.byte0 = 3;
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
hand_->action = 4;
|
||||
hand_->field_0x7c.BYTES.byte0 = 1;
|
||||
break;
|
||||
case 3:
|
||||
hand_->action = 0xf;
|
||||
hand_->field_0x7c.HALF.HI = 0xb4;
|
||||
break;
|
||||
case 5:
|
||||
hand_->action = 0xf;
|
||||
hand_->field_0x7c.HALF.HI = 1;
|
||||
break;
|
||||
case 6:
|
||||
hand_->action = 0x1e;
|
||||
break;
|
||||
case 7:
|
||||
hand_->action = 0x1b;
|
||||
hand_->flags = hand_->flags & 0x7f;
|
||||
InitializeAnimation(hand_, 5);
|
||||
break;
|
||||
case 8:
|
||||
pEVar4 = CreateEnemy(0x36, hand_->type + 2);
|
||||
if (pEVar4 != NULL) {
|
||||
pEVar4->parent = this;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_0803499C(Entity* this) {
|
||||
if (((this->field_0x80.HALF.LO & 0xc) != 0xc) && (this->field_0x80.HALF.HI != 0)) {
|
||||
this->height.HALF.HI = gUnk_080CED6C[(++this->field_0xf >> 4) & 7];
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_080349D8(Entity* this) {
|
||||
// this feels like a switch, but I couldn't get it to match as one
|
||||
if ((this->field_0x7c.BYTES.byte1 & 3) == 3) {
|
||||
return 1;
|
||||
} else {
|
||||
if ((this->field_0x7c.BYTES.byte1 & 3) == 1) {
|
||||
if (this->field_0x80.HALF.LO & 10)
|
||||
return 1;
|
||||
} else {
|
||||
if ((this->field_0x7c.BYTES.byte1 & 3) == 2) {
|
||||
if (this->field_0x80.HALF.LO & 5)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/mazaal/sub_08034A10.inc", u32 sub_08034A10(Entity* this)) {
|
||||
if ((this->field_0x7c.BYTES.byte1 & 0x60) != 0x40) {
|
||||
if ((this->field_0x7c.BYTES.byte1 & 0x10) != 0) {
|
||||
if ((this->field_0x80.HALF.LO & 5) != 0) {
|
||||
this->field_0x7c.BYTES.byte1 |= 0x40;
|
||||
}
|
||||
if (((this->field_0x80.HALF.LO & 10) == 0) || ((this->field_0x7c.BYTES.byte1 & 3) != 1)) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if ((this->field_0x80.HALF.LO & 10) != 0) {
|
||||
this->field_0x7c.BYTES.byte1 |= 0x40;
|
||||
}
|
||||
if ((this->field_0x80.HALF.LO & 5) == 0) {
|
||||
return 0;
|
||||
}
|
||||
if ((this->field_0x7c.BYTES.byte1 & 3) != 2) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08034A84(Entity* this) {
|
||||
if (this->parent->next == NULL) {
|
||||
DeleteEntity(this);
|
||||
} else {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->spriteSettings.b.flipX = 1;
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
CopyPositionAndSpriteOffset(this->parent, this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034AC4(Entity* this) {
|
||||
PositionRelative(this->parent, this, 0, 0x10000);
|
||||
gUnk_080CED74[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08034AEC(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0x1e;
|
||||
InitializeAnimation(this, this->type + 1);
|
||||
SoundReq(SFX_151);
|
||||
}
|
||||
|
||||
void sub_08034B0C(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
} else {
|
||||
GetNextFrame(this);
|
||||
if ((this->frames.all & 0x80) == 0) {
|
||||
return;
|
||||
}
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x50;
|
||||
}
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/mazaal/sub_08034B38.inc", void sub_08034B38(Entity* this)) {
|
||||
Entity* target;
|
||||
const s8* ptr;
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 3;
|
||||
InitializeAnimation(this, this->type + 3);
|
||||
} else {
|
||||
target = sub_080A7EE0(0xe);
|
||||
if (target != NULL) {
|
||||
target->type -= 2;
|
||||
if (target->type == 0) {
|
||||
target->direction = 0xa8 - this->actionDelay;
|
||||
} else {
|
||||
target->direction = this->actionDelay + 0x58;
|
||||
}
|
||||
ptr = &gUnk_080CED84[target->type * 2];
|
||||
PositionRelative(this, target, *(ptr++) << 0x10, *ptr << 0x10);
|
||||
}
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08034BA0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frames.all & 0x80) != 0) {
|
||||
this->parent->field_0x7c.HALF.HI = 0xff;
|
||||
DeleteEntity(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034BC8(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
sub_0806FA90(this->parent, this, 0, 1);
|
||||
sub_0800445C(this);
|
||||
if (this->height.HALF.HI == 0) {
|
||||
sub_08034C00(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034C00(Entity* this) {
|
||||
if (((gPlayerState.flags.all & 0x80) != 0) &&
|
||||
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.roomOriginX,
|
||||
this->y.HALF.HI - gRoomControls.roomOriginY + 0xd, 3, 3) != 0) {
|
||||
if (gScreenTransition.field_0x39 >= 0x3d) {
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_080CED88);
|
||||
} else {
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_080CED9C);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "random.h"
|
||||
#include "script.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void DoExitTransition(ScreenTransitionData*);
|
||||
extern void sub_0807B600(u32);
|
||||
|
||||
extern const u16 script_08012E20[];
|
||||
extern const u8 gEntCount;
|
||||
|
||||
void sub_08034E18(Entity*);
|
||||
void sub_08034FA0(Entity*);
|
||||
u32 sub_08035084(Entity*);
|
||||
void sub_08034F70(Entity*);
|
||||
void sub_08035120(Entity*);
|
||||
void sub_08035050(Entity*);
|
||||
|
||||
void sub_08034C7C(Entity* this);
|
||||
void sub_08034CA4(Entity* this);
|
||||
void sub_08034CBC(Entity* this);
|
||||
void sub_08034CC4(Entity* this);
|
||||
void sub_08034D4C(Entity* this);
|
||||
void sub_08034DC8(Entity* this);
|
||||
void sub_08034E30(Entity* this);
|
||||
void sub_08034E68(Entity* this);
|
||||
void sub_08034EC0(Entity* this);
|
||||
void sub_08034ED8(Entity* this);
|
||||
void sub_08034EE4(Entity* this);
|
||||
void sub_08034F58(Entity* this);
|
||||
|
||||
void (*const gUnk_080CEE90[])(Entity*) = {
|
||||
sub_08034C7C, sub_08034CA4, sub_08001324, sub_08034CBC, sub_08001242,
|
||||
};
|
||||
void (*const gUnk_080CEEA4[])(Entity*) = {
|
||||
sub_08034CC4,
|
||||
sub_08034D4C,
|
||||
sub_08034DC8,
|
||||
};
|
||||
void (*const gUnk_080CEEB0[])(Entity*) = {
|
||||
sub_08034E30, sub_08034E68, sub_08034EC0, sub_08034ED8, sub_08034EE4, sub_08034F58,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CEEC8[] = { 0x46, 0x46, 0x47, 0x48 };
|
||||
const u8 gUnk_080CEECC[] = { 0x58, 0x68, 0x88, 0x68, 0xb8, 0x68, 0x58, 0xa8, 0x88, 0xa8, 0xb8, 0xa8 };
|
||||
const s16 gUnk_080CEED8[] = { -0x82, -0x81, -0x80, -0x7f, -0x7e, -0x42, -0x41, -0x40, -0x3f, -0x3e, -2, -1,
|
||||
1, 2, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x7e, 0x7f, 0x80, 0x81, 0x82 };
|
||||
|
||||
extern const ScreenTransitionData gUnk_0813ABA8;
|
||||
|
||||
void MazaalMacro(Entity* this) {
|
||||
gUnk_080CEE90[GetNextFunction(this)](this);
|
||||
}
|
||||
|
||||
void sub_08034C7C(Entity* this) {
|
||||
if (this->type != 2) {
|
||||
gUnk_080CEEA4[this->action](this);
|
||||
} else {
|
||||
sub_08034E18(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034CA4(Entity* this) {
|
||||
sub_08034FA0(this);
|
||||
sub_0804AA30(this, gUnk_080CEE90);
|
||||
}
|
||||
|
||||
void sub_08034CBC(Entity* this) {
|
||||
sub_0804A7D4(this);
|
||||
}
|
||||
|
||||
void sub_08034CC4(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
if (sub_08035084(this) != 0) {
|
||||
this->action = this->type + 1;
|
||||
this->field_0xf = 0;
|
||||
this->field_0x6c.HALF.HI |= 1;
|
||||
this->field_0x78.HWORD = 0x4b0;
|
||||
sub_08034F70(this);
|
||||
InitializeAnimation(this, this->type);
|
||||
SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
|
||||
entity = CreateEnemy(0x37, 2);
|
||||
if (entity != NULL) {
|
||||
this->attachedEntity = entity;
|
||||
entity->parent = this;
|
||||
CopyPosition(this, entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034D4C(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
GetNextFrame(this);
|
||||
if (--this->field_0x78.HWORD == 0) {
|
||||
if ((this->field_0xf < 8) && (entity = CreateEnemy(0x4b, 0), entity != (Entity*)0x0)) {
|
||||
entity->direction = (s32)Random() % 5 + 0xc;
|
||||
entity->x.HALF.HI = (gRoomControls.width / 2) + gRoomControls.roomOriginX;
|
||||
entity->y.HALF.HI = gRoomControls.roomOriginY + 8;
|
||||
entity->collisionLayer = 3;
|
||||
entity->parent = this;
|
||||
UpdateSpriteForCollisionLayer(entity);
|
||||
this->field_0x78.HWORD = 600;
|
||||
this->field_0xf = this->field_0xf + 1;
|
||||
} else {
|
||||
this->field_0x78.HWORD = 0x78;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034DC8(Entity* this) {
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
CreateFx(this, 0x51, 0);
|
||||
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034E18(Entity* this) {
|
||||
gUnk_080CEEB0[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08034E30(Entity* this) {
|
||||
this->action = this->parent->type + 1;
|
||||
this->collisionLayer = 2;
|
||||
this->spritePriority.b0 = 7;
|
||||
this->spritePriority.b1 = 0;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
|
||||
void sub_08034E68(Entity* this) {
|
||||
ScriptExecutionContext* scriptExecutionContext;
|
||||
|
||||
if (this->parent->next == NULL) {
|
||||
if (this->spriteSettings.b.draw != 0) {
|
||||
this->spriteSettings.b.draw = 0;
|
||||
sub_08035120(this);
|
||||
}
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
if (sub_08079F8C() != 0) {
|
||||
this->action = 3;
|
||||
scriptExecutionContext = StartCutscene(this, (u16*)script_08012E20);
|
||||
*(ScriptExecutionContext**)&this->cutsceneBeh = scriptExecutionContext;
|
||||
}
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034EC0(Entity* this) {
|
||||
if (this->parent->next == NULL) {
|
||||
sub_08035120(this);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034ED8(Entity* this) {
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
}
|
||||
|
||||
void sub_08034EE4(Entity* this) {
|
||||
u32 randomValue;
|
||||
Entity* entity;
|
||||
|
||||
if ((++this->actionDelay & 0xf) == 0) {
|
||||
randomValue = Random();
|
||||
entity = CreateFx(this, gUnk_080CEEC8[randomValue & 3], 0);
|
||||
if (entity != NULL) {
|
||||
entity->x.HALF.HI = (((randomValue >> 2) & 0x77) << 1) + 1 + gRoomControls.roomScrollX;
|
||||
entity->y.HALF.HI = ((randomValue >> 9) & 0x7e) + 1 + gRoomControls.roomScrollY;
|
||||
entity->collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(entity);
|
||||
}
|
||||
}
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
}
|
||||
|
||||
void sub_08034F58(Entity* this) {
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_0813ABA8);
|
||||
DeleteEntity(this);
|
||||
}
|
||||
|
||||
void sub_08034F70(Entity* this) {
|
||||
this->currentHealth = gScreenTransition.field_0x39;
|
||||
if (gScreenTransition.field_0x39 >= 0x3d) {
|
||||
this->type2 = 0;
|
||||
} else if (gScreenTransition.field_0x39 >= 0x1f) {
|
||||
this->type2 = 1;
|
||||
} else {
|
||||
this->type2 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08034FA0(Entity* this) {
|
||||
if (0 < this->iframes) {
|
||||
this->attachedEntity->iframes = this->iframes;
|
||||
sub_08080964(0xc, 1);
|
||||
}
|
||||
switch (this->type2) {
|
||||
case 0:
|
||||
if (this->currentHealth < 0x3c) {
|
||||
gScreenTransition.field_0x39 = 0x3c;
|
||||
sub_08035050(this);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this->currentHealth < 0x1e) {
|
||||
gScreenTransition.field_0x39 = 0x1e;
|
||||
sub_08035050(this);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (this->currentHealth == 0) {
|
||||
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
gScreenTransition.field_0x39 = this->currentHealth;
|
||||
}
|
||||
|
||||
void sub_08035050(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
this->flags = this->flags & 0x7f;
|
||||
this->currentHealth = 0;
|
||||
entity = CreateEnemy(0x4b, 0);
|
||||
if (entity != NULL) {
|
||||
entity->type2 = 1;
|
||||
entity->collisionLayer = 3;
|
||||
entity->parent = NULL;
|
||||
UpdateSpriteForCollisionLayer(entity);
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_08035084(Entity* this) {
|
||||
u32 vulnPillar;
|
||||
Entity* entity;
|
||||
u32 i;
|
||||
const u8* coords;
|
||||
|
||||
if (this->type == 0) {
|
||||
if (0x42 < gEntCount) {
|
||||
return 0;
|
||||
}
|
||||
do {
|
||||
vulnPillar = (s32)Random() % 6;
|
||||
} while (vulnPillar == gScreenTransition.field_0x38 >> 4);
|
||||
gScreenTransition.field_0x38 = (gScreenTransition.field_0x38 & 0xf) | (vulnPillar << 4);
|
||||
for (i = 0, coords = gUnk_080CEECC; i < 6; i++, coords += 2) {
|
||||
if (i == vulnPillar) {
|
||||
entity = this;
|
||||
} else {
|
||||
entity = CreateEnemy(0x37, 1);
|
||||
}
|
||||
entity->x.HALF.HI = gRoomControls.roomOriginX + *coords;
|
||||
entity->y.HALF.HI = gRoomControls.roomOriginY + *(coords + 1);
|
||||
entity->collisionLayer = 1;
|
||||
UpdateSpriteForCollisionLayer(entity);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void sub_08035120(Entity* this) {
|
||||
s32 tile;
|
||||
u32 i;
|
||||
|
||||
tile = COORD_TO_TILE(this);
|
||||
for (i = 0; i < 0x18; i++) {
|
||||
sub_0807B600(tile + gUnk_080CEED8[i]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user