From 15ddcac8a431506f5e34bea717dab80432ed5590 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Mon, 14 Oct 2024 19:11:58 -0700 Subject: [PATCH] Colliders Sync Cylinders (#1709) --- include/z64actor.h | 2 +- include/z64collision_check.h | 32 +- src/code/z_actor.c | 8 +- src/code/z_collision_check.c | 313 +++++++++--------- src/code/z_fireobj.c | 2 +- .../z_bg_dblue_waterfall.c | 20 +- .../z_bg_hakugin_bombwall.c | 4 +- .../actors/ovl_Bg_Ikninside/z_bg_ikninside.c | 2 +- src/overlays/actors/ovl_Boss_01/z_boss_01.c | 2 +- src/overlays/actors/ovl_Boss_06/z_boss_06.c | 4 +- .../actors/ovl_Boss_Hakugin/z_boss_hakugin.c | 2 +- src/overlays/actors/ovl_En_Am/z_en_am.c | 14 +- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 8 +- .../actors/ovl_En_Bigpamet/z_en_bigpamet.c | 6 +- src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c | 8 +- .../actors/ovl_En_Bigslime/z_en_bigslime.c | 16 +- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 4 +- .../actors/ovl_En_Dekunuts/z_en_dekunuts.c | 10 +- .../actors/ovl_En_Floormas/z_en_floormas.c | 12 +- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 4 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 8 +- src/overlays/actors/ovl_En_Ik/z_en_ik.c | 8 +- src/overlays/actors/ovl_En_Ishi/z_en_ishi.c | 2 +- .../actors/ovl_En_Kaizoku/z_en_kaizoku.c | 20 +- src/overlays/actors/ovl_En_Kame/z_en_kame.c | 14 +- .../actors/ovl_En_Kanban/z_en_kanban.c | 2 +- .../actors/ovl_En_Karebaba/z_en_karebaba.c | 4 +- src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c | 2 +- .../actors/ovl_En_M_Fire1/z_en_m_fire1.c | 2 +- .../actors/ovl_En_M_Thunder/z_en_m_thunder.c | 12 +- .../actors/ovl_En_Nutsball/z_en_nutsball.c | 4 +- src/overlays/actors/ovl_En_Okuta/z_en_okuta.c | 12 +- .../actors/ovl_En_Peehat/z_en_peehat.c | 2 +- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 16 +- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 10 +- src/overlays/actors/ovl_En_Rd/z_en_rd.c | 2 +- src/overlays/actors/ovl_En_Rr/z_en_rr.c | 12 +- src/overlays/actors/ovl_En_Sb/z_en_sb.c | 6 +- src/overlays/actors/ovl_En_Slime/z_en_slime.c | 8 +- .../actors/ovl_En_Snowman/z_en_snowman.c | 8 +- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 20 +- .../actors/ovl_En_Tanron2/z_en_tanron2.c | 2 +- .../actors/ovl_En_Tanron5/z_en_tanron5.c | 4 +- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 8 +- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 10 +- .../actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c | 22 +- .../ovl_Obj_Bigicicle/z_obj_bigicicle.c | 2 +- .../actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c | 10 +- src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c | 4 +- .../ovl_Obj_Fireshield/z_obj_fireshield.c | 8 +- .../actors/ovl_Obj_Hamishi/z_obj_hamishi.c | 6 +- .../ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c | 2 +- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 4 +- .../actors/ovl_Obj_Iceblock/z_obj_iceblock.c | 4 +- .../actors/ovl_Obj_Kibako2/z_obj_kibako2.c | 6 +- .../ovl_Obj_Lightblock/z_obj_lightblock.c | 2 +- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 4 +- src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c | 8 +- src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c | 2 +- .../actors/ovl_Obj_Tsubo/z_obj_tsubo.c | 2 +- .../actors/ovl_player_actor/z_player.c | 36 +- 61 files changed, 404 insertions(+), 389 deletions(-) diff --git a/include/z64actor.h b/include/z64actor.h index fd74213844..e06cd7a169 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -863,7 +863,7 @@ void Actor_SetDropFlag(Actor* actor, ColliderElement* elem); void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph); void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* dst, s32 arg3); void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2); -void func_800BE504(Actor* actor, ColliderCylinder* collider); +void func_800BE504(Actor* actor, ColliderCylinder* cyl); void func_800BE568(Actor* actor, ColliderSphere* collider); void func_800BE5CC(Actor* actor, ColliderJntSph* jntSph, s32 elemIndex); s32 Actor_IsSmallChest(struct EnBox* chest); diff --git a/include/z64collision_check.h b/include/z64collision_check.h index d031f3fb1b..5aa83b5c75 100644 --- a/include/z64collision_check.h +++ b/include/z64collision_check.h @@ -148,27 +148,35 @@ typedef struct { /* 0xC */ ColliderJntSphElementInit* elements; } ColliderJntSphInitToActor; // size = 0x10 +/* + * Cylinder - A single cylinder shaped collider + */ + +// collider structs + typedef struct { /* 0x00 */ Collider base; - /* 0x18 */ ColliderElement info; + /* 0x18 */ ColliderElement elem; /* 0x40 */ Cylinder16 dim; } ColliderCylinder; // size = 0x4C +// init data structs + typedef struct { /* 0x00 */ ColliderInit base; - /* 0x08 */ ColliderElementInit info; + /* 0x08 */ ColliderElementInit elem; /* 0x20 */ Cylinder16 dim; } ColliderCylinderInit; // size = 0x2C typedef struct { /* 0x00 */ ColliderInitType1 base; - /* 0x08 */ ColliderElementInit info; + /* 0x08 */ ColliderElementInit elem; /* 0x20 */ Cylinder16 dim; } ColliderCylinderInitType1; // size = 0x2C typedef struct { /* 0x00 */ ColliderInitToActor base; - /* 0x08 */ ColliderElementInit info; + /* 0x08 */ ColliderElementInit elem; /* 0x20 */ Cylinder16 dim; } ColliderCylinderInitToActor; // size = 0x2C @@ -519,12 +527,12 @@ s32 Collider_ResetJntSphOC(struct PlayState* play, Collider* col); s32 Collider_InitCylinderDim(struct PlayState* play, Cylinder16* dim); s32 Collider_DestroyCylinderDim(struct PlayState* play, Cylinder16* dim); s32 Collider_SetCylinderDim(struct PlayState* play, Cylinder16* dim, Cylinder16* src); -s32 Collider_InitCylinder(struct PlayState* play, ColliderCylinder* collider); -s32 Collider_DestroyCylinder(struct PlayState* play, ColliderCylinder* collider); -s32 Collider_SetCylinderToActor(struct PlayState* play, ColliderCylinder* collider, ColliderCylinderInitToActor* src); -s32 Collider_SetCylinderType1(struct PlayState* play, ColliderCylinder* collider, struct Actor* actor, ColliderCylinderInitType1* src); -s32 Collider_SetCylinder(struct PlayState* play, ColliderCylinder* collider, struct Actor* actor, ColliderCylinderInit* src); -s32 Collider_InitAndSetCylinder(struct PlayState* play, ColliderCylinder* collider, struct Actor* actor, ColliderCylinderInit* src); +s32 Collider_InitCylinder(struct PlayState* play, ColliderCylinder* cyl); +s32 Collider_DestroyCylinder(struct PlayState* play, ColliderCylinder* cyl); +s32 Collider_SetCylinderToActor(struct PlayState* play, ColliderCylinder* dest, ColliderCylinderInitToActor* src); +s32 Collider_SetCylinderType1(struct PlayState* play, ColliderCylinder* dest, struct Actor* actor, ColliderCylinderInitType1* src); +s32 Collider_SetCylinder(struct PlayState* play, ColliderCylinder* dest, struct Actor* actor, ColliderCylinderInit* src); +s32 Collider_InitAndSetCylinder(struct PlayState* play, ColliderCylinder* dest, struct Actor* actor, ColliderCylinderInit* src); s32 Collider_ResetCylinderAT(struct PlayState* play, Collider* col); s32 Collider_ResetCylinderAC(struct PlayState* play, Collider* col); s32 Collider_ResetCylinderOC(struct PlayState* play, Collider* col); @@ -666,8 +674,8 @@ s32 CollisionCheck_LineOC_Sphere(struct PlayState* play, CollisionCheckContext* s32 CollisionCheck_LineOC(struct PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b, struct Actor** exclusions, s32 numExclusions); s32 CollisionCheck_LineOCCheckAll(struct PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b); s32 CollisionCheck_LineOCCheck(struct PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b, struct Actor** exclusions, s32 numExclusions); -void Collider_UpdateCylinder(struct Actor* actor, ColliderCylinder* collider); -void Collider_SetCylinderPosition(ColliderCylinder* collider, Vec3s* pos); +void Collider_UpdateCylinder(struct Actor* actor, ColliderCylinder* cyl); +void Collider_SetCylinderPosition(ColliderCylinder* cyl, Vec3s* pos); void Collider_SetQuadVertices(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d); void Collider_SetTrisVertices(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c); void Collider_SetTrisDim(struct PlayState* play, ColliderTris* collider, s32 index, ColliderTrisElementDimInit* init); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 311085a3b3..76885f8525 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -4789,12 +4789,12 @@ void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2) { } } -void func_800BE504(Actor* actor, ColliderCylinder* collider) { +void func_800BE504(Actor* actor, ColliderCylinder* cyl) { // Checks if was hit by either DMG_NORMAL_ARROW, DMG_FIRE_ARROW, DMG_ICE_ARROW, DMG_LIGHT_ARROW or DMG_DEKU_BUBBLE - if ((collider->info.acHitElem->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20))) { - actor->world.rot.y = collider->base.ac->shape.rot.y; + if ((cyl->elem.acHitElem->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20))) { + actor->world.rot.y = cyl->base.ac->shape.rot.y; } else { - actor->world.rot.y = Actor_WorldYawTowardActor(collider->base.ac, actor); + actor->world.rot.y = Actor_WorldYawTowardActor(cyl->base.ac, actor); } } diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index c77d9ea3b6..b7138b1fb1 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -564,20 +564,20 @@ s32 Collider_SetCylinderDim(struct PlayState* play, Cylinder16* dim, Cylinder16* /** * Initializes a ColliderCylinder to default values */ -s32 Collider_InitCylinder(struct PlayState* play, ColliderCylinder* collider) { - Collider_InitBase(play, &collider->base); - Collider_InitElement(play, &collider->info); - Collider_InitCylinderDim(play, &collider->dim); +s32 Collider_InitCylinder(struct PlayState* play, ColliderCylinder* cyl) { + Collider_InitBase(play, &cyl->base); + Collider_InitElement(play, &cyl->elem); + Collider_InitCylinderDim(play, &cyl->dim); return 1; } /** * Destroys a ColliderCylinder */ -s32 Collider_DestroyCylinder(struct PlayState* play, ColliderCylinder* collider) { - Collider_DestroyBase(play, &collider->base); - Collider_DestroyElement(play, &collider->info); - Collider_DestroyCylinderDim(play, &collider->dim); +s32 Collider_DestroyCylinder(struct PlayState* play, ColliderCylinder* cyl) { + Collider_DestroyBase(play, &cyl->base); + Collider_DestroyElement(play, &cyl->elem); + Collider_DestroyCylinderDim(play, &cyl->dim); return 1; } @@ -585,41 +585,41 @@ s32 Collider_DestroyCylinder(struct PlayState* play, ColliderCylinder* collider) * Sets up the ColliderCylinder using the values in src and sets it to the actor specified in src. Uses default * OC2_TYPE_1 and COLTYPE_0. */ -s32 Collider_SetCylinderToActor(struct PlayState* play, ColliderCylinder* collider, ColliderCylinderInitToActor* src) { - Collider_SetBaseToActor(play, &collider->base, &src->base); - Collider_SetElement(play, &collider->info, &src->info); - Collider_SetCylinderDim(play, &collider->dim, &src->dim); +s32 Collider_SetCylinderToActor(struct PlayState* play, ColliderCylinder* dest, ColliderCylinderInitToActor* src) { + Collider_SetBaseToActor(play, &dest->base, &src->base); + Collider_SetElement(play, &dest->elem, &src->elem); + Collider_SetCylinderDim(play, &dest->dim, &src->dim); return 1; } /** * Sets up the ColliderCylinder using the values in src. Uses default OC2_TYPE_1 */ -s32 Collider_SetCylinderType1(struct PlayState* play, ColliderCylinder* collider, Actor* actor, +s32 Collider_SetCylinderType1(struct PlayState* play, ColliderCylinder* dest, Actor* actor, ColliderCylinderInitType1* src) { - Collider_SetBaseType1(play, &collider->base, actor, &src->base); - Collider_SetElement(play, &collider->info, &src->info); - Collider_SetCylinderDim(play, &collider->dim, &src->dim); + Collider_SetBaseType1(play, &dest->base, actor, &src->base); + Collider_SetElement(play, &dest->elem, &src->elem); + Collider_SetCylinderDim(play, &dest->dim, &src->dim); return 1; } /** * Sets up the ColliderCylinder using the values in src. */ -s32 Collider_SetCylinder(struct PlayState* play, ColliderCylinder* collider, Actor* actor, ColliderCylinderInit* src) { - Collider_SetBase(play, &collider->base, actor, &src->base); - Collider_SetElement(play, &collider->info, &src->info); - Collider_SetCylinderDim(play, &collider->dim, &src->dim); +s32 Collider_SetCylinder(struct PlayState* play, ColliderCylinder* dest, Actor* actor, ColliderCylinderInit* src) { + Collider_SetBase(play, &dest->base, actor, &src->base); + Collider_SetElement(play, &dest->elem, &src->elem); + Collider_SetCylinderDim(play, &dest->dim, &src->dim); return 1; } /** * Fully initializes a ColliderCylinder using the values in src. */ -s32 Collider_InitAndSetCylinder(struct PlayState* play, ColliderCylinder* collider, Actor* actor, +s32 Collider_InitAndSetCylinder(struct PlayState* play, ColliderCylinder* dest, Actor* actor, ColliderCylinderInit* src) { - Collider_InitCylinder(play, collider); - Collider_SetCylinder(play, collider, actor, src); + Collider_InitCylinder(play, dest); + Collider_SetCylinder(play, dest, actor, src); return 1; } @@ -627,10 +627,10 @@ s32 Collider_InitAndSetCylinder(struct PlayState* play, ColliderCylinder* collid * Resets the collider's AT collision flags. */ s32 Collider_ResetCylinderAT(struct PlayState* play, Collider* col) { - ColliderCylinder* cylinder = (ColliderCylinder*)col; + ColliderCylinder* cyl = (ColliderCylinder*)col; - Collider_ResetATBase(play, &cylinder->base); - Collider_ResetATElement(play, &cylinder->info); + Collider_ResetATBase(play, &cyl->base); + Collider_ResetATElement(play, &cyl->elem); return 1; } @@ -638,10 +638,10 @@ s32 Collider_ResetCylinderAT(struct PlayState* play, Collider* col) { * Resets the collider's AC collision flags. */ s32 Collider_ResetCylinderAC(struct PlayState* play, Collider* col) { - ColliderCylinder* cylinder = (ColliderCylinder*)col; + ColliderCylinder* cyl = (ColliderCylinder*)col; - Collider_ResetACBase(play, &cylinder->base); - Collider_ResetACElement(play, &cylinder->info); + Collider_ResetACBase(play, &cyl->base); + Collider_ResetACElement(play, &cyl->elem); return 1; } @@ -649,10 +649,10 @@ s32 Collider_ResetCylinderAC(struct PlayState* play, Collider* col) { * Resets the collider's OC collision flags. */ s32 Collider_ResetCylinderOC(struct PlayState* play, Collider* col) { - ColliderCylinder* cylinder = (ColliderCylinder*)col; + ColliderCylinder* cyl = (ColliderCylinder*)col; - Collider_ResetOCBase(play, &cylinder->base); - Collider_ResetOCElement(play, &cylinder->info); + Collider_ResetOCBase(play, &cyl->base); + Collider_ResetOCElement(play, &cyl->elem); return 1; } @@ -1843,31 +1843,32 @@ void CollisionCheck_AC_JntSphVsCyl(struct PlayState* play, CollisionCheckContext Collider* acCol) { ColliderJntSph* atJntSph = (ColliderJntSph*)atCol; ColliderJntSphElement* atJntSphElem; - ColliderCylinder* ac = (ColliderCylinder*)acCol; + ColliderCylinder* acCyl = (ColliderCylinder*)acCol; f32 overlapSize; f32 centerDist; - if ((atJntSph->count > 0) && (atJntSph->elements != NULL) && (ac->dim.radius > 0) && (ac->dim.height > 0)) { - if (CollisionCheck_SkipBump(&ac->info)) { + if ((atJntSph->count > 0) && (atJntSph->elements != NULL) && (acCyl->dim.radius > 0) && (acCyl->dim.height > 0)) { + if (CollisionCheck_SkipBump(&acCyl->elem)) { return; } for (atJntSphElem = atJntSph->elements; atJntSphElem < &atJntSph->elements[atJntSph->count]; atJntSphElem++) { if (CollisionCheck_SkipTouch(&atJntSphElem->base)) { continue; } - if (CollisionCheck_NoSharedFlags(&atJntSphElem->base, &ac->info)) { + if (CollisionCheck_NoSharedFlags(&atJntSphElem->base, &acCyl->elem)) { continue; } - if (Math3D_SphVsCylOverlapCenterDist(&atJntSphElem->dim.worldSphere, &ac->dim, &overlapSize, ¢erDist)) { + if (Math3D_SphVsCylOverlapCenterDist(&atJntSphElem->dim.worldSphere, &acCyl->dim, &overlapSize, + ¢erDist)) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; f32 acToHit; Math_Vec3s_ToVec3f(&atPos, &atJntSphElem->dim.worldSphere.center); - Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos); + Math_Vec3s_ToVec3f(&acPos, &acCyl->dim.pos); if (!IS_ZERO(centerDist)) { - acToHit = ac->dim.radius / centerDist; + acToHit = acCyl->dim.radius / centerDist; if (acToHit <= 1.0f) { hitPos.x = ((atPos.x - acPos.x) * acToHit) + acPos.x; hitPos.y = ((atPos.y - acPos.y) * acToHit) + acPos.y; @@ -1878,7 +1879,7 @@ void CollisionCheck_AC_JntSphVsCyl(struct PlayState* play, CollisionCheckContext } else { Math_Vec3f_Copy(&hitPos, &atPos); } - CollisionCheck_SetATvsAC(play, &atJntSph->base, &atJntSphElem->base, &atPos, &ac->base, &ac->info, + CollisionCheck_SetATvsAC(play, &atJntSph->base, &atJntSphElem->base, &atPos, &acCyl->base, &acCyl->elem, &acPos, &hitPos); return; } @@ -2014,30 +2015,31 @@ void CollisionCheck_AC_JntSphVsSphere(struct PlayState* play, CollisionCheckCont */ void CollisionCheck_AC_CylVsJntSph(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { - ColliderCylinder* at = (ColliderCylinder*)atCol; + ColliderCylinder* atCyl = (ColliderCylinder*)atCol; ColliderJntSph* acJntSph = (ColliderJntSph*)acCol; f32 overlapSize; f32 centerDist; ColliderJntSphElement* acJntSphElem; - if ((acJntSph->count > 0) && (acJntSph->elements != NULL) && (at->dim.radius > 0) && (at->dim.height > 0)) { - if (CollisionCheck_SkipTouch(&at->info)) { + if ((acJntSph->count > 0) && (acJntSph->elements != NULL) && (atCyl->dim.radius > 0) && (atCyl->dim.height > 0)) { + if (CollisionCheck_SkipTouch(&atCyl->elem)) { return; } for (acJntSphElem = acJntSph->elements; acJntSphElem < &acJntSph->elements[acJntSph->count]; acJntSphElem++) { if (CollisionCheck_SkipBump(&acJntSphElem->base)) { continue; } - if (CollisionCheck_NoSharedFlags(&at->info, &acJntSphElem->base)) { + if (CollisionCheck_NoSharedFlags(&atCyl->elem, &acJntSphElem->base)) { continue; } - if (Math3D_SphVsCylOverlapCenterDist(&acJntSphElem->dim.worldSphere, &at->dim, &overlapSize, ¢erDist)) { + if (Math3D_SphVsCylOverlapCenterDist(&acJntSphElem->dim.worldSphere, &atCyl->dim, &overlapSize, + ¢erDist)) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; f32 acToHit; - Math_Vec3s_ToVec3f(&atPos, &at->dim.pos); + Math_Vec3s_ToVec3f(&atPos, &atCyl->dim.pos); Math_Vec3s_ToVec3f(&acPos, &acJntSphElem->dim.worldSphere.center); if (!IS_ZERO(centerDist)) { acToHit = acJntSphElem->dim.worldSphere.radius / centerDist; @@ -2051,7 +2053,7 @@ void CollisionCheck_AC_CylVsJntSph(struct PlayState* play, CollisionCheckContext } else { Math_Vec3f_Copy(&hitPos, &atPos); } - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &acJntSph->base, &acJntSphElem->base, + CollisionCheck_SetATvsAC(play, &atCyl->base, &atCyl->elem, &atPos, &acJntSph->base, &acJntSphElem->base, &acPos, &hitPos); if (!(acJntSph->base.ocFlags2 & OC2_FIRST_ONLY)) { break; @@ -2066,50 +2068,51 @@ void CollisionCheck_AC_CylVsJntSph(struct PlayState* play, CollisionCheckContext */ void CollisionCheck_AC_CylVsCyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { - ColliderCylinder* at = (ColliderCylinder*)atCol; - ColliderCylinder* ac = (ColliderCylinder*)acCol; + ColliderCylinder* atCyl = (ColliderCylinder*)atCol; + ColliderCylinder* acCyl = (ColliderCylinder*)acCol; f32 overlapSize; f32 centerDist; - if ((at->dim.radius > 0) && (at->dim.height > 0) && (ac->dim.radius > 0) && (ac->dim.height > 0)) { - if (CollisionCheck_SkipBump(&ac->info)) { + if ((atCyl->dim.radius > 0) && (atCyl->dim.height > 0) && (acCyl->dim.radius > 0) && (acCyl->dim.height > 0)) { + if (CollisionCheck_SkipBump(&acCyl->elem)) { return; } - if (CollisionCheck_SkipTouch(&at->info)) { + if (CollisionCheck_SkipTouch(&atCyl->elem)) { return; } - if (CollisionCheck_NoSharedFlags(&at->info, &ac->info)) { + if (CollisionCheck_NoSharedFlags(&atCyl->elem, &acCyl->elem)) { return; } - if (Math3D_CylVsCylOverlapCenterDist(&at->dim, &ac->dim, &overlapSize, ¢erDist)) { + if (Math3D_CylVsCylOverlapCenterDist(&atCyl->dim, &acCyl->dim, &overlapSize, ¢erDist)) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; - Math_Vec3s_ToVec3f(&atPos, &at->dim.pos); - Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos); + Math_Vec3s_ToVec3f(&atPos, &atCyl->dim.pos); + Math_Vec3s_ToVec3f(&acPos, &acCyl->dim.pos); if (!IS_ZERO(centerDist)) { - f32 acToHit = ac->dim.radius / centerDist; + f32 acToHit = acCyl->dim.radius / centerDist; f32 height; - hitPos.y = (f32)at->dim.pos.y + at->dim.yShift + at->dim.height * 0.5f; - height = (f32)ac->dim.pos.y + ac->dim.yShift; + hitPos.y = (f32)atCyl->dim.pos.y + atCyl->dim.yShift + atCyl->dim.height * 0.5f; + height = (f32)acCyl->dim.pos.y + acCyl->dim.yShift; if (hitPos.y < height) { hitPos.y = height; } else { - height += ac->dim.height; + height += acCyl->dim.height; if (hitPos.y > height) { hitPos.y = height; } } - hitPos.x = ((f32)at->dim.pos.x - ac->dim.pos.x) * acToHit + ac->dim.pos.x; - hitPos.z = ((f32)at->dim.pos.z - ac->dim.pos.z) * acToHit + ac->dim.pos.z; + hitPos.x = ((f32)atCyl->dim.pos.x - acCyl->dim.pos.x) * acToHit + acCyl->dim.pos.x; + hitPos.z = ((f32)atCyl->dim.pos.z - acCyl->dim.pos.z) * acToHit + acCyl->dim.pos.z; } else { - Math_Vec3s_ToVec3f(&hitPos, &ac->dim.pos); + Math_Vec3s_ToVec3f(&hitPos, &acCyl->dim.pos); } - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &hitPos); + CollisionCheck_SetATvsAC(play, &atCyl->base, &atCyl->elem, &atPos, &acCyl->base, &acCyl->elem, &acPos, + &hitPos); } } } @@ -2119,13 +2122,13 @@ void CollisionCheck_AC_CylVsCyl(struct PlayState* play, CollisionCheckContext* c */ void CollisionCheck_AC_CylVsTris(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { - ColliderCylinder* at = (ColliderCylinder*)atCol; + ColliderCylinder* atCyl = (ColliderCylinder*)atCol; ColliderTris* ac = (ColliderTris*)acCol; ColliderTrisElement* acElem; Vec3f hitPos; - if ((at->dim.radius > 0) && (at->dim.height > 0) && (ac->count > 0) && (ac->elements != NULL)) { - if (CollisionCheck_SkipTouch(&at->info)) { + if ((atCyl->dim.radius > 0) && (atCyl->dim.height > 0) && (ac->count > 0) && (ac->elements != NULL)) { + if (CollisionCheck_SkipTouch(&atCyl->elem)) { return; } @@ -2133,17 +2136,18 @@ void CollisionCheck_AC_CylVsTris(struct PlayState* play, CollisionCheckContext* if (CollisionCheck_SkipBump(&acElem->info)) { continue; } - if (CollisionCheck_NoSharedFlags(&at->info, &acElem->info)) { + if (CollisionCheck_NoSharedFlags(&atCyl->elem, &acElem->info)) { continue; } - if (Math3D_CylTriVsIntersect(&at->dim, &acElem->dim, &hitPos)) { + if (Math3D_CylTriVsIntersect(&atCyl->dim, &acElem->dim, &hitPos)) { Vec3f atPos; Vec3f acPos; - Math_Vec3s_ToVec3f(&atPos, &at->dim.pos); + Math_Vec3s_ToVec3f(&atPos, &atCyl->dim.pos); CollisionCheck_TrisAvgPoint(acElem, &acPos); - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &acElem->info, &acPos, &hitPos); + CollisionCheck_SetATvsAC(play, &atCyl->base, &atCyl->elem, &atPos, &ac->base, &acElem->info, &acPos, + &hitPos); return; } } @@ -2155,36 +2159,38 @@ void CollisionCheck_AC_CylVsTris(struct PlayState* play, CollisionCheckContext* */ void CollisionCheck_AC_CylVsQuad(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { - ColliderCylinder* at = (ColliderCylinder*)atCol; + ColliderCylinder* atCyl = (ColliderCylinder*)atCol; ColliderQuad* ac = (ColliderQuad*)acCol; - if ((at->dim.height > 0) && (at->dim.radius > 0)) { - if (CollisionCheck_SkipTouch(&at->info)) { + if ((atCyl->dim.height > 0) && (atCyl->dim.radius > 0)) { + if (CollisionCheck_SkipTouch(&atCyl->elem)) { return; } if (CollisionCheck_SkipBump(&ac->info)) { return; } - if (CollisionCheck_NoSharedFlags(&at->info, &ac->info)) { + if (CollisionCheck_NoSharedFlags(&atCyl->elem, &ac->info)) { return; } Math3D_TriNorm(&D_801EF600, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]); Math3D_TriNorm(&D_801EF638, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]); - if (Math3D_CylTriVsIntersect(&at->dim, &D_801EF600, &D_801EDE00)) { + if (Math3D_CylTriVsIntersect(&atCyl->dim, &D_801EF600, &D_801EDE00)) { Vec3f atPos; Vec3f acPos; - Math_Vec3s_ToVec3f(&atPos, &at->dim.pos); + Math_Vec3s_ToVec3f(&atPos, &atCyl->dim.pos); CollisionCheck_QuadAvgPoint(ac, &acPos); - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &D_801EDE00); - } else if (Math3D_CylTriVsIntersect(&at->dim, &D_801EF638, &D_801EDE00)) { + CollisionCheck_SetATvsAC(play, &atCyl->base, &atCyl->elem, &atPos, &ac->base, &ac->info, &acPos, + &D_801EDE00); + } else if (Math3D_CylTriVsIntersect(&atCyl->dim, &D_801EF638, &D_801EDE00)) { Vec3f atPos; Vec3f acPos; - Math_Vec3s_ToVec3f(&atPos, &at->dim.pos); + Math_Vec3s_ToVec3f(&atPos, &atCyl->dim.pos); CollisionCheck_QuadAvgPoint(ac, &acPos); - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &D_801EDE00); + CollisionCheck_SetATvsAC(play, &atCyl->base, &atCyl->elem, &atPos, &ac->base, &ac->info, &acPos, + &D_801EDE00); } } } @@ -2194,29 +2200,29 @@ void CollisionCheck_AC_CylVsQuad(struct PlayState* play, CollisionCheckContext* */ void CollisionCheck_AC_CylVsSphere(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { - ColliderCylinder* at = (ColliderCylinder*)atCol; + ColliderCylinder* atCyl = (ColliderCylinder*)atCol; ColliderSphere* ac = (ColliderSphere*)acCol; f32 overlapSize; f32 centerDist; - if ((at->dim.radius > 0) && (at->dim.height > 0)) { - if (CollisionCheck_SkipTouch(&at->info)) { + if ((atCyl->dim.radius > 0) && (atCyl->dim.height > 0)) { + if (CollisionCheck_SkipTouch(&atCyl->elem)) { return; } if (CollisionCheck_SkipBump(&ac->info)) { return; } - if (CollisionCheck_NoSharedFlags(&at->info, &ac->info)) { + if (CollisionCheck_NoSharedFlags(&atCyl->elem, &ac->info)) { return; } - if (Math3D_SphVsCylOverlapCenterDist(&ac->dim.worldSphere, &at->dim, &overlapSize, ¢erDist)) { + if (Math3D_SphVsCylOverlapCenterDist(&ac->dim.worldSphere, &atCyl->dim, &overlapSize, ¢erDist)) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; f32 acToHit; - Math_Vec3s_ToVec3f(&atPos, &at->dim.pos); + Math_Vec3s_ToVec3f(&atPos, &atCyl->dim.pos); Math_Vec3s_ToVec3f(&acPos, &ac->dim.worldSphere.center); if (!IS_ZERO(centerDist)) { @@ -2231,7 +2237,7 @@ void CollisionCheck_AC_CylVsSphere(struct PlayState* play, CollisionCheckContext } else { Math_Vec3f_Copy(&hitPos, &atPos); } - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &hitPos); + CollisionCheck_SetATvsAC(play, &atCyl->base, &atCyl->elem, &atPos, &ac->base, &ac->info, &acPos, &hitPos); } } } @@ -2283,27 +2289,27 @@ void CollisionCheck_AC_TrisVsJntSph(struct PlayState* play, CollisionCheckContex void CollisionCheck_AC_TrisVsCyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { ColliderTris* at = (ColliderTris*)atCol; - ColliderCylinder* ac = (ColliderCylinder*)acCol; + ColliderCylinder* acCyl = (ColliderCylinder*)acCol; ColliderTrisElement* atElem; - if ((ac->dim.radius > 0) && (ac->dim.height > 0) && (at->count > 0) && (at->elements != NULL)) { - if (CollisionCheck_SkipBump(&ac->info)) { + if ((acCyl->dim.radius > 0) && (acCyl->dim.height > 0) && (at->count > 0) && (at->elements != NULL)) { + if (CollisionCheck_SkipBump(&acCyl->elem)) { return; } for (atElem = at->elements; atElem < &at->elements[at->count]; atElem++) { if (CollisionCheck_SkipTouch(&atElem->info)) { continue; } - if (CollisionCheck_NoSharedFlags(&atElem->info, &ac->info)) { + if (CollisionCheck_NoSharedFlags(&atElem->info, &acCyl->elem)) { continue; } - if (Math3D_CylTriVsIntersect(&ac->dim, &atElem->dim, &D_801EDE10)) { + if (Math3D_CylTriVsIntersect(&acCyl->dim, &atElem->dim, &D_801EDE10)) { Vec3f atPos; Vec3f acPos; CollisionCheck_TrisAvgPoint(atElem, &atPos); - Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos); - CollisionCheck_SetATvsAC(play, &at->base, &atElem->info, &atPos, &ac->base, &ac->info, &acPos, + Math_Vec3s_ToVec3f(&acPos, &acCyl->dim.pos); + CollisionCheck_SetATvsAC(play, &at->base, &atElem->info, &atPos, &acCyl->base, &acCyl->elem, &acPos, &D_801EDE10); return; } @@ -2471,41 +2477,43 @@ void CollisionCheck_AC_QuadVsJntSph(struct PlayState* play, CollisionCheckContex void CollisionCheck_AC_QuadVsCyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { ColliderQuad* at = (ColliderQuad*)atCol; - ColliderCylinder* ac = (ColliderCylinder*)acCol; + ColliderCylinder* acCyl = (ColliderCylinder*)acCol; - if ((ac->dim.height > 0) && (ac->dim.radius > 0)) { - if (CollisionCheck_SkipBump(&ac->info)) { + if ((acCyl->dim.height > 0) && (acCyl->dim.radius > 0)) { + if (CollisionCheck_SkipBump(&acCyl->elem)) { return; } if (CollisionCheck_SkipTouch(&at->info)) { return; } - if (CollisionCheck_NoSharedFlags(&at->info, &ac->info)) { + if (CollisionCheck_NoSharedFlags(&at->info, &acCyl->elem)) { return; } Math3D_TriNorm(&D_801EDF58, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]); Math3D_TriNorm(&D_801EDF90, &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]); - if (Math3D_CylTriVsIntersect(&ac->dim, &D_801EDF58, &D_801EDFE0)) { + if (Math3D_CylTriVsIntersect(&acCyl->dim, &D_801EDF58, &D_801EDFE0)) { if (Collider_QuadSetNearestAC(play, at, &D_801EDFE0)) { Vec3f atPos; Vec3f acPos; CollisionCheck_QuadAvgPoint(at, &atPos); - Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos); - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &D_801EDFE0); + Math_Vec3s_ToVec3f(&acPos, &acCyl->dim.pos); + CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &acCyl->base, &acCyl->elem, &acPos, + &D_801EDFE0); return; } } - if (Math3D_CylTriVsIntersect(&ac->dim, &D_801EDF90, &D_801EDFE0)) { + if (Math3D_CylTriVsIntersect(&acCyl->dim, &D_801EDF90, &D_801EDFE0)) { if (Collider_QuadSetNearestAC(play, at, &D_801EDFE0)) { Vec3f atPos; Vec3f acPos; CollisionCheck_QuadAvgPoint(at, &atPos); - Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos); - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &D_801EDFE0); + Math_Vec3s_ToVec3f(&acPos, &acCyl->dim.pos); + CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &acCyl->base, &acCyl->elem, &acPos, + &D_801EDFE0); } } } @@ -2679,7 +2687,7 @@ void CollisionCheck_AC_SphereVsJntSph(struct PlayState* play, CollisionCheckCont */ void CollisionCheck_AC_SphereVsCylinder(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { - ColliderCylinder* ac = (ColliderCylinder*)acCol; + ColliderCylinder* acCyl = (ColliderCylinder*)acCol; ColliderSphere* at = (ColliderSphere*)atCol; f32 overlapSize; f32 centerDist; @@ -2687,23 +2695,23 @@ void CollisionCheck_AC_SphereVsCylinder(struct PlayState* play, CollisionCheckCo if (CollisionCheck_SkipTouch(&at->info)) { return; } - if (CollisionCheck_SkipBump(&ac->info)) { + if (CollisionCheck_SkipBump(&acCyl->elem)) { return; } - if (CollisionCheck_NoSharedFlags(&at->info, &ac->info)) { + if (CollisionCheck_NoSharedFlags(&at->info, &acCyl->elem)) { return; } - if (Math3D_SphVsCylOverlapCenterDist(&at->dim.worldSphere, &ac->dim, &overlapSize, ¢erDist)) { + if (Math3D_SphVsCylOverlapCenterDist(&at->dim.worldSphere, &acCyl->dim, &overlapSize, ¢erDist)) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; Math_Vec3s_ToVec3f(&atPos, &at->dim.worldSphere.center); - Math_Vec3s_ToVec3f(&acPos, &ac->dim.pos); + Math_Vec3s_ToVec3f(&acPos, &acCyl->dim.pos); if (!IS_ZERO(centerDist)) { - f32 acToHit = ac->dim.radius / centerDist; + f32 acToHit = acCyl->dim.radius / centerDist; if (acToHit <= 1.0f) { hitPos.x = (atPos.x - acPos.x) * acToHit + acPos.x; @@ -2715,7 +2723,7 @@ void CollisionCheck_AC_SphereVsCylinder(struct PlayState* play, CollisionCheckCo } else { Math_Vec3f_Copy(&hitPos, &atPos); } - CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &hitPos); + CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &acCyl->base, &acCyl->elem, &acPos, &hitPos); } if (at) {} @@ -2849,16 +2857,15 @@ void CollisionCheck_SetJntSphHitFX(struct PlayState* play, CollisionCheckContext * Sets a ColliderCylinder's hit effects */ void CollisionCheck_SetCylHitFX(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) { - ColliderCylinder* cylinder = (ColliderCylinder*)col; + ColliderCylinder* cyl = (ColliderCylinder*)col; - if ((cylinder->info.bumperFlags & BUMP_DRAW_HITMARK) && (cylinder->info.acHitElem != NULL) && - !(cylinder->info.acHitElem->toucherFlags & TOUCH_DREW_HITMARK)) { + if ((cyl->elem.bumperFlags & BUMP_DRAW_HITMARK) && (cyl->elem.acHitElem != NULL) && + !(cyl->elem.acHitElem->toucherFlags & TOUCH_DREW_HITMARK)) { Vec3f hitPos; - Math_Vec3s_ToVec3f(&hitPos, &cylinder->info.bumper.hitPos); - CollisionCheck_HitEffects(play, cylinder->info.acHit, cylinder->info.acHitElem, &cylinder->base, - &cylinder->info, &hitPos); - cylinder->info.acHitElem->toucherFlags |= TOUCH_DREW_HITMARK; + Math_Vec3s_ToVec3f(&hitPos, &cyl->elem.bumper.hitPos); + CollisionCheck_HitEffects(play, cyl->elem.acHit, cyl->elem.acHitElem, &cyl->base, &cyl->elem, &hitPos); + cyl->elem.acHitElem->toucherFlags |= TOUCH_DREW_HITMARK; } } @@ -3195,26 +3202,26 @@ void CollisionCheck_OC_JntSphVsJntSph(struct PlayState* play, CollisionCheckCont void CollisionCheck_OC_JntSphVsCyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* leftCol, Collider* rightCol) { ColliderJntSph* leftJntSph = (ColliderJntSph*)leftCol; - ColliderCylinder* right = (ColliderCylinder*)rightCol; + ColliderCylinder* rightCyl = (ColliderCylinder*)rightCol; ColliderJntSphElement* leftJntSphElem; f32 overlapSize; if ((leftJntSph->count > 0) && (leftJntSph->elements != NULL) && (leftJntSph->base.ocFlags1 & OCELEM_ON) && - (right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) { + (rightCyl->base.ocFlags1 & OCELEM_ON) && (rightCyl->elem.ocElemFlags & OCELEM_ON)) { for (leftJntSphElem = leftJntSph->elements; leftJntSphElem < &leftJntSph->elements[leftJntSph->count]; leftJntSphElem++) { if (!(leftJntSphElem->base.ocElemFlags & OCELEM_ON)) { continue; } - if (Math3D_SphVsCylOverlap(&leftJntSphElem->dim.worldSphere, &right->dim, &overlapSize)) { + if (Math3D_SphVsCylOverlap(&leftJntSphElem->dim.worldSphere, &rightCyl->dim, &overlapSize)) { Vec3f leftPos; Vec3f rightPos; Math_Vec3s_ToVec3f(&leftPos, &leftJntSphElem->dim.worldSphere.center); - Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos); - CollisionCheck_SetOCvsOC(play, &leftJntSph->base, &leftJntSphElem->base, &leftPos, &right->base, - &right->info, &rightPos, overlapSize); + Math_Vec3s_ToVec3f(&rightPos, &rightCyl->dim.pos); + CollisionCheck_SetOCvsOC(play, &leftJntSph->base, &leftJntSphElem->base, &leftPos, &rightCyl->base, + &rightCyl->elem, &rightPos, overlapSize); } } } @@ -3264,20 +3271,20 @@ void CollisionCheck_OC_CylVsJntSph(struct PlayState* play, CollisionCheckContext */ void CollisionCheck_OC_CylVsCyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* leftCol, Collider* rightCol) { - ColliderCylinder* left = (ColliderCylinder*)leftCol; - ColliderCylinder* right = (ColliderCylinder*)rightCol; + ColliderCylinder* leftCyl = (ColliderCylinder*)leftCol; + ColliderCylinder* rightCyl = (ColliderCylinder*)rightCol; f32 overlapSize; - if ((left->base.ocFlags1 & OCELEM_ON) && (right->base.ocFlags1 & OCELEM_ON) && - (left->info.ocElemFlags & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) { - if (Math3D_CylVsCylOverlap(&left->dim, &right->dim, &overlapSize)) { + if ((leftCyl->base.ocFlags1 & OCELEM_ON) && (rightCyl->base.ocFlags1 & OCELEM_ON) && + (leftCyl->elem.ocElemFlags & OCELEM_ON) && (rightCyl->elem.ocElemFlags & OCELEM_ON)) { + if (Math3D_CylVsCylOverlap(&leftCyl->dim, &rightCyl->dim, &overlapSize)) { Vec3f leftPos; Vec3f rightPos; - Math_Vec3s_ToVec3f(&leftPos, &left->dim.pos); - Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos); - CollisionCheck_SetOCvsOC(play, &left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos, - overlapSize); + Math_Vec3s_ToVec3f(&leftPos, &leftCyl->dim.pos); + Math_Vec3s_ToVec3f(&rightPos, &rightCyl->dim.pos); + CollisionCheck_SetOCvsOC(play, &leftCyl->base, &leftCyl->elem, &leftPos, &rightCyl->base, &rightCyl->elem, + &rightPos, overlapSize); } } } @@ -3287,20 +3294,20 @@ void CollisionCheck_OC_CylVsCyl(struct PlayState* play, CollisionCheckContext* c */ void CollisionCheck_OC_CylVsSphere(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* leftCol, Collider* rightCol) { - ColliderCylinder* left = (ColliderCylinder*)leftCol; + ColliderCylinder* leftCyl = (ColliderCylinder*)leftCol; ColliderSphere* right = (ColliderSphere*)rightCol; f32 overlapSize; - if ((left->base.ocFlags1 & OCELEM_ON) && (left->info.ocElemFlags & OCELEM_ON) && + if ((leftCyl->base.ocFlags1 & OCELEM_ON) && (leftCyl->elem.ocElemFlags & OCELEM_ON) && (right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) { - if (Math3D_SphVsCylOverlap(&right->dim.worldSphere, &left->dim, &overlapSize)) { + if (Math3D_SphVsCylOverlap(&right->dim.worldSphere, &leftCyl->dim, &overlapSize)) { Vec3f leftPos; Vec3f rightPos; - Math_Vec3s_ToVec3f(&leftPos, &left->dim.pos); + Math_Vec3s_ToVec3f(&leftPos, &leftCyl->dim.pos); Math_Vec3s_ToVec3f(&rightPos, &right->dim.worldSphere.center); - CollisionCheck_SetOCvsOC(play, &left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos, - overlapSize); + CollisionCheck_SetOCvsOC(play, &leftCyl->base, &leftCyl->elem, &leftPos, &right->base, &right->info, + &rightPos, overlapSize); } } } @@ -3576,9 +3583,9 @@ void CollisionCheck_ApplyDamageJntSph(struct PlayState* play, CollisionCheckCont * Apply ColliderCylinder AC damage effect */ void CollisionCheck_ApplyDamageCyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) { - ColliderCylinder* cylinder = (ColliderCylinder*)col; + ColliderCylinder* cyl = (ColliderCylinder*)col; - CollisionCheck_ApplyDamage(play, colChkCtx, &cylinder->base, &cylinder->info); + CollisionCheck_ApplyDamage(play, colChkCtx, &cyl->base, &cyl->elem); } /** @@ -3670,13 +3677,13 @@ s32 CollisionCheck_LineOC_JntSph(struct PlayState* play, CollisionCheckContext* */ s32 CollisionCheck_LineOC_Cyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col, Vec3f* a, Vec3f* b) { - ColliderCylinder* cylinder = (ColliderCylinder*)col; + ColliderCylinder* cyl = (ColliderCylinder*)col; - if (!(cylinder->info.ocElemFlags & OCELEM_ON)) { + if (!(cyl->elem.ocElemFlags & OCELEM_ON)) { return false; } - if (Math3D_CylVsLineSeg(&cylinder->dim, a, b, &D_801EDF38, &D_801EDF48)) { + if (Math3D_CylVsLineSeg(&cyl->dim, a, b, &D_801EDF38, &D_801EDF48)) { return true; } @@ -3772,19 +3779,19 @@ s32 CollisionCheck_LineOCCheck(struct PlayState* play, CollisionCheckContext* co /** * Moves the ColliderCylinder's position to the actor's position */ -void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* collider) { - collider->dim.pos.x = actor->world.pos.x; - collider->dim.pos.y = actor->world.pos.y; - collider->dim.pos.z = actor->world.pos.z; +void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* cyl) { + cyl->dim.pos.x = actor->world.pos.x; + cyl->dim.pos.y = actor->world.pos.y; + cyl->dim.pos.z = actor->world.pos.z; } /** * Sets the ColliderCylinder's position */ -void Collider_SetCylinderPosition(ColliderCylinder* collider, Vec3s* pos) { - collider->dim.pos.x = pos->x; - collider->dim.pos.y = pos->y; - collider->dim.pos.z = pos->z; +void Collider_SetCylinderPosition(ColliderCylinder* cyl, Vec3s* pos) { + cyl->dim.pos.x = pos->x; + cyl->dim.pos.y = pos->y; + cyl->dim.pos.z = pos->z; } /** diff --git a/src/code/z_fireobj.c b/src/code/z_fireobj.c index d5f2dede91..f75c3474db 100644 --- a/src/code/z_fireobj.c +++ b/src/code/z_fireobj.c @@ -223,7 +223,7 @@ void FireObj_Update(PlayState* play, FireObj* fire, Actor* actor) { FireObj_UpdateStateTransitions(play, fire); if (fire->state == FIRE_STATE_NOT_LIT) { if ((fire->collision.base.acFlags & AC_HIT) && - (fire->collision.info.acHitElem->toucher.dmgFlags & DMG_FIRE_ARROW)) { + (fire->collision.elem.acHitElem->toucher.dmgFlags & DMG_FIRE_ARROW)) { FireObj_SetState(fire, fire->dynamicSizeStep, FIRE_STATE_GROWING); } } else if ((fire->collision.base.acFlags & AC_HIT) && (arrow->actor.update != NULL) && diff --git a/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c b/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c index 2a301d4def..c753055f59 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c @@ -150,13 +150,13 @@ void func_80B83EA4(BgDblueWaterfall* this, PlayState* play) { Vec3f sp98; s32 phi_s3; - if (this->collider.info.bumperFlags & BUMP_HIT) { + if (this->collider.elem.bumperFlags & BUMP_HIT) { f32 temp_f0_2; f32 temp_f20; - spB0.x = this->collider.info.bumper.hitPos.x; - spB0.y = this->collider.info.bumper.hitPos.y; - spB0.z = this->collider.info.bumper.hitPos.z; + spB0.x = this->collider.elem.bumper.hitPos.x; + spB0.y = this->collider.elem.bumper.hitPos.y; + spB0.z = this->collider.elem.bumper.hitPos.z; sp98.x = spB0.x - this->actor.world.pos.x; sp98.y = 0.0f; @@ -206,10 +206,10 @@ void func_80B841A0(BgDblueWaterfall* this, PlayState* play) { s32 temp_s3; s32 phi_s2; - if (this->collider.info.bumperFlags & BUMP_HIT) { - temp_f22 = this->collider.info.bumper.hitPos.x; - temp_f24 = this->collider.info.bumper.hitPos.y; - temp_f26 = this->collider.info.bumper.hitPos.z; + if (this->collider.elem.bumperFlags & BUMP_HIT) { + temp_f22 = this->collider.elem.bumper.hitPos.x; + temp_f24 = this->collider.elem.bumper.hitPos.y; + temp_f26 = this->collider.elem.bumper.hitPos.z; for (i = 0, phi_s2 = 0; i < 10; i++, phi_s2 += 0x1999) { temp_s3 = (s32)(Rand_ZeroOne() * 6553.0f) + phi_s2; @@ -419,13 +419,13 @@ void func_80B84928(BgDblueWaterfall* this, PlayState* play) { if (sp2C) { if (sp30 != 0) { func_80B83EA4(this, play); - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x800) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x800) { this->csId = this->actor.csId; func_80B84AD4(this, play); } } else { func_80B841A0(this, play); - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x1000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x1000) { this->csId = CutsceneManager_GetAdditionalCsId(this->actor.csId); func_80B84AD4(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c b/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c index 1e84254276..30cb0ce40e 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c @@ -326,7 +326,7 @@ void BgHakuginBombwall_Init(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit); this->collider.dim.radius = ptr->unk_14; this->collider.dim.height = ptr->unk_16; - this->collider.info.bumper.dmgFlags = ptr->unk_18; + this->collider.elem.bumper.dmgFlags = ptr->unk_18; Collider_UpdateCylinder(&this->dyna.actor, &this->collider); Actor_SetFocus(&this->dyna.actor, ptr->unk_08); @@ -359,7 +359,7 @@ s32 func_80ABCB5C(BgHakuginBombwall* this, PlayState* play) { s32 func_80ABCC00(BgHakuginBombwall* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { - if (this->collider.info.acHitElem->toucher.dmgFlags & 8) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 8) { if (this->collider.base.ac != NULL) { Actor* thisx = &this->dyna.actor; diff --git a/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c b/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c index 6c7c04e78a..fb5e01cb38 100644 --- a/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c +++ b/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c @@ -104,7 +104,7 @@ void func_80C072D0(BgIkninside* this, PlayState* play) { s32 i; if (this->collider.base.acFlags & AC_HIT) { - if ((this->collider.info.acHitElem != NULL) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000)) { + if ((this->collider.elem.acHitElem != NULL) && (this->collider.elem.acHitElem->toucher.dmgFlags & 0x80000000)) { for (i = 0; i < 20; i++) { altitude = Rand_S16Offset(0x1800, 0x2800); azimuth = Rand_Next() >> 0x10; diff --git a/src/overlays/actors/ovl_Boss_01/z_boss_01.c b/src/overlays/actors/ovl_Boss_01/z_boss_01.c index 6e8d567f91..72620ac951 100644 --- a/src/overlays/actors/ovl_Boss_01/z_boss_01.c +++ b/src/overlays/actors/ovl_Boss_01/z_boss_01.c @@ -3251,7 +3251,7 @@ void Boss01_Bug_UpdateDamage(Boss01* this, PlayState* play) { if (this->bugACCollider.base.acFlags & AC_HIT) { this->bugACCollider.base.acFlags &= ~AC_HIT; - acHitElem = this->bugACCollider.info.acHitElem; + acHitElem = this->bugACCollider.elem.acHitElem; if (this->damagedTimer == 0) { Matrix_RotateYS(this->actor.yawTowardsPlayer, MTXMODE_NEW); diff --git a/src/overlays/actors/ovl_Boss_06/z_boss_06.c b/src/overlays/actors/ovl_Boss_06/z_boss_06.c index 4baec01ff6..44c175ecbd 100644 --- a/src/overlays/actors/ovl_Boss_06/z_boss_06.c +++ b/src/overlays/actors/ovl_Boss_06/z_boss_06.c @@ -184,10 +184,10 @@ void Boss06_UpdateDamage(Boss06* this) { Boss06_SetupCurtainBurningCutscene(this); Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); - this->arrowHitPos.x = -(this->actor.world.pos.x - this->collider.info.bumper.hitPos.x); + this->arrowHitPos.x = -(this->actor.world.pos.x - this->collider.elem.bumper.hitPos.x); this->arrowHitPosScaled.x = this->arrowHitPos.x * 0.35f; - this->arrowHitPos.y = -((this->actor.world.pos.y + 80.0f) - this->collider.info.bumper.hitPos.y); + this->arrowHitPos.y = -((this->actor.world.pos.y + 80.0f) - this->collider.elem.bumper.hitPos.y); this->arrowHitPosScaled.y = this->arrowHitPos.y * -0.35f; } } diff --git a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c index dc16321387..3728ecbfae 100644 --- a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c +++ b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c @@ -1617,7 +1617,7 @@ void BossHakugin_FrozenBeforeFight(BossHakugin* this, PlayState* play) { } if ((this->iceCollider.base.acFlags & AC_HIT) && - (this->iceCollider.info.acHitElem->toucher.dmgFlags == DMG_FIRE_ARROW)) { + (this->iceCollider.elem.acHitElem->toucher.dmgFlags == DMG_FIRE_ARROW)) { this->iceCollider.base.atFlags &= ~AT_HIT; this->iceCollider.base.acFlags &= ~AC_HIT; this->iceCollider.base.ocFlags1 &= ~OC1_HIT; diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index 5a41d77264..030cad2d0e 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -180,8 +180,8 @@ void func_808AFF9C(EnAm* this) { f32 endFrame = Animation_GetLastFrame(&gArmosPushedBackAnim); Animation_Change(&this->skelAnime, &gArmosPushedBackAnim, 0.0f, endFrame, endFrame, ANIMMODE_LOOP, 0.0f); - this->enemyCollider.info.bumper.dmgFlags = 0x80000088; - this->interactCollider.info.bumper.dmgFlags = 0x77CFFF77; + this->enemyCollider.elem.bumper.dmgFlags = 0x80000088; + this->interactCollider.elem.bumper.dmgFlags = 0x77CFFF77; if (this->actor.colChkInfo.health != 0) { this->enemyCollider.base.atFlags &= ~AT_ON; } @@ -221,8 +221,8 @@ void EnAm_ApplyEnemyTexture(EnAm* this, PlayState* play) { if (this->textureBlend + 20 >= 255) { this->textureBlend = 255; this->actor.flags |= ACTOR_FLAG_TARGETABLE; - this->enemyCollider.info.bumper.dmgFlags = 0x81C2C788; - this->interactCollider.info.bumper.dmgFlags = 0x760D3877; + this->enemyCollider.elem.bumper.dmgFlags = 0x81C2C788; + this->interactCollider.elem.bumper.dmgFlags = 0x760D3877; this->enemyCollider.base.atFlags |= AT_ON; this->actor.shape.yOffset = 0.0f; func_808B0358(this); @@ -444,7 +444,7 @@ void func_808B0B4C(EnAm* this, PlayState* play) { s32 EnAm_UpdateDamage(EnAm* this, PlayState* play) { if (this->enemyCollider.base.acFlags & AC_HIT) { this->enemyCollider.base.acFlags &= ~AC_HIT; - Actor_SetDropFlag(&this->actor, &this->enemyCollider.info); + Actor_SetDropFlag(&this->actor, &this->enemyCollider.elem); if (!Actor_ApplyDamage(&this->actor)) { Enemy_StartFinishingBlow(play, &this->actor); } @@ -458,8 +458,8 @@ s32 EnAm_UpdateDamage(EnAm* this, PlayState* play) { if (this->actor.colChkInfo.damageEffect == 0x4) { this->drawDmgEffScale = 0.7f; this->drawDmgEffAlpha = 4.0f; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->enemyCollider.info.bumper.hitPos.x, - this->enemyCollider.info.bumper.hitPos.y, this->enemyCollider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->enemyCollider.elem.bumper.hitPos.x, + this->enemyCollider.elem.bumper.hitPos.y, this->enemyCollider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } EnAm_TakeDamage(this, play); diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index aafbc2e453..6d5b40eb97 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -490,17 +490,17 @@ void EnBigokuta_CheckOneHitKill(EnBigokuta* this, PlayState* play) { Enemy_StartFinishingBlow(play, &this->picto.actor); if (this->bodyCollider.base.acFlags & AC_HIT) { - if (this->bodyCollider.info.acHitElem->toucher.dmgFlags & 0x1000) { // Ice Arrow + if (this->bodyCollider.elem.acHitElem->toucher.dmgFlags & 0x1000) { // Ice Arrow this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX; this->drawDmgEffScale = 1.2f; this->drawDmgEffFrozenSteamScale = 1800.0f * 0.001f; this->drawDmgEffAlpha = 1.0f; - } else if (this->bodyCollider.info.acHitElem->toucher.dmgFlags & 0x2000) { // Light Arrow + } else if (this->bodyCollider.elem.acHitElem->toucher.dmgFlags & 0x2000) { // Light Arrow this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; this->drawDmgEffScale = 1.2f; this->drawDmgEffAlpha = 4.0f; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->bodyCollider.info.bumper.hitPos.x, - this->bodyCollider.info.bumper.hitPos.y, this->bodyCollider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->bodyCollider.elem.bumper.hitPos.x, + this->bodyCollider.elem.bumper.hitPos.y, this->bodyCollider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } } diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c index aec66a3857..f620822bde 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c @@ -484,7 +484,7 @@ void func_80A2866C(EnBigpamet* this, PlayState* play) { } void func_80A286C0(EnBigpamet* this) { - this->collider.info.bumper.dmgFlags = 0xF7CF7FFF; + this->collider.elem.bumper.dmgFlags = 0xF7CF7FFF; this->collider.base.atFlags |= AT_ON; this->actor.shape.rot.z = 0x680; this->unk_29E = 15; @@ -563,7 +563,7 @@ void func_80A28970(EnBigpamet* this) { Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_CUTTER_OFF); this->actor.shape.rot.z = 0; this->collider.base.atFlags &= ~AT_ON; - this->collider.info.bumper.dmgFlags = 0xF7CFFFFF; + this->collider.elem.bumper.dmgFlags = 0xF7CFFFFF; this->actor.speed = 0.0f; this->actionFunc = func_80A289C8; } @@ -616,7 +616,7 @@ void func_80A28B98(EnBigpamet* this, PlayState* play) { Animation_PlayLoop(&this->snapperSkelAnime, &gSnapperDeathAnim); this->collider.base.atFlags &= ~AT_ON; - this->collider.info.bumper.dmgFlags = 0xF7CFFFFF; + this->collider.elem.bumper.dmgFlags = 0xF7CFFFFF; this->collider.base.atFlags &= ~(AT_HIT | AT_BOUNCED); this->collider.base.acFlags &= ~AC_ON; diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c index af3fae7b6e..a0c2a6ed6f 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -583,7 +583,7 @@ void EnBigpo_IdleFlying(EnBigpo* this, PlayState* play) { void EnBigpo_SetupSpinUp(EnBigpo* this) { this->collider.base.colType = COLTYPE_METAL; this->collider.base.acFlags |= AC_HARD; - this->collider.info.bumper.dmgFlags &= ~0x8000; + this->collider.elem.bumper.dmgFlags &= ~0x8000; this->collider.base.atFlags |= AT_ON; this->angularVelocity = 0x800; this->actionFunc = EnBigpo_SpinningUp; @@ -640,7 +640,7 @@ void EnBigpo_SpinningDown(EnBigpo* this, PlayState* play) { // spin down complete, re-allow hittable this->collider.base.colType = COLTYPE_HIT3; this->collider.base.acFlags &= ~AC_HARD; - this->collider.info.bumper.dmgFlags |= 0x8000; + this->collider.elem.bumper.dmgFlags |= 0x8000; EnBigpo_SetupIdleFlying(this); } EnBigpo_UpdateSpin(this); @@ -1143,8 +1143,8 @@ s32 EnBigpo_ApplyDamage(EnBigpo* this, PlayState* play) { if (this->actor.colChkInfo.damageEffect == 4) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 1.0f; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } EnBigpo_HitStun(this); diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index 9e7cf92dcf..78acfbaaca 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -334,7 +334,7 @@ void EnBigslime_Init(Actor* thisx, PlayState* play2) { this->bigslimeCollider[0].base.atFlags &= ~AT_ON; Collider_InitAndSetCylinder(play, &this->gekkoCollider, &this->actor, &sCylinderInit); this->gekkoCollider.base.colType = COLTYPE_HIT6; - this->gekkoCollider.info.elemType = ELEMTYPE_UNK1; + this->gekkoCollider.elem.elemType = ELEMTYPE_UNK1; this->gekkoCollider.base.atFlags &= ~AT_ON; this->gekkoCollider.base.ocFlags1 &= ~OC1_NO_PUSH; this->actor.params = CLAMP(this->actor.params, 1, 4); @@ -909,7 +909,7 @@ void EnBigslime_GekkoSfxInsideBigslime(EnBigslime* this, u16 sfxId) { void EnBigslime_GekkoFreeze(EnBigslime* this) { this->gekkoDrawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX; this->gekkoCollider.base.colType = COLTYPE_HIT3; - this->gekkoCollider.info.elemType = ELEMTYPE_UNK0; + this->gekkoCollider.elem.elemType = ELEMTYPE_UNK0; this->stunTimer = 2; this->gekkoDrawDmgEffScale = 0.75f; this->gekkoDrawDmgEffFrozenSteamScale = 1.125f; @@ -921,7 +921,7 @@ void EnBigslime_GekkoThaw(EnBigslime* this, PlayState* play) { if (this->gekkoDrawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) { this->gekkoDrawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE; this->gekkoCollider.base.colType = COLTYPE_HIT6; - this->gekkoCollider.info.elemType = ELEMTYPE_UNK1; + this->gekkoCollider.elem.elemType = ELEMTYPE_UNK1; this->gekkoDrawDmgEffAlpha = 0.0f; Actor_SpawnIceEffects(play, &this->actor, this->gekkoBodyPartsPos, GEKKO_BODYPART_MAX, 2, 0.3f, 0.2f); this->actor.flags |= ACTOR_FLAG_200; @@ -2620,7 +2620,7 @@ void EnBigslime_ApplyDamageEffectGekko(EnBigslime* this, PlayState* play) { if (this->gekkoCollider.base.acFlags & AC_HIT) { this->gekkoCollider.base.acFlags &= ~AC_HIT; if ((this->gekkoDrawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - !(this->gekkoCollider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) { + !(this->gekkoCollider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) { EnBigslime_EndThrowMinislime(this); if (this->actor.colChkInfo.damageEffect != BIGSLIME_DMGEFF_HOOKSHOT) { if (Actor_ApplyDamage(&this->actor) == 0) { @@ -2638,8 +2638,8 @@ void EnBigslime_ApplyDamageEffectGekko(EnBigslime* this, PlayState* play) { } else { this->gekkoDrawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; Actor_Spawn( - &play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->gekkoCollider.info.bumper.hitPos.x, - this->gekkoCollider.info.bumper.hitPos.y, this->gekkoCollider.info.bumper.hitPos.z, 0, + &play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->gekkoCollider.elem.bumper.hitPos.x, + this->gekkoCollider.elem.bumper.hitPos.y, this->gekkoCollider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } } else if (this->actor.colChkInfo.damageEffect == BIGSLIME_DMGEFF_ICE) { @@ -2673,8 +2673,8 @@ void EnBigslime_ApplyDamageEffectGekko(EnBigslime* this, PlayState* play) { } else { this->gekkoDrawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; Actor_Spawn( - &play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->gekkoCollider.info.bumper.hitPos.x, - this->gekkoCollider.info.bumper.hitPos.y, this->gekkoCollider.info.bumper.hitPos.z, 0, + &play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->gekkoCollider.elem.bumper.hitPos.x, + this->gekkoCollider.elem.bumper.hitPos.y, this->gekkoCollider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } } diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index c6e39e839a..7724d048ca 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -167,8 +167,8 @@ void func_808AEAE0(EnBombf* this, PlayState* play) { player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR; } } else if ((this->colliderCylinder.base.acFlags & AC_HIT) && - ((this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0x13828) || - ((this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0x200) && + ((this->colliderCylinder.elem.acHitElem->toucher.dmgFlags & 0x13828) || + ((this->colliderCylinder.elem.acHitElem->toucher.dmgFlags & 0x200) && (player->transformation == PLAYER_FORM_GORON) && (player->actor.speed > 15.0f)))) { this->colliderCylinder.base.acFlags &= ~AC_HIT; if (this->colliderCylinder.base.ac->category != ACTORCAT_BOSS) { diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index 3ee8a161b4..80aaa1e66c 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -133,7 +133,7 @@ void EnDekunuts_Init(Actor* thisx, PlayState* play) { if (this->actor.params == ENDEKUNUTS_GET_FF00_1) { this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->collider.base.colType = COLTYPE_NONE; - this->collider.info.bumperFlags |= (BUMP_NO_HITMARK | BUMP_NO_SWORD_SFX | BUMP_NO_DAMAGE | BUMP_NO_AT_INFO); + this->collider.elem.bumperFlags |= (BUMP_NO_HITMARK | BUMP_NO_SWORD_SFX | BUMP_NO_DAMAGE | BUMP_NO_AT_INFO); } else if (this->actor.params == ENDEKUNUTS_GET_FF00_2) { this->actor.targetMode = TARGET_MODE_0; } @@ -569,9 +569,9 @@ void func_808BE6C4(EnDekunuts* this, PlayState* play) { void func_808BE73C(EnDekunuts* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - !(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) { + !(this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) { func_808BD3B4(this, play); if ((this->actor.colChkInfo.mass == 50) || (this->actor.params != ENDEKUNUTS_GET_FF00_0)) { if ((this->actor.params != ENDEKUNUTS_GET_FF00_1) && !Actor_ApplyDamage(&this->actor)) { @@ -609,8 +609,8 @@ void func_808BE73C(EnDekunuts* this, PlayState* play) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.55f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_SMALL_LIGHT_RAYS)); } else if (this->actor.colChkInfo.damageEffect == 5) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_LARGE; diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 0505a1bad9..4c7175f6f9 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -197,14 +197,14 @@ void EnFloormas_Destroy(Actor* thisx, PlayState* play) { void func_808D08D0(EnFloormas* this) { this->collider.base.colType = COLTYPE_HARD; this->collider.base.acFlags |= AC_HARD; - this->collider.info.bumper.dmgFlags &= ~0x8000; + this->collider.elem.bumper.dmgFlags &= ~0x8000; this->unk_190 = 40; } void func_808D0908(EnFloormas* this) { this->collider.base.colType = COLTYPE_HIT0; this->collider.base.acFlags &= ~AC_HARD; - this->collider.info.bumper.dmgFlags |= 0x8000; + this->collider.elem.bumper.dmgFlags |= 0x8000; this->unk_190 = 0; } @@ -1003,9 +1003,9 @@ void func_808D2DC0(EnFloormas* this, PlayState* play) { void func_808D2E34(EnFloormas* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - !(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) { + !(this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) { if (this->actor.colChkInfo.damageEffect == 0xE) { func_808D0908(this); this->actor.colorFilterTimer = 0; @@ -1064,8 +1064,8 @@ void func_808D2E34(EnFloormas* this, PlayState* play) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.55f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, (this->actor.scale.x > 0.009f) ? CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS) : CLEAR_TAG_PARAMS(CLEAR_TAG_SMALL_LIGHT_RAYS)); diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index f5b89b7b53..5754028a01 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -502,8 +502,8 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) { Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f); } } else if (this->collider.base.acFlags & AC_HIT) { - if ((this->collider.info.acHitElem != NULL) && - (this->collider.info.acHitElem->toucher.dmgFlags & DMG_DEKU_NUT)) { + if ((this->collider.elem.acHitElem != NULL) && + (this->collider.elem.acHitElem->toucher.dmgFlags & DMG_DEKU_NUT)) { Actor_SetColorFilter(&this->picto.actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 400); this->picto.actor.speed = 0.0f; this->actionFunc = EnGe2_Stunned; diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index e54ea97792..585fadc011 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -936,12 +936,12 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { if (this->unk_1EC & 0x100) { this->colliderCylinder1.base.colType = COLTYPE_HIT3; this->colliderCylinder1.base.acFlags |= (AC_TYPE_PLAYER | AC_ON); - this->colliderCylinder1.info.bumperFlags |= BUMP_ON; - this->colliderCylinder1.info.bumper.dmgFlags = 0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20; + this->colliderCylinder1.elem.bumperFlags |= BUMP_ON; + this->colliderCylinder1.elem.bumper.dmgFlags = 0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20; this->colliderCylinder2.base.colType = COLTYPE_HIT3; this->colliderCylinder2.base.acFlags |= (AC_TYPE_PLAYER | AC_ON); - this->colliderCylinder2.info.bumperFlags |= BUMP_ON; - this->colliderCylinder2.info.bumper.dmgFlags = 0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20; + this->colliderCylinder2.elem.bumperFlags |= BUMP_ON; + this->colliderCylinder2.elem.bumper.dmgFlags = 0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20; } } diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 9e9a6e0966..90478e7f5e 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -327,8 +327,8 @@ void EnIk_HitArmor(EnIk* this, PlayState* play) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.65f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->colliderCylinder.info.bumper.hitPos.x, - this->colliderCylinder.info.bumper.hitPos.y, this->colliderCylinder.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->colliderCylinder.elem.bumper.hitPos.x, + this->colliderCylinder.elem.bumper.hitPos.y, this->colliderCylinder.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } @@ -782,11 +782,11 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) { } else if (this->colliderCylinder.base.acFlags & AC_HIT) { s32 isArmorBroken = false; - Actor_SetDropFlag(&this->actor, &this->colliderCylinder.info); + Actor_SetDropFlag(&this->actor, &this->colliderCylinder.elem); this->colliderCylinder.base.acFlags &= ~AC_HIT; if ((this->actor.colChkInfo.damageEffect != DMG_EFF_IMMUNE) && ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - !(this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0xDB0B3))) { + !(this->colliderCylinder.elem.acHitElem->toucher.dmgFlags & 0xDB0B3))) { Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); this->invincibilityFrames = 12; EnIk_Thaw(this, play); diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 2b1c1125df..7e785ecf43 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -482,7 +482,7 @@ void func_8095E660(EnIshi* this, PlayState* play) { return; } - if (sp34 && (sp38 == 0) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x508)) { + if (sp34 && (sp38 == 0) && (this->collider.elem.acHitElem->toucher.dmgFlags & 0x508)) { if (sp30 != 0) { func_8095DFF0(this, play); func_8095F060(this); diff --git a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c index 1359d98d54..575e043f43 100644 --- a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c +++ b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c @@ -1101,7 +1101,7 @@ void func_80B87C7C(EnKaizoku* this) { this->picto.actor.velocity.y = 15.0f; Actor_PlaySfx(&this->picto.actor, NA_SE_EN_TEKU_JUMP); this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y; - this->bodyCollider.info.elemType = ELEMTYPE_UNK4; + this->bodyCollider.elem.elemType = ELEMTYPE_UNK4; this->bodyCollider.base.colType = COLTYPE_NONE; this->swordCollider.info.elemType = ELEMTYPE_UNK4; this->action = KAIZOKU_ACTION_6; @@ -1130,7 +1130,7 @@ void func_80B87D3C(EnKaizoku* this, PlayState* play) { this->unk_2D8 = 0; if ((curFrame >= this->animEndFrame) && (this->picto.actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH))) { - this->bodyCollider.info.elemType = ELEMTYPE_UNK1; + this->bodyCollider.elem.elemType = ELEMTYPE_UNK1; this->bodyCollider.base.colType = COLTYPE_HIT3; this->swordCollider.info.elemType = ELEMTYPE_UNK2; this->picto.actor.shape.rot.x = 0; @@ -1146,7 +1146,7 @@ void func_80B87E28(EnKaizoku* this) { EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_8); this->picto.actor.speed = -8.0f; Actor_PlaySfx(&this->picto.actor, NA_SE_EN_TEKU_JUMP); - this->bodyCollider.info.elemType = ELEMTYPE_UNK4; + this->bodyCollider.elem.elemType = ELEMTYPE_UNK4; this->bodyCollider.base.colType = COLTYPE_NONE; this->swordCollider.info.elemType = ELEMTYPE_UNK4; this->action = KAIZOKU_ACTION_7; @@ -1823,7 +1823,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) { if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->action > KAIZOKU_ACTION_0) && (this->unk_2D0 < 2) && (this->action != KAIZOKU_ACTION_6) && (this->action != KAIZOKU_ACTION_12) && (this->action != KAIZOKU_ACTION_14) && (this->action != KAIZOKU_ACTION_15)) { - Actor_SetDropFlag(&this->picto.actor, &this->bodyCollider.info); + Actor_SetDropFlag(&this->picto.actor, &this->bodyCollider.elem); AudioSfx_StopByPosAndId(&this->picto.actor.projectedPos, NA_SE_EN_PIRATE_BREATH); switch (this->picto.actor.colChkInfo.damageEffect) { @@ -1841,7 +1841,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) { this->unk_2B8 == 0) { Actor_SetColorFilter(&this->picto.actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 40); - this->bodyCollider.info.elemType = ELEMTYPE_UNK1; + this->bodyCollider.elem.elemType = ELEMTYPE_UNK1; this->bodyCollider.base.colType = COLTYPE_HIT3; this->swordCollider.info.elemType = ELEMTYPE_UNK2; func_80B891B8(this); @@ -1881,7 +1881,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) { (this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX)) || (this->unk_2B8 == 0)) { Actor_ApplyDamage(&this->picto.actor); - this->bodyCollider.info.elemType = ELEMTYPE_UNK1; + this->bodyCollider.elem.elemType = ELEMTYPE_UNK1; this->bodyCollider.base.colType = COLTYPE_HIT3; this->swordCollider.info.elemType = ELEMTYPE_UNK4; this->unk_2B8 = 80; @@ -1922,7 +1922,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) { return; } - this->bodyCollider.info.elemType = ELEMTYPE_UNK1; + this->bodyCollider.elem.elemType = ELEMTYPE_UNK1; this->bodyCollider.base.colType = COLTYPE_HIT3; this->swordCollider.info.elemType = ELEMTYPE_UNK4; Math_Vec3f_Copy(&sp58, &this->picto.actor.focus.pos); @@ -1939,9 +1939,9 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) { Vec3f pos; Player* player = GET_PLAYER(play); - pos.x = this->bodyCollider.info.bumper.hitPos.x; - pos.y = this->bodyCollider.info.bumper.hitPos.y; - pos.z = this->bodyCollider.info.bumper.hitPos.z; + pos.x = this->bodyCollider.elem.bumper.hitPos.x; + pos.y = this->bodyCollider.elem.bumper.hitPos.y; + pos.z = this->bodyCollider.elem.bumper.hitPos.z; if (player->transformation != PLAYER_FORM_HUMAN) { player->pushedYaw = this->picto.actor.yawTowardsPlayer; diff --git a/src/overlays/actors/ovl_En_Kame/z_en_kame.c b/src/overlays/actors/ovl_En_Kame/z_en_kame.c index 52cb3550c3..5897d38414 100644 --- a/src/overlays/actors/ovl_En_Kame/z_en_kame.c +++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.c @@ -530,11 +530,11 @@ void EnKame_SetupFlip(EnKame* this) { if (this->actionFunc == EnKame_Struggle) { Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperBouncedUprightAnim, -3.0f); this->flipType = EN_KAME_FLIP_TYPE_RIGHTSIDE_UP; - this->collider.info.bumper.dmgFlags &= ~0x8000; + this->collider.elem.bumper.dmgFlags &= ~0x8000; } else { Animation_MorphToPlayOnce(&this->snapperSkelAnime, &gSnapperFlipOverAnim, -3.0f); this->flipType = EN_KAME_FLIP_TYPE_UPSIDE_DOWN; - this->collider.info.bumper.dmgFlags |= 0x8000; + this->collider.elem.bumper.dmgFlags |= 0x8000; } this->actor.draw = EnKame_Draw; @@ -611,7 +611,7 @@ void EnKame_FlipUpright(EnKame* this, PlayState* play) { // See EnKame_PostLimbDraw and EnKame_Draw for more information. this->actor.shape.shadowDraw = NULL; this->collider.base.acFlags &= ~AC_ON; - this->collider.info.bumper.dmgFlags &= ~0x8000; + this->collider.elem.bumper.dmgFlags &= ~0x8000; } } @@ -762,9 +762,9 @@ void EnKame_UpdateDamage(EnKame* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) && - (this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) { + (this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) { return; } @@ -817,8 +817,8 @@ void EnKame_UpdateDamage(EnKame* this, PlayState* play) { this->drawDmgEffScale = 0.6f; this->drawDmgEffAlpha = 4.0f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index 7ad9e6c23f..dc5578f40a 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -246,7 +246,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, ENKANBAN_PIECE); if (piece != NULL) { - ColliderElement* acHitElem = this->collider.info.acHitElem; + ColliderElement* acHitElem = this->collider.elem.acHitElem; s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; u8 i; diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index a0a94a1780..3f99627679 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -202,8 +202,8 @@ void EnKarebaba_SetDamageEffects(EnKarebaba* this, PlayState* play) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; this->drawDmgEffAlpha = 3.0f; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->hurtCollider.info.bumper.hitPos.x, - this->hurtCollider.info.bumper.hitPos.y, this->hurtCollider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->hurtCollider.elem.bumper.hitPos.x, + this->hurtCollider.elem.bumper.hitPos.y, this->hurtCollider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_SMALL_LIGHT_RAYS)); } else if (this->actor.colChkInfo.damageEffect == KAREBABA_DMGEFF_ICE) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX; diff --git a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c index cd9889ee39..81171d1122 100644 --- a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c +++ b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c @@ -378,7 +378,7 @@ s32 func_80A5BFD8(EnKusa2* this, PlayState* play) { s32 pad; func_80A5CF44(this); - func_80A5BD14(this, play, (this->collider.info.acHitElem->toucher.dmgFlags & 0x1000000) ? 1 : 0); + func_80A5BD14(this, play, (this->collider.elem.acHitElem->toucher.dmgFlags & 0x1000000) ? 1 : 0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN); func_80A5BD94(this); Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c index 4106a2ab97..d596587f1a 100644 --- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c +++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c @@ -53,7 +53,7 @@ void EnMFire1_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); if (this->actor.params != 0) { - this->collider.info.toucher.dmgFlags = 0x40000; + this->collider.elem.toucher.dmgFlags = 0x40000; } } diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 2b705aa981..79eb496cf7 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -146,7 +146,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play) { if (CHECK_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_GREAT_SPIN_ATTACK)) { player->unk_B08 = 1.0f; - this->collider.info.toucher.damage = sDamages[this->type + ENMTHUNDER_TYPE_MAX]; + this->collider.elem.toucher.damage = sDamages[this->type + ENMTHUNDER_TYPE_MAX]; this->subtype = ENMTHUNDER_SUBTYPE_SPIN_GREAT; if (this->type == ENMTHUNDER_TYPE_GREAT_FAIRYS_SWORD) { this->scaleTarget = 6; @@ -157,7 +157,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play) { } } else { player->unk_B08 = 0.5f; - this->collider.info.toucher.damage = sDamages[this->type]; + this->collider.elem.toucher.damage = sDamages[this->type]; this->subtype = ENMTHUNDER_SUBTYPE_SPIN_REGULAR; if (this->type == ENMTHUNDER_TYPE_GREAT_FAIRYS_SWORD) { this->scaleTarget = 4; @@ -173,8 +173,8 @@ void EnMThunder_Init(Actor* thisx, PlayState* play) { this->actionFunc = EnMThunder_SwordBeam_Attack; this->timer = 1; this->scaleTarget = 12; - this->collider.info.toucher.dmgFlags = DMG_SWORD_BEAM; - this->collider.info.toucher.damage = 3; + this->collider.elem.toucher.dmgFlags = DMG_SWORD_BEAM; + this->collider.elem.toucher.damage = 3; } else { this->actionFunc = EnMThunder_Spin_Attack; this->timer = 8; @@ -275,7 +275,7 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) { } if (player->unk_B08 < 0.85f) { - this->collider.info.toucher.damage = sDamages[this->type]; + this->collider.elem.toucher.damage = sDamages[this->type]; this->subtype = ENMTHUNDER_SUBTYPE_SPIN_REGULAR; if (this->type == ENMTHUNDER_TYPE_GREAT_FAIRYS_SWORD) { this->scaleTarget = 4; @@ -285,7 +285,7 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) { this->scaleTarget = 2; } } else { - this->collider.info.toucher.damage = sDamages[this->type + ENMTHUNDER_TYPE_MAX]; + this->collider.elem.toucher.damage = sDamages[this->type + ENMTHUNDER_TYPE_MAX]; this->subtype = ENMTHUNDER_SUBTYPE_SPIN_GREAT; if (this->type == ENMTHUNDER_TYPE_GREAT_FAIRYS_SWORD) { this->scaleTarget = 6; diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index 36e489d8e0..411e1d4ddf 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -82,8 +82,8 @@ void EnNutsball_Destroy(Actor* thisx, PlayState* play) { void EnNutsball_InitColliderParams(EnNutsball* this) { this->collider.base.atFlags &= ~(AT_HIT | AT_TYPE_ENEMY | AT_BOUNCED); this->collider.base.atFlags |= AT_TYPE_PLAYER; - this->collider.info.toucher.dmgFlags = 0x400000; - this->collider.info.toucher.damage = 2; + this->collider.elem.toucher.dmgFlags = 0x400000; + this->collider.elem.toucher.damage = 2; } void EnNutsball_Update(Actor* thisx, PlayState* play2) { diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index 218ea27799..e05dd20368 100644 --- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -766,8 +766,8 @@ void EnOkuta_Projectile_Fly(EnOkuta* this, PlayState* play) { if (this->collider.base.atFlags & AT_BOUNCED) { this->collider.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY); this->collider.base.atFlags |= AT_TYPE_PLAYER; - this->collider.info.toucher.dmgFlags = DMG_THROWN_OBJECT; - this->collider.info.toucher.damage = 2; + this->collider.elem.toucher.dmgFlags = DMG_THROWN_OBJECT; + this->collider.elem.toucher.damage = 2; Matrix_MtxFToYXZRot(&player->shieldMf, &shieldRot, false); this->actor.world.rot.y = shieldRot.y + 0x8000; this->timer = 22; @@ -855,8 +855,8 @@ void EnOkuta_UpdateDamage(EnOkuta* this, PlayState* play) { this->collider.base.acFlags &= ~AC_HIT; if (this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX || - !(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) { - Actor_SetDropFlag(&this->actor, &this->collider.info); + !(this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) { + Actor_SetDropFlag(&this->actor, &this->collider.elem); EnOkuta_Thaw(this, play); if (this->actor.colChkInfo.damageEffect == EN_OKUTA_DMGEFF_FREEZE) { @@ -868,8 +868,8 @@ void EnOkuta_UpdateDamage(EnOkuta* this, PlayState* play) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.6f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index 97f2288b25..39c768f7c5 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -739,7 +739,7 @@ void func_8089874C(EnPeehat* this, PlayState* play) { } else if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) && (this->colliderCylinder.base.acFlags & AC_HIT) && ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - !(this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0xDB0B3))) { + !(this->colliderCylinder.elem.acHitElem->toucher.dmgFlags & 0xDB0B3))) { func_808971DC(this, play); this->actor.colorFilterTimer = 0; func_80897648(this); diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 7becdf6822..e5255a70f3 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -192,14 +192,14 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { } else if (this->type == POE_SISTERS_TYPE_MEG) { if (this->megCloneId == POE_SISTERS_MEG_REAL) { this->actor.colChkInfo.health = 8; - this->collider.info.toucher.damage = 16; + this->collider.elem.toucher.damage = 16; this->collider.base.ocFlags1 = (OC1_TYPE_PLAYER | OC1_ON); EnPoSisters_SpawnMegClones(this, play); EnPoSisters_SetupSpawnPo(this); } else { this->actor.flags &= ~(ACTOR_FLAG_200 | ACTOR_FLAG_4000); - this->collider.info.elemType = ELEMTYPE_UNK4; - this->collider.info.bumper.dmgFlags |= (0x40000 | 0x1); + this->collider.elem.elemType = ELEMTYPE_UNK4; + this->collider.elem.bumper.dmgFlags |= (0x40000 | 0x1); this->collider.base.ocFlags1 = OC1_NONE; EnPoSisters_MegCloneVanish(this, NULL); } @@ -599,7 +599,7 @@ void EnPoSisters_SetupSpinToInvis(EnPoSisters* this) { void EnPoSisters_SpinToInvis(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->color.a = 0; - this->collider.info.bumper.dmgFlags = (0x40000 | 0x1); + this->collider.elem.bumper.dmgFlags = (0x40000 | 0x1); EnPoSisters_SetupAimlessIdleFlying(this); } else { s32 alpha = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; @@ -632,7 +632,7 @@ void EnPoSisters_SpinBackToVisible(EnPoSisters* this, PlayState* play) { this->color.a = 255; // fully visible if (this->type != POE_SISTERS_TYPE_MEG) { this->poSisterFlags |= POE_SISTERS_FLAG_CHECK_AC; - this->collider.info.bumper.dmgFlags = ~(0x8000000 | 0x200000 | 0x100000 | 0x40000 | 0x1); + this->collider.elem.bumper.dmgFlags = ~(0x8000000 | 0x200000 | 0x100000 | 0x40000 | 0x1); DECR(this->spinInvisibleTimer); @@ -906,7 +906,7 @@ void EnPoSisters_CheckCollision(EnPoSisters* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); if (this->megCloneId != POE_SISTERS_MEG_REAL) { ((EnPoSisters*)this->actor.parent)->megClonesRemaining--; @@ -942,8 +942,8 @@ void EnPoSisters_CheckCollision(EnPoSisters* this, PlayState* play) { if (this->actor.colChkInfo.damageEffect == POE_SISTERS_DMGEFF_LIGHTARROWS) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.5f; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } EnPoSisters_SetupDamageFlinch(this); diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 25097e4686..a7fe19b124 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -505,7 +505,7 @@ void func_80B2D7D4(EnPoh* this, PlayState* play) { this->unk_197 = this->unk_18C * (255.0f / 32.0f); if (this->unk_18C == 0) { this->unk_190 = Rand_S16Offset(100, 50); - this->colliderCylinder.info.bumper.dmgFlags = 0x40001; + this->colliderCylinder.elem.bumper.dmgFlags = 0x40001; func_80B2CB60(this); } } @@ -532,7 +532,7 @@ void func_80B2D980(EnPoh* this, PlayState* play) { if (this->unk_18C == 32) { this->unk_190 = Rand_S16Offset(700, 300); this->unk_18C = 0; - this->colliderCylinder.info.bumper.dmgFlags = ~0x8340001; + this->colliderCylinder.elem.bumper.dmgFlags = ~0x8340001; func_80B2CB60(this); } } @@ -708,9 +708,9 @@ void func_80B2E438(EnPoh* this, PlayState* play) { if (this->actor.colChkInfo.damageEffect == 4) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.45f; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->colliderCylinder.info.bumper.hitPos.x, - this->colliderCylinder.info.bumper.hitPos.y, - this->colliderCylinder.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->colliderCylinder.elem.bumper.hitPos.x, + this->colliderCylinder.elem.bumper.hitPos.y, + this->colliderCylinder.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } func_80B2CFF8(this); diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 07170add13..577adfaecf 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -1172,7 +1172,7 @@ void EnRd_UpdateDamage(EnRd* this, PlayState* play) { return; } - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); if (player->unk_ADC != 0) { this->unk_3F1 = player->unk_ADD; diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 50c0f3dfe9..2f65261857 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -179,8 +179,8 @@ void func_808FA01C(EnRr* this, PlayState* play, ColliderCylinder* collider) { this->drawDmgEffScale = 0.85f; this->drawDmgEffAlpha = 4.0f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, collider->info.bumper.hitPos.x, - collider->info.bumper.hitPos.y, collider->info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, collider->elem.bumper.hitPos.x, + collider->elem.bumper.hitPos.y, collider->elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } else if (this->actor.colChkInfo.damageEffect == 5) { this->drawDmgEffScale = 0.85f; @@ -192,7 +192,7 @@ void func_808FA01C(EnRr* this, PlayState* play, ColliderCylinder* collider) { void func_808FA11C(EnRr* this) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX; this->collider1.base.colType = COLTYPE_HIT3; - this->collider1.info.elemType = ELEMTYPE_UNK0; + this->collider1.elem.elemType = ELEMTYPE_UNK0; this->unk_1EE = 80; this->drawDmgEffScale = 0.85f; this->drawDmgEffFrozenSteamScale = 1275.0f * 0.001f; @@ -206,7 +206,7 @@ void func_808FA19C(EnRr* this, PlayState* play) { if (this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE; this->collider1.base.colType = COLTYPE_HIT0; - this->collider1.info.elemType = ELEMTYPE_UNK1; + this->collider1.elem.elemType = ELEMTYPE_UNK1; this->drawDmgEffAlpha = 0.0f; Actor_SpawnIceEffects(play, &this->actor, this->bodyPartsPos, LIKE_LIKE_BODYPART_MAX, 2, this->actor.scale.y * 23.333334f, this->actor.scale.y * 20.000002f); @@ -459,7 +459,7 @@ s32 func_808FAA94(EnRr* this, PlayState* play) { this->collider2.base.acFlags &= ~AC_HIT; if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) && - (sp2C->info.acHitElem->toucher.dmgFlags & 0xDB0B3)) { + (sp2C->elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) { return false; } @@ -467,7 +467,7 @@ s32 func_808FAA94(EnRr* this, PlayState* play) { return false; } - Actor_SetDropFlag(&this->actor, &sp2C->info); + Actor_SetDropFlag(&this->actor, &sp2C->elem); func_808FA4F4(this, play); func_808FA19C(this, play); diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index 6661b4e2ef..3005be8108 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -346,9 +346,9 @@ void EnSb_UpdateDamage(EnSb* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 0x28, NA_SE_EN_BEE_FLY); return; } - hitPoint.x = this->collider.info.bumper.hitPos.x; - hitPoint.y = this->collider.info.bumper.hitPos.y; - hitPoint.z = this->collider.info.bumper.hitPos.z; + hitPoint.x = this->collider.elem.bumper.hitPos.x; + hitPoint.y = this->collider.elem.bumper.hitPos.y; + hitPoint.z = this->collider.elem.bumper.hitPos.z; CollisionCheck_SpawnShieldParticlesMetal2(play, &hitPoint); return; } diff --git a/src/overlays/actors/ovl_En_Slime/z_en_slime.c b/src/overlays/actors/ovl_En_Slime/z_en_slime.c index b2010b6007..674c38bd92 100644 --- a/src/overlays/actors/ovl_En_Slime/z_en_slime.c +++ b/src/overlays/actors/ovl_En_Slime/z_en_slime.c @@ -1027,7 +1027,7 @@ void EnSlime_UpdateDamage(EnSlime* this, PlayState* play) { this->collider.base.acFlags &= ~AC_HIT; if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - !(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) { + !(this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) { EnSlime_Thaw(this, play); if ((this->actor.params == EN_SLIME_TYPE_BLUE) && @@ -1037,7 +1037,7 @@ void EnSlime_UpdateDamage(EnSlime* this, PlayState* play) { } if (Actor_ApplyDamage(&this->actor) == 0) { - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); Enemy_StartFinishingBlow(play, &this->actor); this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; } @@ -1066,8 +1066,8 @@ void EnSlime_UpdateDamage(EnSlime* this, PlayState* play) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.4f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } else if (this->actor.colChkInfo.damageEffect == EN_SLIME_DMGEFF_ELECTRIC) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_LARGE; diff --git a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c index 83fb2df7cd..8c5726ac59 100644 --- a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c +++ b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c @@ -269,7 +269,7 @@ void EnSnowman_Init(Actor* thisx, PlayState* play) { this->collider.dim.radius = 50; this->collider.dim.height = 122; this->collider.dim.yShift = -8; - this->collider.info.toucher.damage = 16; + this->collider.elem.toucher.damage = 16; thisx->world.pos.y -= 32.0f; Actor_SetScale(thisx, 0.006f); ActorShape_Init(&thisx->shape, 16000.0f / 3.0f, ActorShadow_DrawCircle, 170.0f); @@ -970,7 +970,7 @@ void EnSnowman_Combine(EnSnowman* this, PlayState* play) { void EnSnowman_UpdateDamage(EnSnowman* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); if ((this->actor.colChkInfo.damageEffect != EN_SNOWMAN_DMGEFF_HOOKSHOT) || (EN_SNOWMAN_GET_TYPE(&this->actor) != EN_SNOWMAN_TYPE_LARGE)) { if (this->actor.colChkInfo.damageEffect == EN_SNOWMAN_DMGEFF_MELT) { @@ -1011,8 +1011,8 @@ void EnSnowman_UpdateDamage(EnSnowman* this, PlayState* play) { this->drawDmgEffScale = 0.55f; this->drawDmgEffAlpha = 4.0f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } } diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 7a853710b5..aaad741c4c 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -194,12 +194,12 @@ void EnSsh_InitColliders(EnSsh* this, PlayState* play) { Collider_InitAndSetCylinder(play, &this->collider1[i], &this->actor, cylinders[i]); } - this->collider1[0].info.bumper.dmgFlags = 0x38A9; - this->collider1[1].info.bumper.dmgFlags = ~0x83038A9; + this->collider1[0].elem.bumper.dmgFlags = 0x38A9; + this->collider1[1].elem.bumper.dmgFlags = ~0x83038A9; this->collider1[2].base.colType = COLTYPE_METAL; - this->collider1[2].info.bumperFlags = (BUMP_NO_AT_INFO | BUMP_HOOKABLE | BUMP_ON); - this->collider1[2].info.elemType = ELEMTYPE_UNK2; - this->collider1[2].info.bumper.dmgFlags = ~0x83038A9; + this->collider1[2].elem.bumperFlags = (BUMP_NO_AT_INFO | BUMP_HOOKABLE | BUMP_ON); + this->collider1[2].elem.elemType = ELEMTYPE_UNK2; + this->collider1[2].elem.bumper.dmgFlags = ~0x83038A9; CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInfoInit); Collider_InitJntSph(play, &this->collider2); @@ -470,16 +470,16 @@ void EnSsh_Sway(EnSsh* this) { void EnSsh_CheckBodyStickHit(EnSsh* this, PlayState* play) { Player* player = GET_PLAYER(play); - ColliderElement* elem = &this->collider1[0].info; + ColliderElement* elem = &this->collider1[0].elem; if (player->unk_B28 != 0) { elem->bumper.dmgFlags |= 2; - this->collider1[1].info.bumper.dmgFlags &= ~2; - this->collider1[2].info.bumper.dmgFlags &= ~2; + this->collider1[1].elem.bumper.dmgFlags &= ~2; + this->collider1[2].elem.bumper.dmgFlags &= ~2; } else { elem->bumper.dmgFlags &= ~2; - this->collider1[1].info.bumper.dmgFlags |= 2; - this->collider1[2].info.bumper.dmgFlags |= 2; + this->collider1[1].elem.bumper.dmgFlags |= 2; + this->collider1[2].elem.bumper.dmgFlags |= 2; } } diff --git a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c index 25f05f913d..df3cec44a4 100644 --- a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c +++ b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c @@ -424,7 +424,7 @@ void func_80BB7578(EnTanron2* this, PlayState* play) { if (this->unk_154 == 0) { if (this->collider1.base.acFlags & AC_HIT) { this->collider1.base.acFlags &= ~AC_HIT; - acHitElem = this->collider1.info.acHitElem; + acHitElem = this->collider1.elem.acHitElem; if (acHitElem->toucher.dmgFlags & 0x80) { func_80BB6B80(this); this->unk_158 = 1; diff --git a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c index ed8f0d5a57..f0d1b051a5 100644 --- a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c +++ b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c @@ -354,7 +354,7 @@ void EnTanron5_Update(Actor* thisx, PlayState* play2) { if (this->timer == 0) { if (this->collider.base.acFlags & AC_HIT) { - ColliderElement* acHitElem = this->collider.info.acHitElem; + ColliderElement* acHitElem = this->collider.elem.acHitElem; Actor* ac = this->collider.base.ac; this->collider.base.acFlags &= ~AC_HIT; @@ -460,7 +460,7 @@ void EnTanron5_Update(Actor* thisx, PlayState* play2) { // Something hit the ruin, but it wasn't Twinmold, and it wasn't the player while in giant // mode. Play the reflect sound effect and spawn some sparks instead of breaking. Vec3f hitPos; - ColliderElement* acHitElem = this->collider.info.acHitElem; + ColliderElement* acHitElem = this->collider.elem.acHitElem; hitPos.x = acHitElem->bumper.hitPos.x; hitPos.y = acHitElem->bumper.hitPos.y; diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 7c4f5d7202..5def397941 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -558,10 +558,10 @@ void EnWallmas_Stun(EnWallmas* this, PlayState* play) { void EnWallmas_UpdateDamage(EnWallmas* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - Actor_SetDropFlag(&this->actor, &this->collider.info); + Actor_SetDropFlag(&this->actor, &this->collider.elem); if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - (!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3))) { + (!(this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3))) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(play, &this->actor); Actor_PlaySfx(&this->actor, NA_SE_EN_DAIOCTA_REVERSE); @@ -603,8 +603,8 @@ void EnWallmas_UpdateDamage(EnWallmas* this, PlayState* play) { this->drawDmgEffAlpha = 4.0f; this->drawDmgEffScale = 0.55f; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x, - this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x, + this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 2608fe7167..9b9937ff98 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -1407,10 +1407,10 @@ void func_8099386C(EnWf* this, PlayState* play) { } if (this->collider2.base.acFlags & AC_HIT) { - Actor_SetDropFlag(&this->actor, &this->collider2.info); + Actor_SetDropFlag(&this->actor, &this->collider2.elem); collider = &this->collider2; } else { - Actor_SetDropFlag(&this->actor, &this->collider3.info); + Actor_SetDropFlag(&this->actor, &this->collider3.elem); collider = &this->collider3; } @@ -1419,7 +1419,7 @@ void func_8099386C(EnWf* this, PlayState* play) { this->collider1.base.atFlags &= ~AT_ON; if (((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) || - !(collider->info.acHitElem->toucher.dmgFlags & + !(collider->elem.acHitElem->toucher.dmgFlags & (0x80000 | 0x40000 | 0x10000 | 0x8000 | 0x2000 | 0x1000 | 0x80 | 0x20 | 0x10 | 0x2 | 0x1))) && (this->actor.colChkInfo.damageEffect != 0xF)) { if (!Actor_ApplyDamage(&this->actor)) { @@ -1457,8 +1457,8 @@ void func_8099386C(EnWf* this, PlayState* play) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS; this->drawDmgEffScale = 0.75f; this->drawDmgEffAlpha = 4.0f; - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, collider->info.bumper.hitPos.x, - collider->info.bumper.hitPos.y, collider->info.bumper.hitPos.z, 0, 0, 0, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, collider->elem.bumper.hitPos.x, + collider->elem.bumper.hitPos.y, collider->elem.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS)); } diff --git a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c index f4a2678942..6b52581ec3 100644 --- a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c +++ b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c @@ -80,21 +80,21 @@ void EnWizFire_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; if (!Player_HasMirrorShieldEquipped(play)) { - this->collider.info.toucher.dmgFlags = 0x20000000; + this->collider.elem.toucher.dmgFlags = 0x20000000; } switch (this->type) { case EN_WIZ_FIRE_TYPE_ICE_MAGIC_PROJECTILE: this->isIceType = true; - this->collider.info.toucher.damage = 8; - this->collider.info.toucher.effect = 2; - this->collider.info.bumper.dmgFlags = (0x1000000 | 0x800 | 0x200 | 0x2); + this->collider.elem.toucher.damage = 8; + this->collider.elem.toucher.effect = 2; + this->collider.elem.bumper.dmgFlags = (0x1000000 | 0x800 | 0x200 | 0x2); this->type = EN_WIZ_FIRE_TYPE_MAGIC_PROJECTILE; // fallthrough case EN_WIZ_FIRE_TYPE_MAGIC_PROJECTILE: if (this->type == EN_WIZ_FIRE_TYPE_ICE_MAGIC_PROJECTILE) { this->type = EN_WIZ_FIRE_TYPE_MAGIC_PROJECTILE; - this->collider.info.toucher.damage = 8; + this->collider.elem.toucher.damage = 8; } // fallthrough case EN_WIZ_FIRE_TYPE_ARCING_MAGIC_PROJECTILE: @@ -106,7 +106,7 @@ void EnWizFire_Init(Actor* thisx, PlayState* play) { this->actor.draw = EnWizFire_DrawSmallFlame; this->smallFlameScroll = Rand_S16Offset(0, 10000); this->action = EN_WIZ_FIRE_ACTION_SMALL_FLAME; - this->collider.info.toucher.damage = 2; + this->collider.elem.toucher.damage = 2; this->actionFunc = EnWiz_SetupSmallFlame; break; @@ -283,7 +283,7 @@ void EnWiz_MoveMagicProjectile(EnWizFire* this, PlayState* play) { if ((this->type != EN_WIZ_FIRE_TYPE_REFLECTED_MAGIC_PROJECTILE) && (this->timer != 0)) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - if (this->collider.info.acHitElem->toucher.dmgFlags == 0x1000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags == 0x1000) { this->timer = 0; this->hitByIceArrow = true; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT); @@ -294,8 +294,8 @@ void EnWiz_MoveMagicProjectile(EnWizFire* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_IT_SHIELD_REFLECT_MG); this->collider.base.atFlags &= ~(AT_TYPE_ENEMY | AT_BOUNCED | AT_HIT); this->collider.base.atFlags |= AT_TYPE_PLAYER; - this->collider.info.toucher.dmgFlags = 0x20; - this->collider.info.toucher.damage = 2; + this->collider.elem.toucher.dmgFlags = 0x20; + this->collider.elem.toucher.damage = 2; this->timer = 100; this->type = EN_WIZ_FIRE_TYPE_REFLECTED_MAGIC_PROJECTILE; this->actor.velocity.x *= -1.0f; @@ -342,7 +342,7 @@ void EnWiz_SmallFlame(EnWizFire* this, PlayState* play) { this->timer -= 10; } - if (this->collider.info.acHitElem->toucher.dmgFlags == 0x1000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags == 0x1000) { this->timer = 0; this->hitByIceArrow = true; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT); @@ -409,7 +409,7 @@ void EnWiz_Pool(EnWizFire* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - if (!sPoolHitByIceArrow && (this->collider.info.acHitElem->toucher.dmgFlags == 0x1000)) { + if (!sPoolHitByIceArrow && (this->collider.elem.acHitElem->toucher.dmgFlags == 0x1000)) { sPoolHitByIceArrow = true; this->hitByIceArrow = true; this->poolTimer = 0; diff --git a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c index 052cc1b7f7..1ab8304de7 100644 --- a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c +++ b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c @@ -180,7 +180,7 @@ void func_80AE8DE4(ObjBigicicle* this, PlayState* play) { void func_80AE8FD4(ObjBigicicle* this, PlayState* play) { if ((this->collider1.base.acFlags & AC_HIT) || - ((this->collider2.base.acFlags & AC_HIT) && (this->collider2.info.acHitElem->toucher.dmgFlags & 0x3820))) { + ((this->collider2.base.acFlags & AC_HIT) && (this->collider2.elem.acHitElem->toucher.dmgFlags & 0x3820))) { if ((this->unk_148 == 0) || (this->unk_149 == 1)) { CutsceneManager_Queue(this->actor.csId); this->actionFunc = func_80AE9090; diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c index df7ac46289..4ffe1244ab 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -111,15 +111,15 @@ s32 func_809393B0(Actor* thisx) { if (this->collider.base.acFlags & AC_HIT) { Actor* ac = this->collider.base.ac; - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x80000000) { if ((ac != NULL) && (Math3D_Vec3fDistSq(&this->actor.world.pos, &ac->world.pos) < SQ(150.0f))) { return true; } - } else if (this->collider.info.acHitElem->toucher.dmgFlags & 8) { + } else if (this->collider.elem.acHitElem->toucher.dmgFlags & 8) { if ((ac != NULL) && (Math3D_Vec3fDistSq(&this->actor.world.pos, &ac->world.pos) < SQ(95.0f))) { return true; } - } else if (this->collider.info.acHitElem->toucher.dmgFlags & 0x500) { + } else if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x500) { return true; } } @@ -133,11 +133,11 @@ s32 func_80939470(Actor* thisx) { Actor* temp_v0 = this->collider.base.ac; if (temp_v0 != NULL) { - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x80000000) { if (Math3D_Vec3fDistSq(&this->actor.world.pos, &temp_v0->world.pos) < SQ(175.0f)) { return true; } - } else if ((this->collider.info.acHitElem->toucher.dmgFlags & 8) && + } else if ((this->collider.elem.acHitElem->toucher.dmgFlags & 8) && (Math3D_Vec3fDistSq(&this->actor.world.pos, &temp_v0->world.pos) < SQ(115.0f))) { return true; } diff --git a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c index a681c4fbda..a9c6e542a0 100644 --- a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c +++ b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c @@ -260,7 +260,7 @@ void ObjChan_ChandelierAction(ObjChan* this, PlayState* play) { Math_Vec3f_ToVec3s(&pot->collider.dim.pos, &pot->actor.world.pos); } } - if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x800)) { + if ((this->collider.base.acFlags & AC_HIT) && (this->collider.elem.acHitElem->toucher.dmgFlags & 0x800)) { Flags_SetSwitch(play, OBJCHAN_GET_SWITCH_FLAG(thisx)); } if (Flags_GetSwitch(play, OBJCHAN_GET_SWITCH_FLAG(thisx))) { @@ -296,7 +296,7 @@ void ObjChan_PotAction(ObjChan* this, PlayState* play) { s32 phi_v1; potBreaks = false; - if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x4004000)) { + if ((this->collider.base.acFlags & AC_HIT) && (this->collider.elem.acHitElem->toucher.dmgFlags & 0x4004000)) { potBreaks = true; } if (this->stateFlags & OBJCHAN_STATE_ON_FIRE) { diff --git a/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c b/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c index 9e5db4cc89..fd039ac295 100644 --- a/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c +++ b/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c @@ -365,11 +365,11 @@ void ObjFireshield_Update(Actor* thisx, PlayState* play) { Actor_PlaySfx_Flagged(thisx, NA_SE_EV_BURNING - SFX_FLAG); if (player->transformation == PLAYER_FORM_GORON) { - this->collider.info.toucher.damage = 0; - this->collider.info.toucher.effect = 0; + this->collider.elem.toucher.damage = 0; + this->collider.elem.toucher.effect = 0; } else { - this->collider.info.toucher.damage = 4; - this->collider.info.toucher.effect = 1; + this->collider.elem.toucher.damage = 4; + this->collider.elem.toucher.effect = 1; } Collider_UpdateCylinder(thisx, &this->collider); diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c index 2703856f09..3315f515c8 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -212,14 +212,14 @@ void ObjHamishi_Update(Actor* thisx, PlayState* play) { } if (sp24) { - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000500) { - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x400) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x80000500) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x400) { this->unk_1A0 = 26; } else { this->unk_1A0 = 11; } - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x80000000) { this->unk_19E = 2; } else { this->unk_19E++; diff --git a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c index 6b67614e29..26780e1352 100644 --- a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c +++ b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c @@ -311,7 +311,7 @@ s32 func_80A54A0C(ObjHugebombiwa* this) { s32 params; Vec3f sp20; - if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000)) { + if ((this->collider.base.acFlags & AC_HIT) && (this->collider.elem.acHitElem->toucher.dmgFlags & 0x80000000)) { ac = this->collider.base.ac; params = ENHUGEBOMBIWA_GET_100(&this->actor); diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 8faefb60b3..e1e9185d5f 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -191,13 +191,13 @@ void func_80931A38(ObjIcePoly* this, PlayState* play) { if (((this->colliders2[0].base.acFlags & AC_HIT) && ((this->colliders2[0].base.ac == NULL) || ((this->colliders2[0].base.ac->id != ACTOR_OBJ_AQUA) && - (this->colliders2[0].info.acHitElem->toucher.dmgFlags == 0x800)) || + (this->colliders2[0].elem.acHitElem->toucher.dmgFlags == 0x800)) || ((this->colliders2[0].base.ac->id == ACTOR_OBJ_AQUA) && (this->colliders2[0].base.ac->params == AQUA_TYPE_HOT)))) || ((this->colliders2[1].base.acFlags & AC_HIT) && ((this->colliders2[1].base.ac == NULL) || ((this->colliders2[1].base.ac->id != ACTOR_OBJ_AQUA) && - (this->colliders2[1].info.acHitElem->toucher.dmgFlags == 0x800)) || + (this->colliders2[1].elem.acHitElem->toucher.dmgFlags == 0x800)) || ((this->colliders2[1].base.ac->id == ACTOR_OBJ_AQUA) && (this->colliders2[1].base.ac->params == AQUA_TYPE_HOT))))) { CutsceneManager_Queue(this->actor.csId); diff --git a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c index 6f7291c0f6..ba28e1d3b7 100644 --- a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c +++ b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c @@ -1448,7 +1448,7 @@ void ObjIceblock_Update(Actor* thisx, PlayState* play) { } } - if (((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x800)) || + if (((this->collider.base.acFlags & AC_HIT) && (this->collider.elem.acHitElem->toucher.dmgFlags & 0x800)) || (this->meltTimer == 0)) { this->meltTimer = -1; this->unk_2B0 = 4; @@ -1488,7 +1488,7 @@ void ObjIceblock_Update(Actor* thisx, PlayState* play) { if (ICEBLOCK_GET_ICEBERG(&this->dyna.actor) && (this->unk_2B4 > 0.0f)) { this->collider.base.ocFlags1 &= ~OC1_NO_PUSH; this->collider.base.ocFlags1 |= (OC1_TYPE_2 | OC1_TYPE_1 | OC1_TYPE_PLAYER); - this->collider.info.bumper.dmgFlags |= + this->collider.elem.bumper.dmgFlags |= (0x800000 | 0x400000 | 0x10000 | 0x2000 | 0x1000 | 0x800 | 0x200 | 0x100 | 0x80 | 0x20 | 0x10 | 0x2); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index 9c37c9bf1b..6ffb30c0db 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -185,17 +185,17 @@ s32 ObjKibako2_ShouldBreak(ObjKibako2* this) { Actor* ac = this->collider.base.ac; this->collider.base.acFlags = acFlags & ~AC_HIT; if (ac != NULL) { - if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 31)) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & (1 << 31)) { // Powder Keg if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(160.0f)) { shouldBreak = true; } - } else if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 3)) { + } else if (this->collider.elem.acHitElem->toucher.dmgFlags & (1 << 3)) { // Explosives if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(100.0f)) { shouldBreak = true; } - } else if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 8 | 1 << 10)) { + } else if (this->collider.elem.acHitElem->toucher.dmgFlags & (1 << 8 | 1 << 10)) { // Goron Punch/Pound shouldBreak = true; } diff --git a/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c b/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c index 5dad67229c..25317552bc 100644 --- a/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c +++ b/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c @@ -123,7 +123,7 @@ void ObjLightblock_Wait(ObjLightblock* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; // light arrows - if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 13)) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & (1 << 13)) { this->collisionCounter = 8; } // light ray diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index be95f537c7..a209457eb9 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -193,8 +193,8 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { } } if (this->flameCollider.base.acFlags & AC_HIT) { - flameColliderHurtboxDmgFlags = this->flameCollider.info.acHitElem->toucher.dmgFlags; - if (this->flameCollider.info.acHitElem->toucher.dmgFlags & 0x820) { + flameColliderHurtboxDmgFlags = this->flameCollider.elem.acHitElem->toucher.dmgFlags; + if (this->flameCollider.elem.acHitElem->toucher.dmgFlags & 0x820) { interaction = OBJ_SYOKUDAI_INTERACTION_ARROW_FA; } } else if (player->heldItemAction == PLAYER_IA_DEKU_STICK) { diff --git a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c index 95d8f5c393..759a051a68 100644 --- a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c +++ b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c @@ -243,21 +243,21 @@ s32 func_80B9BF7C(ObjTaru* this) { s32 pad; s32 phi_a3 = false; - if ((!OBJ_TARU_GET_80(&this->dyna.actor)) && (this->collider.base.acFlags & AC_HIT)) { + if (!OBJ_TARU_GET_80(&this->dyna.actor) && (this->collider.base.acFlags & AC_HIT)) { Actor* ac = this->collider.base.ac; this->collider.base.acFlags &= ~AC_HIT; if (ac != NULL) { - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x80000000) { phi_a3 = false; if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(160.0f)) { phi_a3 = true; } - } else if (this->collider.info.acHitElem->toucher.dmgFlags & 8) { + } else if (this->collider.elem.acHitElem->toucher.dmgFlags & 8) { if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(100.0f)) { phi_a3 = true; } - } else if (this->collider.info.acHitElem->toucher.dmgFlags & 0x500) { + } else if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x500) { phi_a3 = true; } } diff --git a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c index 9f2dd0d48f..e67a019c22 100644 --- a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c +++ b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c @@ -278,7 +278,7 @@ void ObjToge_Update(Actor* thisx, PlayState* play) { ColliderCylinder* collider = &this->collider; if (this->collider.base.acFlags & AC_HIT) { - if (this->collider.info.acHitElem->toucher.dmgFlags & 0x1000) { + if (this->collider.elem.acHitElem->toucher.dmgFlags & 0x1000) { func_809A43A8(this, play); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 250, COLORFILTER_BUFFLAG_OPA, 250); } diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index 26b1f3e6c4..6228684da3 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -474,7 +474,7 @@ void func_809289E4(ObjTsubo* this, PlayState* play) { Player_PlaySfx((Player*)&this->actor, NA_SE_PL_PULL_UP_POT); func_80928D6C(this); } else if ((this->unk_19B != 0) || - (acHit && (this->cylinderCollider.info.acHitElem->toucher.dmgFlags & 0x058BFFBC))) { + (acHit && (this->cylinderCollider.elem.acHitElem->toucher.dmgFlags & 0x058BFFBC))) { typeData = &sPotTypeData[type]; this->unk_19B = 0; if ((this->actor.bgCheckFlags & BGCHECKFLAG_WATER) && (this->actor.depthInWater > 15.0f)) { diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 89368b34ef..b343e14197 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -2759,10 +2759,10 @@ void Player_ResetCylinder(Player* this) { this->cylinder.base.atFlags = AT_NONE; this->cylinder.base.acFlags = AC_ON | AC_TYPE_ENEMY; this->cylinder.base.ocFlags1 = OC1_ON | OC1_TYPE_ALL; - this->cylinder.info.elemType = ELEMTYPE_UNK1; - this->cylinder.info.toucher.dmgFlags = 0; - this->cylinder.info.bumper.dmgFlags = 0xF7CFFFFF; - this->cylinder.info.toucherFlags = TOUCH_NONE | TOUCH_SFX_NORMAL; + this->cylinder.elem.elemType = ELEMTYPE_UNK1; + this->cylinder.elem.toucher.dmgFlags = 0; + this->cylinder.elem.bumper.dmgFlags = 0xF7CFFFFF; + this->cylinder.elem.toucherFlags = TOUCH_NONE | TOUCH_SFX_NORMAL; this->cylinder.dim.radius = 12; } @@ -2789,17 +2789,17 @@ void Player_SetCylinderForAttack(Player* this, u32 dmgFlags, s32 damage, s32 rad this->cylinder.base.ocFlags1 = OC1_ON | OC1_TYPE_ALL; } - this->cylinder.info.elemType = ELEMTYPE_UNK2; - this->cylinder.info.toucherFlags = TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NORMAL; + this->cylinder.elem.elemType = ELEMTYPE_UNK2; + this->cylinder.elem.toucherFlags = TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NORMAL; this->cylinder.dim.radius = radius; - this->cylinder.info.toucher.dmgFlags = dmgFlags; - this->cylinder.info.toucher.damage = damage; + this->cylinder.elem.toucher.dmgFlags = dmgFlags; + this->cylinder.elem.toucher.damage = damage; if (dmgFlags & DMG_GORON_POUND) { this->cylinder.base.acFlags = AC_NONE; } else { this->cylinder.base.colType = COLTYPE_NONE; - this->cylinder.info.bumper.dmgFlags = 0xF7CFFFFF; + this->cylinder.elem.bumper.dmgFlags = 0xF7CFFFFF; if (dmgFlags & DMG_ZORA_BARRIER) { this->cylinder.base.acFlags = AC_NONE; @@ -5809,8 +5809,8 @@ s32 func_80834600(Player* this, PlayState* play) { } } else if ((this->shieldQuad.base.acFlags & AC_BOUNCED) || (this->shieldCylinder.base.acFlags & AC_BOUNCED) || ((this->invincibilityTimer < 0) && (this->cylinder.base.acFlags & AC_HIT) && - (this->cylinder.info.acHitElem != NULL) && - (this->cylinder.info.acHitElem->toucher.dmgFlags != DMG_UNBLOCKABLE))) { + (this->cylinder.elem.acHitElem != NULL) && + (this->cylinder.elem.acHitElem->toucher.dmgFlags != DMG_UNBLOCKABLE))) { PlayerAnimationHeader* var_a2; s32 sp64; @@ -12331,7 +12331,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { 0.5f); temp_fv0 += this->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 10.0f; - if (this->cylinder.info.toucher.dmgFlags == 0x80000) { + if (this->cylinder.elem.toucher.dmgFlags == 0x80000) { this->cylinder.dim.height = 80; var_fv1_2 = ((temp_fv0 + var_fv1_2) * 0.5f) - 40.0f; } else { @@ -12349,9 +12349,9 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if (this->unk_B62 != 0) { this->shieldCylinder.base.acFlags = AC_NONE; - this->shieldCylinder.info.toucher.dmgFlags = 0x80000; - this->shieldCylinder.info.toucherFlags = TOUCH_ON; - this->shieldCylinder.info.bumperFlags = BUMP_NONE; + this->shieldCylinder.elem.toucher.dmgFlags = 0x80000; + this->shieldCylinder.elem.toucherFlags = TOUCH_ON; + this->shieldCylinder.elem.bumperFlags = BUMP_NONE; this->shieldCylinder.dim.height = 80; this->shieldCylinder.dim.radius = 50; this->shieldCylinder.dim.yShift = ((temp_fv0 + var_fv1_2) * 0.5f - 40.0f) - this->actor.world.pos.y; @@ -12361,9 +12361,9 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } else if (this->stateFlags1 & PLAYER_STATE1_400000) { if ((this->transformation == PLAYER_FORM_GORON) || (this->transformation == PLAYER_FORM_DEKU)) { this->shieldCylinder.base.acFlags = AC_ON | AC_HARD | AC_TYPE_ENEMY; - this->shieldCylinder.info.toucher.dmgFlags = 0x100000; - this->shieldCylinder.info.toucherFlags = TOUCH_NONE; - this->shieldCylinder.info.bumperFlags = BUMP_ON; + this->shieldCylinder.elem.toucher.dmgFlags = 0x100000; + this->shieldCylinder.elem.toucherFlags = TOUCH_NONE; + this->shieldCylinder.elem.bumperFlags = BUMP_ON; if (this->transformation == PLAYER_FORM_GORON) { this->shieldCylinder.dim.height = 35;