diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2026-10-19 12:57:33 -0400 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2026-10-19 12:57:33 -0400 |
| commit | fd581ff761e08e286b99f51f6737f2bebf9bf8db (patch) | |
| tree | 299571c41277bd5f4d4a3e8fd76d60aec03813ed /include | |
| parent | 4770935cf3458c9973128921d2566731e2d87753 (diff) | |
d_a_obj_base - Mostly done
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/a/d_a_base.h | 1 | ||||
| -rw-r--r-- | include/d/a/d_a_player.h | 5 | ||||
| -rw-r--r-- | include/d/a/obj/d_a_obj_base.h | 83 | ||||
| -rw-r--r-- | include/d/a/obj/d_a_obj_junk_repairing.h | 6 | ||||
| -rw-r--r-- | include/d/col/bg/d_bg_pc.h | 2 | ||||
| -rw-r--r-- | include/d/col/bg/d_bg_s_acch.h | 5 | ||||
| -rw-r--r-- | include/d/d_shadow.h | 17 | ||||
| -rw-r--r-- | include/m/m3d/m_shadow.h | 2 | ||||
| -rw-r--r-- | include/toBeSorted/d_d3d.h | 6 | ||||
| -rw-r--r-- | include/toBeSorted/time_area_mgr.h | 1 |
10 files changed, 70 insertions, 58 deletions
diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h index b405f69d..93c0fc86 100644 --- a/include/d/a/d_a_base.h +++ b/include/d/a/d_a_base.h @@ -76,6 +76,7 @@ public: AC_PROP_0x100 = (1 << 8), AC_PROP_0x400 = (1 << 10), AC_PROP_0x800 = (1 << 11), + AC_PROP_0x1000 = (1 << 12), AC_PROP_0x2000000 = (1 << 25), AC_PROP_0x4000000 = (1 << 26), AC_PROP_0x8000000 = (1 << 27), diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h index 69849bc9..b2e72ef6 100644 --- a/include/d/a/d_a_player.h +++ b/include/d/a/d_a_player.h @@ -9,6 +9,8 @@ #include "d/d_player_mdl.h" #include "m/m_angle.h" #include "m/m_color.h" +#include "m/m_mtx.h" +#include "m/m_sphere.h" #include "nw4r/g3d/res/g3d_resfile.h" #include "toBeSorted/file_manager.h" #include "toBeSorted/minigame_mgr.h" @@ -122,6 +124,9 @@ public: static bool isInMinigameRollerCoaster(); static bool isInMinigameSprialChargeTutorial(); + bool updateShadow(const m3d::smdl_c &mdl); + bool updateShadow(const mSphere_c &sph, const mMtx_c &mtx); + public: f32 getField_0x4564() const { return field_0x4564; diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index 407e3ef1..fb1a18dd 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -3,14 +3,11 @@ #include "common.h" #include "d/a/d_a_base.h" -#include "d/a/d_a_salbage_if.h" #include "d/col/c/c_cc_d.h" #include "d/col/c/c_m3d_g_aab.h" #include "d/d_jnt_col.h" #include "d/d_light_env.h" #include "d/d_linkage.h" -#include "egg/math/eggMath.h" -#include "m/m3d/m_shadow.h" #include "m/m3d/m_smdl.h" #include "m/m_angle.h" #include "m/m_mtx.h" @@ -18,11 +15,9 @@ #include "m/types_m.h" class dBgS_Acch; +class dShadowCircle_c; +class dSalvageIf_c; -// Ghidra: ActorObjectBase -// size: 0x330 -// vtable: 0x805015b8 -// non-official name class dAcObjBase_c : public dAcBase_c { public: enum ObjProperties_e { @@ -62,11 +57,11 @@ public: public: /* 0x0FC */ f32 mYOffset; - /* 0x100 */ f32 field_0x100; - /* 0x104 */ f32 field_0x104; - /* 0x104 */ f32 field_0x108; - /* 0x104 */ f32 field_0x10C; - /* 0x104 */ f32 field_0x110; + /* 0x100 */ f32 mDeepSinkTarget; + /* 0x104 */ f32 mShallowSinkTarget; + /* 0x104 */ f32 mDeepSinkRate; + /* 0x104 */ f32 mShallowSinkRate; + /* 0x104 */ f32 mDefaultSinkRate; /* 0x114 */ u16 mTargetFiTextID; /* 0x116 */ u8 mTargetFiRelated; /* 0x118 */ mVec3_c mOldPosition; @@ -83,7 +78,7 @@ public: /* 0x1A8 */ f32 field_0x1A8; /* 0x1AC */ u32 mObjectActorFlags; /* 0x1B0 */ f32 field_0x1B0; - /* 0x1B4 */ mVec3_c field_0x1B4; + /* 0x1B4 */ mVec3_c mGndNormal; /* 0x1C0 */ cCcD_Stts mStts; /* 0x1FC */ mVec3_c mStartingPos; /* 0x208 */ mAng3_c mStartingRot; @@ -143,8 +138,8 @@ public: return std::fabsf(mVelocity.y) <= speed; } - bool checkYOffsetField_0x100() const { - return mYOffset <= field_0x100; + bool checkAtDeepSinkDepth() const { + return mYOffset <= mDeepSinkTarget; } void unsetObjectProperty(u32 property) { @@ -202,10 +197,6 @@ public: const char *name, u32 roomId, u32 params1, const mVec3_c *pos, const mAng3_c *rot, const mVec3_c *scale, u32 params2, u16 id, s8 viewclipId ); - static dAcObjBase_c *create( - dAcObjBase_c *, ProfileName actorId, u32 params1, const mVec3_c *pos, const mAng3_c *rot, const mVec3_c *scale, - u32 params2, u32 roomId - ); static dAcObjBase_c *findObject(ProfileName actorId, fLiMgBa_c *refList, dAcObjBase_c *parent); static dAcObjBase_c *getNextObject(fLiMgBa_c *ref, dAcObjBase_c *parent); @@ -214,46 +205,38 @@ public: void calcVelocity(); void updateMatrix(); void setDefaultCullDistance(); - void fn_8002EA30(f32, f32, f32, f32, f32, dBgS_Acch *); - void fn_8002EA60(void *); - void fn_8002EB30(void *); - - void putInODesert(f32 depth, mVec3_c *position); - void fn_8002ECD0(m3d::smdl_c *smdl, UNKWORD); - // Disabling makes Items and Link Disappear - void drawModelType1(m3d::smdl_c *smdl); - // Disabling make Lava and other objects Disappear - void drawModel2(); - void fn_8002ed20(); - void fn_8002edb0(m3d::mShadowCircle_c &shadow, m3d::smdl_c &smdl, const mSphere_c *sph, s32, s32, f32); - void drawShadow( - m3d::mShadowCircle_c &shadow, void *, const mMtx_c &mtx, const mSphere_c *sph, s32, s32, s32, s32, s32, f32 - ); - void createChildAttached( - fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, - u32 roomId - ); - void createChildNonAttached( - fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, - u32 roomId + void setSinkDepths(f32, f32, f32, f32, f32, dBgS_Acch *); + void calcSinkDepth(const cBgS_PolyInfo &); + void setGndNormal(const cBgS_PolyInfo &); + + bool putInODesert(f32 depth, mVec3_c *position); + void drawModel(m3d::smdl_c *smdl); + void drawModel(m3d::smdl_c *smdl, int lightSetIdx); + bool drawShadowAlone(m3d::smdl_c &mdl); + bool drawShadow(dShadowCircle_c &shadow, m3d::smdl_c &smdl, const mSphere_c &sph, s32, s32, f32); + bool drawShadow( + dShadowCircle_c &shadow, const GXTexObj *pTex, const mMtx_c &mtx, const mSphere_c &sph, s32 priority, s32 alpha, + s32 red, s32 green, s32 blue, f32 height ); void fn_8002efa0(); bool fn_8002eff0(const f32 &, const s16 &, cCcD_Obj *, const f32 &, const f32 &); - void createChildAttached2( - fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, - u32 roomId + + dAcObjBase_c *createChildAttached( + ProfileName actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, u32 roomId + ); + dAcObjBase_c *createChildDetached( + ProfileName actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, u32 roomId ); // These may not belong here static dAcBase_c *createInsectActor( - dAcBase_c *parent, fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, - u32 params2, s32 roomId + dAcBase_c *parent, ProfileName actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, + s32 roomId ); - static dAcBase_c *createActorUnkGroup3( - fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, - u32 params2 + static dAcBase_c *createStageActor( + ProfileName actorId, u32 roomId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2 ); - static dAcBase_c *createActorUnkGroup3( + static dAcBase_c *createStageActor( const char *name, u32 roomId, u32 params1, const mVec3_c *pos, const mAng3_c *rot, const mVec3_c *scale, u32 params2, u16 id, s8 viewclipId ); diff --git a/include/d/a/obj/d_a_obj_junk_repairing.h b/include/d/a/obj/d_a_obj_junk_repairing.h index c40e9c26..55b3e9df 100644 --- a/include/d/a/obj/d_a_obj_junk_repairing.h +++ b/include/d/a/obj/d_a_obj_junk_repairing.h @@ -2,13 +2,11 @@ #define D_A_OBJ_JUNK_REPAIRING_H #include "d/a/obj/d_a_obj_base.h" -#include "m/m3d/m_shadow.h" +#include "d/d_shadow.h" #include "m/m3d/m_smdl.h" #include "nw4r/g3d/res/g3d_resfile.h" #include "s/s_State.hpp" -class dMyShadowCircle_c : public m3d::mShadowCircle_c {}; - class dAcOJunkRep_c : public dAcObjBase_c { public: dAcOJunkRep_c() : mStateMgr(*this), mpModelToUse(nullptr) {} @@ -39,7 +37,7 @@ private: m3d::smdl_c *mpModelToUse; m3d::smdl_c mModel1; m3d::smdl_c mModel2; - dMyShadowCircle_c mShadow; + dShadowCircle_c mShadow; STATE_MGR_DECLARE(dAcOJunkRep_c); }; diff --git a/include/d/col/bg/d_bg_pc.h b/include/d/col/bg/d_bg_pc.h index a5845962..832ea0b2 100644 --- a/include/d/col/bg/d_bg_pc.h +++ b/include/d/col/bg/d_bg_pc.h @@ -62,6 +62,8 @@ enum dBgPc_Attribute { POLY_ATTR_SLOPE_RUN = 15, POLY_ATTR_SAND_DEEP_SLOW = 16, POLY_ATTR_CURSED_WATER = 17, + + POLY_ATTR_SAND_SHALLOW2 = 20, }; class dBgPc { public: diff --git a/include/d/col/bg/d_bg_s_acch.h b/include/d/col/bg/d_bg_s_acch.h index 29cb3a55..f143f187 100644 --- a/include/d/col/bg/d_bg_s_acch.h +++ b/include/d/col/bg/d_bg_s_acch.h @@ -140,7 +140,7 @@ public: /* 0x 0020 0000 */ GND_THIN_CELLING_OFF = (1 << 21), /* 0x 0040 0000 */ WALL_SORT = (1 << 22), /* 0x 0080 0000 */ LINE_DOWN = (1 << 23), - /* 0x 0200 0000 */ ACCH_FLAG_0x1000000 = (1 << 24), + /* 0x 0100 0000 */ ACCH_FLAG_0x1000000 = (1 << 24), /* 0x 0200 0000 */ ACCH_FLAG_0x2000000 = (1 << 25), /* 0x 0400 0000 */ ACCH_FLAG_0x4000000 = (1 << 26), /* 0x 0800 0000 */ ACCH_FLAG_0x8000000 = (1 << 27), @@ -281,6 +281,9 @@ public: void SetWaterNone() { mFlags |= WATER_NONE; } + void SetGroundSink() { + mFlags |= ACCH_FLAG_0x1000000; + } bool ChkWallHit() { return mFlags & WALL_HIT; } diff --git a/include/d/d_shadow.h b/include/d/d_shadow.h index 902f2e6a..009bf821 100644 --- a/include/d/d_shadow.h +++ b/include/d/d_shadow.h @@ -1,14 +1,29 @@ #ifndef D_SHADOW_H #define D_SHADOW_H +#include "d/d_light_env.h" #include "m/m3d/m_shadow.h" +#include "m/m3d/m_smdl.h" +#include "m/m_mtx.h" +#include "m/m_sphere.h" +#include "rvl/GX/GXTexture.h" + +class dAcObjBase_c; // This is unofficial, idk if this is close, but this is a common shadow extension. -// class dShadowCircle_c : public m3d::mShadowCircle_c { public: dShadowCircle_c() {} virtual ~dShadowCircle_c() {} + + bool drawMdl( + m3d::smdl_c &mdl, const mSphere_c &sph, ActorLighting &actorLighting, u32 priority, s32 alpha, dAcObjBase_c *, + f32 height + ); + bool drawTexObj( + const GXTexObj *pTex, const mMtx_c &mtx, const mSphere_c &sph, ActorLighting &actorLighting, u32 priority, + s32 alpha, s32 red, s32 green, s32 blue, dAcObjBase_c *, f32 height + ); }; #endif diff --git a/include/m/m3d/m_shadow.h b/include/m/m3d/m_shadow.h index c49c4740..4fb3c2de 100644 --- a/include/m/m3d/m_shadow.h +++ b/include/m/m3d/m_shadow.h @@ -165,7 +165,7 @@ public: create(int count, u8 unk1, int unk2, u16 texBufferSize, u32 drawOpaPriority, nw4r::g3d::ResMdl mdl, u32 heapSize); void reset(); - bool addCircle(mShadowCircle_c *circle, u32 priority, u32 unk); + bool addCircle(mShadowCircle_c *circle, u32 priority, bool unk); void removeCircle(mShadowCircle_c *circle); void drawAllShadows(); diff --git a/include/toBeSorted/d_d3d.h b/include/toBeSorted/d_d3d.h index 212fd381..d834c093 100644 --- a/include/toBeSorted/d_d3d.h +++ b/include/toBeSorted/d_d3d.h @@ -3,11 +3,13 @@ #include "common.h" #include "d/a/d_a_base.h" +#include "d/d_light_env.h" #include "egg/egg_types.h" #include "m/m3d/m_anmmdl.h" #include "m/m3d/m_fanm.h" #include "m/m3d/m_mdl.h" #include "m/m3d/m_proc.h" +#include "m/m3d/m_smdl.h" #include "m/m_color.h" #include "m/m_mtx.h" #include "m/m_vec.h" @@ -29,6 +31,8 @@ void fn_80016860(); void clearList(); void fn_80017500(); +void setLight(m3d::smdl_c *pMdl, int lightSetIdx, ActorLighting *pLighting); + class AnmMdlWrapper : public m3d::mdlAnmChr { public: AnmMdlWrapper(); @@ -207,7 +211,7 @@ public: doDraw(); } - void fn_800192F0(u8, const mMtx_c&, u8); + void fn_800192F0(u8, const mMtx_c &, u8); private: void doRemove(); diff --git a/include/toBeSorted/time_area_mgr.h b/include/toBeSorted/time_area_mgr.h index 501793b9..0dd78a20 100644 --- a/include/toBeSorted/time_area_mgr.h +++ b/include/toBeSorted/time_area_mgr.h @@ -73,6 +73,7 @@ public: f32 fn_800B9CE0(const mVec3_c &position); static bool fn_800BBD40(); + static bool fn_800BBE00(); bool isInLanayruMiningFacility() const { return mIsInLanayruMiningFacility; |
