diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJoint.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DModel.h | 1 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTDbPrint.h | 2 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_cc_d.h | 2 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_burnbox.h | 2 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_carry.h | 361 | ||||
| -rw-r--r-- | include/d/d_bg_s_acch.h | 38 | ||||
| -rw-r--r-- | include/d/d_bg_s_roof_chk.h | 3 | ||||
| -rw-r--r-- | include/d/d_com_inf_game.h | 6 | ||||
| -rw-r--r-- | include/d/d_debug_viewer.h | 124 | ||||
| -rw-r--r-- | include/d/d_particle.h | 2 | ||||
| -rw-r--r-- | include/d/d_tresure.h | 8 | ||||
| -rw-r--r-- | include/f_op/f_op_actor_mng.h | 8 | ||||
| -rw-r--r-- | include/m_Do/m_Do_ext.h | 186 |
14 files changed, 569 insertions, 175 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index ff9d189779..cd759add7f 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -66,6 +66,7 @@ public: J3DJoint* getChild() { return mChild; } u8 getMtxType() { return (mKind & 0xf0) >> 4; } void setMtxType(u8 type) { mKind = (mKind & ~0xf0) | (type << 4); } + f32 getRadius() const { return mBoundingSphereRadius; } static J3DMtxCalc* mCurrentMtxCalc; diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h index 82b2a13da6..5bbd7dc352 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -6,6 +6,7 @@ #include "dolphin/types.h" enum J3DMdlFlag { + J3DMdlFlag_None = 0x0, /* 0x00001 */ J3DMdlFlag_Unk00001 = 0x1, /* 0x00002 */ J3DMdlFlag_Unk00002 = 0x2, /* 0x00004 */ J3DMdlFlag_SkinPosCpu = 0x4, diff --git a/include/JSystem/JUtility/JUTDbPrint.h b/include/JSystem/JUtility/JUTDbPrint.h index 0620200815..af8e4e1769 100644 --- a/include/JSystem/JUtility/JUTDbPrint.h +++ b/include/JSystem/JUtility/JUTDbPrint.h @@ -38,6 +38,8 @@ public: void setVisible(bool visible) { mVisible = visible; } JUTFont* getFont() const { return mFont; } + void setCharColor(JUtility::TColor color) { mColor = color; }; + static JUTDbPrint* sDebugPrint; private: diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index cca6baea43..7a233a5965 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -539,6 +539,8 @@ public: cCcD_Obj* GetTgHitObj() { return mObjTg.GetHitObj(); } cCcD_Obj* GetCoHitObj() { return mObjCo.GetHitObj(); } u32 ChkAtSPrm(u32 prm) { return mObjAt.ChkSPrm(prm); } + u32 ChkCoSPrm(u32 prm) const { return mObjCo.ChkSPrm(prm); } + void OnTgNoSlingHitInfSet() { mObjTg.OnSPrmBit(0x40); } }; // Size = 0x40 diff --git a/include/d/actor/d_a_obj_burnbox.h b/include/d/actor/d_a_obj_burnbox.h index 381a834497..a73de48b3c 100644 --- a/include/d/actor/d_a_obj_burnbox.h +++ b/include/d/actor/d_a_obj_burnbox.h @@ -22,7 +22,7 @@ public: /* 8046EABC */ void Draw(); /* 8046EC10 */ void Delete(); - static void make_prm_burnbox(u32* param_0, u8 param_1) { + static void make_prm_burnBox(u32* param_0, u8 param_1) { *param_0 = param_1; } diff --git a/include/d/actor/d_a_obj_carry.h b/include/d/actor/d_a_obj_carry.h index 40a7f828be..473daee0f9 100644 --- a/include/d/actor/d_a_obj_carry.h +++ b/include/d/actor/d_a_obj_carry.h @@ -1,36 +1,103 @@ #ifndef D_A_OBJ_CARRY_H #define D_A_OBJ_CARRY_H -#include "d/d_jnt_col.h" #include "f_op/f_op_actor_mng.h" -#include "d/d_com_inf_game.h" +#include "d/actor/d_a_player.h" +#include "d/d_bg_s_acch.h" +#include "d/d_cc_d.h" +#include "d/d_jnt_col.h" + +struct daObjCarry_dt_t { + /* 0x00 */ f32 m_throwInitSpeedY; + /* 0x04 */ f32 m_throwInitSpeedXZ; + /* 0x08 */ f32 m_wolfThrowInitSpeedY; + /* 0x0C */ f32 m_wolfThrowInitSpeedXZ; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 m_gravity; + /* 0x1C */ f32 m_Buoyancy; + /* 0x20 */ f32 m_urnWindEffRatio; + /* 0x24 */ f32 field_0x24; + /* 0x28 */ f32 field_0x28; + /* 0x2C */ f32 field_0x2c; + /* 0x30 */ f32 scale; + /* 0x34 */ u8 m_carry_attn_dist; + /* 0x35 */ u8 m_flags; + /* 0x36 */ u8 m_colliderWeight; + /* 0x37 */ u8 m_cyl_atp; + /* 0x38 */ f32 m_cullsph_min_x; + /* 0x3C */ f32 m_cullsph_min_y; + /* 0x40 */ f32 m_cullsph_min_z; + /* 0x44 */ f32 field_0x44; + /* 0x48 */ f32 field_0x48; + /* 0x4C */ f32 m_height; + /* 0x50 */ f32 m_radius; + /* 0x54 */ f32 field_0x54; + /* 0x58 */ f32 field_0x58; + /* 0x5C */ u32 m_breakSound; + /* 0x60 */ u32 m_putSound; + /* 0x64 */ u32 m_putWaterSound; + /* 0x68 */ u32 m_fallSound; + /* 0x6C */ u32 m_fallWaterSound; + /* 0x70 */ u32 field_0x70; + /* 0x74 */ f32 field_0x74; + /* 0x78 */ s16 m_rollAngle; + /* 0x7A */ s16 m_urnRotateFactor; + /* 0x7C */ s16 field_0x7c; + /* 0x80 */ f32 m_slopeInfluence; + /* 0x84 */ f32 m_friction; + /* 0x88 */ f32 field_0x88; + /* 0x8C */ f32 field_0x8c; + /* 0x90 */ u32 m_heapSize; +}; /** * @ingroup actors-objects * @class daObjCarry_c * @brief Carryable Object - * - * @details This is a multi-use class for carryable objects. - * It's used by: small and large blue pot, small and large red pot, box, cannon ball, barrel, skull, deku nut, Sols, small and large Twilight pots. - * + * + * @details This is a multi-use class for carryable objects. + * It's used by: small and large blue pot, small and large red pot, box, cannon ball, barrel, skull, + * deku nut, Sols, small and large Twilight pots. + * */ class daObjCarry_c : public fopAc_ac_c { public: enum { - /* 0x0 */ TYPE_TSUBO, /**< Small Blue Pot */ - /* 0x1 */ TYPE_OOTSUBO, /**< Big Red Pot */ - /* 0x2 */ TYPE_KIBAKO, /**< Box */ - /* 0x3 */ TYPE_IRON_BALL, /**< Cannon Ball */ - /* 0x4 */ TYPE_TARU, /**< Barrel */ - /* 0x5 */ TYPE_DOKURO, /**< Skull */ - /* 0x6 */ TYPE_BOKKURI, /**< Deku Nut */ - /* 0x7 */ TYPE_TSUBO_2, /**< Small Red Pot */ - /* 0x8 */ TYPE_BALL_S, /**< Light Ball A */ - /* 0x9 */ TYPE_BALL_S_2, /**< Light Ball B */ - /* 0xA */ TYPE_AOTSUBO, /**< Big Blue Pot */ - /* 0xB */ TYPE_LV8_BALL, /**< Light Ball? Probably unused */ - /* 0xC */ TYPE_TSUBO_S, /**< Small pot - Twilight */ - /* 0xD */ TYPE_TSUBO_B, /**< Big pot - Twilight */ + /* 0x0 */ TYPE_TSUBO, /**< Small Blue Pot */ + /* 0x1 */ TYPE_OOTSUBO, /**< Big Red Pot */ + /* 0x2 */ TYPE_KIBAKO, /**< Box */ + /* 0x3 */ TYPE_IRON_BALL, /**< Cannon Ball */ + /* 0x4 */ TYPE_TARU, /**< Barrel */ + /* 0x5 */ TYPE_DOKURO, /**< Skull */ + /* 0x6 */ TYPE_BOKKURI, /**< Deku Nut */ + /* 0x7 */ TYPE_TSUBO_2, /**< Small Red Pot */ + /* 0x8 */ TYPE_BALL_S, /**< Light Ball A */ + /* 0x9 */ TYPE_BALL_S_2, /**< Light Ball B */ + /* 0xA */ TYPE_AOTSUBO, /**< Big Blue Pot */ + /* 0xB */ TYPE_LV8_BALL, /**< Light Ball? Probably unused */ + /* 0xC */ TYPE_TSUBO_S, /**< Small pot - Twilight */ + /* 0xD */ TYPE_TSUBO_B, /**< Big pot - Twilight */ + }; + + enum { + MODE_WAIT, + MODE_WALK, + MODE_CARRY, + MODE_DROP, + MODE_FLOAT, + MODE_SINK, + MODE_YOGAN, + MODE_MAGNE, + MODE_MAGNE_CARRY, + MODE_BOOM_CARRY, + MODE_GROWTH, + MODE_DB_DROP, + MODE_HOOK_CARRY, + MODE_END, + MODE_FIT, + MODE_CONTROLED, + MODE_RESET_LIGHTBALL, }; /* 80031CF8 */ static void clrSaveFlag(); @@ -43,101 +110,101 @@ public: /* 80031D8C */ static u8 chkSttsFlag(int, u8); /* 80031DAC */ static void setRoomNo(int, s8); /* 80031DB8 */ static s8 getRoomNo(int); - /* 8046F6A4 */ u8 data(); + /* 8046F6A4 */ const daObjCarry_dt_t& data(); /* 8046F6BC */ char* getArcName(); - /* 8046F6D4 */ int getBmdName(); - /* 8046F6EC */ void checkFlag(u8); + /* 8046F6D4 */ char* getBmdName(); + /* 8046F6EC */ BOOL checkFlag(u8); /* 8046F724 */ void initBaseMtx(); /* 8046F7AC */ void setBaseMtx(); - /* 8046FACC */ s32 preInit(); + /* 8046FACC */ int preInit(); /* 8046FB78 */ daObjCarry_c(); - /* 8046FFA4 */ s32 checkBreakWolfAttack(); - /* 8046FFF8 */ s32 checkCarryBoomerang(); - /* 80470054 */ s32 checkCarryHookshot(); - /* 80470080 */ s32 checkCarryWolf(); - /* 804700B4 */ s32 checkCarryOneHand(); - /* 804700F0 */ void Create(); - /* 804705DC */ s32 CreateInit_tsubo(); - /* 80470650 */ s32 CreateInit_ootubo(); - /* 80470674 */ s32 CreateInit_kibako(); - /* 804706D4 */ s32 CreateInit_ironball(); - /* 804707E0 */ s32 CreateInit_taru(); - /* 80470840 */ bool CreateInit_dokuro(); - /* 80470890 */ s32 CreateInit_bokkuri(); - /* 804709DC */ s32 CreateInit_LightBall(); - /* 80470AB4 */ s32 CreateInit_Lv8Ball(); - /* 80470B5C */ s32 CreateHeap(); - /* 80470BF4 */ cPhs__Step create(); - /* 80470CF0 */ s32 checkCreate_LightBallA(); - /* 8047114C */ s32 checkCreate_LightBallB(); - /* 804715A8 */ s32 checkCreate_Lv8Ball(); + /* 8046FFA4 */ BOOL checkBreakWolfAttack(); + /* 8046FFF8 */ BOOL checkCarryBoomerang(); + /* 80470054 */ BOOL checkCarryHookshot(); + /* 80470080 */ BOOL checkCarryWolf(); + /* 804700B4 */ BOOL checkCarryOneHand(); + /* 804700F0 */ int Create(); + /* 804705DC */ int CreateInit_tsubo(); + /* 80470650 */ int CreateInit_ootubo(); + /* 80470674 */ int CreateInit_kibako(); + /* 804706D4 */ int CreateInit_ironball(); + /* 804707E0 */ int CreateInit_taru(); + /* 80470840 */ int CreateInit_dokuro(); + /* 80470890 */ int CreateInit_bokkuri(); + /* 804709DC */ int CreateInit_LightBall(); + /* 80470AB4 */ int CreateInit_Lv8Ball(); + /* 80470B5C */ int CreateHeap(); + /* 80470BF4 */ int create(); + /* 80470CF0 */ int checkCreate_LightBallA(); + /* 8047114C */ int checkCreate_LightBallB(); + /* 804715A8 */ int checkCreate_Lv8Ball(); /* 80471680 */ void resetIconPosForLightBallA(); /* 804716D4 */ void setIconPosForLightBallAAtR00(); /* 804717B4 */ void setIconPosForLightBallBAtR00(); /* 80471894 */ void resetIconPosForLightBallB(); - /* 804718E8 */ void execute(); - /* 8047233C */ void checkCulling(); - /* 80472460 */ void draw(); + /* 804718E8 */ int execute(); + /* 8047233C */ BOOL checkCulling(); + /* 80472460 */ int draw(); /* 80472730 */ void debugDraw(); - /* 80472734 */ void _delete(); + /* 80472734 */ int _delete(); /* 80472B54 */ void crr_pos(); - /* 80472D8C */ void check_sink(f32*); - /* 80472E5C */ void calc_gravity(); - /* 80472EF0 */ void checkRollAngle(); + /* 80472D8C */ int check_sink(f32*); + /* 80472E5C */ f32 calc_gravity(); + /* 80472EF0 */ BOOL checkRollAngle(); /* 80473050 */ void mode_proc_call(); /* 804733E8 */ void mode_init_wait(); - /* 804734B0 */ void mode_proc_wait(); + /* 804734B0 */ int mode_proc_wait(); /* 80473718 */ void mode_init_walk(u8); - /* 804737CC */ void mode_proc_walk(); + /* 804737CC */ int mode_proc_walk(); /* 80473ED8 */ void mode_init_carry(); - /* 804741A8 */ void mode_proc_carry(); + /* 804741A8 */ int mode_proc_carry(); /* 80474448 */ void mode_init_drop(u8); - /* 80474540 */ void mode_proc_drop(); + /* 80474540 */ int mode_proc_drop(); /* 80474618 */ void mode_init_float(); - /* 80474734 */ void mode_proc_float(); + /* 80474734 */ int mode_proc_float(); /* 80474A08 */ void mode_init_sink(); - /* 80474B8C */ void mode_proc_sink(); + /* 80474B8C */ int mode_proc_sink(); /* 80474D64 */ void mode_init_yogan(); - /* 80474E08 */ void mode_proc_yogan(); - /* 80474E98 */ bool mode_proc_magne(); - /* 80474EA0 */ bool mode_proc_magneCarry(); + /* 80474E08 */ int mode_proc_yogan(); + /* 80474E98 */ int mode_proc_magne(); + /* 80474EA0 */ int mode_proc_magneCarry(); /* 80474EA8 */ void mode_init_boomCarry(); - /* 80474FA8 */ void mode_proc_boomCarry(); + /* 80474FA8 */ int mode_proc_boomCarry(); /* 80475014 */ void mode_init_growth(); - /* 804750C8 */ void mode_proc_growth(); - /* 8047515C */ bool mode_proc_end(); + /* 804750C8 */ int mode_proc_growth(); + /* 8047515C */ int mode_proc_end(); /* 80475164 */ void mode_init_dbDrop(u8); - /* 80475210 */ void mode_proc_dbDrop(); + /* 80475210 */ int mode_proc_dbDrop(); /* 80475238 */ void mode_init_hookCarry(); - /* 80475354 */ void mode_proc_hookCarry(); + /* 80475354 */ int mode_proc_hookCarry(); /* 80475384 */ void mode_init_fit(); - /* 80475450 */ void mode_proc_fit(); - /* 80475478 */ void mode_proc_controled(); + /* 80475450 */ int mode_proc_fit(); + /* 80475478 */ int mode_proc_controled(); /* 804754D0 */ void mode_init_resetLightBall(); - /* 80475598 */ void mode_proc_resetLightBall(); - /* 80475618 */ void chkSinkAll(); - /* 8047567C */ void chkWaterLineIn(); - /* 804756D4 */ void chkSinkObj(); + /* 80475598 */ int mode_proc_resetLightBall(); + /* 80475618 */ BOOL chkSinkAll(); + /* 8047567C */ BOOL chkWaterLineIn(); + /* 804756D4 */ BOOL chkSinkObj(); /* 8047573C */ void bg_check(); - /* 80476618 */ void check_bg_damage_proc_base(); - /* 80476764 */ void bg_damage_proc_kotubo(); - /* 804767C4 */ void bg_damage_proc_ootubo(); - /* 804767E4 */ void bg_damage_proc_kibako(); + /* 80476618 */ bool check_bg_damage_proc_base(); + /* 80476764 */ bool bg_damage_proc_kotubo(); + /* 804767C4 */ bool bg_damage_proc_ootubo(); + /* 804767E4 */ bool bg_damage_proc_kibako(); /* 80476804 */ bool bg_damage_proc_ironball(); - /* 8047680C */ void bg_damage_proc_taru(); - /* 8047682C */ void bg_damage_proc_dokuro(); - /* 8047684C */ void bg_damage_proc_bokkuri(); + /* 8047680C */ bool bg_damage_proc_taru(); + /* 8047682C */ bool bg_damage_proc_dokuro(); + /* 8047684C */ bool bg_damage_proc_bokkuri(); /* 80476930 */ bool bg_damage_proc_LightBall(); /* 80476938 */ bool bg_damage_proc_Lv8Ball(); /* 80476940 */ void obj_break(bool, bool, bool); - /* 80476A5C */ void check_cc_damage_proc_base(bool); - /* 80476B04 */ void cc_damage_proc_kotubo(); - /* 80476B68 */ void cc_damage_proc_ootubo(); - /* 80476B88 */ void cc_damage_proc_kibako(); - /* 80476CE4 */ void cc_damage_proc_ironball(); - /* 80476E04 */ void cc_damage_proc_taru(); - /* 80476F88 */ void cc_damage_proc_dokuro(); - /* 80476FA8 */ void cc_damage_proc_bokkuri(); + /* 80476A5C */ bool check_cc_damage_proc_base(bool); + /* 80476B04 */ bool cc_damage_proc_kotubo(); + /* 80476B68 */ bool cc_damage_proc_ootubo(); + /* 80476B88 */ bool cc_damage_proc_kibako(); + /* 80476CE4 */ bool cc_damage_proc_ironball(); + /* 80476E04 */ bool cc_damage_proc_taru(); + /* 80476F88 */ bool cc_damage_proc_dokuro(); + /* 80476FA8 */ bool cc_damage_proc_bokkuri(); /* 804771B0 */ bool cc_damage_proc_LightBall(); /* 804771B8 */ bool cc_damage_proc_Lv8Ball(); /* 804771C0 */ void eff_break_tuboBmd(u16, cXyz); @@ -187,28 +254,36 @@ public: /* 80479480 */ void obj_execute_proc_call(); /* 8047962C */ void setTgHitCallBack(); /* 80479648 */ void setCoHitCallBack(); - /* 80479664 */ void CreateInitCall(); + /* 80479664 */ int CreateInitCall(); s32 getType() { return mType; } - u32 getSwbit() { return fopAcM_GetParamBit(this,6,8);} - u32 getSwbit2() { return fopAcM_GetParamBit(this,0xe,8); } - u32 checkOnMoveBg() { return ~((field_0xd18 >> 0xc) & 1);} - u32 checkCrashRoll() { return field_0xd18 >> 6 & 1;} + u32 getSwbit() { return fopAcM_GetParamBit(this, 6, 8); } + u32 getSwbit2() { return fopAcM_GetParamBit(this, 14, 8); } + s8 getRoomNo() { return fopAcM_GetParamBit(this, 0, 6); } + + u32 checkOnMoveBg() { return ~((field_0xd18 >> 0xc) & 1); } + u32 checkCrashRoll() { return field_0xd18 >> 6 & 1; } u8 getItemNo() { return mItemNo; } + u8 getItemBit() { return mItemNo >> 8; } + u8 getItemType() { return field_0xd18 & 1; } u8 getSaveID() { return getItemNo(); } - u32 getSetType() { return (u32)(field_0xd18 << 16) >> 29;} // fake match? - s8 prm_chk_type_ironball() { return (s8)(getType() == TYPE_IRON_BALL); } - s8 prm_chk_type_lightball() { return (getType() == TYPE_BALL_S || getType() == TYPE_BALL_S_2); } + u8 getTrboxBit() { return (mItemNo >> 8) & 0x3F; } + u32 getSetType() { return (field_0xd18 >> 13) & 0x7; } + bool prm_chk_type_ironball() { return getType() == TYPE_IRON_BALL; } + bool prm_chk_type_lightball() { return getType() == TYPE_BALL_S || getType() == TYPE_BALL_S_2; } void startCtrl() { mCtrl = 1; } void endCtrl() { mCtrl = 0; } void setDrop() { field_0xcf2 = 3; } - static void make_prm(csXyz* param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5, u8 param_6=0) { + bool isDraw() { return mDraw == false; } + + static void make_prm(csXyz* param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5, + u8 param_6 = 0) { param_1->x = (param_4 << 8) | param_3; param_1->z = param_5 | (param_6 << 13) | ((u32(param_2) & 0xFF) << 1); } - static u8 const mData[2072]; + static const daObjCarry_dt_t mData[]; static cXyz mPos[5]; static u8 mSttsFlag[5]; static s8 mRoomNo[5]; @@ -220,37 +295,39 @@ public: /* 0x574 */ dBgS_ObjAcch mAcch; /* 0x74C */ dBgS_AcchCir mAcchCir; /* 0x78C */ dCcD_Stts mStts; - /* 0x7C8 */ dCcD_Cyl field_0x7c8; - /* 0x904 */ dCcD_Sph field_0x904; - /* 0xA3C */ dCcD_Cps field_0xa3c; - /* 0xB80 */ dCcD_Cyl field_0xb80; + /* 0x7C8 */ dCcD_Cyl mCyl; + /* 0x904 */ dCcD_Sph mLightAtSph; + /* 0xA3C */ dCcD_Cps mAtCps; + /* 0xB80 */ dCcD_Cyl mTgCyl; /* 0xCBC */ u8 field_0xCBC[0xCEC - 0xCBC]; - /* 0xCEC */ float field_0xcec; + /* 0xCEC */ f32 field_0xcec; /* 0xCF0 */ u8 mType; - /* 0xCF1 */ u8 field_0xcf1; + /* 0xCF1 */ u8 mMode; /* 0xCF2 */ u8 field_0xcf2; - /* 0xCF3 */ u8 field_0xCF3[0xCF4 - 0xCF3]; - /* 0xCF4 */ cXyz field_0xcf4; - /* 0xD00 */ s16 field_0xd00; + /* 0xCF3 */ u8 field_0xcf3; + /* 0xCF4 */ cXyz mRotAxis; + /* 0xD00 */ s16 mRotation; /* 0xD02 */ u8 field_0xD02[0xD04 - 0xD02]; /* 0xD04 */ s16 field_0xd04; - /* 0xD06 */ u8 field_0xD06[0xD15 - 0xD06]; - /* 0xD15 */ u8 field_0xd15; + /* 0xD08 */ cXyz field_0xd08; + /* 0xD14 */ u8 field_0xd14; + /* 0xD15 */ bool mInitParams; /* 0xD16 */ u16 mItemNo; /* 0xD18 */ u16 field_0xd18; /* 0xD1A */ u8 field_0xD1A[0xD1C - 0xD1A]; /* 0xD1C */ cXyz field_0xd1c; - /* 0xD28 */ u8 field_0xD28[0xD3C - 0xD28]; + /* 0xD28 */ daPy_boomerangMove_c mBoomerangMove; + /* 0xD34 */ u8 field_0xD34[0xD3C - 0xD34]; /* 0xD3C */ Quaternion field_0xd3c; /* 0xD4C */ Quaternion field_0xd4c; - /* 0xD5C */ float field_0xd5c; - /* 0xD60 */ float field_0xd60; + /* 0xD5C */ f32 field_0xd5c; + /* 0xD60 */ f32 field_0xd60; /* 0xD64 */ s16 field_0xd64; /* 0xD66 */ s16 field_0xd66; /* 0xD68 */ s16 field_0xd68; /* 0xD6A */ s16 field_0xd6a; - /* 0xD6C */ u8 field_0xD6C[0xD70 - 0xD6C]; - /* 0xD70 */ float field_0xd70; + /* 0xD6C */ f32 field_0xd6c; + /* 0xD70 */ f32 field_0xd70; /* 0xD74 */ u8 field_0xd74; /* 0xD75 */ u8 field_0xd75; /* 0xD76 */ u8 field_0xd76; @@ -258,48 +335,53 @@ public: /* 0xD78 */ u8 field_0xD78[0xD79 - 0xD78]; /* 0xD79 */ u8 field_0xd79; /* 0xD7A */ u8 field_0xd7a; - /* 0xD7B */ u8 field_0xd7b; + /* 0xD7B */ s8 field_0xd7b; /* 0xD7C */ csXyz field_0xd7c; /* 0xD82 */ u8 field_0xD82[0xD84 - 0xD82]; - /* 0xD84 */ float field_0xd84; - /* 0xD88 */ Z2SoundObjSimple field_0xd88; - /* 0xDA8 */ u8 field_0xDA8[0xDAA - 0xDA8]; + /* 0xD84 */ f32 field_0xd84; + /* 0xD88 */ Z2SoundObjSimple mSound; + /* 0xDA8 */ u8 field_0xda8; + /* 0xDA9 */ bool field_0xda9; /* 0xDAA */ u8 field_0xdaa; - /* 0xDAB */ u8 field_0xDAB[0xDAC - 0xDAB]; + /* 0xDAB */ u8 field_0xdab; /* 0xDAC */ bool field_0xdac; /* 0xDAD */ u8 field_0xdad; - /* 0xDAE */ u8 field_0xDAE[0xDAF - 0xDAE]; + /* 0xDAE */ u8 field_0xdae; /* 0xDAF */ u8 field_0xdaf; /* 0xDB0 */ u8 field_0xdb0; - /* 0xDB1 */ u8 field_0xDB1[0xDB2 - 0xDB1]; + /* 0xDB1 */ u8 field_0xdb1; /* 0xDB2 */ u8 mOnMoveBG; /* 0xDB3 */ u8 field_0xdb3; /* 0xDB4 */ u8 field_0xdb4; - /* 0xDB5 */ u8 mCrashRoll; - /* 0xDB6 */ u8 field_0xdb6; - /* 0xDB7 */ u8 mDraw; + /* 0xDB5 */ bool mCanCrashRoll; + /* 0xDB6 */ u8 mDeleteTimer; + /* 0xDB7 */ bool mDraw; /* 0xDB8 */ u8 mCtrl; /* 0xDB9 */ u8 field_0xdb9; - /* 0xDBA */ u8 mReset; + /* 0xDBA */ bool mReset; /* 0xDBB */ u8 mCarryHookOK; /* 0xDBC */ u8 mRecover; - /* 0xDBD */ u8 field_0xDBD[0xDD0 - 0xDBD]; - /* 0xDD0 */ fopAc_ac_c* field_0xdd0; - /* 0xDD4 */ u8 field_0xDD4[0xDDC - 0xDD4]; - /* 0xDDC */ float field_0xddc; - /* 0xDE0 */ float field_0xde0; - /* 0xDE4 */ float field_0xde4; + /* 0xDBD */ u8 field_0xDBD[0xDC4 - 0xDBD]; + /* 0xDC4 */ int field_0xdc4; + /* 0xDC8 */ f32 field_0xdc8; + /* 0xDCC */ f32 field_0xdcc; + /* 0xDD0 */ fopAc_ac_c* mpCannonActor; + /* 0xDD4 */ u32 field_0xdd4; + /* 0xDD8 */ u8 field_0xDD8[0xDDC - 0xDD8]; + /* 0xDDC */ f32 field_0xddc; + /* 0xDE0 */ f32 field_0xde0; + /* 0xDE4 */ f32 field_0xde4; /* 0xDE8 */ s16 field_0xde8; /* 0xDEA */ u8 field_0xdea; - /* 0xDEB */ u8 mCannon; + /* 0xDEB */ bool mCannon; /* 0xDEC */ cXyz field_0xdec; - /* 0xDF8 */ DALKMIST_INFLUENCE field_0xdf8; + /* 0xDF8 */ DALKMIST_INFLUENCE mDalkmistInf; /* 0xE0C */ u8 field_0xe0c; /* 0xE0D */ u8 field_0xe0d; /* 0xE0E */ u8 field_0xE0E[0xE10 - 0xE0E]; - /* 0xE10 */ dJntCol_c field_0xe10; - /* 0xE20 */ float field_0xe20; - /* 0xE24 */ u8 field_0xe24; + /* 0xE10 */ dJntCol_c mJntCol; + /* 0xE20 */ f32 field_0xe20; + /* 0xE24 */ s8 field_0xe24; /* 0xE25 */ u8 field_0xe25; /* 0xE26 */ u8 field_0xe26; /* 0xE27 */ u8 field_0xe27; @@ -310,15 +392,4 @@ private: STATIC_ASSERT(sizeof(daObjCarry_c) == 0xE28); -struct daObjCarry_Data { - /* 0x0000 */ u8 field_0x0000[0x0030 - 0x0000]; - /* 0x0030 */ float field_0x0030; - /* 0x0034 */ u8 field_0x0034; - /* 0x0035 */ u8 field_0x0035[0x0038 - 0x0035]; - /* 0x0038 */ float field_0x0038; - /* 0x003C */ float field_0x003c; - /* 0x0040 */ float field_0x0040; - /* 0x0044 */ u8 field_0x0044[0x94-0x44]; -}; - #endif /* D_A_OBJ_CARRY_H */ diff --git a/include/d/d_bg_s_acch.h b/include/d/d_bg_s_acch.h index fa6838d185..bea35dbd26 100644 --- a/include/d/d_bg_s_acch.h +++ b/include/d/d_bg_s_acch.h @@ -113,9 +113,6 @@ public: /* 800773EC */ void OnWallSort(); /* 800773FC */ bool ChkWallSort(); /* 80077408 */ bool ChkLineDown(); - /* 800D00D0 */ bool ChkRoofHit() const; - /* 800D00DC */ void ClrGroundHit(); - /* 80141404 */ bool ChkGroundHit() const; /* 80075F94 */ virtual ~dBgS_Acch(); @@ -126,37 +123,37 @@ public: int GetTblSize() { return m_tbl_size; } void SetLin() { m_lin.SetStartEnd(*pm_old_pos, *pm_pos); } bool ChkGroundFind() { return m_flags & GROUND_FIND; } - bool ChkGroundHit() { return m_flags & GROUND_HIT; } - bool ChkGroundLanding() { return m_flags & GROUND_LANDING; } + bool ChkGroundHit() const { return m_flags & GROUND_HIT; } + bool ChkGroundLanding() const { return m_flags & GROUND_LANDING; } void ClrGroundLanding() { m_flags &= ~GROUND_LANDING; } void ClrGroundAway() { m_flags &= ~GROUND_AWAY; } void ClrWallHit() { m_flags &= ~WALL_HIT; } void SetRoofNone() { m_flags |= ROOF_NONE; } void SetRoofHit() { m_flags |= ROOF_HIT; } void SetWaterNone() { m_flags |= WATER_NONE; } - bool ChkWallHit() { return m_flags & WALL_HIT; } + u32 ChkWallHit() const { return m_flags & WALL_HIT; } void OffLineCheckHit() { m_flags &= ~LINE_CHECK_HIT; } void OffLineCheck() { m_flags &= ~LINE_CHECK; } - bool ChkLineCheckNone() { return m_flags & LINE_CHECK_NONE; } - bool ChkLineCheck() { return m_flags & LINE_CHECK; } + u32 ChkLineCheckNone() const { return m_flags & LINE_CHECK_NONE; } + u32 ChkLineCheck() const { return m_flags & LINE_CHECK; } void ClrRoofHit() { m_flags &= ~ROOF_HIT; } void ClrWaterHit() { m_flags &= ~WATER_HIT; } void SetWaterHit() { m_flags |= WATER_HIT; } void ClrWaterIn() { m_flags &= ~WATER_IN; } void SetWaterIn() { m_flags |= WATER_IN; } - const u32 MaskWaterIn() { return m_flags & WATER_IN; } - const bool ChkWaterIn() { return MaskWaterIn();} + const u32 MaskWaterIn() const { return m_flags & WATER_IN; } + const bool ChkWaterIn() const { return MaskWaterIn();} void ClrGroundFind() { m_flags &= ~GROUND_FIND; } - u32 MaskRoofHit() { return m_flags & ROOF_HIT; } - bool ChkRoofHit() { return MaskRoofHit(); } + u32 MaskRoofHit() const { return m_flags & ROOF_HIT; } + bool ChkRoofHit() const { return MaskRoofHit(); } void OffClrSpeedY() { m_flags |= CLR_SPEED_Y; } - bool ChkClrSpeedY() { return !(m_flags & CLR_SPEED_Y); } + bool ChkClrSpeedY() const { return !(m_flags & CLR_SPEED_Y); } void SetGroundFind() { m_flags |= GROUND_FIND; } void SetGroundHit() { m_flags |= GROUND_HIT; } void SetGroundLanding() { m_flags |= GROUND_LANDING; } void SetGroundAway() { m_flags |= GROUND_AWAY; } - const u32 MaskWaterHit() { return m_flags & WATER_HIT; } - const bool ChkWaterHit() { return MaskWaterHit(); } + const u32 MaskWaterHit() const { return m_flags & WATER_HIT; } + const bool ChkWaterHit() const { return MaskWaterHit(); } void ClrWaterNone() { m_flags &= ~WATER_NONE; } void SetWaterCheckOffset(f32 offset) { m_wtr_chk_offset = offset; } void OnLineCheck() { m_flags |= LINE_CHECK; } @@ -172,11 +169,14 @@ public: void OffLineCheckNone() { m_flags &= ~LINE_CHECK_NONE; } void SetWallNone() { m_flags |= WALL_NONE; } void OnLineCheckHit() { m_flags |= LINE_CHECK_HIT; } + bool ChkGroundAway() const { return m_flags & GROUND_AWAY; } + void ClrGroundHit() { m_flags &= ~GROUND_HIT; } + cM3dGCyl* GetWallBmdCylP() { return &m_wall_cyl; } fopAc_ac_c* getMyAc() { return m_my_ac; } cM3dGCir* GetWallCirP(int index) { - JUT_ASSERT(0, index <= m_tbl_size); + JUT_ASSERT(730, index <= m_tbl_size); return pm_acch_cir[index].GetCirP(); } @@ -190,10 +190,6 @@ public: f32 GetCx() const { return pm_pos->x; } f32 GetCz() const { return pm_pos->z; } - - // inline dupe - void i_ClrGroundHit() { m_flags &= ~GROUND_HIT; } - u32 i_ChkGroundHit() const { return m_flags & GROUND_HIT; } public: /* 0x02C */ u32 m_flags; @@ -218,7 +214,7 @@ public: /* 0x098 */ f32 m_ground_h; /* 0x09C */ f32 field_0x9c; /* 0x0A0 */ cM3dGPla field_0xa0; - /* 0x0B4 */ u8 field_0xb4; + /* 0x0B4 */ bool field_0xb4; /* 0x0B8 */ f32 field_0xb8; /* 0x0BC */ f32 field_0xbc; /* 0x0C0 */ u8 field_0xc0; diff --git a/include/d/d_bg_s_roof_chk.h b/include/d/d_bg_s_roof_chk.h index ea3b534424..960fccd10b 100644 --- a/include/d/d_bg_s_roof_chk.h +++ b/include/d/d_bg_s_roof_chk.h @@ -9,12 +9,11 @@ class dBgS_RoofChk : public cBgS_PolyInfo, public cBgS_Chk, public dBgS_Chk { public: /* 80078FF4 */ dBgS_RoofChk(); /* 80079124 */ void Init(); - /* 800B146C */ void SetPos(cXyz const&); /* 80079090 */ virtual ~dBgS_RoofChk(); void SetNowY(f32 y) { mNowY = y; } - void i_SetPos(cXyz const& pos) { m_pos = pos; } + void SetPos(cXyz const& pos) { m_pos = pos; } f32 GetNowY() { return mNowY; } cXyz* GetPosP() { return &m_pos; } diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 399a8bbc95..d6517f018b 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -822,7 +822,7 @@ public: /* 0x1DE08 */ u8 field_0x1de08; /* 0x1DE09 */ u8 field_0x1de09; /* 0x1DE0A */ u8 field_0x1de0a; - /* 0x1DE0B */ u8 field_0x1de0b; + /* 0x1DE0B */ u8 mIsDebugMode; /* 0x1DE0C */ u8 field_0x1de0c; static __d_timer_info_c dComIfG_mTimerInfo; @@ -888,6 +888,10 @@ inline void dComIfG_setTimerLimitTimeMs(int i_time) { g_dComIfG_gameInfo.play.setTimerLimitTimeMs(i_time); } +inline BOOL dComIfG_isDebugMode() { + return g_dComIfG_gameInfo.mIsDebugMode; +} + /** * Attempts to add a new Object Resource Archive (*.arc) into the Resource Control. * @param i_arcName Name of archive to be added diff --git a/include/d/d_debug_viewer.h b/include/d/d_debug_viewer.h new file mode 100644 index 0000000000..cd2fe2d93c --- /dev/null +++ b/include/d/d_debug_viewer.h @@ -0,0 +1,124 @@ +#ifndef D_DEBUG_VIEWER_H +#define D_DEBUG_VIEWER_H + +#include <dolphin/gx.h> +#include "SSystem/SComponent/c_xyz.h" +#include "SSystem/SComponent/c_sxyz.h" + +class J3DPacket; + +J3DPacket* dDbVw_setDrawPacketList(J3DPacket* i_packet, int i_bufferType); +void dDbVw_deleteDrawPacketList(); + +void dDbVw_drawCube8p(int i_bufferType, cXyz* i_points, const GXColor& i_color); +void dDbVw_drawCube(int i_bufferType, cXyz& i_pos, cXyz& i_size, csXyz& i_angle, const GXColor& i_color); +void dDbVw_drawTriangle(int i_bufferType, cXyz* i_points, const GXColor& i_color, u8 i_clipZ); +void dDbVw_drawQuad(int i_bufferType, cXyz* i_points, const GXColor& i_color, u8 i_clipZ); +void dDbVw_drawQuad(int i_bufferType, cXyz* param_1, cXyz* param_2, cXyz* i_pos, s16 i_rotY, const GXColor& i_color, u8 i_clipZ); +void dDbVw_drawLine(int i_bufferType, cXyz& i_start, cXyz& i_end, const GXColor& i_color, u8 i_clipZ, u8 i_width); +void dDbVw_drawArrow(int i_bufferType, cXyz& i_pos, cXyz& param_2, const GXColor& i_color, u8 i_clipZ, u8 i_width); +void dDbVw_drawPoint(int i_bufferType, cXyz& i_pos, const GXColor& i_color, u8 i_clipZ, u8 i_width); +void dDbVw_drawCircle(int i_bufferType, cXyz& i_pos, f32 i_radius, const GXColor& i_color, u8 i_clipZ, u8 i_width); +void dDbVw_drawSphere(int i_bufferType, cXyz& i_pos, f32 i_size, const GXColor& i_color, u8 i_clipZ); +void dDbVw_drawCylinder(int i_bufferType, cXyz& i_pos, f32 i_radius, f32 i_height, const GXColor& i_color, u8 i_clipZ); +void dDbVw_drawCylinderM(int i_bufferType, Mtx i_mtx, const GXColor& i_color, u8 i_clipZ); + +inline void dDbVw_drawCube8pOpa(cXyz* i_points, const GXColor& i_color) { + dDbVw_drawCube8p(0, i_points, i_color); +} + +inline void dDbVw_drawCube8pXlu(cXyz* i_points, const GXColor& i_color) { + dDbVw_drawCube8p(1, i_points, i_color); +} + +inline void dDbVw_drawCubeOpa(cXyz& i_pos, cXyz& i_size, csXyz& i_angle, const GXColor& i_color) { + dDbVw_drawCube(0, i_pos, i_size, i_angle, i_color); +} + +inline void dDbVw_drawCubeXlu(cXyz& i_pos, cXyz& i_size, csXyz& i_angle, const GXColor& i_color) { + dDbVw_drawCube(1, i_pos, i_size, i_angle, i_color); +} + +inline void dDbVw_drawTriangleOpa(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawTriangle(0, i_points, i_color, i_clipZ); +} + +inline void dDbVw_drawTriangleXlu(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawTriangle(1, i_points, i_color, i_clipZ); +} + +inline void dDbVw_drawQuadOpa(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawQuad(0, i_points, i_color, i_clipZ); +} + +inline void dDbVw_drawQuadXlu(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawQuad(1, i_points, i_color, i_clipZ); +} + +inline void dDbVw_drawQuadOpa(cXyz* param_1, cXyz* param_2, cXyz* i_pos, s16 i_rotY, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawQuad(0, param_1, param_2, i_pos, i_rotY, i_color, i_clipZ); +} + +inline void dDbVw_drawQuadXlu(cXyz* param_1, cXyz* param_2, cXyz* i_pos, s16 i_rotY, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawQuad(1, param_1, param_2, i_pos, i_rotY, i_color, i_clipZ); +} + +inline void dDbVw_drawLineOpa(cXyz& i_start, cXyz& i_end, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawLine(0, i_start, i_end, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawLineXlu(cXyz& i_start, cXyz& i_end, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawLine(1, i_start, i_end, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawArrowOpa(cXyz& i_pos, cXyz& param_2, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawArrow(0, i_pos, param_2, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawArrowXlu(cXyz& i_pos, cXyz& param_2, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawArrow(1, i_pos, param_2, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawPointOpa(cXyz& i_pos, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawPoint(0, i_pos, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawPointXlu(cXyz& i_pos, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawPoint(1, i_pos, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawCircleOpa(cXyz& i_pos, f32 i_radius, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawCircle(0, i_pos, i_radius, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawCircleXlu(cXyz& i_pos, f32 i_radius, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + dDbVw_drawCircle(1, i_pos, i_radius, i_color, i_clipZ, i_width); +} + +inline void dDbVw_drawSphereOpa(cXyz& i_pos, f32 i_size, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawSphere(0, i_pos, i_size, i_color, i_clipZ); +} + +inline void dDbVw_drawSphereXlu(cXyz& i_pos, f32 i_size, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawSphere(1, i_pos, i_size, i_color, i_clipZ); +} + +inline void dDbVw_drawCylinderOpa(cXyz& i_pos, f32 i_radius, f32 i_height, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawCylinder(0, i_pos, i_radius, i_height, i_color, i_clipZ); +} + +inline void dDbVw_drawCylinderXlu(cXyz& i_pos, f32 i_radius, f32 i_height, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawCylinder(1, i_pos, i_radius, i_height, i_color, i_clipZ); +} + +inline void dDbVw_drawCylinderMOpa(Mtx i_mtx, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawCylinderM(0, i_mtx, i_color, i_clipZ); +} + +inline void dDbVw_drawCylinderMXlu(Mtx i_mtx, const GXColor& i_color, u8 i_clipZ) { + dDbVw_drawCylinderM(1, i_mtx, i_color, i_clipZ); +} + +int dDbVw_Report(int x, int y, char const* string, ...); + +#endif /* D_DEBUG_VIEWER_H */ diff --git a/include/d/d_particle.h b/include/d/d_particle.h index 45a95833ca..958c1a145f 100644 --- a/include/d/d_particle.h +++ b/include/d/d_particle.h @@ -190,7 +190,7 @@ public: static void setModel(JPABaseEmitter* param_0, J3DModelData* param_1, const dKy_tevstr_c& param_2, u8 param_3, J3DAnmTexPattern* param_4, u8 param_5) { - setModel(param_0, param_1, param_2, param_3, param_4, param_5); + setModel(param_0, param_1, param_2, param_3, param_4, 0, param_5); } static dPa_modelEcallBack& getEcallback() { return mEcallback; } diff --git a/include/d/d_tresure.h b/include/d/d_tresure.h index 4a8859909b..3e92b3c74a 100644 --- a/include/d/d_tresure.h +++ b/include/d/d_tresure.h @@ -78,6 +78,14 @@ public: setPosition(i_tboxNo, 4, i_pos, -1); } + static void setIconPositionOfCarryLight(int i_tboxNo, const Vec* i_pos, int param_2) { + setPosition(i_tboxNo, 12, i_pos, param_2); + } + + static void setCarryIron(int i_tboxNo, const Vec* i_pos) { + setPosition(i_tboxNo, 11, i_pos, -1); + } + static u8 const typeToTypeGroup[17][2]; static type_group_list mTypeGroupListAll[17]; static typeGroupData_c* mTypeGroupData; diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 549db98020..9f7dc431b4 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -311,6 +311,10 @@ inline void fopAcM_SetModel(fopAc_ac_c* actor, J3DModel* model) { actor->model = model; } +inline J3DModel* fopAcM_GetModel(fopAc_ac_c* actor) { + return actor->model; +} + inline fopAcM_prm_class* fopAcM_GetAppend(void* actor) { return (fopAcM_prm_class*)fpcM_GetAppend(actor); } @@ -713,6 +717,10 @@ inline void fopAcM_OnCarryType(fopAc_ac_c* i_actor, fopAcM_CARRY param_2) { i_actor->carryType |= param_2; } +inline void fopAcM_OffCarryType(fopAc_ac_c* i_actor, fopAcM_CARRY param_2) { + i_actor->carryType &= ~param_2; +} + enum fopAcM_FOOD { fopAcM_FOOD_0, fopAcM_FOOD_1, diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 53924d1267..8503791034 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -588,13 +588,12 @@ public: class mDoExt_cylinderPacket : public J3DPacket { public: - mDoExt_cylinderPacket(cXyz& i_position, f32 i_radius, f32 i_height, const GXColor& i_color, - u8 param_4) { + mDoExt_cylinderPacket(cXyz& i_position, f32 i_radius, f32 i_height, const GXColor& i_color, u8 i_clipZ) { mPosition = i_position; mRadius = i_radius; mHeight = i_height; mColor = i_color; - field_0x28 = param_4; + mClipZ = i_clipZ; } virtual void draw(); @@ -604,7 +603,186 @@ public: /* 0x1C */ f32 mRadius; /* 0x20 */ f32 mHeight; /* 0x24 */ GXColor mColor; - /* 0x28 */ u8 field_0x28; + /* 0x28 */ u8 mClipZ; +}; + +class mDoExt_spherePacket : public J3DPacket { +public: + mDoExt_spherePacket(cXyz& i_position, f32 i_size, const GXColor& i_color, u8 i_clipZ) { + mPosition = i_position; + mSize = i_size; + mColor = i_color; + mClipZ = i_clipZ; + } + + virtual void draw(); + virtual ~mDoExt_spherePacket() {} + + /* 0x10 */ cXyz mPosition; + /* 0x1C */ f32 mSize; + /* 0x20 */ GXColor mColor; + /* 0x24 */ u8 mClipZ; +}; + +class mDoExt_cube8pPacket : public J3DPacket { +public: + mDoExt_cube8pPacket(cXyz* i_points, const GXColor& i_color) { + cXyz* pnt_array = i_points; + + for (int i = 0; i < 8; i++) { + mPoints[i] = *pnt_array; + pnt_array++; + } + + DCStoreRangeNoSync(mPoints, sizeof(cXyz) * 8); + mColor = i_color; + } + + virtual void draw(); + virtual ~mDoExt_cube8pPacket() {} + + /* 0x10 */ cXyz mPoints[8]; + /* 0x70 */ GXColor mColor; +}; + +class mDoExt_trianglePacket : public J3DPacket { +public: + mDoExt_trianglePacket(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) { + cXyz* pnt_array = i_points; + + for (int i = 0; i < 3; i++) { + mPoints[i] = *pnt_array; + pnt_array++; + } + + DCStoreRangeNoSync(mPoints, sizeof(cXyz) * 3); + mColor = i_color; + mClipZ = i_clipZ; + } + + virtual void draw(); + virtual ~mDoExt_trianglePacket() {} + + /* 0x10 */ cXyz mPoints[3]; + /* 0x34 */ GXColor mColor; + /* 0x38 */ u8 mClipZ; +}; + +class mDoExt_quadPacket : public J3DPacket { +public: + mDoExt_quadPacket(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) { + cXyz* pnt_array = i_points; + + for (int i = 0; i < 4; i++) { + mPoints[i] = *pnt_array; + pnt_array++; + } + + DCStoreRangeNoSync(mPoints, sizeof(cXyz) * 4); + mColor = i_color; + mClipZ = i_clipZ; + } + + virtual void draw(); + virtual ~mDoExt_quadPacket() {} + + /* 0x10 */ cXyz mPoints[4]; + /* 0x40 */ GXColor mColor; + /* 0x44 */ u8 mClipZ; +}; + +class mDoExt_linePacket : public J3DPacket { +public: + mDoExt_linePacket(cXyz& i_start, cXyz& i_end, const GXColor& i_color, u8 i_clipZ, u8 i_width) { + mStart = i_start; + mEnd = i_end; + mColor = i_color; + mClipZ = i_clipZ; + mWidth = i_width; + } + + virtual void draw(); + virtual ~mDoExt_linePacket() {} + + /* 0x10 */ cXyz mStart; + /* 0x1C */ cXyz mEnd; + /* 0x28 */ GXColor mColor; + /* 0x2C */ u8 mClipZ; + /* 0x2D */ u8 mWidth; +}; + +class mDoExt_cylinderMPacket : public J3DPacket { +public: + mDoExt_cylinderMPacket(Mtx i_mtx, const GXColor& i_color, u8 i_clipZ) { + PSMTXCopy(i_mtx, mMatrix); + mColor = i_color; + mClipZ = i_clipZ; + } + + virtual void draw(); + virtual ~mDoExt_cylinderMPacket() {} + + /* 0x10 */ Mtx mMatrix; + /* 0x40 */ GXColor mColor; + /* 0x44 */ u8 mClipZ; +}; + +class mDoExt_circlePacket : public J3DPacket { +public: + mDoExt_circlePacket(cXyz& i_position, f32 i_radius, const GXColor& i_color, u8 i_clipZ, u8 i_lineWidth) { + mPosition = i_position; + mRadius = i_radius; + mColor = i_color; + mClipZ = i_clipZ; + mLineWidth = i_lineWidth; + } + + virtual void draw(); + virtual ~mDoExt_circlePacket() {} + + /* 0x10 */ cXyz mPosition; + /* 0x1C */ f32 mRadius; + /* 0x20 */ GXColor mColor; + /* 0x24 */ u8 mClipZ; + /* 0x25 */ u8 mLineWidth; +}; + +class mDoExt_ArrowPacket : public J3DPacket { +public: + mDoExt_ArrowPacket(cXyz& i_position, cXyz& param_1, const GXColor& i_color, u8 i_clipZ, u8 i_lineWidth) { + mPosition = i_position; + field_0x1c = param_1; + mColor = i_color; + mClipZ = i_clipZ; + m_lineWidth = i_lineWidth; + } + + virtual void draw(); + virtual ~mDoExt_ArrowPacket() {} + + /* 0x10 */ cXyz mPosition; + /* 0x1C */ cXyz field_0x1c; + /* 0x28 */ GXColor mColor; + /* 0x2C */ u8 mClipZ; + /* 0x2D */ u8 m_lineWidth; +}; + +class mDoExt_pointPacket : public J3DPacket { +public: + mDoExt_pointPacket(cXyz& i_position, const GXColor& i_color, u8 i_clipZ, u8 i_lineWidth) { + mPosition = i_position; + mColor = i_color; + mClipZ = i_clipZ; + mLineWidth = i_lineWidth; + } + + virtual void draw(); + virtual ~mDoExt_pointPacket() {} + + /* 0x10 */ cXyz mPosition; + /* 0x1C */ GXColor mColor; + /* 0x20 */ u8 mClipZ; + /* 0x21 */ u8 mLineWidth; }; inline void mDoExt_bckAnmRemove(J3DModelData* i_modelData) { |
