summaryrefslogtreecommitdiff
path: root/include/SSystem/SComponent
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2023-08-02 18:46:40 +0300
committerGitHub <noreply@github.com>2023-08-02 18:46:40 +0300
commitf3f944c7975ce6750db8a2c8121d0a0c0cdf4def (patch)
tree2f9a149ac17d9b87eb6c7e45fd4977b04e926f0c /include/SSystem/SComponent
parent24161e34d27f70ab54d584769b1d9f71262d02e9 (diff)
parent392f6101ca8d9187768d9764b14f8dce6bb7be59 (diff)
Merge pull request #396 from TakaRikka/swprop
d_a_obj_swpropeller OK, work on d_kankyo / kytag08
Diffstat (limited to 'include/SSystem/SComponent')
-rw-r--r--include/SSystem/SComponent/c_cc_d.h36
-rw-r--r--include/SSystem/SComponent/c_counter.h2
2 files changed, 31 insertions, 7 deletions
diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h
index 0e2e4b2982..baaa513365 100644
--- a/include/SSystem/SComponent/c_cc_d.h
+++ b/include/SSystem/SComponent/c_cc_d.h
@@ -29,6 +29,7 @@ enum cCcD_ObjAtType {
/* 0x00000008 */ AT_TYPE_THROW_OBJ = (1 << 3),
/* 0x00000010 */ AT_TYPE_SHIELD_ATTACK = (1 << 4),
/* 0x00000020 */ AT_TYPE_BOMB = (1 << 5),
+ /* 0x00000040 */ AT_TYPE_40 = (1 << 6),
/* 0x00000080 */ AT_TYPE_SLINGSHOT = (1 << 7),
/* 0x00000200 */ AT_TYPE_LANTERN_SWING = (1 << 9),
/* 0x00000400 */ AT_TYPE_CSTATUE_SWING = (1 << 10),
@@ -272,25 +273,33 @@ public:
STATIC_ASSERT(0x40 == sizeof(cCcD_DivideArea));
+struct cCcD_SrcObjCommonBase {
+ /* 0x0 */ s32 mSPrm;
+};
+
struct cCcD_SrcObjTg {
/* 0x0 */ s32 mType;
- /* 0x4 */ s32 mSPrm;
+ /* 0x4 */ cCcD_SrcObjCommonBase mBase;
}; // Size: 0x8
struct cCcD_SrcObjAt {
/* 0x0 */ s32 mType;
/* 0x4 */ u8 mAtp;
- /* 0x8 */ s32 mSPrm;
+ /* 0x8 */ cCcD_SrcObjCommonBase mBase;
}; // Size: 0xC
+struct cCcD_SrcObjCo {
+ /* 0x0 */ cCcD_SrcObjCommonBase mBase;
+}; // Size: 0x4
+
struct cCcD_SrcObjHitInf {
/* 0x00 */ cCcD_SrcObjAt mObjAt;
/* 0x0C */ cCcD_SrcObjTg mObjTg;
- /* 0x14 */ s32 mSPrm;
+ /* 0x14 */ cCcD_SrcObjCo mObjCo;
}; // Size: 0x18
struct cCcD_SrcObj {
- /* 0x0 */ int field_0x0;
+ /* 0x0 */ int mFlags;
/* 0x4 */ cCcD_SrcObjHitInf mSrcObjHitInf;
}; // Size: 0x1C
@@ -345,6 +354,13 @@ protected:
/* 0x08 */ cCcD_Obj* mHitObj;
/* 0x0C vtable */
public:
+ enum CoSPrm_e {
+ CO_SPRM_SET = 1,
+ CO_SPRM_NO_CRR = 0x100,
+ CO_SPRM_NO_CO_HIT_INF_SET = 0x200,
+ CO_SPRM_SAME_ACTOR_HIT = 0x400,
+ };
+
cCcD_ObjCommonBase() { ct(); }
/* 8008409C */ virtual ~cCcD_ObjCommonBase() {}
/* 802639B0 */ void ct();
@@ -357,6 +373,10 @@ public:
u32 MskRPrm(u32 mask) { return mRPrm & mask; }
void OnSPrmBit(u32 flag) { mSPrm |= flag; }
void OffSPrmBit(u32 flag) { mSPrm &= ~flag; }
+
+ void Set(cCcD_SrcObjCommonBase const& src) {
+ mSPrm = src.mSPrm;
+ }
};
STATIC_ASSERT(0x10 == sizeof(cCcD_ObjCommonBase));
@@ -421,6 +441,10 @@ public:
u32 ChkSph3DCrr() const { return MskSPrm(0x80); }
void ClrSet() { OffSPrmBit(1); }
u32 ChkHit() { return MskRPrm(1); }
+
+ void Set(cCcD_SrcObjCo const& src) {
+ cCcD_ObjCommonBase::Set(src.mBase);
+ }
};
STATIC_ASSERT(0x10 == sizeof(cCcD_ObjCo));
@@ -510,10 +534,10 @@ public:
void SetStts(cCcD_Stts* stts) { mStts = stts; }
cCcD_DivideInfo& GetDivideInfo() { return mDivideInfo; }
cCcD_DivideInfo* GetPDivideInfo() { return &mDivideInfo; }
- int ChkBsRevHit() const { return field_0x40 & 2; }
+ int ChkBsRevHit() const { return mFlags & 2; }
private:
- /* 0x040 */ int field_0x40;
+ /* 0x040 */ int mFlags;
/* 0x044 */ cCcD_Stts* mStts;
/* 0x048 */ cCcD_DivideInfo mDivideInfo;
}; // Size = 0x58
diff --git a/include/SSystem/SComponent/c_counter.h b/include/SSystem/SComponent/c_counter.h
index 6967d2a678..19cd6bd3a4 100644
--- a/include/SSystem/SComponent/c_counter.h
+++ b/include/SSystem/SComponent/c_counter.h
@@ -4,7 +4,7 @@
#include "dolphin/types.h"
struct counter_class {
- s32 mCounter0;
+ u32 mCounter0;
s32 mCounter1;
s32 mTimer;
};