diff options
| author | Elijah Thomas <42302100+elijah-thomas774@users.noreply.github.com> | 2024-11-12 22:30:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-12 22:30:01 -0500 |
| commit | 2ecf6509dd625096fe6c7841a36bb4c7ec954cb6 (patch) | |
| tree | b9f2af52c8ef6bbaed59cb9d708e2c3500f06b53 /include/d/col/c | |
| parent | 9525f8e9e5c20dccd8a9848fb6a3625f88c3e803 (diff) | |
Tubo! (d_a_obj_tubo) (#95)
* begin work
* fixup modifications to d_a_base header
* progress
* update from main again (forgor to fetch)
* progress
* Basically done
* clean up some inlines
* some at/tg hit typing and tubo naming
* more naming
Diffstat (limited to 'include/d/col/c')
| -rw-r--r-- | include/d/col/c/c_cc_d.h | 59 | ||||
| -rw-r--r-- | include/d/col/c/c_m3d_g_sph.h | 6 |
2 files changed, 42 insertions, 23 deletions
diff --git a/include/d/col/c/c_cc_d.h b/include/d/col/c/c_cc_d.h index fe7723ec..49791e31 100644 --- a/include/d/col/c/c_cc_d.h +++ b/include/d/col/c/c_cc_d.h @@ -327,36 +327,37 @@ struct cCcD_SrcGObjTg { /* 0x0E */ u16 mField_0x0E; }; -enum cCcD_AtType_e { +enum dCcD_ObjAtType { /* 0x 0000 0001 */ AT_TYPE_0x1 = (1 << 0), - /* 0x 0000 0002 */ AT_TYPE_0x2 = (1 << 1), + /* 0x 0000 0002 */ AT_TYPE_SWORD = (1 << 1), /* 0x 0000 0004 */ AT_TYPE_0x4 = (1 << 2), - /* 0x 0000 0008 */ AT_TYPE_0x8 = (1 << 3), + /* 0x 0000 0008 */ AT_TYPE_PHYSICS = (1 << 3), /* 0x 0000 0010 */ AT_TYPE_0x10 = (1 << 4), - /* 0x 0000 0020 */ AT_TYPE_0x20 = (1 << 5), + /* 0x 0000 0020 */ AT_TYPE_BOMB = (1 << 5), /* 0x 0000 0040 */ AT_TYPE_0x40 = (1 << 6), - /* 0x 0000 0080 */ AT_TYPE_0x80 = (1 << 7), + /* 0x 0000 0080 */ AT_TYPE_SLINGSHOT = (1 << 7), /* 0x 0000 0100 */ AT_TYPE_0x100 = (1 << 8), - /* 0x 0000 0200 */ AT_TYPE_0x200 = (1 << 9), - /* 0x 0000 0400 */ AT_TYPE_0x400 = (1 << 10), - /* 0x 0000 0800 */ AT_TYPE_0x800 = (1 << 11), + /* 0x 0000 0200 */ AT_TYPE_WIND = (1 << 9), + /* 0x 0000 0400 */ AT_TYPE_DAMAGE = (1 << 10), + /* 0x 0000 0800 */ AT_TYPE_WHIP = (1 << 11), /* 0x 0000 1000 */ AT_TYPE_0x1000 = (1 << 12), - /* 0x 0000 2000 */ AT_TYPE_0x2000 = (1 << 13), - /* 0x 0000 4000 */ AT_TYPE_0x4000 = (1 << 14), + /* 0x 0000 2000 */ AT_TYPE_ARROW = (1 << 13), + /* 0x 0000 4000 */ AT_TYPE_CLAWSHOT = (1 << 14), /* 0x 0000 8000 */ AT_TYPE_0x8000 = (1 << 15), - /* 0x 0001 0000 */ AT_TYPE_0x10000 = (1 << 16), + /* 0x 0001 0000 */ AT_TYPE_BELLOWS = (1 << 16), /* 0x 0002 0000 */ AT_TYPE_0x20000 = (1 << 17), /* 0x 0004 0000 */ AT_TYPE_0x40000 = (1 << 18), /* 0x 0008 0000 */ AT_TYPE_0x80000 = (1 << 19), - /* 0x 0010 0000 */ AT_TYPE_0x100000 = (1 << 20), + /* 0x 0010 0000 */ AT_TYPE_BUBBLE = (1 << 20), /* 0x 0020 0000 */ AT_TYPE_0x200000 = (1 << 21), - /* 0x 0040 0000 */ AT_TYPE_0x400000 = (1 << 22), + /* 0x 0040 0000 */ AT_TYPE_BEETLE = (1 << 22), /* 0x 0080 0000 */ AT_TYPE_0x800000 = (1 << 23), /* 0x 0100 0000 */ AT_TYPE_BUGNET = (1 << 24), /* 0x 0200 0000 */ AT_TYPE_0x2000000 = (1 << 25), - /* 0x 0400 0000 */ AT_TYPE_0x4000000 = (1 << 26), + /* 0x 0400 0000 */ AT_TYPE_KOLOKTOS_SWORD = (1 << 26), /* 0x 0800 0000 */ AT_TYPE_0x8000000 = (1 << 27), }; + enum cCcD_AtModifiers_e { /* 0x 0000 0001 */ AT_MOD_FIRE = (1 << 0), /* 0x 0000 0002 */ AT_MOD_0x2 = (1 << 1), @@ -630,9 +631,13 @@ public: mField_0x4B = val; } + void SetInfo_0x2(u16 val) { + mSrc.mInfo.mField_0x2 = val; + } + public: /* 0x1C */ cCcD_SrcGObjTg mSrc; - /* 0x2C */ mVec3_c mField_0x2C; + /* 0x2C */ mVec3_c mAtHitDir; /* 0x38 */ mVec3_c mHitPos; /* 0x44 */ s16 *mShieldFrontRangeYAngle; /* 0x48 */ s16 mShieldRange; @@ -737,7 +742,7 @@ public: dAcObjBase_c *GetAtActor(); bool ChkTgAtHitType(u32) const; - u32 GetTg_0x58() const; + u32 GetTgAtHitType() const; bool ChkTgBit14() const; u8 GetTgDamage() const; u16 GetTgDamageFlags() const; @@ -754,7 +759,7 @@ public: bool ChkTgBit8() const; u8 GetTg_0x4A() const; dAcObjBase_c *GetTgActor(); - const mVec3_c &GetTg_0x2C() const; + const mVec3_c &GetTgAtHitDir() const; dAcObjBase_c *GetCoActor(); bool ChkCoBit4() const; @@ -780,7 +785,7 @@ public: mCo.OnSPrm(f); } - void SetTgFlag(u32 flag) { + void SetTgType(u32 flag) { mTg.SetType(flag); } void SetAtFlag(u32 flag) { @@ -860,6 +865,9 @@ public: // At + void OnAtSet() { + mAt.OnSPrm(1); + } u32 ChkAtNoMass() const { return mAt.MskSPrm(0x400); } @@ -878,6 +886,9 @@ public: // Tg + void OnTgSet() { + mTg.OnSPrm(1); + } u32 GetTgGrp() const { return mTg.MskSPrm(0x3E); } @@ -894,9 +905,15 @@ public: void SetTg_0x4B(u8 val) { mTg.Set_0x4B(val); } + void SetTgInfo_0x2(u16 val) { + mTg.SetInfo_0x2(val); + } // Co + void OnCoSet() { + mCo.OnSPrm(1); + } u32 ChkCoSet2() const { return mCo.MskSPrm(0x800); } @@ -906,6 +923,12 @@ public: u32 ChkCoSameActorHit() const { return mCo.MskSPrm(0x1000); } + void ClrCo_0x400() { + mCo.OffSPrm(0x400); + } + void SetCo_0x400() { + mCo.OnSPrm(0x400); + } /** * SET HIT diff --git a/include/d/col/c/c_m3d_g_sph.h b/include/d/col/c/c_m3d_g_sph.h index 8be04f83..6216cb7d 100644 --- a/include/d/col/c/c_m3d_g_sph.h +++ b/include/d/col/c/c_m3d_g_sph.h @@ -11,15 +11,11 @@ public: /* 0x10 */ f32 mRatio; cM3dGSph(); - void SetC(const mVec3_c *); + void SetC(const mVec3_c &); void Set(const mVec3_c *, f32); void SetR(f32); void SetC(f32, f32, f32); - void SetC(const mVec3_c &p) { - SetC(&p); - } - f32 GetYDist(f32) const; bool Cross(const cM3dGTri *, f32 *, mVec3_c *); void Clamp(const mVec3_c &, mVec3_c &) const; |
