From 854fb607b9c416d15589b03e858d5f9708bf1d6e Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sun, 30 Jul 2023 18:57:56 -0700 Subject: d_a_obj_swpropeller OK, work on d_kankyo / misc --- include/JSystem/J3DGraphBase/J3DMatBlock.h | 4 +- include/JSystem/J3DGraphBase/J3DStruct.h | 2 + include/SSystem/SComponent/c_cc_d.h | 36 ++++++++++++++--- include/SSystem/SComponent/c_counter.h | 2 +- include/d/com/d_com_inf_game.h | 6 +++ include/d/d_attention.h | 7 +++- include/d/d_stage.h | 4 +- include/d/kankyo/d_kankyo.h | 19 ++++----- include/d/kankyo/d_kankyo_wether.h | 1 - include/m_Do/m_Do_audio.h | 4 ++ .../obj/d_a_obj_swpropeller/d_a_obj_swpropeller.h | 45 +++++++++++++++++++++- 11 files changed, 107 insertions(+), 23 deletions(-) (limited to 'include') diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 377746bb9d..a976be81c9 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -10,13 +10,13 @@ #include "m_Do/m_Do_lib.h" struct J3DGXColorS10 { - /* 8000E460 */ J3DGXColorS10(); + /* 8000E460 */ J3DGXColorS10() {} _GXColorS10 mColor; }; struct J3DGXColor : public _GXColor { - /* 8000E538 */ J3DGXColor(); + /* 8000E538 */ J3DGXColor() {} }; struct J3DNBTScaleInfo { diff --git a/include/JSystem/J3DGraphBase/J3DStruct.h b/include/JSystem/J3DGraphBase/J3DStruct.h index cb98164d03..5fa9a87af1 100644 --- a/include/JSystem/J3DGraphBase/J3DStruct.h +++ b/include/JSystem/J3DGraphBase/J3DStruct.h @@ -23,6 +23,8 @@ class J3DLightObj { public: /* 80018C0C */ J3DLightObj() : mInfo(j3dDefaultLightInfo) {} + J3DLightInfo& getLightInfo() { return mInfo; } + /* 0x00 */ J3DLightInfo mInfo; /* 0x34 */ u8 field_0x34[64]; }; // Size = 0x74 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; }; diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index c57fe0a3b6..23ff32697d 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -1789,6 +1789,12 @@ inline u8 dComIfGp_att_getCatchChgItem() { return dComIfGp_getAttention().getCatchChgItem(); } +inline void dComIfGp_att_LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist, + f32 i_downDist, s16 i_angle, int param_5) { + dComIfGp_getAttention().LookRequest(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle, + param_5); +} + inline J2DGrafContext* dComIfGp_getCurrentGrafPort() { return g_dComIfG_gameInfo.play.getCurrentGrafPort(); } diff --git a/include/d/d_attention.h b/include/d/d_attention.h index 0fec633004..234053d963 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -215,10 +215,15 @@ public: int GetActionCount() { return mActionCount; } int GetLockonCount() { return mLockonCount; } bool Lockon() { return LockonTruth() || chkFlag(0x20000000); } // only matches with -O2? - int ZHintRequest(fopAc_ac_c *param_1, int param_2) { + int ZHintRequest(fopAc_ac_c* param_1, int param_2) { return mZHintTarget.request(param_1, param_2); } + void LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist, + s16 i_angle, int param_5) { + mLookTarget.request(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle, param_5); + } + static dist_entry& i_getDistTable(int i_no) { return dist_table[i_no]; } static type_tbl_entry loc_type_tbl[3]; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 491a769ec5..ecd86856dc 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -782,7 +782,7 @@ public: /* 80024954 */ static bool resetArchiveBank(int); /* 80024DB0 */ static void SetTimePass(int); /* 8025BAAC */ static void setZoneNo(int, int); - static s32 GetTimePass(); + static s8 GetTimePass(); static s8 getStayNo() { return mStayNo; } static u8 getRegionNo(int i_roomNo) { return mStatus[i_roomNo].mRegionNo; } @@ -1031,7 +1031,7 @@ inline s32 i_dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) { } inline s8 dStage_stagInfo_GetTimeH(stage_stag_info_class* p_info) { - return p_info->field_0x0c >> 8; + return (p_info->field_0x0c >> 8) & 0xFF; } inline BOOL dStage_staginfo_GetArchiveHeap(stage_stag_info_class* p_info) { diff --git a/include/d/kankyo/d_kankyo.h b/include/d/kankyo/d_kankyo.h index 8a38033297..e9735f1ec3 100644 --- a/include/d/kankyo/d_kankyo.h +++ b/include/d/kankyo/d_kankyo.h @@ -12,6 +12,7 @@ class JPABaseEmitter; class cBgS_PolyInfo; +class color_RGB_class; void dKankyo_DayProc(); void dKy_set_nexttime(f32); @@ -44,6 +45,11 @@ void dKy_setLight(); cXyz dKy_plight_near_pos(); void dKy_BossSpotLight_set(cXyz* param_0, f32 param_1, f32 param_2, f32 param_3, _GXColor* param_4, f32 param_5, u8 param_6, u8 param_7); +static void dKy_calc_color_set(_GXColorS10* param_0, color_RGB_class* param_1, + color_RGB_class* param_2, color_RGB_class* param_3, + color_RGB_class* param_4, f32 param_5, f32 param_6, + _GXColorS10 param_7, f32 param_8); +static void dKy_twilight_camelight_set(); struct LIGHT_INFLUENCE { /* 800CFC7C */ ~LIGHT_INFLUENCE() {} @@ -203,7 +209,7 @@ public: /* 0x367 */ u8 field_0x367; /* 0x368 */ f32 mFogStartZ; /* 0x36C */ f32 mFogEndZ; - /* 0x370 */ f32 field_0x370; + /* 0x370 */ f32 mColpatBlend; /* 0x374 */ f32 field_0x374; /* 0x378 */ u16 field_0x378; /* 0x37A */ u8 field_0x37a; @@ -379,9 +385,7 @@ public: /* 0x1058 */ dKankyo_evil_Packet* mpEvilPacket; /* 0x105C */ mDoExt_btkAnm* field_0x105c; /* 0x1060 */ fopAc_ac_c* field_0x1060; - /* 0x1064 */ f32 field_0x1064; - /* 0x1068 */ f32 field_0x1068; - /* 0x106C */ f32 field_0x106c; + /* 0x1064 */ Vec field_0x1064; /* 0x1070 */ cXyz mSunPos2; /* 0x107C */ cXyz mPLightNearPos; /* 0x1088 */ cXyz mSunPos; @@ -394,10 +398,7 @@ public: /* 0x10D8 */ GXColorS10 mUnderCloudShadowColor; /* 0x10E0 */ GXColorS10 mCloudOuterHazeColor; /* 0x10E8 */ GXColorS10 mCloudInnerHazeColor; - /* 0x10F0 */ s16 field_0x10f0; - /* 0x10F2 */ s16 field_0x10f2; - /* 0x10F4 */ s16 field_0x10f4; - /* 0x10F6 */ s16 field_0x10f6; + /* 0x10F0 */ GXColorS10 field_0x10f0; /* 0x10F8 */ s16 field_0x10f8; /* 0x10FA */ s16 field_0x10fa; /* 0x10FC */ s16 field_0x10fc; @@ -493,7 +494,7 @@ public: /* 0x12B8 */ u8 field_0x12b8[4]; /* 0x12BC */ u16 mFogAdjCenter; /* 0x12BE */ u16 mDate; - /* 0x12C0 */ u16 mActorLightEffect; + /* 0x12C0 */ s16 mActorLightEffect; /* 0x12C2 */ u8 mColPatPrev; /* 0x12C3 */ u8 mColPatCurr; /* 0x12C4 */ u8 mColpatPrevGather; diff --git a/include/d/kankyo/d_kankyo_wether.h b/include/d/kankyo/d_kankyo_wether.h index 2242f48386..46cb651a50 100644 --- a/include/d/kankyo/d_kankyo_wether.h +++ b/include/d/kankyo/d_kankyo_wether.h @@ -237,7 +237,6 @@ public: virtual void draw(); virtual ~dKankyo_vrkumo_Packet(); -private: /* 0x0010 */ GXColor mColor; /* 0x0014 */ u8* mpResCloudtx_01; /* 0x0018 */ u8* mpResCloudtx_02; diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index 5e8fd55189..2d05cdb5be 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -119,6 +119,10 @@ inline void mDoAud_mEnvse_framework() { g_mEnvSeMgr.framework(); } +inline void mDoAud_mEnvse_resetScene() { + g_mEnvSeMgr.resetScene(); +} + inline void mDoAud_mEnvSe_startFarThunderSe(const Vec* param_0) { g_mEnvSeMgr.startFarThunderSe((Vec*)param_0, 0); } diff --git a/include/rel/d/a/obj/d_a_obj_swpropeller/d_a_obj_swpropeller.h b/include/rel/d/a/obj/d_a_obj_swpropeller/d_a_obj_swpropeller.h index cc02f28f25..5336a6e098 100644 --- a/include/rel/d/a/obj/d_a_obj_swpropeller/d_a_obj_swpropeller.h +++ b/include/rel/d/a/obj/d_a_obj_swpropeller/d_a_obj_swpropeller.h @@ -1,6 +1,49 @@ #ifndef D_A_OBJ_SWPROPELLER_H #define D_A_OBJ_SWPROPELLER_H -#include "dolphin/types.h" +#include "d/cc/d_cc_d.h" +#include "f_op/f_op_actor_mng.h" + +class daObjSwPr_c : public fopAc_ac_c { +public: + /* 8059A5E8 */ void initBaseMtx(); + /* 8059A624 */ void setBaseMtx(); + /* 8059A670 */ int Create(); + /* 8059A808 */ int CreateHeap(); + /* 8059A888 */ int create(); + /* 8059AB04 */ int setRotateTime(); + /* 8059AB14 */ void switchCtrl(); + /* 8059AB9C */ void execute_type_boomerang(); + /* 8059ADCC */ void execute_type_wind(); + /* 8059B014 */ int execute(); + /* 8059B148 */ int draw(); + /* 8059B1AC */ int _delete(); + + u8 getNameArg() { return fopAcM_GetParamBit(this, 8, 8); } + u8 getMdlType() { return fopAcM_GetParamBit(this, 0x10, 4); } + int getSwbit() { return fopAcM_GetParamBit(this, 0, 8); } + u32 getSwbit2() { return fopAcM_GetParamBit(this, 0x18, 8); } + + /* 0x568 */ request_of_phase_process_class mPhase; + /* 0x570 */ J3DModel* mpModel; + /* 0x574 */ dCcD_Stts mCcStts; + /* 0x5B0 */ dCcD_Cyl mCyl1; + /* 0x6EC */ dCcD_Cyl mCyl2; + /* 0x828 */ s16 mRotateSpeed; + /* 0x82A */ s16 mRotateInitSpeed; + /* 0x82C */ s16 field_0x82c; // rotate angle? + /* 0x82E */ s16 mRotateTime; + /* 0x830 */ u16 mKaitenJntID; + /* 0x832 */ s16 mSwDelayTimer; + /* 0x834 */ u16 field_0x834; + /* 0x836 */ u16 mSwOffDelayTimer; + /* 0x838 */ u8 field_0x838; + /* 0x839 */ u8 field_0x839; + /* 0x83A */ u8 field_0x83a; + /* 0x83B */ u8 field_0x83b; + /* 0x83C */ u8 mNameArg; + /* 0x83D */ u8 field_0x83d; + /* 0x83E */ u8 mModelType; +}; #endif /* D_A_OBJ_SWPROPELLER_H */ -- cgit v1.2.3 From 9773c9dbf11bf68b24d66b7718af02d131ad300a Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Tue, 1 Aug 2023 00:11:24 -0700 Subject: some more kankyo work --- include/JSystem/J3DGraphBase/J3DMatBlock.h | 27 ++++++++++++++++++------- include/d/com/d_com_inf_game.h | 2 +- include/d/kankyo/d_kankyo.h | 22 +++++++------------- include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h | 18 ++++++++++++++++- 4 files changed, 45 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index a976be81c9..65c064050f 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -9,13 +9,11 @@ #include "dolphin/types.h" #include "m_Do/m_Do_lib.h" -struct J3DGXColorS10 { +struct J3DGXColorS10 : public GXColorS10 { /* 8000E460 */ J3DGXColorS10() {} - - _GXColorS10 mColor; }; -struct J3DGXColor : public _GXColor { +struct J3DGXColor : public GXColor { /* 8000E538 */ J3DGXColor() {} }; @@ -542,10 +540,25 @@ private: extern const u16 j3dDefaultZModeID; +inline u16 calcZModeID(u8 param_0, u8 param_1, u8 param_2) { + return param_0 * 0x10 + param_2 + param_1 * 2; +} + +struct J3DZModeInfo { + /* 0x0 */ u8 field_0x0; + /* 0x1 */ u8 field_0x1; + /* 0x2 */ u8 field_0x2; +}; + struct J3DZMode { J3DZMode() { mZModeID = j3dDefaultZModeID; } + + void setZModeInfo(const J3DZModeInfo& info) { + mZModeID = calcZModeID(info.field_0x0, info.field_0x1, info.field_0x2); + } + /* 0x0 */ u16 mZModeID; }; @@ -646,7 +659,7 @@ public: /* 8000DF4C */ virtual bool getBlend(); /* 80317374 */ virtual void setZMode(J3DZMode const*); /* 8000E014 */ virtual void setZMode(J3DZMode); - /* 8000DF44 */ virtual bool getZMode(); + /* 8000DF44 */ virtual J3DZMode* getZMode(); /* 80317378 */ virtual void setZCompLoc(u8 const*); /* 8000E010 */ virtual void setZCompLoc(u8); /* 8000DF3C */ virtual bool getZCompLoc() const; @@ -708,7 +721,7 @@ public: /* 80321A00 */ virtual bool getBlend(); /* 80321A14 */ virtual void setZMode(J3DZMode const*); /* 80321A08 */ virtual void setZMode(J3DZMode); - /* 80321A20 */ virtual bool getZMode(); + /* 80321A20 */ virtual J3DZMode* getZMode(); /* 80321A30 */ virtual void setZCompLoc(u8 const*); /* 80321A28 */ virtual void setZCompLoc(u8); /* 80321A3C */ virtual bool getZCompLoc() const; @@ -750,7 +763,7 @@ public: /* 80321B64 */ virtual bool getBlend(); /* 80321B78 */ virtual void setZMode(J3DZMode const*); /* 80321B6C */ virtual void setZMode(J3DZMode); - /* 80321B84 */ virtual bool getZMode(); + /* 80321B84 */ virtual J3DZMode* getZMode(); /* 80321B94 */ virtual void setZCompLoc(u8 const*); /* 80321B8C */ virtual void setZCompLoc(u8); /* 80321BA0 */ virtual bool getZCompLoc() const; diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index 23ff32697d..78d2775b0f 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -3392,7 +3392,7 @@ inline void dComIfGd_setListDark() { g_dComIfG_gameInfo.drawlist.setXluListDark(); } -inline void dComIfGd_setListInvisible() { +inline void dComIfGd_setListInvisisble() { g_dComIfG_gameInfo.drawlist.setOpaListInvisible(); g_dComIfG_gameInfo.drawlist.setXluListInvisible(); } diff --git a/include/d/kankyo/d_kankyo.h b/include/d/kankyo/d_kankyo.h index e9735f1ec3..ab6d295cd3 100644 --- a/include/d/kankyo/d_kankyo.h +++ b/include/d/kankyo/d_kankyo.h @@ -235,6 +235,7 @@ class stage_pselect_info_class; class stage_envr_info_class; class stage_vrbox_info_class; class stage_plight_info_class; +class kytag08_class; struct dKy_pol_arg_struct { u8 data[8]; @@ -384,7 +385,7 @@ public: /* 0x1054 */ int field_0x1054; /* 0x1058 */ dKankyo_evil_Packet* mpEvilPacket; /* 0x105C */ mDoExt_btkAnm* field_0x105c; - /* 0x1060 */ fopAc_ac_c* field_0x1060; + /* 0x1060 */ kytag08_class* field_0x1060; /* 0x1064 */ Vec field_0x1064; /* 0x1070 */ cXyz mSunPos2; /* 0x107C */ cXyz mPLightNearPos; @@ -403,20 +404,11 @@ public: /* 0x10FA */ s16 field_0x10fa; /* 0x10FC */ s16 field_0x10fc; /* 0x10FE */ s16 field_0x10fe; - /* 0x1100 */ _GXColorS10 mActorAmbience; - /* 0x1108 */ _GXColorS10 mTerrainAmbienceBG0; - /* 0x1110 */ s16 mTerrainAmbienceBG1_R; - /* 0x1112 */ s16 mTerrainAmbienceBG1_G; - /* 0x1114 */ s16 mTerrainAmbienceBG1_B; - /* 0x1116 */ s16 mWaterSurfaceAlphaA; - /* 0x1118 */ s16 mTerrainAmbienceBG2_R; - /* 0x111A */ s16 mTerrainAmbienceBG2_G; - /* 0x111C */ s16 mTerrainAmbienceBG2_B; - /* 0x111E */ s16 mAuxAlphaA2; - /* 0x1120 */ s16 mTerrainAmbienceBG3_R; - /* 0x1122 */ s16 mTerrainAmbienceBG3_G; - /* 0x1124 */ s16 mTerrainAmbienceBG3_B; - /* 0x1126 */ s16 mFakeFogA; + /* 0x1100 */ GXColorS10 mActorAmbience; + /* 0x1108 */ GXColorS10 mTerrainAmbienceBG0; + /* 0x1110 */ GXColorS10 mTerrainAmbienceBG1; + /* 0x1118 */ GXColorS10 mTerrainAmbienceBG2; + /* 0x1120 */ GXColorS10 mTerrainAmbienceBG3; /* 0x1128 */ GXColorS10 field_0x1128; /* 0x1130 */ u8 field_0x1130[0x28]; /* 0x1158 */ GXColorS10 mFogColor; diff --git a/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h b/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h index c2f14b187e..47195eacb6 100644 --- a/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h +++ b/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h @@ -1,6 +1,22 @@ #ifndef D_A_KYTAG08_H #define D_A_KYTAG08_H -#include "dolphin/types.h" +#include "f_op/f_op_actor_mng.h" + +class kytag08_class : public fopAc_ac_c { +public: + /* 0x568 */ J3DModel* mpModel; + /* 0x56C */ mDoExt_btkAnm field_0x56c; + /* 0x584 */ mDoExt_brkAnm field_0x584; + /* 0x59C */ JPABaseEmitter* field_0x59c; + /* 0x5A0 */ JPABaseEmitter* field_0x5a0; + /* 0x5A4 */ request_of_phase_process_class mPhase; + /* 0x5AC */ cXyz field_0x5ac; + /* 0x5B8 */ cXyz field_0x5b8; + /* 0x5C4 */ cXyz field_0x5c4; + /* 0x5D0 */ f32 field_0x5d0; + /* 0x5D4 */ int field_0x5d4; + /* 0x5D8 */ u8 field_0x5d8; +}; #endif /* D_A_KYTAG08_H */ -- cgit v1.2.3 From 623622b9b6aba64d43831ffa32291599b7dcf820 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Wed, 2 Aug 2023 01:29:00 -0700 Subject: more kankyo work / d_a_kytag08 work --- include/JSystem/J3DGraphBase/J3DMatBlock.h | 6 +++++- include/d/a/d_a_player.h | 1 + include/d/d_stage.h | 5 ++++- include/d/kankyo/d_kankyo.h | 4 ++++ include/d/kankyo/d_kankyo_wether.h | 1 + include/m_Do/m_Do_audio.h | 8 ++++++++ include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h | 8 ++++---- include/rel/d/a/tag/d_a_tag_lightball/d_a_tag_lightball.h | 6 +----- 8 files changed, 28 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 65c064050f..d86ade35cc 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -541,7 +541,7 @@ private: extern const u16 j3dDefaultZModeID; inline u16 calcZModeID(u8 param_0, u8 param_1, u8 param_2) { - return param_0 * 0x10 + param_2 + param_1 * 2; + return ((param_1 * 2) & 0x1FE) + (param_0 * 0x10) + param_2; } struct J3DZModeInfo { @@ -631,6 +631,10 @@ struct J3DAlphaComp { mRef1 = param_1.field_0x4; u32 p1_mref1 = param_1.mRef1; field_0x0 = calcAlphaCmpID(param_1.field_0x0, param_1.mRef0, p1_mref1); + + // this matches for `dKy_bg_MAxx_proc` but causes `addWarpMaterial` to fail, + // while the above matches for `addWarpMaterial` but causes `dKy_bg_MAxx_proc` to fail? + // field_0x0 = calcAlphaCmpID(param_1.field_0x0, param_1.mRef0, param_1.mRef1); } /* 0x00 */ u16 field_0x0; diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h index 33d9d27b72..b26f8172f6 100644 --- a/include/d/a/d_a_player.h +++ b/include/d/a/d_a_player.h @@ -712,6 +712,7 @@ public: void onForceAutoJump() { i_onEndResetFlg0(ERFLG0_FORCE_AUTO_JUMP); } void onNotAutoJump() { i_onEndResetFlg0(ERFLG0_NOT_AUTO_JUMP); } void onNotHang() { i_onEndResetFlg0(ERFLG0_NOT_HANG); } + void onFogFade() { i_onNoResetFlg2(FLG2_UNK_4000); } void offGoronSideMove() { if (i_checkGoronSideMove()) { diff --git a/include/d/d_stage.h b/include/d/d_stage.h index ecd86856dc..849ba352be 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -88,7 +88,10 @@ struct stage_scls_info_dummy_class { struct stage_pure_lightvec_info_class { // LGT -}; + /* 0x00 */ u8 field_0x0[0x1E - 0x0]; + /* 0x1E */ u8 field_0x1e; + /* 0x1F */ u8 field_0x1f; +}; // Size: 0x20 // Col struct stage_pselect_info_class { diff --git a/include/d/kankyo/d_kankyo.h b/include/d/kankyo/d_kankyo.h index ab6d295cd3..b124930d04 100644 --- a/include/d/kankyo/d_kankyo.h +++ b/include/d/kankyo/d_kankyo.h @@ -50,6 +50,9 @@ static void dKy_calc_color_set(_GXColorS10* param_0, color_RGB_class* param_1, color_RGB_class* param_4, f32 param_5, f32 param_6, _GXColorS10 param_7, f32 param_8); static void dKy_twilight_camelight_set(); +u8 dKy_shadow_mode_check(u8 mode); +void dKy_shadow_mode_set(u8 mode); +void dKy_shadow_mode_reset(u8 mode); struct LIGHT_INFLUENCE { /* 800CFC7C */ ~LIGHT_INFLUENCE() {} @@ -101,6 +104,7 @@ struct SND_INFLUENCE { struct DALKMIST_INFLUENCE { /* 0x00 */ cXyz mPos; /* 0x0C */ f32 field_0xc; + /* 0x10 */ s8 mIndex; }; struct DUNGEON_LIGHT { diff --git a/include/d/kankyo/d_kankyo_wether.h b/include/d/kankyo/d_kankyo_wether.h index 46cb651a50..901df927a7 100644 --- a/include/d/kankyo/d_kankyo_wether.h +++ b/include/d/kankyo/d_kankyo_wether.h @@ -27,6 +27,7 @@ cXyz dKyw_get_wind_vecpow(); void dKyw_evt_wind_set(s16 angleX, s16 angleY); void dKyw_custom_windpower(f32 pow); void dKyw_evt_wind_set_go(); +void dKyw_wether_proc(); class dKankyo_sun_Packet : public J3DPacket { public: diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index 2d05cdb5be..60f0c30d52 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -115,6 +115,14 @@ inline void mDoAud_heartGaugeOn() { Z2AudioMgr::getInterface()->mStatusMgr.heartGaugeOn(); } +inline void mDoAud_setFogWipeWidth(f32 i_width) { + g_mEnvSeMgr.setFogWipeWidth(i_width); +} + +inline void mDoAud_startFogWipeTrigger(const Vec* param_0) { + g_mEnvSeMgr.startFogWipeTrigger((Vec*)param_0); +} + inline void mDoAud_mEnvse_framework() { g_mEnvSeMgr.framework(); } diff --git a/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h b/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h index 47195eacb6..3e2fd206e8 100644 --- a/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h +++ b/include/rel/d/a/kytag/d_a_kytag08/d_a_kytag08.h @@ -6,10 +6,10 @@ class kytag08_class : public fopAc_ac_c { public: /* 0x568 */ J3DModel* mpModel; - /* 0x56C */ mDoExt_btkAnm field_0x56c; - /* 0x584 */ mDoExt_brkAnm field_0x584; - /* 0x59C */ JPABaseEmitter* field_0x59c; - /* 0x5A0 */ JPABaseEmitter* field_0x5a0; + /* 0x56C */ mDoExt_btkAnm mBtk; + /* 0x584 */ mDoExt_brkAnm mBrk; + /* 0x59C */ JPABaseEmitter* mpEmitter1; + /* 0x5A0 */ JPABaseEmitter* mpEmitter2; /* 0x5A4 */ request_of_phase_process_class mPhase; /* 0x5AC */ cXyz field_0x5ac; /* 0x5B8 */ cXyz field_0x5b8; diff --git a/include/rel/d/a/tag/d_a_tag_lightball/d_a_tag_lightball.h b/include/rel/d/a/tag/d_a_tag_lightball/d_a_tag_lightball.h index dd13513eba..c98581d0df 100644 --- a/include/rel/d/a/tag/d_a_tag_lightball/d_a_tag_lightball.h +++ b/include/rel/d/a/tag/d_a_tag_lightball/d_a_tag_lightball.h @@ -2,7 +2,6 @@ #define D_A_TAG_LIGHTBALL_H #include "d/kankyo/d_kankyo.h" -#include "dolphin/types.h" #include "f_op/f_op_actor_mng.h" class daTagLightBall_c : public fopAc_ac_c { @@ -19,11 +18,8 @@ public: u32 getType() { return fopAcM_GetParamBit(this, 8, 4); } /* 0x568 */ DALKMIST_INFLUENCE mInfluence; - /* 0x578 */ int field_0x578; /* 0x57C */ u8 field_0x57c; - /* 0x57D */ u8 field_0x57d; - /* 0x57E */ u8 field_0x57e; - /* 0x57F */ u8 field_0x57f; + /* 0x57D */ u8 mInfSet; }; #endif /* D_A_TAG_LIGHTBALL_H */ -- cgit v1.2.3