1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-10 19:13:42 +00:00

Cleanup z_collision_check 1 (#1427)

* Cleanup `z_collision_check.c` and structs

* Revert `other*` names to master, split to other pr

* WIP/experimental: `ColliderCylinderElement`

* Revert "WIP/experimental: `ColliderCylinderElement`"

This reverts commit cfc8c32ace.

* ac/atHitInfo -> HitElem

* rename some collider elements to "elem" (instead of item, info, hurtbox...)

* cut down on more "hitbox" usage

* name all `ColliderElement*` temps properly

* rearrange colcheck structs

* add collider shape name descriptions

* reword collider shape descriptions

* jntsph first again

---------

Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
Dragorn421 2024-01-11 16:30:47 +01:00 committed by GitHub
parent f02d012ce7
commit 1a8772e540
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 1725 additions and 1601 deletions

View file

@ -494,7 +494,7 @@ void func_8003555C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void func_800355B8(PlayState* play, Vec3f* pos);
u8 func_800355E4(PlayState* play, Collider* collider);
u8 Actor_ApplyDamage(Actor* actor);
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo, s32 freezeFlag);
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag);
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag);
void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
@ -662,44 +662,43 @@ DamageTable* DamageTable_Get(s32 index);
void DamageTable_Clear(DamageTable* table);
void Collider_DrawRedPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
void Collider_DrawPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
s32 Collider_InitJntSph(PlayState* play, ColliderJntSph* collider);
s32 Collider_FreeJntSph(PlayState* play, ColliderJntSph* collider);
s32 Collider_DestroyJntSph(PlayState* play, ColliderJntSph* collider);
s32 Collider_InitJntSph(PlayState* play, ColliderJntSph* jntSph);
s32 Collider_FreeJntSph(PlayState* play, ColliderJntSph* jntSph);
s32 Collider_DestroyJntSph(PlayState* play, ColliderJntSph* jntSph);
s32 Collider_SetJntSphToActor(PlayState* play, ColliderJntSph* dest, ColliderJntSphInitToActor* src);
s32 Collider_SetJntSphAllocType1(PlayState* play, ColliderJntSph* dest, Actor* actor,
ColliderJntSphInitType1* src);
s32 Collider_SetJntSphAlloc(PlayState* play, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src);
s32 Collider_SetJntSph(PlayState* play, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src,
ColliderJntSphElement* elements);
s32 Collider_ResetJntSphAT(PlayState* play, Collider* collider);
s32 Collider_ResetJntSphAC(PlayState* play, Collider* collider);
s32 Collider_ResetJntSphOC(PlayState* play, Collider* collider);
s32 Collider_InitCylinder(PlayState* play, ColliderCylinder* collider);
s32 Collider_DestroyCylinder(PlayState* play, ColliderCylinder* collider);
s32 Collider_SetCylinderToActor(PlayState* play, ColliderCylinder* collider, ColliderCylinderInitToActor* src);
s32 Collider_SetCylinderType1(PlayState* play, ColliderCylinder* collider, Actor* actor,
ColliderCylinderInitType1* src);
s32 Collider_SetCylinder(PlayState* play, ColliderCylinder* collider, Actor* actor, ColliderCylinderInit* src);
s32 Collider_ResetCylinderAT(PlayState* play, Collider* collider);
s32 Collider_ResetCylinderAC(PlayState* play, Collider* collider);
s32 Collider_ResetCylinderOC(PlayState* play, Collider* collider);
ColliderJntSphElement* jntSphElements);
s32 Collider_ResetJntSphAT(PlayState* play, Collider* col);
s32 Collider_ResetJntSphAC(PlayState* play, Collider* col);
s32 Collider_ResetJntSphOC(PlayState* play, Collider* col);
s32 Collider_InitCylinder(PlayState* play, ColliderCylinder* cyl);
s32 Collider_DestroyCylinder(PlayState* play, ColliderCylinder* cyl);
s32 Collider_SetCylinderToActor(PlayState* play, ColliderCylinder* dest, ColliderCylinderInitToActor* src);
s32 Collider_SetCylinderType1(PlayState* play, ColliderCylinder* dest, Actor* actor, ColliderCylinderInitType1* src);
s32 Collider_SetCylinder(PlayState* play, ColliderCylinder* dest, Actor* actor, ColliderCylinderInit* src);
s32 Collider_ResetCylinderAT(PlayState* play, Collider* col);
s32 Collider_ResetCylinderAC(PlayState* play, Collider* col);
s32 Collider_ResetCylinderOC(PlayState* play, Collider* col);
s32 Collider_InitTris(PlayState* play, ColliderTris* tris);
s32 Collider_FreeTris(PlayState* play, ColliderTris* tris);
s32 Collider_DestroyTris(PlayState* play, ColliderTris* tris);
s32 Collider_SetTrisAllocType1(PlayState* play, ColliderTris* dest, Actor* actor, ColliderTrisInitType1* src);
s32 Collider_SetTrisAlloc(PlayState* play, ColliderTris* dest, Actor* actor, ColliderTrisInit* src);
s32 Collider_SetTris(PlayState* play, ColliderTris* dest, Actor* actor, ColliderTrisInit* src,
ColliderTrisElement* elements);
s32 Collider_ResetTrisAT(PlayState* play, Collider* collider);
s32 Collider_ResetTrisAC(PlayState* play, Collider* collider);
s32 Collider_ResetTrisOC(PlayState* play, Collider* collider);
s32 Collider_InitQuad(PlayState* play, ColliderQuad* collider);
s32 Collider_DestroyQuad(PlayState* play, ColliderQuad* collider);
s32 Collider_SetQuadType1(PlayState* play, ColliderQuad* collider, Actor* actor, ColliderQuadInitType1* src);
s32 Collider_SetQuad(PlayState* play, ColliderQuad* collider, Actor* actor, ColliderQuadInit* src);
s32 Collider_ResetQuadAT(PlayState* play, Collider* collider);
s32 Collider_ResetQuadAC(PlayState* play, Collider* collider);
s32 Collider_ResetQuadOC(PlayState* play, Collider* collider);
ColliderTrisElement* trisElements);
s32 Collider_ResetTrisAT(PlayState* play, Collider* col);
s32 Collider_ResetTrisAC(PlayState* play, Collider* col);
s32 Collider_ResetTrisOC(PlayState* play, Collider* col);
s32 Collider_InitQuad(PlayState* play, ColliderQuad* quad);
s32 Collider_DestroyQuad(PlayState* play, ColliderQuad* quad);
s32 Collider_SetQuadType1(PlayState* play, ColliderQuad* dest, Actor* actor, ColliderQuadInitType1* src);
s32 Collider_SetQuad(PlayState* play, ColliderQuad* dest, Actor* actor, ColliderQuadInit* src);
s32 Collider_ResetQuadAT(PlayState* play, Collider* col);
s32 Collider_ResetQuadAC(PlayState* play, Collider* col);
s32 Collider_ResetQuadOC(PlayState* play, Collider* col);
s32 Collider_InitLine(PlayState* play, OcLine* line);
s32 Collider_DestroyLine(PlayState* play, OcLine* line);
s32 Collider_SetLinePoints(PlayState* play, OcLine* ocLine, Vec3f* a, Vec3f* b);
@ -710,7 +709,7 @@ void CollisionCheck_DestroyContext(PlayState* play, CollisionCheckContext* colCh
void CollisionCheck_ClearContext(PlayState* play, CollisionCheckContext* colChkCtx);
void CollisionCheck_EnableSAC(PlayState* play, CollisionCheckContext* colChkCtx);
void CollisionCheck_DisableSAC(PlayState* play, CollisionCheckContext* colChkCtx);
void Collider_Draw(PlayState* play, Collider* collider);
void Collider_Draw(PlayState* play, Collider* col);
void CollisionCheck_DrawCollision(PlayState* play, CollisionCheckContext* colChkCtx);
s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider);
s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
@ -732,12 +731,12 @@ void CollisionCheck_Damage(PlayState* play, CollisionCheckContext* colChkCtx);
s32 CollisionCheck_LineOCCheckAll(PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b);
s32 CollisionCheck_LineOCCheck(PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b,
Actor** exclusions, s32 numExclusions);
void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* collider);
void Collider_SetCylinderPosition(ColliderCylinder* collider, 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(PlayState* play, ColliderTris* collider, s32 index, ColliderTrisElementDimInit* src);
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* collider);
void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* cyl);
void Collider_SetCylinderPosition(ColliderCylinder* cyl, Vec3s* pos);
void Collider_SetQuadVertices(ColliderQuad* quad, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
void Collider_SetTrisVertices(ColliderTris* tris, s32 elemIndex, Vec3f* a, Vec3f* b, Vec3f* c);
void Collider_SetTrisDim(PlayState* play, ColliderTris* tris, s32 elemIndex, ColliderTrisElementDimInit* src);
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* jntSph);
void CollisionCheck_SpawnRedBlood(PlayState* play, Vec3f* v);
void CollisionCheck_SpawnWaterDroplets(PlayState* play, Vec3f* v);
void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v);

View file

@ -273,6 +273,8 @@ typedef struct {
/* 0x74 */ s16 unk_74[2]; // context-specific data used by the current scene draw config
} RoomContext; // size = 0x78
#define SAC_ENABLE (1 << 0)
typedef struct {
/* 0x000 */ s16 colATCount;
/* 0x002 */ u16 sacFlags;

View file

@ -8,226 +8,9 @@
struct Actor;
typedef struct {
/* 0x00 */ struct Actor* actor; // Attached actor
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
/* 0x10 */ u8 atFlags; // Information flags for AT collisions.
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} Collider; // size = 0x18
typedef struct {
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
/* 0x02 */ u8 acFlags; // Information flags for AC collisions.
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x04 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x05 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInit; // size = 0x06
typedef struct {
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
/* 0x02 */ u8 acFlags; // Information flags for AC collisions.
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x04 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitType1; // size = 0x05
typedef struct {
/* 0x00 */ struct Actor* actor;
/* 0x04 */ u8 atFlags; // Information flags for AT collisions.
/* 0x05 */ u8 acFlags; // Information flags for AC collisions.
/* 0x06 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x07 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitToActor; // size = 0x08
typedef struct {
/* 0x00 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 damage; // Damage or Stun Timer
} ColliderTouch; // size = 0x08
typedef struct {
/* 0x00 */ u32 dmgFlags; // Bumper damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense; // Damage Resistance
/* 0x06 */ Vec3s hitPos; // Point of contact
} ColliderBump; // size = 0x0C
typedef struct {
/* 0x00 */ u32 dmgFlags; // Bumper exclusion mask
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense; // Damage Resistance
} ColliderBumpInit; // size = 0x08
typedef struct ColliderInfo {
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
} ColliderInfo; // size = 0x28
typedef struct {
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x04 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
} ColliderInfoInit; // size = 0x18
typedef struct {
/* 0x00 */ Sphere16 modelSphere; // model space sphere
/* 0x08 */ Sphere16 worldSphere; // world space sphere
/* 0x10 */ f32 scale; // world space sphere = model * scale * 0.01
/* 0x14 */ u8 limb; // attached limb
} ColliderJntSphElementDim; // size = 0x18
typedef struct {
/* 0x00 */ u8 limb; // attached limb
/* 0x02 */ Sphere16 modelSphere; // model space sphere
/* 0x0A */ s16 scale; // world space sphere = model * scale * 0.01
} ColliderJntSphElementDimInit; // size = 0x0C
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x28 */ ColliderJntSphElementDim dim;
} ColliderJntSphElement; // size = 0x40
typedef struct {
/* 0x00 */ ColliderInfoInit info;
/* 0x18 */ ColliderJntSphElementDimInit dim;
} ColliderJntSphElementInit; // size = 0x24
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderJntSphElement* elements;
} ColliderJntSph; // size = 0x20
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitType1; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitToActor; // size = 0x10
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ Cylinder16 dim;
} ColliderCylinder; // size = 0x4C
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitType1; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitToActor; // size = 0x2C
typedef struct {
/* 0x00 */ Vec3f vtx[3];
} ColliderTrisElementDimInit; // size = 0x24
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x28 */ TriNorm dim;
} ColliderTrisElement; // size = 0x5C
typedef struct {
/* 0x00 */ ColliderInfoInit info;
/* 0x18 */ ColliderTrisElementDimInit dim;
} ColliderTrisElementInit; // size = 0x3C
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderTrisElement* elements;
} ColliderTris; // size = 0x20
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderTrisElementInit* elements;
} ColliderTrisInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderTrisElementInit* elements;
} ColliderTrisInitType1; // size = 0x10
typedef struct {
/* 0x00 */ Vec3f quad[4];
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
/* 0x3C */ f32 acDistSq; // distance to nearest AC collision this frame, squared.
} ColliderQuadDim; // size = 0x40
typedef struct {
/* 0x00 */ Vec3f quad[4];
} ColliderQuadDimInit; // size = 0x30
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x24 */ ColliderQuadDim dim;
} ColliderQuadElement; // size = 0x68
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ ColliderQuadDim dim;
} ColliderQuad; // size = 0x80
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInit; // size = 0x50
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInitType1; // size = 0x50
typedef struct {
/* 0x00 */ Linef line;
/* 0x18 */ u16 ocFlags;
} OcLine; // size = 0x1C
/*
* Bases for all shapes of colliders
*/
typedef enum {
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
@ -254,6 +37,63 @@ typedef enum {
/* 4 */ COLSHAPE_MAX
} ColliderShape;
typedef struct {
/* 0x00 */ struct Actor* actor; // Attached actor
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
/* 0x10 */ u8 atFlags;
/* 0x11 */ u8 acFlags;
/* 0x12 */ u8 ocFlags1;
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions. See `ColliderType` enum
/* 0x15 */ u8 shape; // See `ColliderShape` enum
} Collider; // size = 0x18
typedef struct {
/* 0x00 */ u8 colType;
/* 0x01 */ u8 atFlags;
/* 0x02 */ u8 acFlags;
/* 0x03 */ u8 ocFlags1;
/* 0x04 */ u8 ocFlags2;
/* 0x05 */ u8 shape;
} ColliderInit; // size = 0x06
typedef struct {
/* 0x00 */ u8 colType;
/* 0x01 */ u8 atFlags;
/* 0x02 */ u8 acFlags;
/* 0x03 */ u8 ocFlags1;
/* 0x04 */ u8 shape;
} ColliderInitType1; // size = 0x05
typedef struct {
/* 0x00 */ struct Actor* actor;
/* 0x04 */ u8 atFlags;
/* 0x05 */ u8 acFlags;
/* 0x06 */ u8 ocFlags1;
/* 0x07 */ u8 shape;
} ColliderInitToActor; // size = 0x08
typedef struct {
/* 0x00 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 damage; // Damage or Stun Timer
} ColliderElementTouch; // size = 0x08
typedef struct {
/* 0x00 */ u32 dmgFlags; // Bumper damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense; // Damage Resistance
/* 0x06 */ Vec3s hitPos; // Point of contact
} ColliderElementBump; // size = 0x0C
typedef struct {
/* 0x00 */ u32 dmgFlags; // Bumper exclusion mask
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense; // Damage Resistance
} ColliderElementBumpInit; // size = 0x08
/**
* Affects the sound Link's sword makes when hitting it, hookability,
* and possibly other things. It's definitely not flags, as all checks
@ -271,7 +111,204 @@ typedef enum {
/* 7 */ ELEMTYPE_UNK7
} ElementType;
#define SAC_ENABLE (1 << 0)
typedef struct ColliderElement {
/* 0x00 */ ColliderElementTouch toucher; // Damage properties when acting as an AT collider
/* 0x08 */ ColliderElementBump bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
/* 0x20 */ struct ColliderElement* atHitElem; // element that hit the AT collider
/* 0x24 */ struct ColliderElement* acHitElem; // element that hit the AC collider
} ColliderElement; // size = 0x28
typedef struct {
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x04 */ ColliderElementTouch toucher; // Damage properties when acting as an AT collider
/* 0x0C */ ColliderElementBumpInit bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
} ColliderElementInit; // size = 0x18
/*
* JntSph - A collider made of sphere shaped elements. Each sphere can attach to a skeleton joint (limb).
*/
// collider structs
typedef struct {
/* 0x00 */ Sphere16 modelSphere; // model space sphere
/* 0x08 */ Sphere16 worldSphere; // world space sphere
/* 0x10 */ f32 scale; // world space sphere = model * scale * 0.01
/* 0x14 */ u8 limb; // attached limb
} ColliderJntSphElementDim; // size = 0x18
typedef struct {
/* 0x00 */ ColliderElement base;
/* 0x28 */ ColliderJntSphElementDim dim;
} ColliderJntSphElement; // size = 0x40
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderJntSphElement* elements;
} ColliderJntSph; // size = 0x20
// init data structs
typedef struct {
/* 0x00 */ u8 limb; // attached limb
/* 0x02 */ Sphere16 modelSphere; // model space sphere
/* 0x0A */ s16 scale; // world space sphere = model * scale * 0.01
} ColliderJntSphElementDimInit; // size = 0x0C
typedef struct {
/* 0x00 */ ColliderElementInit base;
/* 0x18 */ ColliderJntSphElementDimInit dim;
} ColliderJntSphElementInit; // size = 0x24
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitType1; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitToActor; // size = 0x10
/*
* Cylinder - A single cylinder shaped collider
*/
// collider structs
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderElement elem;
/* 0x40 */ Cylinder16 dim;
} ColliderCylinder; // size = 0x4C
// init data structs
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderElementInit elem;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderElementInit elem;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitType1; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ ColliderElementInit elem;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitToActor; // size = 0x2C
/*
* Tris - A collider made of triangle shaped elements
*/
// collider structs
typedef struct {
/* 0x00 */ ColliderElement base;
/* 0x28 */ TriNorm dim;
} ColliderTrisElement; // size = 0x5C
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderTrisElement* elements;
} ColliderTris; // size = 0x20
// init data structs
typedef struct {
/* 0x00 */ Vec3f vtx[3];
} ColliderTrisElementDimInit; // size = 0x24
typedef struct {
/* 0x00 */ ColliderElementInit base;
/* 0x18 */ ColliderTrisElementDimInit dim;
} ColliderTrisElementInit; // size = 0x3C
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderTrisElementInit* elements;
} ColliderTrisInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderTrisElementInit* elements;
} ColliderTrisInitType1; // size = 0x10
/*
* Quad - A single quad shaped collider
*/
// collider structs
typedef struct {
/* 0x00 */ Vec3f quad[4];
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
/* 0x3C */ f32 acDistSq; // distance to nearest AC collision this frame, squared.
} ColliderQuadDim; // size = 0x40
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderElement elem;
/* 0x40 */ ColliderQuadDim dim;
} ColliderQuad; // size = 0x80
// init data structs
typedef struct {
/* 0x00 */ Vec3f quad[4];
} ColliderQuadDimInit; // size = 0x30
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderElementInit elem;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInit; // size = 0x50
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderElementInit elem;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInitType1; // size = 0x50
/*
* Line collider
*/
typedef struct {
/* 0x00 */ Linef line;
/* 0x18 */ u16 ocFlags;
} OcLine; // size = 0x1C
/*
* Collider properties, for all shapes
*/
#define AT_NONE 0 // No flags set. Cannot have AT collisions when set as AT
#define AT_ON (1 << 0) // Can have AT collisions when set as AT

View file

@ -4294,28 +4294,27 @@ u8 Actor_ApplyDamage(Actor* actor) {
return actor->colChkInfo.health;
}
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo, s32 freezeFlag) {
if (colInfo->acHitInfo == NULL) {
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag) {
if (elem->acHitElem == NULL) {
actor->dropFlag = 0x00;
} else if (freezeFlag &&
(colInfo->acHitInfo->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
actor->freezeTimer = colInfo->acHitInfo->toucher.damage;
} else if (freezeFlag && (elem->acHitElem->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
actor->freezeTimer = elem->acHitElem->toucher.damage;
actor->dropFlag = 0x00;
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_FIRE) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_FIRE) {
actor->dropFlag = 0x01;
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_ICE) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_ICE) {
actor->dropFlag = 0x02;
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK1) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_UNK1) {
actor->dropFlag = 0x04;
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK2) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_UNK2) {
actor->dropFlag = 0x08;
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK3) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_UNK3) {
actor->dropFlag = 0x10;
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_LIGHT) {
actor->dropFlag = 0x20;
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
if (freezeFlag) {
actor->freezeTimer = colInfo->acHitInfo->toucher.damage;
actor->freezeTimer = elem->acHitElem->toucher.damage;
}
actor->dropFlag = 0x40;
} else {
@ -4324,35 +4323,35 @@ void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo, s32 freezeFlag) {
}
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag) {
ColliderInfo* curColInfo;
ColliderElement* elem;
s32 flag;
s32 i;
actor->dropFlag = 0x00;
for (i = jntSph->count - 1; i >= 0; i--) {
curColInfo = &jntSph->elements[i].info;
if (curColInfo->acHitInfo == NULL) {
elem = &jntSph->elements[i].base;
if (elem->acHitElem == NULL) {
flag = 0x00;
} else if (freezeFlag &&
(curColInfo->acHitInfo->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
actor->freezeTimer = curColInfo->acHitInfo->toucher.damage;
(elem->acHitElem->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
actor->freezeTimer = elem->acHitElem->toucher.damage;
flag = 0x00;
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_FIRE) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_FIRE) {
flag = 0x01;
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_ICE) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_ICE) {
flag = 0x02;
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK1) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_UNK1) {
flag = 0x04;
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK2) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_UNK2) {
flag = 0x08;
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK3) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_UNK3) {
flag = 0x10;
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_ARROW_LIGHT) {
flag = 0x20;
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
} else if (elem->acHitElem->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
if (freezeFlag) {
actor->freezeTimer = curColInfo->acHitInfo->toucher.damage;
actor->freezeTimer = elem->acHitElem->toucher.damage;
}
flag = 0x40;
} else {

File diff suppressed because it is too large Load diff

View file

@ -169,10 +169,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
ArmsHook_CheckForCancel(this);
if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
(this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
(this->collider.elem.atHitElem->elemType != ELEMTYPE_UNK4)) {
touchedActor = this->collider.base.at;
if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) {
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
if (this->collider.elem.atHitElem->bumperFlags & BUMP_HOOKABLE) {
ArmsHook_AttachHookToActor(this, touchedActor);
if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_10)) {
func_80865044(this);

View file

@ -166,8 +166,8 @@ void BgHakaTrap_Init(Actor* thisx, PlayState* play) {
this->colliderCylinder.dim.radius = 18;
this->colliderCylinder.dim.height = 115;
this->colliderCylinder.info.toucherFlags &= ~TOUCH_SFX_NORMAL;
this->colliderCylinder.info.toucherFlags |= TOUCH_SFX_WOOD;
this->colliderCylinder.elem.toucherFlags &= ~TOUCH_SFX_NORMAL;
this->colliderCylinder.elem.toucherFlags |= TOUCH_SFX_WOOD;
this->actionFunc = func_808801B8;
}

View file

@ -116,7 +116,7 @@ void BgHakaTubo_Idle(BgHakaTubo* this, PlayState* play) {
this->flamesCollider.base.atFlags &= ~AT_HIT;
func_8002F71C(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 5.0f);
}
// Colliding with hitbox inside the pot
// Colliding with collider inside the pot
if (this->potCollider.base.acFlags & AC_HIT) {
this->potCollider.base.acFlags &= ~AC_HIT;
// If the colliding actor is within a 50 unit radius and 50 unit height cylinder centered

View file

@ -129,8 +129,8 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) {
(player->meleeWeaponAnimation == PLAYER_MWA_HAMMER_FORWARD ||
player->meleeWeaponAnimation == PLAYER_MWA_HAMMER_SIDE)) {
this->collider.base.acFlags &= ~AC_HIT;
if ((this->collider.elements[0].info.bumperFlags & BUMP_HIT) ||
(this->collider.elements[1].info.bumperFlags & BUMP_HIT)) {
if ((this->collider.elements[0].base.bumperFlags & BUMP_HIT) ||
(this->collider.elements[1].base.bumperFlags & BUMP_HIT)) {
this->dyna.actor.world.rot.y -= 0x4000;
} else {
this->dyna.actor.world.rot.y += 0x4000;

View file

@ -139,8 +139,8 @@ void func_8088CEC0(BgHidanSekizou* this, s32 arg1, s16 arg2) {
element->dim.worldSphere.center.y = (s16)this->dyna.actor.home.pos.y + element->dim.modelSphere.center.y;
element->dim.worldSphere.center.z = this->dyna.actor.home.pos.z - (sp30 * element->dim.modelSphere.center.x) +
(sp2C * element->dim.modelSphere.center.z);
element->info.toucherFlags |= TOUCH_ON;
element->info.ocElemFlags |= OCELEM_ON;
element->base.toucherFlags |= TOUCH_ON;
element->base.ocElemFlags |= OCELEM_ON;
}
}
@ -210,8 +210,8 @@ void func_8088D434(BgHidanSekizou* this, PlayState* play) {
}
}
for (i = 3 * phi_s4; i < ARRAY_COUNT(this->elements); i++) {
this->collider.elements[i].info.toucherFlags &= ~TOUCH_ON;
this->collider.elements[i].info.ocElemFlags &= ~OCELEM_ON;
this->collider.elements[i].base.toucherFlags &= ~TOUCH_ON;
this->collider.elements[i].base.ocElemFlags &= ~OCELEM_ON;
}
}

View file

@ -1225,7 +1225,7 @@ void BossDodongo_SpawnFire(BossDodongo* this, PlayState* play, s16 params) {
void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) {
s32 pad;
ColliderInfo* item;
ColliderElement* acHitElem;
u8 swordDamage;
s32 damage;
s16 i;
@ -1239,11 +1239,12 @@ void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) {
if (this->unk_1C0 == 0) {
if (this->actionFunc == BossDodongo_Inhale) {
for (i = 0; i < 19; i++) {
if (this->collider.elements[i].info.bumperFlags & BUMP_HIT) {
item = this->collider.elements[i].info.acHitInfo;
if (this->collider.elements[i].base.bumperFlags & BUMP_HIT) {
acHitElem = this->collider.elements[i].base.acHitElem;
if ((item->toucher.dmgFlags & DMG_BOOMERANG) || (item->toucher.dmgFlags & DMG_SLINGSHOT)) {
this->collider.elements[i].info.bumperFlags &= ~BUMP_HIT;
if ((acHitElem->toucher.dmgFlags & DMG_BOOMERANG) ||
(acHitElem->toucher.dmgFlags & DMG_SLINGSHOT)) {
this->collider.elements[i].base.bumperFlags &= ~BUMP_HIT;
this->unk_1C0 = 2;
BossDodongo_SetupWalk(this);
this->unk_1DA = 0x32;
@ -1253,11 +1254,11 @@ void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) {
}
}
if (this->collider.elements->info.bumperFlags & BUMP_HIT) {
this->collider.elements->info.bumperFlags &= ~BUMP_HIT;
item = this->collider.elements[0].info.acHitInfo;
if (this->collider.elements[0].base.bumperFlags & BUMP_HIT) {
this->collider.elements[0].base.bumperFlags &= ~BUMP_HIT;
acHitElem = this->collider.elements[0].base.acHitElem;
if ((this->actionFunc == BossDodongo_Vulnerable) || (this->actionFunc == BossDodongo_LayDown)) {
swordDamage = damage = CollisionCheck_GetSwordDamage(item->toucher.dmgFlags);
swordDamage = damage = CollisionCheck_GetSwordDamage(acHitElem->toucher.dmgFlags);
if (damage != 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_K_DAMAGE);

View file

@ -1279,13 +1279,13 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
void BossFd_CollisionCheck(BossFd* this, PlayState* play) {
ColliderJntSphElement* headCollider = &this->collider.elements[0];
ColliderInfo* hurtbox;
ColliderElement* acHitElem;
if (headCollider->info.bumperFlags & BUMP_HIT) {
headCollider->info.bumperFlags &= ~BUMP_HIT;
hurtbox = headCollider->info.acHitInfo;
if (headCollider->base.bumperFlags & BUMP_HIT) {
headCollider->base.bumperFlags &= ~BUMP_HIT;
acHitElem = headCollider->base.acHitElem;
this->actor.colChkInfo.health -= 2;
if (hurtbox->toucher.dmgFlags & DMG_ARROW_ICE) {
if (acHitElem->toucher.dmgFlags & DMG_ARROW_ICE) {
this->actor.colChkInfo.health -= 2;
}
if ((s8)this->actor.colChkInfo.health <= 2) {

View file

@ -806,33 +806,33 @@ void BossFd2_Wait(BossFd2* this, PlayState* play) {
void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) {
s16 i;
ColliderInfo* hurtbox;
ColliderElement* acHitElem;
BossFd* bossFd = (BossFd*)this->actor.parent;
if (this->actionFunc == BossFd2_ClawSwipe) {
Player* player = GET_PLAYER(play);
for (i = 0; i < ARRAY_COUNT(this->elements); i++) {
if (this->collider.elements[i].info.toucherFlags & TOUCH_HIT) {
this->collider.elements[i].info.toucherFlags &= ~TOUCH_HIT;
if (this->collider.elements[i].base.toucherFlags & TOUCH_HIT) {
this->collider.elements[i].base.toucherFlags &= ~TOUCH_HIT;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
}
}
if (!bossFd->faceExposed) {
this->collider.elements[0].info.elemType = ELEMTYPE_UNK2;
this->collider.elements[0].base.elemType = ELEMTYPE_UNK2;
this->collider.base.colType = COLTYPE_METAL;
} else {
this->collider.elements[0].info.elemType = ELEMTYPE_UNK3;
this->collider.elements[0].base.elemType = ELEMTYPE_UNK3;
this->collider.base.colType = COLTYPE_HIT3;
}
if (this->collider.elements[0].info.bumperFlags & BUMP_HIT) {
this->collider.elements[0].info.bumperFlags &= ~BUMP_HIT;
if (this->collider.elements[0].base.bumperFlags & BUMP_HIT) {
this->collider.elements[0].base.bumperFlags &= ~BUMP_HIT;
hurtbox = this->collider.elements[0].info.acHitInfo;
acHitElem = this->collider.elements[0].base.acHitElem;
if (!bossFd->faceExposed) {
if (hurtbox->toucher.dmgFlags & DMG_HAMMER) {
if (acHitElem->toucher.dmgFlags & DMG_HAMMER) {
bossFd->actor.colChkInfo.health -= 2;
if ((s8)bossFd->actor.colChkInfo.health <= 2) {
bossFd->actor.colChkInfo.health = 1;
@ -863,12 +863,12 @@ void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) {
u8 canKill = false;
u8 damage;
if ((damage = CollisionCheck_GetSwordDamage(hurtbox->toucher.dmgFlags)) == 0) {
damage = (hurtbox->toucher.dmgFlags & DMG_ARROW_ICE) ? 4 : 2;
if ((damage = CollisionCheck_GetSwordDamage(acHitElem->toucher.dmgFlags)) == 0) {
damage = (acHitElem->toucher.dmgFlags & DMG_ARROW_ICE) ? 4 : 2;
} else {
canKill = true;
}
if (hurtbox->toucher.dmgFlags & DMG_HOOKSHOT) {
if (acHitElem->toucher.dmgFlags & DMG_HOOKSHOT) {
damage = 0;
}
if (((s8)bossFd->actor.colChkInfo.health > 2) || canKill) {

View file

@ -2681,22 +2681,22 @@ void BossGanon_Damaged(BossGanon* this, PlayState* play) {
void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
s16 i;
s16 j;
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
if (this->collider.base.acFlags & AC_HIT) {
this->unk_2D4 = 2;
this->collider.base.acFlags &= ~AC_HIT;
acHitInfo = this->collider.info.acHitInfo;
acHitElem = this->collider.elem.acHitElem;
if ((this->actionFunc == BossGanon_HitByLightBall) || (this->actionFunc == BossGanon_ChargeBigMagic)) {
if (acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
if (acHitElem->toucher.dmgFlags & DMG_ARROW_LIGHT) {
BossGanon_SetupVulnerable(this, play);
this->timers[2] = 0;
Actor_PlaySfx(&this->actor, NA_SE_EN_GANON_DAMAGE1);
this->unk_1A6 = 15;
}
} else if ((this->actionFunc == BossGanon_Vulnerable) && (this->unk_1C2 >= 3)) {
if (!(acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
if (!(acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
u8 hitWithSword = false;
u8 damage;
Vec3f sp50;
@ -2710,7 +2710,7 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
0x1E);
}
damage = flags = CollisionCheck_GetSwordDamage(acHitInfo->toucher.dmgFlags);
damage = flags = CollisionCheck_GetSwordDamage(acHitElem->toucher.dmgFlags);
if (flags == 0) {
damage = 2;
@ -2744,7 +2744,7 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
sCape->tearTimer = 1;
}
}
} else if (acHitInfo->toucher.dmgFlags & DMG_RANGED) {
} else if (acHitElem->toucher.dmgFlags & DMG_RANGED) {
Actor_PlaySfx(&this->actor, 0);
for (i = 0; i < ARRAY_COUNT(sCape->strands); i++) {
@ -3931,11 +3931,11 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
}
if ((this->collider.base.acFlags & AC_HIT) || hitWithBottle) {
ColliderInfo* acHitInfo = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.elem.acHitElem;
this->collider.base.acFlags &= ~AC_HIT;
if ((hitWithBottle == false) && (acHitInfo->toucher.dmgFlags & DMG_SHIELD)) {
if ((hitWithBottle == false) && (acHitElem->toucher.dmgFlags & DMG_SHIELD)) {
spBA = 2;
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_MG, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
@ -4305,7 +4305,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
BossGanon* dorf = (BossGanon*)this->actor.parent;
s32 pad;
Player* player = GET_PLAYER(play);
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
Vec3f sp60;
this->unk_1A2++;
@ -4415,11 +4415,11 @@ void func_808E2544(Actor* thisx, PlayState* play) {
}
if (this->collider.base.acFlags & AC_HIT) {
acHitInfo = this->collider.info.acHitInfo;
acHitElem = this->collider.elem.acHitElem;
this->collider.base.acFlags &= ~AC_HIT;
if (!(acHitInfo->toucher.dmgFlags & DMG_SHIELD) || Player_HasMirrorShieldEquipped(play)) {
if (!(acHitElem->toucher.dmgFlags & DMG_SHIELD) || Player_HasMirrorShieldEquipped(play)) {
Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100);
this->unk_1C2 = 0xC;
this->actor.speed = -30.0f;

View file

@ -1842,10 +1842,10 @@ void func_80902348(BossGanon2* this, PlayState* play) {
if (this->unk_316 == 0) {
for (i = 0; i < ARRAY_COUNT(this->unk_864); i++) {
if (this->unk_444.elements[i].info.bumperFlags & BUMP_HIT) {
this->unk_444.elements[i].info.bumperFlags &= ~BUMP_HIT;
} else if (this->unk_444.elements[i].info.toucherFlags & TOUCH_HIT) {
this->unk_444.elements[i].info.toucherFlags &= ~TOUCH_HIT;
if (this->unk_444.elements[i].base.bumperFlags & BUMP_HIT) {
this->unk_444.elements[i].base.bumperFlags &= ~BUMP_HIT;
} else if (this->unk_444.elements[i].base.toucherFlags & TOUCH_HIT) {
this->unk_444.elements[i].base.toucherFlags &= ~TOUCH_HIT;
if (this->unk_312 == 1) {
phi_v0_2 = 0x1800;
@ -1880,30 +1880,30 @@ void func_80902348(BossGanon2* this, PlayState* play) {
void func_80902524(BossGanon2* this, PlayState* play) {
s8 temp_v0_4;
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
s16 i;
u8 phi_v1_2;
osSyncPrintf("this->no_hit_time %d\n", this->unk_316);
if (this->unk_316 != 0 || ((this->unk_334 == 0) && (this->actionFunc == func_80900890))) {
for (i = 0; i < ARRAY_COUNT(this->unk_464); i++) {
this->unk_424.elements[i].info.bumperFlags &= ~BUMP_HIT;
this->unk_424.elements[i].base.bumperFlags &= ~BUMP_HIT;
}
}
osSyncPrintf("this->look_on %d\n", this->unk_313);
if (this->unk_313) {
if (this->actionFunc != func_808FFFE0) {
if (this->unk_424.elements[0].info.bumperFlags & BUMP_HIT) {
this->unk_424.elements[0].info.bumperFlags &= ~BUMP_HIT;
acHitInfo = this->unk_424.elements[0].info.acHitInfo;
if ((acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) && (this->actionFunc != func_80900890)) {
if (this->unk_424.elements[0].base.bumperFlags & BUMP_HIT) {
this->unk_424.elements[0].base.bumperFlags &= ~BUMP_HIT;
acHitElem = this->unk_424.elements[0].base.acHitElem;
if ((acHitElem->toucher.dmgFlags & DMG_ARROW_LIGHT) && (this->actionFunc != func_80900890)) {
func_809000A0(this, play);
Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_HIT_THUNDER);
Actor_PlaySfx(&this->actor, NA_SE_EN_MGANON_DAMAGE);
Audio_StopSfxById(NA_SE_EN_MGANON_UNARI);
} else if ((this->actionFunc == func_80900890) &&
(acHitInfo->toucher.dmgFlags & (DMG_JUMP_MASTER | DMG_SPIN_MASTER | DMG_SLASH_MASTER))) {
(acHitElem->toucher.dmgFlags & (DMG_JUMP_MASTER | DMG_SPIN_MASTER | DMG_SLASH_MASTER))) {
this->unk_316 = 60;
this->unk_342 = 5;
Actor_PlaySfx(&this->actor, NA_SE_EN_MGANON_DAMAGE);
@ -1926,17 +1926,17 @@ void func_80902524(BossGanon2* this, PlayState* play) {
}
}
} else {
if (this->unk_424.elements[15].info.bumperFlags & BUMP_HIT) {
this->unk_424.elements[15].info.bumperFlags &= ~BUMP_HIT;
acHitInfo = this->unk_424.elements[15].info.acHitInfo;
if (this->unk_424.elements[15].base.bumperFlags & BUMP_HIT) {
this->unk_424.elements[15].base.bumperFlags &= ~BUMP_HIT;
acHitElem = this->unk_424.elements[15].base.acHitElem;
this->unk_316 = 60;
this->unk_344 = 0x32;
this->unk_342 = 5;
Actor_PlaySfx(&this->actor, NA_SE_EN_MGANON_DAMAGE);
Audio_StopSfxById(NA_SE_EN_MGANON_UNARI);
phi_v1_2 = 1;
if (acHitInfo->toucher.dmgFlags & (DMG_JUMP_MASTER | DMG_SPIN_MASTER | DMG_SLASH_MASTER)) {
if (acHitInfo->toucher.dmgFlags & DMG_JUMP_MASTER) {
if (acHitElem->toucher.dmgFlags & (DMG_JUMP_MASTER | DMG_SPIN_MASTER | DMG_SLASH_MASTER)) {
if (acHitElem->toucher.dmgFlags & DMG_JUMP_MASTER) {
phi_v1_2 = 4;
} else {
phi_v1_2 = 2;

View file

@ -1224,7 +1224,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
s32 acHit;
EnfHG* horse = (EnfHG*)this->actor.child;
ColliderInfo* hurtbox;
ColliderElement* acHitElem;
if (this->work[GND_INVINC_TIMER] != 0) {
this->work[GND_INVINC_TIMER]--;
@ -1235,17 +1235,18 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
if ((acHit && ((s8)this->actor.colChkInfo.health > 0)) || (this->returnCount != 0)) {
if (acHit) {
this->colliderBody.base.acFlags &= ~AC_HIT;
hurtbox = this->colliderBody.info.acHitInfo;
acHitElem = this->colliderBody.elem.acHitElem;
}
if (this->flyMode != GND_FLY_PAINTING) {
if (acHit && (this->actionFunc != BossGanondrof_Stunned) && (hurtbox->toucher.dmgFlags & DMG_RANGED)) {
if (acHit && (this->actionFunc != BossGanondrof_Stunned) &&
(acHitElem->toucher.dmgFlags & DMG_RANGED)) {
Actor_PlaySfx(&this->actor, NA_SE_NONE);
osSyncPrintf("hit != 0 \n");
} else if (this->actionFunc != BossGanondrof_Charge) {
if (this->returnCount == 0) {
u8 dmg;
u8 canKill = false;
s32 dmgFlags = hurtbox->toucher.dmgFlags;
s32 dmgFlags = acHitElem->toucher.dmgFlags;
if (dmgFlags & DMG_HOOKSHOT) {
return;
@ -1272,7 +1273,7 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
} else {
Actor_PlaySfx(&this->actor, NA_SE_NONE);
}
} else if (acHit && (hurtbox->toucher.dmgFlags & DMG_RANGED)) {
} else if (acHit && (acHitElem->toucher.dmgFlags & DMG_RANGED)) {
this->work[GND_INVINC_TIMER] = 10;
this->actor.colChkInfo.health -= 2;
horse->hitTimer = 20;

View file

@ -1301,7 +1301,7 @@ void BossGoma_FloorAttack(BossGoma* this, PlayState* play) {
switch (this->actionState) {
case 0:
for (i = 0; i < this->collider.count; i++) {
if (this->collider.elements[i].info.toucherFlags & TOUCH_HIT) {
if (this->collider.elements[i].base.toucherFlags & TOUCH_HIT) {
this->framesUntilNextAction = 10;
break;
}
@ -1807,19 +1807,19 @@ void BossGoma_UpdateHit(BossGoma* this, PlayState* play) {
if (this->invincibilityFrames != 0) {
this->invincibilityFrames--;
} else {
ColliderInfo* acHitInfo = this->collider.elements[0].info.acHitInfo;
ColliderElement* acHitElem = this->collider.elements[0].base.acHitElem;
s32 damage;
if (this->eyeClosedTimer == 0 && this->actionFunc != BossGoma_CeilingSpawnGohmas &&
(this->collider.elements[0].info.bumperFlags & BUMP_HIT)) {
this->collider.elements[0].info.bumperFlags &= ~BUMP_HIT;
(this->collider.elements[0].base.bumperFlags & BUMP_HIT)) {
this->collider.elements[0].base.bumperFlags &= ~BUMP_HIT;
if (this->actionFunc == BossGoma_CeilingMoveToCenter || this->actionFunc == BossGoma_CeilingIdle ||
this->actionFunc == BossGoma_CeilingPrepareSpawnGohmas) {
BossGoma_SetupFallStruckDown(this);
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_DAM2);
} else if (this->actionFunc == BossGoma_FloorStunned &&
(damage = CollisionCheck_GetSwordDamage(acHitInfo->toucher.dmgFlags)) != 0) {
(damage = CollisionCheck_GetSwordDamage(acHitElem->toucher.dmgFlags)) != 0) {
this->actor.colChkInfo.health -= damage;
if ((s8)this->actor.colChkInfo.health > 0) {
@ -1833,14 +1833,14 @@ void BossGoma_UpdateHit(BossGoma* this, PlayState* play) {
this->invincibilityFrames = 10;
} else if (this->actionFunc != BossGoma_FloorStunned && this->patienceTimer != 0 &&
(acHitInfo->toucher.dmgFlags & (DMG_SLINGSHOT | DMG_DEKU_NUT))) {
(acHitElem->toucher.dmgFlags & (DMG_SLINGSHOT | DMG_DEKU_NUT))) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_DAM2);
Audio_StopSfxById(NA_SE_EN_GOMA_CRY1);
this->invincibilityFrames = 10;
BossGoma_SetupFloorStunned(this);
this->sfxFaintTimer = 100;
if (acHitInfo->toucher.dmgFlags & DMG_DEKU_NUT) {
if (acHitElem->toucher.dmgFlags & DMG_DEKU_NUT) {
this->framesUntilNextAction = 40;
} else {
this->framesUntilNextAction = 90;

View file

@ -1139,24 +1139,24 @@ void BossMo_TentCollisionCheck(BossMo* this, PlayState* play) {
s16 i1;
for (i1 = 0; i1 < ARRAY_COUNT(this->tentElements); i1++) {
if (this->tentCollider.elements[i1].info.bumperFlags & BUMP_HIT) {
if (this->tentCollider.elements[i1].base.bumperFlags & BUMP_HIT) {
s16 i2;
ColliderInfo* hurtbox;
ColliderElement* acHitElem;
for (i2 = 0; i2 < 19; i2++) {
this->tentCollider.elements[i2].info.bumperFlags &= ~BUMP_HIT;
this->tentCollider.elements[i2].info.toucherFlags &= ~TOUCH_HIT;
this->tentCollider.elements[i2].base.bumperFlags &= ~BUMP_HIT;
this->tentCollider.elements[i2].base.toucherFlags &= ~TOUCH_HIT;
}
hurtbox = this->tentCollider.elements[i1].info.acHitInfo;
acHitElem = this->tentCollider.elements[i1].base.acHitElem;
this->work[MO_TENT_INVINC_TIMER] = 5;
if (hurtbox->toucher.dmgFlags & DMG_MAGIC_FIRE) {
if (acHitElem->toucher.dmgFlags & DMG_MAGIC_FIRE) {
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_CUT);
this->cutIndex = 15;
this->meltIndex = this->cutIndex + 1;
this->work[MO_TENT_ACTION_STATE] = MO_TENT_CUT;
this->timers[0] = 40;
this->cutScale = 1.0f;
} else if (hurtbox->toucher.dmgFlags & (DMG_JUMP_MASTER | DMG_JUMP_GIANT | DMG_SPIN_MASTER |
} else if (acHitElem->toucher.dmgFlags & (DMG_JUMP_MASTER | DMG_JUMP_GIANT | DMG_SPIN_MASTER |
DMG_SPIN_GIANT | DMG_SLASH_GIANT | DMG_SLASH_MASTER)) {
this->playerHitTimer = 5;
}
@ -1175,8 +1175,8 @@ void BossMo_TentCollisionCheck(BossMo* this, PlayState* play) {
Rand_ZeroFloat(0.08f) + 0.13f);
}
break;
} else if (this->tentCollider.elements[i1].info.toucherFlags & TOUCH_HIT) {
this->tentCollider.elements[i1].info.toucherFlags &= ~TOUCH_HIT;
} else if (this->tentCollider.elements[i1].base.toucherFlags & TOUCH_HIT) {
this->tentCollider.elements[i1].base.toucherFlags &= ~TOUCH_HIT;
this->playerHitTimer = 5;
break;
}
@ -1745,17 +1745,17 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
}
}
if (this->coreCollider.base.acFlags & AC_HIT) {
ColliderInfo* hurtbox = this->coreCollider.info.acHitInfo;
ColliderElement* acHitElem = this->coreCollider.elem.acHitElem;
// "hit!!"
osSyncPrintf("Core_Damage_check 当り!!\n");
this->coreCollider.base.acFlags &= ~AC_HIT;
if ((hurtbox->toucher.dmgFlags & DMG_MAGIC_FIRE) && (this->work[MO_TENT_ACTION_STATE] == MO_CORE_ATTACK)) {
if ((acHitElem->toucher.dmgFlags & DMG_MAGIC_FIRE) && (this->work[MO_TENT_ACTION_STATE] == MO_CORE_ATTACK)) {
this->work[MO_TENT_ACTION_STATE] = MO_CORE_RETREAT;
}
// "hit 2 !!"
osSyncPrintf("Core_Damage_check 当り 2 \n");
if ((this->work[MO_TENT_ACTION_STATE] != MO_CORE_UNDERWATER) && (this->work[MO_TENT_INVINC_TIMER] == 0)) {
u8 damage = CollisionCheck_GetSwordDamage(hurtbox->toucher.dmgFlags);
u8 damage = CollisionCheck_GetSwordDamage(acHitElem->toucher.dmgFlags);
if ((damage != 0) && (this->work[MO_TENT_ACTION_STATE] < MO_CORE_ATTACK)) {
// "sword hit !!"
@ -1793,7 +1793,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
}
}
this->work[MO_TENT_INVINC_TIMER] = 10;
} else if (!(hurtbox->toucher.dmgFlags & DMG_SHIELD) && (hurtbox->toucher.dmgFlags & DMG_HOOKSHOT)) {
} else if (!(acHitElem->toucher.dmgFlags & DMG_SHIELD) && (acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
if (this->work[MO_TENT_ACTION_STATE] >= MO_CORE_ATTACK) {
Sfx_PlaySfxAtPos(&sMorphaTent1->tentTipPos, NA_SE_EN_MOFER_CUT);
sMorphaTent1->cutIndex = this->work[MO_CORE_POS_IN_TENT];

View file

@ -870,10 +870,10 @@ void BossSst_HeadStunned(BossSst* this, PlayState* play) {
void BossSst_HeadSetupVulnerable(BossSst* this) {
Animation_MorphToLoop(&this->skelAnime, &gBongoHeadStunnedAnim, -5.0f);
this->colliderCyl.base.acFlags |= AC_ON;
this->colliderCyl.info.bumper.dmgFlags = DMG_SWORD | DMG_DEKU_STICK;
this->colliderCyl.elem.bumper.dmgFlags = DMG_SWORD | DMG_DEKU_STICK;
this->actor.speed = 0.0f;
this->colliderJntSph.elements[10].info.bumperFlags |= (BUMP_ON | BUMP_HOOKABLE);
this->colliderJntSph.elements[0].info.bumperFlags &= ~BUMP_ON;
this->colliderJntSph.elements[10].base.bumperFlags |= (BUMP_ON | BUMP_HOOKABLE);
this->colliderJntSph.elements[0].base.bumperFlags &= ~BUMP_ON;
if (this->actionFunc != BossSst_HeadDamage) {
this->timer = 50;
}
@ -929,9 +929,9 @@ void BossSst_HeadDamage(BossSst* this, PlayState* play) {
void BossSst_HeadSetupRecover(BossSst* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadRecoverAnim, -5.0f);
this->colliderCyl.base.acFlags &= ~AC_ON;
this->colliderCyl.info.bumper.dmgFlags = DMG_DEFAULT;
this->colliderJntSph.elements[10].info.bumperFlags &= ~(BUMP_ON | BUMP_HOOKABLE);
this->colliderJntSph.elements[0].info.bumperFlags |= BUMP_ON;
this->colliderCyl.elem.bumper.dmgFlags = DMG_DEFAULT;
this->colliderJntSph.elements[10].base.bumperFlags &= ~(BUMP_ON | BUMP_HOOKABLE);
this->colliderJntSph.elements[0].base.bumperFlags |= BUMP_ON;
this->vVanish = true;
this->actor.speed = 5.0f;
this->actionFunc = BossSst_HeadRecover;
@ -2496,7 +2496,7 @@ void BossSst_HandSetDamage(BossSst* this, s32 damage) {
this->colliderJntSph.base.atFlags |= AT_ON;
for (i = 0; i < 11; i++) {
this->colliderJntSph.elements[i].info.toucher.damage = damage;
this->colliderJntSph.elements[i].base.toucher.damage = damage;
}
}

View file

@ -464,7 +464,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
if (this->actor.params == TW_FIRE_BLAST || this->actor.params == TW_FIRE_BLAST_GROUND) {
this->actionFunc = BossTw_BlastFire;
this->collider.info.toucher.effect = 1;
this->collider.elem.toucher.effect = 1;
} else if (this->actor.params == TW_ICE_BLAST || this->actor.params == TW_ICE_BLAST_GROUND) {
this->actionFunc = BossTw_BlastIce;
} else if (this->actor.params >= TW_DEATHBALL_KOTAKE) {
@ -3093,19 +3093,19 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) {
BossTw_TwinrovaDamage(this, play, 0);
Actor_PlaySfx(&this->actor, NA_SE_EN_TWINROBA_YOUNG_DAMAGE);
} else if (this->collider.base.acFlags & AC_HIT) {
ColliderInfo* info = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.elem.acHitElem;
this->collider.base.acFlags &= ~AC_HIT;
if (info->toucher.dmgFlags & (DMG_SLINGSHOT | DMG_ARROW)) {}
if (acHitElem->toucher.dmgFlags & (DMG_SLINGSHOT | DMG_ARROW)) {}
}
} else if (this->collider.base.acFlags & AC_HIT) {
u8 damage;
u8 swordDamage;
ColliderInfo* info = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.elem.acHitElem;
this->collider.base.acFlags &= ~AC_HIT;
swordDamage = false;
damage = CollisionCheck_GetSwordDamage(info->toucher.dmgFlags);
damage = CollisionCheck_GetSwordDamage(acHitElem->toucher.dmgFlags);
if (damage == 0) {
damage = 2;
@ -3113,7 +3113,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) {
swordDamage = true;
}
if (!(info->toucher.dmgFlags & DMG_HOOKSHOT)) {
if (!(acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
if (((s8)this->actor.colChkInfo.health < 3) && !swordDamage) {
damage = 0;
}
@ -4320,7 +4320,7 @@ void BossTw_BlastIce(BossTw* this, PlayState* play) {
s32 BossTw_BlastShieldCheck(BossTw* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 ret = false;
ColliderInfo* info;
ColliderElement* acHitElem;
if (1) {}
@ -4328,9 +4328,9 @@ s32 BossTw_BlastShieldCheck(BossTw* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
this->collider.base.atFlags &= ~AT_HIT;
info = this->collider.info.acHitInfo;
acHitElem = this->collider.elem.acHitElem;
if (info->toucher.dmgFlags & DMG_SHIELD) {
if (acHitElem->toucher.dmgFlags & DMG_SHIELD) {
this->work[INVINC_TIMER] = 7;
play->envCtx.lightBlend = 1.0f;
Rumble_Request(0.0f, 100, 5, 4);

View file

@ -1129,7 +1129,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160);
this->actor.colorFilterTimer = this->invincibilityTimer;
} else {
this->colliderBody.info.bumper.dmgFlags = DMG_BOOMERANG;
this->colliderBody.elem.bumper.dmgFlags = DMG_BOOMERANG;
}
}
@ -1139,7 +1139,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) {
sPhase2Timer &= 0xFE00;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160);
this->colliderBody.info.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
this->colliderBody.elem.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
} else {
sKillBari++;
if ((this->actor.colorFilterTimer != 0) && !(this->actor.colorFilterParams & 0x4000)) {
@ -1217,7 +1217,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
}
void BossVa_SetupBodyPhase3(BossVa* this) {
this->colliderBody.info.bumper.dmgFlags = DMG_BOOMERANG;
this->colliderBody.elem.bumper.dmgFlags = DMG_BOOMERANG;
this->actor.speed = 0.0f;
sPhase3StopMoving = false;
BossVa_SetupAction(this, BossVa_BodyPhase3);
@ -1421,7 +1421,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
}
Math_SmoothStepToF(&this->actor.speed, ((sFightPhase - PHASE_4 + 1) * 1.5f) + 4.0f, 1.0f, 0.25f, 0.0f);
}
this->colliderBody.info.bumper.dmgFlags = DMG_BOOMERANG;
this->colliderBody.elem.bumper.dmgFlags = DMG_BOOMERANG;
} else {
Math_SmoothStepToS(&this->vaBodySpinRate, 0, 1, 0x96, 0);
if (this->timer > 0) {
@ -1429,7 +1429,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
this->timer = 35;
}
Math_SmoothStepToF(&this->actor.shape.yOffset, -480.0f, 1.0f, 30.0f, 0.0f);
this->colliderBody.info.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
this->colliderBody.elem.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
this->timer--;
} else {
if ((player->stateFlags1 & PLAYER_STATE1_26) && (this->timer < -60)) {

View file

@ -228,7 +228,7 @@ void DoorKiller_FallAsRubble(DoorKiller* this, PlayState* play) {
s32 DoorKiller_IsHit(Actor* thisx, PlayState* play) {
DoorKiller* this = (DoorKiller*)thisx;
if ((this->colliderCylinder.base.acFlags & AC_HIT) && (this->colliderCylinder.info.acHitInfo != NULL)) {
if ((this->colliderCylinder.base.acFlags & AC_HIT) && (this->colliderCylinder.elem.acHitElem != NULL)) {
return true;
}
return false;
@ -423,10 +423,10 @@ void DoorKiller_Wait(DoorKiller* this, PlayState* play) {
if (DoorKiller_IsHit(&this->actor, play)) {
// AC cylinder: wobble if hit by most weapons, die if hit by explosives or hammer
if (this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & (DMG_RANGED | DMG_SLASH | DMG_DEKU_STICK)) {
if (this->colliderCylinder.elem.acHitElem->toucher.dmgFlags & (DMG_RANGED | DMG_SLASH | DMG_DEKU_STICK)) {
this->timer = 16;
this->actionFunc = DoorKiller_Wobble;
} else if (this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & (DMG_HAMMER_SWING | DMG_EXPLOSIVE)) {
} else if (this->colliderCylinder.elem.acHitElem->toucher.dmgFlags & (DMG_HAMMER_SWING | DMG_EXPLOSIVE)) {
DoorKiller_SpawnRubble(&this->actor, play);
this->actionFunc = DoorKiller_Die;
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK);

View file

@ -798,7 +798,7 @@ void EnAm_UpdateDamage(EnAm* this, PlayState* play) {
if (this->dyna.actor.colChkInfo.damageEffect != AM_DMGEFF_MAGIC_FIRE_LIGHT) {
this->unk_264 = 0;
this->damageEffect = this->dyna.actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.info, false);
Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.elem, false);
if ((this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_NUT) ||
(this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_STUN) ||

View file

@ -113,7 +113,7 @@ void func_809B27D8(EnAnubiceFire* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_IT_SHIELD_REFLECT_SW);
this->cylinder.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY);
this->cylinder.base.atFlags |= AT_TYPE_PLAYER;
this->cylinder.info.toucher.dmgFlags = DMG_DEKU_STICK;
this->cylinder.elem.toucher.dmgFlags = DMG_DEKU_STICK;
this->unk_15A = 30;
this->actor.params = 1;
this->actor.velocity.x *= -1.0f;

View file

@ -121,15 +121,15 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
Collider_SetQuad(play, &this->collider, &this->actor, &sColliderInit);
if (this->actor.params <= ARROW_NORMAL) {
this->collider.info.toucherFlags &= ~TOUCH_SFX_MASK;
this->collider.info.toucherFlags |= TOUCH_SFX_NORMAL;
this->collider.elem.toucherFlags &= ~TOUCH_SFX_MASK;
this->collider.elem.toucherFlags |= TOUCH_SFX_NORMAL;
}
if (this->actor.params < 0) {
this->collider.base.atFlags = (AT_ON | AT_TYPE_ENEMY);
} else if (this->actor.params <= ARROW_SEED) {
this->collider.info.toucher.dmgFlags = dmgFlags[this->actor.params];
LOG_HEX("this->at_info.cl_elem.at_btl_info.at_type", this->collider.info.toucher.dmgFlags,
this->collider.elem.toucher.dmgFlags = dmgFlags[this->actor.params];
LOG_HEX("this->at_info.cl_elem.at_btl_info.at_type", this->collider.elem.toucher.dmgFlags,
"../z_en_arrow.c", 707);
}
}
@ -284,7 +284,7 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
} else {
EffectSsHitMark_SpawnCustomScale(play, 0, 150, &this->actor.world.pos);
if (atTouched && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
if (atTouched && (this->collider.elem.atHitElem->elemType != ELEMTYPE_UNK4)) {
hitActor = this->collider.base.at;
if ((hitActor->update != NULL) && !(this->collider.base.atFlags & AT_BOUNCED) &&
@ -300,10 +300,10 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
this->hitFlags |= 1;
this->hitFlags |= 2;
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HIT) {
this->actor.world.pos.x = this->collider.info.atHitInfo->bumper.hitPos.x;
this->actor.world.pos.y = this->collider.info.atHitInfo->bumper.hitPos.y;
this->actor.world.pos.z = this->collider.info.atHitInfo->bumper.hitPos.z;
if (this->collider.elem.atHitElem->bumperFlags & BUMP_HIT) {
this->actor.world.pos.x = this->collider.elem.atHitElem->bumper.hitPos.x;
this->actor.world.pos.y = this->collider.elem.atHitElem->bumper.hitPos.y;
this->actor.world.pos.z = this->collider.elem.atHitElem->bumper.hitPos.z;
}
func_809B3CEC(play, this);

View file

@ -330,9 +330,9 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
this->timer = 0;
this->flameScaleY = 80.0f;
this->flameScaleX = 100.0f;
this->collider.elements[0].info.toucherFlags = TOUCH_ON | TOUCH_SFX_HARD;
this->collider.elements[0].info.toucher.dmgFlags = DMG_DEFAULT;
this->collider.elements[0].info.toucher.damage = 8;
this->collider.elements[0].base.toucherFlags = TOUCH_ON | TOUCH_SFX_HARD;
this->collider.elements[0].base.toucher.dmgFlags = DMG_DEFAULT;
this->collider.elements[0].base.toucher.damage = 8;
this->bobSize = this->actionState * 20.0f;
this->flamePrimAlpha = 255;
this->moveMode = BBMOVE_NORMAL;
@ -350,7 +350,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
thisx->naviEnemyId = NAVI_ENEMY_RED_BUBBLE;
thisx->colChkInfo.damageTable = &sDamageTableRed;
this->flameEnvColor.r = 255;
this->collider.elements[0].info.toucher.effect = 1;
this->collider.elements[0].base.toucher.effect = 1;
EnBb_SetupRed(play, this);
break;
case ENBB_WHITE:
@ -1151,10 +1151,10 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
this->dmgEffect = this->actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, false);
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, false);
switch (this->dmgEffect) {
case 7:
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;
this->actor.freezeTimer = this->collider.elements[0].base.acHitElem->toucher.damage;
FALLTHROUGH;
case 5:
this->fireIceTimer = 0x30;
@ -1164,7 +1164,7 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) {
//! Din's Fire on a white bubble will do just that. The mechanism is complex and described below.
goto block_15;
case 6:
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;
this->actor.freezeTimer = this->collider.elements[0].base.acHitElem->toucher.damage;
break;
case 8:
case 9:

View file

@ -333,7 +333,7 @@ void func_809BD524(EnBigokuta* this) {
this->unk_19A = 0;
this->cylinder[0].base.atFlags |= AT_ON;
Actor_PlaySfx(&this->actor, NA_SE_EN_DAIOCTA_MAHI);
if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & DMG_DEKU_NUT) {
if (this->collider.elements[0].base.acHitElem->toucher.dmgFlags & DMG_DEKU_NUT) {
this->unk_195 = true;
this->unk_196 = 20;
} else {

View file

@ -141,7 +141,7 @@ void EnBili_Destroy(Actor* thisx, PlayState* play) {
void EnBili_SetupFloatIdle(EnBili* this) {
this->actor.speed = 0.7f;
this->collider.info.bumper.effect = 1; // Shock?
this->collider.elem.bumper.effect = 1; // Shock?
this->timer = 32;
this->collider.base.atFlags |= AT_ON;
this->collider.base.acFlags |= AC_ON;
@ -237,7 +237,7 @@ void EnBili_SetupDie(EnBili* this) {
*/
void EnBili_SetupStunned(EnBili* this) {
this->timer = 80;
this->collider.info.bumper.effect = 0;
this->collider.elem.bumper.effect = 0;
this->actor.gravity = -1.0f;
this->actor.speed = 0.0f;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 150, COLORFILTER_BUFFLAG_XLU, 80);
@ -549,7 +549,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
if ((this->actor.colChkInfo.health != 0) && (this->collider.base.acFlags & AC_HIT)) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
@ -586,7 +586,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
EnBili_SetupBurnt(this);
}
if (this->collider.info.acHitInfo->toucher.dmgFlags & DMG_ARROW) {
if (this->collider.elem.acHitElem->toucher.dmgFlags & DMG_ARROW) {
this->actor.flags |= ACTOR_FLAG_4;
}
}

View file

@ -101,7 +101,7 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
Collider_InitJntSph(play, &this->explosionCollider);
Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit);
Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]);
this->explosionColliderItems[0].info.toucher.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
this->explosionColliderItems[0].base.toucher.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
thisx->shape.rot.z &= 0xFF;
if (thisx->shape.rot.z & 0x80) {

View file

@ -263,8 +263,8 @@ void EnBrob_Update(Actor* thisx, PlayState* play2) {
acHits[0] = (this->colliders[0].base.acFlags & AC_HIT) != 0;
acHits[1] = (this->colliders[1].base.acFlags & AC_HIT) != 0;
if ((acHits[0] && (this->colliders[0].info.acHitInfo->toucher.dmgFlags & DMG_BOOMERANG)) ||
(acHits[1] && (this->colliders[1].info.acHitInfo->toucher.dmgFlags & DMG_BOOMERANG))) {
if ((acHits[0] && (this->colliders[0].elem.acHitElem->toucher.dmgFlags & DMG_BOOMERANG)) ||
(acHits[1] && (this->colliders[1].elem.acHitElem->toucher.dmgFlags & DMG_BOOMERANG))) {
for (i = 0; i < 2; i++) {
this->colliders[i].base.atFlags &= ~(AT_HIT | AT_BOUNCED);
@ -273,8 +273,8 @@ void EnBrob_Update(Actor* thisx, PlayState* play2) {
EnBrob_SetupStunned(this);
} else if ((this->colliders[0].base.atFlags & AT_HIT) || (this->colliders[1].base.atFlags & AT_HIT) ||
(acHits[0] && (this->colliders[0].info.acHitInfo->toucher.dmgFlags & DMG_SLASH_KOKIRI)) ||
(acHits[1] && (this->colliders[1].info.acHitInfo->toucher.dmgFlags & DMG_SLASH_KOKIRI))) {
(acHits[0] && (this->colliders[0].elem.acHitElem->toucher.dmgFlags & DMG_SLASH_KOKIRI)) ||
(acHits[1] && (this->colliders[1].elem.acHitElem->toucher.dmgFlags & DMG_SLASH_KOKIRI))) {
if (this->actionFunc == EnBrob_MoveUp && !(this->colliders[0].base.atFlags & AT_BOUNCED) &&
!(this->colliders[1].base.atFlags & AT_BOUNCED)) {

View file

@ -95,12 +95,12 @@ void EnBubble_SetDimensions(EnBubble* this, f32 dim) {
}
u32 func_809CBCBC(EnBubble* this) {
ColliderInfo* info = &this->colliderSphere.elements[0].info;
ColliderElement* elem = &this->colliderSphere.elements[0].base;
info->toucher.dmgFlags = DMG_EXPLOSIVE;
info->toucher.effect = 0;
info->toucher.damage = 4;
info->toucherFlags = TOUCH_ON;
elem->toucher.dmgFlags = DMG_EXPLOSIVE;
elem->toucher.effect = 0;
elem->toucher.damage = 4;
elem->toucherFlags = TOUCH_ON;
this->actor.velocity.y = 0.0f;
return 6;
}
@ -112,7 +112,7 @@ u32 func_809CBCEC(EnBubble* this) {
}
void EnBubble_DamagePlayer(EnBubble* this, PlayState* play) {
s32 damage = -this->colliderSphere.elements[0].info.toucher.damage;
s32 damage = -this->colliderSphere.elements[0].base.toucher.damage;
play->damagePlayer(play, damage);
func_8002F7A0(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
@ -206,7 +206,7 @@ void EnBubble_Fly(EnBubble* this, PlayState* play) {
s32 bgId;
u8 bounceCount;
if (this->colliderSphere.elements[1].info.bumperFlags & BUMP_HIT) {
if (this->colliderSphere.elements[1].base.bumperFlags & BUMP_HIT) {
bumpActor = this->colliderSphere.base.ac;
this->normalizedBumpVelocity = bumpActor->velocity;
EnBubble_Vec3fNormalize(&this->normalizedBumpVelocity);
@ -284,7 +284,7 @@ u32 func_809CC648(EnBubble* this) {
return false;
}
this->colliderSphere.base.acFlags &= ~AC_HIT;
if (this->colliderSphere.elements[1].info.bumperFlags & BUMP_HIT) {
if (this->colliderSphere.elements[1].base.bumperFlags & BUMP_HIT) {
this->unk_1F0.x = this->colliderSphere.base.ac->velocity.x / 10.0f;
this->unk_1F0.y = this->colliderSphere.base.ac->velocity.y / 10.0f;
this->unk_1F0.z = this->colliderSphere.base.ac->velocity.z / 10.0f;

View file

@ -690,7 +690,7 @@ void func_809D0584(EnBw* this, PlayState* play) {
return;
}
this->damageEffect = this->actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->actor, &this->collider2.info, false);
Actor_SetDropFlag(&this->actor, &this->collider2.elem, false);
if ((this->damageEffect == 1) || (this->damageEffect == 0xE)) {
if (this->unk_23C == 0) {
Actor_ApplyDamage(&this->actor);
@ -766,7 +766,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
func_8002836C(play, &thisx->world.pos, &velocity, &accel, &sp50, &sp4C, 0x3C, 0, 0x14);
}
if (this->unk_248 <= 0.4f) {
this->collider1.info.toucher.effect = 0;
this->collider1.elem.toucher.effect = 0;
if (((play->gameplayFrames & 1) == 0) && (this->unk_220 < 5) && (this->unk_23C == 0)) {
accel.y = -0.1f;
velocity.x = Rand_CenteredFloat(4.0f);
@ -786,7 +786,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
20.0f - (this->unk_248 * 40.0f));
}
} else {
this->collider1.info.toucher.effect = 1;
this->collider1.elem.toucher.effect = 1;
}
this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y);

View file

@ -411,7 +411,7 @@ void EnCrow_Respawn(EnCrow* this, PlayState* play) {
void EnCrow_UpdateDamage(EnCrow* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect == 1) { // Deku Nuts
EnCrow_SetupTurnAway(this);

View file

@ -278,11 +278,11 @@ void EnDekubaba_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyJntSph(play, &this->collider);
}
void EnDekubaba_DisableHitboxes(EnDekubaba* this) {
void EnDekubaba_DisableACColliderElems(EnDekubaba* this) {
s32 i;
for (i = 1; i < ARRAY_COUNT(this->colliderElements); i++) {
this->collider.elements[i].info.bumperFlags &= ~BUMP_ON;
this->collider.elements[i].base.bumperFlags &= ~BUMP_ON;
}
}
@ -323,7 +323,7 @@ void EnDekubaba_SetupGrow(EnDekubaba* this) {
this->timer = 15;
for (i = 2; i < ARRAY_COUNT(this->colliderElements); i++) {
this->collider.elements[i].info.ocElemFlags |= OCELEM_ON;
this->collider.elements[i].base.ocElemFlags |= OCELEM_ON;
}
this->collider.base.colType = COLTYPE_HIT6;
@ -341,7 +341,7 @@ void EnDekubaba_SetupRetract(EnDekubaba* this) {
this->timer = 15;
for (i = 2; i < ARRAY_COUNT(this->colliderElements); i++) {
this->collider.elements[i].info.ocElemFlags &= ~OCELEM_ON;
this->collider.elements[i].base.ocElemFlags &= ~OCELEM_ON;
}
this->actionFunc = EnDekubaba_Retract;
@ -417,7 +417,7 @@ void EnDekubaba_SetupStunnedVertical(EnDekubaba* this) {
s32 i;
for (i = 1; i < ARRAY_COUNT(this->colliderElements); i++) {
this->collider.elements[i].info.bumperFlags |= BUMP_ON;
this->collider.elements[i].base.bumperFlags |= BUMP_ON;
}
if (this->timer == 1) {
@ -441,7 +441,7 @@ void EnDekubaba_SetupSway(EnDekubaba* this) {
this->stemSectionAngle[2] = -0x5000;
this->stemSectionAngle[1] = -0x4800;
EnDekubaba_DisableHitboxes(this);
EnDekubaba_DisableACColliderElems(this);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 35);
this->collider.base.acFlags &= ~AC_ON;
this->actionFunc = EnDekubaba_Sway;
@ -896,7 +896,7 @@ void EnDekubaba_StunnedVertical(EnDekubaba* this, PlayState* play) {
}
if (this->timer == 0) {
EnDekubaba_DisableHitboxes(this);
EnDekubaba_DisableACColliderElems(this);
if (this->actor.xzDistToPlayer < 80.0f * this->size) {
EnDekubaba_SetupPrepareLunge(this);

View file

@ -204,7 +204,7 @@ void EnDekunuts_SetupGasp(EnDekunuts* this) {
void EnDekunuts_SetupBeDamaged(EnDekunuts* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gDekuNutsDamageAnim, -3.0f);
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
if (this->collider.elem.acHitElem->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
} else {
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
@ -445,7 +445,7 @@ void EnDekunuts_Die(EnDekunuts* this, PlayState* play) {
void EnDekunuts_ColliderCheck(EnDekunuts* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->actor.colChkInfo.mass == 0x32) {
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect != 1) {

View file

@ -304,8 +304,8 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f, this->skelAnime.curFrame, 0.0f, ANIMMODE_ONCE,
-4.0f);
this->actionState = 4;
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags = AT_NONE; // also TOUCH_NONE
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags = AT_NONE; // also TOUCH_NONE
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
}
switch (this->actionState) {
case 1:
@ -318,16 +318,16 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
break;
case 2:
if (this->skelAnime.curFrame >= 4.0f) {
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags =
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags =
AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
this->collider2.elements[0].info.toucher.dmgFlags = DMG_DEFAULT;
this->collider2.elements[0].info.toucher.damage = 8;
this->collider2.elements[0].base.toucher.dmgFlags = DMG_DEFAULT;
this->collider2.elements[0].base.toucher.damage = 8;
}
if (this->collider2.base.atFlags & AT_BOUNCED) {
this->collider2.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags =
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags =
AT_NONE; // also TOUCH_NONE
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
this->actionState++;
} else if (this->collider2.base.atFlags & AT_HIT) {
this->collider2.base.atFlags &= ~AT_HIT;
@ -343,9 +343,9 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f,
Animation_GetLastFrame(&object_dh_Anim_004658), 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState++;
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags =
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags =
AT_NONE; // also TOUCH_NONE
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
}
break;
case 5:
@ -374,10 +374,10 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
case 0:
this->actionState++;
this->drawDirtWave++;
this->collider1.base.atFlags = this->collider1.info.toucherFlags =
this->collider1.base.atFlags = this->collider1.elem.toucherFlags =
AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
this->collider1.info.toucher.dmgFlags = DMG_DEFAULT;
this->collider1.info.toucher.damage = 4;
this->collider1.elem.toucher.dmgFlags = DMG_DEFAULT;
this->collider1.elem.toucher.damage = 4;
FALLTHROUGH;
case 1:
this->dirtWavePhase += 0x47E;
@ -393,8 +393,8 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
case 2:
this->drawDirtWave = false;
this->collider1.dim.radius = 35;
this->collider1.base.atFlags = this->collider1.info.toucherFlags = AT_NONE; // Also TOUCH_NONE
this->collider1.info.toucher.dmgFlags = this->collider1.info.toucher.damage = 0;
this->collider1.base.atFlags = this->collider1.elem.toucherFlags = AT_NONE; // Also TOUCH_NONE
this->collider1.elem.toucher.dmgFlags = this->collider1.elem.toucher.damage = 0;
EnDh_SetupWait(this);
break;
}
@ -477,8 +477,8 @@ void EnDh_CollisionCheck(EnDh* this, PlayState* play) {
if ((this->collider2.base.acFlags & AC_HIT) && !this->retreat) {
this->collider2.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect != 0) && (this->actor.colChkInfo.damageEffect != 6)) {
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags = AT_NONE; // also TOUCH_NONE
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags = AT_NONE; // also TOUCH_NONE
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
if (player->unk_844 != 0) {
this->unk_258 = player->unk_845;
}

View file

@ -231,9 +231,9 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
if ((this->targetQuad.base.acFlags & AC_HIT) || BREG(0)) {
this->targetQuad.base.acFlags &= ~AC_HIT;
dx = fabsf(targetX - this->targetQuad.info.bumper.hitPos.x);
dy = fabsf(targetY - this->targetQuad.info.bumper.hitPos.y);
dz = fabsf(targetZ - this->targetQuad.info.bumper.hitPos.z);
dx = fabsf(targetX - this->targetQuad.elem.bumper.hitPos.x);
dy = fabsf(targetY - this->targetQuad.elem.bumper.hitPos.y);
dz = fabsf(targetZ - this->targetQuad.elem.bumper.hitPos.z);
scoreVel.y = 5.0f;

View file

@ -605,13 +605,13 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
if ((this->timer != 0) || (ABS(yawDiff1) < 0x4000)) {
this->sphElements[2].info.toucherFlags = TOUCH_NONE;
this->sphElements[1].info.toucherFlags = TOUCH_NONE;
this->sphElements[2].base.toucherFlags = TOUCH_NONE;
this->sphElements[1].base.toucherFlags = TOUCH_NONE;
this->colliderBody.base.atFlags = AT_NONE;
this->sphElements[2].info.toucher.dmgFlags = 0;
this->sphElements[1].info.toucher.dmgFlags = 0;
this->sphElements[2].info.toucher.damage = 0;
this->sphElements[1].info.toucher.damage = 0;
this->sphElements[2].base.toucher.dmgFlags = 0;
this->sphElements[1].base.toucher.dmgFlags = 0;
this->sphElements[2].base.toucher.damage = 0;
this->sphElements[1].base.toucher.damage = 0;
EnDodongo_SetupBreatheFire(this);
this->timer = Rand_S16Offset(5, 10);
} else {
@ -628,10 +628,10 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_TAIL);
Animation_PlayOnceSetSpeed(&this->skelAnime, animation, 2.0f);
this->timer = 18;
this->colliderBody.base.atFlags = this->sphElements[1].info.toucherFlags =
this->sphElements[2].info.toucherFlags = AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
this->sphElements[1].info.toucher.dmgFlags = this->sphElements[2].info.toucher.dmgFlags = DMG_DEFAULT;
this->sphElements[1].info.toucher.damage = this->sphElements[2].info.toucher.damage = 8;
this->colliderBody.base.atFlags = this->sphElements[1].base.toucherFlags =
this->sphElements[2].base.toucherFlags = AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
this->sphElements[1].base.toucher.dmgFlags = this->sphElements[2].base.toucher.dmgFlags = DMG_DEFAULT;
this->sphElements[1].base.toucher.damage = this->sphElements[2].base.toucher.damage = 8;
}
} else if (this->timer > 1) {
Vec3f tailPos;

View file

@ -178,7 +178,7 @@ void EnEiyer_RotateAroundHome(EnEiyer* this) {
}
void EnEiyer_SetupAppearFromGround(EnEiyer* this) {
this->collider.info.bumper.dmgFlags = DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT;
this->collider.elem.bumper.dmgFlags = DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT;
Animation_PlayLoop(&this->skelanime, &gStingerIdleAnim);
this->actor.world.pos.x = this->actor.home.pos.x;
@ -228,7 +228,7 @@ void EnEiyer_SetupInactive(EnEiyer* this) {
void EnEiyer_SetupAmbush(EnEiyer* this, PlayState* play) {
this->actor.speed = 0.0f;
Animation_PlayOnce(&this->skelanime, &gStingerBackflipAnim);
this->collider.info.bumper.dmgFlags = DMG_DEFAULT;
this->collider.elem.bumper.dmgFlags = DMG_DEFAULT;
this->basePos = this->actor.world.pos;
this->actor.world.rot.y = this->actor.shape.rot.y;
this->actor.flags |= ACTOR_FLAG_IGNORE_QUAKE;
@ -290,14 +290,14 @@ void EnEiyer_SetupDie(EnEiyer* this) {
this->timer = 20;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, 40);
if (this->collider.info.bumper.dmgFlags != (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
if (this->collider.elem.bumper.dmgFlags != (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
this->actor.speed = 6.0f;
Animation_MorphToLoop(&this->skelanime, &gStingerHitAnim, -3.0f);
} else {
this->actor.speed -= 6.0f;
}
this->collider.info.bumper.dmgFlags = DMG_DEFAULT;
this->collider.elem.bumper.dmgFlags = DMG_DEFAULT;
this->collider.base.atFlags &= ~AT_ON;
this->collider.base.acFlags &= ~AC_ON;
this->actionFunc = EnEiyer_Die;
@ -602,7 +602,7 @@ void EnEiyer_Stunned(EnEiyer* this, PlayState* play) {
void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
@ -612,7 +612,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
}
// If underground, one hit kill
if (this->collider.info.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
if (this->collider.elem.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
if (this->actor.colChkInfo.damage == 0) {
EnEiyer_SetupAmbush(this, play);
} else {
@ -687,7 +687,7 @@ s32 EnEiyer_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
pos->z += 2500.0f;
}
if (this->collider.info.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) && limbIndex != 9 &&
if (this->collider.elem.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) && limbIndex != 9 &&
limbIndex != 10) {
*dList = NULL;
}

View file

@ -275,15 +275,15 @@ s32 EnFd_CheckHammer(EnFd* this, PlayState* play) {
s32 EnFd_ColliderCheck(EnFd* this, PlayState* play) {
Player* player = GET_PLAYER(play);
ColliderInfo* info;
ColliderElement* elem;
if (this->collider.base.acFlags & AC_HIT || EnFd_CheckHammer(this, play)) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->invincibilityTimer != 0) {
return false;
}
info = &this->collider.elements[0].info;
if (info->acHitInfo != NULL && (info->acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
elem = &this->collider.elements[0].base;
if (elem->acHitElem != NULL && (elem->acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
return false;
}

View file

@ -476,7 +476,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
? true
: false;
if ((this->collider.base.acFlags & AC_HIT) || canBottleReflect1) {
ColliderInfo* hurtbox = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.elem.acHitElem;
s16 i2;
Vec3f spA8;
Vec3f sp9C = { 0.0f, -0.5f, 0.0f };
@ -491,7 +491,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
(s16)(Rand_ZeroOne() * 25.0f) + 50, FHGFLASH_LIGHTBALL_GREEN);
}
canBottleReflect2 = canBottleReflect1;
if (!canBottleReflect2 && (hurtbox->toucher.dmgFlags & DMG_SHIELD)) {
if (!canBottleReflect2 && (acHitElem->toucher.dmgFlags & DMG_SHIELD)) {
killMode = BALL_IMPACT;
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_MG, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,

View file

@ -118,7 +118,7 @@ static InitChainEntry sInitChain[] = {
void EnFirefly_Extinguish(EnFirefly* this) {
this->actor.params += 2;
this->collider.elements[0].info.toucher.effect = 0; // None
this->collider.elements[0].base.toucher.effect = 0; // None
this->auraType = KEESE_AURA_NONE;
this->onFire = false;
this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
@ -130,7 +130,7 @@ void EnFirefly_Ignite(EnFirefly* this) {
} else {
this->actor.params -= 2;
}
this->collider.elements[0].info.toucher.effect = 1; // Fire
this->collider.elements[0].base.toucher.effect = 1; // Fire
this->auraType = KEESE_AURA_FIRE;
this->onFire = true;
this->actor.naviEnemyId = NAVI_ENEMY_FIRE_KEESE;
@ -174,10 +174,10 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
}
if (this->actor.params == KEESE_ICE_FLY) {
this->collider.elements[0].info.toucher.effect = 2; // Ice
this->collider.elements[0].base.toucher.effect = 2; // Ice
this->actor.naviEnemyId = NAVI_ENEMY_ICE_KEESE;
} else {
this->collider.elements[0].info.toucher.effect = 0; // Nothing
this->collider.elements[0].base.toucher.effect = 0; // Nothing
this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
}
@ -620,7 +620,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {

View file

@ -292,7 +292,7 @@ void EnFloormas_SetupSplit(EnFloormas* this) {
ANIMMODE_ONCE, 0.0f);
this->collider.dim.radius = sCylinderInit.dim.radius * 0.6f;
this->collider.dim.height = sCylinderInit.dim.height * 0.6f;
this->collider.info.bumperFlags &= ~BUMP_HOOKABLE;
this->collider.elem.bumperFlags &= ~BUMP_HOOKABLE;
this->actor.speed = 4.0f;
this->actor.velocity.y = 7.0f;
// using div creates a signed check.
@ -389,7 +389,7 @@ void EnFloormas_SetupSmallWait(EnFloormas* this) {
void EnFloormas_SetupTakeDamage(EnFloormas* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f);
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
if (this->collider.elem.acHitElem->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
} else {
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
@ -914,7 +914,7 @@ void EnFloormas_Merge(EnFloormas* this, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_4;
EnFloormas_MakeVulnerable(this);
this->actor.params = 0;
this->collider.info.bumperFlags |= BUMP_HOOKABLE;
this->collider.elem.bumperFlags |= BUMP_HOOKABLE;
this->actor.colChkInfo.health = sColChkInfoInit.health;
EnFloormas_SetupStand(this);
} else {
@ -978,14 +978,14 @@ void EnFloormas_ColliderCheck(EnFloormas* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->collider.base.colType != COLTYPE_HARD) {
isSmall = false;
if (this->actor.scale.x < 0.01f) {
isSmall = true;
}
if (isSmall && this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT) {
if (isSmall && this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HOOKSHOT) {
this->actor.colChkInfo.damage = 2;
this->actor.colChkInfo.damageEffect = 0;
}

View file

@ -135,11 +135,11 @@ Vec3f* EnFw_GetPosAdjAroundCircle(Vec3f* dst, EnFw* this, f32 radius, s16 dir) {
}
s32 EnFw_CheckCollider(EnFw* this, PlayState* play) {
ColliderInfo* info;
ColliderElement* elem;
if (this->collider.base.acFlags & AC_HIT) {
info = &this->collider.elements[0].info;
if (info->acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT) {
elem = &this->collider.elements[0].base;
if (elem->acHitElem->toucher.dmgFlags & DMG_HOOKSHOT) {
this->lastDmgHook = true;
} else {
this->lastDmgHook = false;

View file

@ -135,7 +135,7 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) {
this->actor.scale.x = 0.25f;
this->actor.scale.y = 0.45f;
this->actor.scale.z = 0.25f;
this->collider.info.bumper.dmgFlags = DMG_ARROW;
this->collider.elem.bumper.dmgFlags = DMG_ARROW;
this->objectId = OBJECT_TSUBO;
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, this->objectId);
if (this->requiredObjectSlot < 0) {
@ -181,9 +181,9 @@ void EnGSwitch_Break(EnGSwitch* this, PlayState* play) {
randPos.x = this->actor.world.pos.x + Rand_CenteredFloat(40.0f);
randPos.y = this->actor.world.pos.y + 30.0f + Rand_CenteredFloat(35.0f);
randPos.z = this->actor.world.pos.z + Rand_CenteredFloat(40.0f);
hitPos.x = this->collider.info.bumper.hitPos.x;
hitPos.y = this->collider.info.bumper.hitPos.y;
hitPos.z = this->collider.info.bumper.hitPos.z;
hitPos.x = this->collider.elem.bumper.hitPos.x;
hitPos.y = this->collider.elem.bumper.hitPos.y;
hitPos.z = this->collider.elem.bumper.hitPos.z;
EffectSsHitMark_SpawnCustomScale(play, EFFECT_HITMARK_WHITE, 700, &hitPos);
if (this->type == ENGSWITCH_ARCHERY_POT) {
velocity.y = 15.0f;

View file

@ -554,8 +554,8 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
if ((this->stateFlags & GE2_STATE_KO) || (this->stateFlags & GE2_STATE_CAPTURING)) {
this->actionFunc(this, play);
} else if (this->collider.base.acFlags & AC_HIT) {
if ((this->collider.info.acHitInfo != NULL) &&
(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
if ((this->collider.elem.acHitElem != NULL) &&
(this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
//! @bug duration parameter is larger than 255 which messes with the internal bitpacking of the colorfilter.
//! Because of the duration being tracked as an unsigned byte it ends up being truncated to 144
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 400);
@ -606,8 +606,8 @@ void EnGe2_UpdateStunned(Actor* thisx, PlayState* play2) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
Actor_UpdateBgCheckInfo(play, &this->actor, 40.0f, 25.0f, 40.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.info.acHitInfo == NULL) ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT))) {
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.elem.acHitElem == NULL) ||
!(this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HOOKSHOT))) {
this->actor.colorFilterTimer = 0;
EnGe2_ChangeAction(this, GE2_ACTION_KNOCKEDOUT);
this->timer = 100;

View file

@ -1368,7 +1368,7 @@ void EnGeldB_CollisionCheck(EnGeldB* this, PlayState* play) {
this->bodyCollider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, true);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
if ((this->actor.colChkInfo.damageEffect == GELDB_DMG_STUN) ||
(this->actor.colChkInfo.damageEffect == GELDB_DMG_FREEZE)) {

View file

@ -1344,7 +1344,7 @@ void EnGo2_GetItemAnimation(EnGo2* this, PlayState* play) {
void EnGo2_SetupRolling(EnGo2* this, PlayState* play) {
if ((this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG || (this->actor.params & 0x1F) == GORON_CITY_LINK) {
this->collider.info.bumperFlags = BUMP_ON;
this->collider.elem.bumperFlags = BUMP_ON;
this->actor.speed = GET_INFTABLE(INFTABLE_11E) ? 6.0f : 3.6000001f;
} else {
this->actor.speed = 6.0f;
@ -1368,7 +1368,7 @@ void EnGo2_StopRolling(EnGo2* this, PlayState* play) {
}
}
} else {
this->collider.info.bumperFlags = BUMP_NONE;
this->collider.elem.bumperFlags = BUMP_NONE;
}
this->actor.shape.rot = this->actor.world.rot;

View file

@ -610,7 +610,7 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) {
if (this->hurtTimer != 0) {
this->hurtTimer--;
} else {
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
u8 swordDamage;
if ((this->colCyl1.base.atFlags & AT_HIT) && this->actionFunc == EnGoma_Jump) {
@ -620,11 +620,11 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) {
}
if ((this->colCyl2.base.acFlags & AC_HIT) && (s8)this->actor.colChkInfo.health > 0) {
acHitInfo = this->colCyl2.info.acHitInfo;
acHitElem = this->colCyl2.elem.acHitElem;
this->colCyl2.base.acFlags &= ~AC_HIT;
if (this->gomaType == ENGOMA_NORMAL) {
u32 dmgFlags = acHitInfo->toucher.dmgFlags;
u32 dmgFlags = acHitElem->toucher.dmgFlags;
if (dmgFlags & DMG_SHIELD) {
if (this->actionFunc == EnGoma_Jump) {

View file

@ -461,7 +461,7 @@ void EnHintnuts_Freeze(EnHintnuts* this, PlayState* play) {
void EnHintnuts_ColliderCheck(EnHintnuts* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->collider.base.ac->id != ACTOR_EN_NUTSBALL) {
EnHintnuts_SetupBurrow(this);
} else {

View file

@ -560,7 +560,7 @@ void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceIn
if (distSq < SQ(300.0f)) {
playerDist = this->actor.xzDistToPlayer;
if (playerDist < 130.0f || this->jntSph.elements[0].info.ocElemFlags & OCELEM_HIT) {
if (playerDist < 130.0f || this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
if (Math_SinS(this->actor.yawTowardsPlayer - this->actor.world.rot.y) > 0.0f) {
this->actor.world.rot.y -= 280;
} else {
@ -3533,7 +3533,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
this->rider->shape.rot.y = thisx->shape.rot.y;
}
}
if (this->jntSph.elements[0].info.ocElemFlags & OCELEM_HIT) {
if (this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
if (thisx->speed > 6.0f) {
thisx->speed -= 1.0f;
}

View file

@ -731,7 +731,7 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
sparksPos = this->actor.world.pos;
sparksPos.y += 50.0f;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, true);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
this->damageEffect = this->actor.colChkInfo.damageEffect;
this->bodyCollider.base.acFlags &= ~AC_HIT;

View file

@ -356,7 +356,7 @@ void EnIshi_Wait(EnIshi* this, PlayState* play) {
EnIshi_SpawnBugs(this, play);
}
} else if ((this->collider.base.acFlags & AC_HIT) && (type == ROCK_SMALL) &&
this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_HAMMER | DMG_EXPLOSIVE)) {
this->collider.elem.acHitElem->toucher.dmgFlags & (DMG_HAMMER | DMG_EXPLOSIVE)) {
EnIshi_DropCollectible(this, play);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, sBreakSfxDurations[type], sBreakSfxIds[type]);
sFragmentSpawnFuncs[type](this, play);

View file

@ -295,11 +295,11 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
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) {
ColliderInfo* hitItem = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.elem.acHitElem;
s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
u8 i;
if (hitItem->toucher.dmgFlags & DMG_SLASH) {
if (acHitElem->toucher.dmgFlags & DMG_SLASH) {
this->cutType = sCutTypes[player->meleeWeaponAnimation];
} else {
this->cutType = CUT_POST;

View file

@ -125,7 +125,7 @@ void EnKarebaba_ResetCollider(EnKarebaba* this) {
this->bodyCollider.dim.height = 25;
this->bodyCollider.base.colType = COLTYPE_HARD;
this->bodyCollider.base.acFlags |= AC_HARD;
this->bodyCollider.info.bumper.dmgFlags = DMG_DEFAULT;
this->bodyCollider.elem.bumper.dmgFlags = DMG_DEFAULT;
this->headCollider.dim.height = 25;
}
@ -155,7 +155,7 @@ void EnKarebaba_SetupUpright(EnKarebaba* this) {
Actor_SetScale(&this->actor, 0.01f);
this->bodyCollider.base.colType = COLTYPE_HIT6;
this->bodyCollider.base.acFlags &= ~AC_HARD;
this->bodyCollider.info.bumper.dmgFlags =
this->bodyCollider.elem.bumper.dmgFlags =
!LINK_IS_ADULT ? ((DMG_SWORD | DMG_BOOMERANG) & ~DMG_JUMP_MASTER) : (DMG_SWORD | DMG_BOOMERANG);
this->bodyCollider.dim.radius = 15;
this->bodyCollider.dim.height = 80;

View file

@ -97,7 +97,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) {
player->stateFlags2 &= ~PLAYER_STATE2_17;
this->unk_1CA = 1;
this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
this->collider.elem.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
this->unk_1C6 = 1;
this->unk_1C9 = ((this->unk_1C7 == 1) ? 2 : 4);
func_80A9EFE0(this, func_80A9F9B4);
@ -196,11 +196,11 @@ void func_80A9F408(EnMThunder* this, PlayState* play) {
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
}
if (player->unk_858 < 0.85f) {
this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
this->collider.elem.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
this->unk_1C6 = 1;
this->unk_1C9 = ((this->unk_1C7 == 1) ? 2 : 4);
} else {
this->collider.info.toucher.dmgFlags = D_80AA0458[this->unk_1C7];
this->collider.elem.toucher.dmgFlags = D_80AA0458[this->unk_1C7];
this->unk_1C6 = 0;
this->unk_1C9 = ((this->unk_1C7 == 1) ? 4 : 8);
}

View file

@ -89,7 +89,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play);
void EnMb_ClubWaitAfterAttack(EnMb* this, PlayState* play);
void EnMb_ClubDamaged(EnMb* this, PlayState* play);
static ColliderCylinderInit sHitboxInit = {
static ColliderCylinderInit sBodyColliderInit = {
{
COLTYPE_HIT0,
AT_NONE,
@ -265,8 +265,8 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 46.0f);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.colChkInfo.damageTable = &sSpearMoblinDamageTable;
Collider_InitCylinder(play, &this->hitbox);
Collider_SetCylinder(play, &this->hitbox, &this->actor, &sHitboxInit);
Collider_InitCylinder(play, &this->bodyCollider);
Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sBodyColliderInit);
Collider_InitTris(play, &this->frontShielding);
Collider_SetTris(play, &this->frontShielding, &this->actor, &sFrontShieldingInit, this->frontShieldingTris);
Collider_InitQuad(play, &this->attackCollider);
@ -290,13 +290,13 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.colChkInfo.damageTable = &sClubMoblinDamageTable;
Actor_SetScale(&this->actor, 0.02f);
this->hitbox.dim.height = 170;
this->hitbox.dim.radius = 45;
this->bodyCollider.dim.height = 170;
this->bodyCollider.dim.radius = 45;
this->actor.uncullZoneForward = 4000.0f;
this->actor.uncullZoneScale = 800.0f;
this->actor.uncullZoneDownward = 1800.0f;
this->playerDetectionRange = 710.0f;
this->attackCollider.info.toucher.dmgFlags = DMG_UNBLOCKABLE;
this->attackCollider.elem.toucher.dmgFlags = DMG_UNBLOCKABLE;
relYawFromPlayer =
this->actor.world.rot.y - Math_Vec3f_Yaw(&this->actor.world.pos, &player->actor.world.pos);
@ -333,7 +333,7 @@ void EnMb_Destroy(Actor* thisx, PlayState* play) {
EnMb* this = (EnMb*)thisx;
Collider_DestroyTris(play, &this->frontShielding);
Collider_DestroyCylinder(play, &this->hitbox);
Collider_DestroyCylinder(play, &this->bodyCollider);
Collider_DestroyQuad(play, &this->attackCollider);
}
@ -575,8 +575,8 @@ void EnMb_SetupClubDead(EnMb* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbClubFallOnItsBackAnim, -4.0f);
this->state = ENMB_STATE_CLUB_DEAD;
this->actor.flags &= ~ACTOR_FLAG_0;
this->hitbox.dim.height = 80;
this->hitbox.dim.radius = 95;
this->bodyCollider.dim.height = 80;
this->bodyCollider.dim.radius = 95;
this->timer1 = 30;
this->actor.speed = 0.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
@ -1373,9 +1373,9 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
if (this->frontShielding.base.acFlags & AC_HIT) {
this->frontShielding.base.acFlags &= ~(AC_HIT | AC_BOUNCED);
this->hitbox.base.acFlags &= ~AC_HIT;
} else if ((this->hitbox.base.acFlags & AC_HIT) && this->state >= ENMB_STATE_STUNNED) {
this->hitbox.base.acFlags &= ~AC_HIT;
this->bodyCollider.base.acFlags &= ~AC_HIT;
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && this->state >= ENMB_STATE_STUNNED) {
this->bodyCollider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != ENMB_DMGEFF_IGNORE &&
this->actor.colChkInfo.damageEffect != ENMB_DMGEFF_FREEZE) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
@ -1386,7 +1386,7 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
}
this->damageEffect = this->actor.colChkInfo.damageEffect;
this->attack = ENMB_ATTACK_NONE;
Actor_SetDropFlag(&this->actor, &this->hitbox.info, false);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
if (this->actor.colChkInfo.damageEffect == ENMB_DMGEFF_STUN ||
this->actor.colChkInfo.damageEffect == ENMB_DMGEFF_STUN_ICE) {
if (this->state != ENMB_STATE_STUNNED) {
@ -1426,15 +1426,15 @@ void EnMb_Update(Actor* thisx, PlayState* play) {
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |
UPDBGCHECKINFO_FLAG_4);
Actor_SetFocus(thisx, thisx->scale.x * 4500.0f);
Collider_UpdateCylinder(thisx, &this->hitbox);
Collider_UpdateCylinder(thisx, &this->bodyCollider);
if (thisx->colChkInfo.health <= 0) {
this->hitbox.dim.pos.x += Math_SinS(thisx->shape.rot.y) * (-4400.0f * thisx->scale.y);
this->hitbox.dim.pos.z += Math_CosS(thisx->shape.rot.y) * (-4400.0f * thisx->scale.y);
this->bodyCollider.dim.pos.x += Math_SinS(thisx->shape.rot.y) * (-4400.0f * thisx->scale.y);
this->bodyCollider.dim.pos.z += Math_CosS(thisx->shape.rot.y) * (-4400.0f * thisx->scale.y);
}
CollisionCheck_SetOC(play, &play->colChkCtx, &this->hitbox.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
if (this->state >= ENMB_STATE_STUNNED &&
(thisx->params == ENMB_TYPE_CLUB || this->state != ENMB_STATE_ATTACK)) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->hitbox.base);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
}
if (this->state >= ENMB_STATE_IDLE) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->frontShielding.base);

View file

@ -44,7 +44,7 @@ typedef struct EnMb {
/* 0x035E */ s8 direction;
/* 0x0360 */ f32 maxHomeDist;
/* 0x0364 */ f32 playerDetectionRange;
/* 0x0368 */ ColliderCylinder hitbox;
/* 0x0368 */ ColliderCylinder bodyCollider;
/* 0x03B4 */ ColliderQuad attackCollider; // for attacking the player
/* 0x0434 */ ColliderTris frontShielding; // Moblins don't have shields, but this acts as one
/* 0x0454 */ ColliderTrisElement frontShieldingTris[2];

View file

@ -120,7 +120,7 @@ void func_80ABBBA8(EnNutsball* this, PlayState* play) {
this->collider.base.atFlags &= ~AT_TYPE_ENEMY & ~AT_BOUNCED & ~AT_HIT;
this->collider.base.atFlags |= AT_TYPE_PLAYER;
this->collider.info.toucher.dmgFlags = DMG_DEKU_STICK;
this->collider.elem.toucher.dmgFlags = DMG_DEKU_STICK;
Matrix_MtxFToYXZRotS(&player->shieldMf, &sp4C, 0);
this->actor.world.rot.y = sp4C.y + 0x8000;
this->timer = 30;

View file

@ -305,9 +305,9 @@ s32 EnNy_CollisionCheck(EnNy* this, PlayState* play) {
} else {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
effectPos.x = this->collider.elements[0].info.bumper.hitPos.x;
effectPos.y = this->collider.elements[0].info.bumper.hitPos.y;
effectPos.z = this->collider.elements[0].info.bumper.hitPos.z;
effectPos.x = this->collider.elements[0].base.bumper.hitPos.x;
effectPos.y = this->collider.elements[0].base.bumper.hitPos.y;
effectPos.z = this->collider.elements[0].base.bumper.hitPos.z;
if ((this->unk_1E0 == 0.25f) && (this->unk_1D4 == 0xFF)) {
switch (this->actor.colChkInfo.damageEffect) {
case 0xE:

View file

@ -490,7 +490,7 @@ void EnOkuta_ProjectileFly(EnOkuta* this, PlayState* play) {
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_DEKU_STICK;
this->collider.elem.toucher.dmgFlags = DMG_DEKU_STICK;
Matrix_MtxFToYXZRotS(&player->shieldMf, &shieldRot, 0);
this->actor.world.rot.y = shieldRot.y + 0x8000;
this->timer = 30;
@ -555,7 +555,7 @@ void EnOkuta_UpdateHeadScale(EnOkuta* this) {
void EnOkuta_ColliderCheck(EnOkuta* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
Enemy_StartFinishingBlow(play, &this->actor);
this->actor.colChkInfo.health = 0;

View file

@ -231,7 +231,7 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) {
this->colCylinder.dim.radius = 25;
this->colCylinder.dim.height = 15;
this->colCylinder.dim.yShift = -5;
this->colCylinder.info.bumper.dmgFlags = DMG_ARROW | DMG_SLINGSHOT;
this->colCylinder.elem.bumper.dmgFlags = DMG_ARROW | DMG_SLINGSHOT;
this->colQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY;
this->colQuad.base.acFlags = AC_ON | AC_TYPE_PLAYER;
this->actor.naviEnemyId = NAVI_ENEMY_PEAHAT_LARVA;

View file

@ -263,7 +263,7 @@ void EnPoField_SetupFlee(EnPoField* this) {
void EnPoField_SetupDamage(EnPoField* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeFieldDamagedAnim, -6.0f);
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
if (this->collider.elem.acHitElem->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
} else {
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;

View file

@ -209,8 +209,8 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) {
func_80AD9AA8(this, play);
} else {
this->actor.flags &= ~(ACTOR_FLAG_9 | ACTOR_FLAG_14);
this->collider.info.elemType = ELEMTYPE_UNK4;
this->collider.info.bumper.dmgFlags |= DMG_DEKU_NUT;
this->collider.elem.elemType = ELEMTYPE_UNK4;
this->collider.elem.bumper.dmgFlags |= DMG_DEKU_NUT;
this->collider.base.ocFlags1 = OC1_NONE;
func_80AD9C24(this, NULL);
}
@ -301,7 +301,7 @@ void func_80AD9568(EnPoSisters* this) {
void func_80AD95D8(EnPoSisters* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersDamagedAnim, -3.0f);
if (this->collider.base.ac != NULL) {
this->actor.world.rot.y = (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT))
this->actor.world.rot.y = (this->collider.elem.acHitElem->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT))
? this->collider.base.ac->world.rot.y
: Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
}
@ -744,7 +744,7 @@ void func_80ADAD54(EnPoSisters* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
this->unk_22E.a = 0;
this->collider.info.bumper.dmgFlags = DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_DEKU_NUT;
this->collider.elem.bumper.dmgFlags = DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_DEKU_NUT;
func_80AD93C4(this);
} else {
endFrame = this->skelAnime.endFrame;
@ -757,7 +757,7 @@ void func_80ADAE6C(EnPoSisters* this, PlayState* play) {
this->unk_22E.a = 255;
if (this->unk_194 != 0) {
this->unk_199 |= 1;
this->collider.info.bumper.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE |
this->collider.elem.bumper.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE |
DMG_HOOKSHOT | DMG_EXPLOSIVE | DMG_DEKU_STICK);
if (this->unk_19A != 0) {
this->unk_19A--;
@ -1134,7 +1134,7 @@ void func_80ADC10C(EnPoSisters* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->unk_195 != 0) {
((EnPoSisters*)this->actor.parent)->unk_19C--;
Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2);

View file

@ -293,7 +293,7 @@ void func_80ADE28C(EnPoh* this) {
} else {
Animation_PlayOnce(&this->skelAnime, &gPoeComposerDamagedAnim);
}
if (this->colliderCyl.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
if (this->colliderCyl.elem.acHitElem->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
this->actor.world.rot.y = this->colliderCyl.base.ac->world.rot.y;
} else {
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCyl.base.ac) + 0x8000;

View file

@ -801,7 +801,7 @@ void EnRd_UpdateDamage(EnRd* this, PlayState* play) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
if (this->action != REDEAD_ACTION_RISE_FROM_COFFIN) {
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (player->unk_844 != 0) {
this->unk_31D = player->unk_845;
}

View file

@ -132,8 +132,8 @@ void EnReeba_Init(Actor* thisx, PlayState* play) {
// "Reeba Boss Appears %f"
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ リーバぼす登場 ☆☆☆☆☆ %f\n" VT_RST, this->scale);
this->actor.colChkInfo.health = 20;
this->collider.info.toucher.effect = 4;
this->collider.info.toucher.damage = 16;
this->collider.elem.toucher.effect = 4;
this->collider.elem.toucher.damage = 16;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
}

View file

@ -417,9 +417,9 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
this->collider2.base.acFlags &= ~AC_HIT;
// "Kakin" (not sure what this means)
osSyncPrintf(VT_FGCOL(GREEN) "カキン(%d)" VT_RST "\n", this->frameCount);
hitPos.x = this->collider2.info.bumper.hitPos.x;
hitPos.y = this->collider2.info.bumper.hitPos.y;
hitPos.z = this->collider2.info.bumper.hitPos.z;
hitPos.x = this->collider2.elem.bumper.hitPos.x;
hitPos.y = this->collider2.elem.bumper.hitPos.y;
hitPos.z = this->collider2.elem.bumper.hitPos.z;
CollisionCheck_SpawnShieldParticlesMetal2(play, &hitPos);
} else {
if (this->collider1.base.acFlags & AC_HIT) {
@ -427,9 +427,9 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
this->collider1.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0) {
hitPos.x = this->collider1.info.bumper.hitPos.x;
hitPos.y = this->collider1.info.bumper.hitPos.y;
hitPos.z = this->collider1.info.bumper.hitPos.z;
hitPos.x = this->collider1.elem.bumper.hitPos.x;
hitPos.y = this->collider1.elem.bumper.hitPos.y;
hitPos.z = this->collider1.elem.bumper.hitPos.z;
CollisionCheck_BlueBlood(play, NULL, &hitPos);
}
switch (this->actor.colChkInfo.damageEffect) {

View file

@ -388,7 +388,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
FALLTHROUGH;
case 15: // explosions, arrow, hammer, ice arrow, light arrow, spirit arrow, shadow arrow
if (EnSb_IsVulnerable(this)) {
hitY = this->collider.info.bumper.hitPos.y - this->actor.world.pos.y;
hitY = this->collider.elem.bumper.hitPos.y - this->actor.world.pos.y;
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
if ((hitY < 30.0f) && (hitY > 10.0f) && (yawDiff >= -0x1FFF) && (yawDiff < 0x2000)) {
Actor_ApplyDamage(&this->actor);
@ -406,7 +406,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
case 1: // hookshot/longshot
case 13: // all sword damage
if (EnSb_IsVulnerable(this)) {
hitY = this->collider.info.bumper.hitPos.y - this->actor.world.pos.y;
hitY = this->collider.elem.bumper.hitPos.y - this->actor.world.pos.y;
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
if ((hitY < 30.0f) && (hitY > 10.0f) && (yawDiff >= -0x1FFF) && (yawDiff < 0x2000)) {
Actor_ApplyDamage(&this->actor);
@ -430,9 +430,9 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
// if player attack didn't do damage, play recoil sound effect and spawn sparks
if (!tookDamage) {
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);
}
}

View file

@ -250,7 +250,7 @@ void EnShopnuts_SpawnSalesman(EnShopnuts* this, PlayState* play) {
void EnShopnuts_ColliderCheck(EnShopnuts* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
EnShopnuts_SetupSpawnSalesman(this);
} else if (play->actorCtx.unk_02 != 0) {
EnShopnuts_SetupSpawnSalesman(this);

View file

@ -459,7 +459,7 @@ void EnSkb_CheckDamage(EnSkb* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 6) {
this->lastDamageEffect = this->actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->actor, &this->collider.elements[1].info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elements[1].base, true);
this->setColliderAT = false;
if (this->actor.colChkInfo.damageEffect == 1) {
if (this->actionState != SKB_BEHAVIOR_STUNNED) {

View file

@ -581,9 +581,9 @@ s32 EnSkj_CollisionCheck(EnSkj* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
switch (this->actor.colChkInfo.damageEffect) {
case 0xF:
effectPos.x = this->collider.info.bumper.hitPos.x;
effectPos.y = this->collider.info.bumper.hitPos.y;
effectPos.z = this->collider.info.bumper.hitPos.z;
effectPos.x = this->collider.elem.bumper.hitPos.x;
effectPos.y = this->collider.elem.bumper.hitPos.y;
effectPos.z = this->collider.elem.bumper.hitPos.z;
EnSkj_SpawnBlood(play, &effectPos);
EffectSsHitMark_SpawnFixedScale(play, 1, &effectPos);

View file

@ -200,15 +200,15 @@ void EnSsh_InitColliders(EnSsh* this, PlayState* play) {
Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]);
}
this->colCylinder[0].info.bumper.dmgFlags =
this->colCylinder[0].elem.bumper.dmgFlags =
DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT;
this->colCylinder[1].info.bumper.dmgFlags =
this->colCylinder[1].elem.bumper.dmgFlags =
DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT) &
~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE);
this->colCylinder[2].base.colType = COLTYPE_METAL;
this->colCylinder[2].info.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
this->colCylinder[2].info.elemType = ELEMTYPE_UNK2;
this->colCylinder[2].info.bumper.dmgFlags =
this->colCylinder[2].elem.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
this->colCylinder[2].elem.elemType = ELEMTYPE_UNK2;
this->colCylinder[2].elem.bumper.dmgFlags =
DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInfoInit);
@ -434,17 +434,17 @@ void EnSsh_Sway(EnSsh* this) {
}
void EnSsh_CheckBodyStickHit(EnSsh* this, PlayState* play) {
ColliderInfo* info = &this->colCylinder[0].info;
ColliderElement* elem = &this->colCylinder[0].elem;
Player* player = GET_PLAYER(play);
if (player->unk_860 != 0) {
info->bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[1].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[2].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
elem->bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[1].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[2].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
} else {
info->bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[1].info.bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[2].info.bumper.dmgFlags |= DMG_DEKU_STICK;
elem->bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[1].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[2].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
}
}

View file

@ -285,16 +285,16 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) {
Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]);
}
this->colCylinder[0].info.bumper.dmgFlags =
this->colCylinder[0].elem.bumper.dmgFlags =
DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT;
this->colCylinder[1].info.bumper.dmgFlags =
this->colCylinder[1].elem.bumper.dmgFlags =
DMG_DEFAULT &
~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) &
~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE);
this->colCylinder[2].base.colType = COLTYPE_METAL;
this->colCylinder[2].info.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
this->colCylinder[2].info.elemType = ELEMTYPE_UNK2;
this->colCylinder[2].info.bumper.dmgFlags =
this->colCylinder[2].elem.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
this->colCylinder[2].elem.elemType = ELEMTYPE_UNK2;
this->colCylinder[2].elem.bumper.dmgFlags =
DMG_DEFAULT &
~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT);
@ -305,17 +305,17 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) {
}
void EnSt_CheckBodyStickHit(EnSt* this, PlayState* play) {
ColliderInfo* body = &this->colCylinder[0].info;
ColliderElement* bodyElem = &this->colCylinder[0].elem;
Player* player = GET_PLAYER(play);
if (player->unk_860 != 0) {
body->bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[1].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[2].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
bodyElem->bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[1].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[2].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
} else {
body->bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[1].info.bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[2].info.bumper.dmgFlags |= DMG_DEKU_STICK;
bodyElem->bumper.dmgFlags &= ~DMG_DEKU_STICK;
this->colCylinder[1].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
this->colCylinder[2].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
}
}
@ -431,14 +431,14 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) {
if (cyl->base.acFlags & AC_HIT) {
cyl->base.acFlags &= ~AC_HIT;
hit = true;
flags |= cyl->info.acHitInfo->toucher.dmgFlags;
flags |= cyl->elem.acHitElem->toucher.dmgFlags;
}
cyl = &this->colCylinder[1];
if (cyl->base.acFlags & AC_HIT) {
cyl->base.acFlags &= ~AC_HIT;
hit = true;
flags |= cyl->info.acHitInfo->toucher.dmgFlags;
flags |= cyl->elem.acHitElem->toucher.dmgFlags;
}
if (!hit) {

View file

@ -283,7 +283,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) {
this->actor.scale.x = 0.0f;
FALLTHROUGH;
case 1:
this->collider.elements[0].info.toucher.damage *= 2;
this->collider.elements[0].base.toucher.damage *= 2;
this->actor.naviEnemyId = NAVI_ENEMY_GOLD_SKULLTULA;
this->actor.colChkInfo.health *= 2;
this->actor.flags &= ~ACTOR_FLAG_0;
@ -538,15 +538,15 @@ void func_80B0D590(EnSw* this, PlayState* play) {
if (((this->actor.params & 0xE000) >> 0xD) == 2) {
if (this->actor.scale.x < 0.0139999995f) {
this->collider.elements[0].info.toucherFlags = TOUCH_NONE;
this->collider.elements[0].info.bumperFlags = BUMP_NONE;
this->collider.elements[0].info.ocElemFlags = OCELEM_NONE;
this->collider.elements[0].base.toucherFlags = TOUCH_NONE;
this->collider.elements[0].base.bumperFlags = BUMP_NONE;
this->collider.elements[0].base.ocElemFlags = OCELEM_NONE;
}
if (this->actor.scale.x >= 0.0139999995f) {
this->collider.elements[0].info.toucherFlags = TOUCH_ON;
this->collider.elements[0].info.bumperFlags = BUMP_ON;
this->collider.elements[0].info.ocElemFlags = OCELEM_ON;
this->collider.elements[0].base.toucherFlags = TOUCH_ON;
this->collider.elements[0].base.bumperFlags = BUMP_ON;
this->collider.elements[0].base.ocElemFlags = OCELEM_ON;
}
Math_ApproachF(&this->actor.scale.x, !IS_DAY ? 0.02f : 0.0f, 0.2f, 0.01f);

View file

@ -898,7 +898,7 @@ void EnTest_SetupSlashDown(EnTest* this) {
this->unk_7C8 = 0x10;
this->actor.speed = 0.0f;
EnTest_SetupAction(this, EnTest_SlashDown);
this->swordCollider.info.toucher.damage = 16;
this->swordCollider.elem.toucher.damage = 16;
if (this->unk_7DE != 0) {
this->unk_7DE = 3;
@ -995,7 +995,7 @@ void EnTest_SetupSlashUp(EnTest* this) {
Animation_PlayOnce(&this->skelAnime, &gStalfosUpSlashAnim);
this->swordCollider.base.atFlags &= ~AT_BOUNCED;
this->unk_7C8 = 0x11;
this->swordCollider.info.toucher.damage = 16;
this->swordCollider.elem.toucher.damage = 16;
this->actor.speed = 0.0f;
EnTest_SetupAction(this, EnTest_SlashUp);
@ -1084,7 +1084,7 @@ void EnTest_SetupJumpslash(EnTest* this) {
this->actor.world.rot.y = this->actor.shape.rot.y;
this->swordCollider.base.atFlags &= ~AT_BOUNCED;
EnTest_SetupAction(this, EnTest_Jumpslash);
this->swordCollider.info.toucher.damage = 32;
this->swordCollider.elem.toucher.damage = 32;
if (this->unk_7DE != 0) {
this->unk_7DE = 3;
@ -1670,7 +1670,7 @@ void EnTest_UpdateDamage(EnTest* this, PlayState* play) {
}
this->unk_7DC = player->unk_845;
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, false);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_STAL_WARAU);
if ((this->actor.colChkInfo.damageEffect == STALFOS_DMGEFF_STUN) ||

View file

@ -355,7 +355,7 @@ void EnTite_Attack(EnTite* this, PlayState* play) {
}
break;
case TEKTITE_MID_LUNGE:
// Generate sparkles at feet upon landing, set jumping animation and hurtbox and check if hit player
// Generate sparkles at feet upon landing, set jumping animation and attack collider and check if hit player
if (this->actor.velocity.y >= 5.0f) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
func_800355B8(play, &this->frontLeftFootPos);
@ -852,7 +852,7 @@ void EnTite_CheckDamage(Actor* thisx, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
if (thisx->colChkInfo.damageEffect != 0xE) { // Immune to fire magic
this->damageEffect = thisx->colChkInfo.damageEffect;
Actor_SetDropFlag(thisx, &this->collider.elements[0].info, false);
Actor_SetDropFlag(thisx, &this->collider.elements[0].base, false);
// Stun if Tektite hit by nut, boomerang, hookshot, ice arrow or ice magic
if ((thisx->colChkInfo.damageEffect == 1) || (thisx->colChkInfo.damageEffect == 0xF)) {
if (this->action != TEKTITE_STUNNED) {

View file

@ -104,8 +104,8 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) {
this->meleeWeaponQuads[0].base.atFlags = this->meleeWeaponQuads[1].base.atFlags = AT_ON | AT_TYPE_ENEMY;
this->meleeWeaponQuads[0].base.acFlags = this->meleeWeaponQuads[1].base.acFlags = AC_ON | AC_HARD | AC_TYPE_PLAYER;
this->meleeWeaponQuads[0].base.colType = this->meleeWeaponQuads[1].base.colType = COLTYPE_METAL;
this->meleeWeaponQuads[0].info.toucher.damage = this->meleeWeaponQuads[1].info.toucher.damage = 8;
this->meleeWeaponQuads[0].info.bumperFlags = this->meleeWeaponQuads[1].info.bumperFlags = BUMP_ON;
this->meleeWeaponQuads[0].elem.toucher.damage = this->meleeWeaponQuads[1].elem.toucher.damage = 8;
this->meleeWeaponQuads[0].elem.bumperFlags = this->meleeWeaponQuads[1].elem.bumperFlags = BUMP_ON;
this->shieldQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY;
this->shieldQuad.base.acFlags = AC_ON | AC_HARD | AC_TYPE_PLAYER;
this->actor.colChkInfo.damageTable = &sDamageTable;
@ -599,7 +599,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
this->unk_8A8 = 6.0f;
this->unk_8A4 = 8.0f;
this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000;
Actor_SetDropFlag(&this->actor, &this->cylinder.info, true);
Actor_SetDropFlag(&this->actor, &this->cylinder.elem, true);
this->stateFlags3 &= ~PLAYER_STATE3_2;
this->stateFlags3 |= PLAYER_STATE3_0;
sActionState = ENTORCH2_DAMAGE;
@ -698,10 +698,10 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
}
if (this->invincibilityTimer != 0) {
this->cylinder.base.colType = COLTYPE_NONE;
this->cylinder.info.elemType = ELEMTYPE_UNK5;
this->cylinder.elem.elemType = ELEMTYPE_UNK5;
} else {
this->cylinder.base.colType = COLTYPE_HIT5;
this->cylinder.info.elemType = ELEMTYPE_UNK1;
this->cylinder.elem.elemType = ELEMTYPE_UNK1;
}
/*
* Handles the jump movement onto Link's sword. Dark Link doesn't move during the

View file

@ -258,7 +258,7 @@ void EnVali_SetupStunned(EnVali* this) {
this->timer = 80;
this->actor.velocity.y = 0.0f;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80);
this->bodyCollider.info.bumper.effect = 0;
this->bodyCollider.elem.bumper.effect = 0;
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
this->actor.velocity.y = 1.0f;
this->actionFunc = EnVali_Stunned;
@ -448,7 +448,7 @@ void EnVali_Stunned(EnVali* this, PlayState* play) {
}
if (this->timer == 0) {
this->bodyCollider.info.bumper.effect = 1; // Shock?
this->bodyCollider.elem.bumper.effect = 1; // Shock?
EnVali_SetupFloatIdle(this);
}
}
@ -496,7 +496,7 @@ void EnVali_ReturnToLurk(EnVali* this, PlayState* play) {
void EnVali_UpdateDamage(EnVali* this, PlayState* play) {
if (this->bodyCollider.base.acFlags & AC_HIT) {
this->bodyCollider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, true);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
if ((this->actor.colChkInfo.damageEffect != BARI_DMGEFF_NONE) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {

View file

@ -219,7 +219,7 @@ void EnWallmas_SetupReturnToCeiling(EnWallmas* this) {
void EnWallmas_SetupTakeDamage(EnWallmas* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f);
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
if (this->collider.elem.acHitElem->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
} else {
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
@ -507,7 +507,7 @@ void EnWallmas_Stun(EnWallmas* this, PlayState* play) {
void EnWallmas_ColUpdate(EnWallmas* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);

View file

@ -561,7 +561,7 @@ void func_80B3349C(EnWeiyer* this, PlayState* play) {
void func_80B3368C(EnWeiyer* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect == 1) {

View file

@ -241,7 +241,7 @@ void EnWf_Init(Actor* thisx, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gWolfosWhiteSkel, &gWolfosWaitingAnim, this->jointTable,
this->morphTable, WOLFOS_LIMB_MAX);
Actor_SetScale(thisx, 0.01f);
this->colliderSpheres.elements[0].info.toucher.damage = this->colliderSpheres.elements[1].info.toucher.damage =
this->colliderSpheres.elements[0].base.toucher.damage = this->colliderSpheres.elements[1].base.toucher.damage =
8;
thisx->naviEnemyId = NAVI_ENEMY_WHITE_WOLFOS;
}
@ -1266,7 +1266,7 @@ void EnWf_UpdateDamage(EnWf* this, PlayState* play) {
if (this->actor.colChkInfo.damageEffect != ENWF_DMGEFF_ICE_MAGIC) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->actor, &this->colliderCylinderBody.info, true);
Actor_SetDropFlag(&this->actor, &this->colliderCylinderBody.elem, true);
this->slashStatus = 0;
if ((this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_STUN) ||

View file

@ -159,7 +159,7 @@ void EnWonderItem_Init(Actor* thisx, PlayState* play) {
colTypeIndex = this->actor.world.rot.z & 0xFF;
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->collider.info.bumper.dmgFlags = damageFlags[colTypeIndex];
this->collider.elem.bumper.dmgFlags = damageFlags[colTypeIndex];
this->collider.dim.radius = 20;
this->collider.dim.height = 30;
this->updateFunc = EnWonderItem_InteractSwitch;
@ -188,7 +188,7 @@ void EnWonderItem_Init(Actor* thisx, PlayState* play) {
case WONDERITEM_BOMB_SOLDIER:
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->collider.info.bumper.dmgFlags = DMG_SLINGSHOT;
this->collider.elem.bumper.dmgFlags = DMG_SLINGSHOT;
this->unkPos = this->actor.world.pos;
this->collider.dim.radius = 35;
this->collider.dim.height = 75;

View file

@ -128,9 +128,9 @@ void func_80B42F74(EnYabusameMark* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
arrowHitPos.x = this->collider.info.bumper.hitPos.x;
arrowHitPos.y = this->collider.info.bumper.hitPos.y;
arrowHitPos.z = this->collider.info.bumper.hitPos.z;
arrowHitPos.x = this->collider.elem.bumper.hitPos.x;
arrowHitPos.y = this->collider.elem.bumper.hitPos.y;
arrowHitPos.z = this->collider.elem.bumper.hitPos.z;
effectVelocity.y = 15.0f;

View file

@ -2000,7 +2000,7 @@ void EnZf_UpdateDamage(EnZf* this, PlayState* play) {
(D_80B4A1B4 != this->actor.params)) &&
(this->actor.colChkInfo.damageEffect != ENZF_DMGEFF_IMMUNE)) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, false);
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
if ((this->actor.colChkInfo.damageEffect == ENZF_DMGEFF_STUN) ||
(this->actor.colChkInfo.damageEffect == ENZF_DMGEFF_ICE)) {

View file

@ -133,9 +133,9 @@ void MagicFire_Update(Actor* thisx, PlayState* play) {
}
if (this->action == DF_ACTION_EXPAND_SLOWLY) {
this->collider.info.toucher.damage = this->actionTimer + 25;
this->collider.elem.toucher.damage = this->actionTimer + 25;
} else if (this->action == DF_ACTION_STOP_EXPANDING) {
this->collider.info.toucher.damage = this->actionTimer;
this->collider.elem.toucher.damage = this->actionTimer;
}
Collider_UpdateCylinder(&this->actor, &this->collider);
this->collider.dim.radius = (this->actor.scale.x * 325.0f);

View file

@ -125,7 +125,7 @@ void ObjBombiwa_Update(Actor* thisx, PlayState* play) {
s32 pad;
if ((func_80033684(play, &this->actor) != NULL) ||
((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HAMMER))) {
((this->collider.base.acFlags & AC_HIT) && (this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HAMMER))) {
ObjBombiwa_Break(this, play);
Flags_SetSwitch(play, this->actor.params & 0x3F);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 80, NA_SE_EV_WALL_BROKEN);

View file

@ -176,7 +176,7 @@ void ObjComb_Wait(ObjComb* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
dmgFlags = this->collider.elements[0].info.acHitInfo->toucher.dmgFlags;
dmgFlags = this->collider.elements[0].base.acHitElem->toucher.dmgFlags;
if (dmgFlags & (DMG_HAMMER | DMG_ARROW | DMG_SLINGSHOT | DMG_DEKU_STICK)) {
this->unk_1B0 = 1500;
} else {

View file

@ -170,7 +170,7 @@ void ObjHamishi_Update(Actor* thisx, PlayState* play) {
ObjHamishi_Shake(this);
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HAMMER)) {
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HAMMER)) {
this->collider.base.acFlags &= ~AC_HIT;
this->hitCount++;
if (this->hitCount < 2) {

View file

@ -117,7 +117,7 @@ void ObjIcePoly_Idle(ObjIcePoly* this, PlayState* play) {
Vec3f pos;
if (this->colliderIce.base.acFlags & AC_HIT) {
this->meltTimer = -this->colliderIce.info.acHitInfo->toucher.damage;
this->meltTimer = -this->colliderIce.elem.acHitElem->toucher.damage;
this->actor.focus.rot.y = this->actor.yawTowardsPlayer;
OnePointCutscene_Init(play, 5120, 40, &this->actor, CAM_ID_MAIN);
this->actionFunc = ObjIcePoly_Melt;

View file

@ -171,7 +171,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
}
}
if (this->colliderFlame.base.acFlags & AC_HIT) {
dmgFlags = this->colliderFlame.info.acHitInfo->toucher.dmgFlags;
dmgFlags = this->colliderFlame.elem.acHitElem->toucher.dmgFlags;
if (dmgFlags & (DMG_FIRE | DMG_ARROW_NORMAL)) {
interactionType = 1;
}
@ -197,7 +197,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
arrow = (EnArrow*)this->colliderFlame.base.ac;
if ((arrow->actor.update != NULL) && (arrow->actor.id == ACTOR_EN_ARROW)) {
arrow->actor.params = 0;
arrow->collider.info.toucher.dmgFlags = DMG_ARROW_FIRE;
arrow->collider.elem.toucher.dmgFlags = DMG_ARROW_FIRE;
}
}
if ((0 <= this->litTimer) && (this->litTimer < (50 * litTimeScale + 100)) && (torchType != 0)) {

View file

@ -246,7 +246,7 @@ void ObjTsubo_Idle(ObjTsubo* this, PlayState* play) {
ObjTsubo_SpawnCollectible(this, play);
Actor_Kill(&this->actor);
} else if ((this->collider.base.acFlags & AC_HIT) &&
(this->collider.info.acHitInfo->toucher.dmgFlags &
(this->collider.elem.acHitElem->toucher.dmgFlags &
(DMG_SWORD | DMG_RANGED | DMG_HAMMER | DMG_BOOMERANG | DMG_EXPLOSIVE))) {
ObjTsubo_AirBreak(this, play);
ObjTsubo_SpawnCollectible(this, play);

View file

@ -4007,12 +4007,12 @@ s32 func_80837818(Player* this) {
}
void func_80837918(Player* this, s32 quadIndex, u32 dmgFlags) {
this->meleeWeaponQuads[quadIndex].info.toucher.dmgFlags = dmgFlags;
this->meleeWeaponQuads[quadIndex].elem.toucher.dmgFlags = dmgFlags;
if (dmgFlags == DMG_DEKU_STICK) {
this->meleeWeaponQuads[quadIndex].info.toucherFlags = TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_WOOD;
this->meleeWeaponQuads[quadIndex].elem.toucherFlags = TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_WOOD;
} else {
this->meleeWeaponQuads[quadIndex].info.toucherFlags = TOUCH_ON | TOUCH_NEAREST;
this->meleeWeaponQuads[quadIndex].elem.toucherFlags = TOUCH_ON | TOUCH_NEAREST;
}
}
@ -4361,7 +4361,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
// Additionally, `Collider.atHit` can never be set while already colliding as AC, so it's also bugged.
// This behavior was later fixed in MM, most likely by removing both the `atHit` and `atFlags` checks.
if (sp64 || ((this->invincibilityTimer < 0) && (this->cylinder.base.acFlags & AC_HIT) &&
(this->cylinder.info.atHit != NULL) && (this->cylinder.info.atHit->atFlags & 0x20000000))) {
(this->cylinder.elem.atHit != NULL) && (this->cylinder.elem.atHit->atFlags & 0x20000000))) {
Player_RequestRumble(this, 180, 20, 100, 0);
@ -4394,7 +4394,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
}
}
if (sp64 && (this->shieldQuad.info.acHitInfo->toucher.effect == 1)) {
if (sp64 && (this->shieldQuad.elem.acHitElem->toucher.effect == 1)) {
func_8083819C(this, play);
}