mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +00:00
Cleanup z_collision_check.c
and structs
This commit is contained in:
parent
d8175501ad
commit
9062812a2c
109 changed files with 1640 additions and 1528 deletions
|
@ -518,7 +518,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,
|
||||
|
@ -686,44 +686,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);
|
||||
|
@ -734,7 +733,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);
|
||||
|
@ -756,12 +755,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);
|
||||
|
|
|
@ -892,6 +892,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;
|
||||
|
|
|
@ -9,90 +9,140 @@
|
|||
// From z64.h
|
||||
struct Actor;
|
||||
|
||||
/*
|
||||
* Bases for all shapes of colliders
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
|
||||
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
|
||||
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
|
||||
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
|
||||
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
|
||||
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
|
||||
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
|
||||
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
|
||||
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
|
||||
/* 9 */ COLTYPE_METAL,
|
||||
/* 10 */ COLTYPE_NONE,
|
||||
/* 11 */ COLTYPE_WOOD,
|
||||
/* 12 */ COLTYPE_HARD,
|
||||
/* 13 */ COLTYPE_TREE
|
||||
} ColliderType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLSHAPE_JNTSPH,
|
||||
/* 1 */ COLSHAPE_CYLINDER,
|
||||
/* 2 */ COLSHAPE_TRIS,
|
||||
/* 3 */ COLSHAPE_QUAD,
|
||||
/* 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; // 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
|
||||
/* 0x00 */ struct Actor* self; // Actor owning this collider.
|
||||
/* 0x04 */ struct Actor* otherAC; // Other actor owning the AC collider that collided with this AT collider.
|
||||
/* 0x08 */ struct Actor* otherAT; // Other actor owning the AT collider that collided with this AC collider.
|
||||
/* 0x0C */ struct Actor* otherOC; // Other actor owning the OC collider that collided with this 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; // 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
|
||||
/* 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; // 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
|
||||
/* 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; // 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
|
||||
/* 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
|
||||
} ColliderTouch; // size = 0x08
|
||||
} 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
|
||||
} ColliderBump; // size = 0x0C
|
||||
} ColliderElementBump; // 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
|
||||
} ColliderElementBumpInit; // 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
|
||||
/**
|
||||
* Affects the sound Link's sword makes when hitting it, hookability,
|
||||
* and possibly other things. It's definitely not flags, as all checks
|
||||
* are == or !=. Will probably need more actors decomped to truly
|
||||
* understand what this is.
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0 */ ELEMTYPE_UNK0,
|
||||
/* 1 */ ELEMTYPE_UNK1,
|
||||
/* 2 */ ELEMTYPE_UNK2,
|
||||
/* 3 */ ELEMTYPE_UNK3,
|
||||
/* 4 */ ELEMTYPE_UNK4,
|
||||
/* 5 */ ELEMTYPE_UNK5,
|
||||
/* 6 */ ELEMTYPE_UNK6,
|
||||
/* 7 */ ELEMTYPE_UNK7
|
||||
} ElementType;
|
||||
|
||||
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 ColliderInfo* atHitInfo; // element that hit the AT collider
|
||||
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
|
||||
} ColliderInfo; // size = 0x28
|
||||
/* 0x20 */ struct ColliderElement* atHitInfo; // element that hit the AT collider
|
||||
/* 0x24 */ struct ColliderElement* acHitInfo; // 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 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
|
||||
/* 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
|
||||
} ColliderInfoInit; // size = 0x18
|
||||
} ColliderElementInit; // size = 0x18
|
||||
|
||||
/*
|
||||
* JntSph collider
|
||||
*/
|
||||
|
||||
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
|
||||
/* 0x10 */ f32 scale; // world space sphere = model * scale * 0.01
|
||||
/* 0x14 */ u8 limb; // attached limb
|
||||
} ColliderJntSphElementDim; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
|
@ -102,12 +152,12 @@ typedef struct {
|
|||
} ColliderJntSphElementDimInit; // size = 0x0C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfo info;
|
||||
/* 0x00 */ ColliderElement base;
|
||||
/* 0x28 */ ColliderJntSphElementDim dim;
|
||||
} ColliderJntSphElement; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfoInit info;
|
||||
/* 0x00 */ ColliderElementInit base;
|
||||
/* 0x18 */ ColliderJntSphElementDimInit dim;
|
||||
} ColliderJntSphElementInit; // size = 0x24
|
||||
|
||||
|
@ -135,41 +185,49 @@ typedef struct {
|
|||
/* 0x0C */ ColliderJntSphElementInit* elements;
|
||||
} ColliderJntSphInitToActor; // size = 0x10
|
||||
|
||||
/*
|
||||
* Cylinder collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderInfo info;
|
||||
/* 0x18 */ ColliderElement elem;
|
||||
/* 0x40 */ Cylinder16 dim;
|
||||
} ColliderCylinder; // size = 0x4C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInit; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInitType1; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitToActor base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInitToActor; // size = 0x2C
|
||||
|
||||
/*
|
||||
* Tris collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f vtx[3];
|
||||
} ColliderTrisElementDimInit; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfo info;
|
||||
/* 0x00 */ ColliderElement base;
|
||||
/* 0x28 */ TriNorm dim;
|
||||
} ColliderTrisElement; // size = 0x5C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfoInit info;
|
||||
/* 0x00 */ ColliderElementInit base;
|
||||
/* 0x18 */ ColliderTrisElementDimInit dim;
|
||||
} ColliderTrisElementInit; // size = 0x3C
|
||||
|
||||
|
@ -191,6 +249,10 @@ typedef struct {
|
|||
/* 0x0C */ ColliderTrisElementInit* elements;
|
||||
} ColliderTrisInitType1; // size = 0x10
|
||||
|
||||
/*
|
||||
* Quad collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f quad[4];
|
||||
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
|
||||
|
@ -202,77 +264,36 @@ 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;
|
||||
/* 0x18 */ ColliderElement elem;
|
||||
/* 0x40 */ ColliderQuadDim dim;
|
||||
} ColliderQuad; // size = 0x80
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInit; // size = 0x50
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInitType1; // size = 0x50
|
||||
|
||||
/*
|
||||
* Line collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Linef line;
|
||||
/* 0x18 */ u16 ocFlags;
|
||||
} OcLine; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
|
||||
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
|
||||
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
|
||||
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
|
||||
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
|
||||
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
|
||||
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
|
||||
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
|
||||
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
|
||||
/* 9 */ COLTYPE_METAL,
|
||||
/* 10 */ COLTYPE_NONE,
|
||||
/* 11 */ COLTYPE_WOOD,
|
||||
/* 12 */ COLTYPE_HARD,
|
||||
/* 13 */ COLTYPE_TREE
|
||||
} ColliderType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLSHAPE_JNTSPH,
|
||||
/* 1 */ COLSHAPE_CYLINDER,
|
||||
/* 2 */ COLSHAPE_TRIS,
|
||||
/* 3 */ COLSHAPE_QUAD,
|
||||
/* 4 */ COLSHAPE_MAX
|
||||
} ColliderShape;
|
||||
|
||||
/**
|
||||
* Affects the sound Link's sword makes when hitting it, hookability,
|
||||
* and possibly other things. It's definitely not flags, as all checks
|
||||
* are == or !=. Will probably need more actors decomped to truly
|
||||
* understand what this is.
|
||||
/*
|
||||
* Collider properties, for all shapes
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0 */ ELEMTYPE_UNK0,
|
||||
/* 1 */ ELEMTYPE_UNK1,
|
||||
/* 2 */ ELEMTYPE_UNK2,
|
||||
/* 3 */ ELEMTYPE_UNK3,
|
||||
/* 4 */ ELEMTYPE_UNK4,
|
||||
/* 5 */ ELEMTYPE_UNK5,
|
||||
/* 6 */ ELEMTYPE_UNK6,
|
||||
/* 7 */ ELEMTYPE_UNK7
|
||||
} ElementType;
|
||||
|
||||
#define SAC_ENABLE (1 << 0)
|
||||
|
||||
#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue