Merge pull request #184 from notyourav/dd

effects.h and handwritten asm notes
This commit is contained in:
notyourav
2021-10-31 23:17:43 -07:00
committed by GitHub
110 changed files with 708 additions and 722 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ sub_08083F14: @ 0x08083F14
movs r2, #0x32
ldrsh r1, [r4, r2]
movs r2, #2
bl sub_080577AC
bl CreateMagicSparkles
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
+8 -5
View File
@@ -1264,14 +1264,17 @@ _0800268C:
.byte 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00
_0800269C: .4byte gUnk_0800232E
_080026A0: .4byte gUnk_08002342
gUnk_080026A4::
.4byte gUnk_020000B0
.4byte gUnk_03003D68
.4byte gUnk_03003DB0
.4byte gUnk_03005FBC
@ normal entities
.4byte gUnk_020000B0 @ enemy target? (player)
.4byte gUnk_03003D68 @ first linked list
.4byte gUnk_03003DB0 @ last linked list
.4byte gUnk_03005FBC @ entity table
@ managers
.4byte gUnk_020000B0
.4byte gUnk_03003DA8
.4byte gHitboxCount
.4byte gCollidableCount
.4byte gUnk_03005FBC
thumb_func_start sub_080026C4
+2 -2
View File
@@ -13,7 +13,7 @@ sub_08016B30: @ 0x08016B30
thumb_func_start sub_08016B34
sub_08016B34: @ 0x08016B34
ldr r1, _08016B54 @ =0x03007FFC
ldr r0, _08016B58 @ =IntrMain
ldr r0, _08016B58 @ =gIntrMain
str r0, [r1]
ldr r1, _08016B5C @ =0x04000004
ldr r2, _08016B60 @ =0x00005028
@@ -29,7 +29,7 @@ sub_08016B34: @ 0x08016B34
bx lr
.align 2, 0
_08016B54: .4byte 0x03007FFC
_08016B58: .4byte IntrMain
_08016B58: .4byte gIntrMain
_08016B5C: .4byte 0x04000004
_08016B60: .4byte 0x00005028
_08016B64: .4byte 0x04000200
+2 -2
View File
@@ -660,8 +660,8 @@ _0801DD7C: .4byte gAreaRoomHeaders
_0801DD80: .4byte gArea
_0801DD84: .4byte 0x0000085C
thumb_func_start sub_0801DD88
sub_0801DD88: @ 0x0801DD88
thumb_func_start LoadDungeonMap
LoadDungeonMap: @ 0x0801DD88
push {lr}
ldr r0, _0801DD98 @ =gUnk_0201AEE0
ldr r1, _0801DD9C @ =0x06006000
+2 -2
View File
@@ -5,8 +5,8 @@
.text
thumb_func_start sub_08050154
sub_08050154: @ 0x08050154
thumb_func_start UpdateFade
UpdateFade: @ 0x08050154
push {r4, r5, r6, lr}
ldr r4, _08050180 @ =gFadeControl
ldrh r0, [r4, #8]
+1 -1
View File
@@ -1230,7 +1230,7 @@ sub_080A5CFC: @ 0x080A5CFC
push {r4, lr}
adds r4, r0, #0
bl sub_0801DDA0
bl sub_0801DD88
bl LoadDungeonMap
ldr r1, _080A5D18 @ =gUnk_02019EE0
movs r2, #0x80
lsls r2, r2, #3
+1 -1
View File
@@ -33,7 +33,7 @@ _080000F0:
sp_irq: .4byte gUnk_03007FA0
sp_usr: .4byte gUnk_03007F00
INTR_VECTOR_BUF: .4byte 0x03007FFC
intr_main: .4byte IntrMain
intr_main: .4byte gIntrMain
.ifdef EU
unk_function: .4byte sub_08000118
.endif
+93 -70
View File
@@ -6,6 +6,10 @@
.text
.code 16
.global RAMFUNCS_BASE
RAMFUNCS_BASE::
sub_080B197C:: @ 0x080B197C
push {r4, r5, r6}
ldr r2, _080B19C0 @ =gRoomControls
@@ -250,13 +254,14 @@ _080B1C48: .4byte gUnk_080B7A3E
_080B1C4C: .4byte gRoomControls
_080B1C50: .4byte gUnk_08000278
arm_func_start sub_080B1C54
sub_080B1C54: @ 0x080B1C54
arm_func_start UpdateCollision
UpdateCollision: @ 0x080B1C54
@ r0 : Entity* this
ldrb r1, [r0, #0x10]
ands r1, r1, #0x80
ands r1, r1, #0x80 @ disable collision flag
bxeq lr
ldr r2, _080B200C @ =gUnk_03000E10
ldr r3, _080B2010 @ =gHitboxCount
ldr r2, _080B200C @ =gCollidableList
ldr r3, _080B2010 @ =gCollidableCount
ldrb r1, [r3]
str r0, [r2, r1, lsl #2]
add r1, r1, #1
@@ -340,8 +345,8 @@ _080B1D84:
pop {r4, r5, r6, r7, r8, sb, sl, lr}
bx lr
_080B1D8C: .4byte gUnk_02018EA0
_080B1D90: .4byte gUnk_03000E10
_080B1D94: .4byte gHitboxCount
_080B1D90: .4byte gCollidableList
_080B1D94: .4byte gCollidableCount
arm_func_start sub_080B1D98
sub_080B1D98: @ 0x080B1D98
@@ -525,33 +530,33 @@ _080B1FFC: .4byte gUnk_03005D5C
_080B2000: .4byte gUnk_03005D24
_080B2004: .4byte gUnk_03005D18
_080B2008: .4byte gUnk_03005D58
_080B200C: .4byte gUnk_03000E10
_080B2010: .4byte gHitboxCount
_080B200C: .4byte gCollidableList
_080B2010: .4byte gCollidableCount
_080B2014: .4byte gUnk_080B7B74
_080B2018: .4byte gUnk_080B3744
arm_func_start sub_080B201C
sub_080B201C: @ 0x080B201C
arm_func_start IntrMain
IntrMain:
mov r3, #0x4000000
add r3, r3, #0x200
ldr r2, [r3]
ldrh r1, [r3, #8]
ldr r2, [r3] @ lo 16: interrupt_enable, hi 16: interrupt_request
ldrh r1, [r3, #8] @ interrupt master enable
mrs r0, spsr
push {r0, r1, r2, r3, lr}
and r1, r2, r2, lsr #16
ands r0, r1, #0x2000
ands r0, r1, #0x2000 @ external irq
bne _080B20D4
mov ip, #4
ands r0, r1, #0x80
ands r0, r1, #0x80 @ serial comm
bne _080B2074
mov ip, #0xc
ands r0, r1, #4
ands r0, r1, #4 @ vcount
bne _080B2074
mov ip, #0x10
ands r0, r1, #1
ands r0, r1, #1 @ vblank
bne _080B2074
mov ip, #0x14
ands r0, r1, #0x40
ands r0, r1, #0x40 @ timer 3 overflow
bne _080B2074
mov ip, #0
_080B2074:
@@ -610,8 +615,8 @@ _080B20FC:
mov r0, #1
bx lr
arm_func_start sub_080B2124
sub_080B2124: @ 0x080B2124
arm_func_start MakeFadeBuff256
MakeFadeBuff256: @ 0x080B2124
push {r4, r5, r6, r7, r8, sb, sl, fp}
mul r3, r2, r3
mov r4, #0x400
@@ -652,50 +657,60 @@ _080B21AC: .4byte gUnk_08000F54
arm_func_start UpdateEntities
UpdateEntities: @ 0x080B21B0
ldr fp, _080B2270 @ =gUnk_03003DD0
ldr r1, [fp]
ldm r1, {r7, r8, sb, sl}
ldr sp, [fp, #0xc]
ldr r8, [fp, #4]
ldr r0, [fp, #8]
ldr r11, _080B2270 @ =gUnk_03003DD0
ldr r1, [r11]
ldm r1, {r7, r8, r9, r10}
ldr sp, [r11, #0xc]
ldr r8, [r11, #4]
ldr r0, [r11, #8]
add pc, pc, #0x60 @ =_080B2230
@ gUnk_03003DD0 {
@ void* chosen_table;
@ void* linked_list_top;
@ void* curr_entity;
@ void* restore_sp;
@ }
@ UpdateEntities starts here
@ arg0 (r0) : 0 = entities, 1 = managers
ldr r1, _080B2274 @ =gUnk_080026A4
add r1, r1, r0, lsl #4
push {r4, r5, r6, r7, r8, sb, sl, fp, lr}
ldr fp, _080B2278 @ =gUnk_03003DD0
str r1, [fp]
str sp, [fp, #0xc]
ldm r1, {r7, r8, sb, sl}
_080B21E8:
push {r4 - r11, lr}
ldr r11, _080B2278 @ =gUnk_03003DD0
str r1, [r11, #0x0]
str sp, [r11, #0xc]
ldm r1, {r7, r8, r9, r10}
next_list: @ traverse entity linked list
add r8, r8, #8
str r8, [fp, #4]
cmp r8, sb
bhs _080B2238
ldr r4, [r8, #4]
_080B21FC:
str r8, [r11, #4]
cmp r8, r9
bhs lists_complete
ldr r4, [r8, #4] @ entity -> next
next_entity:
cmp r4, r8
beq _080B21E8
beq next_list
mov r0, #0
str r0, [r7]
str r4, [fp, #8]
ldrb r1, [r4, #8]
ldr r1, [sl, r1, lsl #2]
str r4, [r11, #8]
ldrb r1, [r4, #8] @ entity -> kind
ldr r1, [r10, r1, lsl #2]
mov r0, r4
mov lr, pc
bx r1 @ Jump to address stored in r1
_080B2224:
ldr r0, [fp, #8]
cmp r0, r4
bleq sub_080B1C54
bx r1 @ call entity kind update function
ldr r0, [r11, #8]
cmp r0, r4 @ update collision if entity is still alive
bleq UpdateCollision
_080B2230: @ jumped here if ClearAndUpdateEntities
ldr r4, [r0, #4]
b _080B21FC
_080B2238:
b next_entity
lists_complete:
mov r0, #0
str r0, [fp, #8]
pop {r4, r5, r6, r7, r8, sb, sl, fp, lr}
str r0, [r11, #8]
pop {r4 - r11, lr}
bx lr
_080B2248::
_080B2248: .4byte DeleteThisEntity @ 0x3005fbc
_080B224C: .4byte PlayerUpdate
_080B2250: .4byte DeleteThisEntity
@@ -706,6 +721,7 @@ _080B2260: .4byte ObjectUpdate
_080B2264: .4byte NPCUpdate
_080B2268: .4byte ItemUpdate
_080B226C: .4byte ManagerUpdate
_080B2270: .4byte gUnk_03003DD0
_080B2274: .4byte gUnk_080026A4
_080B2278: .4byte gUnk_03003DD0
@@ -860,7 +876,7 @@ sub_080B19C8: @ 0x080B19C8
mov r2, #0
strb r2, [r1]
stmdb sp!, {lr}
bl sub_080B2478
bl ResolveOamDrawPriority
bl sub_080B2534
ldm sp!, {lr}
b _080B1C40EU
@@ -899,14 +915,17 @@ sub_080B2448: @ 0x080B2448
mov r2, #0
strb r2, [r1]
stmdb sp!, {lr}
bl sub_080B2478
bl ResolveOamDrawPriority
bl sub_080B2534
ldm sp!, {lr}
b _080B26B4
.endif
arm_func_start sub_080B2478
sub_080B2478: @ 0x080B2478
arm_func_start ResolveOamDrawPriority
ResolveOamDrawPriority: @ 0x080B2478
prio_a .req r8
prio_b .req r5
mov sb, r0
mov r1, r0
ldrb r2, [r1], #4
@@ -914,7 +933,7 @@ sub_080B2478: @ 0x080B2478
sub sl, r2, #1
add r2, r1, sl, lsl #2
cmp sl, #0
beq _080B252C
beq no_objs
_080B2498:
lsl r3, sl, #2
mov r6, #0
@@ -926,40 +945,44 @@ _080B24A0:
_080B24B0:
cmp r1, ip
blo _080B251C
# sprite A
ldr r4, [r1]
# pos
ldr r8, [r4, #0x30]
add r8, r8, #-0x80000000
lsr r8, r8, #3
add r8, #0x80000000
lsr r8, #3
# load priority bits, NOT so 0 = highest priority
ldrb r0, [r4, #0x29]
mvn r0, r0
orr r8, r8, r0, lsl #29
orr prio_a, r8, r0, lsl #29
add r7, r1, r3
_080B24D8:
next_sprite:
cmp r2, r7
blo _080B2510
blo a_priority
# sprite B
ldr r5, [r7]
ldr r0, [r5, #0x30]
add r0, r0, #-0x80000000
lsr r0, r0, #3
add r0, #0x80000000
lsr r0, #3
ldrb r5, [r5, #0x29]
mvn r5, r5
orr r5, r0, r5, lsl #29
cmp r8, r5
bhs _080B2510
orr prio_b, r0, r5, lsl #29
cmp prio_a, prio_b
bhs a_priority
ldr r5, [r7], -r3
str r5, [r7], r3, lsl #1
b _080B24D8
_080B2510:
b next_sprite
a_priority:
str r4, [r7, -r3]!
sub r1, r1, r3
b _080B24B0
_080B251C:
add r6, r6, #1
add r6, #1
b _080B24A0
_080B2524:
lsrs sl, sl, #1
lsrs sl, #1
bne _080B2498
_080B252C:
no_objs:
mov r0, sb
bx lr
-441
View File
@@ -6,444 +6,3 @@
.text
thumb_func_start JarPortal
JarPortal: @ 0x0808BE84
push {lr}
ldr r2, _0808BE98 @ =gUnk_08121488
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0808BE98: .4byte gUnk_08121488
thumb_func_start sub_0808BE9C
sub_0808BE9C: @ 0x0808BE9C
push {r4, r5, lr}
adds r4, r0, #0
ldrb r1, [r4, #0x10]
movs r0, #0x80
movs r2, #0
orrs r0, r1
strb r0, [r4, #0x10]
adds r0, r4, #0
adds r0, #0x3f
movs r5, #1
strb r5, [r0]
adds r1, r4, #0
adds r1, #0x3c
movs r0, #0x47
strb r0, [r1]
adds r1, #4
movs r0, #0x44
strb r0, [r1]
subs r1, #5
movs r0, #0x80
strb r0, [r1]
adds r0, r4, #0
adds r0, #0x68
strb r2, [r0]
ldrb r0, [r4, #0xa]
bl CheckLocalFlag
cmp r0, #0
beq _0808BEEE
adds r0, r4, #0
adds r0, #0x7c
ldrb r0, [r0]
cmp r0, #0
bne _0808BEF8
movs r0, #3
strb r0, [r4, #0xc]
adds r0, r4, #0
movs r1, #1
bl InitAnimationForceUpdate
b _0808BF10
_0808BEEE:
adds r0, r4, #0
adds r0, #0x7c
ldrb r0, [r0]
cmp r0, #0
bne _0808BF04
_0808BEF8:
strb r5, [r4, #0xc]
adds r0, r4, #0
movs r1, #0
bl InitAnimationForceUpdate
b _0808BF10
_0808BF04:
movs r0, #3
strb r0, [r4, #0xc]
adds r0, r4, #0
movs r1, #1
bl InitAnimationForceUpdate
_0808BF10:
pop {r4, r5, pc}
.align 2, 0
thumb_func_start sub_0808BF14
sub_0808BF14: @ 0x0808BF14
push {r4, lr}
adds r4, r0, #0
bl sub_0808C128
cmp r0, #0
beq _0808BF4C
ldrb r0, [r4, #0xc]
adds r0, #1
strb r0, [r4, #0xc]
adds r0, r4, #0
bl sub_0808C13C
adds r0, r4, #0
adds r0, #0x7c
ldrb r0, [r0]
cmp r0, #0
bne _0808BF3E
ldrb r0, [r4, #0xa]
bl SetLocalFlag
b _0808BF44
_0808BF3E:
ldrb r0, [r4, #0xa]
bl ClearLocalFlag
_0808BF44:
adds r0, r4, #0
movs r1, #0
bl sub_0808C148
_0808BF4C:
adds r0, r4, #0
movs r1, #0
bl sub_0808C01C
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0808BF58
sub_0808BF58: @ 0x0808BF58
push {r4, lr}
adds r4, r0, #0
movs r1, #0x80
lsls r1, r1, #6
bl sub_08003FC4
ldrb r0, [r4, #0xd]
cmp r0, #1
beq _0808BF94
cmp r0, #1
bgt _0808BF74
cmp r0, #0
beq _0808BF7A
b _0808BFD6
_0808BF74:
cmp r0, #2
beq _0808BFB0
b _0808BFD6
_0808BF7A:
ldr r1, [r4, #0x20]
ldr r0, _0808BF90 @ =0x00017FFF
cmp r1, r0
bgt _0808BFD6
movs r0, #1
strb r0, [r4, #0xd]
adds r0, r4, #0
movs r1, #2
bl InitAnimationForceUpdate
b _0808BFD6
.align 2, 0
_0808BF90: .4byte 0x00017FFF
_0808BF94:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
movs r1, #0x36
ldrsh r0, [r4, r1]
cmp r0, #0
bne _0808BFD6
ldrb r0, [r4, #0xd]
adds r0, #1
strb r0, [r4, #0xd]
movs r0, #0x80
lsls r0, r0, #8
str r0, [r4, #0x20]
b _0808BFD6
_0808BFB0:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
movs r0, #0x36
ldrsh r1, [r4, r0]
cmp r1, #0
bne _0808BFD6
ldrb r0, [r4, #0xc]
adds r0, #1
strb r0, [r4, #0xc]
strb r1, [r4, #0xf]
adds r0, r4, #0
movs r1, #1
bl InitAnimationForceUpdate
adds r0, r4, #0
movs r1, #1
bl sub_0808C148
_0808BFD6:
pop {r4, pc}
thumb_func_start sub_0808BFD8
sub_0808BFD8: @ 0x0808BFD8
push {r4, lr}
adds r4, r0, #0
bl sub_0808C128
cmp r0, #0
beq _0808C010
ldrb r0, [r4, #0xc]
adds r0, #1
strb r0, [r4, #0xc]
adds r0, r4, #0
bl sub_0808C13C
adds r0, r4, #0
adds r0, #0x7c
ldrb r0, [r0]
cmp r0, #0
bne _0808C002
ldrb r0, [r4, #0xa]
bl ClearLocalFlag
b _0808C008
_0808C002:
ldrb r0, [r4, #0xa]
bl SetLocalFlag
_0808C008:
adds r0, r4, #0
movs r1, #0
bl sub_0808C148
_0808C010:
adds r0, r4, #0
movs r1, #1
bl sub_0808C01C
pop {r4, pc}
.align 2, 0
thumb_func_start sub_0808C01C
sub_0808C01C: @ 0x0808C01C
push {r4, r5, r6, lr}
adds r4, r0, #0
adds r5, r1, #0
movs r1, #0x2e
ldrsh r0, [r4, r1]
subs r0, #0x18
movs r2, #0x32
ldrsh r1, [r4, r2]
subs r1, #0x18
movs r2, #0x30
movs r3, #0x30
bl CheckPlayerProximity
cmp r0, #0
beq _0808C0A6
ldr r2, _0808C06C @ =gArea
ldrh r0, [r4, #0x2e]
strh r0, [r2, #0x12]
ldrh r0, [r4, #0x32]
strh r0, [r2, #0x14]
movs r6, #2
strb r6, [r2, #0x16]
movs r0, #4
cmp r5, #0
beq _0808C050
movs r0, #2
_0808C050:
strb r0, [r2, #0x17]
cmp r5, #1
bne _0808C0A6
ldr r3, _0808C070 @ =gPlayerState
ldr r0, [r3, #0x30]
movs r1, #0x20
ands r0, r1
cmp r0, #0
beq _0808C074
ldrb r0, [r3, #2]
cmp r0, #0
bne _0808C074
strb r6, [r2, #0x18]
b _0808C082
.align 2, 0
_0808C06C: .4byte gArea
_0808C070: .4byte gPlayerState
_0808C074:
bl sub_08057810
cmp r0, #0
beq _0808C082
ldr r1, _0808C0A8 @ =gArea
movs r0, #3
strb r0, [r1, #0x18]
_0808C082:
movs r1, #0x2e
ldrsh r0, [r4, r1]
movs r2, #0x32
ldrsh r1, [r4, r2]
adds r2, r4, #0
adds r2, #0x38
ldrb r2, [r2]
bl sub_080577AC
ldrb r0, [r4, #0xf]
cmp r0, #0
bne _0808C0A6
movs r0, #1
strb r0, [r4, #0xf]
movs r0, #0xa9
lsls r0, r0, #1
bl SoundReq
_0808C0A6:
pop {r4, r5, r6, pc}
.align 2, 0
_0808C0A8: .4byte gArea
thumb_func_start sub_0808C0AC
sub_0808C0AC: @ 0x0808C0AC
push {r4, lr}
adds r4, r0, #0
movs r1, #0x80
lsls r1, r1, #6
bl sub_08003FC4
ldrb r0, [r4, #0xd]
cmp r0, #1
beq _0808C0E8
cmp r0, #1
bgt _0808C0C8
cmp r0, #0
beq _0808C0CE
b _0808C126
_0808C0C8:
cmp r0, #2
beq _0808C104
b _0808C126
_0808C0CE:
ldr r1, [r4, #0x20]
ldr r0, _0808C0E4 @ =0x00017FFF
cmp r1, r0
bgt _0808C126
movs r0, #1
strb r0, [r4, #0xd]
adds r0, r4, #0
movs r1, #3
bl InitAnimationForceUpdate
b _0808C126
.align 2, 0
_0808C0E4: .4byte 0x00017FFF
_0808C0E8:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
movs r1, #0x36
ldrsh r0, [r4, r1]
cmp r0, #0
bne _0808C126
ldrb r0, [r4, #0xd]
adds r0, #1
strb r0, [r4, #0xd]
movs r0, #0x80
lsls r0, r0, #8
str r0, [r4, #0x20]
b _0808C126
_0808C104:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
movs r1, #0x36
ldrsh r0, [r4, r1]
cmp r0, #0
bne _0808C126
movs r0, #1
strb r0, [r4, #0xc]
adds r0, r4, #0
movs r1, #0
bl InitAnimationForceUpdate
adds r0, r4, #0
movs r1, #1
bl sub_0808C148
_0808C126:
pop {r4, pc}
thumb_func_start sub_0808C128
sub_0808C128: @ 0x0808C128
push {lr}
movs r1, #0
adds r0, #0x41
ldrb r0, [r0]
cmp r0, #0x9d
bne _0808C136
movs r1, #1
_0808C136:
adds r0, r1, #0
pop {pc}
.align 2, 0
thumb_func_start sub_0808C13C
sub_0808C13C: @ 0x0808C13C
movs r1, #0
strb r1, [r0, #0xd]
movs r1, #0xa0
lsls r1, r1, #0xa
str r1, [r0, #0x20]
bx lr
thumb_func_start sub_0808C148
sub_0808C148: @ 0x0808C148
push {r4, r5, r6, lr}
adds r6, r0, #0
movs r2, #0x2e
ldrsh r0, [r6, r2]
ldr r4, _0808C1A4 @ =gRoomControls
ldrh r2, [r4, #6]
subs r0, r0, r2
asrs r5, r0, #4
movs r3, #0x3f
ands r5, r3
movs r2, #0x32
ldrsh r0, [r6, r2]
ldrh r2, [r4, #8]
subs r0, r0, r2
asrs r0, r0, #4
ands r0, r3
lsls r0, r0, #6
orrs r5, r0
cmp r1, #0
bne _0808C1B8
ldr r0, _0808C1A8 @ =0x00004092
subs r1, r5, #1
adds r4, r6, #0
adds r4, #0x38
ldrb r2, [r4]
bl SetTile
ldr r0, _0808C1AC @ =0x00004093
ldrb r2, [r4]
adds r1, r5, #0
bl SetTile
ldr r0, _0808C1B0 @ =0x00004094
adds r1, r5, #0
adds r1, #0x3f
ldrb r2, [r4]
bl SetTile
ldr r0, _0808C1B4 @ =0x00004095
adds r1, r5, #0
adds r1, #0x40
ldrb r2, [r4]
bl SetTile
b _0808C1E0
.align 2, 0
_0808C1A4: .4byte gRoomControls
_0808C1A8: .4byte 0x00004092
_0808C1AC: .4byte 0x00004093
_0808C1B0: .4byte 0x00004094
_0808C1B4: .4byte 0x00004095
_0808C1B8:
subs r0, r5, #1
adds r4, r6, #0
adds r4, #0x38
ldrb r1, [r4]
bl sub_0807BA8C
ldrb r1, [r4]
adds r0, r5, #0
bl sub_0807BA8C
adds r0, r5, #0
adds r0, #0x3f
ldrb r1, [r4]
bl sub_0807BA8C
adds r0, r5, #0
adds r0, #0x40
ldrb r1, [r4]
bl sub_0807BA8C
_0808C1E0:
pop {r4, r5, r6, pc}
.align 2, 0
+2
View File
@@ -1,5 +1,7 @@
.include "asm/macros/asm.inc"
.include "asm/macros/function.inc"
.include "asm/macros/ram.inc"
.include "asm/macros/m4a.inc"
.include "asm/macros/map.inc"
.include "asm/macros/entity.inc"
+20
View File
@@ -0,0 +1,20 @@
.ifndef GUARD_ASM_MACROS_RAM_INC
.set GUARD_ASM_MACROS_RAM_INC, 1
.ifdef EU
.set RAM_DIFF, 0x050AC28C - 0xaa0
.endif
.ifdef USA
.set RAM_DIFF, 0x050AC28C
.endif
.ifdef JP
.set RAM_DIFF, 0x050AC28C - 0x260
.endif
.macro ram_addr x
.4byte \x - RAM_DIFF
.endm
.endif @ GUARD_ASM_MACROS_RAM_INC
+1 -1
View File
@@ -329,7 +329,7 @@
.2byte \s
.endm
.macro _0807E788 w:req
.macro SetFadeMask w:req
.2byte 0x0c39
.4byte \w
.endm
+1 -1
View File
@@ -118,7 +118,7 @@ sub_08097C20: @ 0x08097C20
adds r2, r4, #0
adds r2, #0x38
ldrb r2, [r2]
bl sub_080577AC
bl CreateMagicSparkles
ldrb r0, [r4, #0xe]
subs r0, #1
strb r0, [r4, #0xe]
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash
buildname=tmc
baserom=baserom
buildname=$3
baserom=$4
OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb"
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
+1 -1
View File
@@ -336,7 +336,7 @@
.equiv SFX_14F, 0x14f
.equiv SFX_150, 0x150
.equiv SFX_151, 0x151
.equiv SFX_152, 0x152
.equiv SFX_NEAR_PORTAL, 0x152
.equiv SFX_153, 0x153
.equiv SFX_154, 0x154
.equiv SFX_155, 0x155
+2 -2
View File
@@ -31,7 +31,7 @@ script_08012368:
StopBgm
BeginBlock
_0807E778 0x0004
_0807E788 0x00007fff
SetFadeMask 0x00007fff
DoFade5
_0807E858 0x0080
EndBlock
@@ -55,7 +55,7 @@ script_08012368:
Wait 0x003c
BeginBlock
_0807E778 0x0004
_0807E788 0xffffffff
SetFadeMask 0xffffffff
DoFade4
_0807E858 0x0080
EndBlock
+1 -1
View File
@@ -77,7 +77,7 @@ script_0801248A:
MoveEntityToPlayer
Call sub_0807F844
CameraTargetPlayer
_0807E788 0xffffffff
SetFadeMask 0xffffffff
_0807E778 0x0004
_0807E800 0x00000000
WaitFor_2
+2 -2
View File
@@ -49,7 +49,7 @@ SCRIPT_START script_080131AC
_0807EA94
_0807E5F8 0x00000020
WaitForSomething2 0x00000040
_0807E788 0xffff7fff
SetFadeMask 0xffff7fff
_0807E778 0x0004
DoFade5
WaitFor_2
@@ -60,7 +60,7 @@ SCRIPT_START script_080131AC
Call sub_0807F5C0
TextboxNoOverlapFollowPos 0x1604, 0x0007
_0807EA94
_0807E788 0xffffffff
SetFadeMask 0xffffffff
_0807E778 0x0004
DoFade4
WaitFor_2
+1 -1
View File
@@ -62,4 +62,4 @@ SCRIPT_START script_08016384
WaitFor_1
WaitFor_2
_0807E778 0x0004
_0807E788 0x0000ffff
SetFadeMask 0x0000ffff
+4 -4
View File
@@ -8591,12 +8591,12 @@ sfx151_track0:: @ 08DE3684
sfx151:: @ 08DE36B0
sound_header 1 0 0x60 0 gUnk_08A10DC0 sfx151_track0
sfx152_track0:: @ 08DE36BC
sfxNearPortal_track0:: @ 08DE36BC
.incbin "baserom.gba", 0xDE36BC, 0x0000086
sfx152_track1:: @ 08DE3742
sfxNearPortal_track1:: @ 08DE3742
.incbin "baserom.gba", 0xDE3742, 0x000008A
sfx152:: @ 08DE37CC
sound_header 2 0 0x40 0 gUnk_08A10DD8 sfx152_track0 sfx152_track1
sfxNearPortal:: @ 08DE37CC
sound_header 2 0 0x40 0 gUnk_08A10DD8 sfxNearPortal_track0 sfxNearPortal_track1
sfx153_track0:: @ 08DE37DC
.incbin "baserom.gba", 0xDE37DC, 0x0000030
+1 -1
View File
@@ -346,7 +346,7 @@ typedef enum {
SFX_14F,
SFX_150,
SFX_151,
SFX_152,
SFX_NEAR_PORTAL,
SFX_153,
SFX_154,
SFX_155,
+118
View File
@@ -0,0 +1,118 @@
#ifndef EFFECTS_H
#define EFFECTS_H
#include "entity.h"
typedef enum {
FX_FALL_DOWN,
FX_EXPLOSION,
FX_DEATH,
FX_BUSH,
FX_ROCK,
FX_POT_SHATTER,
FX_6,
FX_SPARKLE,
FX_8,
FX_9,
FX_A,
FX_WATER_SPLASH,
FX_LAVA_SPLASH,
FX_ICE,
FX_ROCK_HUGE,
FX_ROCK_SMALL,
FX_REFLECT,
FX_DASH,
FX_BLUE_SPARKLE,
FX_RED_BUSH,
FX_SPARKLE2,
FX_ROCK2,
FX_FIRE,
FX_GRASS_CUT,
FX_18,
FX_SWORD_MAGIC,
FX_LIGHTNING,
FX_LIGHTNING_STRIKE,
FX_STARS,
FX_STARS_STRIKE,
FX_STARS_STRIKE2,
FX_REFLECT2,
FX_RIPPLE,
FX_RIPPLE_LARGE,
FX_BROWN_SMOKE,
FX_BROWN_SMOKE_LARGE,
FX_BROWN_SMOKE2,
FX_SWEAT,
FX_26,
FX_27,
FX_SLOW_EXPLOSION,
FX_CONFETTI,
FX_CONFETTI_LARGE,
FX_GREEN_SPLASH2,
FX_REFECT3,
FX_SIGN,
FX_SLOW_SMOKE2,
FX_SLOW_SMOKE_SMALL,
FX_SPARKLE_SECRET,
FX_MAILBOX_UNUSED,
FX_32,
FX_33,
FX_34,
FX_BIG_EXPLOSION,
FX_LAVA_SPLASH_HUGE,
FX_GRASS_CUT2,
FX_BUSH_CUT2,
FX_BUSH_CUT3,
FX_EGG,
FX_WOOD,
FX_BONE,
FX_STARS2,
FX_GRASS_CUT3,
FX_GRASS_CUT4,
FX_GRASS_CUT5,
FX_REFLECT4,
FX_STEAM_EFC,
FX_BIG_EXPLOSION2,
FX_WHITE_SPLASH,
FX_WHITE_ROCK,
FX_GIANT_EXPLOSION,
FX_GIANT_EXPLOSION2,
FX_GIANT_EXPLOSION3,
FX_GREEN_ORB,
FX_GREEN_ORB_SLOW,
FX_WHITE_AURA,
FX_WOOD2,
FX_SPARKLE3,
FX_MAGIC_STORM,
FX_BLUE_EFC,
FX_REFLECT5,
FX_GIANT_EXPLOSION4,
FX_GREEN_SPLASH,
FX_BLUE_PUFF,
FX_WHITE_PUFF,
FX_AURA_BASE,
FX_RED_AURA,
FX_BLUE_AURA,
FX_58,
FX_59,
FX_5A,
FX_5B,
FX_BARREL_BEAM,
FX_BARREL,
FX_5E,
FX_5F,
FX_60,
FX_STONE_BLOCK,
FX_62,
FX_63,
FX_64,
FX_65,
FX_66,
FX_67,
FX_68,
FX_69,
FX_6A,
FX_6B,
FX_6C,
} Effect;
#endif // EFFECTS_H
+1
View File
@@ -58,6 +58,7 @@ extern void DoExitTransition(ScreenTransitionData*);
extern void CreateDustAt(u32, u32, u32);
extern void PutItemOnSlot(u32 itemID);
extern void CreateSpeechBubbleSleep(Entity*, u32, u32);
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
// Unidentified
extern u32 sub_0806ED78(Entity*);
+1 -1
View File
@@ -89,7 +89,7 @@ extern void DoSoftReset(void);
extern void sub_08056260(void);
extern void VBlankIntrWait();
extern void MessageUpdate(void);
extern void sub_08050154(void);
extern void UpdateFade(void);
extern u8 gUnk_03003DE4;
+3 -1
View File
@@ -24,7 +24,9 @@ typedef struct {
/*0x0E*/ u8 unk5;
/*0x0F*/ u8 unk6;
/*0x10*/ u8 unk_10;
/*0x11*/ u8 filler[3];
/*0x11*/ s8 oam_offset_x;
/*0x12*/ s8 oam_offset_y;
/*0x13*/ u8 unk13;
/*0x14*/ u8 screenShakeMagnitude;
/*0x15*/ u8 unk7;
/*0x16*/ u16 screenShakeTime;
+3 -3
View File
@@ -93,7 +93,7 @@ typedef struct {
u8 field_0x1;
u8 field_0x2;
u8 field_0x3;
u32 field_0x4;
u32 mask;
u16 fadeType; // fade in or out, are there others?
u16 fadeSpeed; // subtracted from duration
u16 fadeDuration;
@@ -103,9 +103,9 @@ typedef struct {
s16 field_0x14;
u16 field_0x16;
u16 field_0x18;
} struct_03000FD0;
} FadeControl;
extern struct_03000FD0 gFadeControl;
extern FadeControl gFadeControl;
typedef struct {
u8 filler0[0x1A];
+18
View File
@@ -0,0 +1,18 @@
#ifndef TILES_H
#define TILES_H
typedef enum {
CUT_BUSH = 0x1C,
CUT_GRASS = 0x1D,
CUT_SIGNPOST = 0x1E,
CUT_TREE = 0x1F,
ROCK = 0x55,
CHEST = 0x73,
SIGNPOST = 0x176,
PERMA_ROCK = 0x1D3,
PERMA_ROCK2 = 0x1D4,
PERMA_ROCK3 = 0x1D5,
PERMA_ROCK4 = 0x1D6,
} Tile;
#endif // TILES_H
+4 -3
View File
@@ -181,7 +181,7 @@ SECTIONS {
. = 0x00000BF8; gUnk_03000BF8 = .;
. = 0x00000C24; gUnk_03000C24 = .;
. = 0x00000C30; gUnk_03000C30 = .;
. = 0x00000E10; gUnk_03000E10 = .;
. = 0x00000E10; gCollidableList = .;
. = 0x00000F50; gScreen = .;
. = 0x00000F58; gBG0Settings = .;
. = 0x00000F64; gBG1Settings = .;
@@ -212,7 +212,7 @@ SECTIONS {
. = 0x00003DA0; gUnk_03003DA0 = .;
. = 0x00003DA8; gUnk_03003DA8 = .;
. = 0x00003DB0; gUnk_03003DB0 = .;
. = 0x00003DB8; gHitboxCount = .;
. = 0x00003DB8; gCollidableCount = .;
. = 0x00003DBC; gEntCount = .;
. = 0x00003DC0; gUnk_03003DC0 = .;
. = 0x00003DD0; gUnk_03003DD0 = .;
@@ -274,7 +274,7 @@ SECTIONS {
. = 0x00005D24; gUnk_03005D24 = .;
. = 0x00005D58; gUnk_03005D58 = .;
. = 0x00005D5C; gUnk_03005D5C = .;
. = 0x00005D90; IntrMain = .;
. = 0x00005D90; gIntrMain = .;
. = 0x00005E60; gUnk_03005E60 = .;
. = 0x00005E98; gUnk_03005E98 = .;
. = 0x00005F24; _ClearAndUpdateEntities = .;
@@ -761,6 +761,7 @@ SECTIONS {
asm/object35.o(.text);
asm/object36.o(.text);
asm/object37.o(.text);
src/object/jarPortal.o(.text);
asm/jarPortal.o(.text);
asm/bossDoor.o(.text);
asm/object3A.o(.text);
+4 -3
View File
@@ -10,6 +10,7 @@
#include "manager.h"
#include "utils.h"
#include "npc.h"
#include "effects.h"
extern u8 gUnk_03003DE0;
extern u8 gUnk_03000C30;
@@ -21,7 +22,7 @@ extern u8 gUnk_03003DF0[];
extern u8 gUnk_03003BE0;
extern Entity* gUnk_03004040[3];
extern u8 gUnk_020342F8;
extern u8 gHitboxCount;
extern u8 gCollidableCount;
extern void gDoCollision(void);
extern void sub_080ADD70();
@@ -227,7 +228,7 @@ void HandlePlayerLife(Entity* this) {
} else if ((gSave.stats.effectTimer == 0) || --gSave.stats.effectTimer == 0) {
gSave.stats.effect = 0;
} else if ((gSave.stats.effectTimer & 0x3f) == 0) {
CreateFx(this, 0x55 + gSave.stats.effect, 0);
CreateFx(this, FX_AURA_BASE + gSave.stats.effect, 0);
}
}
#endif
@@ -370,7 +371,7 @@ NONMATCH("asm/non_matching/arm_proxy/NPCUpdate.inc", void NPCUpdate(Entity* this
END_NONMATCH
void ClearHitboxList(void) {
gHitboxCount = 0;
gCollidableCount = 0;
}
void CollisionMain(void) {
+3 -5
View File
@@ -198,7 +198,6 @@ s32 fade(s32 target, s32 current) {
void doPlaySound(u32 sound) {
u32 volume;
u32 iVar2;
MusicPlayerInfo* musicPlayerInfo;
if (sound == 0)
@@ -209,8 +208,7 @@ void doPlaySound(u32 sound) {
} else {
volume = gSoundPlayingInfo.volumeSfx;
}
iVar2 = gSoundPlayingInfo.volumeMaster;
volume = iVar2 * volume / 0x100;
volume = gSoundPlayingInfo.volumeMaster * volume / 0x100;
musicPlayerInfo = gMusicPlayers[gSongTable[sound].musicPlayerIndex].info;
m4aMPlayImmInit(musicPlayerInfo);
m4aMPlayVolumeControl(musicPlayerInfo, 0xffff, volume);
@@ -535,7 +533,7 @@ extern const SongHeader sfx14E;
extern const SongHeader sfx14F;
extern const SongHeader sfx150;
extern const SongHeader sfx151;
extern const SongHeader sfx152;
extern const SongHeader sfxNearPortal;
extern const SongHeader sfx153;
extern const SongHeader sfx154;
extern const SongHeader sfx155;
@@ -1167,7 +1165,7 @@ const Song gSongTable[] = {
[SFX_14F] = { &sfx14F, MUSIC_PLAYER_15, MUSIC_PLAYER_15 },
[SFX_150] = { &sfx150, MUSIC_PLAYER_14, MUSIC_PLAYER_14 },
[SFX_151] = { &sfx151, MUSIC_PLAYER_13, MUSIC_PLAYER_13 },
[SFX_152] = { &sfx152, MUSIC_PLAYER_18, MUSIC_PLAYER_18 },
[SFX_NEAR_PORTAL] = { &sfxNearPortal, MUSIC_PLAYER_18, MUSIC_PLAYER_18 },
[SFX_153] = { &sfx153, MUSIC_PLAYER_11, MUSIC_PLAYER_11 },
[SFX_154] = { &sfx154, MUSIC_PLAYER_10, MUSIC_PLAYER_10 },
[SFX_155] = { &sfx155, MUSIC_PLAYER_0F, MUSIC_PLAYER_0F },
+2 -1
View File
@@ -10,7 +10,8 @@ typedef struct {
} VStruct;
typedef struct {
u8 filler[0x420];
u8 _0[0x20];
struct OamData oam[0x80];
VStruct unk[0x100];
} UStruct;
+5 -4
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "room.h"
#include "object.h"
#include "effects.h"
void sub_080A29C8(s32 xOff, s32 yOff, u32 layer) {
Entity* pEVar1;
@@ -15,15 +16,15 @@ void sub_080A29C8(s32 xOff, s32 yOff, u32 layer) {
}
void sub_080A29FC(Entity* parent) {
CreateFx(parent, 0x11, 0);
CreateFx(parent, FX_DASH, 0);
}
void sub_080A2A08(Entity* parent) {
CreateFx(parent, 0x6, 0);
CreateFx(parent, FX_6, 0);
}
void sub_080A2A14(Entity* parent) {
CreateFx(parent, 0xb, 0);
CreateFx(parent, FX_WATER_SPLASH, 0);
}
Entity* sub_080A2A20(Entity* parent, u32 form, u32 parameter) {
@@ -50,7 +51,7 @@ Entity* sub_080A2A3C(Entity* parent, u32 form, u32 subtype, u32 param_4) {
Entity* sub_080A2A64(Entity* parent) {
Entity* pEVar1;
pEVar1 = CreateFx(parent, 0x20, 0);
pEVar1 = CreateFx(parent, FX_SPARKLE2, 0);
if (pEVar1 != NULL) {
pEVar1->spritePriority.b0 = 7;
}
+7 -6
View File
@@ -4,6 +4,7 @@
#include "room.h"
#include "createObject.h"
#include "object.h"
#include "effects.h"
Entity* CreateObject(u32 subtype, u32 form, u32 parameter) {
Entity* entity;
@@ -36,13 +37,13 @@ Entity* CreateFx(Entity* parentEnt, u32 form, u32 parameter) {
}
void CreateDust(Entity* parent) {
CreateFx(parent, 2, 0);
CreateFx(parent, FX_DEATH, 0);
}
void CreateDustAt(s32 xOff, s32 yOff, u32 layer) {
Entity* ent;
ent = CreateObject(SPECIAL_FX, 2, 0);
ent = CreateObject(SPECIAL_FX, FX_DEATH, 0);
if (ent != NULL) {
ent->x.HALF.HI = gRoomControls.roomOriginX + xOff;
ent->y.HALF.HI = gRoomControls.roomOriginY + yOff;
@@ -51,15 +52,15 @@ void CreateDustAt(s32 xOff, s32 yOff, u32 layer) {
}
void CreateDustSmall(Entity* parent) {
CreateFx(parent, 0x11, 0);
CreateFx(parent, FX_DASH, 0);
}
void CreateExplosionBroken(Entity* parent) {
CreateFx(parent, 0x6, 0);
CreateFx(parent, FX_6, 0);
}
void CreateWaterSplash(Entity* parent) {
CreateFx(parent, 0xb, 0);
CreateFx(parent, FX_WATER_SPLASH, 0);
}
Entity* sub_080A2A20(Entity* parent, u32 form, u32 parameter) {
@@ -86,7 +87,7 @@ Entity* sub_080A2A3C(Entity* parent, u32 form, u32 subtype, u32 param_4) {
Entity* CreateWaterTrace(Entity* parent) {
Entity* ent;
ent = CreateFx(parent, 0x20, 0);
ent = CreateFx(parent, FX_RIPPLE, 0);
if (ent != NULL) {
ent->spritePriority.b0 = 7;
}
+2 -1
View File
@@ -6,6 +6,7 @@
#include "random.h"
#include "npc.h"
#include "functions.h"
#include "effects.h"
extern void sub_0801D040(Entity*, u32);
extern Entity* sub_08049DF4(u32);
@@ -60,7 +61,7 @@ void sub_08028934(Entity* this) {
this->actionDelay = 0x28;
this->flags &= ~0x80;
sub_080290E0(this, 4);
pEVar1 = CreateFx(this, 3, 0);
pEVar1 = CreateFx(this, FX_BUSH, 0);
if (pEVar1 != NULL) {
pEVar1->height.HALF.HI -= 8;
}
+3 -3
View File
@@ -1,10 +1,10 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
#include "effects.h"
extern s16 sub_080001DA(u32, u32); // ?
extern void sub_08049CF4();
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
void sub_080221C0();
typedef struct {
@@ -37,7 +37,7 @@ void sub_08021FF4(Entity* this) {
void sub_08022004(Entity* this) {
SetTile((u16)this->field_0x7c.HALF.LO, (u16)this->field_0x7c.HALF.HI, this->collisionLayer);
CreateFx(this, 5, 0);
CreateFx(this, FX_POT_SHATTER, 0);
sub_08049CF4(this);
DeleteThisEntity();
}
@@ -80,7 +80,7 @@ void sub_080220F0(Entity* this) {
this->field_0x44 = 0;
off = gUnk_080CB76C[this->type2];
for (i = 0; i < 6; i++, off++) {
Entity* fx = CreateFx(this, 0x11, 0);
Entity* fx = CreateFx(this, FX_DASH, 0);
if (fx) {
fx->x.HALF.HI += off->h;
fx->y.HALF.HI += off->v;
+2 -1
View File
@@ -1,6 +1,7 @@
#include "enemy.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
void sub_0802C4B0(Entity*);
void sub_0802C62C(Entity*);
@@ -92,7 +93,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
u32 diff = 0;
s32 i;
for (i = 1; i > -1; i--) {
Entity* ent = CreateFx(this, 0x15, 0);
Entity* ent = CreateFx(this, FX_ROCK2, 0);
if (ent) {
ent->x.HALF.HI += 12;
ent->x.HALF.HI -= diff;
+2 -1
View File
@@ -3,6 +3,7 @@
#include "enemy.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
typedef struct {
s8 h, v;
@@ -88,7 +89,7 @@ void sub_08045454(Entity* this) {
off++;
}
ent = CreateFx(this, 2, 0);
ent = CreateFx(this, FX_DEATH, 0);
if (ent)
CopyPosition(this, ent);
+5 -4
View File
@@ -6,6 +6,7 @@
#include "fileScreen.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
void (*const gUnk_080D1AFC[8])(Entity*);
void (*const gUnk_080D1B1C[7])(Entity*);
@@ -935,7 +936,7 @@ void sub_08047BF0(Entity* this) {
sub_08047E48(this);
if (this->actionDelay == 0) {
if ((this->field_0xf++ & 0xF) == 0) {
tmp = CreateFx(this, 0x51, 0);
tmp = CreateFx(this, FX_GIANT_EXPLOSION4, 0);
if (tmp) {
u32 rand = Random();
tmp->x.HALF.HI += (rand & 0x1E) + 0xFFF1;
@@ -960,17 +961,17 @@ void sub_08047BF0(Entity* this) {
if (this->actionDelay == 0x5A) {
tmp = this->attachedEntity;
tmp->spriteSettings.b.draw = 0;
CreateFx(tmp, 0x51, 0);
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
} else {
if (this->actionDelay == 0x3C) {
tmp = this->attachedEntity->attachedEntity;
tmp->spriteSettings.b.draw = 0;
CreateFx(tmp, 0x51, 0);
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
} else {
if (this->actionDelay == 0x1E) {
tmp = this->attachedEntity->attachedEntity->attachedEntity;
tmp->spriteSettings.b.draw = 0;
CreateFx(tmp, 0x51, 0);
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
}
}
}
+2 -1
View File
@@ -1,6 +1,7 @@
#include "entity.h"
#include "enemy.h"
#include "functions.h"
#include "effects.h"
extern void (*const gHangingSeedFunctions[])(Entity*);
extern void (*const gUnk_080CB588[])(Entity*);
@@ -15,7 +16,7 @@ void HangingSeed_OnTick(Entity* this) {
void sub_080216FC(Entity* this) {
if (this->bitfield & 0x80) {
CreateFx(this, 3, 0x80);
CreateFx(this, FX_BUSH, 0x80);
DeleteThisEntity();
}
}
+2 -1
View File
@@ -3,6 +3,7 @@
#include "enemy.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
extern Entity* gUnk_020000B0;
@@ -222,7 +223,7 @@ void sub_08032794(Entity* this) {
Entity* target;
s8* temp;
target = CreateFx(this, 0x11, 0x40);
target = CreateFx(this, FX_DASH, 0x40);
if (target != NULL) {
temp = &gUnk_080CE810[this->animationState * 2];
PositionRelative(this, target, temp[0] << 0x10, temp[1] << 0x10);
+6 -5
View File
@@ -5,6 +5,7 @@
#include "coord.h"
#include "random.h"
#include "player.h"
#include "effects.h"
extern void (*const LakituActionFuncs[])(Entity*);
@@ -61,7 +62,7 @@ void sub_0803C784(Entity* this) {
sub_0803CBAC(this);
} else {
if (this->damageType == 0x43) {
Entity* fx = CreateFx(this, 2, 0);
Entity* fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
u32 angle = (this->knockbackDirection ^ 0x10) << 3;
@@ -360,25 +361,25 @@ void sub_0803CC08(Entity* this) {
return;
}
fx = CreateFx(this, 2, 0);
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI += 6;
fx->y.HALF.HI += 6;
}
fx = CreateFx(this, 2, 0);
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI -= 6;
fx->y.HALF.HI += 6;
}
fx = CreateFx(this, 2, 0);
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI += 6;
fx->y.HALF.HI -= 6;
}
fx = CreateFx(this, 2, 0);
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI -= 6;
fx->y.HALF.HI -= 6;
+2 -1
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "player.h"
#include "functions.h"
#include "effects.h"
extern u32 GetNextFunction(Entity*);
@@ -126,7 +127,7 @@ void sub_0803CE14(Entity* this) {
}
void sub_0803CE3C(Entity* this) {
CreateFx(this, 2, 0);
CreateFx(this, FX_DEATH, 0);
this->action = 2;
this->actionDelay = 60;
+3 -2
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
extern u8 gEntCount;
extern Hitbox gUnk_080FD298;
@@ -163,7 +164,7 @@ void sub_08029B2C(Entity* this) {
if (sub_0802A14C(this)) {
if (this->field_0x86.HALF.LO) {
if (--this->actionDelay == 0) {
CreateFx(this, 0x48, 0);
CreateFx(this, FX_GIANT_EXPLOSION3, 0);
DeleteEntity(this);
}
} else {
@@ -241,7 +242,7 @@ void sub_08029C6C(Entity* this) {
void sub_08029C98(Entity* this) {
if (sub_0802A14C(this)) {
CreateFx(this, 0x48, 0);
CreateFx(this, FX_GIANT_EXPLOSION3, 0);
DeleteEntity(this);
} else {
gUnk_080CCDA8[this->action](this);
+2 -1
View File
@@ -4,6 +4,7 @@
#include "random.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
void sub_0803B538(Entity*);
u32 sub_0803B4E4(Entity*);
@@ -962,7 +963,7 @@ void sub_0803B1B8(Entity* this) {
this->field_0x7c.HALF.HI = 0x5dc;
this->spriteSettings.b.draw = 0;
this->damageType = 0x14;
temp = CreateFx(this, 0x51, 0);
temp = CreateFx(this, FX_GIANT_EXPLOSION4, 0);
if (temp != (Entity*)0x0) {
temp->x.HALF.HI += this->hitbox->offset_x;
temp->y.HALF.HI += this->hitbox->offset_y;
+2 -1
View File
@@ -6,6 +6,7 @@
#include "random.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
extern void UnloadOBJPalette(Entity*);
@@ -78,7 +79,7 @@ void (*const gUnk_080CECB4[])(Entity*) = {
};
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_080CED02[] = { FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION2, FX_GIANT_EXPLOSION3 };
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,
+3 -2
View File
@@ -5,6 +5,7 @@
#include "script.h"
#include "structures.h"
#include "functions.h"
#include "effects.h"
extern void sub_0807B600(u32);
@@ -43,7 +44,7 @@ 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_080CEEC8[] = { FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION2, FX_GIANT_EXPLOSION3 };
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 };
@@ -113,7 +114,7 @@ void sub_08034D4C(Entity* this) {
void sub_08034DC8(Entity* this) {
if (gScreenTransition.field_0x39 == 0) {
CreateFx(this, 0x51, 0);
CreateFx(this, FX_GIANT_EXPLOSION4, 0);
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
DeleteThisEntity();
}
+3 -2
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
extern void sub_0800449C(Entity*, u32);
extern bool32 sub_08023A38(u32);
@@ -177,7 +178,7 @@ void sub_08023330(Entity* this) {
this->field_0x7c.BYTES.byte3 = 0;
sub_08023A88(this, this->animationState);
CopyPosition(this, this->attachedEntity);
CreateFx(this, 4, 0);
CreateFx(this, FX_ROCK, 0);
}
}
@@ -199,7 +200,7 @@ void sub_08023398(Entity* this) {
this->damageType = 0x85;
this->attachedEntity->actionDelay = 1;
sub_08023A68(this);
CreateFx(this, 4, 0);
CreateFx(this, FX_ROCK, 0);
return;
}
this->field_0x78.HWORD = 0x28;
+3 -2
View File
@@ -3,6 +3,7 @@
#include "random.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
extern u32 sub_080002E0(u32, u32);
extern u32 sub_080002C8(u16, u8);
@@ -520,12 +521,12 @@ bool32 sub_08025AB8(u32 tile, u32 layer) {
void sub_08025AE8(Entity* this) {
Entity* ent;
ent = CreateFx(this, 0x22, 0);
ent = CreateFx(this, FX_BROWN_SMOKE, 0);
if (ent) {
ent->y.WORD--;
}
ent = CreateFx(this, 0x23, 0);
ent = CreateFx(this, FX_BROWN_SMOKE_LARGE, 0);
if (ent) {
ent->y.WORD++;
}
+2 -1
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
extern void sub_0804A4E4(Entity*, Entity*);
@@ -40,7 +41,7 @@ void sub_08022254(Entity* this) {
break;
case 0x16:
case 0x1c:
CreateFx(this, 4, 0);
CreateFx(this, FX_ROCK, 0);
ent = CreateEnemy(CHUCHU, 1);
if (ent) {
ent->type2 = 1;
+2 -1
View File
@@ -4,6 +4,7 @@
#include "room.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
typedef struct {
s8 h, v;
@@ -115,7 +116,7 @@ void sub_080450A8(Entity* this) {
off++;
}
ent = CreateFx(this, 2, 0);
ent = CreateFx(this, FX_DEATH, 0);
if (ent)
CopyPosition(this, ent);
+2 -1
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
extern void (*const gUnk_080CD234[])(Entity*);
extern void (*const gUnk_080CD24C[])(Entity*);
@@ -23,7 +24,7 @@ void sub_0802B2E0(Entity* this) {
this->iframes = 0;
this->spriteSettings.b.draw = 0;
this->action = 2;
ent = CreateFx(this, 2, 0);
ent = CreateFx(this, FX_DEATH, 0);
if (ent) {
this->attachedEntity = ent;
this->actionDelay = 14;
+2 -1
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
extern bool32 sub_0806FC80(Entity*, Entity*, u32);
extern Entity* sub_08049DF4(u32);
@@ -224,7 +225,7 @@ void sub_08028528(Entity* this) {
if ((this->actionDelay & 7) == 0) {
EnqueueSFX(0xf0);
CreateFx(this, 2, 0x40);
CreateFx(this, FX_DEATH, 0x40);
}
if (++this->field_0x7a.HALF.HI == 0x80) {
+3 -2
View File
@@ -6,6 +6,7 @@
#include "random.h"
#include "utils.h"
#include "functions.h"
#include "effects.h"
extern void DoExitTransition(ScreenTransitionData*);
@@ -1064,7 +1065,7 @@ static inline void deleteThing(Entity* this, const u32 index) {
if (index == 1) {
this->spriteSettings.b.draw = 0;
}
CreateFx(((VaatiArm_HeapStruct*)this->myHeap)->entities[index], 0x51, 0);
CreateFx(((VaatiArm_HeapStruct*)this->myHeap)->entities[index], FX_GIANT_EXPLOSION4, 0);
((VaatiArm_HeapStruct*)this->myHeap)->entities[index]->myHeap = NULL;
DeleteEntity(((VaatiArm_HeapStruct*)this->myHeap)->entities[index]);
}
@@ -1331,7 +1332,7 @@ void sub_08043D08(Entity* this) {
entity->spriteSettings.b.draw = 0;
InitializeAnimation(entity, 0x13);
sub_0804AA1C(entity);
fx = CreateFx(entity, 0x51, 0);
fx = CreateFx(entity, FX_GIANT_EXPLOSION4, 0);
if (fx != NULL) {
fx->x.HALF.HI += gUnk_080D13E9[this->type2];
fx->y.HALF.HI -= 6;
+2 -1
View File
@@ -6,6 +6,7 @@
#include "audio.h"
#include "area.h"
#include "functions.h"
#include "effects.h"
extern void sub_080AEFB4(Entity*);
extern u8 gEntCount;
@@ -477,7 +478,7 @@ void VaatiRebornEnemyType0Action7(Entity* this) {
SetRoomFlag(1);
} else {
if ((this->actionDelay & 7) == 0) {
fx = CreateFx(this, 2, 0);
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
tmp = Random() & 0x3f3f;
fx->x.HALF.HI = ((tmp & 0xff) - 0x20) + fx->x.HALF.HI;
+2 -1
View File
@@ -5,6 +5,7 @@
#include "flags.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
void sub_080409B0(Entity*);
void sub_080408EC(Entity*);
@@ -567,7 +568,7 @@ void VaatiTransfiguredType0Action7(Entity* this) {
}
this->field_0xf = (this->field_0xf + 1) & 7;
if (this->field_0xf == 0) {
pEVar3 = CreateFx(this, 0x55, 0);
pEVar3 = CreateFx(this, FX_AURA_BASE, 0);
if (pEVar3 != NULL) {
uVar4 = Random() & 0x3f3f;
pEVar3->x.HALF.HI += (uVar4 & 0xff) - 0x20;
+2 -1
View File
@@ -10,6 +10,7 @@
#include "structures.h"
#include "functions.h"
#include "save.h"
#include "effects.h"
extern u8 gEntCount;
@@ -708,7 +709,7 @@ void sub_08041E78(Entity* this) {
const s8* temp;
if ((this->field_0xf & 0xf) == 0) {
fx = CreateFx(this, 0x51, 0);
fx = CreateFx(this, FX_GIANT_EXPLOSION4, 0);
if (fx != NULL) {
temp = &gUnk_080D0E90[this->field_0xf >> 3 & 0xe];
fx->x.HALF.HI += *temp++;
+2 -1
View File
@@ -2,6 +2,7 @@
#include "audio.h"
#include "structures.h"
#include "functions.h"
#include "effects.h"
void sub_080485D8(Entity*);
void sub_080485FC(Entity*);
@@ -158,7 +159,7 @@ void VaatiWrathEyeAction7(Entity* this) {
this->actionDelay = 0x3c;
this->flags &= 0x7f;
this->spriteSettings.b.draw = 0;
CreateFx(this, 0x1f, 0x40);
CreateFx(this, FX_REFLECT2, 0x40);
this->parent->field_0x7a.HALF.HI |= 0x10 << this->type;
} else {
if (--this->actionDelay != 0) {
+2 -1
View File
@@ -6,6 +6,7 @@
#include "random.h"
#include "createObject.h"
#include "functions.h"
#include "effects.h"
extern void (*const gUnk_080CEB74[])(Entity*);
extern void (*const gUnk_080CEB8C[])(Entity*);
@@ -52,7 +53,7 @@ void sub_08033564(Entity* this) {
this->flags &= 0x7f;
this->iframes = 0;
this->spriteSettings.b.draw = FALSE;
ent = CreateFx(this, 2, 0);
ent = CreateFx(this, FX_DEATH, 0);
if (ent != NULL) {
this->attachedEntity = ent;
this->actionDelay = 0xe;
+2 -2
View File
@@ -67,7 +67,7 @@ void sub_0805212C(void) {
#else
sub_08052418(0, 0);
gScreen.lcd.displayControl |= 0x600;
gFadeControl.field_0x4 = 0xffff;
gFadeControl.mask = 0x0000ffff;
DoFade(4, 0x10);
#endif
}
@@ -97,7 +97,7 @@ void sub_080521A0(void) {
gMenu.field_0x3 = 0;
sub_080A7114(1);
sub_08052418(0, 0);
gFadeControl.field_0x4 = 0xffffffff;
gFadeControl.mask = 0xffffffff;
break;
case 1:
if (gMenu.transitionTimer == 0) {
+2 -2
View File
@@ -285,7 +285,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
gIntroState.subState++;
gScreen.bg.bg1yOffset = 0;
gScreen.bg.bg1Control = 0xc09;
gFadeControl.field_0x4 = 0x40;
gFadeControl.mask = 0x00000040;
DoFade(6, 0x10);
SoundReq(SFX_F8);
}
@@ -293,7 +293,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
break;
case 1:
if (!gFadeControl.active) {
gFadeControl.field_0x4 = -1;
gFadeControl.mask = 0xFFFFFFFF;
gIntroState.subState++;
#if defined(JP) || defined(EU)
gIntroState.timer = 120;
+3 -2
View File
@@ -2,6 +2,7 @@
#include "audio.h"
#include "random.h"
#include "functions.h"
#include "effects.h"
extern void (*const gUnk_0811BDCC[])(ItemBehavior* beh, u32);
@@ -26,10 +27,10 @@ void ItemPegasusBoots(ItemBehavior* this, u32 arg1) {
if (((gPlayerState.flags.all & 0x80) == 0) && ((this->field_0x5[2] & 7) == 0)) {
if (gPlayerState.field_0x10[2] == 0x11) {
if (gPlayerEntity.spriteOffsetY == 0) {
CreateFx(&gPlayerEntity, 0x52, 0);
CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
}
} else {
fx = CreateFx(&gPlayerEntity, 0x11, 0x40);
fx = CreateFx(&gPlayerEntity, FX_DASH, 0x40);
if ((fx != NULL) && (fx->y.HALF.HI = fx->y.HALF.HI + 2, this->stateID != 2)) {
uVar4 = Random() & 3;
if ((Random() & 1) != 0) {
+1 -1
View File
@@ -81,7 +81,7 @@ void AgbMain(void) {
gMain.ticks++;
sScreenHandlers[gMain.screen]();
MessageUpdate();
sub_08050154();
UpdateFade();
SoundLoop();
break;
}
-2
View File
@@ -253,8 +253,6 @@ void sub_0805A664(Manager15* this) {
sub_0805A68C(this);
}
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
void sub_0805A68C(Manager15* this) {
if (CheckPlayerProximity(this->unk_38 - 0x18, this->unk_3a - 0x18, 0x30, 0x30)) {
if (this->unk_2c <= 0x1007) {
-1
View File
@@ -32,7 +32,6 @@ void Manager1A_Main(Manager1A* this) {
}
extern void sub_08052D74(void*, void*, void*);
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
typedef struct struct_08108764 {
u8 unk_00;
+8 -8
View File
@@ -7,6 +7,7 @@
#include "random.h"
#include "audio.h"
#include "object.h"
#include "functions.h"
// Facilitates the usage of minish portals.
@@ -25,10 +26,9 @@ typedef struct {
} Manager3;
extern s8 gUnk_08107C6C[];
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
extern u32 sub_08057810(void);
extern u32 sub_080002C0(u16, u16, u8);
extern void sub_080577AC(u32, u32, u32);
extern void CreateMagicSparkles(u32, u32, u32);
void Manager3_Main(Manager3* this) {
s8 tmp;
@@ -55,11 +55,11 @@ void Manager3_Main(Manager3* this) {
}
}
if (sub_080002C0(this->unk_38, this->unk_3a, this->manager.unk_0e) == 0x3d) {
sub_080577AC(this->unk_38 + gRoomControls.roomOriginX, this->unk_3a + gRoomControls.roomOriginY,
this->manager.unk_0e);
CreateMagicSparkles(this->unk_38 + gRoomControls.roomOriginX, this->unk_3a + gRoomControls.roomOriginY,
this->manager.unk_0e);
if (!this->manager.unk_0f) {
this->manager.unk_0f = 1;
SoundReq(SFX_152);
SoundReq(SFX_NEAR_PORTAL);
}
}
}
@@ -69,15 +69,15 @@ void Manager3_Main(Manager3* this) {
}
}
void sub_080577AC(u32 baseX, u32 baseY, u32 layer) {
void CreateMagicSparkles(u32 baseX, u32 baseY, u32 layer) {
u32 r;
int offsetX, offsetY;
Entity* spark;
r = Random();
if ((r & 0x7) != 0)
if (r & 0x7)
return;
spark = CreateObject(SPECIAL_FX, 0x26, 0);
if (!spark)
if (spark == NULL)
return;
offsetX = (r >> 0x8) & 0xF;
offsetY = ((r >> 0x10) & 0xF);
+2 -1
View File
@@ -9,6 +9,7 @@
#include "textbox.h"
#include "script.h"
#include "utils.h"
#include "tiles.h"
void sub_08058ECC(ManagerF*);
@@ -335,7 +336,7 @@ void sub_0805930C(ManagerF* this) {
}
void SetDirtTile(u32 tile) {
SetTileType(0x1d, tile, 1);
SetTileType(CUT_GRASS, tile, 1);
SetTileType(0, tile, 2);
SetTileType(0, tile - 0x40, 2);
}
-1
View File
@@ -34,7 +34,6 @@ extern Hitbox gUnk_080FD180;
Entity* sub_0806D00C(Entity* this);
void sub_0806D4C0(Entity*, u32);
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
void BigGoron(Entity* this) {
gUnk_081140D4[this->type](this);
+2 -1
View File
@@ -9,6 +9,7 @@
#include "npc.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
extern void (*gUnk_081115C0[])(Entity*);
extern void (*gUnk_081115D0[])(Entity*);
@@ -165,7 +166,7 @@ void sub_08068BD0(Entity* this) {
void sub_08068BEC(Entity* this, u32 unused) {
Entity* target;
target = CreateFx(this, 0x44, 0);
target = CreateFx(this, FX_WHITE_SPLASH, 0);
if (target) {
target->spritePriority.b0 = 1;
PositionRelative(this, target, 0, -0x100000);
+2 -1
View File
@@ -2,6 +2,7 @@
#include "script.h"
#include "functions.h"
#include "flags.h"
#include "effects.h"
extern Hitbox gUnk_08110E94;
@@ -87,7 +88,7 @@ void sub_08067534(Entity* this) {
Entity* entity;
s32 i;
for (i = 0; i < 2; ++i) {
entity = CreateFx(this, 2, 0);
entity = CreateFx(this, FX_DEATH, 0);
if (entity != NULL) {
entity->x.HALF.HI += gUnk_08110E64[i];
entity->y.HALF.HI += 0x1c;
+2 -1
View File
@@ -3,6 +3,7 @@
#include "script.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
const u8 gUnk_08114134[];
const u8 gUnk_08114144[];
@@ -55,7 +56,7 @@ void sub_0806D944(Entity* this) {
// Ezlo Angry FX
void sub_0806D96C(Entity* this) {
Entity* fx = CreateFx(this, 0x42, 0);
Entity* fx = CreateFx(this, FX_STEAM_EFC, 0);
if (fx != NULL) {
fx->spritePriority.b0 = 1;
PositionRelative(this, fx, 0, 0xFFE80000);
+3 -2
View File
@@ -3,6 +3,7 @@
#include "functions.h"
#include "textbox.h"
#include "script.h"
#include "effects.h"
extern void (*gUnk_08111A80[])(Entity*);
extern void (*gUnk_08111A8C[])(Entity*);
@@ -79,13 +80,13 @@ void sub_080693D0(Entity* this) {
}
void sub_08069428(Entity* this, s32 offsetX, bool32 createFx65) {
Entity* fx = CreateFx(this, 4, 0);
Entity* fx = CreateFx(this, FX_ROCK, 0);
if (fx) {
PositionRelative(this, fx, offsetX, 0xFFF00000);
ResolveEntityOnTop(this, fx);
}
if (createFx65 != 0) {
fx = CreateFx(this, 65, 0);
fx = CreateFx(this, FX_REFLECT4, 0);
if (fx) {
PositionRelative(this, fx, offsetX, 0xFFF00000);
ResolveEntityOnTop(this, fx);
+2 -1
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "textbox.h"
#include "functions.h"
#include "effects.h"
extern void sub_08063280();
@@ -58,5 +59,5 @@ void sub_08063280(Entity* this, u32 unused) {
var = e->frames.all & 0x7F;
e->frames.all ^= var;
if (var == 2)
CreateFx(e, 49, 0);
CreateFx(e, FX_MAILBOX_UNUSED, 0);
}
+2 -1
View File
@@ -6,6 +6,7 @@
#include "random.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
extern void sub_08068780(Entity*);
extern s32 sub_0806EDD8(Entity*, u32, u32);
@@ -91,7 +92,7 @@ void sub_08068780(Entity* this) {
} else {
EnqueueSFX(gUnk_08111538[(s32)Random() % 3]);
}
ent = CreateFx(this, 0x3d, 0x20);
ent = CreateFx(this, FX_STARS2, 0x20);
if (ent != NULL) {
PositionRelative(this, ent, 0x180000, -0xa0000);
}
+2 -1
View File
@@ -6,6 +6,7 @@
#include "flags.h"
#include "script.h"
#include "save.h"
#include "effects.h"
extern void sub_0806B41C(Entity*);
extern void sub_0806B3CC(Entity*);
@@ -63,7 +64,7 @@ void sub_0806B41C(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
if (this->type2 == 2) {
CreateFx(this, 0x25, 0);
CreateFx(this, FX_SWEAT, 0);
}
sub_0807DD50(this);
}
+2 -1
View File
@@ -9,6 +9,7 @@
#include "save.h"
#include "script.h"
#include "flags.h"
#include "effects.h"
extern void sub_08060528(Entity*);
extern void sub_0806EE04(Entity*, void*, u32);
@@ -99,7 +100,7 @@ void sub_080604DC(Entity* this) {
if (((u32)(this->spriteSettings.raw << 0x1e) >> 0x1e == 1) && sub_080040A8(this)) {
if ((this->frames.all & 1) != 0) {
this->frames.all &= 0xfe;
ent = CreateFx(this, 0x11, 0x40);
ent = CreateFx(this, FX_DASH, 0x40);
if (ent != NULL) {
ent->y.HALF.HI++;
sub_0805E3A0(ent, 3);
+2 -1
View File
@@ -7,6 +7,7 @@
#include "npc.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
extern void sub_08078850(Entity*, u32, u32, u32*);
@@ -43,7 +44,7 @@ void Smith(Entity* this) {
}
if ((this->frames.all & 1) != 0) {
this->frames.all &= 0xfe;
CreateFx(this, 0x3d, 0x20);
CreateFx(this, FX_STARS2, 0x20);
SoundReq(gUnk_08110380[(Random() & 7)]);
}
}
+2 -1
View File
@@ -3,6 +3,7 @@
#include "textbox.h"
#include "functions.h"
#include "script.h"
#include "effects.h"
extern void sub_08062CA4();
@@ -57,7 +58,7 @@ void sub_08062C7C(Entity* ent) {
ent->action = 1;
sub_0807DD64(ent);
InitializeAnimation(ent, 0);
CreateFx(ent, 37, 0);
CreateFx(ent, FX_SWEAT, 0);
sub_08062CA4(ent);
}
+2 -1
View File
@@ -9,6 +9,7 @@
#include "random.h"
#include "structures.h"
#include "functions.h"
#include "effects.h"
typedef struct {
u8 frame1;
@@ -228,7 +229,7 @@ void sub_08061E90(Entity* this, Entity* arg1) {
void sub_08061F94(Entity* this) {
Entity* ent;
ent = CreateFx(this, 0x35, 0);
ent = CreateFx(this, FX_BIG_EXPLOSION, 0);
if (ent != NULL) {
ResolveEntityOnTop(this, ent);
}
+2 -1
View File
@@ -3,6 +3,7 @@
#include "flags.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
extern void sub_08098E3C(Entity*);
extern void sub_08098E88(Entity*);
@@ -43,7 +44,7 @@ void sub_08098D6C(Entity* this) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 2;
this->actionDelay = 0x2d;
ent = CreateFx(this, 0x43, 0);
ent = CreateFx(this, FX_BIG_EXPLOSION2, 0);
if (ent != NULL) {
ent->y.HALF.HI += 8;
}
+2 -1
View File
@@ -6,6 +6,7 @@
#include "random.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
extern void (*const gUnk_08123EC0[])(Entity*);
extern void (*const gUnk_08123EEC[])(Entity*);
@@ -99,7 +100,7 @@ void sub_0809D0AC(Entity* this) {
this->collisionLayer = 1;
SetLocalFlag(0x45);
SoundReq(SFX_SECRET);
fx = CreateFx(this, 0x11, 0);
fx = CreateFx(this, FX_DASH, 0);
if (fx != NULL) {
sub_0806FAD8(this, fx);
}
+2 -1
View File
@@ -5,6 +5,7 @@
#include "flags.h"
#include "room.h"
#include "textbox.h"
#include "effects.h"
extern void (*const BookActionFuncs[])(Entity*);
extern s8 const gUnk_08123D94[];
@@ -135,7 +136,7 @@ void sub_0809B56C(Entity* this) {
SetFlag(this->field_0x86.HWORD);
fx = CreateFx(this, 2, 0);
fx = CreateFx(this, FX_DEATH, 0);
if (fx) {
ResolveEntityOnTop(this, fx);
}
+3 -2
View File
@@ -4,6 +4,7 @@
#include "room.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
extern void (*const gUnk_0811EE38[])(Entity*);
@@ -231,13 +232,13 @@ u32 sub_08081F00(u32* unk1, u32* unk2) {
}
void sub_08081F24(Entity* this) {
Entity* fx = CreateFx(this, 0x11, 0x40);
Entity* fx = CreateFx(this, FX_DASH, 0x40);
if (fx) {
fx->scriptedScene = 3;
fx->x.HALF.HI += 7;
fx->y.HALF.HI += 5;
}
fx = CreateFx(this, 0x11, 0x40);
fx = CreateFx(this, FX_DASH, 0x40);
if (fx) {
fx->scriptedScene = 3;
fx->x.HALF.HI -= 7;
+181
View File
@@ -0,0 +1,181 @@
#include "global.h"
#include "entity.h"
#include "flags.h"
#include "functions.h"
#include "area.h"
#include "audio.h"
extern void (*gUnk_08121488[])(Entity*);
extern u32 sub_08057810(void);
extern void CreateMagicSparkles(u32, u32, u32);
u32 sub_0808C128(Entity*);
void sub_0808C13C(Entity*);
void sub_0808C148(Entity*, u32);
void sub_0808C01C(Entity*, u32);
void JarPortal(Entity* this) {
gUnk_08121488[this->action](this);
}
void sub_0808BE9C(Entity* this) {
this->flags |= 0x80;
this->damageType = 1;
this->field_0x3c = 0x47;
this->field_0x40 = 0x44;
this->flags2 = 0x80;
this->field_0x68.HALF.LO = 0;
if (CheckLocalFlag(this->type)) {
if (this->field_0x7c.BYTES.byte0 != 0) {
this->action = 1;
InitAnimationForceUpdate(this, 0);
} else {
this->action = 3;
InitAnimationForceUpdate(this, 1);
}
} else {
if (this->field_0x7c.BYTES.byte0 == 0) {
this->action = 1;
InitAnimationForceUpdate(this, 0);
} else {
this->action = 3;
InitAnimationForceUpdate(this, 1);
}
}
}
void sub_0808BF14(Entity* this) {
if (sub_0808C128(this)) {
this->action++;
sub_0808C13C(this);
if (this->field_0x7c.BYTES.byte0 == 0) {
SetLocalFlag(this->type);
} else {
ClearLocalFlag(this->type);
}
sub_0808C148(this, 0);
}
sub_0808C01C(this, 0);
}
void sub_0808BF58(Entity* this) {
sub_08003FC4(this, 0x2000);
switch (this->subAction) {
case 0:
if (this->field_0x20 <= 98303) {
++this->subAction;
InitAnimationForceUpdate(this, 2);
}
break;
case 1:
UpdateAnimationSingleFrame(this);
if (!this->height.HALF.HI) {
++this->subAction;
this->field_0x20 = 0x8000;
}
break;
case 2:
UpdateAnimationSingleFrame(this);
if (!this->height.HALF.HI) {
++this->action;
this->field_0xf = 0;
InitAnimationForceUpdate(this, 1);
sub_0808C148(this, 1);
}
break;
}
}
void sub_0808BFD8(Entity* this) {
if (sub_0808C128(this)) {
++this->action;
sub_0808C13C(this);
if (!this->field_0x7c.BYTES.byte0)
ClearLocalFlag(this->type);
else
SetLocalFlag(this->type);
sub_0808C148(this, 0);
}
sub_0808C01C(this, 1);
}
void sub_0808C01C(Entity* this, u32 r1) {
if (CheckPlayerProximity(this->x.HALF.HI - 0x18, this->y.HALF.HI - 0x18, 0x30, 0x30)) {
u32 type;
gArea.curPortalX = this->x.HALF.HI;
gArea.curPortalY = this->y.HALF.HI;
gArea.curPortalExitDirection = 2;
type = 4;
if (r1 != 0)
type = 2;
gArea.curPortalType = type;
if (r1 == 1) {
if (((gPlayerState.flags.all & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) {
gArea.field_0x18 = 2;
} else {
if (sub_08057810() != 0) {
gArea.field_0x18 = 3;
}
}
CreateMagicSparkles(this->x.HALF.HI, this->y.HALF.HI, this->collisionLayer);
if (this->field_0xf == 0) {
this->field_0xf = 1;
SoundReq(SFX_NEAR_PORTAL);
}
}
}
}
void sub_0808C0AC(Entity* this) {
sub_08003FC4(this, 0x2000);
switch (this->subAction) {
case 0:
if (this->field_0x20 <= 98303) {
this->subAction = 1;
InitAnimationForceUpdate(this, 3);
}
break;
case 1:
UpdateAnimationSingleFrame(this);
if (!this->height.HALF.HI) {
++this->subAction;
this->field_0x20 = 0x8000;
}
break;
case 2:
UpdateAnimationSingleFrame(this);
if (!this->height.HALF.HI) {
this->action = 1;
InitAnimationForceUpdate(this, 0);
sub_0808C148(this, 1);
}
break;
}
}
u32 sub_0808C128(Entity* this) {
return this->bitfield == 157;
}
void sub_0808C13C(Entity* this) {
this->subAction = 0;
this->field_0x20 = 163840;
}
void sub_0808C148(Entity* this, u32 a2) {
u32 pos;
pos = COORD_TO_TILE(this);
if (!a2) {
SetTile(16530, pos - 1, this->collisionLayer);
SetTile(16531, pos, this->collisionLayer);
SetTile(16532, pos + 63, this->collisionLayer);
SetTile(16533, pos + 64, this->collisionLayer);
} else {
sub_0807BA8C(pos - 1, this->collisionLayer);
sub_0807BA8C(pos, this->collisionLayer);
sub_0807BA8C(pos + 63, this->collisionLayer);
sub_0807BA8C(pos + 64, this->collisionLayer);
}
}
+3 -2
View File
@@ -4,6 +4,7 @@
#include "game.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
void sub_08083338(Entity*);
void sub_080834B4(Entity*);
@@ -315,12 +316,12 @@ u32 sub_080837B0(Entity* this) {
void sub_08083814(Entity* this, u32 unk0) {
Entity* fx;
const struct_0811F730* tmp = &gUnk_0811F730[unk0];
fx = CreateFx(this, 0x11, 0x40);
fx = CreateFx(this, FX_DASH, 0x40);
if (fx) {
fx->x.HALF.HI += tmp->unk_00.x;
fx->y.HALF.HI += tmp->unk_00.y;
}
fx = CreateFx(this, 0x11, 0x40);
fx = CreateFx(this, FX_DASH, 0x40);
if (fx) {
fx->x.HALF.HI += tmp->unk_02.x;
fx->y.HALF.HI += tmp->unk_02.y;
+2 -1
View File
@@ -6,6 +6,7 @@
#include "player.h"
#include "flags.h"
#include "functions.h"
#include "effects.h"
extern void (*MaskActionFuncs[])(Entity*);
@@ -111,7 +112,7 @@ void sub_08092B0C(Entity* this) {
break;
}
CreateFx(this, 5, 0);
CreateFx(this, FX_POT_SHATTER, 0);
sub_0805457C(this, 3);
} else {
+3 -2
View File
@@ -4,6 +4,7 @@
#include "flags.h"
#include "audio.h"
#include "functions.h"
#include "effects.h"
extern u32 sub_08083734(Entity*, u32);
extern void sub_080A080C(Entity*);
@@ -56,12 +57,12 @@ void sub_080A074C(Entity* this) {
this->height.HALF.HI = 0;
this->x.HALF.HI = this->field_0x70.HALF.LO;
this->y.HALF.HI = this->field_0x70.HALF.HI;
ent = CreateFx(this, 0x11, 0x40);
ent = CreateFx(this, FX_DASH, 0x40);
if (ent != NULL) {
ent->x.HALF.HI += 0xc;
ent->y.HALF.HI -= 0xc;
}
ent = CreateFx(this, 0x11, 0x40);
ent = CreateFx(this, FX_DASH, 0x40);
if (ent != NULL) {
ent->x.HALF.HI -= 0xc;
ent->y.HALF.HI -= 0xc;
+2 -1
View File
@@ -5,6 +5,7 @@
#include "audio.h"
#include "structures.h"
#include "functions.h"
#include "effects.h"
void sub_0809F318(Entity*);
void sub_0809F374(Entity*);
@@ -85,7 +86,7 @@ void sub_0809F408(Entity* this) {
switch (this->frames.all) {
case 9:
this->frames.all = 0;
CreateFx(this, 0x43, 0);
CreateFx(this, FX_BIG_EXPLOSION2, 0);
gMenu.field_0x0 = 1;
break;
case 0x80:
+6 -5
View File
@@ -5,6 +5,7 @@
#include "room.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
void sub_08082824(Entity*);
static void sub_08082850(Entity*, Entity*);
@@ -97,7 +98,7 @@ void sub_08082310(Entity* this) {
break;
default:
if (sub_080002B8(this) == 13) {
CreateFx(this, 0, 0);
CreateFx(this, FX_FALL_DOWN, 0);
} else if (tileType == 0x4005) {
gPlayerState.field_0xab = 4;
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
@@ -137,13 +138,13 @@ void sub_08082588(Entity* this) {
void sub_0808259C(Entity* this) {
switch (sub_080043E8(this)) {
case 2:
CreateFx(this, 11, 0);
CreateFx(this, FX_WATER_SPLASH, 0);
break;
case 1:
CreateFx(this, 0, 0);
CreateFx(this, FX_FALL_DOWN, 0);
break;
case 3:
CreateFx(this, 12, 0);
CreateFx(this, FX_LAVA_SPLASH, 0);
break;
default:
sub_08082850(this, &gPlayerEntity);
@@ -261,7 +262,7 @@ void sub_08082824(Entity* this) {
static void sub_08082850(Entity* this, Entity* parent) {
u32 parameter = sub_0808288C(this, this->type, this->field_0x7c.BYTES.byte1, this->type2);
Entity* fxEntity = CreateFx(this, 5, parameter);
Entity* fxEntity = CreateFx(this, FX_POT_SHATTER, parameter);
if (fxEntity) {
fxEntity->parent = parent;
}
+2 -1
View File
@@ -6,6 +6,7 @@
#include "room.h"
#include "structures.h"
#include "functions.h"
#include "effects.h"
extern void sub_0809E96C(Entity*);
extern void CreateSparkle(Entity*);
@@ -70,7 +71,7 @@ void sub_0809E918(Entity* this) {
Entity* fx;
s16* i = gUnk_08124364;
while (*i != -1000) {
fx = CreateFx(this, 3, 0);
fx = CreateFx(this, FX_BUSH, 0);
if (fx != NULL) {
fx->x.HALF.HI += i[0];
fx->y.HALF.HI += i[1];
+2 -1
View File
@@ -4,6 +4,7 @@
#include "save.h"
#include "script.h"
#include "functions.h"
#include "effects.h"
extern void sub_08078850(Entity*, u32, u32, u8*);
@@ -26,5 +27,5 @@ void sub_080A2124(Entity* this) {
void Windcrest_Unlock(Entity* this) {
SoundReq(SFX_SECRET);
gSave.windcrests = gSave.windcrests | 1 << (this->type2 + 0x18);
CreateFx(this, 0x46, 0);
CreateFx(this, FX_GIANT_EXPLOSION, 0);
}
+5 -4
View File
@@ -10,6 +10,7 @@
#include "object.h"
#include "functions.h"
#include "object.h"
#include "effects.h"
static void (*const sPlayerActions[])(Entity*);
extern void (*const gUnk_0811BA60[])(Entity*);
@@ -501,7 +502,7 @@ void sub_0807127C(Entity* this) {
if ((gPlayerState.flags.all & 0x10000) == 0)
sub_08004168(this);
CreateFx(this, 11, 0);
CreateFx(this, FX_WATER_SPLASH, 0);
if ((gPlayerState.flags.all & 8) == 0)
gPlayerState.field_0x8 = 0x72c;
@@ -1143,7 +1144,7 @@ void sub_08072008(Entity* this) {
this->flags |= 0x80;
this->spriteOffsetX = 0;
gPlayerState.flags.all &= ~(0x800 | 0x1);
CreateFx(this, 0xd, 0);
CreateFx(this, FX_ICE, 0);
sub_080791BC();
}
@@ -1305,7 +1306,7 @@ void sub_08072354(Entity* this) {
gPlayerState.field_0x8 = 0x2c1;
gPlayerState.flags.all &= ~0x400;
UpdateSpriteForCollisionLayer(this);
CreateFx(this, 0xc, 0);
CreateFx(this, FX_LAVA_SPLASH, 0);
SoundReq(SFX_1A6);
}
@@ -1459,7 +1460,7 @@ void sub_080726F4(Entity* this) {
this->direction = (this->animationState & 6) << 2;
if (((gPlayerState.flags.all & 0x80) == 0) && (--this->actionDelay == 0xff)) {
CreateFx(&gPlayerEntity, 0x11, 0x40);
CreateFx(&gPlayerEntity, FX_DASH, 0x40);
this->actionDelay = 4;
}
if ((gPlayerState.flags.all & 2) == 0) {
+3 -2
View File
@@ -3,6 +3,7 @@
#include "functions.h"
#include "player.h"
#include "room.h"
#include "effects.h"
extern void (*const gUnk_08109AC8[])(Entity*);
extern Hitbox gUnk_08109AD0;
@@ -46,11 +47,11 @@ void sub_0805FC74(Entity* this) {
}
if (!sub_080002F0(COORD_TO_TILE(this), gPlayerEntity.collisionLayer, 0x80) &&
sub_080040D8(this, &gUnk_08003E44, this->x.HALF.HI, this->y.HALF.HI)) {
CreateFx(this, 0x19, 0);
CreateFx(this, FX_SWORD_MAGIC, 0);
DeleteThisEntity();
}
if (this->bitfield != 0) {
CreateFx(this, 0x19, 0);
CreateFx(this, FX_SWORD_MAGIC, 0);
DeleteThisEntity();
}
} else {
+2 -1
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "effects.h"
extern void (*const gUnk_080B3E30[])(Entity*);
@@ -33,6 +34,6 @@ void sub_08019444(Entity* this) {
void sub_08019468(Entity* this) {
if (this->field_0x40 == 0x0e) {
CreateFx(this, 0x50, 0);
CreateFx(this, FX_REFLECT5, 0);
}
}
+3 -2
View File
@@ -3,6 +3,7 @@
#include "coord.h"
#include "functions.h"
#include "audio.h"
#include "effects.h"
extern void (*const gUnk_080B43F4[])(Entity*);
@@ -70,11 +71,11 @@ void sub_08019580(Entity* this) {
}
if ((sub_080002F0(TILE(this->x.HALF.HI, this->y.HALF.HI), gPlayerEntity.collisionLayer, 0x80) == 0) &&
(sub_080040D8(this, &gUnk_08003E44, this->x.HALF.HI, this->y.HALF.HI) != 0)) {
CreateFx(this, 0x19, 0);
CreateFx(this, FX_SWORD_MAGIC, 0);
DeleteThisEntity();
}
if (this->bitfield != 0) {
CreateFx(this, 0x19, 0);
CreateFx(this, FX_SWORD_MAGIC, 0);
DeleteThisEntity();
}
if (sub_08008790(this, 0xc) != NULL) {
+4 -3
View File
@@ -1,6 +1,7 @@
#include "entity.h"
#include "enemy.h"
#include "functions.h"
#include "effects.h"
extern void CreateItemOnGround(Entity*);
extern s32 sub_080AF090(Entity*);
@@ -46,7 +47,7 @@ void CannonballProjectile_Init(Entity* this) {
void CannonballProjectile_Action1(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) == 0) {
CreateFx(this, 2, 0);
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
}
sub_080AB5F4(this);
@@ -56,7 +57,7 @@ void CannonballProjectile_Action2(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
if ((sub_080AB634(this) == 0) && (this->collisions != 0)) {
CreateFx(this, 2, 0);
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
}
}
@@ -85,7 +86,7 @@ bool32 sub_080AB634(Entity* this) {
entities[i]->action = 3;
entities[i]->actionDelay = 0x1e;
entities[i]->spriteSettings.b.draw = 0;
CreateFx(entities[i], 0x45, 0);
CreateFx(entities[i], FX_WHITE_ROCK, 0);
}
DeleteEntity(this);
return TRUE;
+5 -4
View File
@@ -3,6 +3,7 @@
#include "player.h"
#include "coord.h"
#include "functions.h"
#include "effects.h"
extern void sub_08078954(Entity*);
@@ -129,13 +130,13 @@ void DirtBallProjectile_Action2(Entity* this) {
if (tmp != 0) {
switch (tmp) {
case 2:
CreateFx(this, 0xb, 0);
CreateFx(this, FX_WATER_SPLASH, 0);
break;
case 1:
CreateFx(this, 0, 0);
CreateFx(this, FX_FALL_DOWN, 0);
break;
case 3:
CreateFx(this, 0xc, 0);
CreateFx(this, FX_LAVA_SPLASH, 0);
break;
}
DeleteThisEntity();
@@ -148,7 +149,7 @@ void DirtBallProjectile_Action2(Entity* this) {
this->action = 3;
return;
case 2:
entity = CreateFx(this, 5, 0x80);
entity = CreateFx(this, FX_POT_SHATTER, 0x80);
if (entity != NULL) {
entity->parent = NULL;
}
+2 -1
View File
@@ -5,6 +5,7 @@
#include "functions.h"
#include "random.h"
#include "audio.h"
#include "effects.h"
extern void sub_0806F5BC(Entity*, u32, u32);
extern u32 sub_080041DC(Entity*, u32, u32);
@@ -90,7 +91,7 @@ void GleerokProjectile_Action1(Entity* this) {
if (this->type == 3) {
if (sub_08003FC4(this, 0x1800) == 0) {
sub_08008790(this, 7);
CreateFx(this, 4, 0);
CreateFx(this, FX_ROCK, 0);
DeleteThisEntity();
}
} else {
+3 -2
View File
@@ -2,6 +2,7 @@
#include "enemy.h"
#include "functions.h"
#include "player.h"
#include "effects.h"
extern void sub_0800449C(Entity*, u32);
extern void sub_08079D84(void);
@@ -26,7 +27,7 @@ void nullsub_539(Entity* this) {
void sub_080A9CF0(Entity* this) {
if (sub_0806F520() == 0) {
CreateFx(this, 2, 0);
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
}
LakituCloudProjectile_SubActions[this->subAction](this);
@@ -46,7 +47,7 @@ void LakituCloudProjectile_SubAction2(Entity* this) {
sub_0800449C(&gPlayerEntity, 0x7a);
sub_08079D84();
}
CreateFx(this, 2, 0);
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
}
}
+2 -1
View File
@@ -1,5 +1,6 @@
#include "entity.h"
#include "enemy.h"
#include "effects.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
@@ -35,7 +36,7 @@ void LakituLightning_Action1(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
if ((this->collisions != 0) || (--this->actionDelay == 0)) {
CreateFx(this, 0x4f, 0);
CreateFx(this, FX_BLUE_EFC, 0);
DeleteThisEntity();
}
if (sub_080A7EB0(this) != 0) {
+3 -2
View File
@@ -3,6 +3,7 @@
#include "random.h"
#include "functions.h"
#include "audio.h"
#include "effects.h"
void OctorokBossProjectile_Action2(Entity*);
extern void sub_080AE58C(Entity*, u32, u32);
@@ -183,14 +184,14 @@ void OctorokBossProjectile_Action1(Entity* this) {
if (sub_08003FC4(this, 0x1800) != 0) {
return;
}
CreateFx(this, 4, 0);
CreateFx(this, FX_ROCK, 0);
DeleteThisEntity();
break;
}
}
void OctorokBossProjectile_Action2(Entity* this) {
CreateFx(this, 4, 0);
CreateFx(this, FX_ROCK, 0);
DeleteThisEntity();
}

Some files were not shown because too many files have changed in this diff Show More