From 0f3b98fdcadcd5ed43aa9e0b0228bad096b0d119 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sun, 10 Sep 2023 16:02:21 -0700 Subject: [PATCH 1/2] more of d_com_inf_game setup --- include/d/actor/d_a_player.h | 160 ++++++++++++++++++++++++++ include/d/d_attention.h | 180 +++++++++++++++++++++++++++++ include/d/d_com_inf_game.h | 183 ++++++++++++++++++++++------- include/d/d_detect.h | 29 +++++ include/d/d_drawlist.h | 216 +++++++++++++++++++++++++++++++++++ include/d/d_kankyo.h | 2 + include/d/d_save.h | 24 +++- include/d/d_stage.h | 2 +- include/d/d_vibration.h | 26 +++++ include/m_Do/m_Do_audio.h | 6 + include/m_Do/m_Do_ext.h | 25 ++++ src/d/d_com_inf_game.cpp | 183 +++++++++++++++++++++++++---- 12 files changed, 966 insertions(+), 70 deletions(-) create mode 100644 include/d/actor/d_a_player.h create mode 100644 include/d/d_attention.h create mode 100644 include/d/d_detect.h create mode 100644 include/d/d_drawlist.h create mode 100644 include/d/d_vibration.h create mode 100644 include/m_Do/m_Do_audio.h diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h new file mode 100644 index 000000000..b4285834f --- /dev/null +++ b/include/d/actor/d_a_player.h @@ -0,0 +1,160 @@ +#ifndef D_D_A_PLAYER_H +#define D_D_A_PLAYER_H + +#include "JSystem/J3DGraphAnimator/J3DAnimation.h" +#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" +#include "d/d_attention.h" +#include "f_op/f_op_actor_mng.h" +#include "m_Do/m_Do_ext.h" + +class mDoExt_MtxCalcOldFrame; +class daPy_matAnm_c; + +class daPy_py_c : public fopAc_ac_c { +public: + /* 0x290 */ u8 mAttackState; + /* 0x291 */ u8 field_0x291; + /* 0x292 */ u8 field_0x292[0x294 - 0x292]; + /* 0x294 */ s16 field_0x294; + /* 0x296 */ s16 mQuakeTimer; + /* 0x298 */ int field_0x298; + /* 0x29C */ u32 field_0x29c; + /* 0x2A0 */ u32 field_0x2a0; + /* 0x2A4 */ u32 field_0x2a4; + /* 0x2A8 */ f32 field_0x2a8; + /* 0x2AC */ u8 field_0x2AC[0x2B0 - 0x2AC]; + /* 0x2B0 */ f32 field_0x2b0; + /* 0x2B4 */ u8 field_0x2B4[0x2BC - 0x2B4]; + /* 0x2BC */ cXyz mHeadTopPos; + /* 0x2C8 */ cXyz mSwordTopPos; + /* 0x2D4 */ cXyz field_0x2d4; + /* 0x2E0 */ cXyz field_0x2e0; + /* 0x2EC */ cXyz mRopePos; + /* 0x2F8 */ f32 field_0x2f8; + /* 0x2FC */ u8 field_0x2FC[0x300 - 0x2FC]; + /* 0x300 */ f32 field_0x300; +}; + +class daPy_lk_c : public daPy_py_c { +public: + /* 0x0304 */ s16 field_0x0304; + /* 0x0306 */ s16 field_0x0306; + /* 0x0308 */ u8 field_0x0308[0x030C - 0x0308]; + /* 0x030C */ int field_0x030c; + /* 0x0310 */ u8 field_0x0310[0x0314 - 0x0310]; + /* 0x0314 */ int mDemoMode; + /* 0x0318 */ u8 field_0x0318[0x031C - 0x0318]; + /* 0x031C */ void* vtbl; + /* 0x0320 */ request_of_phase_process_class mPhsLoad; + + /* 0x0328 */ u8 temp0[0x3480 - 0x0328]; + + /* 0x3480 */ dAttention_c* mpAttention; + /* 0x3484 */ dAttList_c* mpAttnEntryA; + /* 0x3488 */ dAttList_c* mpAttnEntryX; + /* 0x348C */ dAttList_c* mpAttnEntryY; + /* 0x3490 */ dAttList_c* mpAttnentryZ; + /* 0x3494 */ u8 field_0x3494[0x34B9 - 0x3494]; + /* 0x34B9 */ u8 mFrontWallType; + /* 0x34BA */ u8 field_0x34BA[0x34BD - 0x34BA]; + /* 0x34BD */ u8 mLastUsedEquipItem; + /* 0x34BE */ u8 field_0x34BE[0x34C0 - 0x34BE]; + /* 0x34C0 */ u8 field_0x34c0; + /* 0x34C1 */ u8 field_0x34c1; + /* 0x34C2 */ u8 field_0x34c2; + /* 0x34C3 */ u8 field_0x34c3; + /* 0x34C4 */ u8 field_0x34c4; + /* 0x34C5 */ u8 field_0x34c5; + /* 0x34C6 */ u8 field_0x34C6[0x34C7 - 0x34C6]; + /* 0x34C7 */ u8 mActivePlayerBombs; + /* 0x34C8 */ u8 mPressedButtonsBitfield; + /* 0x34C9 */ u8 field_0x34C9[0x34D0 - 0x34C9]; + /* 0x34D0 */ s16 field_0x34d0; + /* 0x34D2 */ s16 field_0x34d2; + /* 0x34D4 */ s16 field_0x34d4; + /* 0x34D6 */ u16 field_0x34d6; + /* 0x34D8 */ s16 field_0x34d8; + /* 0x34DA */ s16 field_0x34da; + /* 0x34DC */ u8 field_0x34DC[0x34DE - 0x34DC]; + /* 0x34DE */ s16 field_0x34de; + /* 0x34E0 */ u8 field_0x34E0[0x34E2 - 0x34E0]; + /* 0x34E2 */ s16 field_0x34e2; + /* 0x34E4 */ u8 field_0x34E4[0x34E6 - 0x34E4]; + /* 0x34E6 */ s16 field_0x34e6; + /* 0x34E8 */ u8 field_0x34E8[0x3522 - 0x34E8]; + /* 0x3522 */ s16 field_0x3522; + /* 0x3524 */ u8 field_0x3524[0x352C - 0x3524]; + /* 0x352C */ s16 field_0x352c; + /* 0x352E */ s16 field_0x352e; + /* 0x3530 */ s16 field_0x3530; + /* 0x3532 */ s16 field_0x3532; + /* 0x3534 */ u8 field_0x3534[0x3544 - 0x3534]; + /* 0x3544 */ s16 field_0x3544; + /* 0x3546 */ u8 field_0x3546[0x354E - 0x3546]; + /* 0x354E */ s16 field_0x354e; + /* 0x3550 */ u8 field_0x3550[0x3554 - 0x3550]; + /* 0x3554 */ s16 field_0x3554; + /* 0x3556 */ u8 field_0x3556[0x355E - 0x3556]; + /* 0x355E */ u16 field_0x355e; + /* 0x3560 */ u16 mHeldItemType; + /* 0x3562 */ u8 field_0x3562[0x3566 - 0x3562]; + /* 0x3566 */ s16 field_0x3566; + /* 0x3568 */ s16 field_0x3568; + /* 0x356A */ u8 field_0x356A[0x356C - 0x356A]; + /* 0x356C */ int mCameraInfoIdx; + /* 0x3570 */ int field_0x3570; + /* 0x3574 */ int field_0x3574; + /* 0x3578 */ u8 field_0x3578[0x3580 - 0x3578]; + /* 0x3580 */ int field_0x3580; + /* 0x3584 */ int mCurrentGroundAttributeCode; + /* 0x3588 */ u8 field_0x3588[0x358C - 0x3588]; + /* 0x358C */ int mStaffIdx; + /* 0x3590 */ int field_0x3590; + /* 0x3594 */ int field_0x3594; + /* 0x3598 */ u8 field_0x3598[0x35A0 - 0x3598]; + /* 0x35A0 */ f32 field_0x35a0; + /* 0x35A4 */ f32 field_0x35a4; + /* 0x35A8 */ u8 field_0x35A8[0x35BC - 0x35A8]; + /* 0x35BC */ f32 mVelocity; + /* 0x35C0 */ u8 field_0x35C0[0x35C8 - 0x35C0]; + /* 0x35C8 */ f32 field_0x35c8; + /* 0x35CC */ u8 field_0x35CC[0x35D0 - 0x35CC]; + /* 0x35D0 */ f32 field_0x35d0; + /* 0x35D4 */ u8 field_0x35D4[0x35D8 - 0x35D4]; + /* 0x35D8 */ f32 field_0x35d8; + /* 0x35DC */ u8 field_0x35DC[0x35E4 - 0x35DC]; + /* 0x35E4 */ f32 field_0x35e4; + /* 0x35E8 */ f32 field_0x35e8; + /* 0x35EC */ f32 field_0x35ec; + /* 0x35F0 */ u8 field_0x35F0[0x35FC - 0x35F0]; + /* 0x35FC */ f32 field_0x35fc; + /* 0x3600 */ f32 field_0x3600; + /* 0x3604 */ u8 field_0x3604[0x3610 - 0x3604]; + /* 0x3610 */ f32 field_0x3610; + /* 0x3614 */ int field_0x3614; + /* 0x3618 */ u32 field_0x3618; + /* 0x361C */ u8 field_0x361C[0x3624 - 0x361C]; + /* 0x3624 */ int field_0x3624; + /* 0x3628 */ int field_0x3628; + /* 0x362C */ u8 field_0x362C[0x3630 - 0x362C]; + /* 0x3630 */ int field_0x3630; + /* 0x3634 */ int field_0x3634; + /* 0x3638 */ u8 field_0x3638[0x3644 - 0x3638]; + /* 0x3644 */ f32 field_0x3644; + /* 0x3648 */ u8 field_0x3648[0x3694 - 0x3648]; + /* 0x3694 */ cXyz mOldSpeed; + /* 0x36A0 */ cXyz field_0x36a0; + /* 0x36AC */ cXyz field_0x36ac; + /* 0x36B8 */ u8 field_0x36B8[0x36C4 - 0x36B8]; + /* 0x36C4 */ cXyz field_0x36c4; + /* 0x36D0 */ u8 field_0x36D0[0x3700 - 0x36D0]; + /* 0x3700 */ cXyz field_0x3700; + /* 0x370C */ cXyz field_0x370c; + /* 0x3718 */ u8 field_0x3718[0x3724 - 0x3718]; + /* 0x3724 */ cXyz field_0x3724; + /* 0x3730 */ u8 field_0x3730[0x3748 - 0x3730]; + /* 0x3748 */ cXyz field_0x3748; + /* 0x3754 */ u8 field_0x3754[0x37E4 - 0x3754]; +}; + +#endif /* D_D_A_PLAYER_H */ \ No newline at end of file diff --git a/include/d/d_attention.h b/include/d/d_attention.h new file mode 100644 index 000000000..1fa2253c8 --- /dev/null +++ b/include/d/d_attention.h @@ -0,0 +1,180 @@ +#ifndef D_D_ATTENTION_H +#define D_D_ATTENTION_H + +#include "SSystem/SComponent/c_angle.h" +#include "m_Do/m_Do_ext.h" + +class fopAc_ac_c; + +class dAttHint_c { +public: + dAttHint_c() {} + u32 getPId(void*); + fopAc_ac_c* convPId(unsigned int); + int request(fopAc_ac_c*, int); + void init(); + void proc(); + +private: + /* 0x0 */ u32 mHintActorID; + /* 0x4 */ int mPriority; + /* 0x8 */ u32 field_0x8; +}; + +class dAttCatch_c { +public: + dAttCatch_c() {} + fopAc_ac_c* convPId(unsigned int); + void init(); + void proc(); + void request(fopAc_ac_c*, u8, f32, f32, f32, s16, int); + + fopAc_ac_c* getCatghTarget() { return convPId(mCatghTargetID); } + u8 getChangeItem() { return mChangeItem; } + +private: + /* 0x00 */ u32 field_0x0; + /* 0x04 */ int field_0x4; + /* 0x08 */ f32 field_0x8; + /* 0x0C */ u8 field_0xc; + /* 0x0D */ u8 field_0xd; + /* 0x0E */ u8 field_0xe; + /* 0x0F */ u8 field_0xf; + /* 0x10 */ u32 mCatghTargetID; + /* 0x14 */ u8 mChangeItem; +}; // Size: 0x18 + +class dAttParam_c { +public: + /* 0x00 */ u16 field_0x00; + /* 0x02 */ u8 field_0x02[0x04 - 0x02]; + /* 0x04 */ f32 field_0x04; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ f32 field_0x0c; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + +public: + dAttParam_c() {} + dAttParam_c(s32); + + virtual ~dAttParam_c(); + + /* 0x1C vtable */ +}; // Size: 0x20 + +class dAttLook_c { +public: + /* 80073CA4 */ fopAc_ac_c* convPId(unsigned int); + /* 80073CD4 */ void init(); + /* 80073CEC */ void proc(); + /* 80073D08 */ void request(fopAc_ac_c*, f32, f32, f32, s16, int); + +private: + u32 field_0x0; + u32 field_0x4; + f32 field_0x8; + u32 mLookTargetID; +}; // Size: 0x10 + +class dAttList_c { +public: + fopAc_ac_c* getActor(); + void setActor(fopAc_ac_c*); + + u32 getPid() { return mActorID; } + + /* 0x0 */ f32 mWeight; + /* 0x4 */ f32 mDistance; + /* 0x8 */ u32 mType; + /* 0xC */ u32 mActorID; +}; // Size: 0x10 + +class dAttDraw_CallBack_c : public mDoExt_McaMorfCallBack1_c { +public: + /* 80070178 */ virtual void execute(u16, J3DTransformInfo*); +}; + +class daPy_lk_c; + +class dAttention_c { +public: + dAttention_c() {} + + dAttention_c(fopAc_ac_c*, u32); + ~dAttention_c(); + + void GetActionList(s32); + void GetLockonList(s32); + void getActionBtnB(); + void getActionBtnXYZ_local(int); + void getActionBtnX(); + void getActionBtnY(); + void getActionBtnZ(); + void chkAttMask(u32, u32); + void calcWeight(int, fopAc_ac_c*, f32, s16, s16, u32*); + void setLList(fopAc_ac_c*, f32, f32, u32); + void setAList(fopAc_ac_c*, f32, f32, u32); + void initList(u32); + void makeList(); + void SelectAttention(fopAc_ac_c*); + void sortList(); + void stockAttention(u32); + void nextAttention(u32); + void freeAttention(); + void chaseAttention(); + void EnemyDistance(fopAc_ac_c*); + void runSoundProc(); + void runDrawProc(); + void runDebugDisp0(); + void runDebugDisp(); + void judgementButton(); + void judgementTriggerProc(); + void judgementLostCheck(); + void judgementStatusSw(u32); + void judgementStatusHd(u32); + void Run(u32); + void Draw(); + void LockonTarget(s32); + void LockonReleaseDistanse(); + void LockonTargetPId(s32); + void ActionTarget(s32); + void LockonTruth(); + void Lockon(); + +public: + /* 0x000 */ daPy_lk_c* mpPlayer; + /* 0x004 */ int mLockOnTargetBsPcID; + /* 0x008 */ dAttDraw_CallBack_c field_0x8; + /* 0x00C */ int mPlayerNo; + /* 0x010 */ u32 mFlagMask; + /* 0x014 */ u8 field_0x014[0x018 - 0x014]; + /* 0x018 */ u8 mLockOnState; + /* 0x019 */ u8 field_0x019; + /* 0x01A */ u8 field_0x01a; + /* 0x01B */ u8 field_0x01b; + /* 0x01C */ s16 field_0x01c; + /* 0x01E */ u8 field_0x01E[0x020 - 0x01E]; + /* 0x020 */ u32 mFlags; + /* 0x024 */ JKRHeap* mpHeap; + /* 0x028 */ u8 field_0x028; + /* 0x029 */ u8 field_0x029[0x054 - 0x029]; + /* 0x054 */ dAttList_c mLockOnList[8]; + /* 0x0D4 */ int mLockOnNum; + /* 0x0D8 */ int mLockOnOffs; + /* 0x0DC */ dAttList_c mActionList[4]; + /* 0x11C */ int mActionNum; + /* 0x120 */ int mActionOffs; + /* 0x124 */ dAttHint_c mHint; + /* 0x130 */ dAttCatch_c mCatch; + /* 0x148 */ dAttLook_c field_0x148; + /* 0x158 */ dAttLook_c field_0x158; + /* 0x168 */ int mEnemyBsPcId; + /* 0x16C */ f32 mEnemyDistance; + /* 0x170 */ dAttParam_c mAttParam; +}; // Size: 0x190 + +STATIC_ASSERT(sizeof(dAttention_c) == 0x190); + +#endif /* D_D_ATTENTION_H */ \ No newline at end of file diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index ad78e6a36..ca174f687 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -1,13 +1,17 @@ #ifndef D_COM_D_COM_INF_GAME_H #define D_COM_D_COM_INF_GAME_H +#include "d/d_attention.h" #include "d/d_bg_s.h" #include "d/d_cc_s.h" +#include "d/d_detect.h" +#include "d/d_drawlist.h" #include "d/d_event.h" #include "d/d_event_manager.h" #include "d/d_resorce.h" #include "d/d_save.h" #include "d/d_stage.h" +#include "d/d_vibration.h" class JKRArchive; class JKRExpHeap; @@ -27,6 +31,22 @@ class dTimer_c; class camera_class; class J2DOrthoGraph; +class __d_timer_info_c { +public: + __d_timer_info_c() { + mTimerMode = -1; + mTimerLimitTimeMs = 0; + mTimerNowTimeMs = 0; + mTimerPtr = NULL; + } + + /* 0x00 */ dTimer_c* mTimerPtr; + /* 0x04 */ s32 mTimerNowTimeMs; + /* 0x08 */ s32 mTimerLimitTimeMs; + /* 0x0C */ s32 mTimerMode; + /* 0x10 */ u8 mTimerType; +}; + class dADM { public: /* 0x00 */ int mBlockCount; @@ -41,37 +61,6 @@ class dADM { virtual ~dADM(); }; -// setup properly later -struct dAttention_c { - u8 temp[0x190]; -}; - -struct dVibration_c { - u8 temp[0x84]; -}; - -struct dDetect_c { - u8 temp[0x14]; -}; - -struct dDlst_list_c { - u8 temp[0x16234]; -}; - -class dDlst_window_c { -public: - /* 0x00 */ f32 mXOrig; - /* 0x04 */ f32 mYOrig; - /* 0x08 */ f32 mWidth; - /* 0x0C */ f32 mHeight; - /* 0x10 */ f32 mNearZ; - /* 0x14 */ f32 mFarZ; - /* 0x18 */ f32 mScissorXOrig; - /* 0x1C */ f32 mScissorYOrig; - /* 0x20 */ f32 mScissorWidth; - /* 0x24 */ f32 mScissorHeight; -}; - class dComIfG_camera_info_class { public: dComIfG_camera_info_class() {} @@ -85,8 +74,9 @@ class dComIfG_camera_info_class { /* 0x08 */ u32 mCameraAttentionStatus; /* 0x0C */ f32 mCameraZoomScale; /* 0x10 */ f32 mCameraZoomForcus; + /* 0x14 */ u8 field_0x14[0x34 - 0x14]; }; -STATIC_ASSERT(sizeof(dComIfG_camera_info_class) == 0x14); +STATIC_ASSERT(sizeof(dComIfG_camera_info_class) == 0x34); class dComIfG_play_c { public: @@ -95,7 +85,7 @@ class dComIfG_play_c { void ct(); void init(); void itemInit(); - void getLayerNo(int); + int getLayerNo(int i_roomNo); void createParticle(); void createDemo(); void removeDemo(); @@ -123,6 +113,27 @@ class dComIfG_play_c { ~dComIfG_play_c(); + const char* getStartStageName() { return mCurStage.getName(); } + s8 getStartStageRoomNo() { return mCurStage.getRoomNo(); } + s8 getStartStageLayer() { return mCurStage.getLayer(); } + s16 getStartStagePoint() { return mCurStage.getPoint(); } + void setStartStageLayer(s8 layer) { mCurStage.setLayer(layer); } + + const char* getNextStageName() { return mNextStage.getName(); } + dStage_startStage_c* getNextStartStage() { return &mNextStage; } + s8 getNextStageRoomNo() { return mNextStage.getRoomNo(); } + s8 getNextStageLayer() { return mNextStage.getLayer(); } + s16 getNextStagePoint() { return mNextStage.getPoint(); } + s8 getNextStageWipe() { return mNextStage.getWipe(); } + bool isEnableNextStage() { return mNextStage.isEnable(); } + void offEnableNextStage() { mNextStage.offEnable(); } + void setNextStage(const char* i_stageName, s8 i_roomNo, s16 i_point, s8 i_layer, s8 i_wipe) { + mNextStage.set(i_stageName, i_roomNo, i_point, i_layer, i_wipe); + } + + fopAc_ac_c* getPlayerPtr(int idx) { return (fopAc_ac_c*)mpPlayerPtr[idx]; } + fopAc_ac_c* getPlayer(int idx) { return (fopAc_ac_c*)mpPlayer[idx]; } + /* 0x0000 */ dBgS mBgS; /* 0x1404 */ dCcS mCcS; /* 0x3DF8 */ dADM mADM; @@ -175,10 +186,7 @@ class dComIfG_play_c { /* 0x4841 */ u8 field_0x4841; /* 0x4842 */ s16 mVrboxFlags; /* 0x4844 */ dDlst_window_c mDlstWindow[1]; - /* 0x486C */ u8 mCurCameraInfo; - /* 0x486D */ u8 field_0x486D[0x4870 - 0x486D]; /* 0x4870 */ dComIfG_camera_info_class mCameraInfo[1]; - /* 0x4884 */ u8 field_0x4884[0x48A4 - 0x4884]; /* 0x48A4 */ daPy_py_c* mpPlayer[1]; /* 0x48A8 */ s8 mCurCamera[1]; /* 0x48A9 */ u8 field_0x48A9[0x48AC - 0x48A9]; @@ -277,12 +285,7 @@ class dComIfG_play_c { /* 0x4A24 */ daAgb_c* mpAgb; /* 0x4A28 */ u32 mPlayerStatus[2][2]; /* 0x4A38 */ u8 field_0x4A38[0x4A40 - 0x4A38]; - /* 0x4A40 */ dTimer_c* mpRestartTimer; - /* 0x4A44 */ int field_0x4a44; - /* 0x4A48 */ int field_0x4a48; - /* 0x4A4C */ int field_0x4a4c; - /* 0x4A50 */ u16 field_0x4a50; - /* 0x4A52 */ u8 field_0x4A52[0x4A54 - 0x4A52]; + /* 0x4A40 */ __d_timer_info_c mTimerInfo; /* 0x4A54 */ dDlst_window_c* field_0x4a54; /* 0x4A58 */ camera_class* field_0x4a58; /* 0x4A5C */ dDlst_window_c* field_0x4a5c; @@ -333,18 +336,114 @@ inline BOOL dComIfGs_isEventBit(u16 id) { return g_dComIfG_gameInfo.info.getEvent().isEventBit(id); } +inline void dComIfGs_setRestartRoomParam(u32 i_param) { + g_dComIfG_gameInfo.info.getRestart().setRoomParam(i_param); +} + +inline void dComIfGs_setStartPoint(s16 i_point) { + g_dComIfG_gameInfo.info.getRestart().setStartPoint(i_point); +} + +inline int dComIfGs_getTriforceNum() { + return g_dComIfG_gameInfo.info.getPlayer().getCollect().getTriforceNum(); +} + /** * === PLAY === */ +void dComIfGp_setNextStage(const char* i_stageName, s16 i_point, s8 i_roomNo, s8 i_layer, + f32 i_lastSpeed, u32 i_lastMode, int, s8 i_wipe); + +inline const char* dComIfGp_getStartStageName() { + return g_dComIfG_gameInfo.play.getStartStageName(); +} + +inline s8 dComIfGp_getStartStageRoomNo() { + return g_dComIfG_gameInfo.play.getStartStageRoomNo(); +} + +inline s8 dComIfGp_getStartStageLayer() { + return g_dComIfG_gameInfo.play.getStartStageLayer(); +} + +inline s16 dComIfGp_getStartStagePoint() { + return g_dComIfG_gameInfo.play.getStartStagePoint(); +} + +inline void dComIfGp_offEnableNextStage() { + g_dComIfG_gameInfo.play.offEnableNextStage(); +} + +inline const char* dComIfGp_getNextStageName() { + return g_dComIfG_gameInfo.play.getNextStageName(); +} + +inline dStage_startStage_c* dComIfGp_getNextStartStage() { + return g_dComIfG_gameInfo.play.getNextStartStage(); +} + +inline s8 dComIfGp_getNextStageRoomNo() { + return g_dComIfG_gameInfo.play.getNextStageRoomNo(); +} + +inline s8 dComIfGp_getNextStageLayer() { + return g_dComIfG_gameInfo.play.getNextStageLayer(); +} + +inline s32 dComIfGp_getNextStageWipe() { + return g_dComIfG_gameInfo.play.getNextStageWipe(); +} + +inline bool dComIfGp_isEnableNextStage() { + return g_dComIfG_gameInfo.play.isEnableNextStage(); +} + +inline s16 dComIfGp_getNextStagePoint() { + return g_dComIfG_gameInfo.play.getNextStagePoint(); +} + +inline fopAc_ac_c* dComIfGp_getPlayer(int idx) { + return g_dComIfG_gameInfo.play.getPlayer(idx); +} + +inline daPy_lk_c* daPy_getPlayerLinkActorClass() { + return (daPy_lk_c*)g_dComIfG_gameInfo.play.getPlayerPtr(0); +} + /** * === RESOURCE === */ +class request_of_phase_process_class; int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* arc_name); int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* resName, JKRHeap* heap); int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* resName); +inline int dComIfG_setObjectRes(const char* name, u8 param_1, JKRHeap* heap) { + return g_dComIfG_gameInfo.mResControl.setObjectRes(name, param_1, heap); +} + +inline int dComIfG_setObjectRes(const char* name, void* param_1, u32 param_2) { + return g_dComIfG_gameInfo.mResControl.setObjectRes(name, param_1, param_2, NULL); +} + +inline int dComIfG_setStageRes(const char* name, JKRHeap* heap) { + return g_dComIfG_gameInfo.mResControl.setStageRes(name, heap); +} + +inline int dComIfG_syncObjectRes(const char* name) { + return g_dComIfG_gameInfo.mResControl.syncObjectRes(name); +} + +inline int dComIfG_syncStageRes(const char* name) { + return g_dComIfG_gameInfo.mResControl.syncStageRes(name); +} + +inline int dComIfG_deleteObjectResMain(const char* res) { + return g_dComIfG_gameInfo.mResControl.deleteObjectRes(res); +} + inline int dComIfG_deleteStageRes(const char* res) { return g_dComIfG_gameInfo.mResControl.deleteStageRes(res); } diff --git a/include/d/d_detect.h b/include/d/d_detect.h new file mode 100644 index 000000000..3395494d2 --- /dev/null +++ b/include/d/d_detect.h @@ -0,0 +1,29 @@ +#ifndef D_D_DETECT_H +#define D_D_DETECT_H + +#include "SSystem/SComponent/c_xyz.h" + +class dDetectPlace_c { +public: + /* 0x00 */ cXyz mPos; + /* 0x0C */ s16 mEnable; +}; + +class dDetect_c { +public: + dDetect_c(); + ~dDetect_c(); + + void proc(); + void chk_quake(const cXyz*) const; + void set_quake(const cXyz*); + void chk_quake_area(const cXyz*) const; + void search_tag_light(void*, void*); + void chk_light(const cXyz*) const; + void chk_attention(cXyz*) const; + + /* 0x00 */ dDetectPlace_c mPlace[1]; + /* 0x10 */ s16 mTimer; +}; // Size: 0x14 + +#endif /* D_D_DETECT_H */ \ No newline at end of file diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h new file mode 100644 index 000000000..c9187c272 --- /dev/null +++ b/include/d/d_drawlist.h @@ -0,0 +1,216 @@ +#ifndef D_D_DRAWLIST_H +#define D_D_DRAWLIST_H + +#include "f_op/f_op_view.h" +#include "global.h" +#include "m_Do/m_Do_ext.h" + +class dDlst_base_c { +public: + dDlst_base_c() {} + virtual void draw(); +}; + +class dDlst_window_c { +public: + dDlst_window_c() {} + ~dDlst_window_c() {} + void setViewPort(f32, f32, f32, f32, f32, f32); + void setScissor(f32, f32, f32, f32); + + view_port_class* getViewPort() { return &mViewport; } + +private: + /* 0x00 */ view_port_class mViewport; + /* 0x28 */ s8 mCameraID; + /* 0x29 */ s8 mMode; +}; + +STATIC_ASSERT(sizeof(dDlst_window_c) == 0x2C); + +class dDlst_peekZ_c { +public: + struct dDlst_peekZ_entry { + /* 0x0 */ s16 x; + /* 0x2 */ s16 y; + /* 0x4 */ u32* dst; + }; + + dDlst_peekZ_c() { mCount = 0; } + int newData(s16, s16, u32*); + void peekData(); + + /* 0x0 */ u8 mCount; + /* 0x4 */ dDlst_peekZ_entry mEntries[50]; +}; // Size: 0x194 + +STATIC_ASSERT(sizeof(dDlst_peekZ_c) == 0x194); + +class dDlst_shadowSimple_c { +public: + void draw(); + void set(cXyz*, f32, f32, cXyz*, s16, f32, GXTexObj*); + dDlst_shadowSimple_c(); + + /* 0x00 */ u8 mAlpha; + /* 0x04 */ GXTexObj* mpTexObj; + /* 0x08 */ Mtx mVolumeMtx; + /* 0x38 */ Mtx mMtx; +}; // Size: 0x68 + +struct cBgD_Vtx_t; + +class dDlst_shadowTri_c { +public: + ~dDlst_shadowTri_c() {} + dDlst_shadowTri_c() {} + + /* 0x0 */ cXyz mPos[3]; +}; + +class dDlst_shadowPoly_c { +public: + dDlst_shadowPoly_c() { + reset(); + } + + void reset() { mCount = 0; } + + int set(cBgD_Vtx_t*, u16, u16, u16, cM3dGPla*); + void draw(); + + virtual dDlst_shadowTri_c* getTri() = 0; + virtual s32 getTriMax() = 0; + + /* 0x4 */ u16 mCount; + /* 0x6 */ u8 field_0x6[2]; +}; + +class dDlst_shadowRealPoly_c : public dDlst_shadowPoly_c { +public: + virtual dDlst_shadowTri_c* getTri(); + virtual s32 getTriMax(); + + /* 0x8 */ dDlst_shadowTri_c mShadowTri[256]; +}; + +class J3DCallBackPacket; +class dKy_tevstr_c; +class dDlst_shadowReal_c { +public: + void reset(); + void imageDraw(f32 (*)[4]); + void draw(); + u32 set(u32, J3DModel*, cXyz*, f32, f32, dKy_tevstr_c*, f32, f32); + bool add(J3DModel*); + ~dDlst_shadowReal_c() {} + dDlst_shadowReal_c() { mState = 0; } + + bool isNoUse() { return mState == 0; } + bool isUse() { return mState == 1; } + bool checkKey(u32 i_key) { return mKey == i_key; } + +private: + /* 0x0000 */ u8 mState; + /* 0x0001 */ u8 field_0x1; + /* 0x0002 */ u8 mModelNum; + /* 0x0003 */ u8 field_0x3; + /* 0x0004 */ u32 mKey; + /* 0x0008 */ Mtx mViewMtx; + /* 0x0038 */ Mtx44 mRenderProjMtx; + /* 0x0078 */ Mtx mReceiverProjMtx; + /* 0x00A8 */ void* mpTexData; + /* 0x00AC */ dDlst_shadowRealPoly_c mShadowRealPoly; + /* 0x24B4 */ GXTexObj mTexData; + /* 0x24D4 */ J3DDrawBuffer* mpDrawBuffer; + /* 0x24D8 */ J3DCallBackPacket* mpPacket; + /* 0x24DC */ J3DModel* mpModels[26]; +}; // Size: 0x2544 + +class dDlst_shadowControl_c { +public: + void init(); + void reset(); + void imageDraw(f32 (*)[4]); + void draw(f32 (*)[4]); + int setReal(u32, s8, J3DModel*, cXyz*, f32, f32, dKy_tevstr_c*); + bool addReal(u32, J3DModel*); + int setSimple(cXyz*, f32, f32, cXyz*, s16, f32, GXTexObj*); + static void setSimpleTex(ResTIMG const*); + + static GXTexObj* getSimpleTex() { return &mSimpleTexObj; } + + static GXTexObj mSimpleTexObj; + +private: + /* 0x00000 */ u8 mRealNum; + /* 0x00001 */ u8 mSimpleNum; + /* 0x00004 */ dDlst_shadowSimple_c mSimple[128]; + /* 0x03404 */ int mNextID; + /* 0x03408 */ dDlst_shadowReal_c mReal[8]; +}; // Size: 0x15E28 + +STATIC_ASSERT(sizeof(dDlst_shadowControl_c) == 0x15E28); + +struct view_port_class; +struct view_class; +struct camera_class; +struct dDlst_alphaModel_c; + +class dDlst_list_c { +public: + dDlst_list_c(); + ~dDlst_list_c(); + + void init(); + void reset(); + void entryZSortXluDrawList(J3DDrawBuffer*, J3DPacket*, cXyz&); + void set(dDlst_base_c**&, dDlst_base_c**&, dDlst_base_c*); + void draw(dDlst_base_c**, dDlst_base_c**); + void wipeIn(f32, GXColor&); + void wipeIn(f32); + void calcWipe(); + void set2DOpa(dDlst_base_c*); + +private: + /* 0x00000 */ J3DDrawBuffer* mpBufSkyOpa; + /* 0x00004 */ J3DDrawBuffer* mpBufSkyXlu; + /* 0x00008 */ J3DDrawBuffer* mpLinkBuf; + /* 0x0000C */ J3DDrawBuffer* field_0x0000c; + /* 0x00010 */ J3DDrawBuffer* field_0x00010; + /* 0x00014 */ J3DDrawBuffer* mpBufWorldOpa; + /* 0x00018 */ J3DDrawBuffer* mpBufWorldXlu; + /* 0x0001C */ J3DDrawBuffer* mpBufInvisibleModelOpa; + /* 0x00020 */ J3DDrawBuffer* mpBufInvisibleModelXlu; + /* 0x00024 */ J3DDrawBuffer* mpWetherFxBuffer; + /* 0x00028 */ J3DDrawBuffer* mpBufInvisibleModelMaskOffOpa; + /* 0x0002C */ J3DDrawBuffer* mpBufInvisibleModelMaskOffXlu; + /* 0x00030 */ J3DDrawBuffer* field_0x00030; + /* 0x00034 */ J3DDrawBuffer* field_0x00034; + /* 0x00038 */ J3DDrawBuffer* field_0x00038; + /* 0x0003C */ u8 field_0x0003C[0x00050 - 0x0003C]; + /* 0x00050 */ void* field_0x00050; + /* 0x00054 */ u8 field_0x00054[0x00094 - 0x00054]; + /* 0x00094 */ dDlst_base_c** field_0x00094; + /* 0x00098 */ void* field_0x00098; + /* 0x0009C */ dDlst_base_c* mp2DArr[64]; + /* 0x0019C */ dDlst_base_c** mp2DOpa; + /* 0x001A0 */ dDlst_base_c*** mp2DOpaEnd; + /* 0x001A4 */ u8 field_0x001A4[0x00224 - 0x001A4]; + /* 0x00224 */ dDlst_base_c** field_0x00224; + /* 0x00228 */ dDlst_base_c*** field_0x00228; + /* 0x0022C */ dDlst_window_c* field_0x0022c; + /* 0x00230 */ dDlst_window_c* field_0x00230; + /* 0x00234 */ camera_class* mpCamera; + /* 0x00238 */ u8 field_0x00238[0x00244 - 0x00238]; + /* 0x00244 */ dDlst_alphaModel_c* mpAlphaModel0; + /* 0x00248 */ dDlst_alphaModel_c* mpAlphaModel2; + /* 0x0024C */ dDlst_alphaModel_c* mpAlphaModel1; + /* 0x00250 */ dDlst_shadowControl_c mShadowControl; + /* 0x16078 */ mDoExt_3DlineMatSortPacket m3DLineMatSortPacket[2]; + /* 0x160A0 */ dDlst_peekZ_c mPeekZ; +}; // Size: 0x16234 + +STATIC_ASSERT(sizeof(dDlst_list_c) == 0x16234); + +#endif /* D_D_DRAWLIST_H */ \ No newline at end of file diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h index b1e23c771..9ab5f2885 100644 --- a/include/d/d_kankyo.h +++ b/include/d/d_kankyo.h @@ -64,6 +64,8 @@ struct dScnKy_env_light_c { extern dScnKy_env_light_c g_env_light; +int dKy_getdaytime_hour(); +BOOL dKy_checkEventNightStop(); #endif /* D_KANKYO_D_KANKYO_H */ diff --git a/include/d/d_save.h b/include/d/d_save.h index 08625f17e..242255468 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -302,8 +302,12 @@ STATIC_ASSERT(sizeof(dSv_player_status_b_c) == 0x18); class dSv_player_return_place_c { public: - /* 80058B84 */ void init(); - /* 80058BC8 */ void set(char const*, s8, u8); + void init(); + void set(char const*, s8, u8); + + s8 getRoomNo() const { return mRoomNo; } + u8 getPlayerStatus() const { return mPlayerStatus; } + char* getName() { return mName; } /* 0x00 */ char mName[8]; /* 0x08 */ s8 mRoomNo; @@ -743,17 +747,26 @@ class dSv_restart_c { /* 8005D4C8 */ void setRestartOption(s8); /* 8005D584 */ void setRestartOption(s8, cXyz*, s16, s8); + void setRoomParam(u32 param) { mRestartParam = param; } + void setStartPoint(s16 point) { mStartCode = point; } + void setLastSceneInfo(f32 speed, u32 mode) { + mLastSpeedF = speed; + mLastMode = mode; + } + /* 0x00 */ s8 mRestartRoom; /* 0x01 */ u8 field_0x1; /* 0x02 */ s8 mRoomNo; /* 0x04 */ s16 field_0x4; /* 0x06 */ s16 mRoomAngleY; /* 0x08 */ cXyz mRoomPos; - /* 0x14 */ u16 mStartCode; + /* 0x14 */ s16 mStartCode; /* 0x16 */ s16 mRestartAngle; /* 0x18 */ cXyz mRestartPos; /* 0x24 */ u32 mRestartParam; -}; // Size: 0x28 + /* 0x28 */ f32 mLastSpeedF; + /* 0x2C */ u32 mLastMode; +}; // Size: 0x30 class dSv_turnRestart_c { public: @@ -810,6 +823,7 @@ class dSv_info_c { dSv_player_c& getPlayer() { return mSavedata.getPlayer(); } dSv_event_c& getEvent() { return mSavedata.getEvent(); } + dSv_restart_c& getRestart() { return mRestart; } static const int MEMORY_SWITCH = 0x80; static const int DAN_SWITCH = 0x40; @@ -826,8 +840,6 @@ class dSv_info_c { /* 0x079C */ dSv_danBit_c mDan; /* 0x07A8 */ dSv_zone_c mZone[ZONE_MAX]; /* 0x1128 */ dSv_restart_c mRestart; - /* 0x1150 */ f32 field_0x1150; - /* 0x1154 */ int field_0x1154; /* 0x1158 */ dSv_event_c mTmp; /* 0x1258 */ dSv_turnRestart_c mTurnRestart; /* 0x1290 */ u8 field_0x1290; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index c185efbfe..6376fa04b 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -463,7 +463,7 @@ class dStage_nextStage_c : public dStage_startStage_c { dStage_nextStage_c() { mEnable = 0; // TODO: maybe wrong } - void set(const char*, s8, s16, s8, s8, u8); + void set(const char*, s8, s16, s8, s8); void offEnable() { mEnable = 0; } s8 isEnable() const { return mEnable; } s8 getWipe() const { return mWipe; } diff --git a/include/d/d_vibration.h b/include/d/d_vibration.h new file mode 100644 index 000000000..af7dba404 --- /dev/null +++ b/include/d/d_vibration.h @@ -0,0 +1,26 @@ +#ifndef D_D_VIBRATION_H +#define D_D_VIBRATION_H + +#include "SSystem/SComponent/c_xyz.h" + +class dVibration_c { +public: + dVibration_c(); + ~dVibration_c(); + + int Run(); + bool StartShock(int i_strength, int, cXyz); + bool StartQuake(u8 const*, int, int, cXyz); + bool StartQuake(int, int, cXyz); + int StopQuake(int); + void Kill(); + bool CheckQuake(); + void setDefault(); + void Init(); + void Pause(); + void Remove(); + + u8 temp[0x84]; +}; // Size: 0x84 + +#endif /* D_D_VIBRATION_H */ \ No newline at end of file diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h new file mode 100644 index 000000000..ddfbc9444 --- /dev/null +++ b/include/m_Do/m_Do_audio.h @@ -0,0 +1,6 @@ +#ifndef M_DO_AUDIO_H +#define M_DO_AUDIO_H + +void mDoAud_setSceneName(const char*, s32, s32); + +#endif /* M_DO_AUDIO_H */ diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 3772bdac6..d0e9ca84d 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -97,6 +97,31 @@ class mDoExt_bckAnm : public mDoExt_baseAnm { STATIC_ASSERT(sizeof(mDoExt_bckAnm) == 0x10); +class mDoExt_McaMorfCallBack1_c { +public: + virtual void execute(u16, J3DTransformInfo*) = 0; +}; + +class mDoExt_3DlineMat_c { +public: + /* 0x0 */ void* field_0x0; + /* 0x4 */ mDoExt_3DlineMat_c* field_0x4; +}; + +class mDoExt_3DlineMatSortPacket : public J3DPacket { +public: + mDoExt_3DlineMatSortPacket() { mp3DlineMat = NULL; } + + void reset() { mp3DlineMat = NULL; } + + void setMat(mDoExt_3DlineMat_c*); + virtual void draw(); + virtual ~mDoExt_3DlineMatSortPacket(); + +private: + /* 0x10 */ mDoExt_3DlineMat_c* mp3DlineMat; +}; + J3DModel* mDoExt_J3DModel__create(J3DModelData* i_modelData, u32 i_modelFlag, u32 i_differedDlistFlag); void mDoExt_modelUpdate(J3DModel* i_model); diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index 658b5a5cc..a14eb803d 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -4,7 +4,13 @@ // #include "d/d_com_inf_game.h" +#include "JSystem/JUtility/JUTAssert.h" +#include "MSL_C/string.h" #include "SSystem/SComponent/c_phase.h" +#include "d/actor/d_a_player.h" +#include "d/d_com_lib_game.h" +#include "f_op/f_op_scene_mng.h" +#include "m_Do/m_Do_audio.h" class J3DModel; @@ -96,8 +102,84 @@ void dComIfG_play_c::itemInit() { } /* 80052400-8005286C .text getLayerNo__14dComIfG_play_cFi */ -void dComIfG_play_c::getLayerNo(int) { - /* Nonmatching */ +// almost +int dComIfG_play_c::getLayerNo(int i_roomNo) { + int layer = dComIfGp_getStartStageLayer(); + + if (layer < 0) { + int hour = dKy_getdaytime_hour(); + if (dKy_checkEventNightStop()) { + layer = 1; + } else { + layer = (hour >= 6 && hour < 18) == 0; + } + + if (strcmp(dComIfGp_getStartStageName(), "sea") == 0) { + if (i_roomNo == 44) { + if (dComIfGs_isEventBit(0x520)) { + return layer | 4; + } else if (dComIfGs_isEventBit(0xE20)) { + return layer | 2; + } else if (dComIfGs_isEventBit(0x101)) { + return 9; + } + } else if (i_roomNo == 11) { + if (dComIfGs_isEventBit(0x2D01)) { + return layer | 4; + } else if (dKy_checkEventNightStop()) { + return layer | 2; + } + } else if (i_roomNo == 1) { + return dComIfGs_isEventBit(0x1820) ? 3 : 1; + } + } else if (strcmp(dComIfGp_getStartStageName(), "A_mori") == 0) { + if (dComIfGs_isEventBit(0xF80)) { + return layer | 2; + } + } else if (strcmp(dComIfGp_getStartStageName(), "Asoko") == 0) { + if (dComIfGs_isEventBit(0x520)) { + return layer | 2; + } + } else if (strcmp(dComIfGp_getStartStageName(), "Hyrule") == 0) { + if (dComIfGs_getTriforceNum() == 8) { + return layer | 4; + } else if (dComIfGs_isEventBit(0x3280)) { + return layer | 2; + } + } else if (strcmp(dComIfGp_getStartStageName(), "Hyroom") == 0) { + if (dComIfGs_getTriforceNum() == 8 && !dComIfGs_isEventBit(0x2C01)) { + return layer | 4; + } else if (dComIfGs_isEventBit(0x3280)) { + return layer | 2; + } else if (dComIfGs_isEventBit(0x3B40)) { + return layer | 6; + } + } else if (strcmp(dComIfGp_getStartStageName(), "kenroom") == 0) { + if (dComIfGs_isEventBit(0x2C01) || + (dComIfGs_isEventBit(0x3802) && !dComIfGs_isEventBit(0x3280))) + { + return layer | 6; + } else if (dComIfGs_getTriforceNum() == 8) { + return layer | 4; + } else if (dComIfGs_isEventBit(0x3802)) { + return layer | 2; + } + } else if (strcmp(dComIfGp_getStartStageName(), "M2tower") == 0) { + if (dComIfGs_isEventBit(0x2D01)) { + return layer | 2; + } + } else if (strcmp(dComIfGp_getStartStageName(), "GanonK") == 0) { + if (!dComIfGs_isEventBit(0x3B02)) { + return 8; + } + } else if (strcmp(dComIfGp_getStartStageName(), "GTower") == 0 && + !dComIfGs_isEventBit(0x4002)) + { + return 8; + } + } + + return layer; } /* 8005286C-800528F4 .text createParticle__14dComIfG_play_cFv */ @@ -262,8 +344,18 @@ void dComIfG_inf_c::ct() { } /* 800531A8-8005326C .text dComIfG_changeOpeningScene__FP11scene_classs */ -void dComIfG_changeOpeningScene(scene_class*, s16) { - /* Nonmatching */ +// matches with stringbase offset +int dComIfG_changeOpeningScene(scene_class* i_scene, s16 i_procName) { + dComIfGp_offEnableNextStage(); + + dComIfGp_setNextStage("sea_T", 0, 44, 0, 0.0f, 0, 1, 0); + mDoAud_setSceneName(dComIfGp_getNextStageName(), dComIfGp_getNextStageRoomNo(), + dComIfGp_getNextStageLayer()); + dComIfGs_setRestartRoomParam(0); + + fopScnM_ChangeReq(i_scene, i_procName, 0, 30); + fopScnM_ReRequest(i_procName, 0); + return 1; } /* 8005326C-800532D8 .text dComIfG_resetToOpening__FP11scene_class */ @@ -272,36 +364,59 @@ void dComIfG_resetToOpening(scene_class*) { } /* 800532D8-80053330 .text phase_1__FPc */ -void phase_1(char*) { - /* Nonmatching */ +// matches with stringbase +int phase_1(char* i_arcName) { + return !dComIfG_setObjectRes(i_arcName, (u8)0, NULL) ? cPhs_ERROR_e : cPhs_NEXT_e; } /* 80053330-80053388 .text phase_2__FPc */ -void phase_2(char*) { - /* Nonmatching */ +int phase_2(char* i_arcName) { + int syncStatus = dComIfG_syncObjectRes(i_arcName); + + if (syncStatus < 0) { + return cPhs_ERROR_e; + } else { + return syncStatus > 0 ? 0 : 2; + } } /* 80053388-80053390 .text phase_3__FPc */ -int phase_3(char*) { +int phase_3(char* i_arcName) { return cPhs_COMPLEATE_e; } /* 80053390-800533D0 .text dComIfG_resLoad__FP30request_of_phase_process_classPCc */ -void dComIfG_resLoad(request_of_phase_process_class*, const char*) { - /* Nonmatching */ +int dComIfG_resLoad(request_of_phase_process_class* i_phase, const char* i_arcName) { + static int (*l_method[3])(void*) = {(int (*)(void*))phase_1, (int (*)(void*))phase_2, + (int (*)(void*))phase_3}; + + if (i_phase->id == cPhs_NEXT_e) { + return cPhs_COMPLEATE_e; + } + + return dComLbG_PhaseHandler(i_phase, l_method, (void*)i_arcName); } /* 800533D0-8005347C .text dComIfG_resDelete__FP30request_of_phase_process_classPCc */ -void dComIfG_resDelete(request_of_phase_process_class*, const char*) { - /* Nonmatching */ +// matches with stringbase +int dComIfG_resDelete(request_of_phase_process_class* i_phase, const char* i_resName) { + JUT_ASSERT(1048, i_phase->id != 1); + + if (i_phase->id == cPhs_NEXT_e) { + dComIfG_deleteObjectResMain(i_resName); + i_phase->id = cPhs_INIT_e; + } + + return 0; } /* 8005347C-800534C4 .text dComIfGp_getReverb__Fi */ -void dComIfGp_getReverb(int) { +s8 dComIfGp_getReverb(int) { /* Nonmatching */ } -/* 800534C4-800535B8 .text dComIfGd_setSimpleShadow2__FP4cXyzffR13cBgS_PolyInfosfP9_GXTexObj */ +/* 800534C4-800535B8 .text dComIfGd_setSimpleShadow2__FP4cXyzffR13cBgS_PolyInfosfP9_GXTexObj + */ void dComIfGd_setSimpleShadow2(cXyz*, f32, f32, cBgS_PolyInfo&, s16, f32, _GXTexObj*) { /* Nonmatching */ } @@ -327,8 +442,28 @@ void dComIfGp_getRoomArrow(int) { } /* 800537C8-8005388C .text dComIfGp_setNextStage__FPCcsScScfUliSc */ -void dComIfGp_setNextStage(const char*, s16, s8, s8, f32, u32, int, s8) { - /* Nonmatching */ +void dComIfGp_setNextStage(const char* i_stageName, s16 i_point, s8 i_roomNo, s8 i_layer, + f32 i_lastSpeed, u32 i_lastMode, int i_setPoint, s8 i_wipe) { + g_dComIfG_gameInfo.play.setNextStage(i_stageName, i_roomNo, i_point, i_layer, i_wipe); + + if (daPy_getPlayerLinkActorClass() != NULL) { + u32 mode = daPy_getPlayerLinkActorClass()->field_0x2a0; + + if (mode & 1) { + i_lastMode |= 0x8000; + } + + i_lastMode |= daPy_getPlayerLinkActorClass()->field_0x354e << 0x10; + + if (mode & 0x8000) { + i_lastMode |= 0x4000; + } + } + + g_dComIfG_gameInfo.info.getRestart().setLastSceneInfo(i_lastSpeed, i_lastMode); + if (i_setPoint) { + dComIfGs_setStartPoint(i_point); + } } /* 8005388C-80053918 .text dComIfGs_onStageTbox__Fii */ @@ -366,8 +501,10 @@ void dComIfGs_checkGetItemNum(u8) { /* Nonmatching */ } -/* 80054578-8005468C .text dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj */ -void dComIfGd_setShadow(u32, s8, J3DModel*, cXyz*, f32, f32, f32, f32, cBgS_PolyInfo&, dKy_tevstr_c*, s16, f32, _GXTexObj*) { +/* 80054578-8005468C .text + * dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj */ +void dComIfGd_setShadow(u32, s8, J3DModel*, cXyz*, f32, f32, f32, f32, cBgS_PolyInfo&, + dKy_tevstr_c*, s16, f32, _GXTexObj*) { /* Nonmatching */ } @@ -393,7 +530,12 @@ void dComIfGs_setGameStartStage() { /* 80054C70-80054CC0 .text dComIfGs_gameStart__Fv */ void dComIfGs_gameStart() { - /* Nonmatching */ + dComIfGp_offEnableNextStage(); + + s8 roomNo = g_dComIfG_gameInfo.info.getPlayer().getPlayerReturnPlace().getRoomNo(); + s16 point = g_dComIfG_gameInfo.info.getPlayer().getPlayerReturnPlace().getPlayerStatus(); + char* name = g_dComIfG_gameInfo.info.getPlayer().getPlayerReturnPlace().getName(); + dComIfGp_setNextStage(name, point, roomNo, -1, 0.0f, 0, 1, 0); } /* 80054CC0-80054E9C .text dComIfGs_copyPlayerRecollectionData__Fv */ @@ -420,4 +562,3 @@ void dComIfGs_exchangePlayerRecollectionData() { void dComIfGs_setSelectEquip(int, u8) { /* Nonmatching */ } - From 2df2da338d38ab07094e3d562f31ca0111ce7b68 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sun, 10 Sep 2023 17:47:40 -0700 Subject: [PATCH 2/2] set up most of player actor stuff --- include/JAZelAudio/JAIZelBasic.h | 9 + include/SSystem/SComponent/c_cc_d.h | 2 + include/SSystem/SComponent/c_m3d_g_tri.h | 1 + include/d/actor/d_a_player.h | 1223 +++++++++++++++++++++- include/d/d_bg_s_acch.h | 208 ++++ include/d/d_bg_s_chk.h | 16 + include/d/d_bg_s_gnd_chk.h | 61 ++ include/d/d_bg_s_grp_pass_chk.h | 30 + include/d/d_bg_s_lin_chk.h | 83 ++ include/d/d_bg_s_poly_pass_chk.h | 17 + include/d/d_bg_s_roof_chk.h | 29 + include/d/d_bg_s_spl_grp_chk.h | 40 + include/d/d_bg_s_wtr_chk.h | 13 + include/d/d_cc_d.h | 395 +++++++ include/d/d_com_inf_game.h | 2 + include/d/d_drawlist.h | 11 + include/m_Do/m_Do_ext.h | 127 +++ 17 files changed, 2257 insertions(+), 10 deletions(-) create mode 100644 include/JAZelAudio/JAIZelBasic.h create mode 100644 include/d/d_bg_s_acch.h create mode 100644 include/d/d_bg_s_chk.h create mode 100644 include/d/d_bg_s_gnd_chk.h create mode 100644 include/d/d_bg_s_grp_pass_chk.h create mode 100644 include/d/d_bg_s_lin_chk.h create mode 100644 include/d/d_bg_s_poly_pass_chk.h create mode 100644 include/d/d_bg_s_roof_chk.h create mode 100644 include/d/d_bg_s_spl_grp_chk.h create mode 100644 include/d/d_bg_s_wtr_chk.h create mode 100644 include/d/d_cc_d.h diff --git a/include/JAZelAudio/JAIZelBasic.h b/include/JAZelAudio/JAIZelBasic.h new file mode 100644 index 000000000..842b90c45 --- /dev/null +++ b/include/JAZelAudio/JAIZelBasic.h @@ -0,0 +1,9 @@ +#ifndef JAZELAUDIO_JAIZELBASIC_H +#define JAZELAUDIO_JAIZELBASIC_H + +class JAIZelAnime { +public: + /* 0x0 */ u8 field_0x0[0x98]; +}; + +#endif /* JAZELAUDIO_JAIZELBASIC_H */ \ No newline at end of file diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index d9da0cf5b..864b991c8 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -77,6 +77,8 @@ struct cCcD_SrcTriAttr { class cCcD_TriAttr : public cCcD_ShapeAttr, public cM3dGTri { public: + cCcD_TriAttr() {} + virtual void CalcAabBox(); virtual bool GetNVec(cXyz const&, cXyz*) const; virtual bool CrossAtTg(cCcD_CpsAttr const&, cXyz*) const; diff --git a/include/SSystem/SComponent/c_m3d_g_tri.h b/include/SSystem/SComponent/c_m3d_g_tri.h index 686a172b0..adafbc76f 100644 --- a/include/SSystem/SComponent/c_m3d_g_tri.h +++ b/include/SSystem/SComponent/c_m3d_g_tri.h @@ -20,6 +20,7 @@ class cM3dGTri : public cM3dGPla { Vec mB; Vec mC; + cM3dGTri() {} cM3dGTri(const Vec *pA, const Vec *pB, const Vec *pC); bool cross(const cM3dGCyl*, Vec*) const; }; diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index b4285834f..eb5aa6ab7 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -1,14 +1,50 @@ #ifndef D_D_A_PLAYER_H #define D_D_A_PLAYER_H +#include "JAZelAudio/JAIZelBasic.h" #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" #include "d/d_attention.h" +#include "d/d_bg_s_acch.h" +#include "d/d_bg_s_lin_chk.h" +#include "d/d_cc_d.h" +#include "d/d_drawlist.h" #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_ext.h" class mDoExt_MtxCalcOldFrame; class daPy_matAnm_c; +class daPy_HIO_c; + +class daPy_demo_c { +public: + void setDemoType(u16 pType) { mDemoType = pType; } + int getDemoType() const { return mDemoType; } + void setDemoMode(u32 mode) { mDemoMode = mode; } + u32 getDemoMode() const { return mDemoMode; } + int getParam1() const { return mParam1; } + void setOriginalDemoType() { setDemoType(3); } + void setSpecialDemoType() { setDemoType(5); } + void setSystemDemoType() { setDemoType(2); } + void setStick(f32 stick) { mStick = stick; } + void setMoveAngle(s16 angle) { mDemoMoveAngle = angle; } + s16 getMoveAngle() const { return mDemoMoveAngle; } + f32 getStick() { return mStick; } + int getParam0() const { return mParam0; } + void setParam0(int value) { mParam0 = value; } + void setParam1(int value) { mParam1 = value; } + void setParam2(int value) { mParam2 = value; } + +private: + /* 0x00 */ u16 mDemoType; + /* 0x02 */ s16 mDemoMoveAngle; + /* 0x04 */ s16 mTimer; + /* 0x06 */ s16 mParam2; + /* 0x08 */ int mParam0; + /* 0x0C */ int mParam1; + /* 0x10 */ u32 mDemoMode; + /* 0x14 */ f32 mStick; +}; // Size: 0x18 class daPy_py_c : public fopAc_ac_c { public: @@ -33,22 +69,1178 @@ class daPy_py_c : public fopAc_ac_c { /* 0x2F8 */ f32 field_0x2f8; /* 0x2FC */ u8 field_0x2FC[0x300 - 0x2FC]; /* 0x300 */ f32 field_0x300; + /* 0x304 */ daPy_demo_c mDemo; + /* 0x31C */ void* vtbl; + + void onFrollCrashFlg(u32); + void getGrabActorID() const; + void getBokoFlamePos(cXyz*); + void setPlayerPosAndAngle(cXyz*, s16); + void getSwordTopPos() const; + void checkPlayerFly() const; + void checkPlayerNoDraw(); + void getLeftHandPos() const; + void checkPlayerGuard() const; + void getRopeJumpLand() const; + void checkRopeReadyAnime() const; + void checkRopeForceEnd() const; + void getHeadTopPos() const; + void changePlayer(fopAc_ac_c*); + void objWindHitCheck(dCcD_Cyl*); + void setDoButtonQuake(); + void stopDoButtonQuake(int); + void getTactMusic() const; + void getTactTimerCancel() const; + void getGrabMissActor(); + void checkFrontRoll() const; + void checkBottleSwing() const; + void checkCutCharge() const; + void checkTactWait() const; + void setTactZev(u32, int, char*); + void onDekuSpReturnFlg(u8); + void checkComboCutTurn() const; + void getItemID() const; + void getThrowBoomerangID() const; + void checkGrabBarrel(); + void checkRopeTag(); + void voiceStart(u32); + void setOutPower(f32, s16, int); + void getModelJointMtx(u16); + void getOldSpeedY(); + void setHookshotCarryOffset(u32, cXyz const*); + void setPlayerPosAndAngle(f32*[][][][]); + void setPlayerPosAndAngle(cXyz*, csXyz*); + void setThrowDamage(cXyz*, s16, f32, f32, int); + void changeTextureAnime(u16, u16, int); + void cancelChangeTextureAnime(); + void getRopePos() const; +}; + +class daPy_anmHeap_c { +public: + /* 0x0 */ u16 mIdx; + /* 0x2 */ u16 field_0x2; + /* 0x4 */ u32 field_0x4; + /* 0x8 */ u8* mBuffer; + /* 0xC */ JKRSolidHeap* mAnimeHeap; +}; + +class daPy_sightPacket_c : public dDlst_base_c { +public: + daPy_sightPacket_c() {} + virtual void draw(); + virtual ~daPy_sightPacket_c(); + + void setSight(); + void setSightImage(ResTIMG*); + + bool getDrawFlg() { return mDrawFlag; } + void onDrawFlg() { mDrawFlag = true; } + void offDrawFlg() { mDrawFlag = false; } + void setPos(const cXyz* i_pos) { mPos = *i_pos; } + +private: + /* 0x04 */ bool mDrawFlag; + /* 0x05 */ u8 field_0x5[3]; + /* 0x08 */ cXyz mPos; + /* 0x14 */ Mtx field_0x14; + /* 0x44 */ ResTIMG* mpImg; + /* 0x48 */ u8* mpData; + /* 0x4C */ void* field_0x4c; +}; + +class daPy_actorKeep_c { +public: + daPy_actorKeep_c() { clearData(); } + + void setActor(); + void setData(fopAc_ac_c*); + void clearData(); + + u32 getID() const { return mID; } + void setID(u32 id) { mID = id; } + fopAc_ac_c* getActor() const { return mActor; } + fopAc_ac_c* getActorConst() const { return mActor; } + +private: + /* 0x0 */ u32 mID; + /* 0x4 */ fopAc_ac_c* mActor; +}; // Size: 0x8 + +class daPy_footEffect_c { +public: + /* 0x0 */ u8 field_0x0[0x4C]; +}; + +class daPy_swimTailEcallBack_c { +public: + /* 0x0 */ u8 field_0x0[0x28]; +}; + +class daPy_mtxFollowEcallBack_c { +public: + /* 0x0 */ u8 field_0x0[0xC]; +}; + +class dPa_smokeEcallBack { +public: + /* 0x0 */ u8 field_0x0[0x20]; +}; + +class dPa_cutTurnEcallBack_c { +public: + /* 0x0 */ u8 field_0x0[0x10]; +}; + +class daPy_waterDropEcallBack_c { +public: + /* 0x0 */ u8 field_0x0[0x20]; +}; + +class daPy_followEcallBack_c { +public: + /* 0x0 */ u8 field_0x0[0x1C]; +}; + +class daPy_dmEcallBack_c { +public: + /* 0x0 */ u8 field_0x0[0xC]; +}; + +class daPy_mtxPosFollowEcallBack_c { +public: + /* 0x0 */ u8 field_0x0[0x10]; +}; + +class daPy_swBlur_c : public J3DPacket { +public: + /* 0x010 */ u8 field_0x010[0x014 - 0x010]; + /* 0x014 */ int field_0x014; + /* 0x018 */ int field_0x018; + /* 0x01C */ int mBlurColorType; + /* 0x020 */ f32 field_0x020; + /* 0x024 */ void* mpBlurPos; + /* 0x028 */ cXyz field_0x028; + /* 0x034 */ cXyz field_0x034[60]; + /* 0x304 */ cXyz field_0x304[60]; +}; + +class daPy_footData_c { +public: + /* 0x0 */ u8 field_0x0[0x118]; +}; + +struct MagicArmorAuraEntry { + J3DModel* mpYaura00Model; + f32 field_0x4; +}; + +class daPy_anmIndex_c; + +class dBgW { +public: + enum PushPullLabel {}; }; class daPy_lk_c : public daPy_py_c { public: - /* 0x0304 */ s16 field_0x0304; - /* 0x0306 */ s16 field_0x0306; - /* 0x0308 */ u8 field_0x0308[0x030C - 0x0308]; - /* 0x030C */ int field_0x030c; - /* 0x0310 */ u8 field_0x0310[0x0314 - 0x0310]; - /* 0x0314 */ int mDemoMode; - /* 0x0318 */ u8 field_0x0318[0x031C - 0x0318]; - /* 0x031C */ void* vtbl; - /* 0x0320 */ request_of_phase_process_class mPhsLoad; + enum HEAP_TYPE {}; - /* 0x0328 */ u8 temp0[0x3480 - 0x0328]; + enum daPy_ANM {}; + enum daPy_UPPER {}; + + void getBoomerangCatchPos() const; + void getLineTopPos(); + void getHookshotRootPos() const; + void getModelJointMtx(u16); + void seStartOnlyReverb(u32); + void seStartMapInfo(u32); + void seStartSwordCut(u32); + void voiceStart(u32); + void itemButton() const; + void itemTrigger() const; + void getReadyItem(); + void checkGroupItem(int, int); + void checkSetItemTrigger(int, int); + void auraJointCB0(int); + void jointBeforeCB(int, J3DTransformInfo*, Quaternion*); + void jointAfterCB(int, J3DTransformInfo*, Quaternion*); + void jointCB0(int); + void jointCB1(); + void setAnimeHeap(JKRSolidHeap*); + void setItemHeap(); + void setBlurPosResource(u16); + void getItemAnimeResource(u16); + void getAnimeResource(daPy_anmHeap_c*, u16, u32); + void getUnderUpperAnime(daPy_anmIndex_c const*, J3DAnmTransform**, J3DAnmTransform**, int, u32); + void setTextureAnimeResource(J3DAnmTexPattern*, int); + void loadTextureAnimeResource(u32, int); + void checkBossBgm(); + void checkMabaAnimeBtp(int); + void checkNormalFace(); + void setTextureAnime(u16, int); + void setPriTextureAnime(u16, int); + void resetPriTextureAnime(); + void setDemoTextureAnime(u16, u16, int, u16); + void resetDemoTextureAnime(); + void setTextureScrollResource(J3DAnmTextureSRTKey*, int); + void loadTextureScrollResource(u32, int); + void playTextureAnime(); + void checkPlayerGuard() const; + void setOutPower(f32, s16, int); + void checkSightLine(f32, cXyz*); + void setBootsModel(J3DModel**); + void setItemModel(); + void checkUpperReadyAnime() const; + void checkUpperReadyThrowAnime() const; + void checkNoCollisionCorret(); + void setDrawHandModel(); + void entryDLSetLight(J3DModel*, u32); + void updateDLSetLight(J3DModel*, u32); + void hideHatAndBackle(J3DMaterial*); + void drawMirrorLightModel(); + void drawShadow(); + void offBodyEffect(); + void onBodyEffect(); + void draw(); + void setAtnList(); + void setActorPointer(); + void setTalkStatus(); + void setHintActor(); + void setDoStatusBasic(); + void setDoStatus(); + void getDirectionFromAngle(s16); + void getDirectionFromShapeAngle(); + void getDirectionFromCurrentAngle(); + void setNormalSpeedF(f32, f32, f32, f32); + void posMoveFromFootPos(); + void posMove(); + void setShapeAngleToAtnActor(); + void cancelItemUpperReadyAnime(); + void checkBodyAngleX(s16); + void setBodyAngleToCamera(); + void setBodyAngleXReadyAnime(); + void setSpeedAndAngleNormal(s16); + void setSpeedAndAngleAtn(); + void setSpeedAndAngleAtnBack(); + void setSpeedAndAngleAtnActor(); + void setFrameCtrl(J3DFrameCtrl*, u8, s16, s16, f32, f32); + void checkAtnWaitAnime(); + void setBlendMoveAnime(f32); + void setBlendAtnBackMoveAnime(f32); + void setBlendAtnMoveAnime(f32); + void setAnimeEquipSword(int); + void setAnimeEquipSingleItem(u16); + void setAnimeEquipItem(); + void setAnimeUnequipSword(); + void setAnimeUnequipItem(u16); + void setAnimeUnequip(); + void checkBossGomaStage(); + void checkSingleItemEquipAnime() const; + void checkItemEquipAnime() const; + void checkEquipAnime() const; + void deleteEquipItem(int); + void setFallVoice(); + void keepItemData(); + void returnKeepItemData(); + void makeItemType(); + void setScopeModel(); + void setPhotoBoxModel(); + void changeDragonShield(int); + void checkNewItemChange(u8); + void checkItemChangeFromButton(); + void checkItemAction(); + void getSlidePolygon(); + void checkJumpCutFromButton(); + void orderTalk(); + void checkNextActionFromButton(); + void setShieldGuard(); + void checkItemModeActorPointer(); + void checkNextActionItemFly(); + void checkNextMode(int); + void checkIceSlipFall(); + void setFrontWallType(); + void changeFrontWallTypeProc(); + void changeSlideProc(); + void changeWaitProc(); + void changeLandProc(f32); + void setDamagePoint(f32); + void checkNormalDamage(int); + void setDashDamage(); + void checkAtHitEnemy(dCcD_GObjInf*); + void checkElecReturnDamage(dCcD_GObjInf*, cXyz*); + void checkWallAtributeDamage(dBgS_AcchCir*); + void changeDamageProc(); + void changeAutoJumpProc(); + void changeDemoProc(); + void changeDeadProc(); + void getDamageVec(dCcD_GObjInf*); + void setOldRootQuaternion(s16, s16, s16); + void checkRestHPAnime(); + void checkHeavyStateOn(); + void checkBottleItem(int) const; + void checkDrinkBottleItem(int) const; + void checkOpenBottleItem(int) const; + void checkBowItem(int) const; + void checkPhotoBoxItem(int) const; + void checkScopeEnd(); + void setSubjectMode(); + void checkMaskDraw(); + void checkSubjectEnd(int); + void checkGuardAccept(); + void cancelNoDamageMode(); + void commonProcInit(); + void procScope_init(int); + void procScope(); + void procSubjectivity_init(int); + void procSubjectivity(); + void procCall_init(); + void procCall(); + void procControllWait_init(); + void procControllWait(); + void procWait_init(); + void procWait(); + void procFreeWait_init(); + void procFreeWait(); + void procMove_init(); + void procMove(); + void procAtnMove_init(); + void procAtnMove(); + void procAtnActorWait_init(); + void procAtnActorWait(); + void procAtnActorMove_init(); + void procAtnActorMove(); + void procSideStep_init(int); + void procSideStep(); + void procSideStepLand_init(); + void procSideStepLand(); + void procCrouchDefense_init(); + void procCrouchDefense(); + void procCrouchDefenseSlip_init(); + void procCrouchDefenseSlip(); + void procCrouch_init(); + void procCrouch(); + void procWaitTurn_init(); + void procWaitTurn(); + void procMoveTurn_init(int); + void procMoveTurn(); + void procSlip_init(); + void procSlip(); + void procSlideFront_init(s16); + void procSlideFront(); + void procSlideBack_init(s16); + void procSlideBack(); + void procSlideFrontLand_init(); + void procSlideFrontLand(); + void procSlideBackLand_init(); + void procSlideBackLand(); + void procFrontRoll_init(f32); + void procFrontRoll(); + void procFrontRollCrash_init(); + void procFrontRollCrash(); + void procNockBackEnd_init(); + void procNockBackEnd(); + void procSideRoll_init(); + void procSideRoll(); + void procBackJump_init(); + void procBackJump(); + void procBackJumpLand_init(); + void procBackJumpLand(); + void checkAutoJumpFlying() const; + void procAutoJump_init(); + void procAutoJump(); + void procLand_init(f32, int); + void procLand(); + void procLandDamage_init(int); + void procLandDamage(); + void procFall_init(int, f32); + void procFall(); + void procSlowFall_init(); + void procSlowFall(); + void procSmallJump_init(int); + void procSmallJump(); + void procVerticalJump_init(); + void procVerticalJump(); + void procGuardCrash(); + void procDamage_init(); + void procDamage(); + void procPolyDamage_init(); + void procPolyDamage(); + void procLargeDamage_init(int, int, s16, s16); + void procLargeDamage(); + void procLargeDamageUp_init(int, int, s16, s16); + void procLargeDamageUp(); + void procLargeDamageWall_init(int, int, s16, s16); + void procLargeDamageWall(); + void procLavaDamage_init(); + void procLavaDamage(); + void procElecDamage_init(cXyz const*); + void procElecDamage(); + void procGuardSlip_init(); + void procGuardSlip(); + void procIceSlipFall_init(); + void procIceSlipFall(); + void procIceSlipFallUp_init(int, s16, s16); + void procIceSlipFallUp(); + void procIceSlipAlmostFall_init(); + void procIceSlipAlmostFall(); + void procBootsEquip_init(u16); + void procBootsEquip(); + void procNotUse_init(int); + void procNotUse(); + void getGroundAngle(cBgS_PolyInfo*, s16); + void setLegAngle(f32, int, s16*, s16*); + void footBgCheck(); + void setWaterY(); + void autoGroundHit(); + void checkAttentionPosAngle(fopAc_ac_c*, cXyz**); + void setNeckAngle(); + void checkOriginalHatAnimation(); + void setHatAngle(); + void setMoveSlantAngle(); + void setWaistAngle(); + void setWorldMatrix(); + void setAtParam(u32, int, dCcG_At_Spl, u8, u8, u8, f32); + void resetCurse(); + void checkLightHit(); + void setSwordAtCollision(); + void getBlurTopRate(); + void setCollision(); + void setAttentionPos(); + void setRoomInfo(); + void setDemoData(); + void setStickData(); + void setBgCheckParam(); + void setParamData(int, int, int, int); + void checkLavaFace(cXyz*, int); + void checkFallCode(); + void startRestartRoom(u32, int, f32, int); + void checkSuccessGuard(int); + void setShapeAngleOnGround(); + void setStepsOffset(); + void setBeltConveyerPower(); + void setWindAtPower(); + void checkRoofRestart(); + void execute(); + void playerDelete(); + void initTextureAnime(); + void initTextureScroll(); + void createHeap(); + void createAnimeHeap(JKRSolidHeap**, daPy_lk_c::HEAP_TYPE); + void initModel(J3DModel**, int, u32); + void entryBtk(J3DModelData*, int); + void entryBrk(J3DModelData*, int); + void playerInit(); + daPy_lk_c(); + void makeBgWait(); + void setSeAnime(daPy_anmHeap_c const*, J3DFrameCtrl*); + void initSeAnime(); + void resetSeAnime(); + void setMoveAnime(f32, f32, f32, daPy_lk_c::daPy_ANM, daPy_lk_c::daPy_ANM, int, f32); + void setSingleMoveAnime(); + void setActAnimeUpper(u16, daPy_lk_c::daPy_UPPER, f32, f32, s16, f32); + void resetActAnimeUpper(); + void animeUpdate(); + void simpleAnmPlay(J3DAnmBase*); + void setHandModel(); + void getAnmData(); + void checkGrabWeapon(int); + void onDekuSpReturnFlg(u8); + void changeTextureAnime(u16, u16, int); + void setThrowDamage(cXyz*, s16, f32, f32, int); + void setPlayerPosAndAngle(cXyz*, s16); + void setPlayerPosAndAngle(cXyz*, csXyz*); + void setPlayerPosAndAngle(f32*[][][][]); + void endDemoMode(); + void getBokoFlamePos(cXyz*); + void setAuraEffect(); + void setWaterRipple(); + void setFootEffectType(int, cXyz*, int, int); + void setFootMark(cXyz*); + void setFootEffect(); + void resetFootEffect(); + void setSwimTail(); + void setCutWaterSplash(); + void setSwimWaterDrop(daPy_waterDropEcallBack_c*); + void setWaterDrop(); + void setDamageFlameEmitter(); + void setDamageCurseEmitter(); + void setDamageElecEmitter(); + void setDamageEmitter(); + void endFlameDamageEmitter(); + void endDamageEmitter(); + void setItemWaterEffect(fopAc_ac_c*, int, int); + void getDemoLookActor(); + void setTinkleCeiverModel(); + void setTalismanModel(); + void setLetterModel(); + void checkCaughtShapeHide(); + void setShapeAngleToTalkActor(); + void checkEndMessage(u32); + void setTalkStartBack(); + void dProcTool_init(); + void dProcTool(); + void dProcTalk_init(); + void dProcTalk(); + void dProcDamage_init(); + void dProcDamage(); + void dProcHoldup_init(); + void dProcHoldup(); + void dProcOpenTreasure_init(); + void dProcOpenTreasure(); + void setGetItemSound(u16, int); + void setGetDemo(); + void dProcGetItem_init(); + void dProcGetItem(); + void dProcUnequip_init(); + void dProcUnequip(); + void dProcLavaDamage_init_sub(); + void dProcLavaDamage_init(); + void dProcLavaDamage(); + void dProcFreezeDamage_init_sub(int); + void dProcFreezeDamage_init(); + void dProcFreezeDamage(); + void dProcDead_init_sub(); + void dProcDead_init_sub2(); + void checkGameOverStart(); + void dProcDead_init(); + void dProcDead(); + void dProcLookAround_init(); + void dProcLookAround(); + void dProcSalute_init(); + void dProcSalute(); + void dProcLookAround2_init(); + void dProcLookAround2(); + void dProcTalismanPickup_init(); + void dProcTalismanPickup(); + void dProcTalismanWait_init(); + void dProcTalismanWait(); + void dProcSurprised_init(); + void dProcSurprised(); + void dProcTurnBack_init(); + void dProcTurnBack(); + void dProcLookUp_init(); + void dProcLookUp(); + void dProcQuakeWait_init(); + void dProcQuakeWait(); + void dProcDance_init(); + void dProcDance(); + void dProcCaught_init(); + void dProcCaught(); + void dProcLookWait_init(); + void dProcLookWait(); + void dProcPushPullWait_init(); + void dProcPushPullWait(); + void dProcPushMove_init(); + void dProcPushMove(); + void dProcDoorOpen_init(); + void dProcDoorOpen(); + void dProcNod_init(); + void dProcNod(); + void dProcPresent_init_sub(); + void dProcPresent_init(); + void dProcPresent(); + void dProcWindChange_init(); + void dProcWindChange(); + void dProcStandItemPut_init(); + void dProcStandItemPut(); + void dProcVorcanoFail_init(); + void dProcVorcanoFail(); + void dProcSlightSurprised_init(); + void dProcSlightSurprised(); + void dProcSmile_init(); + void dProcSmile(); + void dProcBossWarp_init(); + void dProcBossWarp(); + void dProcAgbUse_init(); + void dProcAgbUse(); + void dProcLookTurn_init(); + void dProcLookTurn(); + void dProcLetterOpen_init(); + void dProcLetterOpen(); + void dProcLetterRead_init(); + void dProcLetterRead(); + void dProcRedeadStop_init(); + void dProcRedeadStop(); + void dProcRedeadCatch_init(); + void dProcRedeadCatch(); + void dProcGetDance_init(); + void dProcGetDance(); + void dProcBottleOpenFairy_init(); + void dProcBottleOpenFairy(); + void dProcWarpShort_init(); + void dProcWarpShort(); + void dProcOpenSalvageTreasure_init(); + void dProcOpenSalvageTreasure(); + void dProcSurprisedWait_init(); + void dProcSurprisedWait(); + void dProcPowerUpWait_init(); + void dProcPowerUp_init(); + void dProcPowerUp(); + void dProcShipSit_init(); + void dProcShipSit(); + void dProcLastCombo_init(); + void dProcLastCombo(); + void dProcHandUp_init(); + void dProcHandUp(); + void dProcIceSlip_init(); + void dProcIceSlip(); + void getLadderMoveAnmSpeed(); + void setLadderFootSe(); + void changeLadderMoveProc(int); + void setMoveBGLadderCorrect(); + void procLadderUpStart_init_sub(); + void procLadderUpStart_init(); + void procLadderUpStart(); + void procLadderUpEnd_init(int); + void procLadderUpEnd(); + void procLadderDownStart_init_sub(); + void procLadderDownStart_init(); + void procLadderDownStart(); + void procLadderDownEnd_init(int); + void procLadderDownEnd(); + void procLadderMove_init(int, int, cXyz*); + void procLadderMove(); + void getHangMoveAnmSpeed(); + void getHangDirectionFromAngle(); + void changeHangMoveProc(int); + void changeHangEndProc(int); + void setHangShapeOffset(); + void procHangStart_init(); + void procHangStart(); + void procHangFallStart_init(cM3dGPla*); + void procHangFallStart(); + void procHangUp_init(int); + void procHangUp(); + void procHangWait_init(); + void procHangWait(); + void procHangMove_init(int); + void procHangMove(); + void procHangClimb_init(f32); + void procHangClimb(); + void procHangWallCatch_init(); + void procHangWallCatch(); + void getClimbMoveAnmSpeed(); + void setClimbShapeOffset(); + void getClimbDirectionFromAngle(); + void changeClimbMoveProc(int); + void setMoveBGCorrectClimb(); + void checkBgCorrectClimbMove(cXyz*, cXyz*); + void checkBgClimbMove(); + void procClimbUpStart_init_sub(); + void procClimbUpStart_init(); + void procClimbUpStart(); + void procClimbDownStart_init(s16); + void procClimbDownStart(); + void procClimbMoveUpDown_init(int); + void procClimbMoveUpDown(); + void procClimbMoveSide_init(int); + void procClimbMoveSide(); + void setBlendWHideMoveAnime(f32); + void getWHideModePolygon(cXyz*, cXyz*, cXyz*, int); + void getWHideBasePos(cXyz*); + void getWHideNextPos(cXyz*, cXyz*); + void checkWHideBackWall(cXyz*); + void checkWHideFrontFloor(cXyz*); + void checkWHideModeChange(cXyz*); + void changeWHideEndProc(cXyz*); + void procWHideReady_init(cM3dGPla*, cXyz*); + void procWHideReady(); + void procWHideWait_init(); + void procWHideWait(); + void procWHideMove_init(); + void procWHideMove(); + void procWHidePeep_init(); + void procWHidePeep(); + void getCrawlMoveAnmSpeed(); + void getCrawlMoveSpeed(); + void setCrawlMoveDirectionArrow(); + void changeCrawlAutoMoveProc(cXyz*); + void getCrawlMoveVec(cXyz*, cXyz*, cXyz*); + void crawlBgCheck(cXyz*, cXyz*); + void checkCrawlSideWall(cXyz*, cXyz*, cXyz*, cXyz*, s16*, s16*); + void setDoStatusCrawl(); + void procCrawlStart_init(); + void procCrawlStart(); + void checkNotCrawlStand(cXyz*); + void checkNotCrawlStand(cXyz*, cXyz*); + void procCrawlMove_init(s16, s16); + void procCrawlMove(); + void procCrawlAutoMove_init(int, cXyz*); + void procCrawlAutoMove(); + void procCrawlEnd_init(int, s16, s16); + void procCrawlEnd(); + void checkGrabSpecialHeavyState(); + void getGrabMissActor(); + void setWeaponBlur(); + void checkGrabBarrelSearch(int); + void setGrabItemPos(); + void freeGrabItem(); + void checkNextActionGrab(); + void initGrabNextMode(); + void procGrabReady_init(); + void procGrabReady(); + void procGrabUp_init(); + void procGrabUp(); + void procGrabMiss_init(); + void procGrabMiss(); + void procGrabThrow_init(int); + void procGrabThrow(); + void procGrabPut_init(); + void procGrabPut(); + void procGrabWait_init(); + void procGrabWait(); + void procGrabHeavyWait_init(); + void procGrabHeavyWait(); + void procGrabRebound_init(); + void procGrabRebound(); + void setSpeedAndAngleSwim(); + void checkNextModeSwim(); + void changeSwimProc(); + void changeSwimUpProc(); + void swimOutAfter(int); + void checkSwimFallCheck(); + void changeSwimOutProc(); + void setSwimMoveAnime(); + void getSwimTimerRate(); + void setSwimTimerStartStop(); + void procSwimUp_init(int); + void procSwimUp(); + void procSwimWait_init(int); + void procSwimWait(); + void procSwimMove_init(int); + void procSwimMove(); + void setSpecialBattle(int); + void changeSpecialBattle(); + void procBtJump_init(fopEn_enemy_c*); + void procBtJump(); + void procBtJumpCut_init(cXyz*); + void procBtJumpCut(); + void procBtSlide(); + void procBtRoll_init(fopEn_enemy_c*); + void procBtRoll(); + void procBtRollCut_init(cXyz*); + void procBtRollCut(); + void procBtVerticalJump_init(fopEn_enemy_c*); + void procBtVerticalJump(); + void procBtVerticalJumpCut_init(); + void procBtVerticalJumpCut(); + void procBtVerticalJumpLand_init(); + void procBtVerticalJumpLand(); + void shipSpecialDemoStart(); + void checkJumpRideShip(); + void checkShipNotNormalMode(); + void setShipRideArmAngle(int, J3DTransformInfo*); + void checkShipRideUseItem(int); + void initShipRideUseItem(int, int); + void setShipRidePosUseItem(); + void setShipRidePos(int); + void setShipAttentionAnmSpeed(f32); + void setShipAttnetionBodyAngle(); + void changeShipEndProc(); + void initShipBaseAnime(); + void initShipCraneAnime(); + void procShipReady_init(); + void procShipReady(); + void procShipJumpRide_init(); + void procShipJumpRide(); + void procShipSteer_init(); + void procShipSteer(); + void procShipPaddle_init(); + void procShipPaddle(); + void procShipScope_init(int); + void procShipScope(); + void procShipBoomerang_init(); + void procShipBoomerang(); + void procShipHookshot_init(); + void procShipHookshot(); + void procShipBow_init(); + void procShipBow(); + void procShipCannon_init(); + void procShipCannon(); + void procShipCrane_init(); + void procShipCrane(); + void procShipGetOff_init(); + void procShipGetOff(); + void procShipRestart_init(); + void procShipRestart(); + void checkRopeAnime() const; + void freeRopeItem(); + void checkRopeRoofHit(s16); + void changeRopeSwingProc(); + void changeRopeEndProc(int); + void checkSpecialRope(); + void changeRopeToHangProc(); + void checkRopeSwingWall(cXyz*, cXyz*, s16*, f32*); + void setBlendRopeMoveAnime(int); + void throwRope(); + void checkNextActionRopeReady(); + void checkNextRopeMode(); + void checkHangRopeActorNull(); + void procRopeSubject_init(); + void procRopeSubject(); + void procRopeReady_init(); + void procRopeReady(); + void procRopeSwing_init(fopAc_ac_c*, s16); + void procRopeSwing(); + void procRopeHangWait_init(int); + void procRopeHangWait(); + void specialRopeHangUp(); + void procRopeUp_init(); + void procRopeUp(); + void procRopeDown_init(); + void procRopeDown(); + void procRopeSwingStart_init(); + void procRopeSwingStart(); + void procRopeMove_init(); + void procRopeMove(); + void procRopeThrowCatch_init(); + void procRopeThrowCatch(); + void procRopeUpHang_init(); + void procRopeUpHang(); + void checkRopeReadyAnime() const; + void checkRopeTag(); + void checkPlayerNoDraw(); + void getGroundY(); + void getLeftHandMatrix(); + void getRightHandMatrix(); + void checkPlayerFly() const; + void checkFrontRoll() const; + void checkBottleSwing() const; + void checkCutCharge() const; + void checkTactWait() const; + void getBaseAnimeFrameRate(); + void getBaseAnimeFrame(); + void getItemID() const; + void getThrowBoomerangID() const; + void getGrabActorID() const; + void checkGrabBarrel(); + void onFrollCrashFlg(u32); + void getOldSpeedY(); + void checkComboCutTurn() const; + void cancelChangeTextureAnime(); + void checkBoomerangAnime() const; + void throwBoomerang(); + void returnBoomerang(); + void checkNextActionBoomerangReady(); + void checkNextActionBoomerangFly(); + void checkNextBoomerangMode(); + void changeBoomerangCatchProc(); + void procBoomerangSubject_init(); + void procBoomerangSubject(); + void procBoomerangMove_init(); + void procBoomerangMove(); + void procBoomerangCatch_init(); + void procBoomerangCatch(); + void bowJointCB(int); + void bowButton() const; + void checkBowReadyAnime() const; + void checkBowAnime() const; + void makeArrow(); + void deleteArrow(); + void setBowReadyAnime(); + void setBowReloadAnime(); + void checkNextActionBowReady(); + void checkNextActionBowFly(); + void checkNextBowMode(); + void setBowModel(); + void procBowSubject_init(); + void procBowSubject(); + void procBowMove_init(); + void procBowMove(); + void checkHookshotReturn(); + void setHookshotCarryOffset(u32, cXyz const*); + void setHookshotModel(); + void setHookshotSight(); + void freeHookshotItem(); + void checkNextActionHookshotReady(); + void checkNextHookshotMode(); + void procHookshotSubject_init(); + void procHookshotSubject(); + void procHookshotMove_init(); + void procHookshotMove(); + void procHookshotFly_init(); + void procHookshotFly(); + void fanWindEffectDraw(); + void fanWindCrashEffectDraw(); + void fanJointCB(int); + void parachuteJointCB(int); + void setShapeFanLeaf(); + void checkFanGlideProc(int); + void setFanModel(); + void setSmallFanModel(); + void setParachuteFanModel(f32); + void procFanSwing_init(); + void procFanSwing(); + void procFanGlide_init(int); + void procFanGlide(); + void getDayNightParamData(); + void setTactModel(); + void checkNpcStatus(); + void getTactPlayRightArmAnm(s32); + void getTactPlayLeftArmAnm(s32); + void checkEndTactMusic() const; + void getTactMetronomeRate(); + void checkTactLastInput(); + void setTactZev(u32, int, char*); + void getTactTopPos(cXyz*); + void getTactNormalWait() const; + void getTactMusic() const; + void getTactTimerCancel() const; + void checkTactPlayMelody(); + void resetTactCount(); + void procTactWait_init(int); + void procTactWait(); + void procTactPlay_init(s32, int, int); + void procTactPlay(); + void procTactPlayEnd_init(int); + void procTactPlayEnd(); + void procTactPlayOriginal_init(); + void procTactPlayOriginal(); + void checkJumpFlower(); + void procVomitReady_init(s16, f32); + void procVomitReady(); + void procVomitWait_init(); + void procVomitWait(); + void procVomitJump_init(int); + void procVomitJump(); + void procVomitLand_init(); + void procVomitLand(); + void setHammerModel(); + void setHammerQuake(cBgS_PolyInfo*, cXyz const*, int); + void setHammerWaterSplash(); + void procHammerSideSwing_init(); + void procHammerSideSwing(); + void procHammerFrontSwingReady_init(); + void procHammerFrontSwingReady(); + void procHammerFrontSwing_init(); + void procHammerFrontSwing(); + void procHammerFrontSwingEnd_init(); + void procHammerFrontSwingEnd(); + void setPushPullKeepData(dBgW::PushPullLabel); + void procPushPullWait_init(int); + void procPushPullWait(); + void procPushMove_init(); + void procPushMove(); + void procPullMove_init(); + void procPullMove(); + void changeBottleDrinkFace(int); + void setBottleModel(u16); + void makeFairy(cXyz*, u32); + void procBottleDrink_init(u16); + void procBottleDrink(); + void procBottleOpen_init(u16); + void procBottleOpen(); + void procBottleSwing_init(int); + void procBottleSwing(); + void procBottleGet_init(); + void procBottleGet(); + void setEnemyWeaponAtParam(int); + void procWeaponNormalSwing_init(); + void procWeaponNormalSwing(); + void procWeaponSideSwing_init(); + void procWeaponSideSwing(); + void procWeaponFrontSwingReady_init(); + void procWeaponFrontSwingReady(); + void procWeaponFrontSwing_init(); + void procWeaponFrontSwing(); + void procWeaponFrontSwingEnd_init(); + void procWeaponFrontSwingEnd(); + void procWeaponThrow_init(); + void procWeaponThrow(); + void setHyoiModel(); + void procFoodThrow_init(); + void procFoodThrow(); + void procFoodSet_init(); + void procFoodSet(); + void setSwordModel(int); + void setLightSaver(); + void checkDemoShieldNoDraw(); + void checkDemoSwordNoDraw(int); + void checkChanceMode(); + void checkCutRollChange() const; + void getSwordBlurColor(); + void setNormalCutAtParam(u8); + void setFinishCutAtParam(u8); + void setExtraCutAtParam(u8); + void setExtraFinishCutAtParam(u8); + void setJumpCutAtParam(); + void getCutDirection(); + void changeCutProc(); + void changeCutReverseProc(daPy_lk_c::daPy_ANM); + void procCutA_init(s16); + void procCutA(); + void procCutF_init(s16); + void procCutF(); + void procCutR_init(s16); + void procCutR(); + void procCutL_init(s16); + void procCutL(); + void procCutEA_init(); + void procCutEA(); + void procCutEB_init(); + void procCutEB(); + void procCutExA_init(); + void procCutExA(); + void procCutExB_init(); + void procCutExB(); + void procCutTurn_init(int); + void procCutTurn(); + void procCutRoll_init(); + void procCutRoll(); + void procCutRollEnd_init(); + void procCutRollEnd(); + void procCutTurnCharge_init(); + void procCutTurnCharge(); + void procCutTurnMove_init(); + void procCutTurnMove(); + void procCutReverse_init(daPy_lk_c::daPy_ANM); + void procCutReverse(); + void procJumpCut_init(int); + void procJumpCut(); + void procJumpCutLand_init(); + void procJumpCutLand(); + void procCutExMJ_init(int); + void procCutExMJ(); + void procCutKesa_init(); + void procCutKesa(); + void checkNoControll() const; + + /* 0x0320 */ request_of_phase_process_class mPhsLoad; + /* 0x0328 */ J3DModelData* mpModelData; + /* 0x032C */ J3DModel* mpCLModel; + /* 0x0330 */ J3DModel* mpKatsuraModel; + /* 0x0334 */ J3DModel* mpYamuModel; + /* 0x0338 */ u8 field_0x0338[0x035C - 0x0338]; + /* 0x035C */ J3DAnmTexPattern* field_0x035c; + /* 0x0360 */ u8 field_0x0360[0x0364 - 0x0360]; + /* 0x0364 */ J3DAnmTextureSRTKey* mpTexScrollResData; + /* 0x0368 */ J3DTexMtxAnm* mpTexMtxAnm; + /* 0x036C */ daPy_matAnm_c* mpTexEyeScroll[2]; + /* 0x0374 */ J3DShape* mpZOffBlendShape[4]; + /* 0x0384 */ J3DShape* mpZOffNoneShape[4]; + /* 0x0394 */ J3DShape* mpZOnShape[4]; + /* 0x03A4 */ J3DShape* field_0x03a4; + /* 0x03A8 */ J3DShape* field_0x03a8; + /* 0x03AC */ dBgS_AcchCir mAcchCir[3]; + /* 0x046C */ dBgS_Acch mAcch; + /* 0x0630 */ dBgS_LinkLinChk mLinkLinChk; + /* 0x069C */ dBgS_RopeLinChk mRopeLinChk; + /* 0x0708 */ dBgS_BoomerangLinChk mBoomerangLinChk; + /* 0x0774 */ dBgS_LinkGndChk mGndChk; + /* 0x07C8 */ dBgS_LinkRoofChk mRoofChk; + /* 0x080C */ void* field_0x080c; + /* 0x0810 */ void* field_0x0810; + /* 0x0814 */ dBgS_ArrowLinChk mArrowLinChk; + /* 0x0880 */ dBgS_MirLightLinChk mMirLightLinChk; + /* 0x08EC */ u8 field_0x08EC[0x0910 - 0x08EC]; + /* 0x0910 */ cXyz field_0x0910; + /* 0x091C */ u8 field_0x091C[0x0950 - 0x091C]; + /* 0x0950 */ daPy_HIO_c* mpHIO; + /* 0x0954 */ J3DModel* mpHandsModel; + /* 0x0958 */ J3DModel* mpEquippedSwordModel; + /* 0x095C */ J3DModel* mpSwgripaModel; + /* 0x0960 */ J3DModel* mpSwgripmsModel; + /* 0x0964 */ mDoExt_bckAnm mSwgripmsabBckAnim; + /* 0x0974 */ J3DAnmTevRegKey* mpTswgripmsabBrkData; + /* 0x0978 */ J3DAnmTextureSRTKey* mpTswgripmsBtkData; + /* 0x097C */ J3DModel* mpPodmsModel; + /* 0x0980 */ J3DModel* mpEquippedShieldModel; + /* 0x0984 */ J3DModel* mpShaModel; + /* 0x0988 */ J3DModel* mpShmsModel; + /* 0x098C */ mDoExt_bckAnm field_0x098c; + /* 0x099C */ J3DAnmTextureSRTKey* field_0x099c; + /* 0x09A0 */ dDlst_mirrorPacket mMirrorPacket; + /* 0x2E7C */ J3DModel* mpYmsls00Model; + /* 0x2E80 */ J3DAnmTextureSRTKey* mpYmsls00BtkData; + /* 0x2E84 */ J3DModel* mpHbootsModelRightFoot; + /* 0x2E88 */ J3DModel* mpHbootsModelLeftFoot; + /* 0x2E8C */ J3DModel* mpPringModel; + /* 0x2E90 */ JKRSolidHeap* field_0x2e90; + /* 0x2E94 */ u8 field_0x2E94[0x2E98 - 0x2E94]; + /* 0x2E98 */ J3DModel* mpHeldItemModel; + /* 0x2E9C */ mDoExt_bckAnm mSwordAnim; + /* 0x2EAC */ u8 field_0x2EAC[0x2EB0 - 0x2EAC]; + /* 0x2EB0 */ J3DAnmTevRegKey* field_0x2eb0; + /* 0x2EB4 */ J3DAnmTevRegKey* mpGwp00BrkData; + /* 0x2EB8 */ J3DAnmTextureSRTKey* mpGwp00BtkData; + /* 0x2EBC */ u8 field_0x2EBC[0x2ED4 - 0x2EBC]; + /* 0x2ED4 */ J3DAnmTextureSRTKey* mpHeldItemModelAnimTexEx; + /* 0x2ED8 */ J3DAnmTextureSRTKey* mpSwordAnimBTK; + /* 0x2EDC */ J3DAnmTevRegKey* mpHeldItemAnimBRK; + /* 0x2EE0 */ J3DModel* mpBottleContentsModel; + /* 0x2EE4 */ J3DModel* mpBottleCapModel; + /* 0x2EE8 */ J3DModel* mpSwordModel1; + /* 0x2EEC */ u8 field_0x2EEC[0x2EF0 - 0x2EEC]; + /* 0x2EF0 */ J3DAnmColor* field_0x2ef0; + /* 0x2EF4 */ J3DAnmTextureSRTKey* field_0x2ef4; + /* 0x2EF8 */ J3DAnmTevRegKey* field_0x2ef8; + /* 0x2EFC */ mDoExt_brkAnm field_0x2efc; + /* 0x2F14 */ J3DModel* mpSuimenMunyaModel; + /* 0x2F18 */ J3DAnmTextureSRTKey* field_0x2f18; + /* 0x2F1C */ J3DModel* mpYuchw00Model; + /* 0x2F20 */ mDoExt_bckAnm field_0x2f20; + /* 0x2F30 */ J3DAnmTextureSRTKey* field_0x2f30; + /* 0x2F34 */ J3DAnmTevRegKey* field_0x2f34; + /* 0x2F38 */ J3DModel* mpYbafo00Model; + /* 0x2F3C */ J3DAnmTextureSRTKey* field_0x2f3c; + /* 0x2F40 */ MagicArmorAuraEntry mMagicArmorAuraEntries[6]; + /* 0x2F70 */ mDoExt_brkAnm field_0x2f70; + /* 0x2F88 */ u8 field_0x2F88[0x2F8C - 0x2F88]; + /* 0x2F8C */ J3DModel* mpYmgcs00Model; + /* 0x2F90 */ mDoExt_brkAnm field_0x2f90; + /* 0x2FA8 */ u8 field_0x2FA8[0x2FAC - 0x2FA8]; + /* 0x2FAC */ J3DMtxCalc* field_0x2fac; + /* 0x2FB0 */ J3DMtxCalc* field_0x2fb0; + /* 0x2FB4 */ mDoExt_AnmRatioPack field_0x2fb4[2]; + /* 0x2FC4 */ mDoExt_AnmRatioPack field_0x2fc4[3]; + /* 0x2FDC */ daPy_anmHeap_c field_0x2fdc[2]; + /* 0x2FFC */ daPy_anmHeap_c field_0x2ffc[3]; + /* 0x302C */ J3DFrameCtrl field_0x302c[2]; + /* 0x3054 */ J3DFrameCtrl field_0x3054[3]; + /* 0x3090 */ daPy_sightPacket_c mSightPacket; + /* 0x30E0 */ JAIZelAnime mJAIZelAnime; + /* 0x3178 */ u8 field_0x3178[0x317C - 0x3178]; + /* 0x317C */ daPy_actorKeep_c mActorKeepEquip; + /* 0x3184 */ daPy_actorKeep_c mActorKeepThrow; + /* 0x318C */ daPy_actorKeep_c mActorKeepGrab; + /* 0x3194 */ daPy_actorKeep_c mActorKeepRope; + /* 0x319C */ fopAc_ac_c* mpAttnActorLockOn; + /* 0x31A0 */ fopAc_ac_c* mpAttnActorAction; + /* 0x31A4 */ fopAc_ac_c* mpAttnActorA; + /* 0x31A8 */ fopAc_ac_c* mpAttnActorX; + /* 0x31AC */ fopAc_ac_c* mpAttnActorY; + /* 0x31B0 */ fopAc_ac_c* mpAttnActorZ; + /* 0x31B4 */ mDoExt_MtxCalcOldFrame* field_0x31b4; + /* 0x31B8 */ s16 mTexAnimeResIdx; + /* 0x31BA */ s16 field_0x31ba; + /* 0x31BC */ s16 field_0x31bc; + /* 0x31BE */ u8 field_0x31BE[0x31C0 - 0x31BE]; + /* 0x31C0 */ void* mpTextureAnimeResData; + /* 0x31C4 */ JKRSolidHeap* mpTextureAnimeResHeap; + /* 0x31C8 */ u16 mTexScrollResIdx; + /* 0x31CA */ s16 field_0x31ca; + /* 0x31CC */ s16 field_0x31cc; + /* 0x31CE */ s16 field_0x31ce; + /* 0x31D0 */ void* mpTextureScrollResData; + /* 0x31D4 */ JKRSolidHeap* mpTextureScrollResHeap; + /* 0x31D8 */ u32 mCurProc; + /* 0x31DC */ int (daPy_lk_c::*field_0x31dc)(); + /* 0x31E8 */ daPy_footEffect_c field_0x31e8[2]; + /* 0x3280 */ u8 field_0x3280[0x3294 - 0x3280]; + /* 0x3294 */ daPy_swimTailEcallBack_c mSwimTailEcallBack[2]; + /* 0x32E4 */ daPy_mtxFollowEcallBack_c field_0x32e4; + /* 0x32F0 */ daPy_mtxFollowEcallBack_c field_0x32f0; + /* 0x32FC */ dPa_smokeEcallBack mSmokeEcallBack; + /* 0x331C */ dPa_cutTurnEcallBack_c mCutTurnEcallBack[3]; + /* 0x334C */ daPy_waterDropEcallBack_c mWaterDropEcallBack[2]; + /* 0x338C */ daPy_followEcallBack_c field_0x338c; + /* 0x33A8 */ daPy_mtxFollowEcallBack_c field_0x33a8; + /* 0x33B4 */ u8 field_0x33B4[0x33B8 - 0x33B4]; + /* 0x33B8 */ daPy_dmEcallBack_c field_0x33b8[4]; + /* 0x33E8 */ u8 field_0x33E8[0x3460 - 0x33E8]; + /* 0x3460 */ daPy_mtxPosFollowEcallBack_c field_0x3460[2]; /* 0x3480 */ dAttention_c* mpAttention; /* 0x3484 */ dAttList_c* mpAttnEntryA; /* 0x3488 */ dAttList_c* mpAttnEntryX; @@ -155,6 +1347,17 @@ class daPy_lk_c : public daPy_py_c { /* 0x3730 */ u8 field_0x3730[0x3748 - 0x3730]; /* 0x3748 */ cXyz field_0x3748; /* 0x3754 */ u8 field_0x3754[0x37E4 - 0x3754]; + /* 0x37E4 */ daPy_swBlur_c mSwBlur; + /* 0x3DB8 */ daPy_footData_c mFootData[2]; + /* 0x3FE8 */ dCcD_Stts field_0x3fe8; + /* 0x4024 */ dCcD_Cyl field_0x4024; + /* 0x4154 */ dCcD_Cyl field_0x4154; + /* 0x4284 */ dCcD_Cyl field_0x4284; + /* 0x43B4 */ dCcD_Cyl field_0x43b4; + /* 0x44E4 */ dCcD_Cps field_0x44e4[3]; + /* 0x488C */ dCcD_Cps field_0x488c; + /* 0x49C4 */ dCcD_Sph field_0x49c4; + /* 0x4AF0 */ dCcD_Cps field_0x4af0; }; #endif /* D_D_A_PLAYER_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_acch.h b/include/d/d_bg_s_acch.h new file mode 100644 index 000000000..509b15bd5 --- /dev/null +++ b/include/d/d_bg_s_acch.h @@ -0,0 +1,208 @@ +#ifndef D_BG_D_BG_S_ACCH_H +#define D_BG_D_BG_S_ACCH_H + +#include "SSystem/SComponent/c_m3d_g_cir.h" +#include "SSystem/SComponent/c_m3d_g_cyl.h" +#include "SSystem/SComponent/c_m3d_g_lin.h" +#include "SSystem/SComponent/c_m3d_g_pla.h" +#include "d/d_bg_s_gnd_chk.h" +#include "d/d_bg_s_roof_chk.h" +#include "d/d_bg_s_wtr_chk.h" +#include "SSystem/SComponent/c_sxyz.h" + +class fopAc_ac_c; + +class dBgS_AcchCir : public cBgS_PolyInfo { +private: + /* 0x10 */ u32 m_flags; + /* 0x14 */ cM3dGCir m_cir; + /* 0x28 */ f32 m_wall_rr; + /* 0x2C */ f32 field_0x2c; + /* 0x30 */ f32 m_wall_h; + /* 0x34 */ f32 m_wall_r; + /* 0x38 */ f32 m_wall_h_direct; + /* 0x3C */ s16 m_wall_angle_y; + +public: + enum { + /* 0x2 */ WALL_HIT = 2, + /* 0x4 */ WALL_H_DIRECT = 4, + }; + + /* 80075EAC */ dBgS_AcchCir(); + /* 80075F14 */ void ClrWallHit(); + /* 80075F40 */ void SetWallR(f32); + /* 80075F48 */ void CalcWallRR(); + /* 80075F58 */ void SetWall(f32, f32); + /* 80075F80 */ void SetWallHDirect(f32); + + /* 80077414 */ virtual ~dBgS_AcchCir() {} + + f32 GetWallH() { return m_wall_h; } + f32 GetWallR() { return m_wall_r; } + void SetWallH(f32 h) { m_wall_h = h; } + void ClrWallHDirect() { m_flags &= ~WALL_H_DIRECT; } + bool ChkWallHit() { return m_flags & WALL_HIT; } + + void SetCir(cXyz& pos) { m_cir.Set(pos.x, pos.z, pos.y + GetWallH(), m_wall_r); } +}; // Size: 0x40 + +class dBgS; +class dBgS_Acch : public cBgS_Chk, public dBgS_Chk { +public: + enum { + /* 0x000002 */ GRND_NONE = (1 << 1), + /* 0x000004 */ WALL_NONE = (1 << 2), + /* 0x000008 */ ROOF_NONE = (1 << 3), + /* 0x000010 */ WALL_HIT = (1 << 4), + /* 0x000020 */ GROUND_HIT = (1 << 5), + /* 0x000040 */ GROUND_FIND = (1 << 6), + /* 0x000080 */ GROUND_LANDING = (1 << 7), + /* 0x000100 */ GROUND_AWAY = (1 << 8), + /* 0x000200 */ ROOF_HIT = (1 << 9), + /* 0x000400 */ WATER_NONE = (1 << 10), + /* 0x000800 */ WATER_HIT = (1 << 11), + /* 0x001000 */ WATER_IN = (1 << 12), + /* 0x002000 */ LINE_CHECK = (1 << 13), + /* 0x004000 */ LINE_CHECK_NONE = (1 << 14), + /* 0x008000 */ CLR_SPEED_Y = (1 << 15), + /* 0x010000 */ LINE_CHECK_HIT = (1 << 16), + /* 0x100000 */ MOVE_BG_ONLY = (1 << 20), + /* 0x200000 */ GND_THIN_CELLING_OFF = (1 << 21), + /* 0x400000 */ WALL_SORT = (1 << 22), + /* 0x800000 */ LINE_DOWN = (1 << 23), + }; + + /* 800760A0 */ dBgS_Acch(); + /* 800761CC */ void Init(); + /* 80076288 */ void Set(fopAc_ac_c*, int, dBgS_AcchCir*); + /* 80076248 */ void Set(cXyz*, cXyz*, fopAc_ac_c*, int, dBgS_AcchCir*, cXyz*, csXyz*, csXyz*); + /* 800762D8 */ void GroundCheckInit(dBgS&); + /* 80076350 */ void GroundCheck(dBgS&); + /* 8007654C */ void GroundRoofProc(dBgS&); + /* 80076624 */ void LineCheck(dBgS&); + /* 80076AAC */ void CrrPos(dBgS&); + /* 80076F84 */ f32 GetWallAllR(); + /* 80076FC0 */ void SetWallCir(); + /* 8007703C */ void CalcWallBmdCyl(); + /* 80077114 */ void SetGroundUpY(f32); + /* 80077128 */ f32 GetWallAllLowH(); + /* 80077178 */ f32 GetWallAllLowH_R(); + /* 800771E4 */ f32 GetSpeedY(); + /* 80077200 */ f32 GetWallAddY(Vec&); + /* 80077278 */ void SetNowActorInfo(int, void*, unsigned int); + /* 80077288 */ void SetWallPolyIndex(int, int); + /* 800772E8 */ void CalcMovePosWork(); + /* 8007732C */ void CalcWallRR(); + /* 80077388 */ void SetMoveBGOnly(); + /* 800773A4 */ void ClrMoveBGOnly(); + /* 800773C0 */ void SetGndThinCellingOff(); + /* 800773D0 */ void ClrGndThinCellingOff(); + /* 800773E0 */ bool ChkGndThinCellingOff(); + /* 800773EC */ void OnWallSort(); + /* 800773FC */ bool ChkWallSort(); + /* 80077408 */ bool ChkLineDown(); + /* 800D00D0 */ bool ChkRoofHit() const; + /* 800D00DC */ void ClrGroundHit(); + /* 80141404 */ bool ChkGroundHit() const; + + /* 80075F94 */ virtual ~dBgS_Acch(); + + cXyz* GetPos() { return pm_pos; } + cXyz* GetOldPos() { return pm_old_pos; } + f32 GetGroundH() const { return m_ground_h; } + f32 GetRoofHeight() const { return m_roof_height; } + 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; } + 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; } + 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; } + 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();} + void ClrGroundFind() { m_flags &= ~GROUND_FIND; } + u32 MaskRoofHit() { return m_flags & ROOF_HIT; } + bool ChkRoofHit() { return MaskRoofHit(); } + bool ChkClrSpeedY() { 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(); } + void ClrWaterNone() { m_flags &= ~WATER_NONE; } + void OnLineCheck() { m_flags |= LINE_CHECK; } + void ClrRoofNone() { m_flags &= ~ROOF_NONE; } + void SetRoofCrrHeight(f32 height) { m_roof_crr_height = height; } + void SetGrndNone() { m_flags |= GRND_NONE; } + void ClrGrndNone() { m_flags &= ~GRND_NONE; } + bool ChkMoveBGOnly() const { return m_flags & MOVE_BG_ONLY; } + void SetWallHit() { m_flags |= WALL_HIT; } + void ClrWallNone() { m_flags &= ~WALL_NONE; } + cM3dGCyl* GetWallBmdCylP() { return &m_wall_cyl; } + +public: + /* 0x028 */ u32 m_flags; + /* 0x02C */ cXyz* pm_pos; + /* 0x030 */ cXyz* pm_old_pos; + /* 0x034 */ cXyz* pm_speed; + /* 0x038 */ csXyz* pm_angle; + /* 0x03C */ csXyz* pm_shape_angle; + /* 0x040 */ cM3dGLin m_lin; + /* 0x05C */ cM3dGCyl m_wall_cyl; + /* 0x074 */ int m_bg_index; + /* 0x078 */ void* field_0x7c; + /* 0x07C */ u32 field_0x80; + /* 0x080 */ fopAc_ac_c* m_my_ac; + /* 0x084 */ int m_tbl_size; + /* 0x088 */ dBgS_AcchCir* field_0x8c; + /* 0x08C */ f32 field_0x90; + /* 0x090 */ f32 field_0x94; + /* 0x094 */ f32 m_ground_h; + /* 0x098 */ f32 field_0x9c; + /* 0x09C */ cM3dGPla field_0xa0; + /* 0x0B0 */ u8 field_0xb4; + /* 0x0B4 */ f32 field_0xb8; + /* 0x0B8 */ f32 field_0xbc; + /* 0x0BC */ u8 field_0xc0; + /* 0x0C0 */ f32 m_roof_height; + /* 0x0C4 */ f32 m_roof_crr_height; + /* 0x0C8 */ f32 field_0xc8; + /* 0x0CC */ int field_0xd4; + /* 0x0D0 */ f32 field_0xd8; + /* 0x0D4 */ dBgS_GndChk m_gnd; + /* 0x128 */ dBgS_RoofChk m_roof; + /* 0x174 */ dBgS_WtrChk m_wtr; +}; // Size: 0x1C4 + +class dBgS_LinkAcch : public dBgS_Acch { +public: + dBgS_LinkAcch() { /* SetLink(); */ } + + /* 80140F30 */ virtual ~dBgS_LinkAcch(); +}; + +class dBgS_ObjAcch : public dBgS_Acch { +public: + dBgS_ObjAcch() { + /* SetObj(); */ + } + + /* 80BB336C */ virtual ~dBgS_ObjAcch() {} +}; + +#endif /* D_BG_D_BG_S_ACCH_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_chk.h b/include/d/d_bg_s_chk.h new file mode 100644 index 000000000..08c24f34d --- /dev/null +++ b/include/d/d_bg_s_chk.h @@ -0,0 +1,16 @@ +#ifndef D_BG_D_BG_S_CHK_H +#define D_BG_D_BG_S_CHK_H + +#include "d/d_bg_s_grp_pass_chk.h" +#include "d/d_bg_s_poly_pass_chk.h" + +class dBgS_Chk : public dBgS_PolyPassChk, public dBgS_GrpPassChk { +public: + dBgS_Chk(); + cBgS_PolyPassChk* GetPolyPassChkInfo(); + cBgS_GrpPassChk* GetGrpPassChkInfo(); + + virtual ~dBgS_Chk(); +}; // Size: 0x14 + +#endif /* D_BG_D_BG_S_CHK_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_gnd_chk.h b/include/d/d_bg_s_gnd_chk.h new file mode 100644 index 000000000..7c81b7350 --- /dev/null +++ b/include/d/d_bg_s_gnd_chk.h @@ -0,0 +1,61 @@ +#ifndef D_BG_D_BG_S_GND_CHK_H +#define D_BG_D_BG_S_GND_CHK_H + +#include "SSystem/SComponent/c_bg_s_gnd_chk.h" +#include "d/d_bg_s_chk.h" + +class dBgS_GndChk : public cBgS_GndChk, public dBgS_Chk { +public: + /* 8007757C */ dBgS_GndChk(); + /* 800775F0 */ virtual ~dBgS_GndChk(); +}; // Size: 0x54 + +class dBgS_LinkGndChk : public dBgS_GndChk { +public: + dBgS_LinkGndChk() { /* SetLink(); */ } + /* 80140EB8 */ virtual ~dBgS_LinkGndChk(); +}; + +class dBgS_ObjGndChk : public dBgS_GndChk { +public: + dBgS_ObjGndChk() { /* SetObj(); */ } + + /* 8001E020 */ virtual ~dBgS_ObjGndChk(); +}; + +class dBgS_ObjGndChk_Wtr : public dBgS_ObjGndChk { +public: + /* 80077678 */ dBgS_ObjGndChk_Wtr(); + + /* 80077710 */ virtual ~dBgS_ObjGndChk_Wtr(); +}; + +class dBgS_ObjGndChk_Spl : public dBgS_ObjGndChk { +public: + /* 800777B0 */ dBgS_ObjGndChk_Spl(); + + /* 80077848 */ virtual ~dBgS_ObjGndChk_Spl(); +}; + +class dBgS_ObjGndChk_All : public dBgS_ObjGndChk { +public: + /* 800778E8 */ virtual ~dBgS_ObjGndChk_All(); + + dBgS_ObjGndChk_All() { /* OnAll(); */ } +}; + +class dBgS_CamGndChk : public dBgS_GndChk { +public: + dBgS_CamGndChk() { /* SetCam(); */ } + + /* 80077988 */ virtual ~dBgS_CamGndChk(); +}; + +class dBgS_CamGndChk_Wtr : public dBgS_CamGndChk { +public: + /* 80077A00 */ dBgS_CamGndChk_Wtr(); + + /* 80077A98 */ virtual ~dBgS_CamGndChk_Wtr(); +}; + +#endif /* D_BG_D_BG_S_GND_CHK_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_grp_pass_chk.h b/include/d/d_bg_s_grp_pass_chk.h new file mode 100644 index 000000000..3e8960337 --- /dev/null +++ b/include/d/d_bg_s_grp_pass_chk.h @@ -0,0 +1,30 @@ +#ifndef D_BG_D_BG_S_GRP_PASS_CHK_H +#define D_BG_D_BG_S_GRP_PASS_CHK_H + +#include "SSystem/SComponent/c_bg_s_chk.h" + +class dBgS_GrpPassChk : public cBgS_GrpPassChk { +public: + enum { + /* 0x1 */ NORMAL_GRP = 1, + /* 0x2 */ WATER_GRP, + /* 0x3 */ FULL_GRP + }; + + /* 80077BA0 */ dBgS_GrpPassChk(); + + /* 80077BC4 */ virtual ~dBgS_GrpPassChk(); + + void OnWaterGrp() { mGrp |= WATER_GRP; } + void OnSpl() { mGrp |= WATER_GRP; } + void OnNormalGrp() { mGrp |= NORMAL_GRP; } + void OffNormalGrp() { mGrp &= ~NORMAL_GRP; } + void OffFullGrp() { mGrp &= ~FULL_GRP; } + void OnAll() { mGrp |= FULL_GRP; } + u32 MaskNormalGrp() const {return mGrp & 1; } + u32 MaskWaterGrp() const {return mGrp & 2; } +private: + /* 0x4 */ u32 mGrp; +}; + +#endif /* D_BG_D_BG_S_GRP_PASS_CHK_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_lin_chk.h b/include/d/d_bg_s_lin_chk.h new file mode 100644 index 000000000..bda6674e8 --- /dev/null +++ b/include/d/d_bg_s_lin_chk.h @@ -0,0 +1,83 @@ +#ifndef D_BG_D_BG_S_LIN_CHK_H +#define D_BG_D_BG_S_LIN_CHK_H + +#include "SSystem/SComponent/c_bg_s_lin_chk.h" +#include "d/d_bg_s_chk.h" + +class fopAc_ac_c; + +class dBgS_LinChk : public cBgS_LinChk, public dBgS_Chk { +public: + /* 80077C68 */ dBgS_LinChk(); + /* 80077D64 */ void Set(cXyz const* pi_start, cXyz const* pi_end, fopAc_ac_c const*); + + /* 80077CDC */ virtual ~dBgS_LinChk(); + + /* 0x00 cBgS_LinChk */; + /* 0x58 dBgS_Chk */; +}; + +class dBgS_LinkLinChk : public dBgS_LinChk { +public: + /* 80078030 */ dBgS_LinkLinChk(); + + /* 8007808C */ virtual ~dBgS_LinkLinChk(); +}; + +class dBgS_RopeLinChk : public dBgS_LinChk { +public: + /* 8007838C */ dBgS_RopeLinChk(); + + /* 800783E8 */ virtual ~dBgS_RopeLinChk(); +}; + +class dBgS_BoomerangLinChk : public dBgS_LinChk { +public: + /* 800782B8 */ dBgS_BoomerangLinChk(); + + /* 80078314 */ virtual ~dBgS_BoomerangLinChk(); +}; + +class dBgS_ArrowLinChk : public dBgS_LinChk { +public: + /* 800781D8 */ dBgS_ArrowLinChk(); + + /* 80078240 */ virtual ~dBgS_ArrowLinChk(); +}; + +class dBgS_ObjLinChk : public dBgS_LinChk { +public: + /* 80077F5C */ dBgS_ObjLinChk(); + + /* 80077FB8 */ virtual ~dBgS_ObjLinChk(); +}; + +class dBgS_BombLinChk : public dBgS_LinChk { +public: + /* 80078104 */ dBgS_BombLinChk(); + + /* 80078160 */ virtual ~dBgS_BombLinChk(); +}; + +class dBgS_CamLinChk : public dBgS_LinChk { +public: + /* 80077DA4 */ dBgS_CamLinChk(); + + /* 80077E00 */ virtual ~dBgS_CamLinChk(); +}; + +class dBgS_CamLinChk_NorWtr : public dBgS_CamLinChk { +public: + /* 80077E78 */ dBgS_CamLinChk_NorWtr(); + + /* 80077EE4 */ virtual ~dBgS_CamLinChk_NorWtr(); +}; + +class dBgS_MirLightLinChk : public dBgS_LinChk { +public: + dBgS_MirLightLinChk(); + + virtual ~dBgS_MirLightLinChk(); +}; + +#endif /* D_BG_D_BG_S_LIN_CHK_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_poly_pass_chk.h b/include/d/d_bg_s_poly_pass_chk.h new file mode 100644 index 000000000..4b0c596bc --- /dev/null +++ b/include/d/d_bg_s_poly_pass_chk.h @@ -0,0 +1,17 @@ +#ifndef D_BG_D_BG_S_POLY_PASS_CHK_H +#define D_BG_D_BG_S_POLY_PASS_CHK_H + +#include "dolphin/types.h" + +class cBgS_PolyPassChk { +public: + virtual ~cBgS_PolyPassChk(); +}; + +class dBgS_PolyPassChk : public cBgS_PolyPassChk { +public: + dBgS_PolyPassChk(); + virtual ~dBgS_PolyPassChk(); +}; + +#endif /* D_BG_D_BG_S_POLY_PASS_CHK_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_roof_chk.h b/include/d/d_bg_s_roof_chk.h new file mode 100644 index 000000000..b91037ac0 --- /dev/null +++ b/include/d/d_bg_s_roof_chk.h @@ -0,0 +1,29 @@ +#ifndef D_BG_D_BG_S_ROOF_CHK_H +#define D_BG_D_BG_S_ROOF_CHK_H + +#include "SSystem/SComponent/c_bg_s_poly_info.h" +#include "SSystem/SComponent/c_xyz.h" +#include "d/d_bg_s_chk.h" + +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 i_SetPos(cXyz const& pos) { m_pos = pos; } + cXyz* GetPosP() { return &m_pos; } + +private: + /* 0x38 */ cXyz m_pos; +}; // Size: 0x44 + +class dBgS_LinkRoofChk : public dBgS_RoofChk { +public: + dBgS_LinkRoofChk() { /* SetLink(); */ } + /* 80140E40 */ virtual ~dBgS_LinkRoofChk(); +}; + +#endif /* D_BG_D_BG_S_ROOF_CHK_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_spl_grp_chk.h b/include/d/d_bg_s_spl_grp_chk.h new file mode 100644 index 000000000..f9df12a96 --- /dev/null +++ b/include/d/d_bg_s_spl_grp_chk.h @@ -0,0 +1,40 @@ +#ifndef D_BG_D_BG_S_SPL_GRP_CHK_H +#define D_BG_D_BG_S_SPL_GRP_CHK_H + +#include "SSystem/SComponent/c_bg_s_poly_info.h" +#include "SSystem/SComponent/c_xyz.h" +#include "d/d_bg_s_chk.h" + +class dBgS_SplGrpChk : public cBgS_PolyInfo, public cBgS_Chk, public dBgS_Chk { +public: + enum { + /* 0x1 */ FIND = 1, + /* 0x2 */ IN = 2, + /* 0x4 */ MOVE_BG_ONLY = 4 + }; + + /* 80078B90 */ void Set(cXyz&, f32); + /* 80078BB0 */ dBgS_SplGrpChk(); + /* 80078D0C */ void Init(); + + /* 80078C78 */ virtual ~dBgS_SplGrpChk(); + + void OffFind() { m_flags &= ~FIND; } + void OffIn() { m_flags &= ~IN; } + void OffMoveBGOnly() { m_flags &= ~MOVE_BG_ONLY; } + void OnMoveBGOnly() { m_flags |= MOVE_BG_ONLY; } + void OnFind() { m_flags |= FIND; } + bool ChkMoveBGOnly() { return m_flags & MOVE_BG_ONLY; } + void SetHeight(f32 height) { m_height = height; } + f32 GetHeight() { return m_height; } + cXyz& GetPosP() { return m_ground; } + f32 GetRoof() const { return m_roof; } + +private: + /* 0x38 */ cXyz m_ground; + /* 0x44 */ f32 m_roof; + /* 0x48 */ f32 m_height; + /* 0x4C */ u32 m_flags; +}; // Size: 0x50 + +#endif /* D_BG_D_BG_S_SPL_GRP_CHK_H */ \ No newline at end of file diff --git a/include/d/d_bg_s_wtr_chk.h b/include/d/d_bg_s_wtr_chk.h new file mode 100644 index 000000000..ce70935e7 --- /dev/null +++ b/include/d/d_bg_s_wtr_chk.h @@ -0,0 +1,13 @@ +#ifndef D_BG_D_BG_S_WTR_CHK_H +#define D_BG_D_BG_S_WTR_CHK_H + +#include "d/d_bg_s_spl_grp_chk.h" + +class dBgS_WtrChk : public dBgS_SplGrpChk { +public: + /* 80079164 */ dBgS_WtrChk(); + + /* 8001DF30 */ virtual ~dBgS_WtrChk(); +}; // Size: 0x50 + +#endif /* D_BG_D_BG_S_WTR_CHK_H */ \ No newline at end of file diff --git a/include/d/d_cc_d.h b/include/d/d_cc_d.h new file mode 100644 index 000000000..b672b3e0c --- /dev/null +++ b/include/d/d_cc_d.h @@ -0,0 +1,395 @@ +#ifndef D_CC_D_CC_D_H +#define D_CC_D_CC_D_H + +/** + * d_cc_d.h + * Actor Collision + */ + +#include "SSystem/SComponent/c_cc_d.h" + +enum dCcD_hitSe {}; + +enum dCcG_At_Spl {}; + +enum dCcG_Tg_Spl {}; + +struct dCcD_SrcGAtTgCoCommonBase { + /* 0x0 */ u32 mGFlag; +}; // Size: 0x4 + +struct dCcD_SrcGObjAt { + /* 0x0 */ u8 mSe; // Sound Effect ID + /* 0x1 */ u8 mHitMark; // Hit Mark particle ID + /* 0x2 */ u8 mSpl; + /* 0x3 */ u8 mMtrl; + /* 0x4 */ dCcD_SrcGAtTgCoCommonBase mBase; +}; // Size: 0x8 + +struct dCcD_SrcGObjTg { + /* 0x0 */ u8 mSe; // Sound Effect ID + /* 0x1 */ u8 mHitMark; // Hit Mark particle ID + /* 0x2 */ u8 mSpl; + /* 0x3 */ u8 mMtrl; + /* 0x4 */ dCcD_SrcGAtTgCoCommonBase mBase; +}; // Size: 0x8 + +struct dCcD_SrcGObjCo { + /* 0x0 */ dCcD_SrcGAtTgCoCommonBase mBase; +}; // Size: 0x4 + +struct dCcD_SrcGObjInf { + /* 0x00 */ cCcD_SrcObj mObj; + /* 0x1C */ dCcD_SrcGObjAt mGObjAt; + /* 0x24 */ dCcD_SrcGObjTg mGObjTg; + /* 0x2C */ dCcD_SrcGObjCo mGObjCo; +}; // Size: 0x30 + +struct dCcD_SrcSph { + /* 0x00 */ dCcD_SrcGObjInf mObjInf; + /* 0x30 */ cCcD_SrcSphAttr mSphAttr; +}; // Size: 0x40 + +struct dCcD_SrcTri { + /* 0x00 */ dCcD_SrcGObjInf mObjInf; + /* 0x30 */ cCcD_SrcTriAttr mTriAttr; +}; // Size: 0x54 + +struct dCcD_SrcCyl { + /* 0x00 */ dCcD_SrcGObjInf mObjInf; + /* 0x30 */ cM3dGCylS mCyl; +}; // Size: 0x44 + +struct dCcD_SrcCps { + /* 0x00 */ dCcD_SrcGObjInf mObjInf; + /* 0x30 */ cCcD_SrcCpsAttr mCpsAttr; +}; // Size: 0x4C + +class dCcD_GStts : public cCcD_GStts { +public: + dCcD_GStts(); + virtual ~dCcD_GStts() {} + + void Ct(); + void Move(); + void ClrAt() { mAt = 0; } + void ClrTg() { mTg = 0; } + void SetAtApid(unsigned int id) { mAtApid = id; } + void SetTgApid(unsigned int id) { mTgApid = id; } + u8 GetRoomId() { return mRoomId; } + void SetRoomId(int id) { mRoomId = id; } + unsigned int GetAtOldApid() { return mAtOldApid; } + unsigned int GetTgOldApid() { return mTgOldApid; } + bool ChkNoActor() { return field_0x1C & 1; } + bool ChkNoneActorPerfTblId() { return field_0x08 == 0xFFFF; } + dCcG_At_Spl GetAtSpl() { return (dCcG_At_Spl)mAt; } + void SetAtSpl(dCcG_At_Spl spl) { mAt = spl; } + dCcG_Tg_Spl GetTgSpl() { return (dCcG_Tg_Spl)mTg; } + void SetTgSpl(dCcG_Tg_Spl spl) { mTg = spl; } + void OnNoActor() { field_0x1C |= 1; } + + // private: + /* 0x04 */ u8 mAt; + /* 0x05 */ u8 mTg; + /* 0x06 */ u8 mRoomId; + /* 0x08 */ u16 field_0x08; + /* 0x0C */ int mAtApid; + /* 0x10 */ int mAtOldApid; + /* 0x14 */ int mTgApid; + /* 0x18 */ int mTgOldApid; + /* 0x1C */ int field_0x1C; +}; // Size = 0x20 + +class dCcD_Stts : public cCcD_Stts, public dCcD_GStts { +public: + dCcD_Stts() {} + virtual cCcD_GStts* GetGStts(); + void Init(int, int, fopAc_ac_c*); + virtual void Ct(); + virtual void ClrAt(); + virtual void ClrTg(); + virtual ~dCcD_Stts() {} + +}; // Size = 0x3C + +class dCcD_GObjInf; +typedef void (*dCcD_HitCallback)(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*); + +// Attack/Defense/Correction Collider Common Base +class dCcD_GAtTgCoCommonBase { +public: + /* 0x00 */ u32 mGFlag; + /* 0x04 */ u32 mRPrm; + /* 0x08 */ dCcD_HitCallback mHitCallback; + /* 0x0C */ u32 mApid; + /* 0x10 */ fopAc_ac_c* mAc; + /* 0x14 */ s8 mEffCounter; + /* 0x15 */ u8 field_0x15[3]; + /* 0x18 vtable */ + +public: + dCcD_GAtTgCoCommonBase() { ct(); } + void ClrActorInfo(); + void ct(); + void SetHitApid(unsigned int); + fopAc_ac_c* GetAc(); + void Set(dCcD_SrcGAtTgCoCommonBase const&); + void SetEffCounterTimer(); + void SubtractEffCounter(); + bool ChkEffCounter(); + virtual ~dCcD_GAtTgCoCommonBase() {} + + void ClrEffCounter() { mEffCounter = 0; } + u32 GetGFlag() const { return mGFlag; } + u32 GetRPrm() const { return mRPrm; } + u32 MskSPrm(u32 mask) const { return mGFlag & mask; } + u32 MskRPrm(u32 mask) const { return mRPrm & mask; } + bool ChkSPrm(u32 mask) const { return MskSPrm(mask); } + void OnSPrm(u32 flag) { mGFlag |= flag; } + void OnRPrm(u32 flag) { mRPrm |= flag; } + void OffSPrm(u32 flag) { mGFlag &= ~flag; } + void OffRPrm(u32 flag) { mRPrm &= ~flag; } + bool ChkRPrm(u32 flag) const { return MskRPrm(flag); } + void SetHitCallback(dCcD_HitCallback callback) { mHitCallback = callback; } + dCcD_HitCallback GetHitCallback() { return mHitCallback; } + void ClrHit() { ClrActorInfo(); } +}; // Size = 0x1C + +// Attack (At) Collider +class dCcD_GObjAt : public dCcD_GAtTgCoCommonBase { +public: + void Set(dCcD_SrcGObjAt const&); + virtual ~dCcD_GObjAt() {} + void SetVec(cXyz& vec) { mVec = vec; } + cXyz& GetVec() { return mVec; } + cXyz* GetVecP() { return &mVec; } + void SetHitMark(u8 mark) { mHitMark = mark; } + void SetSe(u8 se) { mSe = se; } + void SetMtrl(u8 mtrl) { mMtrl = mtrl; } + void SetAtSpl(dCcG_At_Spl spl) { mSpl = spl; } + u8 GetSe() { return mSe; } + u8 GetSpl() { return mSpl; } + u8 GetMtrl() { return mMtrl; } + u8 GetHitMark() { return mHitMark; } + void SetRVec(cXyz& vec) { mRVec = vec; } + void SetHitPos(cXyz& pos) { mHitPos = pos; } + + // private: + /* 0x1C */ u8 mSe; + /* 0x1D */ u8 mMtrl; + /* 0x1E */ u8 mHitMark; + /* 0x1F */ u8 mSpl; + /* 0x20 */ cXyz mHitPos; + /* 0x2C */ cXyz mVec; + /* 0x38 */ cXyz mRVec; +}; // Size = 0x44 + +// Defense (Tg) Collider +class dCcD_GObjTg : public dCcD_GAtTgCoCommonBase { +public: + void Set(dCcD_SrcGObjTg const&); + virtual ~dCcD_GObjTg() {} + void SetSe(u8 se) { mSe = se; } + void SetVec(cXyz& vec) { mVec = vec; } + cXyz& GetVec() { return mVec; } + void SetShieldFrontRangeYAngle(s16* angle) { mShieldFrontRangeYAngle = angle; } + void SetMtrl(u8 mtrl) { mMtrl = mtrl; } + u8 GetMtrl() { return mMtrl; } + void SetHitMark(CcG_Tg_HitMark mark) { mHitMark = mark; } + s16* GetShieldFrontRangeYAngle() { return mShieldFrontRangeYAngle; } + u8 GetSpl() { return mSpl; } + u8 GetHitMark() { return mHitMark; } + void SetRVec(cXyz& vec) { mRVec = vec; } + cXyz* GetVecP() { return &mVec; } + void SetHitPos(cXyz& pos) { mHitPos = pos; } + +private: + /* 0x1C */ u8 mSe; + /* 0x1D */ u8 mMtrl; + /* 0x1E */ u8 mHitMark; + /* 0x1F */ u8 mSpl; + /* 0x20 */ cXyz mVec; + /* 0x2C */ cXyz mRVec; + /* 0x38 */ cXyz mHitPos; + /* 0x44 */ s16* mShieldFrontRangeYAngle; +}; // Size = 0x48 + +// Correction (Co) Collider +class dCcD_GObjCo : public dCcD_GAtTgCoCommonBase { +public: + virtual ~dCcD_GObjCo() {} + void Set(dCcD_SrcGObjCo const& pSrc) { dCcD_GAtTgCoCommonBase::Set(pSrc.mBase); } +}; // Size = 0x1C ? + +// Object Info +class dCcD_GObjInf : public cCcD_GObjInf { +public: + dCcD_GObjInf(); + virtual ~dCcD_GObjInf(); + virtual cCcD_GObjInf* GetGObjInf(); + virtual void ClrAtHit(); + u32 ChkAtHit(); + void ResetAtHit(); + cCcD_Obj* GetAtHitObj(); + cCcD_GObjInf* GetAtHitGObj(); + u8 ChkAtNoGuard(); + virtual void ClrTgHit(); + u32 ChkTgHit(); + void ResetTgHit(); + cCcD_Obj* GetTgHitObj(); + dCcD_GObjInf* GetTgHitGObj(); + u8 GetTgHitObjSe(); + virtual void ClrCoHit(); + u32 ChkCoHit(); + void ResetCoHit(); + cCcD_Obj* GetCoHitObj(); + void Set(dCcD_SrcGObjInf const&); + + fopAc_ac_c* GetCoHitAc() { return mGObjCo.GetAc(); } + + void SetAtVec(cXyz& vec) { mGObjAt.SetVec(vec); } + void SetTgVec(cXyz& vec) { mGObjTg.SetVec(vec); } + bool ChkAtNoMass() const { return mGObjAt.ChkSPrm(8); } + void OnAtNoHitMark() { mGObjAt.OnSPrm(2); } + void OffAtNoHitMark() { mGObjAt.OffSPrm(2); } + void OnTgNoHitMark() { mGObjTg.OnSPrm(4); } + void OffTgNoHitMark() { mGObjTg.OffSPrm(4); } + void OnAtNoConHit() { mGObjAt.OnSPrm(1); } + void OffAtNoConHit() { mGObjAt.OffSPrm(1); } + void OnTgNoConHit() { mGObjTg.OnSPrm(2); } + void SetAtHitMark(u8 mark) { mGObjAt.SetHitMark(mark); } + void SetAtSe(u8 se) { mGObjAt.SetSe(se); } + void SetTgSe(u8 se) { mGObjTg.SetSe(se); } + void SetAtMtrl(u8 mtrl) { mGObjAt.SetMtrl(mtrl); } + void SetTgMtrl(u8 mtrl) { mGObjTg.SetMtrl(mtrl); } + fopAc_ac_c* GetAtHitAc() { return mGObjAt.GetAc(); } + bool ChkAtShieldHit() { return mGObjAt.ChkRPrm(1); } + cXyz* GetAtVecP() { return mGObjAt.GetVecP(); } + cXyz* GetTgVecP() { return mGObjTg.GetVecP(); } + void SetAtSpl(dCcG_At_Spl spl) { mGObjAt.SetAtSpl(spl); } + void SetAtHitCallback(dCcD_HitCallback callback) { mGObjAt.SetHitCallback(callback); } + void SetTgHitCallback(dCcD_HitCallback callback) { mGObjTg.SetHitCallback(callback); } + void SetCoHitCallback(dCcD_HitCallback callback) { mGObjCo.SetHitCallback(callback); } + u8 GetAtSe() { return mGObjAt.GetSe(); } + dCcG_At_Spl GetAtSpl() { return (dCcG_At_Spl)mGObjAt.GetSpl(); } + u8 GetAtMtrl() { return mGObjAt.GetMtrl(); } + u8 GetTgMtrl() { return mGObjTg.GetMtrl(); } + fopAc_ac_c* GetTgHitAc() { return mGObjTg.GetAc(); } + void SetTgShieldFrontRangeYAngle(s16* angle) { mGObjTg.SetShieldFrontRangeYAngle(angle); } + void OffTgWolfSpNoDamage() { mGObjTg.OffSPrm(0x800); } + void OnTgWolfSpNoDamage() { mGObjTg.OnSPrm(0x800); } + void SetTgHitMark(CcG_Tg_HitMark mark) { mGObjTg.SetHitMark(mark); } + void OnTgSpShield() { mGObjTg.OnSPrm(0x40); } + void OffTgSpShield() { mGObjTg.OffSPrm(0x40); } + void OnTgShield() { mGObjTg.OnSPrm(0x1); } + void OffTgShield() { mGObjTg.OffSPrm(0x1); } + void OnTgShieldFrontRange() { mGObjTg.OnSPrm(0x8); } + void OffTgShieldFrontRange() { mGObjTg.OffSPrm(0x8); } + bool ChkTgIronBallRebound() { return mGObjTg.ChkSPrm(0x100); } + s16* GetTgShieldFrontRangeYAngle() { return mGObjTg.GetShieldFrontRangeYAngle(); } + bool ChkTgShield() { return mGObjTg.ChkSPrm(1); } + bool ChkTgSpShield() { return mGObjTg.ChkSPrm(0x40); } + bool ChkTgSmallShield() { return mGObjTg.ChkSPrm(0x10); } + bool ChkTgShieldFrontRange() { return mGObjTg.ChkSPrm(8); } + bool ChkAtNoConHit() { return mGObjAt.ChkSPrm(1); } + bool ChkAtStopNoConHit() { return mGObjAt.ChkSPrm(0x4); } + bool ChkTgNoConHit() { return mGObjTg.ChkSPrm(2); } + bool ChkTgStopNoConHit() { return mGObjTg.ChkSPrm(0x2000); } + bool ChkCoNoCamHit() { return mGObjCo.ChkSPrm(2); } + dCcD_HitCallback GetCoHitCallback() { return mGObjCo.GetHitCallback(); } + dCcD_HitCallback GetAtHitCallback() { return mGObjAt.GetHitCallback(); } + dCcD_HitCallback GetTgHitCallback() { return mGObjTg.GetHitCallback(); } + void SetCoHitApid(unsigned int apid) { mGObjCo.SetHitApid(apid); } + void SetAtHitApid(unsigned int apid) { mGObjAt.SetHitApid(apid); } + void SetTgHitApid(unsigned int apid) { mGObjTg.SetHitApid(apid); } + void OnCoHitNoActor() { mGObjCo.OnRPrm(1); } + void OffCoHitNoActor() { mGObjCo.OffRPrm(1); } + void OnAtHitNoActor() { mGObjAt.OnRPrm(2); } + void OffAtHitNoActor() { mGObjAt.OffRPrm(2); } + void OnTgHitNoActor() { mGObjTg.OnRPrm(1); } + void OffTgHitNoActor() { mGObjTg.OffRPrm(1); } + bool ChkCoHitNoActor() const { return mGObjCo.ChkRPrm(1); } + bool ChkAtHitNoActor() const { return mGObjAt.ChkRPrm(2); } + bool ChkTgHitNoActor() const { return mGObjTg.ChkRPrm(1); } + bool ChkTgWolfSpNoDamage() { return mGObjTg.ChkSPrm(0x800); } + bool ChkAtNoHitMark() { return mGObjAt.ChkSPrm(2); } + bool ChkTgNoHitMark() { return mGObjTg.ChkSPrm(4); } + bool ChkTgHookShotNoHitMark() { return mGObjTg.ChkSPrm(0x400); } + bool ChkTgArrowNoHitMark() { return mGObjTg.ChkSPrm(0x1000); } + dCcG_Tg_Spl GetTgSpl() { return (dCcG_Tg_Spl)mGObjTg.GetSpl(); } + int GetTgHitMark() { return mGObjTg.GetHitMark(); } + int GetAtHitMark() { return mGObjAt.GetHitMark(); } + bool ChkAtEffCounter() { return mGObjAt.ChkEffCounter(); } + bool ChkTgEffCounter() { return mGObjTg.ChkEffCounter(); } + void ClrAtEffCounter() { mGObjAt.ClrEffCounter(); } + void ClrTgEffCounter() { mGObjTg.ClrEffCounter(); } + void ClrCoEffCounter() { mGObjCo.ClrEffCounter(); } + void SetAtEffCounterTimer() { mGObjAt.SetEffCounterTimer(); } + void SetTgEffCounterTimer() { mGObjTg.SetEffCounterTimer(); } + void SubtractAtEffCounter() { mGObjAt.SubtractEffCounter(); } + void SubtractTgEffCounter() { mGObjTg.SubtractEffCounter(); } + void SubtractCoEffCounter() { mGObjCo.SubtractEffCounter(); } + void OnTgShieldHit() { mGObjTg.OnRPrm(2); } + void OffTgShieldHit() { mGObjTg.OffRPrm(2); } + void OnAtShieldHit() { mGObjAt.OnRPrm(1); } + void OffAtShieldHit() { mGObjAt.OffRPrm(1); } + void OffTgMagneHit() { mGObjTg.OffRPrm(4); } + void SetTgRVec(cXyz& vec) { mGObjTg.SetRVec(vec); } + void SetAtRVec(cXyz& vec) { mGObjAt.SetRVec(vec); } + void SetTgHitPos(cXyz& pos) { mGObjTg.SetHitPos(pos); } + void SetAtHitPos(cXyz& pos) { mGObjAt.SetHitPos(pos); } + +protected: + /* 0x050 */ dCcD_GObjAt mGObjAt; + /* 0x094 */ dCcD_GObjTg mGObjTg; + /* 0x0DC */ dCcD_GObjCo mGObjCo; +}; // Size = 0xF8 + +STATIC_ASSERT(sizeof(dCcD_GObjInf) == 0xF8); + +// Cylinder +class dCcD_Cyl : public dCcD_GObjInf, public cCcD_CylAttr { +public: + void Set(dCcD_SrcCyl const&); + cCcD_ShapeAttr* GetShapeAttr(); + void StartCAt(cXyz&); + void MoveCAt(cXyz&); + void MoveCTg(cXyz&); + virtual ~dCcD_Cyl() {} + dCcD_Cyl() {} +}; // Size = 0x130 + +// Sphere +class dCcD_Sph : public dCcD_GObjInf, public cCcD_SphAttr { +public: + dCcD_Sph() {} + void Set(dCcD_SrcSph const&); + void StartCAt(cXyz&); + void MoveCAt(cXyz&); + virtual cCcD_ShapeAttr* GetShapeAttr(); + virtual ~dCcD_Sph() {} +}; // Size = 0x12C + +// Capsule +class dCcD_Cps : public dCcD_GObjInf, public cCcD_CpsAttr { +public: + void Set(dCcD_SrcCps const&); + cCcD_ShapeAttr* GetShapeAttr(); + void CalcAtVec(); + void CalcTgVec(); + virtual ~dCcD_Cps() {} + dCcD_Cps() {} +}; // Size = 0x138 + +// Triangle +class dCcD_Tri : public dCcD_GObjInf, public cCcD_TriAttr { +public: + void Set(dCcD_SrcTri const&); + cCcD_ShapeAttr* GetShapeAttr(); + virtual ~dCcD_Tri() {} + dCcD_Tri() {} +}; + +dCcD_GObjInf* dCcD_GetGObjInf(cCcD_Obj* param_0); + +#endif /* D_CC_D_CC_D_H */ \ No newline at end of file diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index ca174f687..e85ad0665 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -314,6 +314,8 @@ class dComIfG_inf_c { /* 0x1D1C1 */ u8 field_0x1d1c1; }; +STATIC_ASSERT(sizeof(dComIfG_inf_c) == 0x1D1C8); + extern dComIfG_inf_c g_dComIfG_gameInfo; /** diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index c9187c272..24aaeba5b 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -152,6 +152,17 @@ class dDlst_shadowControl_c { STATIC_ASSERT(sizeof(dDlst_shadowControl_c) == 0x15E28); +class dDlst_mirrorPacket : public J3DPacket { +public: + /* 0x0010 */ u8 field_0x0010[0x0040 - 0x0010]; + /* 0x0040 */ Mtx mPosMtx; + /* 0x0070 */ u8 field_0x0070[0x0080 - 0x0070]; + /* 0x0080 */ Mtx mTexMtx; + /* 0x00B0 */ dDlst_shadowRealPoly_c mShadowPoly; + /* 0x24B8 */ GXTexObj mTexObj; + /* 0x24D8 */ u8 mAlpha; +}; + struct view_port_class; struct view_class; struct camera_class; diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index d0e9ca84d..f12c42bdf 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -70,6 +70,42 @@ class mDoExt_btkAnm : public mDoExt_baseAnm { STATIC_ASSERT(sizeof(mDoExt_btkAnm) == 0x14); +class J3DTevColorAnm; +class J3DTevKColorAnm; +class mDoExt_brkAnm : public mDoExt_baseAnm { +public: + mDoExt_brkAnm() { mpAnm = 0; } + /* 8000D70C */ int init(J3DMaterialTable* i_matTable, J3DAnmTevRegKey* i_brk, int i_anmPlay, + int i_attribute, f32 i_rate, s16 i_start, s16 param_6); + /* 8000D7A8 */ void entry(J3DMaterialTable* i_matTable, f32 i_frame); + + void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); } + void entry(J3DModelData* i_modelData, f32 i_frame) { + entry(&i_modelData->getMaterialTable(), i_frame); + } + + int init(J3DModelData* i_modelData, J3DAnmTevRegKey* i_brk, int i_anmPlay, int i_attribute, + f32 i_rate, s16 i_start, s16 param_6) { + return init(&i_modelData->getMaterialTable(), i_brk, i_anmPlay, i_attribute, i_rate, + i_start, param_6); + } + + int remove(J3DModelData* i_modelData) { return i_modelData->removeTevRegAnimator(mpAnm); } + void entryFrame() { entryFrame(getFrame()); } + void entryFrame(f32 frame) { mpAnm->setFrame(frame); } + + J3DAnmTevRegKey* getBrkAnm() const { return mpAnm; } + +private: + /* 0x08 */ J3DAnmTevRegKey* mpAnm; + /* 0x0C */ J3DTevColorAnm* mpCRegAnm; + /* 0x10 */ J3DTevKColorAnm* mpKRegAnm; + /* 0x14 */ u16 mCRegUpdateMaterialNum; + /* 0x16 */ u16 mKRegUpdateMaterialNum; +}; // Size: 0x18 + +STATIC_ASSERT(sizeof(mDoExt_brkAnm) == 0x18); + class mDoExt_bckAnm : public mDoExt_baseAnm { public: mDoExt_bckAnm() { mpMtxCalc = NULL; } @@ -97,6 +133,97 @@ class mDoExt_bckAnm : public mDoExt_baseAnm { STATIC_ASSERT(sizeof(mDoExt_bckAnm) == 0x10); +class mDoExt_btpAnm : public mDoExt_baseAnm { +public: + mDoExt_btpAnm() { mpAnm = NULL; } + /* 8000D54C */ int init(J3DMaterialTable* i_matTable, J3DAnmTexPattern* i_btk, int i_anmPlay, + int i_attribute, f32 i_rate, s16 i_start, s16 param_6); + /* 8000D5E8 */ void entry(J3DMaterialTable* i_matTable, s16 i_frame); + + void entry(J3DModelData* i_modelData) { entry(i_modelData, getFrame()); } + void entry(J3DModelData* i_modelData, s16 i_frame) { + entry(&i_modelData->getMaterialTable(), i_frame); + } + + int init(J3DModelData* i_modelData, J3DAnmTexPattern* i_btk, int i_anmPlay, int i_attribute, + f32 i_rate, s16 i_start, s16 param_6) { + return init(&i_modelData->getMaterialTable(), i_btk, i_anmPlay, i_attribute, i_rate, + i_start, param_6); + } + + int remove(J3DModelData* i_modelData) { return i_modelData->removeTexNoAnimator(mpAnm); } + +private: + /* 0x14 */ J3DAnmTexPattern* mpAnm; +}; + +class mDoExt_blkAnm : public mDoExt_baseAnm { +public: + /* 8000DA08 */ int init(J3DDeformData* i_deformData, J3DAnmCluster* i_blk, int i_anmPlay, + int i_attribute, f32 i_rate, s16 i_start, s16 param_6); + + J3DAnmCluster* getBlkAnm() { return mpAnm; } + +private: + /* 0x14 */ J3DAnmCluster* mpAnm; +}; + +class mDoExt_AnmRatioPack { +public: + /* 80140DF0 */ ~mDoExt_AnmRatioPack(); + /* 80140E2C */ mDoExt_AnmRatioPack(); + + void setRatio(f32 ratio) { mRatio = ratio; } + f32 getRatio() { return mRatio; } + J3DAnmTransform* getAnmTransform() { return mAnmTransform; } + void setAnmTransform(J3DAnmTransform* anm) { mAnmTransform = anm; } + +private: + /* 0x0 */ f32 mRatio; + /* 0x4 */ J3DAnmTransform* mAnmTransform; +}; // Size: 0x8 + +class mDoExt_MtxCalcOldFrame { +public: + /* 8000F848 */ void initOldFrameMorf(f32, u16, u16); + /* 8000F8CC */ void decOldFrameMorfCounter(); + + f32 getOldFrameRate() { return mOldFrameRate; } + J3DTransformInfo* getOldFrameTransInfo(int i) { return &mOldFrameTransInfo[i]; } + u16 getOldFrameStartJoint() { return mOldFrameStartJoint; } + Quaternion* getOldFrameQuaternion(int i_no) { return &mOldFrameQuaternion[i_no]; } + +private: + /* 0x00 */ bool mOldFrameFlg; + /* 0x04 */ f32 mOldFrameMorfCounter; + /* 0x08 */ f32 field_0x8; + /* 0x0C */ f32 mOldFrameRate; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ u16 mOldFrameStartJoint; + /* 0x1A */ u16 mOldFrameEndJoint; + /* 0x1C */ J3DTransformInfo* mOldFrameTransInfo; + /* 0x20 */ Quaternion* mOldFrameQuaternion; +}; // Size: 0x24 + +struct mDoExt_MtxCalcAnmBlendTblOld + : public J3DMtxCalcNoAnm { + /* 80014EB0 */ virtual ~mDoExt_MtxCalcAnmBlendTblOld(); + /* 8000F4B0 */ virtual void calc(); + + /* 0x4 */ int mNum; + /* 0x8 */ mDoExt_AnmRatioPack* mAnmRatio; +}; // Size: 0xC + +struct mDoExt_MtxCalcAnmBlendTbl : public mDoExt_MtxCalcAnmBlendTblOld { + /* 800D00BC */ J3DAnmTransform* getAnm(int); + + /* 80014F3C */ virtual ~mDoExt_MtxCalcAnmBlendTbl(); + /* 8000F26C */ virtual void calc(); + + /* 0xC */ mDoExt_MtxCalcOldFrame* mOldFrame; +}; + class mDoExt_McaMorfCallBack1_c { public: virtual void execute(u16, J3DTransformInfo*) = 0;