diff options
| author | YunataSavior <58997725+YunataSavior@users.noreply.github.com> | 2025-02-05 17:42:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-05 17:42:29 -0800 |
| commit | 6c24ff192933300faf555f1411e03432c751afe5 (patch) | |
| tree | c5ec6ab088421762435ca65664e3556db82df0b6 /include/d | |
| parent | 34b21412c4d62ad498d6dbe085a95ba308cf0c15 (diff) | |
d_a_e_oc nearly equivalent except for regalloc issue in daE_OC_c::create function (#2298)
* d_a_e_oc initial work
* 2nd set of d_a_e_oc work
* More d_a_e_oc work
* 3rd set of d_a_e_oc work
* 4th set of work for d_a_e_oc including data/rodata/bss cleanup
* Lots of execute work for d_a_e_oc
* More d_a_e_oc work: cleanup, plus impl of executeAttack
* 7th set of d_a_e_oc work
* 90 percent of the way done for d_a_e_oc
* d_a_e_oc done except for regalloc issues
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/actor/d_a_e_oc.h | 163 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_rotBridge.h | 8 | ||||
| -rw-r--r-- | include/d/actor/d_a_player.h | 5 |
3 files changed, 143 insertions, 33 deletions
diff --git a/include/d/actor/d_a_e_oc.h b/include/d/actor/d_a_e_oc.h index 1d0fe0a951..1cd72f679a 100644 --- a/include/d/actor/d_a_e_oc.h +++ b/include/d/actor/d_a_e_oc.h @@ -2,6 +2,9 @@ #define D_A_E_OC_H #include "f_op/f_op_actor_mng.h" +#include "d/d_bg_s_acch.h" +#include "d/d_cc_d.h" + /** * @ingroup actors-enemies @@ -11,30 +14,33 @@ * @details * */ +class daRotBridge_c; + class daE_OC_c : public fopEn_enemy_c { - /* 8072C630 */ void ctrlJoint(J3DJoint*, J3DModel*); - /* 8072C6E8 */ void JointCallBack(J3DJoint*, int); - /* 8072C734 */ void draw(); - /* 8072CBD4 */ void getVisionAngle(fopAc_ac_c*); +public: + /* 8072C630 */ int ctrlJoint(J3DJoint*, J3DModel*); + /* 8072C6E8 */ static int JointCallBack(J3DJoint*, int); + /* 8072C734 */ int draw(); + /* 8072CBD4 */ int getVisionAngle(fopAc_ac_c*); /* 8072CC10 */ void searchOtherOc(); - /* 8072CDA8 */ void setWatchMode(); - /* 8072CE00 */ void searchPlayer(); - /* 8072CF90 */ void searchPlayer2(); - /* 8072D100 */ void searchPlayerShakeHead(); - /* 8072D1DC */ void searchSound(); - /* 8072D364 */ void checkBeforeBg(); - /* 8072D640 */ void checkBeforeBgFind(); - /* 8072D87C */ void checkBeforeFloorBg(f32); + /* 8072CDA8 */ int setWatchMode(); + /* 8072CE00 */ int searchPlayer(); + /* 8072CF90 */ int searchPlayer2(); + /* 8072D100 */ int searchPlayerShakeHead(); + /* 8072D1DC */ int searchSound(); + /* 8072D364 */ int checkBeforeBg(); + /* 8072D640 */ int checkBeforeBgFind(); + /* 8072D87C */ int checkBeforeFloorBg(f32); /* 8072D994 */ void checkDamageBg(); /* 8072DB10 */ void setGroundAngle(); /* 8072DCBC */ void setActionMode(int, int); - /* 8072DD18 */ void getCutType(); + /* 8072DD18 */ int getCutType(); /* 8072DD8C */ void offTgSph(); /* 8072DDF4 */ void damage_check(); /* 8072E274 */ void setBck(int, u8, f32, f32); - /* 8072E31C */ void checkBck(int); + /* 8072E31C */ bool checkBck(int); /* 8072E37C */ void setSpitEffect(); - /* 8072E42C */ void getHeadAngle(); + /* 8072E42C */ s16 getHeadAngle(); /* 8072E498 */ void setStabPos(); /* 8072E528 */ void setWaitSound(); /* 8072E5A4 */ void setWalkSound(); @@ -52,7 +58,7 @@ class daE_OC_c : public fopEn_enemy_c { /* 80731124 */ void executeBigDamage(); /* 807316F8 */ void executeWatch(); /* 807319E4 */ void executeSoundWatch(); - /* 80731D18 */ void checkBeforeDeath(); + /* 80731D18 */ int checkBeforeDeath(); /* 80731D4C */ void executeDeath(); /* 80731F5C */ void setWaterEffect(); /* 80732074 */ void executeWaterDeath(); @@ -63,34 +69,129 @@ class daE_OC_c : public fopEn_enemy_c { /* 807331CC */ void executeFall(); /* 8073332C */ void executeFindStay(); /* 807335B4 */ void executeMoveOut(); - /* 80733E48 */ void checkWaterSurface(); + /* 80733E48 */ bool checkWaterSurface(); /* 80733F20 */ void action(); /* 807345D8 */ void mtx_set(); /* 80734698 */ void cc_set(); - /* 807348DC */ void execute(); - /* 80734B6C */ void _delete(); - /* 80734C10 */ void CreateHeap(); - /* 80734DA8 */ void create(); + /* 807348DC */ int execute(); + /* 80734B6C */ int _delete(); + /* 80734C10 */ int CreateHeap(); + /* 80734DA8 */ cPhs__Step create(); + + u8 isHomeWait() const { return mIsHomeWait; } + u8 isBattleOn() const { return mBattleOn; } + f32 getMoveRange() const { return mMoveRange; } + f32 getPlayerRange() const { return mPlayerRange; } + int getActionMode() const { return mActionMode; } + daE_OC_c* getTalkOc() const { return mpTalk; } + private: - /* 0x5ac */ u8 field_0x5ac[0xe88 - 0x5ac]; + /* 0x5a0 */ request_of_phase_process_class mPhaseReqs[2]; + /* 0x5bc */ mDoExt_McaMorfSO* mpMorf; + /* 0x5c0 */ J3DModel* mpModel; + /* 0x5c4 */ Z2CreatureEnemy mSound; + /* 0x668 */ daE_OC_c* mpBattle; + /* 0x66c */ daE_OC_c* mpDamage; + /* 0x670 */ daE_OC_c* mpTalk; + /* 0x674 */ daE_OC_c* mpParent; + /* 0x678 */ daRotBridge_c* mpBridge; + /* 0x67c */ cXyz field_0x67c; + /* 0x688 */ csXyz field_0x688; + /* 0x690 */ f32 mMoveRange; + /* 0x690 */ f32 mPlayerRange; + /* 0x698 */ f32 mWaterLvl; + /* 0x69c */ f32 field_0x69c; + /* 0x6a0 */ f32 field_0x6a0; + /* 0x6a4 */ const char* mName; + /* 0x6a8 */ int mActionMode; + /* 0x6ac */ int mOldActionMode; + /* 0x6b0 */ int mOcState; + /* 0x6b4 */ s32 field_0x6b4; + /* 0x6b8 */ u32 mShadowKey; + /* 0x6bc */ s16 field_0x6bc; + /* 0x6be */ s16 field_0x6be; + /* 0x6c0 */ s16 field_0x6c0; + /* 0x6c2 */ s16 field_0x6c2; + /* 0x6c4 */ s16 field_0x6c4; + /* 0x6c6 */ s16 field_0x6c6; + /* 0x6c8 */ s16 field_0x6c8; + /* 0x6ca */ s16 field_0x6ca; + /* 0x6cc */ s16 field_0x6cc; + /* 0x6ce */ s16 field_0x6ce; + /* 0x6d0 */ s16 field_0x6d0; + /* 0x6d2 */ s16 field_0x6d2; + /* 0x6d4 */ s16 mPrevShapeAngle; + /* 0x6d6 */ s16 field_0x6d6; + /* 0x6d8 */ s16 field_0x6d8; + /* 0x6da */ s16 field_0x6da; + /* 0x6dc */ u8 field_0x6dc; + /* 0x6dd */ u8 field_0x6dd; + /* 0x6de */ u8 field_0x6de; + /* 0x6df */ u8 field_0x6df; + /* 0x6e0 */ u8 field_0x6e0; + /* 0x6e1 */ u8 field_0x6e1; + /* 0x6e2 */ u8 field_0x6e2; + /* 0x6e3 */ u8 field_0x6e3; + /* 0x6e4 */ f32 field_0x6e4; + /* 0x6e8 */ u8 field_0x6e8; + /* 0x6e9 */ u8 mIsHomeWait; + /* 0x6ea */ u8 mBattleOn; + /* 0x6eb */ u8 field_0x6eb; + /* 0x6ec */ cXyz mPlayerPos; + /* 0x6f8 */ cXyz field_0x6f8; + /* 0x704 */ f32 field_0x704; + /* 0x708 */ dBgS_AcchCir mAcchCir; + /* 0x748 */ dBgS_ObjAcch mAcch; + /* 0x920 */ dCcD_Stts mStts; + /* 0x95c */ dCcD_Sph mSphs_cc[2]; + /* 0xbcc */ dCcD_Sph mSphs_at[2]; + /* 0xe3c */ cCcD_Obj* mpTgHitObj; + /* 0xe40 */ u8 field_0xe40[0xe44 - 0xe40]; + /* 0xe44 */ Z2CreatureEnemy* mpSound; + /* 0xe48 */ u8 field_0xe48[0xe4a - 0xe48]; + /* 0xe4a */ s16 field_0xe4a; + /* 0xe4c */ u8 field_0xe4c[0xe58 - 0xe4c]; + /* 0xe58 */ u16 field_0xe58; + /* 0xe5a */ u8 field_0xe5a; + /* 0xe5b */ u8 field_0xe5b; // might be unused. + /* 0xe5c */ u8 field_0xe5c[0xe60 - 0xe5c]; + /* 0xe60 */ u32 field_0xe60; + /* 0xe64 */ u32 field_0xe64; + /* 0xe68 */ u32 mParticleKey; + /* 0xe6c */ u32 field_0xe6c; + /* 0xe70 */ u32 field_0xe70[4]; + /* 0xe80 */ u32 mRippleKey; + /* 0xe84 */ u8 field_0xe84; }; STATIC_ASSERT(sizeof(daE_OC_c) == 0xe88); class daE_OC_HIO_c { +public: /* 8072C5CC */ daE_OC_HIO_c(); - /* 80735630 */ ~daE_OC_HIO_c(); + /* 80735630 */ virtual ~daE_OC_HIO_c() {} + + /* 0x04 */ s8 field_0x04; + /* 0x05 */ u8 field_0x05; + /* 0x08 */ f32 field_0x08; + /* 0x0c */ f32 field_0x0c; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1c */ f32 field_0x1c; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ f32 field_0x24; }; struct E_OC_n { - static u8 const oc_attackb_trans[40]; - static u8 const oc_attackc_trans[40]; - static u8 cc_sph_src[64]; - static u8 at_sph_src[64]; - static u8 m_battle_oc[4]; - static u8 m_damage_oc[4]; - static u8 m_death_oc[4]; - static u8 m_talk_oc[4]; + static f32 const oc_attackb_trans[10]; + static f32 const oc_attackc_trans[10]; + static dCcD_SrcSph cc_sph_src; + static dCcD_SrcSph at_sph_src; + static daE_OC_c* m_battle_oc; + static daE_OC_c* m_damage_oc; + static daE_OC_c* m_death_oc; + static daE_OC_c* m_talk_oc; }; diff --git a/include/d/actor/d_a_obj_rotBridge.h b/include/d/actor/d_a_obj_rotBridge.h index fb0af74748..0cb2950a2b 100644 --- a/include/d/actor/d_a_obj_rotBridge.h +++ b/include/d/actor/d_a_obj_rotBridge.h @@ -23,8 +23,14 @@ public: /* 80CBF404 */ void Draw(); /* 80CBF4BC */ void Delete(); + u8 getPlayerRide() const { return mPlayerRide; } + u8 getBridgeAngle() const { return mBridgeAngle; } private: - /* 0x568 */ u8 field_0x568[0x610 - 0x568]; + /* 0x568 */ u8 field_0x568[0x5af - 0x568]; + /* 0x5af */ u8 mPlayerRide; + /* 0x5b0 */ u8 field_0x5b0[0x5b8 - 0x5b0]; + /* 0x5b8 */ u8 mBridgeAngle; + /* 0x5b9 */ u8 field_0x5b9[0x610 - 0x5b9]; }; STATIC_ASSERT(sizeof(daRotBridge_c) == 0x610); diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index dcfbee3a91..7c5131ec64 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -3,6 +3,7 @@ #include "d/d_drawlist.h" #include "f_op/f_op_actor.h" +#include "d/d_com_inf_game.h" struct ResTIMG; @@ -1065,7 +1066,9 @@ public: inline static u32 i_getLastSceneMode(); inline static u32 getLastSceneMode(); - inline static bool checkWoodSwordEquip(); + inline static bool checkWoodSwordEquip() { + return dComIfGs_getSelectEquipSword() == fpcNm_ITEM_WOOD_STICK; + } inline static bool checkLightMasterSwordEquip(); inline BOOL i_checkSwordGet(); inline bool i_checkShieldGet() const; |
