diff --git a/asm/ballChainSoldier.s b/asm/ballChainSoldier.s index 515d4854..0f897b81 100644 --- a/asm/ballChainSoldier.s +++ b/asm/ballChainSoldier.s @@ -71,7 +71,7 @@ sub_0803E580: @ 0x0803E580 adds r0, r5, #0 movs r1, #0x19 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent cmp r0, #0 beq _0803E5E4 str r5, [r0, #0x50] diff --git a/asm/bowMoblin.s b/asm/bowMoblin.s index 4ac302e7..1a005d0f 100644 --- a/asm/bowMoblin.s +++ b/asm/bowMoblin.s @@ -344,7 +344,7 @@ _0803C46C: lsrs r2, r2, #0x19 adds r0, r4, #0 movs r1, #0xd - bl sub_0804A98C + bl CreateProjectileWithParent adds r2, r0, #0 cmp r2, #0 beq _0803C49A diff --git a/asm/businessScrubPrologue.s b/asm/businessScrubPrologue.s index f1e8909d..8a48c644 100644 --- a/asm/businessScrubPrologue.s +++ b/asm/businessScrubPrologue.s @@ -261,7 +261,7 @@ _08045D60: adds r0, r4, #0 movs r1, #4 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _08045DF8 diff --git a/asm/code_08049D30.s b/asm/code_08049D30.s index 930b85a7..2368553e 100644 --- a/asm/code_08049D30.s +++ b/asm/code_08049D30.s @@ -1682,13 +1682,13 @@ _0804A982: mov sl, r5 pop {r4, r5, r6, r7, pc} - thumb_func_start sub_0804A98C -sub_0804A98C: @ 0x0804A98C + thumb_func_start CreateProjectileWithParent +CreateProjectileWithParent: @ 0x0804A98C push {r4, r5, r6, lr} adds r6, r0, #0 adds r0, r1, #0 adds r5, r2, #0 - bl sub_080A7EE0 + bl CreateProjectile adds r4, r0, #0 cmp r4, #0 beq _0804A9A8 diff --git a/asm/code_0805E3B0.s b/asm/code_0805E3B0.s index 5a0336df..adb78211 100644 --- a/asm/code_0805E3B0.s +++ b/asm/code_0805E3B0.s @@ -333,7 +333,7 @@ sub_0805E5C0: @ 0x0805E5C0 bl sub_0805E428 bl ClearHitboxList bl sub_0806F0A4 - ldr r1, _0805E5F4 @ =gUnk_03005F40 + ldr r1, _0805E5F4 @ =_UpdateEntities movs r0, #0 bl _call_via_r1 bl ClearAllDeletedEntities @@ -341,18 +341,18 @@ sub_0805E5C0: @ 0x0805E5C0 pop {pc} .align 2, 0 _0805E5F0: .4byte gRoomVars -_0805E5F4: .4byte gUnk_03005F40 +_0805E5F4: .4byte _UpdateEntities thumb_func_start sub_0805E5F8 sub_0805E5F8: @ 0x0805E5F8 push {lr} - ldr r1, _0805E608 @ =gUnk_03005F40 + ldr r1, _0805E608 @ =_UpdateEntities movs r0, #1 bl _call_via_r1 bl ClearAllDeletedEntities pop {pc} .align 2, 0 -_0805E608: .4byte gUnk_03005F40 +_0805E608: .4byte _UpdateEntities thumb_func_start EraseAllEntities EraseAllEntities: @ 0x0805E60C diff --git a/asm/code_080A7C00.s b/asm/code_080A7C00.s index 159cfcbb..38273dbe 100644 --- a/asm/code_080A7C00.s +++ b/asm/code_080A7C00.s @@ -411,8 +411,8 @@ _080A7EDC: _080A7EDE: pop {pc} - thumb_func_start sub_080A7EE0 -sub_080A7EE0: @ 0x080A7EE0 + thumb_func_start CreateProjectile +CreateProjectile: @ 0x080A7EE0 push {r4, r5, lr} adds r5, r0, #0 bl GetEmptyEntity diff --git a/asm/enemy49.s b/asm/enemy49.s index 771bfb54..416bbc1f 100644 --- a/asm/enemy49.s +++ b/asm/enemy49.s @@ -262,7 +262,7 @@ sub_0803D058: @ 0x0803D058 adds r4, r0, #0 movs r1, #0x16 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r5, r0, #0 cmp r5, #0 beq _0803D0AE diff --git a/asm/enemy5F.s b/asm/enemy5F.s index 0c4df266..4109cf33 100644 --- a/asm/enemy5F.s +++ b/asm/enemy5F.s @@ -279,7 +279,7 @@ _080484BC: ands r0, r1 strb r0, [r3] movs r0, #0x24 - bl sub_080A7EE0 + bl CreateProjectile adds r1, r0, #0 cmp r1, #0 beq _080484E6 diff --git a/asm/enemy64.s b/asm/enemy64.s index 19beed75..d70851ed 100644 --- a/asm/enemy64.s +++ b/asm/enemy64.s @@ -139,7 +139,7 @@ _08049144: bl sub_0807B7D8 _0804916E: movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile adds r2, r0, #0 cmp r2, #0 beq _080491E4 @@ -560,7 +560,7 @@ _0804948C: cmp r0, #0 beq _080494B2 movs r0, #0x23 - bl sub_080A7EE0 + bl CreateProjectile adds r2, r0, #0 cmp r2, #0 beq _080494B2 diff --git a/asm/gleerok.s b/asm/gleerok.s index b1e611bb..9bb5a88a 100644 --- a/asm/gleerok.s +++ b/asm/gleerok.s @@ -1838,7 +1838,7 @@ _0802DD74: adds r0, r4, #0 movs r1, #0xa movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 str r1, [r4, #0x54] cmp r1, #0 @@ -1985,7 +1985,7 @@ _0802DE7E: bne _0802DEC4 adds r0, r5, #0 movs r1, #0xa - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 str r1, [r5, #0x54] cmp r1, #0 @@ -2711,7 +2711,7 @@ _0802E40C: adds r0, r4, #0 movs r1, #0xa movs r2, #3 - bl sub_0804A98C + bl CreateProjectileWithParent _0802E422: adds r0, r4, #0 bl sub_0802E518 diff --git a/asm/gyorgFemale.s b/asm/gyorgFemale.s index 49dd9eda..cd5d79f3 100644 --- a/asm/gyorgFemale.s +++ b/asm/gyorgFemale.s @@ -29,7 +29,7 @@ sub_0804614C: @ 0x0804614C cmp r0, #0x3d bhi _08046244 movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile adds r1, r0, #0 movs r4, #0 strb r4, [r1, #0xa] diff --git a/asm/intr.s b/asm/intr.s index 05967efd..ecb65664 100644 --- a/asm/intr.s +++ b/asm/intr.s @@ -659,6 +659,7 @@ UpdateEntities: @ 0x080B21B0 ldr r8, [fp, #4] ldr r0, [fp, #8] add pc, pc, #0x60 @ =_080B2230 +@ UpdateEntities starts here ldr r1, _080B2274 @ =gUnk_080026A4 add r1, r1, r0, lsl #4 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} @@ -682,12 +683,12 @@ _080B21FC: ldr r1, [sl, r1, lsl #2] mov r0, r4 mov lr, pc - bx r1 + bx r1 @ Jump to address stored in r1 _080B2224: ldr r0, [fp, #8] cmp r0, r4 bleq sub_080B1C54 -_080B2230: +_080B2230: @ jumped here if ClearAndUpdateEntities ldr r4, [r0, #4] b _080B21FC _080B2238: @@ -695,7 +696,7 @@ _080B2238: str r0, [fp, #8] pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} bx lr -_080B2248: .4byte DeleteThisEntity +_080B2248: .4byte DeleteThisEntity @ 0x3005fbc _080B224C: .4byte PlayerUpdate _080B2250: .4byte DeleteThisEntity _080B2254: .4byte EnemyUpdate diff --git a/asm/non_matching/projectile19/sub_080AB170.inc b/asm/non_matching/ballAndChain/sub_080AB170.inc similarity index 100% rename from asm/non_matching/projectile19/sub_080AB170.inc rename to asm/non_matching/ballAndChain/sub_080AB170.inc diff --git a/asm/non_matching/eu/sub_080AA044.inc b/asm/non_matching/eu/MandiblesProjectile_Action3.inc similarity index 100% rename from asm/non_matching/eu/sub_080AA044.inc rename to asm/non_matching/eu/MandiblesProjectile_Action3.inc diff --git a/asm/non_matching/projectile23/sub_080AC8DC.inc b/asm/non_matching/gyorgMaleEnergyProjectile/sub_080AC8DC.inc similarity index 94% rename from asm/non_matching/projectile23/sub_080AC8DC.inc rename to asm/non_matching/gyorgMaleEnergyProjectile/sub_080AC8DC.inc index e1bc226d..dbb0ab91 100644 --- a/asm/non_matching/projectile23/sub_080AC8DC.inc +++ b/asm/non_matching/gyorgMaleEnergyProjectile/sub_080AC8DC.inc @@ -35,6 +35,6 @@ _080AC8FE: bl InitializeAnimation _080AC920: adds r0, r4, #0 - bl sub_080AC8C4 + bl GyorgMaleEnergyProjectile_OnTick pop {r4, pc} .syntax divided diff --git a/asm/non_matching/projectile22/sub_080AC388.inc b/asm/non_matching/gyorgTail/sub_080AC388.inc similarity index 100% rename from asm/non_matching/projectile22/sub_080AC388.inc rename to asm/non_matching/gyorgTail/sub_080AC388.inc diff --git a/asm/non_matching/projectile22/sub_080AC5E4.inc b/asm/non_matching/gyorgTail/sub_080AC5E4.inc similarity index 94% rename from asm/non_matching/projectile22/sub_080AC5E4.inc rename to asm/non_matching/gyorgTail/sub_080AC5E4.inc index 7189007f..1bd2d4b8 100644 --- a/asm/non_matching/projectile22/sub_080AC5E4.inc +++ b/asm/non_matching/gyorgTail/sub_080AC5E4.inc @@ -16,7 +16,7 @@ movs r0, #0x11 strb r0, [r1] movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile adds r6, r0, #0 ldrb r0, [r5, #0xa] strb r0, [r6, #0xa] @@ -30,7 +30,7 @@ strb r0, [r1] str r6, [r5, #0x54] movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile adds r7, r0, #0 ldrb r0, [r5, #0xa] strb r0, [r7, #0xa] @@ -46,7 +46,7 @@ strb r1, [r0] str r7, [r6, #0x54] movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile ldrb r1, [r5, #0xa] strb r1, [r0, #0xa] movs r1, #3 @@ -79,7 +79,7 @@ _080AC678: movs r0, #0xf strb r0, [r1] movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile adds r6, r0, #0 ldrb r0, [r5, #0xa] strb r0, [r6, #0xa] @@ -95,7 +95,7 @@ _080AC678: strb r1, [r0] str r6, [r5, #0x54] movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile adds r7, r0, #0 ldrb r0, [r5, #0xa] strb r0, [r7, #0xa] @@ -112,7 +112,7 @@ _080AC678: str r7, [r6, #0x54] _080AC6C8: movs r0, #0x22 - bl sub_080A7EE0 + bl CreateProjectile adds r6, r0, #0 ldrb r0, [r5, #0xa] strb r0, [r6, #0xa] diff --git a/asm/non_matching/projectile22/sub_080AC6F0.inc b/asm/non_matching/gyorgTail/sub_080AC6F0.inc similarity index 100% rename from asm/non_matching/projectile22/sub_080AC6F0.inc rename to asm/non_matching/gyorgTail/sub_080AC6F0.inc diff --git a/asm/non_matching/projectile22/sub_080AC760.inc b/asm/non_matching/gyorgTail/sub_080AC760.inc similarity index 100% rename from asm/non_matching/projectile22/sub_080AC760.inc rename to asm/non_matching/gyorgTail/sub_080AC760.inc diff --git a/asm/non_matching/projectile22/sub_080AC7C4.inc b/asm/non_matching/gyorgTail/sub_080AC7C4.inc similarity index 100% rename from asm/non_matching/projectile22/sub_080AC7C4.inc rename to asm/non_matching/gyorgTail/sub_080AC7C4.inc diff --git a/asm/non_matching/projectile13/sub_080AA320.inc b/asm/non_matching/mandiblesProjectile/sub_080AA320.inc similarity index 100% rename from asm/non_matching/projectile13/sub_080AA320.inc rename to asm/non_matching/mandiblesProjectile/sub_080AA320.inc diff --git a/asm/non_matching/projectile13/sub_080AA374.inc b/asm/non_matching/mandiblesProjectile/sub_080AA374.inc similarity index 100% rename from asm/non_matching/projectile13/sub_080AA374.inc rename to asm/non_matching/mandiblesProjectile/sub_080AA374.inc diff --git a/asm/non_matching/mazaal/sub_08034B38.inc b/asm/non_matching/mazaal/sub_08034B38.inc index 58dda627..319ce862 100644 --- a/asm/non_matching/mazaal/sub_08034B38.inc +++ b/asm/non_matching/mazaal/sub_08034B38.inc @@ -17,7 +17,7 @@ b _08034B9A _08034B58: movs r0, #0xe - bl sub_080A7EE0 + bl CreateProjectile adds r5, r0, #0 cmp r5, #0 beq _08034B9A diff --git a/asm/non_matching/projectile3/sub_080A83B4.inc b/asm/non_matching/moblinSpear/MoblinSpear_Action1.inc similarity index 100% rename from asm/non_matching/projectile3/sub_080A83B4.inc rename to asm/non_matching/moblinSpear/MoblinSpear_Action1.inc diff --git a/asm/non_matching/projectile14/sub_080AA544.inc b/asm/non_matching/projectile14/sub_080AA544.inc deleted file mode 100644 index 22945df2..00000000 --- a/asm/non_matching/projectile14/sub_080AA544.inc +++ /dev/null @@ -1,134 +0,0 @@ - .syntax unified - push {r4, r5, r6, r7, lr} - mov r7, sb - mov r6, r8 - push {r6, r7} - adds r6, r0, #0 - ldrb r0, [r6, #0xb] - cmp r0, #8 - bhi _080AA618 - ldr r0, _080AA5E8 @ =gUnk_08129FF8 - mov sb, r0 - movs r1, #0x2e - ldrsh r2, [r6, r1] - ldr r1, _080AA5EC @ =gRoomControls - ldrh r0, [r1, #6] - subs r2, r2, r0 - asrs r2, r2, #4 - movs r3, #0x3f - ands r2, r3 - movs r4, #0x32 - ldrsh r0, [r6, r4] - ldrh r1, [r1, #8] - subs r0, r0, r1 - asrs r0, r0, #4 - ands r0, r3 - lsls r0, r0, #6 - orrs r2, r0 - ldrb r0, [r6, #0xb] - add r0, sb - ldrb r0, [r0] - lsls r0, r0, #0x18 - asrs r0, r0, #0x18 - adds r7, r2, r0 - movs r4, #0 - movs r5, #0 - movs r0, #0x38 - adds r0, r0, r6 - mov r8, r0 -_080AA58E: - mov r1, sb - adds r0, r1, r4 - ldrb r0, [r0] - lsls r0, r0, #0x18 - asrs r0, r0, #0x18 - subs r0, r7, r0 - lsls r0, r0, #0x10 - lsrs r0, r0, #0x10 - mov r2, r8 - ldrb r1, [r2] - bl sub_080002C8 - cmp r0, #0x3e - bne _080AA5AC - adds r5, #1 -_080AA5AC: - adds r4, #1 - cmp r4, #8 - bls _080AA58E - cmp r5, #8 - bne _080AA5F4 - movs r4, #0 - ldr r5, _080AA5F0 @ =gUnk_08129FD0 -_080AA5BA: - ldrh r0, [r5] - mov r3, sb - adds r1, r3, r4 - ldrb r1, [r1] - lsls r1, r1, #0x18 - asrs r1, r1, #0x18 - subs r1, r7, r1 - mov r3, r8 - ldrb r2, [r3] - bl sub_0807B7D8 - adds r5, #2 - adds r4, #1 - cmp r4, #8 - bls _080AA5BA - adds r0, r6, #0 - adds r1, r7, #0 - bl sub_080AA654 - ldrh r0, [r6, #0x24] - bl SetFlag - b _080AA648 - .align 2, 0 -_080AA5E8: .4byte gUnk_08129FF8 -_080AA5EC: .4byte gRoomControls -_080AA5F0: .4byte gUnk_08129FD0 -_080AA5F4: - ldr r2, _080AA614 @ =gUnk_08129FE4 - ldrb r1, [r6, #0xb] - lsls r0, r1, #1 - adds r0, r0, r2 - ldrh r0, [r0] - add r1, sb - ldrb r1, [r1] - lsls r1, r1, #0x18 - asrs r1, r1, #0x18 - subs r1, r7, r1 - mov r4, r8 - ldrb r2, [r4] - bl sub_0807B7D8 - b _080AA648 - .align 2, 0 -_080AA614: .4byte gUnk_08129FE4 -_080AA618: - movs r1, #0x2e - ldrsh r0, [r6, r1] - ldr r2, _080AA650 @ =gRoomControls - ldrh r1, [r2, #6] - subs r0, r0, r1 - asrs r0, r0, #4 - movs r3, #0x3f - ands r0, r3 - movs r4, #0x32 - ldrsh r1, [r6, r4] - ldrh r2, [r2, #8] - subs r1, r1, r2 - asrs r1, r1, #4 - ands r1, r3 - lsls r1, r1, #6 - orrs r0, r1 - adds r1, r6, #0 - adds r1, #0x38 - ldrb r1, [r1] - bl sub_0807BA8C - ldrh r0, [r6, #0x24] - bl SetFlag -_080AA648: - pop {r3, r4} - mov r8, r3 - mov sb, r4 - pop {r4, r5, r6, r7, pc} - .align 2, 0 -_080AA650: .4byte gRoomControls - .syntax divided diff --git a/asm/non_matching/projectile1B/sub_080AB634.inc b/asm/non_matching/projectile1B/sub_080AB634.inc deleted file mode 100644 index 95c6b453..00000000 --- a/asm/non_matching/projectile1B/sub_080AB634.inc +++ /dev/null @@ -1,49 +0,0 @@ - .syntax unified - push {r4, r5, r6, lr} - adds r6, r0, #0 - ldr r0, [r6, #0x50] - movs r5, #0 - adds r4, r0, #0 - adds r4, #0x20 -_080AB640: - ldr r1, [r4] - cmp r1, #0 - beq _080AB684 - adds r0, r6, #0 - bl sub_080177A0 - cmp r0, #0 - beq _080AB684 - ldr r1, [r4] - ldrb r0, [r1, #0xc] - cmp r0, #2 - bhi _080AB67A - movs r0, #3 - strb r0, [r1, #0xc] - ldr r1, [r4] - movs r0, #0x1e - strb r0, [r1, #0xe] - ldr r2, [r4] - ldrb r0, [r2, #0x18] - movs r3, #4 - rsbs r3, r3, #0 - adds r1, r3, #0 - ands r0, r1 - strb r0, [r2, #0x18] - ldr r0, [r4] - movs r1, #0x45 - movs r2, #0 - bl CreateFx -_080AB67A: - adds r0, r6, #0 - bl DeleteEntity - movs r0, #1 - b _080AB68E -_080AB684: - adds r4, #4 - adds r5, #1 - cmp r5, #3 - bls _080AB640 - movs r0, #0 -_080AB68E: - pop {r4, r5, r6, pc} - .syntax divided diff --git a/asm/non_matching/projectile15/sub_080AA9E0.inc b/asm/non_matching/spiderWeb/sub_080AA9E0.inc similarity index 100% rename from asm/non_matching/projectile15/sub_080AA9E0.inc rename to asm/non_matching/spiderWeb/sub_080AA9E0.inc diff --git a/asm/non_matching/projectile1E/sub_080ABA74.inc b/asm/non_matching/spikedRollers/sub_080ABA74.inc similarity index 100% rename from asm/non_matching/projectile1E/sub_080ABA74.inc rename to asm/non_matching/spikedRollers/sub_080ABA74.inc diff --git a/asm/non_matching/projectile1E/sub_080ABAE0.inc b/asm/non_matching/spikedRollers/sub_080ABAE0.inc similarity index 100% rename from asm/non_matching/projectile1E/sub_080ABAE0.inc rename to asm/non_matching/spikedRollers/sub_080ABAE0.inc diff --git a/asm/non_matching/projectile18/sub_080AACE0.inc b/asm/non_matching/v1DarkMagicProjectile/sub_080AACE0.inc similarity index 100% rename from asm/non_matching/projectile18/sub_080AACE0.inc rename to asm/non_matching/v1DarkMagicProjectile/sub_080AACE0.inc diff --git a/asm/non_matching/projectile1C/sub_080AB758.inc b/asm/non_matching/v1EyeLaser/sub_080AB758.inc similarity index 100% rename from asm/non_matching/projectile1C/sub_080AB758.inc rename to asm/non_matching/v1EyeLaser/sub_080AB758.inc diff --git a/asm/non_matching/projectile1F/sub_080ABBA8.inc b/asm/non_matching/v2Projectile/sub_080ABBA8.inc similarity index 100% rename from asm/non_matching/projectile1F/sub_080ABBA8.inc rename to asm/non_matching/v2Projectile/sub_080ABBA8.inc diff --git a/asm/non_matching/projectile1F/sub_080ABBF4.inc b/asm/non_matching/v2Projectile/sub_080ABBF4.inc similarity index 100% rename from asm/non_matching/projectile1F/sub_080ABBF4.inc rename to asm/non_matching/v2Projectile/sub_080ABBF4.inc diff --git a/asm/non_matching/projectile1F/sub_080ABE04.inc b/asm/non_matching/v2Projectile/sub_080ABE04.inc similarity index 100% rename from asm/non_matching/projectile1F/sub_080ABE04.inc rename to asm/non_matching/v2Projectile/sub_080ABE04.inc diff --git a/asm/non_matching/projectile21/sub_080ABFEC.inc b/asm/non_matching/v3ElectricProjectile/sub_080ABFEC.inc similarity index 100% rename from asm/non_matching/projectile21/sub_080ABFEC.inc rename to asm/non_matching/v3ElectricProjectile/sub_080ABFEC.inc diff --git a/asm/non_matching/projectile21/sub_080AC168.inc b/asm/non_matching/v3ElectricProjectile/sub_080AC168.inc similarity index 100% rename from asm/non_matching/projectile21/sub_080AC168.inc rename to asm/non_matching/v3ElectricProjectile/sub_080AC168.inc diff --git a/asm/non_matching/projectile21/sub_080AC200.inc b/asm/non_matching/v3ElectricProjectile/sub_080AC200.inc similarity index 97% rename from asm/non_matching/projectile21/sub_080AC200.inc rename to asm/non_matching/v3ElectricProjectile/sub_080AC200.inc index 6c1b2b1b..1d117905 100644 --- a/asm/non_matching/projectile21/sub_080AC200.inc +++ b/asm/non_matching/v3ElectricProjectile/sub_080AC200.inc @@ -12,7 +12,7 @@ movs r0, #0x10 strb r0, [r4, #0xe] movs r0, #0x21 - bl sub_080A7EE0 + bl CreateProjectile adds r1, r0, #0 cmp r1, #0 beq _080AC23C diff --git a/asm/non_matching/projectile24/sub_080ACA68.inc b/asm/non_matching/v3TennisBallProjectile/sub_080ACA68.inc similarity index 100% rename from asm/non_matching/projectile24/sub_080ACA68.inc rename to asm/non_matching/v3TennisBallProjectile/sub_080ACA68.inc diff --git a/asm/non_matching/projectile24/sub_080ACB40.inc b/asm/non_matching/v3TennisBallProjectile/sub_080ACB40.inc similarity index 100% rename from asm/non_matching/projectile24/sub_080ACB40.inc rename to asm/non_matching/v3TennisBallProjectile/sub_080ACB40.inc diff --git a/asm/non_matching/projectile1D/sub_080AB950.inc b/asm/non_matching/winder/sub_080AB950.inc similarity index 100% rename from asm/non_matching/projectile1D/sub_080AB950.inc rename to asm/non_matching/winder/sub_080AB950.inc diff --git a/asm/non_matching/projectile1D/sub_080AB9FC.inc b/asm/non_matching/winder/sub_080AB9FC.inc similarity index 100% rename from asm/non_matching/projectile1D/sub_080AB9FC.inc rename to asm/non_matching/winder/sub_080AB9FC.inc diff --git a/asm/object98.s b/asm/object98.s index d72bf8b0..18f11555 100644 --- a/asm/object98.s +++ b/asm/object98.s @@ -50,7 +50,7 @@ _0809E372: movs r6, #0xe _0809E392: movs r0, #0x17 - bl sub_080A7EE0 + bl CreateProjectile strb r6, [r0, #0xe] str r4, [r0, #0x50] adds r6, #0xc diff --git a/asm/objectA0.s b/asm/objectA0.s index fee7ebba..17e17e6d 100644 --- a/asm/objectA0.s +++ b/asm/objectA0.s @@ -92,7 +92,7 @@ sub_0809F1B0: @ 0x0809F1B0 ands r0, r1 strb r0, [r2] movs r0, #0x1b - bl sub_080A7EE0 + bl CreateProjectile adds r5, r0, #0 cmp r5, #0 beq _0809F21E diff --git a/asm/objectA5.s b/asm/objectA5.s index 9e86a2bd..44831ffc 100644 --- a/asm/objectA5.s +++ b/asm/objectA5.s @@ -20,7 +20,7 @@ ObjectA5: @ 0x0809F8A4 movs r5, #0 _0809F8B6: movs r0, #0x1d - bl sub_080A7EE0 + bl CreateProjectile adds r4, r0, #0 cmp r5, #0 bne _0809F8C6 diff --git a/asm/octorokBoss.s b/asm/octorokBoss.s index 88f8bf4a..8c6ff919 100644 --- a/asm/octorokBoss.s +++ b/asm/octorokBoss.s @@ -2505,7 +2505,7 @@ _08035F16: adds r0, r5, #0 movs r1, #0xf movs r2, #3 - bl sub_0804A98C + bl CreateProjectileWithParent _08035F48: ldr r1, _08035F78 @ =gUnk_080CF0C4 ldrb r0, [r5, #0xd] @@ -3096,7 +3096,7 @@ sub_08036390: @ 0x08036390 adds r4, r0, #0 movs r1, #0xf movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent str r0, [r4, #0x54] cmp r0, #0 beq _080363B4 @@ -3526,7 +3526,7 @@ _080366D4: adds r0, r4, #0 movs r1, #0xf movs r2, #2 - bl sub_0804A98C + bl CreateProjectileWithParent str r0, [r4, #0x54] cmp r0, #0 beq _08036706 @@ -3572,7 +3572,7 @@ sub_0803670C: @ 0x0803670C adds r0, r4, #0 movs r1, #0xf movs r2, #3 - bl sub_0804A98C + bl CreateProjectileWithParent _08036746: adds r0, r4, #0 adds r0, #0x76 diff --git a/asm/octorokGolden.s b/asm/octorokGolden.s index 3256ab32..35b51f7e 100644 --- a/asm/octorokGolden.s +++ b/asm/octorokGolden.s @@ -177,7 +177,7 @@ sub_08037D54: @ 0x08037D54 adds r0, r4, #0 movs r1, #1 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r2, r0, #0 cmp r2, #0 beq _08037E0C diff --git a/asm/scissorsBeetle.s b/asm/scissorsBeetle.s index 956643ba..010a9ff0 100644 --- a/asm/scissorsBeetle.s +++ b/asm/scissorsBeetle.s @@ -122,7 +122,7 @@ sub_08038984: @ 0x08038984 push {r4, r5, r6, lr} adds r5, r0, #0 movs r0, #0x13 - bl sub_080A7EE0 + bl CreateProjectile adds r6, r0, #0 cmp r6, #0 beq _080389E6 diff --git a/asm/stalfos.s b/asm/stalfos.s index 1476b093..fa469360 100644 --- a/asm/stalfos.s +++ b/asm/stalfos.s @@ -142,7 +142,7 @@ _08039390: adds r0, r5, #0 movs r1, #0x10 movs r2, #1 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _080393DC @@ -258,7 +258,7 @@ sub_08039470: @ 0x08039470 bne _08039494 movs r1, #0x10 movs r2, #1 - bl sub_0804A98C + bl CreateProjectileWithParent adds r2, r0, #0 cmp r2, #0 beq _0803949C @@ -1007,7 +1007,7 @@ sub_08039A20: @ 0x08039A20 adds r4, r0, #0 movs r1, #2 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _08039A44 @@ -1107,7 +1107,7 @@ sub_08039AD4: @ 0x08039AD4 ldrb r2, [r4, #0xb] adds r0, r4, #0 movs r1, #0x10 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _08039B20 diff --git a/asm/vaatiArm.s b/asm/vaatiArm.s index 6315de9b..b0c96eef 100644 --- a/asm/vaatiArm.s +++ b/asm/vaatiArm.s @@ -1455,7 +1455,7 @@ sub_08042FD8: @ 0x08042FD8 cmp r0, #0 beq _08043018 movs r0, #0x20 - bl sub_080A7EE0 + bl CreateProjectile adds r4, r0, #0 cmp r4, #0 beq _08043046 diff --git a/asm/vaatiRebornEnemy.s b/asm/vaatiRebornEnemy.s index 1a1a6103..c6334c91 100644 --- a/asm/vaatiRebornEnemy.s +++ b/asm/vaatiRebornEnemy.s @@ -812,7 +812,7 @@ _0803D6C8: ldrb r2, [r5] adds r0, r4, #0 movs r1, #0x1a - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _0803D6EE @@ -1041,7 +1041,7 @@ _0803D870: adds r0, r5, #0 movs r1, #0x18 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r4, r0, #0 cmp r4, #0 beq _0803D8EE diff --git a/asm/vaatiTransfigured.s b/asm/vaatiTransfigured.s index f3aac9f0..410f8a50 100644 --- a/asm/vaatiTransfigured.s +++ b/asm/vaatiTransfigured.s @@ -906,7 +906,7 @@ _0803FE34: ldrb r2, [r4, #0xf] adds r0, r4, #0 movs r1, #0x1f - bl sub_0804A98C + bl CreateProjectileWithParent _0803FE46: ldrb r0, [r4, #0xf] cmp r0, #0 @@ -1015,7 +1015,7 @@ _0803FEFC: ldrb r2, [r4, #0xf] adds r0, r4, #0 movs r1, #0x1f - bl sub_0804A98C + bl CreateProjectileWithParent _0803FF14: ldrb r0, [r4, #0xe] cmp r0, #5 @@ -1033,7 +1033,7 @@ _0803FF24: adds r0, r4, #0 movs r1, #0x1f movs r2, #2 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _0803FF74 @@ -1137,7 +1137,7 @@ _0803FFE4: ldrb r2, [r4, #0xf] adds r0, r4, #0 movs r1, #0x1f - bl sub_0804A98C + bl CreateProjectileWithParent _0803FFFC: ldrb r0, [r4, #0xe] cmp r0, #5 @@ -1155,7 +1155,7 @@ _0804000C: adds r0, r4, #0 movs r1, #0x1f movs r2, #2 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _08040062 diff --git a/asm/vaatiWrath.s b/asm/vaatiWrath.s index 6ef91bf2..7f43606b 100644 --- a/asm/vaatiWrath.s +++ b/asm/vaatiWrath.s @@ -2176,7 +2176,7 @@ sub_080422C0: @ 0x080422C0 cmp r0, r4 bne _08042306 movs r0, #0x21 - bl sub_080A7EE0 + bl CreateProjectile cmp r0, #0 beq _08042354 mov r1, r8 diff --git a/asm/wizzrobeFire.s b/asm/wizzrobeFire.s index 43f398ff..17a05df2 100644 --- a/asm/wizzrobeFire.s +++ b/asm/wizzrobeFire.s @@ -98,7 +98,7 @@ sub_0802FBB8: @ 0x0802FBB8 adds r0, r4, #0 movs r1, #8 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _0802FBF6 @@ -248,7 +248,7 @@ _0802FCDE: adds r0, r4, #0 movs r1, #8 movs r2, #1 - bl sub_0804A98C + bl CreateProjectileWithParent adds r2, r0, #0 cmp r2, #0 beq _0802FDCA diff --git a/asm/wizzrobeIce.s b/asm/wizzrobeIce.s index f74293ee..8e5c95ee 100644 --- a/asm/wizzrobeIce.s +++ b/asm/wizzrobeIce.s @@ -125,7 +125,7 @@ sub_0802FE90: @ 0x0802FE90 adds r0, r4, #0 movs r1, #9 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _0802FECE @@ -275,7 +275,7 @@ _0802FFB6: adds r0, r4, #0 movs r1, #9 movs r2, #1 - bl sub_0804A98C + bl CreateProjectileWithParent adds r2, r0, #0 cmp r2, #0 beq _080300A2 diff --git a/asm/wizzrobeWind.s b/asm/wizzrobeWind.s index b411d030..0e24ccf7 100644 --- a/asm/wizzrobeWind.s +++ b/asm/wizzrobeWind.s @@ -151,7 +151,7 @@ _0802F5B8: adds r0, r4, #0 movs r1, #7 movs r2, #0 - bl sub_0804A98C + bl CreateProjectileWithParent adds r1, r0, #0 cmp r1, #0 beq _0802F5D0 @@ -300,7 +300,7 @@ _0802F6B6: adds r0, r4, #0 movs r1, #7 movs r2, #1 - bl sub_0804A98C + bl CreateProjectileWithParent adds r2, r0, #0 cmp r2, #0 beq _0802F7A2 @@ -493,7 +493,7 @@ _0802F84C: adds r0, r4, #0 movs r1, #7 movs r2, #1 - bl sub_0804A98C + bl CreateProjectileWithParent adds r5, r0, #0 cmp r5, #0 beq _0802F884 diff --git a/assets.yaml b/assets.yaml index 65e6c57e..e070bd10 100644 --- a/assets.yaml +++ b/assets.yaml @@ -45116,696 +45116,6 @@ - path: playerItemSword/gUnk_081292E2.bin start: 0x1292e2 size: 0x3e -- path: projectile0/gUnk_081293B8.bin - start: 0x1293b8 - size: 0x14 -- path: projectile0/gUnk_08129430.bin - start: 0x129430 - size: 0x8 -- path: projectile0/gUnk_08129438.bin - start: 0x129438 - size: 0x8 -- path: projectile0/gUnk_08129440.bin - start: 0x129440 - size: 0x8 -- path: projectile0/gUnk_08129448.bin - start: 0x129448 - size: 0x8 -- path: projectile0/gUnk_08129450.bin - start: 0x129450 - size: 0x8 -- path: projectile0/gUnk_08129458.bin - start: 0x129458 - size: 0x8 -- path: projectile0/gUnk_08129478.bin - start: 0x129478 - size: 0x8 -- path: projectile0/gUnk_08129480.bin - start: 0x129480 - size: 0x8 -- path: projectile0/gUnk_08129488.bin - start: 0x129488 - size: 0x8 -- path: projectile0/gUnk_08129490.bin - start: 0x129490 - size: 0x8 -- path: projectile0/gUnk_08129498.bin - start: 0x129498 - size: 0x8 -- path: projectile0/gUnk_081294A0.bin - start: 0x1294a0 - size: 0x8 -- path: projectile0/gUnk_081294C0.bin - start: 0x1294c0 - size: 0x8 -- path: projectile0/gUnk_081294C8.bin - start: 0x1294c8 - size: 0x8 -- path: projectile0/gUnk_081294D0.bin - start: 0x1294d0 - size: 0x8 -- path: projectile0/gUnk_081294D8.bin - start: 0x1294d8 - size: 0x8 -- path: projectile0/gUnk_081294E0.bin - start: 0x1294e0 - size: 0x8 -- path: projectile0/gUnk_081294E8.bin - start: 0x1294e8 - size: 0x8 -- path: projectile0/gUnk_08129508.bin - start: 0x129508 - size: 0x8 -- path: projectile0/gUnk_08129510.bin - start: 0x129510 - size: 0x8 -- path: projectile0/gUnk_08129518.bin - start: 0x129518 - size: 0x8 -- path: projectile0/gUnk_08129520.bin - start: 0x129520 - size: 0x8 -- path: projectile0/gUnk_08129528.bin - start: 0x129528 - size: 0x8 -- path: projectile0/gUnk_08129530.bin - start: 0x129530 - size: 0x8 -- path: projectile0/gUnk_08129550.bin - start: 0x129550 - size: 0x8 -- path: projectile0/gUnk_08129558.bin - start: 0x129558 - size: 0x8 -- path: projectile0/gUnk_08129560.bin - start: 0x129560 - size: 0x8 -- path: projectile0/gUnk_08129568.bin - start: 0x129568 - size: 0x8 -- path: projectile0/gUnk_08129570.bin - start: 0x129570 - size: 0x8 -- path: projectile0/gUnk_08129578.bin - start: 0x129578 - size: 0x8 -- path: projectile0/gUnk_08129580.bin - start: 0x129580 - size: 0x8 -- path: projectile0/gUnk_08129588.bin - start: 0x129588 - size: 0x8 -- path: projectile0/gUnk_08129590.bin - start: 0x129590 - size: 0x8 -- path: projectile0/gUnk_08129598.bin - start: 0x129598 - size: 0x8 -- path: projectile0/gUnk_081295A0.bin - start: 0x1295a0 - size: 0x8 -- path: projectile0/gUnk_081295A8.bin - start: 0x1295a8 - size: 0x8 -- path: projectile0/gUnk_081295B0.bin - start: 0x1295b0 - size: 0x8 -- path: projectile0/gUnk_081295B8.bin - start: 0x1295b8 - size: 0x8 -- path: projectile0/gUnk_081295C0.bin - start: 0x1295c0 - size: 0x8 -- path: projectile0/gUnk_081295C8.bin - start: 0x1295c8 - size: 0x8 -- path: projectile1/gUnk_081295F4.bin - start: 0x1295f4 - size: 0x10 -- path: projectile2/gUnk_08129634.bin - start: 0x129634 - size: 0x14 -- path: projectile3/gUnk_0812966C.bin - start: 0x12966c - size: 0x84 -- path: projectile5/gUnk_08129734.bin - start: 0x129734 - size: 0xc -- path: projectile6/gUnk_08129770.bin - start: 0x129770 - size: 0x5 -- path: projectile6/gUnk_08129775.bin - start: 0x129775 - size: 0x1b -- path: projectile6/gUnk_08129764.bin - start: 0x129764 - size: 0xc -- path: projectile7/gUnk_081297AC.bin - start: 0x1297ac - size: 0x9 -- path: projectile7/gUnk_081297B5.bin - start: 0x1297b5 - size: 0x9 -- path: projectile7/gUnk_081297BE.bin - start: 0x1297be - size: 0x9 -- path: projectile7/gUnk_081297C7.bin - start: 0x1297c7 - size: 0x9 -- path: projectile7/gUnk_081297D0.bin - start: 0x1297d0 - size: 0x5 -- path: projectile7/gUnk_081297D5.bin - start: 0x1297d5 - size: 0x5 -- path: projectile7/gUnk_081297DA.bin - start: 0x1297da - size: 0x5 -- path: projectile7/gUnk_081297DF.bin - start: 0x1297df - size: 0x5 -- path: projectile7/gUnk_081297E4.bin - start: 0x1297e4 - size: 0x5 -- path: projectile7/gUnk_081297E9.bin - start: 0x1297e9 - size: 0x5 -- path: projectile7/gUnk_081297EE.bin - start: 0x1297ee - size: 0x5 -- path: projectile7/gUnk_081297F3.bin - start: 0x1297f3 - size: 0x5 -- path: projectile8/gUnk_0812983C.bin - start: 0x12983c - size: 0x9 -- path: projectile8/gUnk_08129845.bin - start: 0x129845 - size: 0x9 -- path: projectile8/gUnk_0812984E.bin - start: 0x12984e - size: 0x9 -- path: projectile8/gUnk_08129857.bin - start: 0x129857 - size: 0x9 -- path: projectile8/gUnk_08129860.bin - start: 0x129860 - size: 0xd -- path: projectile8/gUnk_0812986D.bin - start: 0x12986d - size: 0xd -- path: projectile8/gUnk_0812987A.bin - start: 0x12987a - size: 0xd -- path: projectile8/gUnk_08129887.bin - start: 0x129887 - size: 0xd -- path: projectile9/gUnk_081298C8.bin - start: 0x1298c8 - size: 0x9 -- path: projectile9/gUnk_081298D1.bin - start: 0x1298d1 - size: 0x9 -- path: projectile9/gUnk_081298DA.bin - start: 0x1298da - size: 0x9 -- path: projectile9/gUnk_081298E3.bin - start: 0x1298e3 - size: 0x9 -- path: projectile9/gUnk_081298EC.bin - start: 0x1298ec - size: 0x11 -- path: projectile9/gUnk_081298FD.bin - start: 0x1298fd - size: 0x11 -- path: projectile9/gUnk_0812990E.bin - start: 0x12990e - size: 0x11 -- path: projectile9/gUnk_0812991F.bin - start: 0x12991f - size: 0x11 -- path: projectileA/gUnk_08129978.bin - start: 0x129978 - size: 0x8 -- path: projectileA/gUnk_08129980.bin - start: 0x129980 - size: 0x8 -- path: projectileA/gUnk_08129988.bin - start: 0x129988 - size: 0x10 -- path: projectileB/gUnk_081299A8.bin - start: 0x1299a8 - size: 0x8 -- path: projectileB/gUnk_081299B0.bin - start: 0x1299b0 - size: 0x8 -- path: projectileB/gUnk_081299B8.bin - start: 0x1299b8 - size: 0x8 -- path: projectileB/gUnk_081299C0.bin - start: 0x1299c0 - size: 0x8 -- path: projectileC/gUnk_081299C8.bin - start: 0x1299c8 - size: 0x8 -- path: projectileD/gUnk_08129A28.bin - start: 0x129a28 - size: 0x5 -- path: projectileD/gUnk_08129A2D.bin - start: 0x129a2d - size: 0x5 -- path: projectileD/gUnk_08129A32.bin - start: 0x129a32 - size: 0x11 -- path: projectileD/gUnk_08129A43.bin - start: 0x129a43 - size: 0x11 -- path: projectileD/gUnk_081299F8.bin - start: 0x1299f8 - size: 0x4 -- path: projectileD/gUnk_081299F8_1.bin - start: 0x129a00 - size: 0x4 -- path: projectileD/gUnk_081299F8_2.bin - start: 0x129a08 - size: 0x4 -- path: projectileD/gUnk_081299F8_3.bin - start: 0x129a10 - size: 0x4 -- path: projectileD/gUnk_08129A18.bin - start: 0x129a18 - size: 0x8 -- path: projectileD/gUnk_08129A20.bin - start: 0x129a20 - size: 0x8 -- path: projectileE/gUnk_08129A70.bin - start: 0x129a70 - size: 0x19 -- path: projectileE/gUnk_08129A89.bin - start: 0x129a89 - size: 0x27 -- path: projectileF/gUnk_08129ADC.bin - start: 0x129adc - size: 0x4 -- path: projectile10/gUnk_08129B20.bin - start: 0x129b20 - size: 0x30 -- path: projectile10/gUnk_08129B50.bin - start: 0x129b50 - size: 0x8 -- path: projectile11/gUnk_08129B84.bin - start: 0x129b84 - size: 0x11 -- path: projectile11/gUnk_08129B95.bin - start: 0x129b95 - size: 0x11 -- path: projectile11/gUnk_08129BA6.bin - start: 0x129ba6 - size: 0x11 -- path: projectile11/gUnk_08129BB7.bin - start: 0x129bb7 - size: 0x11 -- path: projectile12/gUnk_08129C08.bin - start: 0x129c08 - size: 0x6c -- path: projectile13/gUnk_08129D1C.bin - start: 0x129d1c - size: 0x5 -- path: projectile13/gUnk_08129D21.bin - start: 0x129d21 - size: 0x5 -- path: projectile13/gUnk_08129D26.bin - start: 0x129d26 - size: 0x5 -- path: projectile13/gUnk_08129D2B.bin - start: 0x129d2b - size: 0x5 -- path: projectile13/gUnk_08129D30.bin - start: 0x129d30 - size: 0x5 -- path: projectile13/gUnk_08129D35.bin - start: 0x129d35 - size: 0x5 -- path: projectile13/gUnk_08129D3A.bin - start: 0x129d3a - size: 0x5 -- path: projectile13/gUnk_08129D3F.bin - start: 0x129d3f - size: 0x5 -- path: projectile13/gUnk_08129D44.bin - start: 0x129d44 - size: 0x11 -- path: projectile13/gUnk_08129D55.bin - start: 0x129d55 - size: 0x11 -- path: projectile13/gUnk_08129D66.bin - start: 0x129d66 - size: 0x11 -- path: projectile13/gUnk_08129D77.bin - start: 0x129d77 - size: 0x11 -- path: projectile13/gUnk_08129D88.bin - start: 0x129d88 - size: 0x11 -- path: projectile13/gUnk_08129D99.bin - start: 0x129d99 - size: 0x11 -- path: projectile13/gUnk_08129DAA.bin - start: 0x129daa - size: 0x11 -- path: projectile13/gUnk_08129DBB.bin - start: 0x129dbb - size: 0x11 -- path: projectile13/gUnk_08129DCC.bin - start: 0x129dcc - size: 0xc -- path: projectile13/gUnk_08129DD8.bin - start: 0x129dd8 - size: 0xc -- path: projectile13/gUnk_08129DE4.bin - start: 0x129de4 - size: 0xc -- path: projectile13/gUnk_08129DF0.bin - start: 0x129df0 - size: 0xc -- path: projectile13/gUnk_08129DFC.bin - start: 0x129dfc - size: 0xc -- path: projectile13/gUnk_08129E08.bin - start: 0x129e08 - size: 0xc -- path: projectile13/gUnk_08129E14.bin - start: 0x129e14 - size: 0xc -- path: projectile13/gUnk_08129E20.bin - start: 0x129e20 - size: 0xc -- path: projectile13/gUnk_08129E2C.bin - start: 0x129e2c - size: 0x21 -- path: projectile13/gUnk_08129E4D.bin - start: 0x129e4d - size: 0x21 -- path: projectile13/gUnk_08129E6E.bin - start: 0x129e6e - size: 0x21 -- path: projectile13/gUnk_08129E8F.bin - start: 0x129e8f - size: 0x21 -- path: projectile13/gUnk_08129EB0.bin - start: 0x129eb0 - size: 0x21 -- path: projectile13/gUnk_08129ED1.bin - start: 0x129ed1 - size: 0x21 -- path: projectile13/gUnk_08129EF2.bin - start: 0x129ef2 - size: 0x21 -- path: projectile13/gUnk_08129F13.bin - start: 0x129f13 - size: 0x21 -- path: projectile13/gUnk_08129CA4.bin - start: 0x129ca4 - size: 0x8 -- path: projectile13/gUnk_08129CAC.bin - start: 0x129cac - size: 0x8 -- path: projectile13/gUnk_08129CB4.bin - start: 0x129cb4 - size: 0x8 -- path: projectile13/gUnk_08129CBC.bin - start: 0x129cbc - size: 0x8 -- path: projectile13/gUnk_08129CC4.bin - start: 0x129cc4 - size: 0x8 -- path: projectile13/gUnk_08129CCC.bin - start: 0x129ccc - size: 0x8 -- path: projectile13/gUnk_08129CD4.bin - start: 0x129cd4 - size: 0x8 -- path: projectile13/gUnk_08129CDC.bin - start: 0x129cdc - size: 0x8 -- path: projectile13/gUnk_08129CE4.bin - start: 0x129ce4 - size: 0x8 -- path: projectile13/gUnk_08129CEC.bin - start: 0x129cec - size: 0x8 -- path: projectile13/gUnk_08129D14.bin - start: 0x129d14 - size: 0x8 -- path: projectile14/gUnk_08129FD0.bin - start: 0x129fd0 - size: 0x14 -- path: projectile14/gUnk_08129FE4.bin - start: 0x129fe4 - size: 0x14 -- path: projectile14/gUnk_08129FF8.bin - start: 0x129ff8 - size: 0xc -- path: projectile14/gUnk_0812A004.bin - start: 0x12a004 - size: 0x10 -- path: projectile15/gUnk_0812A08C.bin - start: 0x12a08c - size: 0x4 -- path: projectile15/gUnk_0812A090.bin - start: 0x12a090 - size: 0x4 -- path: projectile15/gUnk_0812A094.bin - start: 0x12a094 - size: 0x4 -- path: projectile15/gUnk_0812A098.bin - start: 0x12a098 - size: 0x4 -- path: projectile15/gUnk_0812A09C.bin - start: 0x12a09c - size: 0xc -- path: projectile15/gUnk_0812A0A8.bin - start: 0x12a0a8 - size: 0xc -- path: projectile15/gUnk_0812A0B4.bin - start: 0x12a0b4 - size: 0xc -- path: projectile15/gUnk_0812A0C0.bin - start: 0x12a0c0 - size: 0xc -- path: projectile15/gUnk_0812A0CC.bin - start: 0x12a0cc - size: 0x48 -- path: projectile15/gUnk_0812A114.bin - start: 0x12a114 - size: 0x48 -- path: projectile15/gUnk_0812A15C.bin - start: 0x12a15c - size: 0x48 -- path: projectile15/gUnk_0812A1A4.bin - start: 0x12a1a4 - size: 0x48 -- path: projectile15/gUnk_0812A1EC.bin - start: 0x12a1ec - size: 0x24 -- path: projectile15/gUnk_0812A210.bin - start: 0x12a210 - size: 0x24 -- path: projectile15/gUnk_0812A234.bin - start: 0x12a234 - size: 0x24 -- path: projectile15/gUnk_0812A258.bin - start: 0x12a258 - size: 0x24 -- path: projectile15/gUnk_0812A27C.bin - start: 0x12a27c - size: 0x3c -- path: projectile15/gUnk_0812A2B8.bin - start: 0x12a2b8 - size: 0x3c -- path: projectile15/gUnk_0812A2F4.bin - start: 0x12a2f4 - size: 0x3c -- path: projectile15/gUnk_0812A330.bin - start: 0x12a330 - size: 0x3c -- path: projectile15/gUnk_0812A03C.bin - start: 0x12a03c - size: 0x10 -- path: projectile15/gUnk_0812A064.bin - start: 0x12a064 - size: 0x8 -- path: projectile15/gUnk_0812A06C.bin - start: 0x12a06c - size: 0x8 -- path: projectile15/gUnk_0812A074.bin - start: 0x12a074 - size: 0x10 -- path: projectile15/gUnk_0812A084.bin - start: 0x12a084 - size: 0x8 -- path: projectile16/gUnk_0812A3FC.bin - start: 0x12a3fc - size: 0x14 -- path: projectile16/gUnk_0812A3E0.bin - start: 0x12a3e0 - size: 0x14 -- path: projectile16/gUnk_0812A3F4.bin - start: 0x12a3f8 - size: 0x4 -- path: projectile18/gUnk_0812A44C.bin - start: 0x12a44c - size: 0x21 -- path: projectile18/gUnk_0812A46D.bin - start: 0x12a46d - size: 0x1b -- path: projectile19/gUnk_0812A4A8.bin - start: 0x12a4a8 - size: 0x20 -- path: projectile1A/gUnk_0812A4EC.bin - start: 0x12a4ec - size: 0xa0 -- path: projectile1B/gUnk_0812A5AC.bin - start: 0x12a5ac - size: 0xd -- path: projectile1B/gUnk_0812A5B9.bin - start: 0x12a5b9 - size: 0xd -- path: projectile1B/gUnk_0812A5C6.bin - start: 0x12a5c6 - size: 0xe -- path: projectile1C/gUnk_0812A63C.bin - start: 0x12a63c - size: 0x20 -- path: projectile1C/gUnk_0812A65C.bin - start: 0x12a65c - size: 0x9 -- path: projectile1C/gUnk_0812A665.bin - start: 0x12a665 - size: 0x9 -- path: projectile1C/gUnk_0812A66E.bin - start: 0x12a66e - size: 0x9 -- path: projectile1C/gUnk_0812A677.bin - start: 0x12a677 - size: 0x9 -- path: projectile1C/gUnk_0812A680.bin - start: 0x12a680 - size: 0x9 -- path: projectile1C/gUnk_0812A689.bin - start: 0x12a689 - size: 0xb -- path: projectile1C/gUnk_0812A614.bin - start: 0x12a614 - size: 0x8 -- path: projectile1C/gUnk_0812A61C.bin - start: 0x12a61c - size: 0x8 -- path: projectile1C/gUnk_0812A624.bin - start: 0x12a624 - size: 0x8 -- path: projectile1C/gUnk_0812A62C.bin - start: 0x12a62c - size: 0x8 -- path: projectile1C/gUnk_0812A634.bin - start: 0x12a634 - size: 0x8 -- path: projectile1D/gUnk_0812A6BC.bin - start: 0x12a6bc - size: 0x8 -- path: projectile1D/gUnk_0812A6C4.bin - start: 0x12a6c4 - size: 0x8 -- path: projectile1E/gUnk_0812A6E2.bin - start: 0x12a6e2 - size: 0xd -- path: projectile1E/gUnk_0812A6EF.bin - start: 0x12a6ef - size: 0xd -- path: projectile1E/gUnk_0812A6FC.bin - start: 0x12a6fc - size: 0xd -- path: projectile1E/gUnk_0812A709.bin - start: 0x12a709 - size: 0xd -- path: projectile1E/gUnk_0812A716.bin - start: 0x12a716 - size: 0xd -- path: projectile1E/gUnk_0812A723.bin - start: 0x12a723 - size: 0xd -- path: projectile1E/gUnk_0812A730.bin - start: 0x12a730 - size: 0xd -- path: projectile1E/gUnk_0812A73D.bin - start: 0x12a73d - size: 0xd -- path: projectile1E/gUnk_0812A74A.bin - start: 0x12a74a - size: 0xd -- path: projectile1E/gUnk_0812A757.bin - start: 0x12a757 - size: 0xd -- path: projectile1E/gUnk_0812A764.bin - start: 0x12a764 - size: 0xd -- path: projectile1E/gUnk_0812A771.bin - start: 0x12a771 - size: 0xd -- path: projectile1E/gUnk_0812A77E.bin - start: 0x12a77e - size: 0xd -- path: projectile1E/gUnk_0812A78B.bin - start: 0x12a78b - size: 0xd -- path: projectile1E/gUnk_0812A6D4.bin - start: 0x12a6d4 - size: 0xe -- path: projectile1F/gUnk_0812A814.bin - start: 0x12a814 - size: 0x11 -- path: projectile1F/gUnk_0812A825.bin - start: 0x12a825 - size: 0x1b -- path: projectile20/gUnk_0812A860.bin - start: 0x12a860 - size: 0x11 -- path: projectile20/gUnk_0812A871.bin - start: 0x12a871 - size: 0x59 -- path: projectile20/gUnk_0812A8CA.bin - start: 0x12a8ca - size: 0x61 -- path: projectile20/gUnk_0812A92B.bin - start: 0x12a92b - size: 0x15 -- path: projectile21/gUnk_0812A97C.bin - start: 0x12a97c - size: 0x6 -- path: projectile21/gUnk_0812A982.bin - start: 0x12a982 - size: 0x8 -- path: projectile21/gUnk_0812A98A.bin - start: 0x12a98a - size: 0xa -- path: projectile22/gUnk_0812A9B4.bin - start: 0x12a9b4 - size: 0x4 -- path: projectile22/gUnk_0812A9B8.bin - start: 0x12a9b8 - size: 0x2 -- path: projectile22/gUnk_0812A9BA.bin - start: 0x12a9ba - size: 0x6 -- path: projectile22/gUnk_0812A9C0.bin - start: 0x12a9c0 - size: 0x18 -- path: projectile23/gUnk_0812A9FC.bin - start: 0x12a9fc - size: 0x35 -- path: projectile23/gUnk_0812AA31.bin - start: 0x12aa31 - size: 0x1f - path: data_0812AA88/gUnk_0812AA88.bin start: 0x12aa88 size: 0x9 diff --git a/data/animations/projectile/projectileD.s b/data/animations/projectile/arrowProjectile.s similarity index 100% rename from data/animations/projectile/projectileD.s rename to data/animations/projectile/arrowProjectile.s diff --git a/data/animations/projectile/projectile2.s b/data/animations/projectile/boneProjectile.s similarity index 100% rename from data/animations/projectile/projectile2.s rename to data/animations/projectile/boneProjectile.s diff --git a/data/animations/projectile/projectile1B.s b/data/animations/projectile/cannonballProjectile.s similarity index 100% rename from data/animations/projectile/projectile1B.s rename to data/animations/projectile/cannonballProjectile.s diff --git a/data/animations/projectile/projectile6.s b/data/animations/projectile/dirtBallProjectile.s similarity index 100% rename from data/animations/projectile/projectile6.s rename to data/animations/projectile/dirtBallProjectile.s diff --git a/data/animations/projectile/projectile8.s b/data/animations/projectile/fireProjectile.s similarity index 100% rename from data/animations/projectile/projectile8.s rename to data/animations/projectile/fireProjectile.s diff --git a/data/animations/projectile/projectile23.s b/data/animations/projectile/gyorgMaleEnergyProjectile.s similarity index 100% rename from data/animations/projectile/projectile23.s rename to data/animations/projectile/gyorgMaleEnergyProjectile.s diff --git a/data/animations/projectile/projectile9.s b/data/animations/projectile/iceProjectile.s similarity index 100% rename from data/animations/projectile/projectile9.s rename to data/animations/projectile/iceProjectile.s diff --git a/data/animations/projectile/projectile11.s b/data/animations/projectile/lakituCloudProjectile.s similarity index 100% rename from data/animations/projectile/projectile11.s rename to data/animations/projectile/lakituCloudProjectile.s diff --git a/data/animations/projectile/projectile12.s b/data/animations/projectile/lakituLightning.s similarity index 100% rename from data/animations/projectile/projectile12.s rename to data/animations/projectile/lakituLightning.s diff --git a/data/animations/projectile/projectile13.s b/data/animations/projectile/mandiblesProjectile.s similarity index 100% rename from data/animations/projectile/projectile13.s rename to data/animations/projectile/mandiblesProjectile.s diff --git a/data/animations/projectile/projectileE.s b/data/animations/projectile/mazaalEnergyBeam.s similarity index 100% rename from data/animations/projectile/projectileE.s rename to data/animations/projectile/mazaalEnergyBeam.s diff --git a/data/animations/projectile/projectile1.s b/data/animations/projectile/rockProjectile.s similarity index 100% rename from data/animations/projectile/projectile1.s rename to data/animations/projectile/rockProjectile.s diff --git a/data/animations/projectile/projectile15.s b/data/animations/projectile/spiderWeb.s similarity index 100% rename from data/animations/projectile/projectile15.s rename to data/animations/projectile/spiderWeb.s diff --git a/data/animations/projectile/projectile1E.s b/data/animations/projectile/spikedRollers.s similarity index 100% rename from data/animations/projectile/projectile1E.s rename to data/animations/projectile/spikedRollers.s diff --git a/data/animations/projectile/projectile16.s b/data/animations/projectile/torchTrapProjectile.s similarity index 62% rename from data/animations/projectile/projectile16.s rename to data/animations/projectile/torchTrapProjectile.s index 2c37cc3b..d2b9d5cf 100644 --- a/data/animations/projectile/projectile16.s +++ b/data/animations/projectile/torchTrapProjectile.s @@ -4,6 +4,13 @@ .section .rodata .align 2 +gUnk_0812A3E0:: @ 0812A3E0 + .incbin "baserom.gba", 0x12A3E0, 0x0000014 + +gUnk_0812A3F4:: @ 0812A3F4 + .4byte gUnk_0812A3E0 + .4byte 00000000 + gUnk_0812A3FC:: @ 0812A3FC .incbin "projectile16/gUnk_0812A3FC.bin" diff --git a/data/animations/projectile/projectile18.s b/data/animations/projectile/v1DarkMagicProjectile.s similarity index 100% rename from data/animations/projectile/projectile18.s rename to data/animations/projectile/v1DarkMagicProjectile.s diff --git a/data/animations/projectile/projectile1C.s b/data/animations/projectile/v1EyeLaser.s similarity index 100% rename from data/animations/projectile/projectile1C.s rename to data/animations/projectile/v1EyeLaser.s diff --git a/data/animations/projectile/projectile1F.s b/data/animations/projectile/v2Projectile.s similarity index 100% rename from data/animations/projectile/projectile1F.s rename to data/animations/projectile/v2Projectile.s diff --git a/data/animations/projectile/projectile20.s b/data/animations/projectile/v3HandProjectile.s similarity index 100% rename from data/animations/projectile/projectile20.s rename to data/animations/projectile/v3HandProjectile.s diff --git a/data/animations/projectile/projectile7.s b/data/animations/projectile/windProjectile.s similarity index 100% rename from data/animations/projectile/projectile7.s rename to data/animations/projectile/windProjectile.s diff --git a/data/const/projectile/projectile0.s b/data/const/projectile/projectile0.s deleted file mode 100644 index 26edac48..00000000 --- a/data/const/projectile/projectile0.s +++ /dev/null @@ -1,197 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_081293B8:: @ 081293B8 - .incbin "projectile0/gUnk_081293B8.bin" - -gUnk_081293CC:: @ 081293CC - .4byte sub_080A7FB4 - .4byte sub_080A801C - .4byte sub_080A7FD8 - .4byte sub_080A7FEC - .4byte sub_080A7FEC - -gUnk_081293E0:: @ 081293E0 - .4byte gUnk_08129460 - .4byte gUnk_081294A8 - .4byte gUnk_081294F0 - .4byte gUnk_08129538 - -gUnk_081293F0:: @ 081293F0 - .4byte gUnk_08129550 - .4byte gUnk_08129558 - .4byte gUnk_08129560 - .4byte gUnk_08129568 - -gUnk_08129400:: @ 08129400 - .4byte gUnk_08129590 - .4byte gUnk_081295A0 - .4byte gUnk_081295B0 - .4byte gUnk_081295C0 - -gUnk_08129410:: @ 08129410 - .4byte gUnk_08129598 - .4byte gUnk_081295A8 - .4byte gUnk_081295B8 - .4byte gUnk_081295C8 - -gUnk_08129420:: @ 08129420 - .4byte gUnk_08129570 - .4byte gUnk_08129578 - .4byte gUnk_08129580 - .4byte gUnk_08129588 - -gUnk_08129430:: @ 08129430 - .incbin "projectile0/gUnk_08129430.bin" - -gUnk_08129438:: @ 08129438 - .incbin "projectile0/gUnk_08129438.bin" - -gUnk_08129440:: @ 08129440 - .incbin "projectile0/gUnk_08129440.bin" - -gUnk_08129448:: @ 08129448 - .incbin "projectile0/gUnk_08129448.bin" - -gUnk_08129450:: @ 08129450 - .incbin "projectile0/gUnk_08129450.bin" - -gUnk_08129458:: @ 08129458 - .incbin "projectile0/gUnk_08129458.bin" - -gUnk_08129460:: @ 08129460 - .4byte gUnk_08129430 - .4byte gUnk_08129438 - .4byte gUnk_08129440 - .4byte gUnk_08129448 - .4byte gUnk_08129450 - .4byte gUnk_08129458 - -gUnk_08129478:: @ 08129478 - .incbin "projectile0/gUnk_08129478.bin" - -gUnk_08129480:: @ 08129480 - .incbin "projectile0/gUnk_08129480.bin" - -gUnk_08129488:: @ 08129488 - .incbin "projectile0/gUnk_08129488.bin" - -gUnk_08129490:: @ 08129490 - .incbin "projectile0/gUnk_08129490.bin" - -gUnk_08129498:: @ 08129498 - .incbin "projectile0/gUnk_08129498.bin" - -gUnk_081294A0:: @ 081294A0 - .incbin "projectile0/gUnk_081294A0.bin" - -gUnk_081294A8:: @ 081294A8 - .4byte gUnk_08129478 - .4byte gUnk_08129480 - .4byte gUnk_08129488 - .4byte gUnk_08129490 - .4byte gUnk_08129498 - .4byte gUnk_081294A0 - -gUnk_081294C0:: @ 081294C0 - .incbin "projectile0/gUnk_081294C0.bin" - -gUnk_081294C8:: @ 081294C8 - .incbin "projectile0/gUnk_081294C8.bin" - -gUnk_081294D0:: @ 081294D0 - .incbin "projectile0/gUnk_081294D0.bin" - -gUnk_081294D8:: @ 081294D8 - .incbin "projectile0/gUnk_081294D8.bin" - -gUnk_081294E0:: @ 081294E0 - .incbin "projectile0/gUnk_081294E0.bin" - -gUnk_081294E8:: @ 081294E8 - .incbin "projectile0/gUnk_081294E8.bin" - -gUnk_081294F0:: @ 081294F0 - .4byte gUnk_081294C0 - .4byte gUnk_081294C8 - .4byte gUnk_081294D0 - .4byte gUnk_081294D8 - .4byte gUnk_081294E0 - .4byte gUnk_081294E8 - -gUnk_08129508:: @ 08129508 - .incbin "projectile0/gUnk_08129508.bin" - -gUnk_08129510:: @ 08129510 - .incbin "projectile0/gUnk_08129510.bin" - -gUnk_08129518:: @ 08129518 - .incbin "projectile0/gUnk_08129518.bin" - -gUnk_08129520:: @ 08129520 - .incbin "projectile0/gUnk_08129520.bin" - -gUnk_08129528:: @ 08129528 - .incbin "projectile0/gUnk_08129528.bin" - -gUnk_08129530:: @ 08129530 - .incbin "projectile0/gUnk_08129530.bin" - -gUnk_08129538:: @ 08129538 - .4byte gUnk_08129508 - .4byte gUnk_08129510 - .4byte gUnk_08129518 - .4byte gUnk_08129520 - .4byte gUnk_08129528 - .4byte gUnk_08129530 - -gUnk_08129550:: @ 08129550 - .incbin "projectile0/gUnk_08129550.bin" - -gUnk_08129558:: @ 08129558 - .incbin "projectile0/gUnk_08129558.bin" - -gUnk_08129560:: @ 08129560 - .incbin "projectile0/gUnk_08129560.bin" - -gUnk_08129568:: @ 08129568 - .incbin "projectile0/gUnk_08129568.bin" - -gUnk_08129570:: @ 08129570 - .incbin "projectile0/gUnk_08129570.bin" - -gUnk_08129578:: @ 08129578 - .incbin "projectile0/gUnk_08129578.bin" - -gUnk_08129580:: @ 08129580 - .incbin "projectile0/gUnk_08129580.bin" - -gUnk_08129588:: @ 08129588 - .incbin "projectile0/gUnk_08129588.bin" - -gUnk_08129590:: @ 08129590 - .incbin "projectile0/gUnk_08129590.bin" - -gUnk_08129598:: @ 08129598 - .incbin "projectile0/gUnk_08129598.bin" - -gUnk_081295A0:: @ 081295A0 - .incbin "projectile0/gUnk_081295A0.bin" - -gUnk_081295A8:: @ 081295A8 - .incbin "projectile0/gUnk_081295A8.bin" - -gUnk_081295B0:: @ 081295B0 - .incbin "projectile0/gUnk_081295B0.bin" - -gUnk_081295B8:: @ 081295B8 - .incbin "projectile0/gUnk_081295B8.bin" - -gUnk_081295C0:: @ 081295C0 - .incbin "projectile0/gUnk_081295C0.bin" - -gUnk_081295C8:: @ 081295C8 - .incbin "projectile0/gUnk_081295C8.bin" diff --git a/data/const/projectile/projectile1.s b/data/const/projectile/projectile1.s deleted file mode 100644 index e874227b..00000000 --- a/data/const/projectile/projectile1.s +++ /dev/null @@ -1,18 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_081295D0:: @ 081295D0 - .4byte sub_080A804C - .4byte sub_080A8064 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_081295E4:: @ 081295E4 - .4byte sub_080A8088 - .4byte sub_080A80A0 - .4byte sub_080A80F4 - .4byte sub_080A8118 diff --git a/data/const/projectile/projectile10.s b/data/const/projectile/projectile10.s deleted file mode 100644 index 8302312e..00000000 --- a/data/const/projectile/projectile10.s +++ /dev/null @@ -1,33 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129AE0:: @ 08129AE0 - .4byte sub_080A9A1C - .4byte sub_080A9A34 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - .4byte sub_080A9A64 - -gUnk_08129AF8:: @ 08129AF8 - .4byte sub_080A9ACC - .4byte sub_080A9B24 - .4byte sub_080A9B54 - .4byte sub_080A9B80 - -gUnk_08129B08:: @ 08129B08 - .4byte sub_080A9A94 - .4byte sub_080A9AA4 - .4byte sub_080A9AAC - .4byte sub_080A9AB4 - .4byte nullsub_128 - .4byte sub_080A9AC4 - -gUnk_08129B20:: @ 08129B20 - .incbin "projectile10/gUnk_08129B20.bin" - -gUnk_08129B50:: @ 08129B50 - .incbin "projectile10/gUnk_08129B50.bin" diff --git a/data/const/projectile/projectile11.s b/data/const/projectile/projectile11.s deleted file mode 100644 index 7ea1628a..00000000 --- a/data/const/projectile/projectile11.s +++ /dev/null @@ -1,23 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129B58:: @ 08129B58 - .4byte sub_080A9CD4 - .4byte nullsub_539 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - .4byte sub_080A9CF0 - -gUnk_08129B70:: @ 08129B70 - .4byte sub_080A9D6C - .4byte sub_080A9D80 - -gUnk_08129B78:: @ 08129B78 - .4byte sub_080A9D20 - .4byte nullsub_540 - .4byte sub_080A9D2C - diff --git a/data/const/projectile/projectile12.s b/data/const/projectile/projectile12.s deleted file mode 100644 index abf0a5ac..00000000 --- a/data/const/projectile/projectile12.s +++ /dev/null @@ -1,17 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129BEC:: @ 08129BEC - .4byte sub_080A9DC0 - .4byte sub_080A9DD8 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129C00:: @ 08129C00 - .4byte sub_080A9DFC - .4byte sub_080A9E14 - diff --git a/data/const/projectile/projectile13.s b/data/const/projectile/projectile13.s deleted file mode 100644 index 1603dcf2..00000000 --- a/data/const/projectile/projectile13.s +++ /dev/null @@ -1,63 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129C7C:: @ 08129C7C - .4byte sub_080A9E94 - .4byte sub_080A9EBC - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129C90:: @ 08129C90 - .4byte sub_080A9F50 - .4byte sub_080A9F90 - .4byte sub_080A9FD0 - .4byte sub_080AA044 - .4byte sub_080AA110 - -gUnk_08129CA4:: @ 08129CA4 - .incbin "projectile13/gUnk_08129CA4.bin" - -gUnk_08129CAC:: @ 08129CAC - .incbin "projectile13/gUnk_08129CAC.bin" - -gUnk_08129CB4:: @ 08129CB4 - .incbin "projectile13/gUnk_08129CB4.bin" - -gUnk_08129CBC:: @ 08129CBC - .incbin "projectile13/gUnk_08129CBC.bin" - -gUnk_08129CC4:: @ 08129CC4 - .incbin "projectile13/gUnk_08129CC4.bin" - -gUnk_08129CCC:: @ 08129CCC - .incbin "projectile13/gUnk_08129CCC.bin" - -gUnk_08129CD4:: @ 08129CD4 - .incbin "projectile13/gUnk_08129CD4.bin" - -gUnk_08129CDC:: @ 08129CDC - .incbin "projectile13/gUnk_08129CDC.bin" - -gUnk_08129CE4:: @ 08129CE4 - .incbin "projectile13/gUnk_08129CE4.bin" - -gUnk_08129CEC:: @ 08129CEC - .incbin "projectile13/gUnk_08129CEC.bin" - -gUnk_08129CF4:: @ 08129CF4 - .4byte gUnk_08129CB4 - .4byte gUnk_08129CBC - .4byte gUnk_08129CC4 - .4byte gUnk_08129CCC - .4byte gUnk_08129CD4 - .4byte gUnk_08129CDC - .4byte gUnk_08129CE4 - .4byte gUnk_08129CEC - -gUnk_08129D14:: @ 08129D14 - .incbin "projectile13/gUnk_08129D14.bin" - diff --git a/data/const/projectile/projectile14.s b/data/const/projectile/projectile14.s deleted file mode 100644 index 1990352d..00000000 --- a/data/const/projectile/projectile14.s +++ /dev/null @@ -1,25 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129FB8:: @ 08129FB8 - .4byte sub_080AA41C - .4byte sub_080AA450 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - .4byte sub_080AA464 - -gUnk_08129FD0:: @ 08129FD0 - .incbin "projectile14/gUnk_08129FD0.bin" - -gUnk_08129FE4:: @ 08129FE4 - .incbin "projectile14/gUnk_08129FE4.bin" - -gUnk_08129FF8:: @ 08129FF8 - .incbin "projectile14/gUnk_08129FF8.bin" - -gUnk_0812A004:: @ 0812A004 - .incbin "projectile14/gUnk_0812A004.bin" diff --git a/data/const/projectile/projectile15.s b/data/const/projectile/projectile15.s deleted file mode 100644 index b1fb7e4c..00000000 --- a/data/const/projectile/projectile15.s +++ /dev/null @@ -1,45 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A014:: @ 0812A014 - .4byte sub_080AA6A8 - .4byte sub_080AA6C0 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - .4byte sub_080AA78C - -gUnk_0812A02C:: @ 0812A02C - .4byte sub_080AA834 - .4byte sub_080AA878 - .4byte sub_080AA898 - .4byte sub_080AA9C4 - -gUnk_0812A03C:: @ 0812A03C - .incbin "projectile15/gUnk_0812A03C.bin" - -gUnk_0812A04C:: @ 0812A04C - .4byte gUnk_080FD41C - .4byte gUnk_080FD424 - .4byte gUnk_080FD42C - .4byte gUnk_080FD434 - -gUnk_0812A05C:: @ 0812A05C - .4byte sub_080AA8B8 - .4byte sub_080AA9AC - -gUnk_0812A064:: @ 0812A064 - .incbin "projectile15/gUnk_0812A064.bin" - -gUnk_0812A06C:: @ 0812A06C - .incbin "projectile15/gUnk_0812A06C.bin" - -gUnk_0812A074:: @ 0812A074 - .incbin "projectile15/gUnk_0812A074.bin" - -gUnk_0812A084:: @ 0812A084 - .incbin "projectile15/gUnk_0812A084.bin" - diff --git a/data/const/projectile/projectile16.s b/data/const/projectile/projectile16.s deleted file mode 100644 index c93695d4..00000000 --- a/data/const/projectile/projectile16.s +++ /dev/null @@ -1,24 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A3C0:: @ 0812A3C0 - .4byte sub_080AAB04 - .4byte sub_080AAB1C - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_0812A3D4:: @ 0812A3D4 - .4byte sub_080AAB24 - .4byte sub_080AAB38 - .4byte sub_080AAB64 - -gUnk_0812A3E0:: @ 0812A3E0 - .incbin "projectile16/gUnk_0812A3E0.bin" - -gUnk_0812A3F4:: @ 0812A3F4 - .4byte gUnk_0812A3E0 - .incbin "projectile16/gUnk_0812A3F4.bin" diff --git a/data/const/projectile/projectile18.s b/data/const/projectile/projectile18.s deleted file mode 100644 index 591ae81c..00000000 --- a/data/const/projectile/projectile18.s +++ /dev/null @@ -1,25 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A418:: @ 0812A418 - .4byte sub_080AAC0C - .4byte sub_080AAC44 - .4byte DeleteEntity - .4byte sub_080AACE0 - .4byte DeleteEntity - .4byte sub_080AAD70 - -gUnk_0812A430:: @ 0812A430 - .4byte sub_080AADBC - .4byte sub_080AAE88 - .4byte sub_080AAF00 - .4byte sub_080AAF10 - -gUnk_0812A440:: @ 0812A440 - .4byte sub_080AAD98 - .4byte nullsub_541 - .4byte sub_080AADA4 - diff --git a/data/const/projectile/projectile19.s b/data/const/projectile/projectile19.s deleted file mode 100644 index 73ebdcd0..00000000 --- a/data/const/projectile/projectile19.s +++ /dev/null @@ -1,15 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A494:: @ 0812A494 - .4byte sub_080AB074 - .4byte sub_080AB170 - .4byte sub_080AB170 - .4byte sub_080AB170 - .4byte sub_080AB26C - -gUnk_0812A4A8:: @ 0812A4A8 - .incbin "projectile19/gUnk_0812A4A8.bin" diff --git a/data/const/projectile/projectile1A.s b/data/const/projectile/projectile1A.s deleted file mode 100644 index 99f6e817..00000000 --- a/data/const/projectile/projectile1A.s +++ /dev/null @@ -1,21 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A4C8:: @ 0812A4C8 - .4byte sub_080AB2C4 - .4byte sub_080AB2DC - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_0812A4DC:: @ 0812A4DC - .4byte sub_080AB318 - .4byte sub_080AB414 - .4byte sub_080AB45C - .4byte sub_080AB488 - -gUnk_0812A4EC:: @ 0812A4EC - .incbin "projectile1A/gUnk_0812A4EC.bin" diff --git a/data/const/projectile/projectile1B.s b/data/const/projectile/projectile1B.s deleted file mode 100644 index 8b32f41b..00000000 --- a/data/const/projectile/projectile1B.s +++ /dev/null @@ -1,17 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A58C:: @ 0812A58C - .4byte sub_080AB52C - .4byte sub_080AB544 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_0812A5A0:: @ 0812A5A0 - .4byte sub_080AB580 - .4byte sub_080AB59C - .4byte sub_080AB5C4 diff --git a/data/const/projectile/projectile1C.s b/data/const/projectile/projectile1C.s deleted file mode 100644 index d5d783ad..00000000 --- a/data/const/projectile/projectile1C.s +++ /dev/null @@ -1,36 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A5E8:: @ 0812A5E8 - .4byte sub_080AB6B8 - .4byte sub_080AB6FC - .4byte sub_080AB728 - -gUnk_0812A5F4:: @ 0812A5F4 - .4byte gUnk_0812A61C - .4byte gUnk_0812A61C - .4byte gUnk_0812A624 - .4byte gUnk_0812A61C - .4byte gUnk_0812A62C - .4byte gUnk_0812A624 - .4byte gUnk_0812A634 - .4byte gUnk_0812A624 - -gUnk_0812A614:: @ 0812A614 - .incbin "projectile1C/gUnk_0812A614.bin" - -gUnk_0812A61C:: @ 0812A61C - .incbin "projectile1C/gUnk_0812A61C.bin" - -gUnk_0812A624:: @ 0812A624 - .incbin "projectile1C/gUnk_0812A624.bin" - -gUnk_0812A62C:: @ 0812A62C - .incbin "projectile1C/gUnk_0812A62C.bin" - -gUnk_0812A634:: @ 0812A634 - .incbin "projectile1C/gUnk_0812A634.bin" - diff --git a/data/const/projectile/projectile1D.s b/data/const/projectile/projectile1D.s deleted file mode 100644 index bd830ac1..00000000 --- a/data/const/projectile/projectile1D.s +++ /dev/null @@ -1,15 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A6B4:: @ 0812A6B4 - .4byte sub_080AB8E8 - .4byte sub_080AB950 - -gUnk_0812A6BC:: @ 0812A6BC - .incbin "projectile1D/gUnk_0812A6BC.bin" - -gUnk_0812A6C4:: @ 0812A6C4 - .incbin "projectile1D/gUnk_0812A6C4.bin" diff --git a/data/const/projectile/projectile1E.s b/data/const/projectile/projectile1E.s deleted file mode 100644 index 34eaa554..00000000 --- a/data/const/projectile/projectile1E.s +++ /dev/null @@ -1,13 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A6CC:: @ 0812A6CC - .4byte sub_080ABA74 - .4byte sub_080ABAE0 - -gUnk_0812A6D4:: @ 0812A6D4 - .incbin "projectile1E/gUnk_0812A6D4.bin" - diff --git a/data/const/projectile/projectile1F.s b/data/const/projectile/projectile1F.s deleted file mode 100644 index 9d9f75dc..00000000 --- a/data/const/projectile/projectile1F.s +++ /dev/null @@ -1,32 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A7D4:: @ 0812A7D4 - .4byte sub_080ABBA8 - .4byte sub_080ABBF4 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - .4byte sub_080ABC54 - -gUnk_0812A7EC:: @ 0812A7EC - .4byte sub_080ABCC4 - .4byte sub_080ABD44 - .4byte sub_080ABD70 - -gUnk_0812A7F8:: @ 0812A7F8 - .4byte sub_080ABE04 - .4byte sub_080ABE88 - -gUnk_0812A800:: @ 0812A800 - .4byte sub_080ABEA8 - .4byte sub_080ABF04 - -gUnk_0812A808:: @ 0812A808 - .4byte sub_080ABC84 - .4byte nullsub_542 - .4byte sub_080ABC90 - diff --git a/data/const/projectile/projectile2.s b/data/const/projectile/projectile2.s deleted file mode 100644 index 18bfec58..00000000 --- a/data/const/projectile/projectile2.s +++ /dev/null @@ -1,20 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812960C:: @ 0812960C - .4byte sub_080A81AC - .4byte sub_080A81C4 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129620:: @ 08129620 - .4byte sub_080A81E0 - .4byte sub_080A81FC - .4byte sub_080A8248 - .4byte sub_080A827C - .4byte sub_080A82B4 - diff --git a/data/const/projectile/projectile20.s b/data/const/projectile/projectile20.s deleted file mode 100644 index 48714f7a..00000000 --- a/data/const/projectile/projectile20.s +++ /dev/null @@ -1,13 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A84C:: @ 0812A84C - .4byte sub_080ABF40 - .4byte sub_080ABFA8 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - diff --git a/data/const/projectile/projectile21.s b/data/const/projectile/projectile21.s deleted file mode 100644 index d719c69e..00000000 --- a/data/const/projectile/projectile21.s +++ /dev/null @@ -1,28 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A954:: @ 0812A954 - .4byte sub_080ABFCC - .4byte sub_080ABFE4 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_0812A968:: @ 0812A968 - .4byte sub_080ABFEC - .4byte sub_080AC074 - .4byte sub_080AC100 - .4byte sub_080AC168 - .4byte sub_080AC200 - -gUnk_0812A97C:: @ 0812A97C - .incbin "projectile21/gUnk_0812A97C.bin" - -gUnk_0812A982:: @ 0812A982 - .incbin "projectile21/gUnk_0812A982.bin" - -gUnk_0812A98A:: @ 0812A98A - .incbin "projectile21/gUnk_0812A98A.bin" diff --git a/data/const/projectile/projectile22.s b/data/const/projectile/projectile22.s deleted file mode 100644 index 8f2daed3..00000000 --- a/data/const/projectile/projectile22.s +++ /dev/null @@ -1,29 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A994:: @ 0812A994 - .4byte sub_080AC328 - .4byte sub_080AC510 - .4byte sub_080AC510 - .4byte sub_080AC510 - .4byte sub_080AC560 - -gUnk_0812A9A8:: @ 0812A9A8 - .4byte sub_080AC340 - .4byte sub_080AC388 - .4byte sub_080AC480 - -gUnk_0812A9B4:: @ 0812A9B4 - .incbin "projectile22/gUnk_0812A9B4.bin" - -gUnk_0812A9B8:: @ 0812A9B8 - .incbin "projectile22/gUnk_0812A9B8.bin" - -gUnk_0812A9BA:: @ 0812A9BA - .incbin "projectile22/gUnk_0812A9BA.bin" - -gUnk_0812A9C0:: @ 0812A9C0 - .incbin "projectile22/gUnk_0812A9C0.bin" diff --git a/data/const/projectile/projectile23.s b/data/const/projectile/projectile23.s deleted file mode 100644 index 61448e8c..00000000 --- a/data/const/projectile/projectile23.s +++ /dev/null @@ -1,19 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812A9D8:: @ 0812A9D8 - .4byte sub_080AC8C4 - .4byte sub_080AC8DC - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_0812A9EC:: @ 0812A9EC - .4byte sub_080AC928 - .4byte sub_080AC954 - .4byte sub_080AC9CC - .4byte sub_080ACA14 - diff --git a/data/const/projectile/projectile24.s b/data/const/projectile/projectile24.s deleted file mode 100644 index 3572d9a1..00000000 --- a/data/const/projectile/projectile24.s +++ /dev/null @@ -1,18 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812AA5C:: @ 0812AA5C - .4byte sub_080ACA50 - .4byte sub_080ACA68 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - .4byte sub_080ACA50 - -gUnk_0812AA74:: @ 0812AA74 - .4byte sub_080ACAC8 - .4byte sub_080ACAF0 - .4byte sub_080ACB10 diff --git a/data/const/projectile/projectile3.s b/data/const/projectile/projectile3.s deleted file mode 100644 index ff715f5d..00000000 --- a/data/const/projectile/projectile3.s +++ /dev/null @@ -1,19 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129650:: @ 08129650 - .4byte sub_080A8314 - .4byte sub_080A832C - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129664:: @ 08129664 - .4byte sub_080A83A0 - .4byte sub_080A83B4 - -gUnk_0812966C:: @ 0812966C - .incbin "projectile3/gUnk_0812966C.bin" diff --git a/data/const/projectile/projectile4.s b/data/const/projectile/projectile4.s deleted file mode 100644 index 7fd5ed49..00000000 --- a/data/const/projectile/projectile4.s +++ /dev/null @@ -1,19 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_081296F0:: @ 081296F0 - .4byte sub_080A8458 - .4byte sub_080A8470 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129704:: @ 08129704 - .4byte sub_080A84C8 - .4byte sub_080A8504 - .4byte sub_080A85B8 - .4byte sub_080A8610 - .4byte sub_080A862C diff --git a/data/const/projectile/projectile5.s b/data/const/projectile/projectile5.s deleted file mode 100644 index b7e18787..00000000 --- a/data/const/projectile/projectile5.s +++ /dev/null @@ -1,19 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129718:: @ 08129718 - .4byte sub_080A86D8 - .4byte sub_080A86F0 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_0812972C:: @ 0812972C - .4byte sub_080A8770 - .4byte sub_080A878C - -gUnk_08129734:: @ 08129734 - .incbin "projectile5/gUnk_08129734.bin" diff --git a/data/const/projectile/projectile6.s b/data/const/projectile/projectile6.s deleted file mode 100644 index 69a48a13..00000000 --- a/data/const/projectile/projectile6.s +++ /dev/null @@ -1,22 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129740:: @ 08129740 - .4byte sub_080A87E4 - .4byte sub_080A881C - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129754:: @ 08129754 - .4byte sub_080A8868 - .4byte sub_080A88C8 - .4byte sub_080A8988 - .4byte sub_080A8A48 - -gUnk_08129764:: @ 08129764 - .incbin "projectile6/gUnk_08129764.bin" - diff --git a/data/const/projectile/projectile7.s b/data/const/projectile/projectile7.s deleted file mode 100644 index c6e1c457..00000000 --- a/data/const/projectile/projectile7.s +++ /dev/null @@ -1,12 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812979C:: @ 0812979C - .4byte sub_080A8A90 - .4byte sub_080A8AC8 - .4byte sub_080A8B38 - .4byte sub_080A8B78 - diff --git a/data/const/projectile/projectile8.s b/data/const/projectile/projectile8.s deleted file mode 100644 index 87d3d5f2..00000000 --- a/data/const/projectile/projectile8.s +++ /dev/null @@ -1,12 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812982C:: @ 0812982C - .4byte sub_080A8BC0 - .4byte sub_080A8BF8 - .4byte sub_080A8C4C - .4byte sub_080A8C8C - diff --git a/data/const/projectile/projectile9.s b/data/const/projectile/projectile9.s deleted file mode 100644 index 344cb8ae..00000000 --- a/data/const/projectile/projectile9.s +++ /dev/null @@ -1,12 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_081298B8:: @ 081298B8 - .4byte sub_080A8CD4 - .4byte sub_080A8D0C - .4byte sub_080A8D60 - .4byte sub_080A8DA0 - diff --git a/data/const/projectile/projectileA.s b/data/const/projectile/projectileA.s deleted file mode 100644 index 41cdc5f7..00000000 --- a/data/const/projectile/projectileA.s +++ /dev/null @@ -1,27 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129954:: @ 08129954 - .4byte sub_080A8DDC - .4byte sub_080A8DDC - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129968:: @ 08129968 - .4byte sub_080A8E28 - .4byte sub_080A8FB8 - .4byte sub_080A9058 - .4byte sub_080A90BC - -gUnk_08129978:: @ 08129978 - .incbin "projectileA/gUnk_08129978.bin" - -gUnk_08129980:: @ 08129980 - .incbin "projectileA/gUnk_08129980.bin" - -gUnk_08129988:: @ 08129988 - .incbin "projectileA/gUnk_08129988.bin" diff --git a/data/const/projectile/projectileB.s b/data/const/projectile/projectileB.s deleted file mode 100644 index 59f7a1fa..00000000 --- a/data/const/projectile/projectileB.s +++ /dev/null @@ -1,23 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129998:: @ 08129998 - .4byte gUnk_081299A8 - .4byte gUnk_081299B0 - .4byte gUnk_081299B8 - .4byte gUnk_081299C0 - -gUnk_081299A8:: @ 081299A8 - .incbin "projectileB/gUnk_081299A8.bin" - -gUnk_081299B0:: @ 081299B0 - .incbin "projectileB/gUnk_081299B0.bin" - -gUnk_081299B8:: @ 081299B8 - .incbin "projectileB/gUnk_081299B8.bin" - -gUnk_081299C0:: @ 081299C0 - .incbin "projectileB/gUnk_081299C0.bin" diff --git a/data/const/projectile/projectileC.s b/data/const/projectile/projectileC.s deleted file mode 100644 index 4f872758..00000000 --- a/data/const/projectile/projectileC.s +++ /dev/null @@ -1,8 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_081299C8:: @ 081299C8 - .incbin "projectileC/gUnk_081299C8.bin" diff --git a/data/const/projectile/projectileD.s b/data/const/projectile/projectileD.s deleted file mode 100644 index c18edc34..00000000 --- a/data/const/projectile/projectileD.s +++ /dev/null @@ -1,35 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_081299D0:: @ 081299D0 - .4byte sub_080A931C - .4byte sub_080A9334 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_081299E4:: @ 081299E4 - .4byte sub_080A9370 - .4byte sub_080A93A0 - .4byte sub_080A93DC - .4byte sub_080A942C - .4byte sub_080A9448 - -gUnk_081299F8:: @ 081299F8 - .incbin "projectileD/gUnk_081299F8.bin" - .4byte gUnk_08129A20 - .incbin "projectileD/gUnk_081299F8_1.bin" - .4byte gUnk_08129A18 - .incbin "projectileD/gUnk_081299F8_2.bin" - .4byte gUnk_08129A20 - .incbin "projectileD/gUnk_081299F8_3.bin" - .4byte gUnk_08129A18 - -gUnk_08129A18:: @ 08129A18 - .incbin "projectileD/gUnk_08129A18.bin" - -gUnk_08129A20:: @ 08129A20 - .incbin "projectileD/gUnk_08129A20.bin" diff --git a/data/const/projectile/projectileE.s b/data/const/projectile/projectileE.s deleted file mode 100644 index 69b605ec..00000000 --- a/data/const/projectile/projectileE.s +++ /dev/null @@ -1,11 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129A64:: @ 08129A64 - .4byte sub_080A9518 - .4byte sub_080A9540 - .4byte sub_080A95BC - diff --git a/data/const/projectile/projectileF.s b/data/const/projectile/projectileF.s deleted file mode 100644 index 5ab8044d..00000000 --- a/data/const/projectile/projectileF.s +++ /dev/null @@ -1,20 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08129ABC:: @ 08129ABC - .4byte sub_080A95F8 - .4byte sub_080A95F8 - .4byte DeleteEntity - .4byte DeleteEntity - .4byte DeleteEntity - -gUnk_08129AD0:: @ 08129AD0 - .4byte sub_080A9610 - .4byte sub_080A976C - .4byte sub_080A99F0 - -gUnk_08129ADC:: @ 08129ADC - .incbin "projectileF/gUnk_08129ADC.bin" diff --git a/data/data_08129320.s b/data/data_08129320.s index c0088c02..41b4d6ba 100644 --- a/data/data_08129320.s +++ b/data/data_08129320.s @@ -5,41 +5,41 @@ .align 2 gProjectileFunctions:: @ 08129320 - .4byte Projectile0 - .4byte Projectile1 - .4byte Projectile2 - .4byte Projectile3 - .4byte Projectile4 + .4byte DarkNutSwordSlash + .4byte RockProjectile + .4byte BoneProjectile + .4byte MoblinSpear + .4byte DekuSeedProjectile .4byte Projectile5 - .4byte Projectile6 - .4byte Projectile7 - .4byte Projectile8 - .4byte Projectile9 - .4byte ProjectileA - .4byte ProjectileB - .4byte ProjectileC - .4byte ProjectileD - .4byte ProjectileE - .4byte ProjectileF - .4byte Projectile10 - .4byte Projectile11 - .4byte Projectile12 - .4byte Projectile13 - .4byte Projectile14 - .4byte Projectile15 - .4byte Projectile16 - .4byte Projectile17 - .4byte Projectile18 - .4byte Projectile19 - .4byte Projectile1A - .4byte Projectile1B - .4byte Projectile1C - .4byte Projectile1D - .4byte Projectile1E - .4byte Projectile1F - .4byte Projectile20 - .4byte Projectile21 - .4byte Projectile22 - .4byte Projectile23 - .4byte Projectile24 + .4byte DirtBallProjectile + .4byte WindProjectile + .4byte FireProjectile + .4byte IceProjectile + .4byte GleerokProjectile + .4byte KeatonDagger + .4byte GuardLineOfSight + .4byte ArrowProjectile + .4byte MazaalEnergyBeam + .4byte OctorokBossProjectile + .4byte StalfosProjectile + .4byte LakituCloudProjectile + .4byte LakituLightning + .4byte MandiblesProjectile + .4byte RemovableDust + .4byte SpiderWeb + .4byte TorchTrapProjectile + .4byte GuruguruBarProjectile + .4byte V1DarkMagicProjectile + .4byte BallAndChain + .4byte V1FireProjectile + .4byte CannonballProjectile + .4byte V1EyeLaser + .4byte Winder + .4byte SpikedRollers + .4byte V2Projectile + .4byte V3HandProjectile + .4byte V3ElectricProjectile + .4byte GyorgTail + .4byte GyorgMaleEnergyProjectile + .4byte V3TennisBallProjectile .4byte DeleteEntity diff --git a/include/functions.h b/include/functions.h index 22915222..45e0f294 100644 --- a/include/functions.h +++ b/include/functions.h @@ -80,7 +80,7 @@ extern u32 sub_08049FA0(Entity*); extern u32 sub_08049FDC(Entity*, u32); extern u32 sub_080041A0(Entity*, Entity*, u32, u32); extern u32 sub_08049EE4(Entity*); -extern Entity* sub_0804A98C(Entity*, u8, u8); +extern Entity* CreateProjectileWithParent(Entity*, u8, u8); extern u32 GetBottleContaining(u32); extern void sub_08077E54(ItemBehavior*); extern void sub_080042BA(Entity*, u32); @@ -206,7 +206,7 @@ extern void sub_0802F45C(Entity*); extern u32 sub_0800419C(Entity*, Entity*, u32, u32); extern void sub_08004542(Entity*); extern void sub_08077B20(); -extern u32 sub_080040A8(Entity*); +extern bool32 sub_080040A8(Entity*); extern u32 sub_08017850(Entity*); extern void sub_080809D4(void); extern void sub_08080CB4(Entity*); @@ -227,7 +227,7 @@ extern u32 sub_0805F7A0(u32); extern u32* sub_0805F25C(u32); extern u32 sub_080045DA(s32, s32); u32 sub_0806FCB8(Entity*, u32, u32, u32); -extern Entity* sub_080A7EE0(u32); +extern Entity* CreateProjectile(u32); extern void sub_080A1D70(Entity*, u32); extern void sub_0806F62C(Entity*, u32, u32); extern void sub_080A1ED0(u32, u32, u32); diff --git a/linker.ld b/linker.ld index 12650263..771fe075 100644 --- a/linker.ld +++ b/linker.ld @@ -277,8 +277,8 @@ SECTIONS { . = 0x00005D90; IntrMain = .; . = 0x00005E60; gUnk_03005E60 = .; . = 0x00005E98; gUnk_03005E98 = .; - . = 0x00005F24; _EntUpdate = .; - . = 0x00005F40; gUnk_03005F40 = .; + . = 0x00005F24; _ClearAndUpdateEntities = .; + . = 0x00005F40; _UpdateEntities = .; . = 0x00005FBC; gUnk_03005FBC = .; . = 0x00005FF0; gUnk_03005FF0 = .; . = 0x000060F0; gUnk_030060F0 = .; @@ -924,43 +924,43 @@ SECTIONS { asm/code_080A5574.o(.text); src/playerItem/playerItemSword.o(.text); asm/code_080A7C00.o(.text); - src/projectile/projectile0.o(.text); - src/projectile/projectile1.o(.text); - src/projectile/projectile2.o(.text); - src/projectile/projectile3.o(.text); - src/projectile/projectile4.o(.text); + src/projectile/darkNutSwordSlash.o(.text); + src/projectile/rockProjectile.o(.text); + src/projectile/boneProjectile.o(.text); + src/projectile/moblinSpear.o(.text); + src/projectile/dekuSeedProjectile.o(.text); src/projectile/projectile5.o(.text); - src/projectile/projectile6.o(.text); - src/projectile/projectile7.o(.text); - src/projectile/projectile8.o(.text); - src/projectile/projectile9.o(.text); - src/projectile/projectileA.o(.text); - src/projectile/projectileB.o(.text); - src/projectile/projectileC.o(.text); - src/projectile/projectileD.o(.text); - src/projectile/projectileE.o(.text); - src/projectile/projectileF.o(.text); - src/projectile/projectile10.o(.text); - src/projectile/projectile11.o(.text); - src/projectile/projectile12.o(.text); - src/projectile/projectile13.o(.text); - src/projectile/projectile14.o(.text); - src/projectile/projectile15.o(.text); - src/projectile/projectile16.o(.text); - src/projectile/projectile17.o(.text); - src/projectile/projectile18.o(.text); - src/projectile/projectile19.o(.text); - src/projectile/projectile1A.o(.text); - src/projectile/projectile1B.o(.text); - src/projectile/projectile1C.o(.text); - src/projectile/projectile1D.o(.text); - src/projectile/projectile1E.o(.text); - src/projectile/projectile1F.o(.text); - src/projectile/projectile20.o(.text); - src/projectile/projectile21.o(.text); - src/projectile/projectile22.o(.text); - src/projectile/projectile23.o(.text); - src/projectile/projectile24.o(.text); + src/projectile/dirtBallProjectile.o(.text); + src/projectile/windProjectile.o(.text); + src/projectile/fireProjectile.o(.text); + src/projectile/iceProjectile.o(.text); + src/projectile/gleerokProjectile.o(.text); + src/projectile/keatonDagger.o(.text); + src/projectile/guardLineOfSight.o(.text); + src/projectile/arrowProjectile.o(.text); + src/projectile/mazaalEnergyBeam.o(.text); + src/projectile/octorokBossProjectile.o(.text); + src/projectile/stalfosProjectile.o(.text); + src/projectile/lakituCloudProjectile.o(.text); + src/projectile/lakituLightning.o(.text); + src/projectile/mandiblesProjectile.o(.text); + src/projectile/removableDust.o(.text); + src/projectile/spiderWeb.o(.text); + src/projectile/torchTrapProjectile.o(.text); + src/projectile/guruguruBarProjectile.o(.text); + src/projectile/v1DarkMagicProjectile.o(.text); + src/projectile/ballAndChain.o(.text); + src/projectile/v1FireProjectile.o(.text); + src/projectile/cannonballProjectile.o(.text); + src/projectile/v1EyeLaser.o(.text); + src/projectile/winder.o(.text); + src/projectile/spikedRollers.o(.text); + src/projectile/v2Projectile.o(.text); + src/projectile/v3HandProjectile.o(.text); + src/projectile/v3ElectricProjectile.o(.text); + src/projectile/gyorgTail.o(.text); + src/projectile/gyorgMaleEnergyProjectile.o(.text); + src/projectile/v3TennisBallProjectile.o(.text); src/playerItem/playerItem10.o(.text); src/playerItem/playerItem13.o(.text); src/intro.o(.text); @@ -1655,62 +1655,62 @@ data/const/object/object1D.o(.rodata); data/data_08127280.o(.rodata); data/const/playerItem/playerItemSword.o(.rodata); data/data_08129320.o(.rodata); - data/const/projectile/projectile0.o(.rodata); - data/const/projectile/projectile1.o(.rodata); - data/animations/projectile/projectile1.o(.rodata); - data/const/projectile/projectile2.o(.rodata); - data/animations/projectile/projectile2.o(.rodata); - data/const/projectile/projectile3.o(.rodata); - data/const/projectile/projectile4.o(.rodata); - data/const/projectile/projectile5.o(.rodata); - data/const/projectile/projectile6.o(.rodata); - data/animations/projectile/projectile6.o(.rodata); - data/const/projectile/projectile7.o(.rodata); - data/animations/projectile/projectile7.o(.rodata); - data/const/projectile/projectile8.o(.rodata); - data/animations/projectile/projectile8.o(.rodata); - data/const/projectile/projectile9.o(.rodata); - data/animations/projectile/projectile9.o(.rodata); - data/const/projectile/projectileA.o(.rodata); - data/const/projectile/projectileB.o(.rodata); - data/const/projectile/projectileC.o(.rodata); - data/const/projectile/projectileD.o(.rodata); - data/animations/projectile/projectileD.o(.rodata); - data/const/projectile/projectileE.o(.rodata); - data/animations/projectile/projectileE.o(.rodata); - data/const/projectile/projectileF.o(.rodata); - data/const/projectile/projectile10.o(.rodata); - data/const/projectile/projectile11.o(.rodata); - data/animations/projectile/projectile11.o(.rodata); - data/const/projectile/projectile12.o(.rodata); - data/animations/projectile/projectile12.o(.rodata); - data/const/projectile/projectile13.o(.rodata); - data/animations/projectile/projectile13.o(.rodata); - data/const/projectile/projectile14.o(.rodata); - data/const/projectile/projectile15.o(.rodata); - data/animations/projectile/projectile15.o(.rodata); - data/const/projectile/projectile16.o(.rodata); - data/animations/projectile/projectile16.o(.rodata); - data/const/projectile/projectile18.o(.rodata); - data/animations/projectile/projectile18.o(.rodata); - data/const/projectile/projectile19.o(.rodata); - data/const/projectile/projectile1A.o(.rodata); - data/const/projectile/projectile1B.o(.rodata); - data/animations/projectile/projectile1B.o(.rodata); - data/const/projectile/projectile1C.o(.rodata); - data/animations/projectile/projectile1C.o(.rodata); - data/const/projectile/projectile1D.o(.rodata); - data/const/projectile/projectile1E.o(.rodata); - data/animations/projectile/projectile1E.o(.rodata); - data/const/projectile/projectile1F.o(.rodata); - data/animations/projectile/projectile1F.o(.rodata); - data/const/projectile/projectile20.o(.rodata); - data/animations/projectile/projectile20.o(.rodata); - data/const/projectile/projectile21.o(.rodata); - data/const/projectile/projectile22.o(.rodata); - data/const/projectile/projectile23.o(.rodata); - data/animations/projectile/projectile23.o(.rodata); - data/const/projectile/projectile24.o(.rodata); + src/projectile/darkNutSwordSlash.o(.rodata); + src/projectile/rockProjectile.o(.rodata); + data/animations/projectile/rockProjectile.o(.rodata); + src/projectile/boneProjectile.o(.rodata); + data/animations/projectile/boneProjectile.o(.rodata); + src/projectile/moblinSpear.o(.rodata); + src/projectile/dekuSeedProjectile.o(.rodata); + src/projectile/projectile5.o(.rodata); + src/projectile/dirtBallProjectile.o(.rodata); + data/animations/projectile/dirtBallProjectile.o(.rodata); + src/projectile/windProjectile.o(.rodata); + data/animations/projectile/windProjectile.o(.rodata); + src/projectile/fireProjectile.o(.rodata); + data/animations/projectile/fireProjectile.o(.rodata); + src/projectile/iceProjectile.o(.rodata); + data/animations/projectile/iceProjectile.o(.rodata); + src/projectile/gleerokProjectile.o(.rodata); + src/projectile/keatonDagger.o(.rodata); + src/projectile/guardLineOfSight.o(.rodata); + src/projectile/arrowProjectile.o(.rodata); + data/animations/projectile/arrowProjectile.o(.rodata); + src/projectile/mazaalEnergyBeam.o(.rodata); + data/animations/projectile/mazaalEnergyBeam.o(.rodata); + src/projectile/octorokBossProjectile.o(.rodata); + src/projectile/stalfosProjectile.o(.rodata); + src/projectile/lakituCloudProjectile.o(.rodata); + data/animations/projectile/lakituCloudProjectile.o(.rodata); + src/projectile/lakituLightning.o(.rodata); + data/animations/projectile/lakituLightning.o(.rodata); + src/projectile/mandiblesProjectile.o(.rodata); + data/animations/projectile/mandiblesProjectile.o(.rodata); + src/projectile/removableDust.o(.rodata); + src/projectile/spiderWeb.o(.rodata); + data/animations/projectile/spiderWeb.o(.rodata); + src/projectile/torchTrapProjectile.o(.rodata); + data/animations/projectile/torchTrapProjectile.o(.rodata); + src/projectile/v1DarkMagicProjectile.o(.rodata); + data/animations/projectile/v1DarkMagicProjectile.o(.rodata); + src/projectile/ballAndChain.o(.rodata); + src/projectile/v1FireProjectile.o(.rodata); + src/projectile/cannonballProjectile.o(.rodata); + data/animations/projectile/cannonballProjectile.o(.rodata); + src/projectile/v1EyeLaser.o(.rodata); + data/animations/projectile/v1EyeLaser.o(.rodata); + src/projectile/winder.o(.rodata); + src/projectile/spikedRollers.o(.rodata); + data/animations/projectile/spikedRollers.o(.rodata); + src/projectile/v2Projectile.o(.rodata); + data/animations/projectile/v2Projectile.o(.rodata); + src/projectile/v3HandProjectile.o(.rodata); + data/animations/projectile/v3HandProjectile.o(.rodata); + src/projectile/v3ElectricProjectile.o(.rodata); + src/projectile/gyorgTail.o(.rodata); + src/projectile/gyorgMaleEnergyProjectile.o(.rodata); + data/animations/projectile/gyorgMaleEnergyProjectile.o(.rodata); + src/projectile/v3TennisBallProjectile.o(.rodata); data/const/playerItem/playerItem10.o(.rodata); data/data_0812AA88.o(.rodata); data/const/playerItem/playerItem13.o(.rodata); diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c index d15eb877..3d592781 100644 --- a/src/enemy/businessScrub.c +++ b/src/enemy/businessScrub.c @@ -138,7 +138,7 @@ void sub_08028A74(Entity* this) { unk = 1; sub_080290FC(this); if (this->frames.all & 1) { - Entity* ent = sub_0804A98C(this, 4, 0); + Entity* ent = CreateProjectileWithParent(this, 4, 0); if (ent != NULL) { ent->parent = this; ent->direction = this->direction; diff --git a/src/enemy/darkNut.c b/src/enemy/darkNut.c index 6f9d08e7..4ede2e2d 100644 --- a/src/enemy/darkNut.c +++ b/src/enemy/darkNut.c @@ -224,7 +224,7 @@ void sub_08020F48(Entity* this) { this->action = 14; sub_08021218(this, 13, uVar2 >> 3); - pEVar3 = sub_0804A98C(this, 0, 1); + pEVar3 = CreateProjectileWithParent(this, 0, 1); if (pEVar3) { pEVar3->parent = this; this->attachedEntity = pEVar3; @@ -270,7 +270,7 @@ void sub_08021010(Entity* this) { void sub_08021038(Entity* this) { if (this->attachedEntity == NULL && this->frames.all) { - Entity* pEVar2 = (Entity*)sub_0804A98C(this, 0, 0); + Entity* pEVar2 = (Entity*)CreateProjectileWithParent(this, 0, 0); if (pEVar2) { pEVar2->parent = this; this->attachedEntity = pEVar2; @@ -309,7 +309,7 @@ void sub_080210E4(Entity* this) { Entity* ent; this->frames.all &= ~1; - ent = sub_0804A98C(this, 0, 2); + ent = CreateProjectileWithParent(this, 0, 2); if (ent) { ent->parent = this; this->attachedEntity = ent; @@ -569,7 +569,7 @@ void sub_0802159C(Entity* this) { this->frames.all = 0; this->damageType = 0x51; - ent = sub_0804A98C(this, 0, 3); + ent = CreateProjectileWithParent(this, 0, 3); if (ent) { ent->parent = this; this->attachedEntity = ent; @@ -590,7 +590,7 @@ void sub_08021600(Entity* this) { this->frames.all = 0; this->damageType = 0x51; - ent = sub_0804A98C(this, 0, 4); + ent = CreateProjectileWithParent(this, 0, 4); if (ent) { ent->parent = this; this->attachedEntity = ent; diff --git a/src/enemy/enemy4D.c b/src/enemy/enemy4D.c index a29157bc..0049a853 100644 --- a/src/enemy/enemy4D.c +++ b/src/enemy/enemy4D.c @@ -36,7 +36,7 @@ void sub_0803EB44(Entity* this) { Entity* pEVar1; sub_0804A720(this); - pEVar1 = sub_0804A98C(this, 0x19, 0); + pEVar1 = CreateProjectileWithParent(this, 0x19, 0); if (pEVar1 != NULL) { pEVar1->parent = this; this->attachedEntity = pEVar1; diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c index 921784df..effceb3b 100644 --- a/src/enemy/gyorgMale.c +++ b/src/enemy/gyorgMale.c @@ -109,7 +109,7 @@ void GyorgMale(Entity* this) { } void sub_08046898(Entity* this) { - Entity* tmp = sub_080A7EE0(0x22); + Entity* tmp = CreateProjectile(0x22); u32 tmp2; if (!tmp) return; @@ -402,7 +402,7 @@ void sub_08046EF4(Entity* this) { if ((--this->field_0xf & 0xFF) == 0) { Entity* tmp; this->field_0xf = (Random() & 0x38) + 0x78; - tmp = sub_080A7EE0(0x23); + tmp = CreateProjectile(0x23); if (tmp) { tmp->collisionLayer = 2; tmp->parent = this; @@ -426,7 +426,7 @@ void sub_08046F64(Entity* this) { if (--this->field_0x7c.HALF.HI == 0) { Entity* tmp; this->field_0x7c.HALF.HI = 0x78; - tmp = sub_080A7EE0(0x23); + tmp = CreateProjectile(0x23); if (tmp) { tmp->collisionLayer = 2; tmp->parent = this; diff --git a/src/enemy/keaton.c b/src/enemy/keaton.c index 79e98065..df748792 100644 --- a/src/enemy/keaton.c +++ b/src/enemy/keaton.c @@ -232,7 +232,7 @@ void sub_08032794(Entity* this) { void sub_080327C8(Entity* this) { Entity* child; - child = sub_0804A98C(this, 11, 0); + child = CreateProjectileWithParent(this, 11, 0); if (child != NULL) { child->parent = this; this->attachedEntity = child; diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c index cd9ce2b2..d97bec40 100644 --- a/src/enemy/lakitu.c +++ b/src/enemy/lakitu.c @@ -117,7 +117,7 @@ void sub_0803C86C(Entity* this) { } void Lakitu_Initialize(Entity* this) { - Entity* cloud = sub_0804A98C(this, 17, 0); + Entity* cloud = CreateProjectileWithParent(this, 17, 0); if (cloud == NULL) { return; } @@ -303,7 +303,7 @@ void Lakitu_SpawnLightning(Entity* this) { Entity* lightning; const OffsetCoords* offset; - lightning = sub_0804A98C(this, 18, 0); + lightning = CreateProjectileWithParent(this, 18, 0); if (lightning == NULL) { return; diff --git a/src/enemy/mazaalHead.c b/src/enemy/mazaalHead.c index 1672b5c4..bfa45e69 100644 --- a/src/enemy/mazaalHead.c +++ b/src/enemy/mazaalHead.c @@ -779,7 +779,7 @@ NONMATCH("asm/non_matching/mazaal/sub_08034B38.inc", void sub_08034B38(Entity* t this->action = 3; InitializeAnimation(this, this->type + 3); } else { - target = sub_080A7EE0(0xe); + target = CreateProjectile(0xe); if (target != NULL) { target->type -= 2; if (target->type == 0) { diff --git a/src/enemy/octorok.c b/src/enemy/octorok.c index 565ed259..525ad1bf 100644 --- a/src/enemy/octorok.c +++ b/src/enemy/octorok.c @@ -126,7 +126,7 @@ void Octorok_Move(Entity* this) { void Octorok_ShootNut(Entity* this) { GetNextFrame(this); if (this->frames.all & 1) { - Entity* ent = sub_0804A98C(this, 1, 0); + Entity* ent = CreateProjectileWithParent(this, 1, 0); if (ent) { const s8* off; ent->direction = this->direction; diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c index 1277f0c6..698edc94 100644 --- a/src/enemy/pesto.c +++ b/src/enemy/pesto.c @@ -170,7 +170,7 @@ void sub_080240B8(Entity* this) { Entity* ent; this->field_0x82.HALF.HI = 0; - ent = sub_0804A98C(this, 6, this->field_0x82.HALF.HI); + ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI); if (ent) { this->attachedEntity = ent; ent->parent = this; @@ -413,7 +413,7 @@ void sub_080244E8(Entity* this) { this->height.HALF.HI -= 0xe; this->field_0x78.HWORD -= 0xe; - ent = sub_0804A98C(this, 6, this->field_0x82.HALF.HI); + ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI); if (ent) { ent->parent = this; ent->height.HALF.HI += 0xe; @@ -436,7 +436,7 @@ void sub_080244E8(Entity* this) { this->height.HALF.HI -= 0xe; this->field_0x78.HWORD -= 0xe; - ent = sub_0804A98C(this, 6, this->field_0x82.HALF.HI); + ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI); if (ent) { ent->parent = this; ent->height.HALF.HI += 0xe; diff --git a/src/enemy/spearMoblin.c b/src/enemy/spearMoblin.c index b12186e0..68f52f04 100644 --- a/src/enemy/spearMoblin.c +++ b/src/enemy/spearMoblin.c @@ -94,7 +94,7 @@ void sub_08028314(Entity* this) { sub_08028604(this); } - pEVar2 = sub_080A7EE0(3); + pEVar2 = CreateProjectile(3); if (pEVar2 != NULL) { pEVar2->parent = this; this->attachedEntity = pEVar2; diff --git a/src/enemy/vaatiBall.c b/src/enemy/vaatiBall.c index 903a84db..00c3f24c 100644 --- a/src/enemy/vaatiBall.c +++ b/src/enemy/vaatiBall.c @@ -185,7 +185,7 @@ void sub_08044868(Entity* this) { if (*(u8*)&vaati->field_0x86 > 1) { u8 draw = this->spriteSettings.b.draw; if (draw == 1 && this->cutsceneBeh.HALF.LO == 0) { - vaati = sub_0804A98C(this, 0x18, 0); + vaati = CreateProjectileWithParent(this, 0x18, 0); if (vaati) { vaati->type2 = 1; vaati->parent = this; @@ -275,7 +275,7 @@ void sub_080449F8(Entity* this) { this->field_0x74.HALF.LO++; draw = this->spriteSettings.b.draw; if (draw) { - vaati = sub_0804A98C(this, 0x1c, 0); + vaati = CreateProjectileWithParent(this, 0x1c, 0); if (vaati) { vaati->y.HALF.HI += 4; vaati->parent = this; diff --git a/src/entity.c b/src/entity.c index 02230491..60e571ff 100644 --- a/src/entity.c +++ b/src/entity.c @@ -48,11 +48,11 @@ typedef struct { extern struct_03003DD0 gUnk_03003DD0; extern u32 _call_via_r0(u32*); -extern u32 _EntUpdate; +extern u32 _ClearAndUpdateEntities; void DeleteThisEntity(void) { DeleteEntityAny(gUnk_03003DD0.field_0x8); - _call_via_r0((u32*)&_EntUpdate); + _call_via_r0((u32*)&_ClearAndUpdateEntities); } void DeleteManager(OtherEntity*); diff --git a/src/npc/guard.c b/src/npc/guard.c index d94827c4..7e9b0034 100644 --- a/src/npc/guard.c +++ b/src/npc/guard.c @@ -64,7 +64,7 @@ void sub_08063D44(Entity* this) { sub_0806EE04(this, gUnk_0810F6BC[this->type], 0); switch (this->type) { case 0 ... 3: - ent = sub_080A7EE0(0xc); + ent = CreateProjectile(0xc); ent->parent = this; ent->field_0xf = 0x3c; break; diff --git a/src/projectile/projectileD.c b/src/projectile/arrowProjectile.c similarity index 61% rename from src/projectile/projectileD.c rename to src/projectile/arrowProjectile.c index 931728dd..48db32b3 100644 --- a/src/projectile/projectileD.c +++ b/src/projectile/arrowProjectile.c @@ -4,31 +4,29 @@ #include "audio.h" #include "createObject.h" -extern void (*const gUnk_081299D0[])(Entity*); - -extern void (*const gUnk_081299E4[])(Entity*); - -void sub_080A9488(Entity*); - -void sub_080A94C0(Entity*, u32); - extern s32 sub_080AF090(Entity*); +extern void (*const gArrowProjectile[])(Entity*); +extern void (*const gArrowProjectileActions[])(Entity*); + typedef struct { u8 flipX; u8 flipY; u8 animIndex; u8 unk; - Hitbox* hitbox; + const Hitbox* hitbox; } struct_081299F8; -extern struct_081299F8 gUnk_081299F8[]; +extern const struct_081299F8 gUnk_081299F8[]; -void ProjectileD(Entity* this) { - gUnk_081299D0[GetNextFunction(this)](this); +void sub_080A9488(Entity*); +void sub_080A94C0(Entity*, u32); + +void ArrowProjectile(Entity* this) { + gArrowProjectile[GetNextFunction(this)](this); } -void sub_080A931C(Entity* this) { - gUnk_081299E4[this->action](this); +void ArrowProjectile_OnTick(Entity* this) { + gArrowProjectileActions[this->action](this); } void sub_080A9334(Entity* this) { @@ -44,7 +42,7 @@ void sub_080A9334(Entity* this) { } } -void sub_080A9370(Entity* this) { +void ArrowProjectile_Init(Entity* this) { this->action = 1; this->spriteSettings.b.draw = 1; this->flags &= 0x7f; @@ -54,10 +52,8 @@ void sub_080A9370(Entity* this) { sub_080A94C0(this, this->type); } -void sub_080A93A0(Entity* this) { - Entity* parent; - - parent = this->parent; +void ArrowProjectile_Action1(Entity* this) { + Entity* parent = this->parent; if ((parent == NULL) || (parent->next == NULL)) { DeleteThisEntity(); } @@ -72,7 +68,7 @@ void sub_080A93A0(Entity* this) { } } -void sub_080A93DC(Entity* this) { +void ArrowProjectile_Action2(Entity* this) { if (this->collisions != 0) { this->action = 3; this->flags &= 0x7f; @@ -86,14 +82,14 @@ void sub_080A93DC(Entity* this) { sub_080AF090(this); } -void sub_080A942C(Entity* this) { +void ArrowProjectile_Action3(Entity* this) { if (--this->actionDelay == 0) { DeleteThisEntity(); } GetNextFrame(this); } -void sub_080A9448(Entity* this) { +void ArrowProjectile_Action4(Entity* this) { if (sub_08003FC4(this, 0x2800) == 0) { CreateDust(this); DeleteThisEntity(); @@ -116,11 +112,32 @@ void sub_080A9488(Entity* this) { sub_080A94C0(this, this->animationState); } -void sub_080A94C0(Entity* this, u32 param) { - struct_081299F8* entry = &gUnk_081299F8[param]; +void sub_080A94C0(Entity* this, u32 animationState) { + const struct_081299F8* entry = &gUnk_081299F8[animationState]; this->spriteSettings.b.flipX = entry->flipX; this->spriteSettings.b.flipY = entry->flipY; this->animIndex = entry->animIndex; - this->hitbox = entry->hitbox; + this->hitbox = (Hitbox*)entry->hitbox; InitializeAnimation(this, this->animIndex); } + +void (*const gArrowProjectile[])(Entity*) = { + ArrowProjectile_OnTick, sub_080A9334, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const gArrowProjectileActions[])(Entity*) = { + ArrowProjectile_Init, ArrowProjectile_Action1, ArrowProjectile_Action2, + ArrowProjectile_Action3, ArrowProjectile_Action4, +}; + +extern const Hitbox gUnk_08129A18; +extern const Hitbox gUnk_08129A20; + +const struct_081299F8 gUnk_081299F8[] = { + { 0, 0, 1, 0, &gUnk_08129A20 }, + { 1, 0, 0, 0, &gUnk_08129A18 }, + { 0, 1, 1, 0, &gUnk_08129A20 }, + { 0, 0, 0, 0, &gUnk_08129A18 }, +}; + +const Hitbox gUnk_08129A18 = { 0, 0, { 4, 0, 0, 0 }, 6, 4 }; +const Hitbox gUnk_08129A20 = { 0, 0, { 0, 0, 0, 4 }, 4, 6 }; diff --git a/src/projectile/projectile19.c b/src/projectile/ballAndChain.c similarity index 74% rename from src/projectile/projectile19.c rename to src/projectile/ballAndChain.c index 8c23bd65..065c9e8a 100644 --- a/src/projectile/projectile19.c +++ b/src/projectile/ballAndChain.c @@ -1,13 +1,13 @@ #include "entity.h" #include "functions.h" -extern void (*const gUnk_0812A494[])(Entity*); - extern u8 gEntCount; - bool32 sub_080AB12C(Entity* this); -void Projectile19(Entity* this) { +extern void (*const gUnk_0812A494[])(Entity*); +extern const u8 gUnk_0812A4A8[]; + +void BallAndChain(Entity* this) { gUnk_0812A494[this->type](this); } @@ -35,7 +35,7 @@ void sub_080AB074(Entity* this) { this->height.HALF.HI += (s8)parent->field_0x7c.BYTES.byte3; if (parent->field_0x7a.HALF.HI != 0) { - parent = sub_080A7EE0(0x19); + parent = CreateProjectile(0x19); if (parent != NULL) { parent->type = 4; CopyPositionAndSpriteOffset(this, parent); @@ -49,19 +49,19 @@ bool32 sub_080AB12C(Entity* this) { if (gEntCount > 0x44) { return FALSE; } - entity = sub_080A7EE0(0x19); + entity = CreateProjectile(0x19); entity->type = 1; entity->parent = this; - entity = sub_080A7EE0(0x19); + entity = CreateProjectile(0x19); entity->type = 2; entity->parent = this; - entity = sub_080A7EE0(0x19); + entity = CreateProjectile(0x19); entity->type = 3; entity->parent = this; return TRUE; } -ASM_FUNC("asm/non_matching/projectile19/sub_080AB170.inc", void sub_080AB170(Entity* this)) +ASM_FUNC("asm/non_matching/ballAndChain/sub_080AB170.inc", void sub_080AB170(Entity* this)) void sub_080AB26C(Entity* this) { if (this->action == 0) { @@ -78,3 +78,11 @@ void sub_080AB26C(Entity* this) { this->frameIndex += 1; } } + +void (*const gUnk_0812A494[])(Entity*) = { + sub_080AB074, sub_080AB170, sub_080AB170, sub_080AB170, sub_080AB26C, +}; +const u8 gUnk_0812A4A8[] = { + 6, 240, 10, 242, 10, 240, 8, 240, 252, 242, 248, 242, 252, 246, 4, 246, + 250, 242, 248, 240, 246, 242, 248, 244, 4, 242, 8, 242, 4, 246, 252, 246, +}; diff --git a/src/projectile/projectile2.c b/src/projectile/boneProjectile.c similarity index 65% rename from src/projectile/projectile2.c rename to src/projectile/boneProjectile.c index fa163358..61f60863 100644 --- a/src/projectile/projectile2.c +++ b/src/projectile/boneProjectile.c @@ -2,22 +2,21 @@ #include "enemy.h" #include "functions.h" -extern void (*const gUnk_0812960C[])(Entity*); - -extern void (*const gUnk_08129620[])(Entity*); - -void sub_080A82D8(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); extern void sub_08016AD2(Entity*); -void Projectile2(Entity* this) { - gUnk_0812960C[GetNextFunction(this)](this); +extern void (*const BoneProjectile_Functions[])(Entity*); +extern void (*const BoneProjectile_Actions[])(Entity*); + +void sub_080A82D8(Entity*); + +void BoneProjectile(Entity* this) { + BoneProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A81AC(Entity* this) { - gUnk_08129620[this->action](this); +void BoneProjectile_OnTick(Entity* this) { + BoneProjectile_Actions[this->action](this); } void sub_080A81C4(Entity* this) { @@ -28,14 +27,14 @@ void sub_080A81C4(Entity* this) { } } -void sub_080A81E0(Entity* this) { +void BoneProjectile_Init(Entity* this) { this->action = 1; this->actionDelay = 0x3c; this->height.HALF.HI = 0xfffe; InitializeAnimation(this, 0); } -void sub_080A81FC(Entity* this) { +void BoneProjectile_Action1(Entity* this) { GetNextFrame(this); sub_080AF090(this); if (this->collisions == 0) { @@ -53,7 +52,7 @@ void sub_080A81FC(Entity* this) { } } -void sub_080A8248(Entity* this) { +void BoneProjectile_Action2(Entity* this) { GetNextFrame(this); sub_080AF090(this); if (sub_08003FC4(this, 0x1800) == 0) { @@ -64,7 +63,7 @@ void sub_080A8248(Entity* this) { } } -void sub_080A827C(Entity* this) { +void BoneProjectile_Action3(Entity* this) { this->spriteSettings.b.draw ^= 1; sub_0806F69C(this); GetNextFrame(this); @@ -73,7 +72,7 @@ void sub_080A827C(Entity* this) { } } -void sub_080A82B4(Entity* this) { +void BoneProjectile_Action4(Entity* this) { GetNextFrame(this); sub_0806F69C(this); if (sub_08003FC4(this, 0x1800) == 0) { @@ -88,3 +87,10 @@ void sub_080A82D8(Entity* this) { this->direction ^= 0x10; this->speed = 0x80; } + +void (*const BoneProjectile_Functions[])(Entity*) = { + BoneProjectile_OnTick, sub_080A81C4, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const BoneProjectile_Actions[])(Entity*) = { + BoneProjectile_Init, BoneProjectile_Action1, BoneProjectile_Action2, BoneProjectile_Action3, BoneProjectile_Action4, +}; diff --git a/src/projectile/cannonballProjectile.c b/src/projectile/cannonballProjectile.c new file mode 100644 index 00000000..950b6159 --- /dev/null +++ b/src/projectile/cannonballProjectile.c @@ -0,0 +1,104 @@ +#include "entity.h" +#include "enemy.h" +#include "functions.h" + +extern void CreateItemOnGround(Entity*); +extern s32 sub_080AF090(Entity*); +extern void sub_080043A8(Entity*); +extern void CreateChestSpawner(Entity*); +extern u32 sub_080177A0(Entity*, Entity*); + +extern void (*const CannonballProjectile_Functions[])(Entity*); +extern void (*const CannonballProjectile_Actions[])(Entity*); + +bool32 sub_080AB5F4(Entity*); +bool32 sub_080AB634(Entity*); + +void CannonballProjectile(Entity* this) { + CannonballProjectile_Functions[GetNextFunction(this)](this); +} + +void CannonballProjectile_OnTick(Entity* this) { + CannonballProjectile_Actions[this->action](this); +} + +void sub_080AB544(Entity* this) { + u32 tmp; + + if (this->iframes < -4) { + this->action = 2; + this->direction = this->field_0x3e; + tmp = (this->type ^ 2) << 3; + if (this->direction - tmp + 1 < 3) { + this->direction = tmp; + } + this->speed = 0x280; + } +} + +void CannonballProjectile_Init(Entity* this) { + this->action = 1; + this->direction = this->type << 3; + this->height.HALF.HI = 0xfffc; + InitializeAnimation(this, this->type); +} + +void CannonballProjectile_Action1(Entity* this) { + GetNextFrame(this); + if (sub_080AF090(this) == 0) { + CreateFx(this, 2, 0); + DeleteThisEntity(); + } + sub_080AB5F4(this); +} + +void CannonballProjectile_Action2(Entity* this) { + GetNextFrame(this); + sub_080AF090(this); + if ((sub_080AB634(this) == 0) && (this->collisions != 0)) { + CreateFx(this, 2, 0); + DeleteThisEntity(); + } +} + +bool32 sub_080AB5F4(Entity* this) { + switch (sub_080043E8(this)) { + case 1: + CreateItemOnGround(this); + return TRUE; + case 2: + sub_080043A8(this); + return TRUE; + case 3: + CreateChestSpawner(this); + return TRUE; + } + return FALSE; +} + +bool32 sub_080AB634(Entity* this) { + Entity** entities = ((Entity**)&this->parent->field_0x20); + u32 i; + for (i = 0; i <= 3; ++i) { + if (entities[i] != NULL && (sub_080177A0(this, entities[i]) != 0)) { + if (entities[i]->action < 3) { + entities[i]->action = 3; + entities[i]->actionDelay = 0x1e; + entities[i]->spriteSettings.b.draw = 0; + CreateFx(entities[i], 0x45, 0); + } + DeleteEntity(this); + return TRUE; + } + } + return FALSE; +} + +void (*const CannonballProjectile_Functions[])(Entity*) = { + CannonballProjectile_OnTick, sub_080AB544, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const CannonballProjectile_Actions[])(Entity*) = { + CannonballProjectile_Init, + CannonballProjectile_Action1, + CannonballProjectile_Action2, +}; diff --git a/src/projectile/darkNutSwordSlash.c b/src/projectile/darkNutSwordSlash.c new file mode 100644 index 00000000..51123fc7 --- /dev/null +++ b/src/projectile/darkNutSwordSlash.c @@ -0,0 +1,188 @@ +#include "entity.h" +#include "player.h" +#include "coord.h" + +extern const u8 DarkNutSwordSlash_DamageTypes[]; +extern void (*const DarkNutSwordSlash_UpdatesForType[])(Entity*); +extern Hitbox const* const* const gUnk_081293E0[]; +extern const Hitbox* const gUnk_081293F0[]; +extern const Hitbox* const gUnk_08129400[]; +extern const Hitbox* const gUnk_08129410[]; +extern const Hitbox* const gUnk_08129420[]; + +void DarkNutSwordSlash_Init(Entity*); +void DarkNutSwordSlash_OnTick(Entity*); + +void DarkNutSwordSlash(Entity* this) { + if (this->action == 0) { + this->action = 1; + DarkNutSwordSlash_Init(this); + if (this->type == 3) { + InitAnimationForceUpdate(this, this->parent->animationState + 0x18); + } + } + if ((this->parent == NULL) || (this->parent->currentHealth == 0)) { + DeleteThisEntity(); + } + if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) { + this->iframes = -0x2d; + } + this->bitfield = 0; + CopyPositionAndSpriteOffset(this->parent, this); + DarkNutSwordSlash_OnTick(this); + if (this->type == 3) { + this->y.HALF.HI += 1; + UpdateAnimationSingleFrame(this); + } +} + +void DarkNutSwordSlash_Init(Entity* this) { + this->damageType = DarkNutSwordSlash_DamageTypes[this->parent->type + this->type * 4]; +} + +void DarkNutSwordSlash_OnTick(Entity* this) { + DarkNutSwordSlash_UpdatesForType[this->type](this); +} + +void DarkNutSwordSlash_UpdateType0(Entity* this) { + Entity* parent = this->parent; + this->hitbox = (Hitbox*)gUnk_081293E0[parent->animationState][(parent->frames.all & 0xf) - 1]; +} + +void DarkNutSwordSlash_UpdateType2(Entity* this) { + Entity* parent = this->parent; + this->hitbox = (Hitbox*)gUnk_081293F0[parent->animationState]; +} + +void DarkNutSwordSlash_UpdateType34(Entity* this) { + if ((this->parent->frames.all & 0x10) != 0) { + this->hitbox = (Hitbox*)gUnk_08129410[this->parent->animationState]; + } else { + this->hitbox = (Hitbox*)gUnk_08129400[this->parent->animationState]; + } +} + +void DarkNutSwordSlash_UpdateType1(Entity* this) { + Entity* parent = this->parent; + this->hitbox = (Hitbox*)gUnk_08129420[parent->animationState]; +} + +const u8 DarkNutSwordSlash_DamageTypes[] = { + 76, 76, 78, 77, 83, 83, 83, 83, 79, 79, 76, 80, 84, 84, 84, 85, 79, 79, 76, 80, +}; +void (*const DarkNutSwordSlash_UpdatesForType[])(Entity*) = { + DarkNutSwordSlash_UpdateType0, DarkNutSwordSlash_UpdateType1, DarkNutSwordSlash_UpdateType2, + DarkNutSwordSlash_UpdateType34, DarkNutSwordSlash_UpdateType34, +}; + +extern const Hitbox* const gUnk_08129460[]; +extern const Hitbox* const gUnk_081294A8[]; +extern const Hitbox* const gUnk_081294F0[]; +extern const Hitbox* const gUnk_08129538[]; +Hitbox const* const* const gUnk_081293E0[] = { + gUnk_08129460, + gUnk_081294A8, + gUnk_081294F0, + gUnk_08129538, +}; +extern const Hitbox gUnk_08129550; +extern const Hitbox gUnk_08129558; +extern const Hitbox gUnk_08129560; +extern const Hitbox gUnk_08129568; +const Hitbox* const gUnk_081293F0[] = { + &gUnk_08129550, + &gUnk_08129558, + &gUnk_08129560, + &gUnk_08129568, +}; +extern const Hitbox gUnk_08129590; +extern const Hitbox gUnk_081295A0; +extern const Hitbox gUnk_081295B0; +extern const Hitbox gUnk_081295C0; +const Hitbox* const gUnk_08129400[] = { + &gUnk_08129590, + &gUnk_081295A0, + &gUnk_081295B0, + &gUnk_081295C0, +}; +extern const Hitbox gUnk_08129598; +extern const Hitbox gUnk_081295A8; +extern const Hitbox gUnk_081295B8; +extern const Hitbox gUnk_081295C8; +const Hitbox* const gUnk_08129410[] = { + &gUnk_08129598, + &gUnk_081295A8, + &gUnk_081295B8, + &gUnk_081295C8, +}; +extern const Hitbox gUnk_08129570; +extern const Hitbox gUnk_08129578; +extern const Hitbox gUnk_08129580; +extern const Hitbox gUnk_08129588; +const Hitbox* const gUnk_08129420[] = { + &gUnk_08129570, + &gUnk_08129578, + &gUnk_08129580, + &gUnk_08129588, +}; + +const Hitbox gUnk_08129430 = { -5, -32, { 0, 0, 0, 0 }, 8, 10 }; +const Hitbox gUnk_08129438 = { 2, -37, { 0, 0, 0, 0 }, 8, 10 }; +const Hitbox gUnk_08129440 = { 19, -33, { 0, 0, 0, 0 }, 10, 11 }; +const Hitbox gUnk_08129448 = { 28, -14, { 0, 0, 0, 0 }, 16, 6 }; +const Hitbox gUnk_08129450 = { 34, -18, { 0, 0, 0, 0 }, 8, 4 }; +const Hitbox gUnk_08129458 = { 25, 15, { 0, 0, 0, 0 }, 4, 4 }; + +const Hitbox* const gUnk_08129460[] = { + &gUnk_08129430, &gUnk_08129438, &gUnk_08129440, &gUnk_08129448, &gUnk_08129450, &gUnk_08129458, +}; + +const Hitbox gUnk_08129478 = { 21, -6, { 0, 0, 0, 0 }, 12, 8 }; +const Hitbox gUnk_08129480 = { 21, -20, { 0, 0, 0, 0 }, 16, 8 }; +const Hitbox gUnk_08129488 = { 15, -31, { 0, 0, 0, 0 }, 8, 10 }; +const Hitbox gUnk_08129490 = { 3, -39, { 0, 0, 0, 0 }, 8, 12 }; +const Hitbox gUnk_08129498 = { 7, -38, { 0, 0, 0, 0 }, 7, 8 }; +const Hitbox gUnk_081294A0 = { 1, -29, { 0, 0, 0, 0 }, 4, 5 }; + +const Hitbox* const gUnk_081294A8[] = { + &gUnk_08129478, &gUnk_08129480, &gUnk_08129488, &gUnk_08129490, &gUnk_08129498, &gUnk_081294A0, +}; + +const Hitbox gUnk_081294C0 = { 7, 7, { 0, 0, 0, 0 }, 8, 11 }; +const Hitbox gUnk_081294C8 = { -6, 10, { 0, 0, 0, 0 }, 8, 12 }; +const Hitbox gUnk_081294D0 = { -22, 2, { 0, 0, 0, 0 }, 8, 8 }; +const Hitbox gUnk_081294D8 = { -27, -11, { 0, 0, 0, 0 }, 12, 8 }; +const Hitbox gUnk_081294E0 = { -28, -9, { 0, 0, 0, 0 }, 15, 6 }; +const Hitbox gUnk_081294E8 = { -21, -12, { 0, 0, 0, 0 }, 6, 2 }; + +const Hitbox* const gUnk_081294F0[] = { + &gUnk_081294C0, &gUnk_081294C8, &gUnk_081294D0, &gUnk_081294D8, &gUnk_081294E0, &gUnk_081294E8, +}; + +const Hitbox gUnk_08129508 = { -21, -6, { 0, 0, 0, 0 }, 12, 8 }; +const Hitbox gUnk_08129510 = { -21, -20, { 0, 0, 0, 0 }, 16, 8 }; +const Hitbox gUnk_08129518 = { -15, -31, { 0, 0, 0, 0 }, 8, 10 }; +const Hitbox gUnk_08129520 = { -3, -39, { 0, 0, 0, 0 }, 8, 12 }; +const Hitbox gUnk_08129528 = { -7, -38, { 0, 0, 0, 0 }, 7, 8 }; +const Hitbox gUnk_08129530 = { -1, -29, { 0, 0, 0, 0 }, 4, 5 }; + +const Hitbox* const gUnk_08129538[] = { + &gUnk_08129508, &gUnk_08129510, &gUnk_08129518, &gUnk_08129520, &gUnk_08129528, &gUnk_08129530, +}; + +const Hitbox gUnk_08129550 = { 3, -30, { 0, 0, 0, 0 }, 7, 10 }; +const Hitbox gUnk_08129558 = { 28, -12, { 0, 0, 0, 0 }, 14, 7 }; +const Hitbox gUnk_08129560 = { -2, 14, { 0, 0, 0, 0 }, 12, 7 }; +const Hitbox gUnk_08129568 = { -28, -12, { 0, 0, 0, 0 }, 14, 7 }; +const Hitbox gUnk_08129570 = { 1, -29, { 0, 0, 0, 0 }, 8, 8 }; +const Hitbox gUnk_08129578 = { 19, -8, { 0, 0, 0, 0 }, 8, 8 }; +const Hitbox gUnk_08129580 = { 0, 10, { 0, 0, 0, 0 }, 8, 8 }; +const Hitbox gUnk_08129588 = { -19, -8, { 0, 0, 0, 0 }, 8, 8 }; +const Hitbox gUnk_08129590 = { 4, -37, { 0, 0, 0, 0 }, 7, 10 }; +const Hitbox gUnk_08129598 = { 4, -35, { 0, 0, 0, 0 }, 2, 8 }; +const Hitbox gUnk_081295A0 = { 32, -14, { 0, 0, 0, 0 }, 14, 6 }; +const Hitbox gUnk_081295A8 = { 30, -14, { 0, 0, 0, 0 }, 12, 2 }; +const Hitbox gUnk_081295B0 = { -1, 22, { 0, 0, 0, 0 }, 7, 12 }; +const Hitbox gUnk_081295B8 = { -1, 20, { 0, 0, 0, 0 }, 2, 10 }; +const Hitbox gUnk_081295C0 = { -32, -14, { 0, 0, 0, 0 }, 14, 6 }; +const Hitbox gUnk_081295C8 = { -30, -14, { 0, 0, 0, 0 }, 12, 2 }; diff --git a/src/projectile/projectile4.c b/src/projectile/dekuSeedProjectile.c similarity index 77% rename from src/projectile/projectile4.c rename to src/projectile/dekuSeedProjectile.c index 7d58f00a..e17caa58 100644 --- a/src/projectile/projectile4.c +++ b/src/projectile/dekuSeedProjectile.c @@ -4,24 +4,23 @@ #include "audio.h" #include "flags.h" -extern void (*const gUnk_081296F0[])(Entity*); - -extern void (*const gUnk_08129704[])(Entity*); - -void sub_080A8680(Entity*); -void sub_080A86A0(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); extern void sub_08016AD2(Entity*); extern u32 sub_080177A0(Entity*, Entity*); -void Projectile4(Entity* this) { - gUnk_081296F0[GetNextFunction(this)](this); +extern void (*const DekuSeedProjectile_Functions[])(Entity*); +extern void (*const DekuSeedProjectile_Actions[])(Entity*); + +void sub_080A8680(Entity*); +void sub_080A86A0(Entity*); + +void DekuSeedProjectile(Entity* this) { + DekuSeedProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A8458(Entity* this) { - gUnk_08129704[this->action](this); +void DekuSeedProjectile_OnTick(Entity* this) { + DekuSeedProjectile_Actions[this->action](this); } void sub_080A8470(Entity* this) { @@ -41,7 +40,7 @@ void sub_080A8470(Entity* this) { } } -void sub_080A84C8(Entity* this) { +void DekuSeedProjectile_Init(Entity* this) { this->action = 1; this->actionDelay = 0x30; this->field_0xf = 0; @@ -53,7 +52,7 @@ void sub_080A84C8(Entity* this) { InitializeAnimation(this, 0x18); } -void sub_080A8504(Entity* this) { +void DekuSeedProjectile_Action1(Entity* this) { Entity* parent; GetNextFrame(this); @@ -88,7 +87,7 @@ void sub_080A8504(Entity* this) { } } -void sub_080A85B8(Entity* this) { +void DekuSeedProjectile_Action2(Entity* this) { GetNextFrame(this); if (sub_080AF090(this) != 0) { if (sub_080A7EB0(this) != 0) { @@ -106,14 +105,14 @@ void sub_080A85B8(Entity* this) { } } -void sub_080A8610(Entity* this) { +void DekuSeedProjectile_Action3(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteThisEntity(); } } -void sub_080A862C(Entity* this) { +void DekuSeedProjectile_Action4(Entity* this) { GetNextFrame(this); sub_080AF090(this); switch (sub_080044EC(this, 0x2800)) { @@ -145,3 +144,11 @@ void sub_080A86A0(Entity* this) { this->speed = 0; EnqueueSFX(SFX_18E); } + +void (*const DekuSeedProjectile_Functions[])(Entity*) = { + DekuSeedProjectile_OnTick, sub_080A8470, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const DekuSeedProjectile_Actions[])(Entity*) = { + DekuSeedProjectile_Init, DekuSeedProjectile_Action1, DekuSeedProjectile_Action2, + DekuSeedProjectile_Action3, DekuSeedProjectile_Action4, +}; diff --git a/src/projectile/projectile6.c b/src/projectile/dirtBallProjectile.c similarity index 78% rename from src/projectile/projectile6.c rename to src/projectile/dirtBallProjectile.c index 92c0b83e..fd2765e7 100644 --- a/src/projectile/projectile6.c +++ b/src/projectile/dirtBallProjectile.c @@ -4,19 +4,17 @@ #include "coord.h" #include "functions.h" -extern void (*const gUnk_08129740[])(Entity*); - -extern void (*const gUnk_08129754[])(Entity*); - -extern Hitbox gUnk_08129764; - extern void sub_08078954(Entity*); -void Projectile6(Entity* this) { - gUnk_08129740[GetNextFunction(this)](this); +extern void (*const DirtBallProjectile_Functions[])(Entity*); +extern void (*const DirtBallProjectile_Actions[])(Entity*); +extern const Hitbox3D gUnk_08129764; + +void DirtBallProjectile(Entity* this) { + DirtBallProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A87E4(Entity* this) { +void DirtBallProjectile_OnTick(Entity* this) { if (this->type == 1) { if (this->attachedEntity == NULL) { DeleteThisEntity(); @@ -25,7 +23,7 @@ void sub_080A87E4(Entity* this) { DeleteThisEntity(); } } - gUnk_08129754[this->action](this); + DirtBallProjectile_Actions[this->action](this); } void sub_080A881C(Entity* this) { @@ -45,12 +43,12 @@ void sub_080A881C(Entity* this) { } } -void sub_080A8868(Entity* this) { +void DirtBallProjectile_Init(Entity* this) { this->action = 1; this->subAction = 0; this->spriteSettings.b.shadow = 1; this->field_0x20 = 0x8000; - this->hitbox = &gUnk_08129764; + this->hitbox = (Hitbox*)&gUnk_08129764; this->field_0x3c |= 0x10; switch (this->type) { case 0: @@ -66,7 +64,7 @@ void sub_080A8868(Entity* this) { } } -void sub_080A88C8(Entity* this) { +void DirtBallProjectile_Action1(Entity* this) { Entity* entity; Entity* parent; @@ -106,7 +104,7 @@ void sub_080A88C8(Entity* this) { } } -void sub_080A8988(Entity* this) { +void DirtBallProjectile_Action2(Entity* this) { u8 bVar1; u32 uVar2; u32 tmp; @@ -160,9 +158,20 @@ void sub_080A8988(Entity* this) { } } -void sub_080A8A48(Entity* this) { +void DirtBallProjectile_Action3(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteEntity(this); } } + +void (*const DirtBallProjectile_Functions[])(Entity*) = { + DirtBallProjectile_OnTick, sub_080A881C, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const DirtBallProjectile_Actions[])(Entity*) = { + DirtBallProjectile_Init, + DirtBallProjectile_Action1, + DirtBallProjectile_Action2, + DirtBallProjectile_Action3, +}; +const Hitbox3D gUnk_08129764 = { 0, -3, { 5, 3, 3, 5 }, 6, 6, 10, { 0, 0, 0 } }; diff --git a/src/projectile/projectile8.c b/src/projectile/fireProjectile.c similarity index 74% rename from src/projectile/projectile8.c rename to src/projectile/fireProjectile.c index 08a5a555..0e32bede 100644 --- a/src/projectile/projectile8.c +++ b/src/projectile/fireProjectile.c @@ -4,20 +4,20 @@ #include "functions.h" #include "audio.h" -extern void (*const gUnk_0812982C[])(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); extern void sub_08016AD2(Entity*); -void Projectile8(Entity* this) { +extern void (*const FireProjectile_Actions[])(Entity*); + +void FireProjectile(Entity* this) { if (GetNextFunction(this) != 0) { DeleteThisEntity(); } - gUnk_0812982C[this->action](this); + FireProjectile_Actions[this->action](this); } -void sub_080A8BC0(Entity* this) { +void FireProjectile_Init(Entity* this) { if (this->type == 0) { this->action = 1; InitializeAnimation(this, this->direction >> 3); @@ -28,11 +28,9 @@ void sub_080A8BC0(Entity* this) { } } -void sub_080A8BF8(Entity* this) { +void FireProjectile_Action1(Entity* this) { u32 direction; - Entity* parent; - - parent = this->parent; + Entity* parent = this->parent; if (parent == NULL) { DeleteEntity(this); } else { @@ -53,7 +51,7 @@ void sub_080A8BF8(Entity* this) { } } -void sub_080A8C4C(Entity* this) { +void FireProjectile_Action2(Entity* this) { GetNextFrame(this); if (sub_080AF090(this) != 0) { if (sub_080A7EB0(this) != 0) { @@ -68,9 +66,16 @@ void sub_080A8C4C(Entity* this) { } } -void sub_080A8C8C(Entity* this) { +void FireProjectile_Action3(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteEntity(this); } } + +void (*const FireProjectile_Actions[])(Entity*) = { + FireProjectile_Init, + FireProjectile_Action1, + FireProjectile_Action2, + FireProjectile_Action3, +}; diff --git a/src/projectile/projectileA.c b/src/projectile/gleerokProjectile.c similarity index 77% rename from src/projectile/projectileA.c rename to src/projectile/gleerokProjectile.c index 1699a1a5..287b0013 100644 --- a/src/projectile/projectileA.c +++ b/src/projectile/gleerokProjectile.c @@ -6,33 +6,31 @@ #include "random.h" #include "audio.h" -extern void (*const gUnk_08129954[])(Entity*); - -extern void (*const gUnk_08129968[])(Entity*); - -void sub_080A90D8(Entity*); - extern void sub_0806F5BC(Entity*, u32, u32); extern u32 sub_080041DC(Entity*, u32, u32); -extern s8 gUnk_08129978[]; -extern s8 gUnk_08129980[]; -extern s8 gUnk_08129988[]; +extern void (*const GleerokProjectile_Functions[])(Entity*); +extern void (*const GleerokProjectile_Actions[])(Entity*); +extern const s8 gUnk_08129978[]; +extern const s8 gUnk_08129980[]; +extern const s8 gUnk_08129988[]; -void ProjectileA(Entity* this) { - gUnk_08129954[GetNextFunction(this)](this); +void sub_080A90D8(Entity*); + +void GleerokProjectile(Entity* this) { + GleerokProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A8DDC(Entity* this) { +void GleerokProjectile_OnTick(Entity* this) { if (((this->type != 3) && ((this->bitfield & 0x80) != 0)) && ((this->bitfield & 0x7f) != 0x1e)) { this->action = 3; this->flags &= 0x7f; InitializeAnimation(this, 0x53); } - gUnk_08129968[this->action](this); + GleerokProjectile_Actions[this->action](this); } -void sub_080A8E28(Entity* this) { +void GleerokProjectile_Init(Entity* this) { u32 uVar1; s32 iVar2; @@ -88,7 +86,7 @@ void sub_080A8E28(Entity* this) { } } -void sub_080A8FB8(Entity* this) { +void GleerokProjectile_Action1(Entity* this) { if (this->type == 3) { if (sub_08003FC4(this, 0x1800) == 0) { sub_08008790(this, 7); @@ -115,7 +113,7 @@ void sub_080A8FB8(Entity* this) { } } -void sub_080A9058(Entity* this) { +void GleerokProjectile_Action2(Entity* this) { GetNextFrame(this); if (this->type == 2) { if (--this->actionDelay == 0xff) { @@ -135,7 +133,7 @@ void sub_080A9058(Entity* this) { } } -void sub_080A90BC(Entity* this) { +void GleerokProjectile_Action3(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteThisEntity(); @@ -153,3 +151,16 @@ void sub_080A90D8(Entity* this) { } } } + +void (*const GleerokProjectile_Functions[])(Entity*) = { + GleerokProjectile_OnTick, GleerokProjectile_OnTick, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const GleerokProjectile_Actions[])(Entity*) = { + GleerokProjectile_Init, + GleerokProjectile_Action1, + GleerokProjectile_Action2, + GleerokProjectile_Action3, +}; +const s8 gUnk_08129978[] = { 80, 0, 0, 80, -96, 0, 0, -96 }; +const s8 gUnk_08129980[] = { 0, 16, -16, 0, 16, -16, 16, -16 }; +const s8 gUnk_08129988[] = { 0, -16, -32, -48, -64, -80, -96, -112, 0, 16, 32, 48, 64, 80, 96, 112 }; diff --git a/src/projectile/projectileC.c b/src/projectile/guardLineOfSight.c similarity index 87% rename from src/projectile/projectileC.c rename to src/projectile/guardLineOfSight.c index 8af3163a..9cbe3a22 100644 --- a/src/projectile/projectileC.c +++ b/src/projectile/guardLineOfSight.c @@ -3,13 +3,14 @@ #include "coord.h" #include "functions.h" -extern Hitbox gUnk_080FD1E4; extern u32 sub_080644C8(Entity*); -extern u8 gUnk_081299C8[]; extern bool32 sub_080AE4CC(Entity*, u32, u32, u32); extern Entity gUnk_02027EB4; +extern const Hitbox gUnk_080FD1E4; -void ProjectileC(Entity* this) { +extern const u8 gUnk_081299C8[]; + +void GuardLineOfSight(Entity* this) { Entity* entity; u8 tmp; @@ -31,7 +32,7 @@ void ProjectileC(Entity* this) { } else { if (sub_080644C8(this) != 0) { if (((this->actionDelay++) & 3) == 0) { - entity = sub_080A7EE0(0xc); + entity = CreateProjectile(0xc); if (entity != NULL) { entity->type = 1; tmp = this->parent->field_0x3e; @@ -48,7 +49,7 @@ void ProjectileC(Entity* this) { this->actionDelay = 0x12; this->spriteSettings.b.draw = 0; this->speed = 0x800; - this->hitbox = &gUnk_080FD1E4; + this->hitbox = (Hitbox*)&gUnk_080FD1E4; InitializeAnimation(this, 0); } if (this->bitfield == 0x80) { @@ -66,3 +67,7 @@ void ProjectileC(Entity* this) { } } } + +const u8 gUnk_081299C8[] = { + 0, 254, 0, 254, 0, 2, 0, 2, +}; diff --git a/src/projectile/projectile17.c b/src/projectile/guruguruBarProjectile.c similarity index 92% rename from src/projectile/projectile17.c rename to src/projectile/guruguruBarProjectile.c index 47a0cb1b..de504cf5 100644 --- a/src/projectile/projectile17.c +++ b/src/projectile/guruguruBarProjectile.c @@ -5,7 +5,7 @@ void sub_080AABB0(Entity*); -void Projectile17(Entity* this) { +void GuruguruBarProjectile(Entity* this) { if (this->action == 0) { this->action = 1; InitializeAnimation(this, 0); diff --git a/src/projectile/projectile23.c b/src/projectile/gyorgMaleEnergyProjectile.c similarity index 52% rename from src/projectile/projectile23.c rename to src/projectile/gyorgMaleEnergyProjectile.c index ae9edb41..56ff4307 100644 --- a/src/projectile/projectile23.c +++ b/src/projectile/gyorgMaleEnergyProjectile.c @@ -4,35 +4,34 @@ #include "player.h" #include "audio.h" -extern void (*const gUnk_0812A9D8[])(Entity*); - -extern void (*const gUnk_0812A9EC[])(Entity*); - -void sub_080AC954(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); -void Projectile23(Entity* this) { - gUnk_0812A9D8[GetNextFunction(this)](this); +extern void (*const GyorgMaleEnergyProjectile_Functions[])(Entity*); +extern void (*const GyorgMaleEnergyProjectile_Actions[])(Entity*); + +void GyorgMaleEnergyProjectile_Action1(Entity*); + +void GyorgMaleEnergyProjectile(Entity* this) { + GyorgMaleEnergyProjectile_Functions[GetNextFunction(this)](this); } -void sub_080AC8C4(Entity* this) { - gUnk_0812A9EC[this->action](this); +void GyorgMaleEnergyProjectile_OnTick(Entity* this) { + GyorgMaleEnergyProjectile_Actions[this->action](this); } -ASM_FUNC("asm/non_matching/projectile23/sub_080AC8DC.inc", void sub_080AC8DC(Entity* this)) +ASM_FUNC("asm/non_matching/gyorgMaleEnergyProjectile/sub_080AC8DC.inc", void sub_080AC8DC(Entity* this)) -void sub_080AC928(Entity* this) { +void GyorgMaleEnergyProjectile_Init(Entity* this) { this->action = 1; this->actionDelay = 0x3c; this->collisionLayer = 2; UpdateSpriteForCollisionLayer(this); InitializeAnimation(this, 0); - sub_080AC954(this); + GyorgMaleEnergyProjectile_Action1(this); } -void sub_080AC954(Entity* this) { +void GyorgMaleEnergyProjectile_Action1(Entity* this) { u32 animationState; if (this->parent->next == NULL) { @@ -50,7 +49,7 @@ void sub_080AC954(Entity* this) { } } -void sub_080AC9CC(Entity* this) { +void GyorgMaleEnergyProjectile_Action2(Entity* this) { sub_080AF090(this); GetNextFrame(this); if (sub_080A7EB0(this) != 0) { @@ -64,10 +63,20 @@ void sub_080AC9CC(Entity* this) { } } -void sub_080ACA14(Entity* this) { +void GyorgMaleEnergyProjectile_Action3(Entity* this) { sub_080AF090(this); GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteThisEntity(); } } + +void (*const GyorgMaleEnergyProjectile_Functions[])(Entity*) = { + GyorgMaleEnergyProjectile_OnTick, sub_080AC8DC, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const GyorgMaleEnergyProjectile_Actions[])(Entity*) = { + GyorgMaleEnergyProjectile_Init, + GyorgMaleEnergyProjectile_Action1, + GyorgMaleEnergyProjectile_Action2, + GyorgMaleEnergyProjectile_Action3, +}; diff --git a/src/projectile/projectile22.c b/src/projectile/gyorgTail.c similarity index 80% rename from src/projectile/projectile22.c rename to src/projectile/gyorgTail.c index bbc4fc58..d75a8123 100644 --- a/src/projectile/projectile22.c +++ b/src/projectile/gyorgTail.c @@ -4,27 +4,25 @@ #include "audio.h" #include "functions.h" -extern void (*const gUnk_0812A9A8[])(Entity*); - -extern u16 gUnk_0812A9B4[]; -bool32 sub_080AC5E4(Entity*); -void sub_080AC388(Entity*); - -extern u8 gUnk_0812A9BA[]; +extern u8 gEntCount; extern Hitbox gUnk_080FD458; - extern Hitbox gUnk_080FD168; extern Hitbox gUnk_080FD448; extern void (*const gUnk_0812A994[])(Entity*); +extern void (*const GyorgTail_Actions[])(Entity*); +extern const s16 gUnk_0812A9B4[]; +extern const u8 gUnk_0812A9B8[]; +extern const u8 gUnk_0812A9BA[]; +extern const u8 gUnk_0812A9C0[]; +bool32 sub_080AC5E4(Entity*); +void sub_080AC388(Entity*); void sub_080AC6F0(Entity*); void sub_080AC760(Entity*); void sub_080AC7C4(Entity*); -extern u8 gEntCount; - -void Projectile22(Entity* this) { +void GyorgTail(Entity* this) { Entity* parent; if (this->parent->next == NULL) { @@ -50,10 +48,10 @@ void Projectile22(Entity* this) { } void sub_080AC328(Entity* this) { - gUnk_0812A9A8[this->action](this); + GyorgTail_Actions[this->action](this); } -void sub_080AC340(Entity* this) { +void GyorgTail_Init(Entity* this) { if (sub_080AC5E4(this) != 0) { this->action = 1; this->frameIndex = 0xc; @@ -64,7 +62,7 @@ void sub_080AC340(Entity* this) { } } -ASM_FUNC("asm/non_matching/projectile22/sub_080AC388.inc", void sub_080AC388(Entity* this)) +ASM_FUNC("asm/non_matching/gyorgTail/sub_080AC388.inc", void sub_080AC388(Entity* this)) void sub_080AC480(Entity* this) { if (this->actionDelay != 0) { @@ -126,7 +124,7 @@ void sub_080AC560(Entity* this) { this->y.WORD = entity->y.WORD - gSineTable[entity->direction + 0x40] * factor; } -NONMATCH("asm/non_matching/projectile22/sub_080AC5E4.inc", bool32 sub_080AC5E4(Entity* this)) { +NONMATCH("asm/non_matching/gyorgTail/sub_080AC5E4.inc", bool32 sub_080AC5E4(Entity* this)) { // TODO regalloc Entity* entity; Entity* entity2; @@ -139,20 +137,20 @@ NONMATCH("asm/non_matching/projectile22/sub_080AC5E4.inc", bool32 sub_080AC5E4(E return 0; } this->field_0x78.HALF.HI = 0x11; - entity = sub_080A7EE0(0x22); + entity = CreateProjectile(0x22); entity->type = this->type; entity->type2 = 1; entity->parent = this->parent; entity->field_0x78.HALF.HI = 0x12; this->attachedEntity = entity; - entity2 = sub_080A7EE0(0x22); + entity2 = CreateProjectile(0x22); entity2->type = this->type; entity2->type2 = 2; entity2->parent = this->parent; entity2->field_0x78.HALF.HI = 0x14; uVar3 = entity2->field_0x78.HALF.HI; entity->attachedEntity = entity2; - entity3 = sub_080A7EE0(0x22); + entity3 = CreateProjectile(0x22); entity3->type = this->type; entity3->type2 = 3; entity3->parent = this->parent; @@ -164,14 +162,14 @@ NONMATCH("asm/non_matching/projectile22/sub_080AC5E4.inc", bool32 sub_080AC5E4(E return 0; } this->field_0x78.HALF.HI = 0xf; - entity = sub_080A7EE0(0x22); + entity = CreateProjectile(0x22); entity->type = this->type; entity->type2 = 1; entity->parent = this->parent; entity->field_0x78.HALF.HI = 0x10; uVar3 = entity->field_0x78.HALF.HI; this->attachedEntity = entity; - entity2 = sub_080A7EE0(0x22); + entity2 = CreateProjectile(0x22); entity2->type = this->type; entity2->type2 = 2; entity2->parent = this->parent; @@ -179,7 +177,7 @@ NONMATCH("asm/non_matching/projectile22/sub_080AC5E4.inc", bool32 sub_080AC5E4(E entity2->field_0x78.HALF.HI = 0x20; entity->attachedEntity = entity2; } - entity4 = sub_080A7EE0(0x22); + entity4 = CreateProjectile(0x22); entity4->type = this->type; entity4->type2 = 4; entity4->parent = this->parent; @@ -189,11 +187,11 @@ NONMATCH("asm/non_matching/projectile22/sub_080AC5E4.inc", bool32 sub_080AC5E4(E } END_NONMATCH -ASM_FUNC("asm/non_matching/projectile22/sub_080AC6F0.inc", void sub_080AC6F0(Entity* this)) +ASM_FUNC("asm/non_matching/gyorgTail/sub_080AC6F0.inc", void sub_080AC6F0(Entity* this)) -ASM_FUNC("asm/non_matching/projectile22/sub_080AC760.inc", void sub_080AC760(Entity* this)) +ASM_FUNC("asm/non_matching/gyorgTail/sub_080AC760.inc", void sub_080AC760(Entity* this)) -NONMATCH("asm/non_matching/projectile22/sub_080AC7C4.inc", void sub_080AC7C4(Entity* this)) { +NONMATCH("asm/non_matching/gyorgTail/sub_080AC7C4.inc", void sub_080AC7C4(Entity* this)) { // TODO regalloc Entity* entity1; Entity* entity2; @@ -227,3 +225,16 @@ void sub_080AC884(Entity* this) { this->field_0xf = 0x56; } } + +void (*const gUnk_0812A994[])(Entity*) = { + sub_080AC328, sub_080AC510, sub_080AC510, sub_080AC510, sub_080AC560, +}; +void (*const GyorgTail_Actions[])(Entity*) = { + GyorgTail_Init, + sub_080AC388, + sub_080AC480, +}; +const s16 gUnk_0812A9B4[] = { -64, 64 }; +const u8 gUnk_0812A9B8[] = { 24, 20 }; +const u8 gUnk_0812A9BA[] = { 24, 25, 25, 24, 24, 24 }; +const u8 gUnk_0812A9C0[] = { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; diff --git a/src/projectile/projectile9.c b/src/projectile/iceProjectile.c similarity index 77% rename from src/projectile/projectile9.c rename to src/projectile/iceProjectile.c index dfb8e213..0cd93e21 100644 --- a/src/projectile/projectile9.c +++ b/src/projectile/iceProjectile.c @@ -4,20 +4,20 @@ #include "functions.h" #include "audio.h" -extern void (*const gUnk_081298B8[])(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); extern void sub_08016AD2(Entity*); -void Projectile9(Entity* this) { +extern void (*const IceProjectile_Actions[])(Entity*); + +void IceProjectile(Entity* this) { if (GetNextFunction(this) != 0) { DeleteThisEntity(); } - gUnk_081298B8[this->action](this); + IceProjectile_Actions[this->action](this); } -void sub_080A8CD4(Entity* this) { +void IceProjectile_Init(Entity* this) { if (this->type == 0) { this->action = 1; InitializeAnimation(this, this->direction >> 3); @@ -28,7 +28,7 @@ void sub_080A8CD4(Entity* this) { } } -void sub_080A8D0C(Entity* this) { +void IceProjectile_Action1(Entity* this) { u32 direction; Entity* parent; @@ -53,7 +53,7 @@ void sub_080A8D0C(Entity* this) { } } -void sub_080A8D60(Entity* this) { +void IceProjectile_Action2(Entity* this) { GetNextFrame(this); if (sub_080AF090(this) != 0) { if (sub_080A7EB0(this) != 0) { @@ -68,9 +68,16 @@ void sub_080A8D60(Entity* this) { } } -void sub_080A8DA0(Entity* this) { +void IceProjectile_Action3(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteEntity(this); } } + +void (*const IceProjectile_Actions[])(Entity*) = { + IceProjectile_Init, + IceProjectile_Action1, + IceProjectile_Action2, + IceProjectile_Action3, +}; diff --git a/src/projectile/keatonDagger.c b/src/projectile/keatonDagger.c new file mode 100644 index 00000000..b7a876e0 --- /dev/null +++ b/src/projectile/keatonDagger.c @@ -0,0 +1,45 @@ +#include "entity.h" +#include "player.h" +#include "coord.h" + +extern void sub_0803C0AC(Entity*); + +extern const Hitbox* const gUnk_08129998[]; + +void KeatonDagger(Entity* this) { + Entity* parent; + + if (this->action == 0) { + this->action = 1; + } + parent = this->parent; + if (((parent == NULL) || (parent->currentHealth == 0)) || (parent->next == NULL)) { + if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) { + sub_0803C0AC(this); + } + DeleteEntity(this); + } else { + this->hitbox = (Hitbox*)gUnk_08129998[parent->animationState]; + CopyPosition(parent, this); + if ((parent->iframes != 0) && (this->iframes == 0)) { + this->iframes = 0xff; + } + } +} + +extern const Hitbox gUnk_081299A8; +extern const Hitbox gUnk_081299B0; +extern const Hitbox gUnk_081299B8; +extern const Hitbox gUnk_081299C0; + +const Hitbox* const gUnk_08129998[] = { + &gUnk_081299A8, + &gUnk_081299B0, + &gUnk_081299B8, + &gUnk_081299C0, +}; + +const Hitbox gUnk_081299A8 = { 4, -16, { 0, 0, 0, 0 }, 2, 3 }; +const Hitbox gUnk_081299B0 = { 9, -2, { 0, 0, 0, 0 }, 3, 2 }; +const Hitbox gUnk_081299B8 = { -4, 1, { 0, 0, 0, 0 }, 2, 3 }; +const Hitbox gUnk_081299C0 = { -9, -2, { 0, 0, 0, 0 }, 3, 3 }; diff --git a/src/projectile/lakituCloudProjectile.c b/src/projectile/lakituCloudProjectile.c new file mode 100644 index 00000000..76ac9ea5 --- /dev/null +++ b/src/projectile/lakituCloudProjectile.c @@ -0,0 +1,77 @@ +#include "entity.h" +#include "enemy.h" +#include "functions.h" +#include "player.h" + +extern void sub_0800449C(Entity*, u32); +extern void sub_08079D84(void); + +extern void (*const LakituCloudProjectile_Functions[])(Entity*); +extern void (*const LakituCloudProjectile_Actions[])(Entity*); +extern void (*const LakituCloudProjectile_SubActions[])(Entity*); + +void LakituCloudProjectile(Entity* this) { + if (this->parent->next == NULL) { + DeleteThisEntity(); + } + LakituCloudProjectile_Functions[GetNextFunction(this)](this); +} + +void LakituCloudProjectile_OnTick(Entity* this) { + LakituCloudProjectile_Actions[this->action](this); +} + +void nullsub_539(Entity* this) { +} + +void sub_080A9CF0(Entity* this) { + if (sub_0806F520() == 0) { + CreateFx(this, 2, 0); + DeleteThisEntity(); + } + LakituCloudProjectile_SubActions[this->subAction](this); +} + +void LakituCloudProjectile_SubAction0(Entity* this) { + this->subAction = 2; +} + +void LakituCloudProjectile_SubAction1(Entity* this) { +} + +void LakituCloudProjectile_SubAction2(Entity* this) { + if (sub_0806F3E4(this) != 0) { + if (this->damageType == 0xa6) { + ModHealth(-2); + sub_0800449C(&gPlayerEntity, 0x7a); + sub_08079D84(); + } + CreateFx(this, 2, 0); + DeleteThisEntity(); + } +} + +void LakituCloudProjectile_Init(Entity* this) { + this->action = 1; + this->animationState = this->parent->animationState; + InitAnimationForceUpdate(this, this->animationState); +} + +void LakituCloudProjectile_Action1(Entity* this) { + PositionRelative(this->parent, this, 0, -0x10000); + this->height.HALF.HI = 0xfffe; + UpdateAnimationSingleFrame(this); +} + +void (*const LakituCloudProjectile_Functions[])(Entity*) = { + LakituCloudProjectile_OnTick, nullsub_539, DeleteEntity, DeleteEntity, DeleteEntity, sub_080A9CF0, +}; +void (*const LakituCloudProjectile_Actions[])(Entity*) = { + LakituCloudProjectile_Init, + LakituCloudProjectile_Action1, +}; +void (*const LakituCloudProjectile_SubActions[])(Entity*) = { + LakituCloudProjectile_SubAction0, + LakituCloudProjectile_SubAction1, + LakituCloudProjectile_SubAction2, +}; diff --git a/src/projectile/lakituLightning.c b/src/projectile/lakituLightning.c new file mode 100644 index 00000000..8d055ba6 --- /dev/null +++ b/src/projectile/lakituLightning.c @@ -0,0 +1,52 @@ +#include "entity.h" +#include "enemy.h" + +extern s32 sub_080AF090(Entity*); +extern s32 sub_080A7EB0(Entity*); + +extern void (*const LakituLightning_Functions[])(Entity*); +extern void (*const LakituLightning_Actions[])(Entity*); + +void LakituLightning_OnTick(Entity*); + +void LakituLightning(Entity* this) { + LakituLightning_Functions[GetNextFunction(this)](this); +} + +void LakituLightning_OnTick(Entity* this) { + LakituLightning_Actions[this->action](this); +} + +void sub_080A9DD8(Entity* this) { + if ((this->currentHealth == 0) || (this->bitfield == 0x80)) { + DeleteThisEntity(); + } + LakituLightning_OnTick(this); +} + +void LakituLightning_Init(Entity* this) { + this->action = 1; + this->actionDelay = 0xb4; + this->currentHealth = 1; + InitializeAnimation(this, 0); +} + +void LakituLightning_Action1(Entity* this) { + GetNextFrame(this); + sub_080AF090(this); + if ((this->collisions != 0) || (--this->actionDelay == 0)) { + CreateFx(this, 0x4f, 0); + DeleteThisEntity(); + } + if (sub_080A7EB0(this) != 0) { + DeleteThisEntity(); + } +} + +void (*const LakituLightning_Functions[])(Entity*) = { + LakituLightning_OnTick, sub_080A9DD8, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const LakituLightning_Actions[])(Entity*) = { + LakituLightning_Init, + LakituLightning_Action1, +}; diff --git a/src/projectile/projectile13.c b/src/projectile/mandiblesProjectile.c similarity index 78% rename from src/projectile/projectile13.c rename to src/projectile/mandiblesProjectile.c index fc8e06a2..0ab5c3ad 100644 --- a/src/projectile/projectile13.c +++ b/src/projectile/mandiblesProjectile.c @@ -6,51 +6,42 @@ #include "random.h" #include "game.h" -extern void (*const gUnk_08129C7C[])(Entity*); +extern Entity* sub_08049DF4(u32); +extern u32 sub_08049F1C(Entity*, Entity*, u32); +extern s32 sub_080AF090(Entity*); +extern u32 sub_0806F824(Entity*, Entity*, u32, u32); +extern Hitbox gUnk_080FD150; + +extern void (*const MandiblesProjectile_Functions[])(Entity*); +extern void (*const MandiblesProjectile_Actions[])(Entity*); +extern const u8 gUnk_08129CA4[]; +extern const Hitbox* const gUnk_08129CF4[]; +extern const u8 gUnk_08129CAC[]; +extern const s8 gUnk_08129D14[]; -extern void (*const gUnk_08129C90[])(Entity*); void sub_080AA1D8(Entity*); - void sub_080AA270(Entity*); - bool32 sub_080AA2E0(Entity*); void sub_080AA320(Entity*); - void sub_080AA3E0(Entity*, u32); bool32 sub_080AA374(Entity*); -extern u8 gUnk_08129CA4[]; -extern Hitbox* gUnk_08129CF4[]; -extern u8 gUnk_08129CAC[]; - -extern Entity* sub_08049DF4(u32); -extern u32 sub_08049F1C(Entity*, Entity*, u32); - -extern s32 sub_080AF090(Entity*); - -extern Hitbox gUnk_080FD150; - -extern s8 gUnk_08129D14[]; -extern u32 sub_0806F824(Entity*, Entity*, u32, u32); - -void Projectile13(Entity* this) { - Entity* entity; - - entity = this->attachedEntity; +void MandiblesProjectile(Entity* this) { + Entity* entity = this->attachedEntity; if (entity == NULL) { entity = this->parent; } if ((entity->field_0x43 == 0) && ((this->flags & 0x80) == 0)) { this->flags |= 0x80; } - gUnk_08129C7C[GetNextFunction(this)](this); + MandiblesProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A9E94(Entity* this) { +void MandiblesProjectile_OnTick(Entity* this) { if (this->action < 3) { sub_080AA1D8(this); } - gUnk_08129C90[this->action](this); + MandiblesProjectile_Actions[this->action](this); } void sub_080A9EBC(Entity* this) { @@ -86,7 +77,7 @@ void sub_080A9EBC(Entity* this) { } } -void sub_080A9F50(Entity* this) { +void MandiblesProjectile_Init(Entity* this) { this->action = 1; this->field_0x80.HWORD = 0; this->animationState = 0xff; @@ -96,7 +87,7 @@ void sub_080A9F50(Entity* this) { sub_080AA270(this); } -void sub_080A9F90(Entity* this) { +void MandiblesProjectile_Action1(Entity* this) { if (this->field_0x80.HWORD != 0) { this->field_0x80.HWORD -= 1; } else { @@ -111,7 +102,7 @@ void sub_080A9F90(Entity* this) { UpdateAnimationSingleFrame(this); } -void sub_080A9FD0(Entity* this) { +void MandiblesProjectile_Action2(Entity* this) { UpdateAnimationSingleFrame(this); if ((this->frames.all & 0x40) != 0) { this->frames.all &= 0xbf; @@ -124,9 +115,9 @@ void sub_080A9FD0(Entity* this) { } #ifdef EU -ASM_FUNC("asm/non_matching/eu/sub_080AA044.inc", void sub_080AA044(Entity* this)) +ASM_FUNC("asm/non_matching/eu/MandiblesProjectile_Action3.inc", void MandiblesProjectile_Action3(Entity* this)) #else -void sub_080AA044(Entity* this) { +void MandiblesProjectile_Action3(Entity* this) { u32 uVar1; s8* tmp; Entity* entity; @@ -168,7 +159,7 @@ void sub_080AA044(Entity* this) { } #endif -void sub_080AA110(Entity* this) { +void MandiblesProjectile_Action4(Entity* this) { s32 iVar1; u32 uVar2; Entity* entity; @@ -254,13 +245,13 @@ void sub_080AA270(Entity* this) { animationState = parent->animationState; if (this->animationState == 0xff) { this->animationState = animationState; - this->hitbox = gUnk_08129CF4[animationState]; + this->hitbox = (Hitbox*)gUnk_08129CF4[animationState]; sub_080AA3E0(this, 0); } else { animationState = (gUnk_08129CAC[Random() & 7] + animationState) & 7; if (animationState != this->animationState) { this->animationState = animationState; - this->hitbox = gUnk_08129CF4[animationState]; + this->hitbox = (Hitbox*)gUnk_08129CF4[animationState]; sub_080AA3E0(this, 0); } } @@ -286,7 +277,7 @@ bool32 sub_080AA2E0(Entity* this) { return TRUE; } -NONMATCH("asm/non_matching/projectile13/sub_080AA320.inc", void sub_080AA320(Entity* this)) { +NONMATCH("asm/non_matching/mandiblesProjectile/sub_080AA320.inc", void sub_080AA320(Entity* this)) { u32 uVar2; Entity* parent; @@ -308,7 +299,7 @@ NONMATCH("asm/non_matching/projectile13/sub_080AA320.inc", void sub_080AA320(Ent } END_NONMATCH -NONMATCH("asm/non_matching/projectile13/sub_080AA374.inc", bool32 sub_080AA374(Entity* this)) { +NONMATCH("asm/non_matching/mandiblesProjectile/sub_080AA374.inc", bool32 sub_080AA374(Entity* this)) { u32 uVar1; u32 animationState; Entity* entity; @@ -340,3 +331,28 @@ void sub_080AA3E0(Entity* this, u32 param) { } InitAnimationForceUpdate(this, tmp); } + +void (*const MandiblesProjectile_Functions[])(Entity*) = { + MandiblesProjectile_OnTick, sub_080A9EBC, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const MandiblesProjectile_Actions[])(Entity*) = { + MandiblesProjectile_Init, MandiblesProjectile_Action1, MandiblesProjectile_Action2, + MandiblesProjectile_Action3, MandiblesProjectile_Action4, +}; +const u8 gUnk_08129CA4[] = { 24, 36, 52, 32, 60, 28, 44, 40 }; +const u8 gUnk_08129CAC[] = { + 1, 0, 7, 1, 0, 7, 0, 0, +}; +const Hitbox gUnk_08129CB4 = { 0, -4, { 5, 5, 3, 7 }, 6, 8 }; +const Hitbox gUnk_08129CBC = { 3, -3, { 5, 3, 3, 5 }, 6, 6 }; +const Hitbox gUnk_08129CC4 = { 4, 0, { 7, 3, 5, 5 }, 8, 6 }; +const Hitbox gUnk_08129CCC = { 3, 3, { 5, 3, 3, 5 }, 6, 6 }; +const Hitbox gUnk_08129CD4 = { 0, 4, { 5, 5, 3, 7 }, 6, 8 }; +const Hitbox gUnk_08129CDC = { -3, 3, { 5, 3, 3, 5 }, 6, 6 }; +const Hitbox gUnk_08129CE4 = { -4, 0, { 7, 3, 5, 5 }, 8, 6 }; +const Hitbox gUnk_08129CEC = { -3, -3, { 5, 3, 3, 5 }, 6, 6 }; +const Hitbox* const gUnk_08129CF4[] = { + &gUnk_08129CB4, &gUnk_08129CBC, &gUnk_08129CC4, &gUnk_08129CCC, + &gUnk_08129CD4, &gUnk_08129CDC, &gUnk_08129CE4, &gUnk_08129CEC, +}; +const s8 gUnk_08129D14[] = { 0, -16, 6, -10, 0, 4, -6, -10 }; diff --git a/src/projectile/projectileE.c b/src/projectile/mazaalEnergyBeam.c similarity index 66% rename from src/projectile/projectileE.c rename to src/projectile/mazaalEnergyBeam.c index cc5745e5..4fe557b0 100644 --- a/src/projectile/projectileE.c +++ b/src/projectile/mazaalEnergyBeam.c @@ -2,13 +2,13 @@ #include "audio.h" #include "coord.h" -extern void (*const gUnk_08129A64[])(Entity*); +extern void (*const MazaalEnergyBeam_Actions[])(Entity*); -void ProjectileE(Entity* this) { - gUnk_08129A64[this->action](this); +void MazaalEnergyBeam(Entity* this) { + MazaalEnergyBeam_Actions[this->action](this); } -void sub_080A9518(Entity* this) { +void MazaalEnergyBeam_Init(Entity* this) { this->action = 1; this->actionDelay = 10; this->height.HALF.HI -= 2; @@ -17,7 +17,7 @@ void sub_080A9518(Entity* this) { SoundReq(SFX_149); } -void sub_080A9540(Entity* this) { +void MazaalEnergyBeam_Action1(Entity* this) { const s16* tmp; if (--this->actionDelay == 0) { @@ -38,9 +38,15 @@ void sub_080A9540(Entity* this) { } } -void sub_080A95BC(Entity* this) { +void MazaalEnergyBeam_Action2(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteEntity(this); } } + +void (*const MazaalEnergyBeam_Actions[])(Entity*) = { + MazaalEnergyBeam_Init, + MazaalEnergyBeam_Action1, + MazaalEnergyBeam_Action2, +}; diff --git a/src/projectile/projectile3.c b/src/projectile/moblinSpear.c similarity index 50% rename from src/projectile/projectile3.c rename to src/projectile/moblinSpear.c index b1f86734..a4123e20 100644 --- a/src/projectile/projectile3.c +++ b/src/projectile/moblinSpear.c @@ -1,27 +1,25 @@ #include "entity.h" #include "enemy.h" -extern void (*const gUnk_08129650[])(Entity*); - -extern void (*const gUnk_08129664[])(Entity*); - extern bool32 AllocMutableHitbox(Entity*); - typedef struct { - u8 offsetX; - u8 offsetY; + s8 offsetX; + s8 offsetY; u8 width; u8 height; -} Test; +} HitboxChange; -extern Test gUnk_0812966C[]; +extern void (*const MoblinSpear_Functions[])(Entity*); +extern void (*const MoblinSpear_Actions[])(Entity*); -void Projectile3(Entity* this) { - gUnk_08129650[GetNextFunction(this)](this); +extern const HitboxChange gUnk_0812966C[]; + +void MoblinSpear(Entity* this) { + MoblinSpear_Functions[GetNextFunction(this)](this); } -void sub_080A8314(Entity* this) { - gUnk_08129664[this->action](this); +void MoblinSpear_OnTick(Entity* this) { + MoblinSpear_Actions[this->action](this); } void sub_080A832C(Entity* this) { @@ -45,17 +43,17 @@ void sub_080A832C(Entity* this) { this->field_0x42 = 0; } -void sub_080A83A0(Entity* this) { +void MoblinSpear_Init(Entity* this) { if (AllocMutableHitbox(this) != 0) { this->action = 1; } } -NONMATCH("asm/non_matching/projectile3/sub_080A83B4.inc", void sub_080A83B4(Entity* this)) { +NONMATCH("asm/non_matching/moblinSpear/MoblinSpear_Action1.inc", void MoblinSpear_Action1(Entity* this)) { u8 frames; Entity* parent; u32 tmp; - Test* a; + const HitboxChange* a; parent = this->parent; if (parent == NULL) { @@ -67,7 +65,7 @@ NONMATCH("asm/non_matching/projectile3/sub_080A83B4.inc", void sub_080A83B4(Enti frames = parent->frames.all * 4; a = &gUnk_0812966C[frames / 4]; this->hitbox->offset_x = a->offsetX; - // TODO offset used to increate a pointer is already increated here? + // TODO offset used to increase a pointer is already increated here? if (parent->frameSpriteSettings == 0x40) { this->hitbox->offset_x = -this->hitbox->offset_x; } @@ -85,3 +83,20 @@ NONMATCH("asm/non_matching/projectile3/sub_080A83B4.inc", void sub_080A83B4(Enti } } END_NONMATCH + +void (*const MoblinSpear_Functions[])(Entity*) = { + MoblinSpear_OnTick, sub_080A832C, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const MoblinSpear_Actions[])(Entity*) = { + MoblinSpear_Init, + MoblinSpear_Action1, +}; + +const HitboxChange gUnk_0812966C[] = { + { 6, 11, 2, 4 }, { -12, 2, 3, 3 }, { -13, -15, 1, 2 }, { 5, 12, 1, 3 }, { 7, 10, 1, 2 }, { 8, 9, 1, 3 }, + { 7, 10, 1, 2 }, { -22, 1, 4, 2 }, { -12, 1, 3, 2 }, { -6, 2, 4, 2 }, { -12, 1, 3, 2 }, { -1, -19, 1, 1 }, + { -4, -19, 1, 1 }, { -4, -20, 1, 1 }, { -4, -19, 1, 1 }, { 6, 9, 1, 2 }, { 6, 10, 1, 2 }, { 6, 9, 1, 2 }, + { 6, 10, 1, 2 }, { -29, -11, 3, 2 }, { -29, -9, 3, 2 }, { -29, -11, 3, 2 }, { -29, -9, 3, 2 }, { -5, -25, 1, 2 }, + { -5, -24, 1, 2 }, { -5, -25, 1, 2 }, { -5, -24, 1, 2 }, { 7, 12, 1, 2 }, { 7, 11, 1, 2 }, { -12, 3, 3, 1 }, + { -12, 2, 3, 1 }, { -13, -16, 1, 2 }, { -13, -15, 1, 2 }, +}; diff --git a/src/projectile/projectileF.c b/src/projectile/octorokBossProjectile.c similarity index 80% rename from src/projectile/projectileF.c rename to src/projectile/octorokBossProjectile.c index 5f9ce5a4..e927283e 100644 --- a/src/projectile/projectileF.c +++ b/src/projectile/octorokBossProjectile.c @@ -4,25 +4,23 @@ #include "functions.h" #include "audio.h" -extern void (*const gUnk_08129ABC[])(Entity*); - -extern void (*const gUnk_08129AD0[])(Entity*); - -void sub_080A99F0(Entity*); +void OctorokBossProjectile_Action2(Entity*); extern void sub_080AE58C(Entity*, u32, u32); extern u32 sub_0806FC80(Entity*, Entity*, s32); -extern u8 gUnk_08129ADC[]; +extern void (*const OctorokBossProjectile_Functions[])(Entity*); +extern void (*const OctorokBossProjectile_Actions[])(Entity*); +extern const u8 gUnk_08129ADC[]; -void ProjectileF(Entity* this) { - gUnk_08129ABC[GetNextFunction(this)](this); +void OctorokBossProjectile(Entity* this) { + OctorokBossProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A95F8(Entity* this) { - gUnk_08129AD0[this->action](this); +void OctorokBossProjectile_OnTick(Entity* this) { + OctorokBossProjectile_Actions[this->action](this); } -void sub_080A9610(Entity* this) { +void OctorokBossProjectile_Init(Entity* this) { u32 uVar1; u32 uVar2; @@ -74,7 +72,7 @@ void sub_080A9610(Entity* this) { SoundReq(SFX_1B5); } -void sub_080A976C(Entity* this) { +void OctorokBossProjectile_Action1(Entity* this) { u32 index; switch (this->type) { @@ -84,7 +82,7 @@ void sub_080A976C(Entity* this) { } if ((this->type2 == 0) && ((this->bitfield & 0x80) != 0)) { if ((this->bitfield & 0x7f) == 0) { - sub_080A99F0(this); + OctorokBossProjectile_Action2(this); } this->direction = this->field_0x3e << 3; this->speed = 0x400; @@ -105,7 +103,7 @@ void sub_080A976C(Entity* this) { this->parent->field_0x3e = this->direction >> 3; } SoundReq(SFX_BOSS_HIT); - sub_080A99F0(this); + OctorokBossProjectile_Action2(this); } } UpdateAnimationSingleFrame(this); @@ -133,18 +131,18 @@ void sub_080A976C(Entity* this) { return; } for (index = 0; index < 3; ++index) { - this->attachedEntity = sub_0804A98C(this, 0xf, 1); + this->attachedEntity = CreateProjectileWithParent(this, 0xf, 1); if (this->attachedEntity != NULL) { this->attachedEntity->parent = this->parent; this->attachedEntity->direction = this->direction + gUnk_08129ADC[index]; CopyPosition(this, this->attachedEntity); } } - sub_080A99F0(this); + OctorokBossProjectile_Action2(this); break; case 1: if (this->parent->action == 2) { - sub_080A99F0(this); + OctorokBossProjectile_Action2(this); } GetNextFrame(this); if (sub_08003FC4(this, 0x1800) != 0) { @@ -152,7 +150,7 @@ void sub_080A976C(Entity* this) { if (this->collisions == 0) { sub_0806F62C(this, (s32)this->speed, (u32)this->direction); } else { - sub_080A99F0(this); + OctorokBossProjectile_Action2(this); } } if (*(u32*)&this->field_0x78 < 0x1e) { @@ -163,12 +161,12 @@ void sub_080A976C(Entity* this) { } } if (--*(u32*)&this->field_0x78 == -1) { - sub_080A99F0(this); + OctorokBossProjectile_Action2(this); } if ((this->bitfield & 0x80) == 0) { return; } - sub_080A99F0(this); + OctorokBossProjectile_Action2(this); break; case 2: GetNextFrame(this); @@ -191,7 +189,22 @@ void sub_080A976C(Entity* this) { } } -void sub_080A99F0(Entity* this) { +void OctorokBossProjectile_Action2(Entity* this) { CreateFx(this, 4, 0); DeleteThisEntity(); } + +void (*const OctorokBossProjectile_Functions[])(Entity*) = { + OctorokBossProjectile_OnTick, OctorokBossProjectile_OnTick, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const OctorokBossProjectile_Actions[])(Entity*) = { + OctorokBossProjectile_Init, + OctorokBossProjectile_Action1, + OctorokBossProjectile_Action2, +}; +const u8 gUnk_08129ADC[] = { + 0, + 224, + 32, + 0, +}; diff --git a/src/projectile/projectile0.c b/src/projectile/projectile0.c deleted file mode 100644 index 644d9686..00000000 --- a/src/projectile/projectile0.c +++ /dev/null @@ -1,73 +0,0 @@ -#include "entity.h" -#include "player.h" -#include "coord.h" - -void sub_080A7F80(Entity*); -void sub_080A7F9C(Entity*); - -extern u8 gUnk_081293B8[]; - -extern void (*const gUnk_081293CC[])(Entity*); - -extern Hitbox** gUnk_081293E0[]; - -extern Hitbox* gUnk_081293F0[]; - -extern Hitbox* gUnk_08129400[]; -extern Hitbox* gUnk_08129410[]; - -extern Hitbox* gUnk_08129420[]; - -void Projectile0(Entity* this) { - if (this->action == 0) { - this->action = 1; - sub_080A7F80(this); - if (this->type == 3) { - InitAnimationForceUpdate(this, this->parent->animationState + 0x18); - } - } - if ((this->parent == NULL) || (this->parent->currentHealth == 0)) { - DeleteThisEntity(); - } - if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) { - this->iframes = -0x2d; - } - this->bitfield = 0; - CopyPositionAndSpriteOffset(this->parent, this); - sub_080A7F9C(this); - if (this->type == 3) { - this->y.HALF.HI += 1; - UpdateAnimationSingleFrame(this); - } -} - -void sub_080A7F80(Entity* this) { - this->damageType = gUnk_081293B8[this->parent->type + this->type * 4]; -} - -void sub_080A7F9C(Entity* this) { - gUnk_081293CC[this->type](this); -} - -void sub_080A7FB4(Entity* this) { - Entity* parent = this->parent; - this->hitbox = gUnk_081293E0[parent->animationState][(parent->frames.all & 0xf) - 1]; -} - -void sub_080A7FD8(Entity* this) { - Entity* parent = this->parent; - this->hitbox = gUnk_081293F0[parent->animationState]; -} - -void sub_080A7FEC(Entity* this) { - if ((this->parent->frames.all & 0x10) != 0) { - this->hitbox = gUnk_08129410[this->parent->animationState]; - } else { - this->hitbox = gUnk_08129400[this->parent->animationState]; - } -} - -void sub_080A801C(Entity* this) { - Entity* parent = this->parent; - this->hitbox = gUnk_08129420[parent->animationState]; -} diff --git a/src/projectile/projectile11.c b/src/projectile/projectile11.c deleted file mode 100644 index a3b62c6e..00000000 --- a/src/projectile/projectile11.c +++ /dev/null @@ -1,66 +0,0 @@ -#include "entity.h" -#include "enemy.h" -#include "functions.h" -#include "player.h" - -extern void (*const gUnk_08129B58[])(Entity*); - -extern void (*const gUnk_08129B70[])(Entity*); - -extern void (*const gUnk_08129B78[])(Entity*); - -extern void sub_0800449C(Entity*, u32); -extern void sub_08079D84(void); - -void Projectile11(Entity* this) { - if (this->parent->next == NULL) { - DeleteThisEntity(); - } - gUnk_08129B58[GetNextFunction(this)](this); -} - -void sub_080A9CD4(Entity* this) { - gUnk_08129B70[this->action](this); -} - -void nullsub_539(Entity* this) { -} - -void sub_080A9CF0(Entity* this) { - if (sub_0806F520() == 0) { - CreateFx(this, 2, 0); - DeleteThisEntity(); - } - gUnk_08129B78[this->subAction](this); -} - -void sub_080A9D20(Entity* this) { - this->subAction = 2; -} - -void nullsub_540(Entity* this) { -} - -void sub_080A9D2C(Entity* this) { - if (sub_0806F3E4(this) != 0) { - if (this->damageType == 0xa6) { - ModHealth(-2); - sub_0800449C(&gPlayerEntity, 0x7a); - sub_08079D84(); - } - CreateFx(this, 2, 0); - DeleteThisEntity(); - } -} - -void sub_080A9D6C(Entity* this) { - this->action = 1; - this->animationState = this->parent->animationState; - InitAnimationForceUpdate(this, this->animationState); -} - -void sub_080A9D80(Entity* this) { - PositionRelative(this->parent, this, 0, -0x10000); - this->height.HALF.HI = 0xfffe; - UpdateAnimationSingleFrame(this); -} diff --git a/src/projectile/projectile12.c b/src/projectile/projectile12.c deleted file mode 100644 index 98c2d546..00000000 --- a/src/projectile/projectile12.c +++ /dev/null @@ -1,45 +0,0 @@ -#include "entity.h" -#include "enemy.h" - -extern void (*const gUnk_08129BEC[])(Entity*); - -extern void (*const gUnk_08129C00[])(Entity*); - -void sub_080A9DC0(Entity*); - -extern s32 sub_080AF090(Entity*); -extern s32 sub_080A7EB0(Entity*); - -void Projectile12(Entity* this) { - gUnk_08129BEC[GetNextFunction(this)](this); -} - -void sub_080A9DC0(Entity* this) { - gUnk_08129C00[this->action](this); -} - -void sub_080A9DD8(Entity* this) { - if ((this->currentHealth == 0) || (this->bitfield == 0x80)) { - DeleteThisEntity(); - } - sub_080A9DC0(this); -} - -void sub_080A9DFC(Entity* this) { - this->action = 1; - this->actionDelay = 0xb4; - this->currentHealth = 1; - InitializeAnimation(this, 0); -} - -void sub_080A9E14(Entity* this) { - GetNextFrame(this); - sub_080AF090(this); - if ((this->collisions != 0) || (--this->actionDelay == 0)) { - CreateFx(this, 0x4f, 0); - DeleteThisEntity(); - } - if (sub_080A7EB0(this) != 0) { - DeleteThisEntity(); - } -} diff --git a/src/projectile/projectile16.c b/src/projectile/projectile16.c deleted file mode 100644 index 93208ac9..00000000 --- a/src/projectile/projectile16.c +++ /dev/null @@ -1,53 +0,0 @@ -#include "entity.h" -#include "enemy.h" -#include "functions.h" - -extern void (*const gUnk_0812A3C0[])(Entity*); - -extern void (*const gUnk_0812A3D4[])(Entity*); - -extern s32 sub_080AF090(Entity*); - -extern s32 sub_080A7EB0(Entity*); - -void Projectile16(Entity* this) { - gUnk_0812A3C0[GetNextFunction(this)](this); -} - -void sub_080AAB04(Entity* this) { - gUnk_0812A3D4[this->action](this); -} - -void sub_080AAB1C(Entity* this) { - DeleteThisEntity(); -} - -void sub_080AAB24(Entity* this) { - this->action = 1; - this->actionDelay = 0x1e; - InitializeAnimation(this, 0); -} - -void sub_080AAB38(Entity* this) { - GetNextFrame(this); - if (this->actionDelay != 0) { - this->actionDelay -= 1; - } else { - if (sub_080AF090(this) == 0) { - sub_0806F69C(this); - } else { - this->action = 2; - } - } -} - -void sub_080AAB64(Entity* this) { - GetNextFrame(this); - sub_080AF090(this); - if (this->collisions != 0) { - DeleteThisEntity(); - } - if (sub_080A7EB0(this) != 0) { - DeleteThisEntity(); - } -} diff --git a/src/projectile/projectile1B.c b/src/projectile/projectile1B.c deleted file mode 100644 index 01284bc3..00000000 --- a/src/projectile/projectile1B.c +++ /dev/null @@ -1,82 +0,0 @@ -#include "entity.h" -#include "enemy.h" -#include "functions.h" - -extern void (*const gUnk_0812A58C[])(Entity*); - -extern void (*const gUnk_0812A5A0[])(Entity*); - -extern s32 sub_080AF090(Entity*); -bool32 sub_080AB5F4(Entity*); - -bool32 sub_080AB634(Entity*); - -extern void sub_080043A8(Entity*); -extern void CreateItemOnGround(Entity*); -extern void CreateChestSpawner(Entity*); - -void Projectile1B(Entity* this) { - gUnk_0812A58C[GetNextFunction(this)](this); -} - -void sub_080AB52C(Entity* this) { - gUnk_0812A5A0[this->action](this); -} - -void sub_080AB544(Entity* this) { - u32 tmp; - - if (this->iframes < -4) { - this->action = 2; - this->direction = this->field_0x3e; - tmp = (this->type ^ 2) << 3; - if (this->direction - tmp + 1 < 3) { - this->direction = tmp; - } - this->speed = 0x280; - } -} - -void sub_080AB580(Entity* this) { - this->action = 1; - this->direction = this->type << 3; - this->height.HALF.HI = 0xfffc; - InitializeAnimation(this, this->type); -} - -void sub_080AB59C(Entity* this) { - GetNextFrame(this); - if (sub_080AF090(this) == 0) { - CreateFx(this, 2, 0); - DeleteThisEntity(); - } - sub_080AB5F4(this); -} - -void sub_080AB5C4(Entity* this) { - GetNextFrame(this); - sub_080AF090(this); - if ((sub_080AB634(this) == 0) && (this->collisions != 0)) { - CreateFx(this, 2, 0); - DeleteThisEntity(); - } -} - -bool32 sub_080AB5F4(Entity* this) { - u32 uVar1; - - switch (sub_080043E8(this)) { - case 1: - CreateItemOnGround(this); - return TRUE; - case 2: - sub_080043A8(this); - return TRUE; - case 3: - CreateChestSpawner(this); - return TRUE; - } - return FALSE; -} - -ASM_FUNC("asm/non_matching/projectile1B/sub_080AB634.inc", bool32 sub_080AB634(Entity* this)) diff --git a/src/projectile/projectile1E.c b/src/projectile/projectile1E.c deleted file mode 100644 index 9b160f9d..00000000 --- a/src/projectile/projectile1E.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "entity.h" - -extern void (*const gUnk_0812A6CC[])(Entity*); - -void Projectile1E(Entity* this) { - gUnk_0812A6CC[this->action](this); -} - -ASM_FUNC("asm/non_matching/projectile1E/sub_080ABA74.inc", void sub_080ABA74(Entity* this)) - -ASM_FUNC("asm/non_matching/projectile1E/sub_080ABAE0.inc", void sub_080ABAE0(Entity* this)) diff --git a/src/projectile/projectile24.c b/src/projectile/projectile24.c deleted file mode 100644 index d60bf32b..00000000 --- a/src/projectile/projectile24.c +++ /dev/null @@ -1,66 +0,0 @@ -#include "entity.h" -#include "enemy.h" -#include "audio.h" -#include "functions.h" - -extern void (*const gUnk_0812AA5C[])(Entity*); - -extern void (*const gUnk_0812AA74[])(Entity*); - -extern s32 sub_080AF090(Entity*); -extern s32 sub_080A7EB0(Entity*); - -void sub_080ACB90(Entity*); - -void Projectile24(Entity* this) { - gUnk_0812AA5C[GetNextFunction(this)](this); -} - -void sub_080ACA50(Entity* this) { - gUnk_0812AA74[this->action](this); -} - -ASM_FUNC("asm/non_matching/projectile24/sub_080ACA68.inc", void sub_080ACA68(Entity* this)) - -void sub_080ACAC8(Entity* this) { - this->action = 1; - this->direction = 0x10; - this->height.HALF.HI = 0xfffc; - this->attachedEntity = NULL; - InitializeAnimation(this, 7); - SoundReq(SFX_199); -} - -void sub_080ACAF0(Entity* this) { - sub_080AF090(this); - GetNextFrame(this); - if (sub_080A7EB0(this) != 0) { - DeleteThisEntity(); - } -} - -void sub_080ACB10(Entity* this) { - sub_080AF090(this); - if (this->collisions != 0) { - DeleteThisEntity(); - } - GetNextFrame(this); - sub_080ACB90(this); - if (sub_080A7EB0(this) != 0) { - DeleteThisEntity(); - } -} - -ASM_FUNC("asm/non_matching/projectile24/sub_080ACB40.inc", void sub_080ACB40(Entity* this)) - -void sub_080ACB90(Entity* this) { - Entity* parent; - - parent = this->parent; - if ((this->x.HALF.HI == parent->x.HALF.HI) && (this->y.HALF.HI <= parent->y.HALF.HI)) { - parent->field_0xf = 1; - CreateFx(this, 0x1f, 0x40); - EnqueueSFX(SFX_ITEM_GLOVES_KNOCKBACK); - DeleteThisEntity(); - } -} diff --git a/src/projectile/projectile5.c b/src/projectile/projectile5.c index 1d0d6c5a..1010eb45 100644 --- a/src/projectile/projectile5.c +++ b/src/projectile/projectile5.c @@ -1,24 +1,22 @@ - #include "entity.h" #include "enemy.h" #include "player.h" #include "room.h" #include "coord.h" -extern void (*const gUnk_08129718[])(Entity*); - -extern void (*const gUnk_0812972C[])(Entity*); - extern u32 sub_080002E0(u32, u32); -extern Hitbox gUnk_08129734; +extern void (*const Projectile5_Functions[])(Entity*); +extern void (*const Projectile5_Actions[])(Entity*); + +extern const Hitbox3D gUnk_08129734; void Projectile5(Entity* this) { - gUnk_08129718[GetNextFunction(this)](this); + Projectile5_Functions[GetNextFunction(this)](this); } -void sub_080A86D8(Entity* this) { - gUnk_0812972C[this->action](this); +void Projectile5_OnTick(Entity* this) { + Projectile5_Actions[this->action](this); } void sub_080A86F0(Entity* this) { @@ -43,16 +41,14 @@ void sub_080A86F0(Entity* this) { } } -void sub_080A8770(Entity* this) { +void Projectile5_Init(Entity* this) { this->action = 1; this->field_0x3c |= 0x10; - this->hitbox = &gUnk_08129734; + this->hitbox = (Hitbox*)&gUnk_08129734; } -void sub_080A878C(Entity* this) { - Entity* parent; - - parent = this->parent; +void Projectile5_Action1(Entity* this) { + Entity* parent = this->parent; if (parent == NULL) { DeleteThisEntity(); } @@ -65,3 +61,12 @@ void sub_080A878C(Entity* this) { CopyPosition(parent, this); this->height.HALF.HI += 2; } + +void (*const Projectile5_Functions[])(Entity*) = { + Projectile5_OnTick, sub_080A86F0, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const Projectile5_Actions[])(Entity*) = { + Projectile5_Init, + Projectile5_Action1, +}; +const Hitbox3D gUnk_08129734 = { 0, 0, { 9, 6, 6, 9 }, 10, 10, 12, { 0, 0, 0 } }; diff --git a/src/projectile/projectileB.c b/src/projectile/projectileB.c deleted file mode 100644 index 0a4c6898..00000000 --- a/src/projectile/projectileB.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "entity.h" -#include "player.h" -#include "coord.h" - -extern Hitbox* gUnk_08129998[]; -extern void sub_0803C0AC(Entity*); - -void ProjectileB(Entity* this) { - Entity* parent; - - if (this->action == 0) { - this->action = 1; - } - parent = this->parent; - if (((parent == NULL) || (parent->currentHealth == 0)) || (parent->next == NULL)) { - if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) { - sub_0803C0AC(this); - } - DeleteEntity(this); - } else { - this->hitbox = gUnk_08129998[parent->animationState]; - CopyPosition(parent, this); - if ((parent->iframes != 0) && (this->iframes == 0)) { - this->iframes = 0xff; - } - } -} diff --git a/src/projectile/projectile14.c b/src/projectile/removableDust.c similarity index 74% rename from src/projectile/projectile14.c rename to src/projectile/removableDust.c index 0284e5d0..f6bc3346 100644 --- a/src/projectile/projectile14.c +++ b/src/projectile/removableDust.c @@ -5,30 +5,26 @@ #include "flags.h" #include "utils.h" -extern void (*const gUnk_08129FB8[])(Entity*); +extern u32 sub_080002C8(u16, u8); +extern Entity* LoadRoomEntity(EntityData*); + +extern void (*const RemovableDust_Functions[])(Entity*); +extern const u16 gUnk_08129FD0[]; +extern const u16 gUnk_08129FE4[]; +extern const s8 gUnk_08129FF8[]; +extern const u8 gUnk_0812A004[]; void sub_080AA494(Entity*); void sub_080AA534(Entity*); - void sub_080AA464(Entity*); - void sub_080AA544(Entity*); - -extern u16 gUnk_08129FD0[]; void sub_080AA654(Entity*, u32); -extern s8 gUnk_08129FF8[]; -extern u16 gUnk_08129FE4[]; -extern u32 sub_080002C8(u16, u8); - -extern u32 gUnk_0812A004; -extern Entity* LoadRoomEntity(EntityData*); - -void Projectile14(Entity* this) { - gUnk_08129FB8[GetNextFunction(this)](this); +void RemovableDust(Entity* this) { + RemovableDust_Functions[GetNextFunction(this)](this); } -void sub_080AA41C(Entity* this) { +void RemovableDust_OnTick(Entity* this) { if (this->action == 0) { this->action = 1; this->frameIndex = this->type; @@ -63,7 +59,7 @@ void sub_080AA464(Entity* this) { void sub_080AA494(Entity* this) { u32 tileType; - u16* iterator; + const u16* iterator; u32 index; index = 0; @@ -91,14 +87,14 @@ void sub_080AA534(Entity* this) { UpdateSpriteForCollisionLayer(this); } -NONMATCH("asm/non_matching/projectile14/sub_080AA544.inc", void sub_080AA544(Entity* this)) { +void sub_080AA544(Entity* this) { u8* pbVar1; s32 iVar2; u32 uVar3; s32 iVar4; - u16* puVar5; + const u16* puVar5; u32 param; - s8* tmp; + const s8* tmp; if (this->type2 < 9) { tmp = gUnk_08129FF8; @@ -124,18 +120,13 @@ NONMATCH("asm/non_matching/projectile14/sub_080AA544.inc", void sub_080AA544(Ent sub_080AA654(this, param); SetFlag((u16)this->speed); } else { - sub_0807B7D8(gUnk_08129FE4[this->type2], - param - - // TODO this array access is wrong - *((s8*)gUnk_08129FE4 + this->type2), - this->collisionLayer); + sub_0807B7D8(gUnk_08129FE4[this->type2], param - tmp[this->type2], this->collisionLayer); } } else { sub_0807BA8C(TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); SetFlag((u16)this->speed); } } -END_NONMATCH void sub_080AA654(Entity* this, u32 param) { EntityData* entityData; @@ -148,3 +139,13 @@ void sub_080AA654(Entity* this, u32 param) { LoadRoomEntity(entityData); } + +void (*const RemovableDust_Functions[])(Entity*) = { + RemovableDust_OnTick, sub_080AA450, DeleteEntity, DeleteEntity, DeleteEntity, sub_080AA464, +}; +const u16 gUnk_08129FD0[] = { 387, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 0 }; +const u16 gUnk_08129FE4[] = { 388, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 0 }; +const s8 gUnk_08129FF8[] = { 65, 64, 63, 1, 0, -1, -63, -64, -65, 0, 0, 0 }; +const u8 gUnk_0812A004[] = { + 9, 0, 3, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; diff --git a/src/projectile/projectile1.c b/src/projectile/rockProjectile.c similarity index 67% rename from src/projectile/projectile1.c rename to src/projectile/rockProjectile.c index d300cd5f..e9e47b2c 100644 --- a/src/projectile/projectile1.c +++ b/src/projectile/rockProjectile.c @@ -2,22 +2,21 @@ #include "enemy.h" #include "functions.h" -extern void (*const gUnk_081295D0[])(Entity*); - -extern void (*const gUnk_081295E4[])(Entity*); - -void sub_080A8178(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); extern void sub_08016AD2(Entity*); -void Projectile1(Entity* this) { - gUnk_081295D0[GetNextFunction(this)](this); +extern void (*const RockProjectile_Functions[])(Entity*); +extern void (*const RockProjectile_Actions[])(Entity*); + +void sub_080A8178(Entity*); + +void RockProjectile(Entity* this) { + RockProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A804C(Entity* this) { - gUnk_081295E4[this->action](this); +void RockProjectile_OnTick(Entity* this) { + RockProjectile_Actions[this->action](this); } void sub_080A8064(Entity* this) { @@ -29,14 +28,14 @@ void sub_080A8064(Entity* this) { } } -void sub_080A8088(Entity* this) { +void RockProjectile_Init(Entity* this) { this->action = 1; this->actionDelay = 0x30; this->field_0x20 = 0xa000; InitializeAnimation(this, 0); } -void sub_080A80A0(Entity* this) { +void RockProjectile_Action1(Entity* this) { GetNextFrame(this); if (sub_080AF090(this) != 0) { if (sub_080A7EB0(this) != 0) { @@ -54,7 +53,7 @@ void sub_080A80A0(Entity* this) { } } -void sub_080A80F4(Entity* this) { +void RockProjectile_Action2(Entity* this) { sub_0806F69C(this); GetNextFrame(this); if (sub_08003FC4(this, 0x1800) == 0) { @@ -62,7 +61,7 @@ void sub_080A80F4(Entity* this) { } } -void sub_080A8118(Entity* this) { +void RockProjectile_Action3(Entity* this) { GetNextFrame(this); sub_080AF090(this); switch (sub_080044EC(this, 0x2800)) { @@ -89,3 +88,13 @@ void sub_080A8178(Entity* this) { this->speed = 0x40; this->field_0x20 = 0x14000; } + +void (*const RockProjectile_Functions[])(Entity*) = { + RockProjectile_OnTick, sub_080A8064, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const RockProjectile_Actions[])(Entity*) = { + RockProjectile_Init, + RockProjectile_Action1, + RockProjectile_Action2, + RockProjectile_Action3, +}; diff --git a/src/projectile/projectile15.c b/src/projectile/spiderWeb.c similarity index 69% rename from src/projectile/projectile15.c rename to src/projectile/spiderWeb.c index 0130e3a7..68d6e868 100644 --- a/src/projectile/projectile15.c +++ b/src/projectile/spiderWeb.c @@ -5,35 +5,30 @@ #include "object.h" #include "flags.h" -extern void (*const gUnk_0812A014[])(Entity*); +extern void sub_0806FBB4(Entity*); +extern u32 sub_080002D4(s32, s32, u32); -extern void (*const gUnk_0812A02C[])(Entity*); - -extern u8 gUnk_0812A03C[]; +extern void (*const SpiderWeb_Functions[])(Entity*); +extern void (*const SpiderWeb_Actions[])(Entity*); +extern const u8 gUnk_0812A03C[]; +extern const Hitbox* const gUnk_0812A04C[]; +extern void (*const SpiderWeb_SubActions[])(Entity*); +extern const s8 gUnk_0812A064[]; +extern const s8 gUnk_0812A06C[]; +extern const u8 gUnk_0812A074[]; +extern const u16 gUnk_0812A084[]; void sub_080AA6C0(Entity*); void sub_080AAAA8(Entity*); - -extern Hitbox* gUnk_0812A04C[]; void sub_080AAA68(Entity*); - void sub_080AA9E0(Entity*); -extern void (*const gUnk_0812A05C[])(Entity*); -extern void sub_0806FBB4(Entity*); - -extern u16 gUnk_0812A084[]; - -extern u32 sub_080002D4(s32, s32, u32); -extern s8 gUnk_0812A064[]; -extern s8 gUnk_0812A06C[]; - -void Projectile15(Entity* this) { - gUnk_0812A014[GetNextFunction(this)](this); +void SpiderWeb(Entity* this) { + SpiderWeb_Functions[GetNextFunction(this)](this); } -void sub_080AA6A8(Entity* this) { - gUnk_0812A02C[this->action](this); +void SpiderWeb_OnTick(Entity* this) { + SpiderWeb_Actions[this->action](this); } void sub_080AA6C0(Entity* this) { @@ -101,32 +96,32 @@ void sub_080AA78C(Entity* this) { } } -void sub_080AA834(Entity* this) { +void SpiderWeb_Init(Entity* this) { if (CheckFlags(this->field_0x86.HWORD) != 0) { DeleteThisEntity(); } this->action = 1; this->field_0x1c = 1; this->field_0x16 = 1; - this->hitbox = gUnk_0812A04C[this->type]; + this->hitbox = (Hitbox*)gUnk_0812A04C[this->type]; this->cutsceneBeh.HALF.LO = 0; InitAnimationForceUpdate(this, this->type); sub_080AAA68(this); } -void sub_080AA878(Entity* this) { +void SpiderWeb_Action1(Entity* this) { if ((this->frames.all & 0x80) == 0) { UpdateAnimationSingleFrame(this); } sub_080AA9E0(this); } -void sub_080AA898(Entity* this) { +void SpiderWeb_Action2(Entity* this) { sub_0806FBB4(this); - gUnk_0812A05C[this->subAction - 5](this); + SpiderWeb_SubActions[this->subAction - 5](this); } -void sub_080AA8B8(Entity* this) { +void SpiderWeb_SubAction0(Entity* this) { u32 tmp; u16 x; u16 y; @@ -160,20 +155,20 @@ void sub_080AA8B8(Entity* this) { } } -void sub_080AA9AC(Entity* this) { +void SpiderWeb_SubAction1(Entity* this) { this->action = 1; this->cutsceneBeh.HALF.LO = 0; InitAnimationForceUpdate(this, this->type + 0xc); } -void sub_080AA9C4(Entity* this) { +void SpiderWeb_Action3(Entity* this) { GetNextFrame(this); if (--this->actionDelay == 0) { sub_080AAAA8(this); } } -ASM_FUNC("asm/non_matching/projectile15/sub_080AA9E0.inc", void sub_080AA9E0(Entity* this)) +ASM_FUNC("asm/non_matching/spiderWeb/sub_080AA9E0.inc", void sub_080AA9E0(Entity* this)) void sub_080AAA68(Entity* this) { SetTile(gUnk_0812A084[this->type], TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); @@ -184,3 +179,34 @@ void sub_080AAAA8(Entity* this) { sub_0807BA8C(TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); DeleteThisEntity(); } + +void (*const SpiderWeb_Functions[])(Entity*) = { + SpiderWeb_OnTick, sub_080AA6C0, DeleteEntity, DeleteEntity, DeleteEntity, sub_080AA78C, +}; +void (*const SpiderWeb_Actions[])(Entity*) = { + SpiderWeb_Init, + SpiderWeb_Action1, + SpiderWeb_Action2, + SpiderWeb_Action3, +}; +const u8 gUnk_0812A03C[] = { + 248, 252, 6, 1, 4, 245, 253, 3, 249, 253, 6, 4, 252, 245, 3, 3, +}; +extern const Hitbox gUnk_080FD41C; +extern const Hitbox gUnk_080FD424; +extern const Hitbox gUnk_080FD42C; +extern const Hitbox gUnk_080FD434; +const Hitbox* const gUnk_0812A04C[] = { + &gUnk_080FD41C, + &gUnk_080FD424, + &gUnk_080FD42C, + &gUnk_080FD434, +}; +void (*const SpiderWeb_SubActions[])(Entity*) = { + SpiderWeb_SubAction0, + SpiderWeb_SubAction1, +}; +const s8 gUnk_0812A064[] = { 0, 17, -15, 4, 0, -11, 15, 4 }; +const s8 gUnk_0812A06C[] = { 0, 2, -2, 0, 0, -2, 2, 0 }; +const u8 gUnk_0812A074[] = { 4, 0, 5, 16, 3, 8, 5, 24, 3, 16, 5, 0, 3, 24, 5, 8 }; +const u16 gUnk_0812A084[] = { 16419, 16421, 16422, 16420 }; diff --git a/src/projectile/spikedRollers.c b/src/projectile/spikedRollers.c new file mode 100644 index 00000000..503792ba --- /dev/null +++ b/src/projectile/spikedRollers.c @@ -0,0 +1,20 @@ +#include "entity.h" + +extern void (*const SpikedRollers_Actions[])(Entity*); +extern const u8 gUnk_0812A6D4[]; + +void SpikedRollers(Entity* this) { + SpikedRollers_Actions[this->action](this); +} + +ASM_FUNC("asm/non_matching/spikedRollers/sub_080ABA74.inc", void sub_080ABA74(Entity* this)) + +ASM_FUNC("asm/non_matching/spikedRollers/sub_080ABAE0.inc", void sub_080ABAE0(Entity* this)) + +void (*const SpikedRollers_Actions[])(Entity*) = { + sub_080ABA74, + sub_080ABAE0, +}; +const u8 gUnk_0812A6D4[] = { + 8, 16, 24, 32, 40, 48, 56, 16, 24, 32, 40, 48, 56, 64, +}; diff --git a/src/projectile/projectile10.c b/src/projectile/stalfosProjectile.c similarity index 61% rename from src/projectile/projectile10.c rename to src/projectile/stalfosProjectile.c index d93f9e0c..c743fcbc 100644 --- a/src/projectile/projectile10.c +++ b/src/projectile/stalfosProjectile.c @@ -2,33 +2,30 @@ #include "enemy.h" #include "functions.h" -extern void (*const gUnk_08129AE0[])(Entity*); - -extern void (*const gUnk_08129AF8[])(Entity*); - -extern void (*const gUnk_08129B08[])(Entity*); -void sub_080A9BA8(Entity*); - -void sub_080A9BD0(Entity*); -void sub_080A9C34(Entity*); - -void sub_080A9C50(Entity*); +extern void (*const StalfosProjectile_Functions[])(Entity*); +extern void (*const StalfosProjectile_Actions[])(Entity*); +extern void (*const StalfosProjectile_SubActions[])(Entity*); typedef struct { s8 unk_0; s8 unk_1; s8 unk_2; } PACKED struct_08129B20; -extern struct_08129B20 gUnk_08129B20[]; +extern const struct_08129B20 gUnk_08129B20[]; -extern u8 gUnk_08129B50[]; +extern const u8 gUnk_08129B50[]; -void Projectile10(Entity* this) { - gUnk_08129AE0[GetNextFunction(this)](this); +void sub_080A9BA8(Entity*); +void sub_080A9BD0(Entity*); +void sub_080A9C34(Entity*); +void sub_080A9C50(Entity*); + +void StalfosProjectile(Entity* this) { + StalfosProjectile_Functions[GetNextFunction(this)](this); } -void sub_080A9A1C(Entity* this) { - gUnk_08129AF8[this->action](this); +void StalfosProjectile_OnTick(Entity* this) { + StalfosProjectile_Actions[this->action](this); } void sub_080A9A34(Entity* this) { @@ -44,34 +41,34 @@ void sub_080A9A64(Entity* this) { if ((this->subAction < 3) && (sub_0806F520(this) == 0)) { sub_080A9BA8(this); } - gUnk_08129B08[this->subAction](this); + StalfosProjectile_SubActions[this->subAction](this); } -void sub_080A9A94(Entity* this) { +void StalfosProjectile_SubAction0(Entity* this) { this->subAction = 2; this->height.HALF.HI = 0xfffe; } -void sub_080A9AA4(Entity* this) { +void StalfosProjectile_SubAction1(Entity* this) { sub_0806F4E8(this); } -void sub_080A9AAC(Entity* this) { +void StalfosProjectile_SubAction2(Entity* this) { sub_0806F3E4(this); } -void sub_080A9AB4(Entity* this) { +void StalfosProjectile_SubAction3(Entity* this) { this->flags &= 0x7f; } -void nullsub_128(Entity* this) { +void StalfosProjectile_SubAction4(Entity* this) { } -void sub_080A9AC4(Entity* this) { +void StalfosProjectile_SubAction5(Entity* this) { sub_080A9BA8(this); } -void sub_080A9ACC(Entity* this) { +void StalfosProjectile_Init(Entity* this) { switch (this->type2) { case 1: this->action = 2; @@ -95,7 +92,7 @@ void sub_080A9ACC(Entity* this) { } } -void sub_080A9B24(Entity* this) { +void StalfosProjectile_Action1(Entity* this) { if (this->parent->next == NULL) { sub_080A9BA8(this); } @@ -107,7 +104,7 @@ void sub_080A9B24(Entity* this) { } } -void sub_080A9B54(Entity* this) { +void StalfosProjectile_Action2(Entity* this) { if (this->parent->next == NULL) { sub_080A9BA8(this); } @@ -118,7 +115,7 @@ void sub_080A9B54(Entity* this) { } } -void sub_080A9B80(Entity* this) { +void StalfosProjectile_Action3(Entity* this) { if (this->field_0x20 < 0) { this->spriteSettings.b.flipY = 1; } @@ -140,7 +137,7 @@ void sub_080A9BD0(Entity* this) { Entity* parent; s32 tmp; u32 tmp2; - struct_08129B20* entry; + const struct_08129B20* entry; parent = this->parent; switch (parent->animationState) { @@ -186,3 +183,23 @@ void sub_080A9C50(Entity* this) { sub_0806FA90(parent, this, 0, 1); this->spriteOffsetY += gUnk_08129B50[tmp]; } + +void (*const StalfosProjectile_Functions[])(Entity*) = { + StalfosProjectile_OnTick, sub_080A9A34, DeleteEntity, DeleteEntity, DeleteEntity, sub_080A9A64, +}; +void (*const StalfosProjectile_Actions[])(Entity*) = { + StalfosProjectile_Init, + StalfosProjectile_Action1, + StalfosProjectile_Action2, + StalfosProjectile_Action3, +}; +void (*const StalfosProjectile_SubActions[])(Entity*) = { + StalfosProjectile_SubAction0, StalfosProjectile_SubAction1, StalfosProjectile_SubAction2, + StalfosProjectile_SubAction3, StalfosProjectile_SubAction4, StalfosProjectile_SubAction5, +}; +const struct_08129B20 gUnk_08129B20[] = { + { 0, -9, -1 }, { 0, 5, -25 }, { 0, 3, -20 }, { 0, 0, -14 }, { 10, 0, -1 }, { -5, 0, -24 }, + { -3, 0, -20 }, { 0, 0, -13 }, { 0, 5, -1 }, { 0, -5, -19 }, { 0, -3, -16 }, { 0, 0, -11 }, + { -10, 0, -1 }, { 5, 0, -24 }, { 3, 0, -20 }, { 0, 0, -13 }, +}; +const u8 gUnk_08129B50[] = { 241, 243, 242, 241, 243, 242, 0, 0 }; diff --git a/src/projectile/torchTrapProjectile.c b/src/projectile/torchTrapProjectile.c new file mode 100644 index 00000000..aa550c6a --- /dev/null +++ b/src/projectile/torchTrapProjectile.c @@ -0,0 +1,60 @@ +#include "entity.h" +#include "enemy.h" +#include "functions.h" + +extern s32 sub_080AF090(Entity*); +extern s32 sub_080A7EB0(Entity*); + +extern void (*const TorchTrapProjectile_Functions[])(Entity*); +extern void (*const TorchTrapProjectile_Actions[])(Entity*); + +void TorchTrapProjectile(Entity* this) { + TorchTrapProjectile_Functions[GetNextFunction(this)](this); +} + +void TorchTrapProjectile_OnTick(Entity* this) { + TorchTrapProjectile_Actions[this->action](this); +} + +void sub_080AAB1C(Entity* this) { + DeleteThisEntity(); +} + +void TorchTrapProjectile_Init(Entity* this) { + this->action = 1; + this->actionDelay = 0x1e; + InitializeAnimation(this, 0); +} + +void TorchTrapProjectile_Action1(Entity* this) { + GetNextFrame(this); + if (this->actionDelay != 0) { + this->actionDelay -= 1; + } else { + if (sub_080AF090(this) == 0) { + sub_0806F69C(this); + } else { + this->action = 2; + } + } +} + +void TorchTrapProjectile_Action2(Entity* this) { + GetNextFrame(this); + sub_080AF090(this); + if (this->collisions != 0) { + DeleteThisEntity(); + } + if (sub_080A7EB0(this) != 0) { + DeleteThisEntity(); + } +} + +void (*const TorchTrapProjectile_Functions[])(Entity*) = { + TorchTrapProjectile_OnTick, sub_080AAB1C, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const TorchTrapProjectile_Actions[])(Entity*) = { + TorchTrapProjectile_Init, + TorchTrapProjectile_Action1, + TorchTrapProjectile_Action2, +}; diff --git a/src/projectile/projectile18.c b/src/projectile/v1DarkMagicProjectile.c similarity index 75% rename from src/projectile/projectile18.c rename to src/projectile/v1DarkMagicProjectile.c index 7efec1c5..baa70ecb 100644 --- a/src/projectile/projectile18.c +++ b/src/projectile/v1DarkMagicProjectile.c @@ -6,23 +6,21 @@ #include "functions.h" #include "random.h" -extern void (*const gUnk_0812A418[])(Entity*); +extern void sub_0800449C(Entity*, u32); -extern void (*const gUnk_0812A430[])(Entity*); - -extern void (*const gUnk_0812A440[])(Entity*); +extern void (*const V1DarkMagicProjectile_Functions[])(Entity*); +extern void (*const V1DarkMagicProjectile_Actions[])(Entity*); +extern void (*const V1DarkMagicProjectile_SubActions[])(Entity*); void sub_080AAF74(Entity*); void sub_080AB034(Entity*); -extern void sub_0800449C(Entity*, u32); - -void Projectile18(Entity* this) { - gUnk_0812A418[GetNextFunction(this)](this); +void V1DarkMagicProjectile(Entity* this) { + V1DarkMagicProjectile_Functions[GetNextFunction(this)](this); } -void sub_080AAC0C(Entity* this) { - gUnk_0812A430[this->action](this); +void V1DarkMagicProjectile_OnTick(Entity* this) { + V1DarkMagicProjectile_Actions[this->action](this); if ((this->type2 == 0) && (--this->cutsceneBeh.HWORD == 0)) { this->currentHealth = 0; } @@ -56,29 +54,29 @@ void sub_080AAC44(Entity* this) { } } -ASM_FUNC("asm/non_matching/projectile18/sub_080AACE0.inc", void sub_080AACE0(Entity* this)) +ASM_FUNC("asm/non_matching/v1DarkMagicProjectile/sub_080AACE0.inc", void sub_080AACE0(Entity* this)) void sub_080AAD70(Entity* this) { if (sub_0806F520() == 0) { this->currentHealth = 0; } - gUnk_0812A440[this->subAction](this); + V1DarkMagicProjectile_SubActions[this->subAction](this); } -void sub_080AAD98(Entity* this) { +void V1DarkMagicProjectile_SubAction0(Entity* this) { this->subAction = 2; } -void nullsub_541(Entity* this) { +void V1DarkMagicProjectile_SubAction1(Entity* this) { } -void sub_080AADA4(Entity* this) { +void V1DarkMagicProjectile_SubAction2(Entity* this) { if (sub_0806F3E4(this) != 0) { this->currentHealth = 0; } } -void sub_080AADBC(Entity* this) { +void V1DarkMagicProjectile_Init(Entity* this) { Entity* entity; if (this->type2 == 0) { @@ -101,7 +99,7 @@ void sub_080AADBC(Entity* this) { this->direction = GetFacingDirection(this, &gPlayerEntity); this->field_0x86.HALF.LO = 0; this->cutsceneBeh.HWORD = 300; - entity = sub_080A7EE0(0x18); + entity = CreateProjectile(0x18); if (entity != NULL) { entity->type = 1; entity->type2 = this->type2; @@ -115,7 +113,7 @@ void sub_080AADBC(Entity* this) { InitializeAnimation(this, this->type); } -void sub_080AAE88(Entity* this) { +void V1DarkMagicProjectile_Action1(Entity* this) { u8 bVar1; u32 uVar2; @@ -142,12 +140,12 @@ void sub_080AAE88(Entity* this) { sub_080AB034(this); } -void sub_080AAF00(Entity* this) { +void V1DarkMagicProjectile_Action2(Entity* this) { sub_080AAF74(this); sub_080AB034(this); } -void sub_080AAF10(Entity* this) { +void V1DarkMagicProjectile_Action3(Entity* this) { CopyPosition(this->parent, this); sub_080AB034(this); this->spriteSettings.b.draw = this->parent->spriteSettings.b.draw; @@ -206,3 +204,18 @@ void sub_080AB034(Entity* this) { } sub_0801D2B4(this, tmp); } + +void (*const V1DarkMagicProjectile_Functions[])(Entity*) = { + V1DarkMagicProjectile_OnTick, sub_080AAC44, DeleteEntity, sub_080AACE0, DeleteEntity, sub_080AAD70, +}; +void (*const V1DarkMagicProjectile_Actions[])(Entity*) = { + V1DarkMagicProjectile_Init, + V1DarkMagicProjectile_Action1, + V1DarkMagicProjectile_Action2, + V1DarkMagicProjectile_Action3, +}; +void (*const V1DarkMagicProjectile_SubActions[])(Entity*) = { + V1DarkMagicProjectile_SubAction0, + V1DarkMagicProjectile_SubAction1, + V1DarkMagicProjectile_SubAction2, +}; diff --git a/src/projectile/projectile1C.c b/src/projectile/v1EyeLaser.c similarity index 52% rename from src/projectile/projectile1C.c rename to src/projectile/v1EyeLaser.c index 5b5f1938..2af3ae08 100644 --- a/src/projectile/projectile1C.c +++ b/src/projectile/v1EyeLaser.c @@ -1,32 +1,27 @@ #include "entity.h" #include "functions.h" -extern void (*const gUnk_0812A5E8[])(Entity*); - -extern Hitbox gUnk_0812A614; +extern void (*const V1EyeLaser_Actions[])(Entity*); +extern const Hitbox* const gUnk_0812A5F4[]; +extern const Hitbox gUnk_0812A614; +extern const Hitbox gUnk_0812A61C; void sub_080AB758(Entity*); - void sub_080AB888(Entity*); -extern Hitbox gUnk_0812A614; -extern Hitbox gUnk_0812A61C; - -extern Hitbox* gUnk_0812A5F4[]; - -void Projectile1C(Entity* this) { +void V1EyeLaser(Entity* this) { if (this->parent->spriteSettings.b.draw == 0) { DeleteThisEntity(); } - gUnk_0812A5E8[this->action](this); + V1EyeLaser_Actions[this->action](this); } -void sub_080AB6B8(Entity* this) { +void V1EyeLaser_Init(Entity* this) { *(u32*)&this->field_0x74 = this->parent->x.WORD; if (this->type == 0) { this->action = 1; this->flags &= 0x7f; - this->hitbox = &gUnk_0812A614; + this->hitbox = (Hitbox*)&gUnk_0812A614; InitializeAnimation(this, 0); } else { this->action = 2; @@ -35,7 +30,7 @@ void sub_080AB6B8(Entity* this) { } } -void sub_080AB6FC(Entity* this) { +void V1EyeLaser_Action1(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { this->action = 2; @@ -44,7 +39,7 @@ void sub_080AB6FC(Entity* this) { } } -void sub_080AB728(Entity* this) { +void V1EyeLaser_Action2(Entity* this) { GetNextFrame(this); this->x.WORD += (this->parent->x.WORD - *(u32*)&this->field_0x74); *(u32*)&this->field_0x74 = this->parent->x.WORD; @@ -54,21 +49,21 @@ void sub_080AB728(Entity* this) { } } -ASM_FUNC("asm/non_matching/projectile1C/sub_080AB758.inc", void sub_080AB758(Entity* this)) +ASM_FUNC("asm/non_matching/v1EyeLaser/sub_080AB758.inc", void sub_080AB758(Entity* this)) void sub_080AB844(Entity* this, s32 param_1, s32 param_2) { Entity* entity; - entity = sub_080A7EE0(0x1c); + entity = CreateProjectile(0x1c); if (entity != NULL) { entity->type = 1; entity->actionDelay = param_1; entity->parent = this->parent; PositionRelative(this, entity, 0, param_2 << 0x10); if (param_1 != 1) { - entity->hitbox = &gUnk_0812A61C; + entity->hitbox = (Hitbox*)&gUnk_0812A61C; } else { - entity->hitbox = &gUnk_0812A614; + entity->hitbox = (Hitbox*)&gUnk_0812A614; } } } @@ -83,7 +78,7 @@ void sub_080AB888(Entity* this) { case 3: index = 1; case 4: - this->hitbox = gUnk_0812A5F4[this->field_0xf * 2 + index]; + this->hitbox = (Hitbox*)gUnk_0812A5F4[this->field_0xf * 2 + index]; break; case 0: case 1: @@ -96,3 +91,24 @@ void sub_080AB888(Entity* this) { this->field_0xf = 4; } } + +void (*const V1EyeLaser_Actions[])(Entity*) = { + V1EyeLaser_Init, + V1EyeLaser_Action1, + V1EyeLaser_Action2, +}; + +extern const Hitbox gUnk_0812A624; +extern const Hitbox gUnk_0812A62C; +extern const Hitbox gUnk_0812A634; + +const Hitbox* const gUnk_0812A5F4[] = { + &gUnk_0812A61C, &gUnk_0812A61C, &gUnk_0812A624, &gUnk_0812A61C, + &gUnk_0812A62C, &gUnk_0812A624, &gUnk_0812A634, &gUnk_0812A624, +}; + +const Hitbox gUnk_0812A614 = { 0, 4, { 0, 0, 0, 0 }, 1, 3 }; +const Hitbox gUnk_0812A61C = { 0, 8, { 0, 0, 0, 0 }, 1, 6 }; +const Hitbox gUnk_0812A624 = { 0, 24, { 0, 0, 0, 0 }, 1, 6 }; +const Hitbox gUnk_0812A62C = { 0, 40, { 0, 0, 0, 0 }, 1, 6 }; +const Hitbox gUnk_0812A634 = { 0, 56, { 0, 0, 0, 0 }, 1, 6 }; diff --git a/src/projectile/projectile1A.c b/src/projectile/v1FireProjectile.c similarity index 56% rename from src/projectile/projectile1A.c rename to src/projectile/v1FireProjectile.c index de519353..cad6d879 100644 --- a/src/projectile/projectile1A.c +++ b/src/projectile/v1FireProjectile.c @@ -5,24 +5,22 @@ #include "audio.h" #include "random.h" -extern void (*const gUnk_0812A4C8[])(Entity*); - -extern void (*const gUnk_0812A4DC[])(Entity*); - -void sub_080AB4A4(Entity*); - extern void sub_0806F5BC(Entity*, u32, u32); extern u32 sub_080041DC(Entity*, u32, u32); + +extern void (*const V1FireProjectile_Functions[])(Entity*); +extern void (*const V1FireProjectile_Actions[])(Entity*); +extern const s8 gUnk_0812A4EC[]; + +void sub_080AB4A4(Entity*); s8* sub_080AB4F8(Entity*); -extern s8 gUnk_0812A4EC[]; - -void Projectile1A(Entity* this) { - gUnk_0812A4C8[GetNextFunction(this)](this); +void V1FireProjectile(Entity* this) { + V1FireProjectile_Functions[GetNextFunction(this)](this); } -void sub_080AB2C4(Entity* this) { - gUnk_0812A4DC[this->action](this); +void V1FireProjectile_OnTick(Entity* this) { + V1FireProjectile_Actions[this->action](this); } void sub_080AB2DC(Entity* this) { @@ -36,7 +34,7 @@ void sub_080AB2DC(Entity* this) { } } -void sub_080AB318(Entity* this) { +void V1FireProjectile_Init(Entity* this) { s32 iVar2; u32 rnd; u32 x; @@ -75,7 +73,7 @@ void sub_080AB318(Entity* this) { this->direction = sub_080045B4(this, x, y); } -void sub_080AB414(Entity* this) { +void V1FireProjectile_Action1(Entity* this) { GetNextFrame(this); sub_0806F69C(this); if (sub_08003FC4(this, 0) == 0) { @@ -90,7 +88,7 @@ void sub_080AB414(Entity* this) { } } -void sub_080AB45C(Entity* this) { +void V1FireProjectile_Action2(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { this->action = 3; @@ -99,7 +97,7 @@ void sub_080AB45C(Entity* this) { } } -void sub_080AB488(Entity* this) { +void V1FireProjectile_Action3(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteThisEntity(); @@ -124,5 +122,24 @@ void sub_080AB4A4(Entity* this) { } s8* sub_080AB4F8(Entity* this) { - return &gUnk_0812A4EC[this->type << 5 | this->field_0xf << 1]; + return (s8*)&gUnk_0812A4EC[this->type << 5 | this->field_0xf << 1]; } + +void (*const V1FireProjectile_Functions[])(Entity*) = { + V1FireProjectile_OnTick, sub_080AB2DC, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const V1FireProjectile_Actions[])(Entity*) = { + V1FireProjectile_Init, + V1FireProjectile_Action1, + V1FireProjectile_Action2, + V1FireProjectile_Action3, +}; +const s8 gUnk_0812A4EC[] = { 16, 0, 64, -48, 80, -32, 80, 0, 80, 32, 64, 48, 32, 16, 48, 0, 32, -16, + 80, -64, 80, -64, 32, 0, 48, -32, 64, -16, 64, 16, 48, 32, 16, 16, 64, 16, + 64, 32, 48, 48, 32, 64, 16, 64, 16, 32, 32, 16, 80, 16, 80, 48, 64, 64, + 48, 80, 16, 80, 16, 48, 32, 32, 48, 16, 0, 16, -48, 48, -32, 64, 32, 64, + 48, 48, 80, 80, 0, 80, -80, 80, 0, 32, 64, 64, 48, 80, -48, 80, -64, 64, + -16, 16, 0, 48, 16, 16, -16, 16, -64, 16, -64, 32, -48, 48, -32, 64, -16, 64, + -16, 32, -32, 16, -80, 16, -80, 48, -64, 64, -48, 80, -16, 80, -16, 48, -32, 32, + -48, 16, -16, 0, -64, -48, -80, -32, -80, 0, -80, 32, -64, 48, -32, 16, -48, 0, + -32, -16, -80, -64, -80, -64, -32, 0, -48, -32, -64, -16, -64, 16, -48, 32 }; diff --git a/src/projectile/projectile1F.c b/src/projectile/v2Projectile.c similarity index 73% rename from src/projectile/projectile1F.c rename to src/projectile/v2Projectile.c index 93941e4c..0420790b 100644 --- a/src/projectile/projectile1F.c +++ b/src/projectile/v2Projectile.c @@ -5,8 +5,10 @@ #include "random.h" #include "audio.h" -extern void (*const gUnk_0812A7D4[])(Entity*); - +extern void (*const V2Projectile_Functions[])(Entity*); +extern void (*const gUnk_0812A7EC[])(Entity*); +extern void (*const gUnk_0812A7F8[])(Entity*); +extern void (*const gUnk_0812A800[])(Entity*); extern void (*const gUnk_0812A808[])(Entity*); extern void sub_0800449C(Entity*, u32); @@ -14,13 +16,13 @@ extern void sub_08079D84(void); extern s32 sub_080AF090(Entity*); -void Projectile1F(Entity* this) { - gUnk_0812A7D4[GetNextFunction(this)](this); +void V2Projectile(Entity* this) { + V2Projectile_Functions[GetNextFunction(this)](this); } -ASM_FUNC("asm/non_matching/projectile1F/sub_080ABBA8.inc", void sub_080ABBA8(Entity* this)) +ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABBA8.inc", void sub_080ABBA8(Entity* this)) -ASM_FUNC("asm/non_matching/projectile1F/sub_080ABBF4.inc", void sub_080ABBF4(Entity* this)) +ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABBF4.inc", void sub_080ABBF4(Entity* this)) void sub_080ABC54(Entity* this) { if (sub_0806F520() == 0) { @@ -90,7 +92,7 @@ void sub_080ABD70(Entity* this) { } } -ASM_FUNC("asm/non_matching/projectile1F/sub_080ABE04.inc", void sub_080ABE04(Entity* this)) +ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABE04.inc", void sub_080ABE04(Entity* this)) void sub_080ABE88(Entity* this) { if (sub_08003FC4(this, 0x1800) == 0) { @@ -121,3 +123,25 @@ void sub_080ABF04(Entity* this) { sub_0806F69C(this); GetNextFrame(this); } + +void (*const V2Projectile_Functions[])(Entity*) = { + sub_080ABBA8, sub_080ABBF4, DeleteEntity, DeleteEntity, DeleteEntity, sub_080ABC54, +}; +void (*const gUnk_0812A7EC[])(Entity*) = { + sub_080ABCC4, + sub_080ABD44, + sub_080ABD70, +}; +void (*const gUnk_0812A7F8[])(Entity*) = { + sub_080ABE04, + sub_080ABE88, +}; +void (*const gUnk_0812A800[])(Entity*) = { + sub_080ABEA8, + sub_080ABF04, +}; +void (*const gUnk_0812A808[])(Entity*) = { + sub_080ABC84, + nullsub_542, + sub_080ABC90, +}; diff --git a/src/projectile/projectile21.c b/src/projectile/v3ElectricProjectile.c similarity index 52% rename from src/projectile/projectile21.c rename to src/projectile/v3ElectricProjectile.c index d8ac77fc..4d18a8ba 100644 --- a/src/projectile/projectile21.c +++ b/src/projectile/v3ElectricProjectile.c @@ -5,28 +5,30 @@ #include "coord.h" #include "functions.h" -extern void (*const gUnk_0812A954[])(Entity*); - -extern void (*const gUnk_0812A968[])(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); -void Projectile21(Entity* this) { - gUnk_0812A954[GetNextFunction(this)](this); +extern void (*const V3ElectricProjectile_Functions[])(Entity*); +extern void (*const V3ElectricProjectile_Actions[])(Entity*); +extern const u16 gUnk_0812A97C[]; +extern const u8 gUnk_0812A982[]; +extern const u8 gUnk_0812A98A[]; + +void V3ElectricProjectile(Entity* this) { + V3ElectricProjectile_Functions[GetNextFunction(this)](this); } -void sub_080ABFCC(Entity* this) { - gUnk_0812A968[this->action](this); +void V3ElectricProjectile_OnTick(Entity* this) { + V3ElectricProjectile_Actions[this->action](this); } void sub_080ABFE4(Entity* this) { DeleteThisEntity(); } -ASM_FUNC("asm/non_matching/projectile21/sub_080ABFEC.inc", void sub_080ABFEC(Entity* this)) +ASM_FUNC("asm/non_matching/v3ElectricProjectile/sub_080ABFEC.inc", void sub_080ABFEC(Entity* this)) -void sub_080AC074(Entity* this) { +void V3ElectricProjectile_Action1(Entity* this) { if (this->parent->next == NULL) { DeleteThisEntity(); } @@ -52,7 +54,7 @@ void sub_080AC074(Entity* this) { } } -void sub_080AC100(Entity* this) { +void V3ElectricProjectile_Action2(Entity* this) { u8 bVar1; s32 iVar2; u32 uVar3; @@ -75,6 +77,20 @@ void sub_080AC100(Entity* this) { } } -ASM_FUNC("asm/non_matching/projectile21/sub_080AC168.inc", void sub_080AC168(Entity* this)) +ASM_FUNC("asm/non_matching/v3ElectricProjectile/sub_080AC168.inc", void sub_080AC168(Entity* this)) -ASM_FUNC("asm/non_matching/projectile21/sub_080AC200.inc", void sub_080AC200(Entity* this)) +ASM_FUNC("asm/non_matching/v3ElectricProjectile/sub_080AC200.inc", void sub_080AC200(Entity* this)) + +void (*const V3ElectricProjectile_Functions[])(Entity*) = { + V3ElectricProjectile_OnTick, sub_080ABFE4, DeleteEntity, DeleteEntity, DeleteEntity, +}; +void (*const V3ElectricProjectile_Actions[])(Entity*) = { + sub_080ABFEC, V3ElectricProjectile_Action1, V3ElectricProjectile_Action2, sub_080AC168, sub_080AC200, +}; +const u16 gUnk_0812A97C[] = { 352, 480, 480 }; +const u8 gUnk_0812A982[] = { + 5, 6, 7, 8, 5, 6, 7, 6, +}; +const u8 gUnk_0812A98A[] = { + 6, 9, 9, 12, 6, 9, 9, 9, 0, 0, +}; diff --git a/src/projectile/projectile20.c b/src/projectile/v3HandProjectile.c similarity index 65% rename from src/projectile/projectile20.c rename to src/projectile/v3HandProjectile.c index 4c97790d..2c4ff6d2 100644 --- a/src/projectile/projectile20.c +++ b/src/projectile/v3HandProjectile.c @@ -3,16 +3,16 @@ #include "player.h" #include "audio.h" -extern void (*const gUnk_0812A84C[])(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); -void Projectile20(Entity* this) { - gUnk_0812A84C[GetNextFunction(this)](this); +extern void (*const V3HandProjectile_Functions[])(Entity*); + +void V3HandProjectile(Entity* this) { + V3HandProjectile_Functions[GetNextFunction(this)](this); } -void sub_080ABF40(Entity* this) { +void V3HandProjectile_OnTick(Entity* this) { if (this->action == 0) { this->action = 1; this->direction = GetFacingDirection(this, &gPlayerEntity); @@ -35,3 +35,7 @@ void sub_080ABF40(Entity* this) { void sub_080ABFA8(Entity* this) { DeleteThisEntity(); } + +void (*const V3HandProjectile_Functions[])(Entity*) = { + V3HandProjectile_OnTick, sub_080ABFA8, DeleteEntity, DeleteEntity, DeleteEntity, +}; diff --git a/src/projectile/v3TennisBallProjectile.c b/src/projectile/v3TennisBallProjectile.c new file mode 100644 index 00000000..82d64a3c --- /dev/null +++ b/src/projectile/v3TennisBallProjectile.c @@ -0,0 +1,73 @@ +#include "entity.h" +#include "enemy.h" +#include "audio.h" +#include "functions.h" + +extern s32 sub_080AF090(Entity*); +extern s32 sub_080A7EB0(Entity*); + +extern void (*const V3TennisBallProjectile_Functions[])(Entity*); +extern void (*const V3TennisBallProjectile_Actions[])(Entity*); + +void sub_080ACB90(Entity*); + +void V3TennisBallProjectile(Entity* this) { + V3TennisBallProjectile_Functions[GetNextFunction(this)](this); +} + +void V3TennisBallProjectile_OnTick(Entity* this) { + V3TennisBallProjectile_Actions[this->action](this); +} + +ASM_FUNC("asm/non_matching/v3TennisBallProjectile/sub_080ACA68.inc", void sub_080ACA68(Entity* this)) + +void V3TennisBallProjectile_Init(Entity* this) { + this->action = 1; + this->direction = 0x10; + this->height.HALF.HI = 0xfffc; + this->attachedEntity = NULL; + InitializeAnimation(this, 7); + SoundReq(SFX_199); +} + +void V3TennisBallProjectile_Action1(Entity* this) { + sub_080AF090(this); + GetNextFrame(this); + if (sub_080A7EB0(this) != 0) { + DeleteThisEntity(); + } +} + +void V3TennisBallProjectile_Action2(Entity* this) { + sub_080AF090(this); + if (this->collisions != 0) { + DeleteThisEntity(); + } + GetNextFrame(this); + sub_080ACB90(this); + if (sub_080A7EB0(this) != 0) { + DeleteThisEntity(); + } +} + +ASM_FUNC("asm/non_matching/v3TennisBallProjectile/sub_080ACB40.inc", void sub_080ACB40(Entity* this)) + +void sub_080ACB90(Entity* this) { + Entity* parent = this->parent; + if ((this->x.HALF.HI == parent->x.HALF.HI) && (this->y.HALF.HI <= parent->y.HALF.HI)) { + parent->field_0xf = 1; + CreateFx(this, 0x1f, 0x40); + EnqueueSFX(SFX_ITEM_GLOVES_KNOCKBACK); + DeleteThisEntity(); + } +} + +void (*const V3TennisBallProjectile_Functions[])(Entity*) = { + V3TennisBallProjectile_OnTick, sub_080ACA68, DeleteEntity, DeleteEntity, DeleteEntity, + V3TennisBallProjectile_OnTick, +}; +void (*const V3TennisBallProjectile_Actions[])(Entity*) = { + V3TennisBallProjectile_Init, + V3TennisBallProjectile_Action1, + V3TennisBallProjectile_Action2, +}; diff --git a/src/projectile/projectile7.c b/src/projectile/windProjectile.c similarity index 78% rename from src/projectile/projectile7.c rename to src/projectile/windProjectile.c index 9d59e7eb..92308f75 100644 --- a/src/projectile/projectile7.c +++ b/src/projectile/windProjectile.c @@ -3,20 +3,20 @@ #include "functions.h" #include "audio.h" -extern void (*const gUnk_0812979C[])(Entity*); - extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); extern void sub_08016AD2(Entity*); -void Projectile7(Entity* this) { +extern void (*const WindProjectile_Actions[])(Entity*); + +void WindProjectile(Entity* this) { if (GetNextFunction(this) != 0) { DeleteThisEntity(); } - gUnk_0812979C[this->action](this); + WindProjectile_Actions[this->action](this); } -void sub_080A8A90(Entity* this) { +void WindProjectile_Init(Entity* this) { if (this->type == 0) { this->action = 1; InitializeAnimation(this, this->direction >> 3); @@ -27,11 +27,9 @@ void sub_080A8A90(Entity* this) { } } -void sub_080A8AC8(Entity* this) { +void WindProjectile_Action1(Entity* this) { u32 direction; - Entity* parent; - - parent = this->parent; + Entity* parent = this->parent; if (parent == NULL) { DeleteEntity(this); } else { @@ -59,7 +57,7 @@ void sub_080A8AC8(Entity* this) { } } -void sub_080A8B38(Entity* this) { +void WindProjectile_Action2(Entity* this) { GetNextFrame(this); if (sub_080AF090(this) != 0) { if (sub_080A7EB0(this) != 0) { @@ -74,9 +72,16 @@ void sub_080A8B38(Entity* this) { } } -void sub_080A8B78(Entity* this) { +void WindProjectile_Action3(Entity* this) { GetNextFrame(this); if ((this->frames.all & 0x80) != 0) { DeleteEntity(this); } } + +void (*const WindProjectile_Actions[])(Entity*) = { + WindProjectile_Init, + WindProjectile_Action1, + WindProjectile_Action2, + WindProjectile_Action3, +}; diff --git a/src/projectile/projectile1D.c b/src/projectile/winder.c similarity index 60% rename from src/projectile/projectile1D.c rename to src/projectile/winder.c index c6dfe87f..19e35248 100644 --- a/src/projectile/projectile1D.c +++ b/src/projectile/winder.c @@ -3,15 +3,18 @@ #include "functions.h" #include "utils.h" -extern void (*const gUnk_0812A6B4[])(Entity*); +extern void (*const Winder_Actions[])(Entity*); +extern const u8 gUnk_0812A6BC[]; +extern const u8 gUnk_0812A6C4[]; + void sub_080AB9DC(Entity*); -void Projectile1D(Entity* this) { - gUnk_0812A6B4[this->action](this); +void Winder(Entity* this) { + Winder_Actions[this->action](this); sub_080AB9DC(this); } -void sub_080AB8E8(Entity* this) { +void Winder_Init(Entity* this) { Entity* entity; u16* puVar3; s32 index; @@ -25,7 +28,7 @@ void sub_080AB8E8(Entity* this) { } InitializeAnimation(this, 0); if (this->type < 4) { - entity = sub_080A7EE0(0x1d); + entity = CreateProjectile(0x1d); entity->type = this->type + 1; entity->parent = this->parent; entity->attachedEntity = this; @@ -41,7 +44,7 @@ void sub_080AB8E8(Entity* this) { } } -ASM_FUNC("asm/non_matching/projectile1D/sub_080AB950.inc", void sub_080AB950(Entity* this)) +ASM_FUNC("asm/non_matching/winder/sub_080AB950.inc", void sub_080AB950(Entity* this)) void sub_080AB9DC(Entity* this) { MemCopy(&this->field_0x6c, &this->field_0x68, 0x1c); @@ -49,4 +52,15 @@ void sub_080AB9DC(Entity* this) { this->field_0x86.HWORD = this->y.HALF.HI; } -ASM_FUNC("asm/non_matching/projectile1D/sub_080AB9FC.inc", void sub_080AB9FC(Entity* this)) +ASM_FUNC("asm/non_matching/winder/sub_080AB9FC.inc", void sub_080AB9FC(Entity* this)) + +void (*const Winder_Actions[])(Entity*) = { + Winder_Init, + sub_080AB950, +}; +const u8 gUnk_0812A6BC[] = { + 8, 24, 0, 16, 8, 24, 0, 16, +}; +const u8 gUnk_0812A6C4[] = { + 14, 0, 0, 224, 224, 0, 0, 14, +};