diff --git a/configure.py b/configure.py index 7745d2a18c..6ab10a4227 100755 --- a/configure.py +++ b/configure.py @@ -2126,9 +2126,9 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_obj_saidan"), ActorRel(MatchingFor("GZ2E01"), "d_a_obj_sakuita"), ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_obj_sakuita_rope"), - ActorRel(NonMatching, "d_a_obj_scannon"), - ActorRel(NonMatching, "d_a_obj_scannon_crs"), - ActorRel(NonMatching, "d_a_obj_scannon_ten"), + ActorRel(MatchingFor("GZ2E01"), "d_a_obj_scannon"), + ActorRel(MatchingFor("GZ2E01"), "d_a_obj_scannon_crs"), + ActorRel(MatchingFor("GZ2E01"), "d_a_obj_scannon_ten"), ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_obj_sekidoor"), ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_obj_sekizo"), ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_obj_sekizoa"), diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 177c8de837..92b817ec23 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -32,6 +32,29 @@ enum J3DDiffFlag { J3DDiffFlag_Changed = 0x80000000, }; +#define J3D_DIFF_LIGHTOBJNUM(n) ((n & 0xF) << 4) +#define J3D_DIFF_TEXGENNUM(n) ((n & 0xF) << 8) +#define J3D_DIFF_TEXNONUM(n) ((n & 0xF) << 16) +#define J3D_DIFF_TEVSTAGENUM(n) ((n & 0xF) << 20) + +#define J3D_DIFF_FLAG(MatColor, ColorChan, AmbColor, LightNum, TexGenNum, TexGen, TexCoordNum, TevStageNum, TevReg, KColor, TexCoordScale, TevStageInd, Fog, Blend) \ + ( \ + (MatColor << 0) | \ + (ColorChan << 1) | \ + (AmbColor << 2) | \ + ((LightNum & 0xF) << 4) | \ + ((TexGenNum & 0xF) << 8) | \ + (TexGen << 12) | \ + ((TexCoordNum & 0xF) << 16) | \ + ((TevStageNum & 0xF) << 20) | \ + (TevReg << 24) | \ + (KColor << 25) | \ + (TexCoordScale << 26) | \ + (TevStageInd << 27) | \ + (Fog << 28) | \ + (Blend << 29) \ + ) + inline u32 getDiffFlag_LightObjNum(u32 diffFlags) { return (diffFlags & 0xf0) >> 4; } diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index 6dcd20d389..cdc60480d5 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -90,7 +90,7 @@ public: void setDebugFill(bool debugFill) { mDebugFill = debugFill; } bool getDebugFill() const { return mDebugFill; } - void* getStartAddr() const { return (void*)mStart; } + void* getStartAddr() { return (void*)mStart; } void* getEndAddr() const { return (void*)mEnd; } u32 getSize() const { return mSize; } bool getErrorFlag() const { return mErrorFlag; } diff --git a/include/d/actor/d_a_npc_cdn3.h b/include/d/actor/d_a_npc_cdn3.h index 9cb42f6134..22e9e3a3dc 100644 --- a/include/d/actor/d_a_npc_cdn3.h +++ b/include/d/actor/d_a_npc_cdn3.h @@ -292,11 +292,11 @@ public: int chkEvent() { attention_info.flags = 0; if (mFlowNodeNum > 0) { - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } if (mIsDarkWorld) { if (daPy_py_c::checkNowWolfEyeUp()) { - attention_info.flags |= 0xc00000; + attention_info.flags |= (fopAc_AttnFlag_UNK_0x800000 | fopAc_AttnFlag_UNK_0x400000); } else { attention_info.flags = 0; } @@ -314,7 +314,7 @@ public: } int orderEvent() { - if ((!mIsDarkWorld || daPy_py_c::checkNowWolfEyeUp()) && mFlowNodeNum > 0 && ((attention_info.flags & 8) || (attention_info.flags & 2))) { + if ((!mIsDarkWorld || daPy_py_c::checkNowWolfEyeUp()) && mFlowNodeNum > 0 && ((attention_info.flags & fopAc_AttnFlag_SPEAK_e) || (attention_info.flags & fopAc_AttnFlag_TALK_e))) { eventInfo.onCondition(dEvtCnd_CANTALK_e); } return 1; diff --git a/include/d/actor/d_a_npc_ks.h b/include/d/actor/d_a_npc_ks.h index 12a6d6e335..cb71431f3f 100644 --- a/include/d/actor/d_a_npc_ks.h +++ b/include/d/actor/d_a_npc_ks.h @@ -200,7 +200,7 @@ public: /* 0xC1C */ u8 field_0xc1c; u32 fopAcM_checkHawkCarryNow(fopAc_ac_c* param_1) { - return fopAcM_checkStatus(param_1, 0x80000000); + return fopAcM_CheckStatus(param_1, 0x80000000); } }; diff --git a/include/d/actor/d_a_obj_kago.h b/include/d/actor/d_a_obj_kago.h index 9d70650cc5..2efea3318a 100644 --- a/include/d/actor/d_a_obj_kago.h +++ b/include/d/actor/d_a_obj_kago.h @@ -72,7 +72,7 @@ public: } u32 fopAcM_checkHawkCarryNow(fopAc_ac_c* actor) { - return fopAcM_checkStatus(actor, 0x80000000); + return fopAcM_CheckStatus(actor, 0x80000000); } void popup(f32 param_1, f32 param_2, cXyz* param_3) { diff --git a/include/d/actor/d_a_obj_scannon.h b/include/d/actor/d_a_obj_scannon.h index c7cb57a1ad..c74d0cde31 100644 --- a/include/d/actor/d_a_obj_scannon.h +++ b/include/d/actor/d_a_obj_scannon.h @@ -11,17 +11,37 @@ * @details * */ -class daSCannon_c : public fopAc_ac_c { +class daSCannon_c : public fopAc_ac_c, public request_of_phase_process_class { public: + struct demoTable_s { + /* 0x0 */ void (daSCannon_c::*(*demo_proc_table)[2])(); + /* 0x4 */ char** cut_table; + /* 0x8 */ int cut_num; + }; + + enum daSCannon_exeMode { + MODE_WAIT, + MODE_ORDER_EVT, + MODE_ACTION_EVT, + MODE_END, + }; + + enum daSCannon_demoType { + DEMOTYPE_WARP_END, + DEMOTYPE_FIRE_FIRST, + DEMOTYPE_FIRE_TKS, + DEMOTYPE_FIRE_SECOND, + }; + /* 80CC6B0C */ daSCannon_c(); - /* 80CC6C10 */ ~daSCannon_c(); - /* 80CC6D10 */ void create(); - /* 80CC7204 */ void execute(); - /* 80CC7228 */ void draw(); - /* 80CC747C */ void Delete(); + /* 80CC6C10 */ virtual ~daSCannon_c(); + /* 80CC6D10 */ int create(); + /* 80CC7204 */ int execute(); + /* 80CC7228 */ int draw(); + /* 80CC747C */ int Delete(); /* 80CC7508 */ void setModelMtx(); /* 80CC7578 */ void setPtlModelMtx(); - /* 80CC7608 */ void createHeap(); + /* 80CC7608 */ int createHeap(); /* 80CC7970 */ void middleExe(); /* 80CC7A10 */ void orderEvtInit(); /* 80CC7AB8 */ void exeModeWait(); @@ -53,15 +73,45 @@ public: /* 80CC8DA0 */ void delEmtAll(); /* 80CC8DDC */ void setCannonRepair(); - static void* const s_demoTable[12]; - static u8 s_exeProc[48]; - static u8 s_demoExeProc_WarpEnd[48]; - static u8 s_demoExeProc_FireTks[72]; - static u8 s_demoExeProc_FireFirst[24]; - static u8 s_demoExeProc_FireSecond[96]; + int getSw1() { return fopAcM_GetParamBit(this, 0, 8); } + int getSw2() { return fopAcM_GetParamBit(this, 8, 8); } + + static const demoTable_s s_demoTable[]; + static void (daSCannon_c::*s_exeProc[])(); + static void (daSCannon_c::*s_demoExeProc_WarpEnd[][2])(); + static void (daSCannon_c::*s_demoExeProc_FireTks[][2])(); + static void (daSCannon_c::*s_demoExeProc_FireFirst[][2])(); + static void (daSCannon_c::*s_demoExeProc_FireSecond[][2])(); private: - /* 0x568 */ u8 field_0x568[0x638 - 0x568]; + /* 0x574 */ request_of_phase_process_class mZevPhase; + /* 0x57C */ request_of_phase_process_class mPtlPhase; + /* 0x584 */ mDoExt_bckAnm mBck; + /* 0x5A0 */ cBgS_PolyInfo mGroundPoly; + /* 0x5B0 */ Mtx mBgMtx; + /* 0x5E0 */ dBgW* mpBgW; + /* 0x5E4 */ J3DModel* mpModels[2]; + /* 0x5EC */ J3DModel* mpPtlModel; + /* 0x5F0 */ mDoExt_btkAnm* mpCrashBtk; + /* 0x5F4 */ mDoExt_btkAnm* mpPtlBtk; + /* 0x5F8 */ f32 mGroundY; + /* 0x5FC */ u32 mShadowKey; + /* 0x600 */ int mTimer; + /* 0x604 */ int mStaffId; + /* 0x608 */ int mDemoFinishTimer; + /* 0x60C */ int mLayerNo; + /* 0x610 */ s16 mEvtIdx; + /* 0x612 */ u16 mHeadJointNo; + /* 0x614 */ u16 mCrashJointNo; + /* 0x616 */ u8 mMode; + /* 0x617 */ u8 mIsRepaired; + /* 0x618 */ u8 mDemoType; + /* 0x619 */ u8 field_0x619; + /* 0x61A */ u8 mIsPortal; + /* 0x61B */ u8 mDrawShadow; + /* 0x61C */ JPABaseEmitter* mpEmtApp[3]; + /* 0x628 */ JPABaseEmitter* mpEmtSmk[3]; + /* 0x634 */ JPABaseEmitter* mpEmtLine; }; STATIC_ASSERT(sizeof(daSCannon_c) == 0x638); diff --git a/include/d/actor/d_a_obj_scannon_crs.h b/include/d/actor/d_a_obj_scannon_crs.h index 038d830e90..644dceb4ae 100644 --- a/include/d/actor/d_a_obj_scannon_crs.h +++ b/include/d/actor/d_a_obj_scannon_crs.h @@ -12,14 +12,23 @@ * @details * */ -class daSCannonCrs_c : public fopAc_ac_c { +class daSCannonCrs_c : public fopAc_ac_c, public request_of_phase_process_class { public: + enum daSCannonCrs_exeMode { + MODE_WAIT, + MODE_PRE_WAIT, + MODE_ORDER_EVT, + MODE_TALK_EVT, + MODE_WARP_EVT, + MODE_END, + }; + /* 80CC973C */ daSCannonCrs_c(); - /* 80CC983C */ ~daSCannonCrs_c(); - /* 80CC9910 */ void create(); - /* 80CC9B10 */ void Delete(); - /* 80CC9B80 */ void draw(); - /* 80CC9C64 */ void execute(); + /* 80CC983C */ virtual ~daSCannonCrs_c(); + /* 80CC9910 */ int create(); + /* 80CC9B10 */ int Delete(); + /* 80CC9B80 */ int draw(); + /* 80CC9C64 */ int execute(); /* 80CC9CA4 */ void middleExe(daMidna_c*); /* 80CC9D60 */ void exeModeWait(daMidna_c*); /* 80CC9F34 */ void exeModePreWait(daMidna_c*); @@ -30,15 +39,39 @@ public: /* 80CCA348 */ void demoExe(); /* 80CCA74C */ void init(); /* 80CCA848 */ void setModelMtx(); - /* 80CCA8CC */ void createHeap(); - /* 80CCAAC4 */ void chkInTalkRange(); + /* 80CCA8CC */ int createHeap(); + /* 80CCAAC4 */ bool chkInTalkRange(); /* 80CCAB24 */ void initEmtRt(u16, int, u16 const*, JPABaseEmitter**); /* 80CCAC48 */ void exeEmtRt(u16, int, JPABaseEmitter**); /* 80CCACD0 */ void callMidnaBeamEmt(); - static u8 s_exeProc[72]; + int getTalkRange() { return fopAcM_GetParamBit(this, 0, 8); } + int getWarpId() { return fopAcM_GetParamBit(this, 8, 8); } + u16 getMsgId() { return home.angle.x; } + + static void (daSCannonCrs_c::*s_exeProc[])(daMidna_c*); + private: - /* 0x568 */ u8 field_0x568[0x674 - 0x568]; + /* 0x574 */ cXyz mPortalWaitPos; + /* 0x580 */ dMsgFlow_c mMsgFlow; + /* 0x5CC */ mDoExt_bckAnm mBck; + /* 0x5E8 */ mDoExt_btkAnm mBtk; + /* 0x600 */ J3DModel* mpModel; + /* 0x604 */ dBgW* mpBgW; + /* 0x608 */ Mtx mBgMtx; + /* 0x638 */ f32 mTalkRangeSqDist; + /* 0x63C */ int mStaffId; + /* 0x640 */ int mWarpQuakeTimer; + /* 0x644 */ int mVoiceTimer; + /* 0x648 */ u16 mEffectJointNo; + /* 0x64A */ u16 mCenterJointNo; + /* 0x64C */ s16 mEvtIdx; + /* 0x64E */ u8 mMode; + /* 0x64F */ u8 field_0x64F[0x651 - 0x64F]; + /* 0x651 */ u8 field_0x651; + /* 0x652 */ u8 field_0x652; + /* 0x654 */ JPABaseEmitter* mpDisapEmt[4]; + /* 0x664 */ JPABaseEmitter* mpBeamEmt[4]; }; STATIC_ASSERT(sizeof(daSCannonCrs_c) == 0x674); diff --git a/include/d/actor/d_a_obj_scannon_ten.h b/include/d/actor/d_a_obj_scannon_ten.h index 2c1a26cf49..fbbceeb782 100644 --- a/include/d/actor/d_a_obj_scannon_ten.h +++ b/include/d/actor/d_a_obj_scannon_ten.h @@ -11,15 +11,22 @@ * @details * */ -class daObjSCannonTen_c : public fopAc_ac_c { +class daObjSCannonTen_c : public fopAc_ac_c, public request_of_phase_process_class { public: + enum daSCannonTen_exeMode { + MODE_WAIT, + MODE_ORDER_EVT, + MODE_ACTION_EVT, + MODE_END, + }; + /* 80CCB364 */ daObjSCannonTen_c(); - /* 80CCB43C */ ~daObjSCannonTen_c(); - /* 80CCB4EC */ void createHeap(); - /* 80CCB66C */ void create(); - /* 80CCB9E0 */ void Delete(); - /* 80CCBA58 */ void draw(); - /* 80CCBB6C */ void execute(); + /* 80CCB43C */ virtual ~daObjSCannonTen_c(); + /* 80CCB4EC */ int createHeap(); + /* 80CCB66C */ int create(); + /* 80CCB9E0 */ int Delete(); + /* 80CCBA58 */ int draw(); + /* 80CCBB6C */ int execute(); /* 80CCBB90 */ void middleExe(); /* 80CCBC08 */ void exeModeWait(); /* 80CCBCB0 */ void exeModeOrderEvt(); @@ -48,11 +55,25 @@ public: /* 80CCC8B8 */ void exeEmtLine(); /* 80CCC97C */ void delEmtAll(); - static u8 s_exeProc[48]; - static u8 s_demoExeProc[144]; + static void (daObjSCannonTen_c::*s_exeProc[])(); + static void (daObjSCannonTen_c::*s_demoExeProc[][2])(); private: - /* 0x568 */ u8 field_0x568[0x604 - 0x568]; + /* 0x574 */ J3DModel* mpModel; + /* 0x578 */ mDoExt_bckAnm mBck; + /* 0x594 */ dBgW* mpBgW; + /* 0x598 */ cBgS_PolyInfo mGroundPoly; + /* 0x5A8 */ Mtx mBgMtx; + /* 0x5D8 */ f32 mGroundY; + /* 0x5DC */ u32 mShadowKey; + /* 0x5E0 */ int mTimer; + /* 0x5E4 */ int mStaffId; + /* 0x5E8 */ u8 field_0x5E8[0x5EC - 0x5E8]; + /* 0x5EC */ s16 mEvtIdx; + /* 0x5EE */ u16 mHeadJointNo; + /* 0x5F0 */ u8 mMode; + /* 0x5F4 */ JPABaseEmitter* mpEmtSmk[3]; + /* 0x600 */ JPABaseEmitter* mpEmtLine; }; STATIC_ASSERT(sizeof(daObjSCannonTen_c) == 0x604); diff --git a/include/d/d_attention.h b/include/d/d_attention.h index 59ef174650..879f88aeba 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -4,7 +4,7 @@ #include "SSystem/SComponent/c_angle.h" #include "m_Do/m_Do_ext.h" #include "f_pc/f_pc_base.h" -#include "JSystem/JHostIO/JORReflexible.h" +#include "m_Do/m_Do_hostIO.h" class fopAc_ac_c; @@ -46,7 +46,7 @@ private: class dAttParam_c : public JORReflexible { public: #ifdef DEBUG - /* 0x04 */ u8 unk_0x4; + /* 0x04 */ s8 mHIOChildNo; #endif /* 0x00 */ u16 mFlags; @@ -67,8 +67,8 @@ public: /* 0x38 */ f32 field_0x38; /* 0x3C */ f32 field_0x3c; #ifdef DEBUG - /* 0x44 */ int unk_0x44; - /* 0x48 */ int unk_0x48; + /* 0x44 */ s32 mDebugDispPosX; + /* 0x48 */ s32 mDebugDispPosY; #endif public: @@ -76,6 +76,14 @@ public: /* 80070038 */ dAttParam_c(s32); #ifdef DEBUG + void connectHIO(char* i_name) { + mHIOChildNo = mDoHIO_CREATE_CHILD(i_name, this); + } + + void releaseHIO() { + mDoHIO_DELETE_CHILD(mHIOChildNo); + } + virtual void genMessage(JORMContext*); #endif /* 80070110 */ virtual ~dAttParam_c(); @@ -90,7 +98,15 @@ public: EFlag_MARGIN_DEBUG = (1 << 15), }; - bool CheckFlag(u16 flag) { return mFlags & flag; } + bool CheckFlag(u16 flag) { return flag & mFlags ? true : false; } + + f32 FreeStick() { +#if DEBUG + return mSWModeDisable; +#else + return -0.9f; +#endif + } /* 0x40 vtable */ }; // Size: 0x44 @@ -229,6 +245,10 @@ public: /* 80182AD0 */ void keepLock(int timer) { mAttnBlockTimer = timer; } /* 8014B010 */ static dist_entry& getDistTable(int i_no) { return dist_table[i_no]; } +#if DEBUG + void runDebugDisp0(); +#endif + fopAc_ac_c* getCatghTarget() { return mCatghTarget.getCatghTarget(); } fopAc_ac_c* getZHintTarget() { return mZHintTarget.getZHintTarget(); } u8 getCatchChgItem() { return mCatghTarget.getChangeItem(); } diff --git a/include/d/d_save.h b/include/d/d_save.h index fabb4f9e63..733ee3fcef 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -879,9 +879,13 @@ public: dSv_player_c& getPlayer() { return mPlayer; } dSv_event_c& getEvent() { return mEvent; } - dSv_memory_c& getSave(int i_stageNo) { return mSave[i_stageNo]; } dSv_MiniGame_c& getMiniGame() { return mMiniGame; } + dSv_memory_c& getSave(int i_stageNo) { + JUT_ASSERT(1412, 0 <= i_stageNo && i_stageNo < STAGE_MAX); + return mSave[i_stageNo]; + } + void putSave(int i_stageNo, dSv_memory_c mem) { JUT_ASSERT(1417, 0 <= i_stageNo && i_stageNo < dSv_save_c::STAGE_MAX); mSave[i_stageNo] = mem; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index b403879d67..c6e22f09c9 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1273,6 +1273,7 @@ void dStage_dt_c_roomLoader(void* i_data, dStage_dt_c* stageDt, int param_2); dStage_KeepDoorInfo* dStage_GetKeepDoorInfo(); dStage_KeepDoorInfo* dStage_GetRoomKeepDoorInfo(); void dStage_dt_c_fieldMapLoader(void* i_data, dStage_dt_c* i_stage); +const char* dStage_getName(s16 procName, s8 subtype); #if VERSION == VERSION_WII_USA_R0 void dStage_escapeRestart(); diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index c31a1e28e7..7d223d5b97 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -92,14 +92,54 @@ enum fopAc_attention_type { fopAc_attn_LOCK_e, fopAc_attn_TALK_e, fopAc_attn_BATTLE_e, + +#if !PLATFORM_GCN + fopAc_attn_UNK_3, + fopAc_attn_UNK_4, + fopAc_attn_UNK_5, +#endif + fopAc_attn_SPEAK_e, fopAc_attn_CARRY_e, fopAc_attn_DOOR_e, fopAc_attn_JUEL_e, + +#if !PLATFORM_GCN + fopAc_attn_UNK_10, +#endif + fopAc_attn_ETC_e, fopAc_attn_CHECK_e, + + fopAc_attn_MAX_e, }; +enum fopAc_AttentionFlag_e { + fopAc_AttnFlag_LOCK_e = (1 << fopAc_attn_LOCK_e), + fopAc_AttnFlag_TALK_e = (1 << fopAc_attn_TALK_e), + fopAc_AttnFlag_BATTLE_e = (1 << fopAc_attn_BATTLE_e), + + fopAc_AttnFlag_SPEAK_e = (1 << fopAc_attn_SPEAK_e), + fopAc_AttnFlag_CARRY_e = (1 << fopAc_attn_CARRY_e), + fopAc_AttnFlag_DOOR_e = (1 << fopAc_attn_DOOR_e), + fopAc_AttnFlag_JUEL_e = (1 << fopAc_attn_JUEL_e), + fopAc_AttnFlag_ETC_e = (1 << fopAc_attn_ETC_e), + + fopAc_AttnFlag_CHECK_e = (1 << fopAc_attn_CHECK_e), + + fopAc_AttnFlag_UNK_0x200000 = 0x200000, + fopAc_AttnFlag_UNK_0x400000 = 0x400000, + fopAc_AttnFlag_UNK_0x800000 = 0x800000, + fopAc_AttnFlag_NOTALK_e = 0x2000000, + fopAc_AttnFlag_ENEMY_NOLOCK_e = 0x4000000, + fopAc_AttnFlag_UNK_0x8000000 = 0x8000000, + fopAc_AttnFlag_TALKCHECK_e = 0x20000000, + fopAc_AttnFlag_TALKREAD_e = 0x40000000, +}; + +#define fopAc_AttnFlags_LOCK (fopAc_AttnFlag_LOCK_e | fopAc_AttnFlag_TALK_e | fopAc_AttnFlag_BATTLE_e) +#define fopAc_AttnFlags_ACTION (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_CARRY_e | fopAc_AttnFlag_DOOR_e | fopAc_AttnFlag_JUEL_e | fopAc_AttnFlag_ETC_e) + class JKRSolidHeap; enum dEvt_Command_e { @@ -175,12 +215,7 @@ struct actor_place { }; struct actor_attention_types { - /* 0x00 */ u8 distances[9]; - -#if VERSION > VERSION_GCN_JPN - u8 unk_0x9[4]; -#endif - + /* 0x00 */ u8 distances[fopAc_attn_MAX_e]; /* 0x0A */ s16 field_0xa; /* 0x0C */ cXyz position; /* 0x18 */ u32 flags; diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 466b8ba326..ae501319ff 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -161,7 +161,7 @@ inline MtxP fopAcM_GetMtx(const fopAc_ac_c* i_actor) { return i_actor->cullMtx; } -inline u32 fopAcM_checkStatus(fopAc_ac_c* i_actor, u32 actor_status) { +inline u32 fopAcM_CheckStatus(fopAc_ac_c* i_actor, u32 actor_status) { return i_actor->actor_status & actor_status; } @@ -186,7 +186,7 @@ inline u32 fopAcM_CheckCarryType(const fopAc_ac_c* actor, fopAcM_CARRY type) { } inline u32 fopAcM_checkHookCarryNow(fopAc_ac_c* i_actor) { - return fopAcM_checkStatus(i_actor, fopAcM_STATUS_HOOK_CARRY_NOW); + return fopAcM_CheckStatus(i_actor, fopAcM_STATUS_HOOK_CARRY_NOW); } inline u32 fopAcM_GetParam(const void* i_actor) { @@ -818,7 +818,7 @@ inline void fopAcM_setWarningMessage_f(const fopAc_ac_c* i_actor, const char* i_ #define fopAcM_setWarningMessage(...) #endif -void fopAcM_getNameString(fopAc_ac_c*, char*); +void fopAcM_getNameString(const fopAc_ac_c*, char*); class fopAcM_lc_c { public: diff --git a/src/d/actor/d_a_L7op_demo_dr.cpp b/src/d/actor/d_a_L7op_demo_dr.cpp index 07d72662c3..f203d7acec 100644 --- a/src/d/actor/d_a_L7op_demo_dr.cpp +++ b/src/d/actor/d_a_L7op_demo_dr.cpp @@ -833,7 +833,7 @@ int daL7ODR_c::create() { scale.setall(1.0f); attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index ad4a66f55a..92eb37b88c 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -10040,21 +10040,21 @@ BOOL daAlink_c::setTalkStatus() { if (notTalk()) { setDoStatus(0x90); } else { - if (field_0x27f4->attention_info.flags & 0x2000000) { + if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_NOTALK_e) { return 0; } - if (field_0x27f4->attention_info.flags & 0x800000) { + if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_UNK_0x800000) { setDoStatus(0x3B); - } else if (field_0x27f4->attention_info.flags & 0x20000000) { + } else if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_TALKCHECK_e) { if (fopAcM_GetName(field_0x27f4) == PROC_OBJ_SSDRINK) { setDoStatus(0x3C); } else { setDoStatus(8); } - } else if (field_0x27f4->attention_info.flags & 0x40000000) { + } else if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_TALKREAD_e) { setDoStatus(0x80); - } else if (field_0x27f4->attention_info.flags & 0x8000000) { + } else if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_UNK_0x8000000) { setDoStatus(0x1B); } else { setDoStatus(0x1C); @@ -17849,7 +17849,7 @@ int daAlink_c::execute() { mProcID == PROC_WOLF_GET_SMELL || mProcID == PROC_WOLF_DIG || mProcID == PROC_WOLF_DIG_THROUGH || checkNoResetFlg0(FLG0_UNK_4000) || dComIfGp_checkPlayerStatus1(0, 0x1000000) || - (checkEventRun() && partner != NULL && (partner->attention_info.flags & 0x400000)) || + (checkEventRun() && partner != NULL && (partner->attention_info.flags & fopAc_AttnFlag_UNK_0x400000)) || !strcmp(dComIfGp_getEventManager().getRunEventName(), l_defaultGetEventName)) { mWolfEyeUp = daAlinkHIO_wolf_c0::m.mSensesLingerTime; diff --git a/src/d/actor/d_a_alink_grab.inc b/src/d/actor/d_a_alink_grab.inc index 0bdfcbbe75..853aa79762 100644 --- a/src/d/actor/d_a_alink_grab.inc +++ b/src/d/actor/d_a_alink_grab.inc @@ -531,7 +531,7 @@ BOOL daAlink_c::checkNextActionGrab() { setCarryArmAngle(0.0f, 1.0f); - if (mTargetedActor == NULL && mAttList != NULL && mAttList->mType == 5 && fopAcM_checkStatus(temp_r3, 0x2000000)) { + if (mTargetedActor == NULL && mAttList != NULL && mAttList->mType == 5 && fopAcM_CheckStatus(temp_r3, 0x2000000)) { setDoStatus(6); } else if ((field_0x27f4 == NULL) || !checkGrabTalkActor(field_0x27f4) || !setTalkStatus()) { if (checkModeFlg(0x400)) { diff --git a/src/d/actor/d_a_alink_guard.inc b/src/d/actor/d_a_alink_guard.inc index b9d503c059..e0f805609b 100644 --- a/src/d/actor/d_a_alink_guard.inc +++ b/src/d/actor/d_a_alink_guard.inc @@ -31,7 +31,7 @@ BOOL daAlink_c::checkSpecialNpc(fopAc_ac_c* i_actor) { /* 800DC5DC-800DC678 0D6F1C 009C+00 1/1 0/0 0/0 .text checkShieldAttackEmphasys__9daAlink_cFv */ BOOL daAlink_c::checkShieldAttackEmphasys() { - return mTargetedActor != NULL && (mTargetedActor->attention_info.flags & 0x200000) && + return mTargetedActor != NULL && (mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x200000) && !checkCutHeadState() && (fopAcM_GetGroup(mTargetedActor) != fopAc_ENEMY_e || !static_cast(mTargetedActor)->checkDownFlg()); diff --git a/src/d/actor/d_a_alink_hook.inc b/src/d/actor/d_a_alink_hook.inc index eb1b0a704c..c26da74f7c 100644 --- a/src/d/actor/d_a_alink_hook.inc +++ b/src/d/actor/d_a_alink_hook.inc @@ -221,7 +221,7 @@ void daAlink_c::hookshotAtHitCallBack(dCcD_GObjInf* i_atObjInf, fopAc_ac_c* i_tg mSearchBallScale = dist_to_hitpos; if (checkHookshotWait()) { - if (fopAcM_checkStatus(i_tgActor, 0x280000)) { + if (fopAcM_CheckStatus(i_tgActor, 0x280000)) { mHookTargetAcKeep.setData(i_tgActor); } else { field_0x3494 = 1.0f; diff --git a/src/d/actor/d_a_alink_wolf.inc b/src/d/actor/d_a_alink_wolf.inc index 4c52d7f62a..6e85b6fdec 100644 --- a/src/d/actor/d_a_alink_wolf.inc +++ b/src/d/actor/d_a_alink_wolf.inc @@ -6184,7 +6184,7 @@ BOOL daAlink_c::checkMidnaDisappearMode() const { return mProcID == PROC_WOLF_DIG_THROUGH || (checkWolf() && dComIfGp_checkPlayerStatus0(0, 0x8000000) && !dComIfGp_checkPlayerStatus0(0, 0x10) && - (mTargetedActor == NULL || !(mTargetedActor->attention_info.flags & 0x800000))); + (mTargetedActor == NULL || !(mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000))); } /* 801371FC-801372B4 131B3C 00B8+00 3/3 0/0 0/0 .text checkWolfLieContinue__9daAlink_cFi @@ -6193,7 +6193,7 @@ BOOL daAlink_c::checkWolfLieContinue(int param_0) { cM3dGPla slide_poly; if ((param_0 || - ((mTargetedActor != NULL && (mTargetedActor->attention_info.flags & 0x800000)) && + ((mTargetedActor != NULL && (mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000)) && (fopAcM_GetName(mTargetedActor) == PROC_NPC_JAGAR || fopAcM_GetName(mTargetedActor) == PROC_NPC_BOU))) && !getSlidePolygon(&slide_poly) && !checkWolfLieWaterIn()) @@ -7087,7 +7087,7 @@ void daAlink_c::searchWolfLockEnemy(fopAc_ac_c* i_actor, void* i_data) { } fopEn_enemy_c* enemy_p = static_cast(i_actor); - if (fopAcM_GetGroup(enemy_p) == 2 && enemy_p->attention_info.flags & 5 && + if (fopAcM_GetGroup(enemy_p) == 2 && enemy_p->attention_info.flags & (fopAc_AttnFlag_BATTLE_e | fopAc_AttnFlag_LOCK_e) && !enemy_p->checkWolfNoLock()) { f32 dist_to_enemy = current.pos.abs2(enemy_p->eyePos); diff --git a/src/d/actor/d_a_arrow.cpp b/src/d/actor/d_a_arrow.cpp index 56146691f2..5aa361d3f8 100644 --- a/src/d/actor/d_a_arrow.cpp +++ b/src/d/actor/d_a_arrow.cpp @@ -1010,7 +1010,7 @@ int daArrow_c::procSlingHitInit(cXyz* param_0, dCcD_GObjInf* param_1) { if (!daAlink_c::notSwordHitVibActor(hit_ac)) { u16 hitmark; - if (hit_ac != NULL && fopAcM_checkStatus(hit_ac, 0x10000) != 0) { + if (hit_ac != NULL && fopAcM_CheckStatus(hit_ac, 0x10000) != 0) { hitmark = 1; } else { hitmark = 9; diff --git a/src/d/actor/d_a_b_bh.cpp b/src/d/actor/d_a_b_bh.cpp index acaee78047..0544e839ea 100644 --- a/src/d/actor/d_a_b_bh.cpp +++ b/src/d/actor/d_a_b_bh.cpp @@ -1157,7 +1157,7 @@ static void action(b_bh_class* i_this) { if (spC != 0) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -1524,7 +1524,7 @@ static int daB_BH_Create(fopAc_ac_c* i_this) { l_HIO.no = mDoHIO_CREATE_CHILD("ボスババ触手", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; i_this->health = 1; i_this->field_0x560 = 1; diff --git a/src/d/actor/d_a_b_bq.cpp b/src/d/actor/d_a_b_bq.cpp index 8e5b9aaebb..ca961b0999 100644 --- a/src/d/actor/d_a_b_bq.cpp +++ b/src/d/actor/d_a_b_bq.cpp @@ -2523,7 +2523,7 @@ static int daB_BQ_Create(fopAc_ac_c* i_this) { l_HIO.field_0x4 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 0x16; static dCcD_SrcSph cc_sph_src = { diff --git a/src/d/actor/d_a_b_dr.cpp b/src/d/actor/d_a_b_dr.cpp index 024c91e8b4..5b418f1056 100644 --- a/src/d/actor/d_a_b_dr.cpp +++ b/src/d/actor/d_a_b_dr.cpp @@ -542,13 +542,13 @@ void daB_DR_c::mStatusONOFF(int i_status) { switch (i_status) { case 0: attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; fopAcM_OffStatus(this, 0); fopAcM_OffStatus(this, 0x200000); return; case 1: attention_info.distances[fopAc_attn_BATTLE_e] = 85; - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; fopAcM_OnStatus(this, 0); fopAcM_OnStatus(this, 0x200000); return; @@ -556,7 +556,7 @@ void daB_DR_c::mStatusONOFF(int i_status) { attention_info.distances[fopAc_attn_BATTLE_e] = 60; fopAcM_OnStatus(this, 0); fopAcM_OffStatus(this, 0x200000); - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; return; } } @@ -1012,7 +1012,7 @@ void daB_DR_c::tail_hit_check() { if (health > 0) { daPy_getPlayerActorClass()->onBossRoomWait(); - if (fopAcM_checkStatus(this, 0x200000) && cLib_calcTimer(&field_0x7d0) == 0 && mActionMode != ACTION_TAIL_HIT && field_0x7d1 != 2) { + if (fopAcM_CheckStatus(this, 0x200000) && cLib_calcTimer(&field_0x7d0) == 0 && mActionMode != ACTION_TAIL_HIT && field_0x7d1 != 2) { if (mTailCc.ChkTgHit()) { speedF = 0.0f; dComIfGs_onZoneSwitch(21, fopAcM_GetRoomNo(this)); @@ -1029,7 +1029,7 @@ void daB_DR_c::week_hit_check() { if (mWeekCc.ChkTgSet()) { daPy_getPlayerActorClass()->onBossRoomWait(); - if (health > 0 && fopAcM_checkStatus(this, 0x200000) && cLib_calcTimer(&field_0x7d0) == 0 && mActionMode != ACTION_WEEK_HIT && field_0x7d1 == 2) { + if (health > 0 && fopAcM_CheckStatus(this, 0x200000) && cLib_calcTimer(&field_0x7d0) == 0 && mActionMode != ACTION_WEEK_HIT && field_0x7d1 == 2) { if (mWeekCc.ChkTgHit() && mWeekCc.GetTgHitObj()->ChkAtType(AT_TYPE_HOOKSHOT)) { speedF = 0.0f; Z2GetAudioMgr()->changeBgmStatus(2); @@ -2370,18 +2370,18 @@ void daB_DR_c::executeBreathAttack() { mTimer[3] = 1000; } - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; if (cLib_calcTimer(&mTimer[3]) != 0 && mTargetHeight - 300.0f < player->current.pos.y) { if (abs((s16)(fopAcM_searchPlayerAngleY(this) - shape_angle.y)) < ZREG_S(0) + 0x5000) { mWeekCc.OffTgSetBit(); - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } else { mWeekCc.OnTgSetBit(); if (mTarget != 0 || (dComIfGp_getAttention()->GetLockonList(0) != NULL && dComIfGp_getAttention()->LockonTruth() && dComIfGp_getAttention()->GetLockonList(0)->getActor() == this)) { mTarget = 0; } else { - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; mTarget = 0; } } @@ -2798,7 +2798,7 @@ void daB_DR_c::executeGliderAttack() { if (mGliderMoveSub(field_0x748) != 0) { mStatusONOFF(0); attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; fopAcM_OffStatus(this, 0); mCount[2] = 0; @@ -4128,7 +4128,7 @@ int daB_DR_c::create() { OS_REPORT("パーツ %d\n", mPartNo); case 10: attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); @@ -4224,7 +4224,7 @@ int daB_DR_c::create() { shape_angle.y = current.angle.y; attention_info.distances[fopAc_attn_BATTLE_e] = 85; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -20000.0f, -20000.0f, -20000.0f); diff --git a/src/d/actor/d_a_b_ds.cpp b/src/d/actor/d_a_b_ds.cpp index 200efb4254..d02aa5861e 100644 --- a/src/d/actor/d_a_b_ds.cpp +++ b/src/d/actor/d_a_b_ds.cpp @@ -1707,7 +1707,7 @@ void daB_DS_c::executeOpeningDemo() { dComIfGp_event_reset(); attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 2); fopAcM_OnStatus(this, 0); @@ -2863,7 +2863,7 @@ void daB_DS_c::executeBattle2OpeningDemo() { dComIfGs_setRestartRoom(vec, -0x664A, 50); attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 2); Z2GetAudioMgr()->bgmStart(Z2BGM_HARAGIGANT_BTL02, 0, 0); @@ -5376,7 +5376,7 @@ int daB_DS_c::CreateHeap() { current.pos.set(0.0f, 1900.0f, 0.0f); attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 2); fopAcM_OnStatus(this, 0); @@ -5562,7 +5562,7 @@ cPhs__Step daB_DS_c::create() { if (arg0 == TYPE_BULLET_A || arg0 == TYPE_BULLET_B || arg0 == TYPE_BULLET_C) { attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); @@ -5573,7 +5573,7 @@ cPhs__Step daB_DS_c::create() { mBreathAtSph.SetStts(&mCcStts); fopAcM_OffStatus(this, 0); - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (arg0 == TYPE_BULLET_B || arg0 == TYPE_BULLET_C) { mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, @@ -5605,7 +5605,7 @@ cPhs__Step daB_DS_c::create() { shape_angle.y = current.angle.y; attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorf->mpModel->getBaseTRMtx()); fopAcM_SetMin(this, -40000.0f, -40000.0f, -40000.0f); @@ -5707,7 +5707,7 @@ cPhs__Step daB_DS_c::create() { } attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); @@ -5740,7 +5740,7 @@ cPhs__Step daB_DS_c::create() { gravity = -1.0f; attention_info.distances[fopAc_attn_BATTLE_e] = 0; - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); diff --git a/src/d/actor/d_a_b_gg.cpp b/src/d/actor/d_a_b_gg.cpp index 7395ecf084..8f59ac0006 100644 --- a/src/d/actor/d_a_b_gg.cpp +++ b/src/d/actor/d_a_b_gg.cpp @@ -2177,11 +2177,11 @@ void daB_GG_c::AttentionChk() { daPy_getPlayerActorClass(); if (s_dis < 3000.0f) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (field_0x5b0 != 0 && mSubAction == SUBACT_ATTACK) { s16 temp_r0 = fopAcM_toPlayerShapeAngleY(this) + 0x8000; if (temp_r0 < 0x3000 && temp_r0 > -0x3000) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { attention_info.flags = 0; } @@ -3421,7 +3421,7 @@ void daB_GG_c::GroundAction() { /* 805E8EE8-805E92A0 00ABC8 03B8+00 1/1 0/0 0/0 .text StopAction__8daB_GG_cFv */ void daB_GG_c::StopAction() { if (!other_bg_check(this, daPy_getPlayerActorClass())) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { attention_info.flags = 0; } @@ -4384,7 +4384,7 @@ int daB_GG_c::Create() { gravity = 0.0f; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[fopAc_attn_BATTLE_e] = 82; fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); diff --git a/src/d/actor/d_a_b_gnd.cpp b/src/d/actor/d_a_b_gnd.cpp index 179a1285ab..96e22320ed 100644 --- a/src/d/actor/d_a_b_gnd.cpp +++ b/src/d/actor/d_a_b_gnd.cpp @@ -2595,7 +2595,7 @@ static void action(b_gnd_class* i_this) { if (attn_on) { fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(i_this, 0); i_this->attention_info.flags = 0; diff --git a/src/d/actor/d_a_b_go.cpp b/src/d/actor/d_a_b_go.cpp index 528a3e7e84..17ef5a3bd7 100644 --- a/src/d/actor/d_a_b_go.cpp +++ b/src/d/actor/d_a_b_go.cpp @@ -261,7 +261,7 @@ static int daB_GO_Create(fopAc_ac_c* i_this) { l_HIO.field_0x4 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, a_this->mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -500.0f, -2000.0f, -500.0f); fopAcM_SetMax(a_this, 500.0f, 2000.0f, 500.0f); diff --git a/src/d/actor/d_a_b_gos.cpp b/src/d/actor/d_a_b_gos.cpp index c52850651e..107e543713 100644 --- a/src/d/actor/d_a_b_gos.cpp +++ b/src/d/actor/d_a_b_gos.cpp @@ -385,7 +385,7 @@ static int daB_GOS_Create(fopAc_ac_c* i_this) { l_HIO.field_0x4 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, a_this->mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(a_this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_b_mgn.cpp b/src/d/actor/d_a_b_mgn.cpp index bc2eeb8abc..8eb57cf7e7 100644 --- a/src/d/actor/d_a_b_mgn.cpp +++ b/src/d/actor/d_a_b_mgn.cpp @@ -1450,7 +1450,7 @@ void daB_MGN_c::executeDash() { case 1: attention_info.flags = 0; if (player->checkNowWolf()) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } if (mpMgnModelMorf->isStop()) { @@ -1500,7 +1500,7 @@ void daB_MGN_c::executeDash() { attention_info.flags = 0; if (player->checkNowWolf()) { - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; cXyz sp48; mDoMtx_stack_c::YrotS(-shape_angle.y); @@ -1508,7 +1508,7 @@ void daB_MGN_c::executeDash() { mDoMtx_stack_c::multVec(&daPy_getPlayerActorClass()->current.pos, &sp48); if (fabsf(sp48.x) < 200.0f && sp48.z > 100.0f && sp48.z < 1500.0f) { - attention_info.flags |= 0x10; + attention_info.flags |= fopAc_AttnFlag_CARRY_e; } } @@ -1832,7 +1832,7 @@ void daB_MGN_c::executeThrown() { field_0xaa0 = 150; field_0xb08 = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } break; case 10: @@ -1849,7 +1849,7 @@ void daB_MGN_c::executeThrown() { mMoveMode = 11; dCam_getBody()->ForceLockOn(this); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; case 11: if (mpMgnModelMorf->isStop()) { attention_info.flags = 0; @@ -1887,7 +1887,7 @@ void daB_MGN_c::executeDown() { switch (mMoveMode) { case 0: case 1: - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; field_0x20f4[0].OffTgSetBit(); mAtSph.OffAtSetBit(); field_0xafd = 1; @@ -1958,7 +1958,7 @@ void daB_MGN_c::executeDown() { } field_0xb08 = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; field_0x20f4[0].OnTgSetBit(); field_0x20f4[1].OnTgSetBit(); @@ -2453,7 +2453,7 @@ void daB_MGN_c::executeFall() { attention_info.flags = 0; if (daPy_py_c::checkNowWolf()) { - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } cLib_addCalcAngleS(&shape_angle.y, fopAcM_searchPlayerAngleY(this), 0x10, 0x400, 0x80); diff --git a/src/d/actor/d_a_b_ob.cpp b/src/d/actor/d_a_b_ob.cpp index 626d58aaa4..4994ce404a 100644 --- a/src/d/actor/d_a_b_ob.cpp +++ b/src/d/actor/d_a_b_ob.cpp @@ -886,7 +886,7 @@ static void core_action(b_ob_class* i_this) { if (attn_ON && i_this->field_0x479c > -1.0f && a_this->eyePos.y >= a_this->home.pos.y) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -939,7 +939,7 @@ static void core_action(b_ob_class* i_this) { static void core_damage_check(b_ob_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - if (fopAcM_checkStatus(a_this, 0x100000)) { + if (fopAcM_CheckStatus(a_this, 0x100000)) { i_this->field_0x5d38 = dComIfGp_particle_set(i_this->field_0x5d38, 0x8802, &a_this->current.pos, NULL, NULL); } @@ -1655,7 +1655,7 @@ static void fish_move(b_ob_class* i_this) { if (attn_ON && i_this->mAttnOffTimer == 0) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; diff --git a/src/d/actor/d_a_b_tn.cpp b/src/d/actor/d_a_b_tn.cpp index 9911933d42..3d3fcedc85 100644 --- a/src/d/actor/d_a_b_tn.cpp +++ b/src/d/actor/d_a_b_tn.cpp @@ -2652,7 +2652,7 @@ void daB_TN_c::executeGuardH() { } else { // Obtained 4 secret techinques if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[341])) { - attention_info.flags |= 0x200000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x200000; } } @@ -4530,7 +4530,7 @@ void daB_TN_c::action() { mUpdateWaistAngle = false; mChkCoHitOK = false; mSphCSmallFlag = false; - attention_info.flags &= 0xffdfffff; + attention_info.flags &= ~fopAc_AttnFlag_UNK_0x200000; int iVar1 = 1; switch (mActionMode1) { @@ -5169,7 +5169,7 @@ int daB_TN_c::create() { l_HIO.mUnk1 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpModelMorf2->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_b_yo.cpp b/src/d/actor/d_a_b_yo.cpp index fc4eb109fe..ad75d97acb 100644 --- a/src/d/actor/d_a_b_yo.cpp +++ b/src/d/actor/d_a_b_yo.cpp @@ -2803,7 +2803,7 @@ void daB_YO_c::action() { attention_info.flags = 0; if (mAttentionTimer != 0) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } BOOL bVar1 = TRUE; diff --git a/src/d/actor/d_a_b_zant.cpp b/src/d/actor/d_a_b_zant.cpp index 7ce4b8671f..8f69e5e35f 100644 --- a/src/d/actor/d_a_b_zant.cpp +++ b/src/d/actor/d_a_b_zant.cpp @@ -396,7 +396,7 @@ void daB_ZANT_c::setDamageSe(dCcD_Sph* i_hitSph, int i_dmgAmount) { BOOL var_r29; u8 at_se = ((dCcD_GObjInf*)mAtInfo.mpCollider)->GetAtSe(); - if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) && !fopAcM_checkStatus(this, 0x280000)) { + if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) && !fopAcM_CheckStatus(this, 0x280000)) { var_r29 = 1; } else { var_r29 = 0; @@ -1035,7 +1035,7 @@ void daB_ZANT_c::executeSmallAttack() { switch (mMode) { case 0: setTgHitBit(TRUE); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mMode = 2; field_0x6fd = 0; @@ -1115,7 +1115,7 @@ void daB_ZANT_c::executeSmallAttack() { break; case 4: if (mpModelMorf->isStop()) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (mFightPhase == PHASE_BB) { field_0x711 = 1; @@ -1274,7 +1274,7 @@ void daB_ZANT_c::executeWarp() { break; case 6: if (calcScale(1)) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; setCoHitBit(TRUE); setBaseActionMode(0); } @@ -1288,7 +1288,7 @@ void daB_ZANT_c::executeDamage() { case 0: case 1: case 2: - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (setNextDamageMode(FALSE)) { setTgHitBit(FALSE); @@ -1344,7 +1344,7 @@ void daB_ZANT_c::executeDamage() { void daB_ZANT_c::executeConfuse() { switch (mMode) { case 0: - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; speedF = 0.0f; speed.y = 0.0f; mMode = 1; @@ -1942,7 +1942,7 @@ void daB_ZANT_c::executeHook() { setBck(BCK_ZAN_HOOK_WAIT, J3DFrameCtrl::EMode_LOOP, 3.0f, 1.0f); } case 3: - if (!fopAcM_checkStatus(this, 0x100000)) { + if (!fopAcM_CheckStatus(this, 0x100000)) { setTgHitBit(TRUE); setCoHitBit(TRUE); setActionMode(ACT_SWIM, 10); @@ -1966,7 +1966,7 @@ void daB_ZANT_c::executeWater() { mMode = 0x19; field_0x6f0 = 0x78; field_0x705 = 1; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; setBck(BCK_ZAN_FLOAT_WAIT, J3DFrameCtrl::EMode_LOOP, 3.0f, 1.0f); } else if (field_0x705 != 0) { if (((daB_ZANTZ_c*)pmobile)->getAppearMode() == 3) { @@ -2123,7 +2123,7 @@ void daB_ZANT_c::executeWater() { case 24: cLib_addCalcAngleS(&shape_angle.y, fopAcM_searchPlayerAngleY(this), 8, 0x400, 0x80); if (((daB_ZANTZ_c*)pmobile)->getMouthMode() == 1) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; field_0x703 = 8; field_0x6ff = 0; field_0x711 = 1; @@ -2223,7 +2223,7 @@ void daB_ZANT_c::executeSwim() { setBck(BCK_ZAN_SWIM, J3DFrameCtrl::EMode_LOOP, 5.0f, 1.0f); mpModelMorf->setFrame(10.0f); field_0x6cc = 0.0f; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mMode = 1; field_0x702 = 0; case 1: @@ -2397,7 +2397,7 @@ void daB_ZANT_c::executeSimaJump() { field_0x6f0 = 105; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; setBck(BCK_ZAN_LV1_FATIGUE, J3DFrameCtrl::EMode_LOOP, 10.0f, 1.0f); mSound.startCreatureVoice(Z2SE_EN_ZAN_MG_V_ZEIZEI, -1); return; @@ -2408,7 +2408,7 @@ void daB_ZANT_c::executeSimaJump() { return; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; field_0x6ec = 0; mMode = 1; gravity = -5.0f; @@ -2695,7 +2695,7 @@ void daB_ZANT_c::executeIceJump() { mpModelMorf->setPlaySpeed(1.0f); mMode = 7; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } } break; @@ -3822,7 +3822,7 @@ void daB_ZANT_c::executeLastStartDemo() { field_0x713 = 0; setActionMode(ACT_LAST_ATTACK, 0); field_0x70b = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mDemoCamEye.set(0.0f, 300.0f, 200.0f); camera->Reset(mDemoCamCenter, mDemoCamEye); @@ -4287,7 +4287,7 @@ void daB_ZANT_c::executeLastDamage() { mSwordCc[1].OffAtSetBit(); speedF = 0.0f; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (mTakenBigDmg) { if (mFightCycle == 0) { @@ -4386,7 +4386,7 @@ void daB_ZANT_c::executeLastDamage() { break; } case 10: - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; setBck(BCK_ZAN_GROUND_REACTION, J3DFrameCtrl::EMode_NONE, 3.0f, 1.0f); mSound.startCreatureVoice(Z2SE_EN_ZAN_V_NO_DMG, -1); mMode = 11; @@ -5598,7 +5598,7 @@ int daB_ZANT_c::create() { l_HIO.field_0x4 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[fopAc_attn_BATTLE_e] = 24; fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); diff --git a/src/d/actor/d_a_canoe.cpp b/src/d/actor/d_a_canoe.cpp index ad9690b529..bc58cc2a9a 100644 --- a/src/d/actor/d_a_canoe.cpp +++ b/src/d/actor/d_a_canoe.cpp @@ -873,9 +873,9 @@ int daCanoe_c::execute() { setCanoeSliderEffect(); if (!player->checkCanoeRideOwn(this) && speedF < 0.1f && mWaterSpeed.abs2XZ() < 0.1f && !player->checkFishingRodEquip()) { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; } else { - attention_info.flags &= ~0x80; + attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } u32 sp1C = 127.0f * (fabsf(speedF) / player->getCanoeMaxSpeed()); diff --git a/src/d/actor/d_a_coach_fire.cpp b/src/d/actor/d_a_coach_fire.cpp index 57f22c709b..fbe1e0a61b 100644 --- a/src/d/actor/d_a_coach_fire.cpp +++ b/src/d/actor/d_a_coach_fire.cpp @@ -22,7 +22,7 @@ CoachFireAttr const daCoachFire_c::M_attr = { void daCoachFire_c::create_init() { fopAcM_setStageLayer(this); fopAcM_setCullSizeBox(this, -100.0, -10.0, -100.0, 100.0, 200.0, 100.0); - attention_info.flags = 0x101; + attention_info.flags = fopAc_AttnFlag_CHECK_e | fopAc_AttnFlag_LOCK_e; attention_info.distances[fopAc_attn_LOCK_e] = 0x24; attention_info.distances[fopAc_attn_CHECK_e] = 0x22; mLightInfluence.mPosition = current.pos; diff --git a/src/d/actor/d_a_cow.cpp b/src/d/actor/d_a_cow.cpp index 9ee870b284..2c5fe45003 100644 --- a/src/d/actor/d_a_cow.cpp +++ b/src/d/actor/d_a_cow.cpp @@ -199,7 +199,7 @@ void daCow_c::setCarryStatus() { mDoMtx_stack_c::multVec(&daPy_getPlayerActorClass()->current.pos, &carryPosition); if (fabsf(carryPosition.x) < xMax && carryPosition.z > 0.0f && carryPosition.z < zMax) { // todo: what does this mean - attention_info.flags |= 0x10; // in debug this is 0x80 + attention_info.flags |= fopAc_AttnFlag_CARRY_e; // in debug this is 0x80 } } @@ -208,7 +208,7 @@ void daCow_c::setActetcStatus() { if (!mNadeNade) { s32 playerAngle = fopAcM_seenPlayerAngleY(this); if (playerAngle < 0x6000 && playerAngle > 0x2000) { - attention_info.flags |= 0x80; // in debug this is 0x800 + attention_info.flags |= fopAc_AttnFlag_ETC_e; // in debug this is 0x800 } } } @@ -1698,9 +1698,9 @@ void daCow_c::action_angry() { setSeSnort(); if (!player->checkHorseRide()) { - attention_info.flags |= 1; + attention_info.flags |= fopAc_AttnFlag_LOCK_e; } else { - attention_info.flags &= ~1; + attention_info.flags &= ~fopAc_AttnFlag_LOCK_e; } if (mCrazy == daCow_c::Crazy_Dash) { setCarryStatus(); @@ -1908,7 +1908,7 @@ void daCow_c::action_angry() { mJoint1Offset.y = 0; mJoint8Offset.y = 0; - attention_info.flags &= ~1; + attention_info.flags &= ~fopAc_AttnFlag_LOCK_e; break; } } @@ -2780,7 +2780,7 @@ void daCow_c::action_wolf() { mMode = daCow_c::Mode_1; mCrazy = daCow_c::Crazy_Wait; calcRunAnime(true); - attention_info.flags |= 1; + attention_info.flags |= fopAc_AttnFlag_LOCK_e; mSound.startCreatureVoice(Z2SE_GOAT_V_ANGRY, -1); mTimer10 = cM_rndF(90.0f) + 90.0f; break; @@ -2877,7 +2877,7 @@ void daCow_c::action_wolf() { mJoint1Offset.y = 0; mJoint8Offset.y = 0; - attention_info.flags &= ~0x1; + attention_info.flags &= ~fopAc_AttnFlag_LOCK_e; for (int iWolfBuster = 0; iWolfBuster < N_WOLF_BUSTERS; iWolfBuster++) { if (gWolfBustersID[iWolfBuster] == fopAcM_GetID(this)) { @@ -2962,7 +2962,7 @@ void daCow_c::setAttnPos() { cXyz pos; if (mpMorf) { - if (attention_info.flags & 0x80) { + if (attention_info.flags & fopAc_AttnFlag_ETC_e) { arg.set(0.0f, 0.0f, 0.0f); mDoMtx_stack_c::copy(mpMorf->getModel()->getAnmMtx(11)); mDoMtx_stack_c::multVec(&arg, &eyePos); @@ -3020,8 +3020,8 @@ int daCow_c::Execute() { mCounter1++; mJointIndex = 0; - attention_info.flags &= ~0x10; - attention_info.flags &= ~0x80; + attention_info.flags &= ~fopAc_AttnFlag_CARRY_e; + attention_info.flags &= ~fopAc_AttnFlag_ETC_e; action(); if (!mDrawOff) { diff --git a/src/d/actor/d_a_cstatue.cpp b/src/d/actor/d_a_cstatue.cpp index 4a9761c1b4..2f7ba21912 100644 --- a/src/d/actor/d_a_cstatue.cpp +++ b/src/d/actor/d_a_cstatue.cpp @@ -383,7 +383,7 @@ int daCstatue_c::create() { mSph->SetTgType(0xd97afddf); mControlDistanceOffset = JMAFastSqrt(650000.0f); attention_info.distances[0] = 92; - cLib_onBit(attention_info.flags, 1); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_LOCK_e); mTargetFrame = 35.0f; } mControlDistanceOffset += 100.0f; @@ -1160,9 +1160,9 @@ int daCstatue_c::execute() { setCollision(); if (mType == daCstatueType_Small) { if (mStatueAcch.ChkGroundHit() && !fopAcM_checkCarryNow(this)) { - cLib_onBit(attention_info.flags, 0x10); // this is 0x80 in the debug rom + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } else { - cLib_offBit(attention_info.flags, 0x10); // this is 0x80 in the debug rom + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } } diff --git a/src/d/actor/d_a_do.cpp b/src/d/actor/d_a_do.cpp index 520c59df4d..fd22da8e12 100644 --- a/src/d/actor/d_a_do.cpp +++ b/src/d/actor/d_a_do.cpp @@ -1957,13 +1957,13 @@ static void action(do_class* i_this) { } if (carry_check && player->speedF < 2.0f) { - cLib_onBit(_this->attention_info.flags, 0x10); + cLib_onBit(_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); if (do_carry_check(i_this)) { return; } } else { - cLib_offBit(_this->attention_info.flags, 0x10); + cLib_offBit(_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); } cLib_addCalcAngleS2(&_this->current.angle.x, 0, 1, 0x400); @@ -2244,11 +2244,11 @@ static void message(do_class* i_this) { if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::checkNowWolf()) { fopAcM_OnStatus(i_this, 0); - cLib_onBit(i_this->attention_info.flags, 0xa); + cLib_onBit(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); i_this->eventInfo.onCondition(dEvtCnd_CANTALK_e); } else { fopAcM_OffStatus(i_this, 0); - cLib_offBit(i_this->attention_info.flags, 0xa); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } } } diff --git a/src/d/actor/d_a_door_boss.cpp b/src/d/actor/d_a_door_boss.cpp index a380344aaa..4a4af4ddeb 100644 --- a/src/d/actor/d_a_door_boss.cpp +++ b/src/d/actor/d_a_door_boss.cpp @@ -100,7 +100,7 @@ int daBdoor_c::CreateInit() { setAction(ACT_CLOSE_WAIT); attention_info.position.y += 250.0f; eyePos.y += 250.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; calcMtx(); mpBgW->Move(); u32 swbit = door_param2_c::getSwbit(this); @@ -362,7 +362,7 @@ int daBdoor_c::execute() { &actionOpen, &actionEnd, }; - if (fopAcM_checkStatus(this, 0x1000)) { + if (fopAcM_CheckStatus(this, 0x1000)) { mStaffID = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); demoProc(); } else { diff --git a/src/d/actor/d_a_door_bossL1.cpp b/src/d/actor/d_a_door_bossL1.cpp index 0f662449a0..cca82154a4 100644 --- a/src/d/actor/d_a_door_bossL1.cpp +++ b/src/d/actor/d_a_door_bossL1.cpp @@ -326,7 +326,7 @@ int daBdoorL1_c::CreateInit() { setAction(ACTION_CLOSE_WAIT); attention_info.position.y += 250.0f; eyePos.y += 250.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; if (checkFront()) { field_0x5a8 = -60.0f; } else { @@ -955,7 +955,7 @@ int daBdoorL1_c::actionEnd() { /* 804E464C-804E476C 00292C 0120+00 1/1 0/0 0/0 .text execute__11daBdoorL1_cFv */ int daBdoorL1_c::execute() { static actionFunc l_action[4] = {&daBdoorL1_c::actionWait, &daBdoorL1_c::actionCloseWait, &daBdoorL1_c::actionOpen, &daBdoorL1_c::actionEnd}; - if (fopAcM_checkStatus(this, 0x1000)) { + if (fopAcM_CheckStatus(this, 0x1000)) { field_0x5a0 = dComIfGp_evmng_getMyStaffId(l_staff_name, 0, 0); dMeter2Info_onGameStatus(2); demoProc(); diff --git a/src/d/actor/d_a_door_bossL5.cpp b/src/d/actor/d_a_door_bossL5.cpp index fbc91b4def..0c1d164da0 100644 --- a/src/d/actor/d_a_door_bossL5.cpp +++ b/src/d/actor/d_a_door_bossL5.cpp @@ -127,7 +127,7 @@ int daBdoorL5_c::CreateInit() { setAction(ACTION_CLOSE_WAIT); attention_info.position.y += 250.0f; eyePos.y += 250.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; calcMtx(); field_0x588->Move(); door_param2_c::getSwbit(this); @@ -480,7 +480,7 @@ int daBdoorL5_c::actionEnd() { int daBdoorL5_c::execute() { static actionFunc l_action[4] = {&daBdoorL5_c::actionWait, &daBdoorL5_c::actionCloseWait, &daBdoorL5_c::actionOpen, &daBdoorL5_c::actionEnd}; field_0x59c = -1; - if (fopAcM_checkStatus(this, 0x1000)) { + if (fopAcM_CheckStatus(this, 0x1000)) { field_0x59c = dComIfGp_evmng_getMyStaffId(l_staff_name, 0, 0); dMeter2Info_onGameStatus(2); demoProc(); diff --git a/src/d/actor/d_a_door_dbdoor00.cpp b/src/d/actor/d_a_door_dbdoor00.cpp index 38e8d1f018..221f86d1fc 100644 --- a/src/d/actor/d_a_door_dbdoor00.cpp +++ b/src/d/actor/d_a_door_dbdoor00.cpp @@ -157,7 +157,7 @@ int daDbDoor00_c::CreateInit() { field_0x594 = 0x1e; attention_info.position.y += 250.0f; eyePos.y += 250.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; calcMtx(); mpBgW->Move(); return 1; diff --git a/src/d/actor/d_a_door_knob00.cpp b/src/d/actor/d_a_door_knob00.cpp index b9c5f9d8c0..c41ce01028 100644 --- a/src/d/actor/d_a_door_knob00.cpp +++ b/src/d/actor/d_a_door_knob00.cpp @@ -141,7 +141,7 @@ int daKnob20_c::CreateInit() { setAction(ACTION_INIT); attention_info.position.y += 150.0f; eyePos.y += 150.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; calcMtx(); fopAcM_SetMtx(this, mModel1->getBaseTRMtx()); fopAcM_setCullSizeFar(this, 2.0f); @@ -691,7 +691,7 @@ int daKnob20_c::execute() { setActionFromFlow(); field_0x60f = frontCheck(); - if (fopAcM_checkStatus(this, 0x1000)) { + if (fopAcM_CheckStatus(this, 0x1000)) { startDemoProc(); demoProc(); dMeter2Info_onGameStatus(2); diff --git a/src/d/actor/d_a_door_mbossL1.cpp b/src/d/actor/d_a_door_mbossL1.cpp index 6f3e65ce8d..03e54dcc68 100644 --- a/src/d/actor/d_a_door_mbossL1.cpp +++ b/src/d/actor/d_a_door_mbossL1.cpp @@ -475,7 +475,7 @@ int daMBdoorL1_c::CreateInit() { setAction(ACTION_INIT); attention_info.position.y += 150.0f; eyePos.y += 150.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; calcMtx(); field_0x598->Move(); eventInfo.setArchiveName(getArcName()); @@ -991,7 +991,7 @@ int daMBdoorL1_c::openInit() { } } } - if (fopAcM_checkStatus(this, 0x1000)) { + if (fopAcM_CheckStatus(this, 0x1000)) { fopAcM_onSwitch(this, swBit3); } field_0x5e1 = 1; @@ -1677,7 +1677,7 @@ int daMBdoorL1_c::actionOpen() { /* 80676ED8-80676FE4 004718 010C+00 1/0 0/0 0/0 .text actionInit__12daMBdoorL1_cFv */ int daMBdoorL1_c::actionInit() { - if (fopAcM_checkStatus(this, 0x1000)) { + if (fopAcM_CheckStatus(this, 0x1000)) { setAction(ACTION_START_DEMO); actionStartDemo(); } else { @@ -1704,7 +1704,7 @@ int daMBdoorL1_c::actionInit() { int daMBdoorL1_c::actionStartDemo() { field_0x5e8 = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); demoProc(); - if (!fopAcM_checkStatus(this, 0x1000)) { + if (!fopAcM_CheckStatus(this, 0x1000)) { setAction(ACTION_CLOSE_WAIT); } return 1; diff --git a/src/d/actor/d_a_door_shutter.cpp b/src/d/actor/d_a_door_shutter.cpp index 39a66c9a83..a843a2330c 100644 --- a/src/d/actor/d_a_door_shutter.cpp +++ b/src/d/actor/d_a_door_shutter.cpp @@ -778,7 +778,7 @@ int daDoor20_c::CreateInit() { setAction(ACTION_INIT); attention_info.position.y += 150.0f; eyePos.y += 150.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; fopAcM_SetMtx(this, field_0x5f4); if (door_param2_c::getKind(this) == 10) { fopAcM_setCullSizeBox(this, -300.0f, 0, -50.0f, 300.0f, 700.0f, 50.0f); @@ -1547,7 +1547,7 @@ int daDoor20_c::drawCheck(int param_1) { /* 80464E18-80464EC4 004358 00AC+00 1/1 0/0 0/0 .text checkExecute__10daDoor20_cFv */ int daDoor20_c::checkExecute() { field_0x68c = frontCheck(); - if (fopAcM_checkStatus(this, 0x1000)) { + if (fopAcM_CheckStatus(this, 0x1000)) { return 1; } if (eventInfo.checkCommandDemoAccrpt() || eventInfo.checkCommandDoor()) { diff --git a/src/d/actor/d_a_e_ai.cpp b/src/d/actor/d_a_e_ai.cpp index b01c810e20..a047d6ad78 100644 --- a/src/d/actor/d_a_e_ai.cpp +++ b/src/d/actor/d_a_e_ai.cpp @@ -938,7 +938,7 @@ int e_ai_class::Create() { l_HIO.id = mDoHIO_CREATE_CHILD("アモス", &l_HIO); } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, m_modelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -300.0f, -200.0f); diff --git a/src/d/actor/d_a_e_ba.cpp b/src/d/actor/d_a_e_ba.cpp index 07a0e42ed8..ed384af775 100644 --- a/src/d/actor/d_a_e_ba.cpp +++ b/src/d/actor/d_a_e_ba.cpp @@ -917,7 +917,7 @@ static int daE_BA_Execute(e_ba_class* i_this) { if (a_this->health > 0 && !i_this->mIsDying && player->current.pos.y < a_this->current.pos.y) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -983,7 +983,7 @@ static int daE_BA_Execute(e_ba_class* i_this) { } } - a_this->attention_info.flags |= 0x200000; + a_this->attention_info.flags |= fopAc_AttnFlag_UNK_0x200000; return 1; } @@ -1094,7 +1094,7 @@ static cPhs__Step daE_BA_Create(fopAc_ac_c* i_this) { l_HIO.field_0x04 = -1; } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, _this->mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(i_this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_bg.cpp b/src/d/actor/d_a_e_bg.cpp index 55ee39429e..ff3cebc7ce 100644 --- a/src/d/actor/d_a_e_bg.cpp +++ b/src/d/actor/d_a_e_bg.cpp @@ -754,11 +754,7 @@ bool daE_BG_c::setBombCarry(int param_0) { fopAc_ac_c* bomb = NULL; if (param_0 == 0) { -#if VERSION == VERSION_SHIELD_DEBUG - cLib_onBit(attention_info.flags, 0x80); -#else - cLib_onBit(attention_info.flags, 0x10); -#endif + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (fopAcM_checkCarryNow(this)) { shape_angle.x = 0; @@ -867,11 +863,7 @@ void daE_BG_c::executeBirth() { field_0x6a0 = 0x3000; shape_angle.x = 0x2000; -#if VERSION == VERSION_SHIELD_DEBUG - cLib_onBit(attention_info.flags, 0x80); -#else - cLib_onBit(attention_info.flags, 0x10); -#endif + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCreatureSound.startCreatureSound(Z2SE_EN_BG_SANDSMOKE, 0, -1); @@ -904,11 +896,7 @@ void daE_BG_c::executeBirth() { field_0x688 = 0.0f; speed.y = 10.0f; -#if VERSION == VERSION_SHIELD_DEBUG - cLib_offBit(attention_info.flags, 0x80); -#else - cLib_offBit(attention_info.flags, 0x10); -#endif + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mAtSphere.OnAtSetBit(); } @@ -1142,9 +1130,9 @@ void daE_BG_c::action() { dBgS_LinChk linChk; linChk.Set(&dComIfGp_getCamera(0)->lookat.eye, &attention_info.position, this); if (dComIfG_Bgsp().LineCross(&linChk)) { - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } else { - attention_info.flags |= 0x4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } } @@ -1403,7 +1391,7 @@ int daE_BG_c::create() { l_HIO.field_0x4 = mDoHIO_CREATE_CHILD("爆弾魚", &l_HIO); } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorfSO->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -50.0f, -50.0f, -50.0f); diff --git a/src/d/actor/d_a_e_bi.cpp b/src/d/actor/d_a_e_bi.cpp index 56d2a68fd7..1a5fbb8c4d 100644 --- a/src/d/actor/d_a_e_bi.cpp +++ b/src/d/actor/d_a_e_bi.cpp @@ -581,7 +581,7 @@ static void action(e_bi_class* i_this) { if (bVar1 != 0) { fopAcM_OnStatus(a_this, 0); - cLib_onBit(a_this->attention_info.flags, 4); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_BATTLE_e); } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -608,10 +608,10 @@ static void action(e_bi_class* i_this) { } if (bVar3 != 0) { - cLib_onBit(a_this->attention_info.flags, 0x10); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); if (fopAcM_checkCarryNow(a_this)) { - cLib_offBit(a_this->attention_info.flags, 0x10); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAc_ac_c* bomb_p = dBomb_c::createEnemyBomb(&a_this->current.pos, &a_this->current.angle, fopAcM_GetRoomNo(a_this)); if (bomb_p == NULL) { @@ -630,10 +630,10 @@ static void action(e_bi_class* i_this) { } } - cLib_offBit(a_this->attention_info.flags, 4); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_BATTLE_e); } else { - cLib_offBit(a_this->attention_info.flags, 0x10); - cLib_onBit(a_this->attention_info.flags, 4); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_BATTLE_e); } if (bVar4 != 0 && water_check(i_this)) { @@ -923,7 +923,7 @@ static cPhs__Step daE_BI_Create(fopAc_ac_c* a_this) { l_HIO.field_0x4 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(a_this, 200.0f, 200.0f, 200.0f); @@ -995,7 +995,7 @@ static cPhs__Step daE_BI_Create(fopAc_ac_c* a_this) { } if (fopAcM_GetRoomNo(a_this) == 50) { - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 22; } diff --git a/src/d/actor/d_a_e_bs.cpp b/src/d/actor/d_a_e_bs.cpp index 89675cc1ff..2d160fb936 100644 --- a/src/d/actor/d_a_e_bs.cpp +++ b/src/d/actor/d_a_e_bs.cpp @@ -562,7 +562,7 @@ static void action(e_bs_class* i_this) { if (attn_ON) { fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(actor, 0); actor->attention_info.flags = 0; @@ -878,7 +878,7 @@ static int daE_BS_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("ベビースタル", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->modelMorf->getModel()->getBaseTRMtx()); diff --git a/src/d/actor/d_a_e_bu.cpp b/src/d/actor/d_a_e_bu.cpp index 472886ed8d..21874cdd16 100644 --- a/src/d/actor/d_a_e_bu.cpp +++ b/src/d/actor/d_a_e_bu.cpp @@ -891,7 +891,7 @@ static s8 action(e_bu_class* i_this) { actor->attention_info.flags = 0; } else { fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } } else { fopAcM_OffStatus(actor, 0); @@ -1108,7 +1108,7 @@ static int daE_BU_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("バブル", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->modelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(i_this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_cr.cpp b/src/d/actor/d_a_e_cr.cpp index 06b0432e63..cdd2889021 100644 --- a/src/d/actor/d_a_e_cr.cpp +++ b/src/d/actor/d_a_e_cr.cpp @@ -363,7 +363,7 @@ static void action(e_cr_class* a_this) { if (attn_ON) { fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(actor, 0); actor->attention_info.flags = 0; @@ -521,7 +521,7 @@ static int daE_CR_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("クレイジーランナー", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->modelMorf->getModel()->getBaseTRMtx()); i_this->health = 1; diff --git a/src/d/actor/d_a_e_db.cpp b/src/d/actor/d_a_e_db.cpp index 7c1738daf6..67468086f8 100644 --- a/src/d/actor/d_a_e_db.cpp +++ b/src/d/actor/d_a_e_db.cpp @@ -1794,7 +1794,7 @@ static void action(e_db_class* i_this) { if (attn_ON) { fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(actor, 0); actor->attention_info.flags = 0; @@ -2141,7 +2141,7 @@ static int daE_DB_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("デグババ", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->modelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -300.0f, -400.0f, -300.0f); diff --git a/src/d/actor/d_a_e_dd.cpp b/src/d/actor/d_a_e_dd.cpp index cd7e8202e5..0e76786943 100644 --- a/src/d/actor/d_a_e_dd.cpp +++ b/src/d/actor/d_a_e_dd.cpp @@ -1199,7 +1199,7 @@ static void action(e_dd_class* i_this) { if (bVar1 != 0) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -1737,7 +1737,7 @@ static cPhs__Step daE_DD_Create(fopAc_ac_c* a_this) { l_HIO.field_0x4 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -500.0f, -200.0f, -500.0f); fopAcM_SetMax(a_this, 500.0f, 200.0f, 500.0f); diff --git a/src/d/actor/d_a_e_df.cpp b/src/d/actor/d_a_e_df.cpp index afab9a1164..eedf55efba 100644 --- a/src/d/actor/d_a_e_df.cpp +++ b/src/d/actor/d_a_e_df.cpp @@ -704,7 +704,7 @@ int daE_DF_c::Create() { mHIOInit = TRUE; l_HIO.mNo = mDoHIO_CREATE_CHILD("デクレシア", &l_HIO); } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorfSO->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); diff --git a/src/d/actor/d_a_e_dk.cpp b/src/d/actor/d_a_e_dk.cpp index b2f84991d7..dcf89ee0ba 100644 --- a/src/d/actor/d_a_e_dk.cpp +++ b/src/d/actor/d_a_e_dk.cpp @@ -678,7 +678,7 @@ void daE_DK_c::executeDeath() { field_0x68e = 0; - attention_info.flags = 0x0; + attention_info.flags = 0; mCreatureSound.startCreatureSound(Z2SE_EN_DK_PULLOUT, 0, -1); @@ -719,7 +719,7 @@ void daE_DK_c::executeDeath() { BodyDeathMove(); - if (fopAcM_checkStatus(this, 0x100000) == 0) { + if (fopAcM_CheckStatus(this, 0x100000) == 0) { mMoveMode = 3; mpMorfSO->setPlaySpeed(1.0f); @@ -1059,7 +1059,7 @@ int daE_DK_c::create() { l_HIO.field_0x4 = mDoHIO_CREATE_CHILD("", &l_HIO); } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorfSO->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0, -200.0, -200.0); diff --git a/src/d/actor/d_a_e_dn.cpp b/src/d/actor/d_a_e_dn.cpp index 0e57f148e4..969c24b7c8 100644 --- a/src/d/actor/d_a_e_dn.cpp +++ b/src/d/actor/d_a_e_dn.cpp @@ -2400,7 +2400,7 @@ static void action(e_dn_class* i_this) { a_this->attention_info.flags = 0; } else { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } switch (i_this->mAction) { @@ -3218,7 +3218,7 @@ static int daE_DN_Execute(e_dn_class* i_this) { sp80.y += 180.0f; ((fopEn_enemy_c*) i_this)->setHeadLockPos(&sp80); - a_this->attention_info.flags |= 0x200000; + a_this->attention_info.flags |= fopAc_AttnFlag_UNK_0x200000; if ((a_this->current.pos.y - a_this->home.pos.y) < -5000.0f) { fopAcM_delete(a_this); @@ -3373,7 +3373,7 @@ static cPhs__Step daE_DN_Create(fopAc_ac_c* a_this) { } fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_000100); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(a_this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_dt.cpp b/src/d/actor/d_a_e_dt.cpp index bea43e3a19..66ecabbc93 100644 --- a/src/d/actor/d_a_e_dt.cpp +++ b/src/d/actor/d_a_e_dt.cpp @@ -1993,7 +1993,7 @@ void daE_DT_c::executeOpening() { camera->Start(); camera->SetTrimSize(0); dComIfGp_event_reset(); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; Z2GetAudioMgr()->subBgmStart(Z2BGM_DEKUTOAD); fpcM_Search(s_demo_otama, this); return; @@ -2572,7 +2572,7 @@ cPhs__Step daE_DT_c::create() { l_HIO.field_0x4 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -700.0f, -200.0f, -700.0f); fopAcM_SetMax(this, 700.0f, 500.0f, 700.0f); @@ -2616,7 +2616,7 @@ cPhs__Step daE_DT_c::create() { gravity = -5.0f; setActionMode(ACT_WAIT, 0); maxFallSpeed = l_HIO.mMaxFallSpeed; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; current.pos.set(0.0f, 0.0f, -500.0f); shape_angle.y = cLib_targetAngleY(¤t.pos, &daPy_getPlayerActorClass()->current.pos); Z2GetAudioMgr()->subBgmStart(Z2BGM_DEKUTOAD); diff --git a/src/d/actor/d_a_e_fm.cpp b/src/d/actor/d_a_e_fm.cpp index 9e1baad7d9..3490dfb22f 100644 --- a/src/d/actor/d_a_e_fm.cpp +++ b/src/d/actor/d_a_e_fm.cpp @@ -2777,7 +2777,7 @@ static void action(e_fm_class* i_this) { if (attn_on) { fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(actor, 0); actor->attention_info.flags = 0; @@ -3815,7 +3815,7 @@ static int daE_FM_Create(fopAc_ac_c* i_this) { l_HIO.no = mDoHIO_CREATE_CHILD("火魔人", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->mpFmModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -200.0f, -200.0f, -200.0f); diff --git a/src/d/actor/d_a_e_fs.cpp b/src/d/actor/d_a_e_fs.cpp index 31291f2df3..b3f1b2bbd8 100644 --- a/src/d/actor/d_a_e_fs.cpp +++ b/src/d/actor/d_a_e_fs.cpp @@ -179,7 +179,7 @@ static void e_fs_appear(e_fs_class* i_this) { anm_init(i_this, ANM_APPEAR, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode++; a_this->current.angle.y = i_this->mPlayerAngleY; - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; i_this->mCreatureSound.startCreatureSound(Z2SE_EN_FS_APPEAR, 0, -1); } break; @@ -536,7 +536,7 @@ static void e_fs_demowait(e_fs_class* i_this) { if (i_this->mTimer[0] == 0) { i_this->mAction = e_fs_class::ACT_MOVE; i_this->mMode = 0; - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } break; } @@ -850,7 +850,7 @@ static cPhs__Step daE_Fs_Create(fopAc_ac_c* i_this) { i_this->field_0x560 = 30; i_this->health = 30; - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (_this->field_0x5b5 >= 1) { _this->mMode = -1; diff --git a/src/d/actor/d_a_e_fz.cpp b/src/d/actor/d_a_e_fz.cpp index 904dcc76be..8d97c62c28 100644 --- a/src/d/actor/d_a_e_fz.cpp +++ b/src/d/actor/d_a_e_fz.cpp @@ -161,7 +161,7 @@ void daE_FZ_c::deadnextSet(bool param_0) { mTgCoSph.ClrTgHit(); fopAcM_OffStatus(this,0); - attention_info.flags &= 0xfffffffb; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; mAtSph.OffAtSetBit(); mTgCoSph.OffTgSetBit(); @@ -696,10 +696,10 @@ void daE_FZ_c::action() { if (!fopAcM_otherBgCheck(this, dComIfGp_getPlayer(0))) { fopAcM_OnStatus(this, 0); - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xfffffffb; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } linkSearch = false; @@ -860,7 +860,7 @@ s32 daE_FZ_c::execute() { #if DEBUG fopAcM_OnStatus(this,0); #endif - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } } @@ -970,7 +970,7 @@ s32 daE_FZ_c::create() { l_HIO.field_0x04 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[fopAc_attn_BATTLE_e] = 69; fopAcM_SetMtx(this,mpModel->getBaseTRMtx()); @@ -1039,12 +1039,12 @@ s32 daE_FZ_c::create() { attention_info.distances[fopAc_attn_BATTLE_e] = 0; fopAcM_SetGroup(this,0); fopAcM_OffStatus(this,0); - attention_info.flags &= 0xfffffffb; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } if (field_0x714 == 3) { mRadiusBase = 0.0f; - attention_info.flags &= 0xfffffffb; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; mAtSph.SetAtType(AT_TYPE_CSTATUE_SWING); mAtSph.SetAtSpl(dCcG_At_Spl_UNK_1); setActionMode(ACT_ROLLMOVE,0); diff --git a/src/d/actor/d_a_e_gb.cpp b/src/d/actor/d_a_e_gb.cpp index 3271fb7a92..af2148118a 100644 --- a/src/d/actor/d_a_e_gb.cpp +++ b/src/d/actor/d_a_e_gb.cpp @@ -795,7 +795,7 @@ static void action(e_gb_class* i_this) { if (bVar1 != 0) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -1622,7 +1622,7 @@ static cPhs__Step daE_GB_Create(fopAc_ac_c* a_this) { l_HIO.field_0x4 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; a_this->health = 90; a_this->field_0x560 = 90; diff --git a/src/d/actor/d_a_e_gi.cpp b/src/d/actor/d_a_e_gi.cpp index 534debbf9b..034dcf2f2f 100644 --- a/src/d/actor/d_a_e_gi.cpp +++ b/src/d/actor/d_a_e_gi.cpp @@ -813,7 +813,7 @@ void daE_GI_c::action() { damage_check(); u8 is_battle_on = FALSE; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; switch (mActionMode) { case ACTION_SLEEP_e: @@ -844,11 +844,11 @@ void daE_GI_c::action() { mIsBattleOn = is_battle_on; mSound.setLinkSearch(is_battle_on); - if (attention_info.flags & 4) { + if (attention_info.flags & fopAc_AttnFlag_BATTLE_e) { dBgS_LinChk linecheck; linecheck.Set(&dComIfGp_getCamera(0)->lookat.eye, &attention_info.position, this); if (dComIfG_Bgsp().LineCross(&linecheck)) { - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } } @@ -1088,7 +1088,7 @@ int daE_GI_c::create() { l_HIO.id = mDoHIO_CREATE_CHILD("ギブド", &l_HIO); } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_gob.cpp b/src/d/actor/d_a_e_gob.cpp index 26a35b24d1..5458b97e5a 100644 --- a/src/d/actor/d_a_e_gob.cpp +++ b/src/d/actor/d_a_e_gob.cpp @@ -722,7 +722,7 @@ static u8 ball(e_gob_class* i_this) { mDoMtx_stack_c::multVec(&daPy_getPlayerActorClass()->current.pos, &sp2C); if (fabsf(sp2C.x) < var_f28 && sp2C.z > temp_f27 && sp2C.z < var_f29) { - actor->attention_info.flags |= 0x10; + actor->attention_info.flags |= fopAc_AttnFlag_CARRY_e; } if (enemy->checkThrowMode(2)) { @@ -1256,7 +1256,7 @@ static void message(e_gob_class* i_this) { } if (i_this->mPlayerDist < 600.0f) { - cLib_onBit(actor->attention_info.flags, 0xA); + cLib_onBit(actor->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); i_this->eventInfo.onCondition(1); if (dComIfGp_event_runCheck()) { @@ -1318,7 +1318,7 @@ static void action(e_gob_class* i_this) { u8 stop_subbgm = TRUE; int sp2C = 4; - cLib_offBit(actor->attention_info.flags, 0x1A); + cLib_offBit(actor->attention_info.flags, fopAc_AttnFlag_CARRY_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); int sp28 = 1; switch (i_this->mAction) { @@ -1420,10 +1420,10 @@ static void action(e_gob_class* i_this) { if (on_attention) { fopAcM_OnStatus(i_this, 0); - actor->attention_info.flags |= 4; + actor->attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(i_this, 0); - actor->attention_info.flags &= ~4; + actor->attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } if (spD && i_this->mPlayerDist < 400.0f && daPy_getPlayerActorClass()->getCutType() != 0x29 && daPy_getPlayerActorClass()->getCutAtFlg() != 0 && i_this->field_0x6aa == 0) { @@ -2328,7 +2328,7 @@ static int daE_GOB_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("マグネゴロン", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -400.0f, -500.0f, -400.0f); diff --git a/src/d/actor/d_a_e_hb.cpp b/src/d/actor/d_a_e_hb.cpp index 0f44222e8e..c05fddf2dd 100644 --- a/src/d/actor/d_a_e_hb.cpp +++ b/src/d/actor/d_a_e_hb.cpp @@ -1103,7 +1103,7 @@ static void action(e_hb_class* i_this) { if (attn_ON) { fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(actor, 0); actor->attention_info.flags = 0; @@ -1445,7 +1445,7 @@ static int daE_HB_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("デグババ(ボックリ)", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->modelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -300.0f, -400.0f, -300.0f); diff --git a/src/d/actor/d_a_e_hp.cpp b/src/d/actor/d_a_e_hp.cpp index d30c839bad..7af721d871 100644 --- a/src/d/actor/d_a_e_hp.cpp +++ b/src/d/actor/d_a_e_hp.cpp @@ -183,7 +183,7 @@ int daE_HP_c::draw() { attention_info.distances[fopAc_attn_BATTLE_e] = 0x04; fopAcM_SetGroup(this, 2); fopAcM_OnStatus(this, 0); - attention_info.flags = attention_info.flags | 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } J3DModel* model = mpMorfSO->getModel(); @@ -929,7 +929,7 @@ void daE_HP_c::action() { if (field_0x790 > 250.0f) { unkXyz1 = home.pos - player->current.pos; fopAcM_OnStatus(this, 0); - attention_info.flags |= 0x4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; if (unkXyz1.abs() < mDisHani) { if (abs((s16)(current.angle.y - fopAcM_searchPlayerAngleY(this))) < 0x4000 && @@ -945,7 +945,7 @@ void daE_HP_c::action() { } } else { fopAcM_OffStatus(this, 0); - attention_info.flags = attention_info.flags & 0xfffffffb; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } cLib_addCalcAngleS2(&field_0x7aa, angleDiff, 8, 0x400); @@ -1063,7 +1063,7 @@ int daE_HP_c::execute() { fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (field_0x78b == 0) { field_0x790 = 0.0f; @@ -1081,7 +1081,7 @@ int daE_HP_c::execute() { fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (field_0x78b == 0) { field_0x790 = 0.0f; @@ -1099,7 +1099,7 @@ int daE_HP_c::execute() { fopAcM_SetGroup(this, 2); fopAcM_OnStatus(this, 0); - attention_info.flags = attention_info.flags | 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } if (field_0x71c != 0) { @@ -1262,7 +1262,7 @@ int daE_HP_c::create() { home.pos.y = current.pos.y + 100.0f; arg0 = 0x02; } - attention_info.flags = 0x4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorfSO->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); @@ -1309,12 +1309,12 @@ int daE_HP_c::create() { if (BREG_S(0) != 0 || mNight == 0 || dKy_daynight_check()) { attention_info.distances[fopAc_attn_BATTLE_e] = 0x04; fopAcM_OffStatus(this, 0); - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } else { attention_info.distances[fopAc_attn_BATTLE_e] = 0; fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } mtx_set(); diff --git a/src/d/actor/d_a_e_hzelda.cpp b/src/d/actor/d_a_e_hzelda.cpp index 4022e6291a..7c63404fc0 100644 --- a/src/d/actor/d_a_e_hzelda.cpp +++ b/src/d/actor/d_a_e_hzelda.cpp @@ -706,7 +706,7 @@ static void action(e_hzelda_class* i_this) { if (on_attention) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; diff --git a/src/d/actor/d_a_e_is.cpp b/src/d/actor/d_a_e_is.cpp index e90c1eb4af..1760e7d503 100644 --- a/src/d/actor/d_a_e_is.cpp +++ b/src/d/actor/d_a_e_is.cpp @@ -192,7 +192,7 @@ static void e_is_wait(e_is_class* a_this) { a_this->mode = 3; a_this->model_morf->setPlaySpeed(1.0f); fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } break; case 3: @@ -683,7 +683,7 @@ static int daE_IS_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("動くイデリア石像", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->model_morf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -500.0f, -200.0f, -500.0f); diff --git a/src/d/actor/d_a_e_kg.cpp b/src/d/actor/d_a_e_kg.cpp index 12a1ba6fbe..8a79e13120 100644 --- a/src/d/actor/d_a_e_kg.cpp +++ b/src/d/actor/d_a_e_kg.cpp @@ -736,7 +736,7 @@ static int daE_KG_Create(fopAc_ac_c* i_this) { l_HIO.field_0x4 = -1; } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->mpMorf->getModel()->getBaseTRMtx()); i_this->health = 0x50; i_this->field_0x560 = 0x50; diff --git a/src/d/actor/d_a_e_kk.cpp b/src/d/actor/d_a_e_kk.cpp index c2f242a2a8..fa1fda29e3 100644 --- a/src/d/actor/d_a_e_kk.cpp +++ b/src/d/actor/d_a_e_kk.cpp @@ -901,7 +901,7 @@ void daE_KK_c::executeDead() { switch (mMoveMode) { case 0: fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 0; offHeadLockFlg(); health = 0; @@ -1300,7 +1300,7 @@ int daE_KK_c::execute() { attention_info.distances[2] = 0x45; fopAcM_SetGroup(this, 2); fopAcM_OnStatus(this, 0); - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } } @@ -1479,7 +1479,7 @@ int daE_KK_c::create() { field_0x760 = current.pos.y; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 0x4C; if (field_0x679 != 3) { @@ -1501,7 +1501,7 @@ int daE_KK_c::create() { attention_info.distances[2] = 0; fopAcM_SetGroup(this, 0); fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } if (field_0x67a == 0xFF || field_0x67a == 0) { diff --git a/src/d/actor/d_a_e_kr.cpp b/src/d/actor/d_a_e_kr.cpp index 17cfa49444..7ce0bd5372 100644 --- a/src/d/actor/d_a_e_kr.cpp +++ b/src/d/actor/d_a_e_kr.cpp @@ -1996,7 +1996,7 @@ static void action(e_kr_class* i_this) { if (unkByte2) { fopAcM_OnStatus(enemy, 0); - enemy->attention_info.flags = 4; + enemy->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(enemy, 0); enemy->attention_info.flags = 0; diff --git a/src/d/actor/d_a_e_mb.cpp b/src/d/actor/d_a_e_mb.cpp index dae460b693..07e3351555 100644 --- a/src/d/actor/d_a_e_mb.cpp +++ b/src/d/actor/d_a_e_mb.cpp @@ -573,7 +573,7 @@ static int daE_MB_Execute(e_mb_class* i_this) { i_this->attention_info.position += i_this->eyePos; fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { i_this->mpBombModel2Morf->play(NULL, 0, 0); @@ -749,7 +749,7 @@ static int daE_MB_Create(fopAc_ac_c* i_this) { a_this->mCcSph.Set(cc_sph_src); a_this->mCcSph.SetStts(&a_this->mColliderStts); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; i_this->attention_info.distances[fopAc_attn_BATTLE_e] = 22; a_this->field_0x6b0 = 1; daE_MB_Execute(a_this); diff --git a/src/d/actor/d_a_e_mf.cpp b/src/d/actor/d_a_e_mf.cpp index aa812a0d9b..4560dccc87 100644 --- a/src/d/actor/d_a_e_mf.cpp +++ b/src/d/actor/d_a_e_mf.cpp @@ -2289,7 +2289,7 @@ static void action(e_mf_class* i_this) { a_this->attention_info.flags = 0; } else { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } switch (i_this->mAction) { @@ -3235,7 +3235,7 @@ static cPhs__Step daE_MF_Create(fopAc_ac_c* a_this) { } fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_000100); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(a_this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_mk.cpp b/src/d/actor/d_a_e_mk.cpp index 5e015aa31c..540bf381e1 100644 --- a/src/d/actor/d_a_e_mk.cpp +++ b/src/d/actor/d_a_e_mk.cpp @@ -2378,7 +2378,7 @@ static void action(e_mk_class* i_this) { if (sVar2) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -2827,7 +2827,7 @@ static int daE_MK_Create(fopAc_ac_c* i_actor) { l_HIO.field_0x4 = mDoHIO_CREATE_CHILD("ブーメラン猿", &l_HIO); } - i_actor->attention_info.flags = 4; + i_actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_actor, mk->mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_actor, -500.0f, -500.0f, -500.0f); diff --git a/src/d/actor/d_a_e_ms.cpp b/src/d/actor/d_a_e_ms.cpp index 737fe66ced..0445d8a5ce 100644 --- a/src/d/actor/d_a_e_ms.cpp +++ b/src/d/actor/d_a_e_ms.cpp @@ -710,7 +710,7 @@ static void action(e_ms_class* i_this) { if (sVar1 && i_this->health > 0) { fopAcM_OnStatus(i_this, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(i_this, 0); actor->attention_info.flags = 0; diff --git a/src/d/actor/d_a_e_nest.cpp b/src/d/actor/d_a_e_nest.cpp index 725354da05..27c6b85fea 100644 --- a/src/d/actor/d_a_e_nest.cpp +++ b/src/d/actor/d_a_e_nest.cpp @@ -451,7 +451,7 @@ static s8 e_nest_carry(e_nest_class* i_this) { switch (i_this->mMode) { case 0: - cLib_offBit(i_this->attention_info.flags, 0x10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); i_this->mMode = 1; s16 angle_delta_y = i_this->mRotation.y - player->shape_angle.y; if (angle_delta_y > 0x4000 || angle_delta_y < -0x4000) { @@ -720,7 +720,7 @@ static void bee_nest_action(e_nest_class* i_this) { break; case e_nest_class::ACT_DEBRIS: e_nest_hahen(i_this); - cLib_offBit(i_this->attention_info.flags, 0x10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); return; } @@ -731,7 +731,7 @@ static void bee_nest_action(e_nest_class* i_this) { } if (carry_check) { - cLib_onBit(i_this->attention_info.flags, 0x10); + cLib_onBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); i_this->attention_info.distances[fopAc_attn_CARRY_e] = 0x2c; if (fopAcM_checkCarryNow(i_this)) { i_this->mAction = e_nest_class::ACT_CARRY; @@ -739,7 +739,7 @@ static void bee_nest_action(e_nest_class* i_this) { i_this->mCcSph.OffCoSetBit(); } } else { - cLib_offBit(i_this->attention_info.flags, 0x10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); } if (float_check && water_check(i_this)) { diff --git a/src/d/actor/d_a_e_nz.cpp b/src/d/actor/d_a_e_nz.cpp index 07b7a9b07c..32a69d41bc 100644 --- a/src/d/actor/d_a_e_nz.cpp +++ b/src/d/actor/d_a_e_nz.cpp @@ -647,7 +647,7 @@ static int daE_NZ_Execute(e_nz_class* i_this) { } else { i_this->mSph.SetTgType(0xd8fbfdff); fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } } diff --git a/src/d/actor/d_a_e_oc.cpp b/src/d/actor/d_a_e_oc.cpp index 0c37887d8b..9b51906755 100644 --- a/src/d/actor/d_a_e_oc.cpp +++ b/src/d/actor/d_a_e_oc.cpp @@ -2552,7 +2552,7 @@ cPhs__Step daE_OC_c::create() { lbl_216_bss_58 = 1; l_HIO.field_0x04 = 0xFF; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_oct_bg.cpp b/src/d/actor/d_a_e_oct_bg.cpp index 64f6a574b3..a0a38fa7af 100644 --- a/src/d/actor/d_a_e_oct_bg.cpp +++ b/src/d/actor/d_a_e_oct_bg.cpp @@ -288,7 +288,7 @@ void daE_OctBg_c::born_swim() { field_0xb70++; } else if (field_0xb70 == -1) { field_0x8c0.SetTgType(0xd8fbfdff); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else if (field_0xbae == 0) { cLib_addCalcAngleS(¤t.angle.x, 0, 0x10, 0xc00, 0x200); cLib_chaseF(&speedF, 0.0f, 0.05f); @@ -379,7 +379,7 @@ bool daE_OctBg_c::checkCoreFishAttack() { if (fopAcM_SearchByID(fopAcM_GetLinkId(this), &actor) == 0 || actor == NULL) { return false; } - if (fopAcM_checkStatus(actor, 0x100000) == 0) { + if (fopAcM_CheckStatus(actor, 0x100000) == 0) { return false; } return true; @@ -594,7 +594,7 @@ void daE_OctBg_c::back_swim() { bool daE_OctBg_c::setBombCarry(int param_1) { fopAc_ac_c* actor = NULL; if (param_1 == 0) { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (fopAcM_checkCarryNow(this) != 0) { current.angle.x = 0; actor = @@ -846,7 +846,7 @@ int daE_OctBg_c::create() { field_0xbb3 = 1; struct_8073A14C.field_0x04 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; onWolfNoLock(); fopAcM_SetMtx(this, field_0x5b4->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -50.0f, -50.0f, -50.0f); diff --git a/src/d/actor/d_a_e_ot.cpp b/src/d/actor/d_a_e_ot.cpp index e8ade10a7a..f6fb73aebe 100644 --- a/src/d/actor/d_a_e_ot.cpp +++ b/src/d/actor/d_a_e_ot.cpp @@ -339,7 +339,7 @@ void daE_OT_c::executeEgg() { if (mWaterSurface >= current.pos.y) { setWaterEffect(); } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (mMode == 5) { setActionMode(ACT_BORN, 0); } else { @@ -798,7 +798,7 @@ cPhs__Step daE_OT_c::create() { l_HIO.field_0x4 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_ph.cpp b/src/d/actor/d_a_e_ph.cpp index 0971701517..29b1854f42 100644 --- a/src/d/actor/d_a_e_ph.cpp +++ b/src/d/actor/d_a_e_ph.cpp @@ -1037,7 +1037,7 @@ void daE_PH_c::AttentionSet() { attention_info.distances[fopAc_attn_BATTLE_e] = 0x53; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else if (current.pos.absXZ(fopAcM_GetPosition(player_p)) > 1000.0f) { if (strcmp(dComIfGp_getStartStageName(), "D_MN07A") == 0) { attention_info.distances[fopAc_attn_BATTLE_e] = 0x52; @@ -1257,7 +1257,7 @@ int daE_PH_c::create() { mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), NULL, NULL); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[fopAc_attn_BATTLE_e] = 0x22; cXyz sp3C(current.pos.x, current.pos.y + 200.0f, current.pos.z); diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index f333264531..0543e9fe94 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -1646,7 +1646,7 @@ void daE_PM_c::BossEscapeAction() { case 3: if (mpMorf->isStop()) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mAction = ACT_WAIT; mMode = 0; if (mBossHealth < 3) { @@ -2794,7 +2794,7 @@ cPhs__Step daE_PM_c::Create() { mpPath = dPath_GetRoomPath(mPathIndex, fopAcM_GetRoomNo(this)); mSwBit = (fopAcM_GetParam(this) >> 0x18) & 0xFF; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[fopAc_attn_BATTLE_e] = 86; fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, 0.0f, -200.0f); diff --git a/src/d/actor/d_a_e_po.cpp b/src/d/actor/d_a_e_po.cpp index 2d81b8e5a4..055e4cc761 100644 --- a/src/d/actor/d_a_e_po.cpp +++ b/src/d/actor/d_a_e_po.cpp @@ -362,7 +362,7 @@ static void e_po_avoid(e_po_class* i_this) { anm_init(i_this, ANM_SWAY_BACK, 0.0f, 0, 1.0f); i_this->mSound1.startCreatureVoice(Z2SE_EN_PO_V_LAUGH, -1); i_this->enemy.current.angle.y = fopAcM_searchPlayerAngleY(a_this); - i_this->enemy.attention_info.flags &= ~0x4; + i_this->enemy.attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (cM_rndF(1.0f) < 0.5f) { i_this->enemy.current.angle.y += 0x4000; } else { @@ -375,7 +375,7 @@ static void e_po_avoid(e_po_class* i_this) { if (i_this->mpMorf->isStop()) { i_this->mSound1.startCreatureVoice(Z2SE_EN_PO_V_FIND, -1); i_this->enemy.current.angle.y = i_this->enemy.shape_angle.y; - i_this->enemy.attention_info.flags |= 0x4; + i_this->enemy.attention_info.flags |= fopAc_AttnFlag_BATTLE_e; i_this->mActionID = ACT_SEARCH; anm_init(i_this, ANM_RUN_AFTER2, 10.0f, 2, 1.0f); i_this->mType = 2; @@ -856,7 +856,7 @@ static void e_po_dead(e_po_class* i_this) { } else { camera_player->mCamera.Stop(); camera_player->mCamera.SetTrimSize(3); - a_this->attention_info.flags &= 0xFFBFFFFF; + a_this->attention_info.flags &= ~fopAc_AttnFlag_UNK_0x400000; i_this->mType = 3; } @@ -949,7 +949,7 @@ static void e_po_dead(e_po_class* i_this) { i_this->mSound1.startCreatureSound(Z2SE_EN_PO_SOUL_PULLOUT, 0, -1); anm_init(i_this, ANM_DOWN_DEAD, 10.0f, 0, 1.0f); fopAcM_OffStatus(a_this, 0); - a_this->attention_info.flags &= ~0x4; + a_this->attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; i_this->mCyl.SetTgHitMark(CcG_Tg_UNK_MARK_3); dScnPly_c::setPauseTimer(5); fopAcM_OnStatus(a_this, 0x4000); @@ -961,7 +961,7 @@ static void e_po_dead(e_po_class* i_this) { if (i_this->mpMorf->isStop()) { i_this->field_0x75A = 1; fopAcM_OffStatus(a_this, 0); - a_this->attention_info.flags &= ~0x4; + a_this->attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 0; fopAcM_SetGroup(a_this, 0); i_this->mpMorf3->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_PO", 0x17), 0, 0.0f, @@ -1190,7 +1190,7 @@ static void e_po_dead(e_po_class* i_this) { i_this->mSound1.setEnemyName(NULL); fopAcM_SetGroup(a_this, 0); fopAcM_OffStatus(a_this, 0); - a_this->attention_info.flags &= ~0x4; + a_this->attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; break; case 20: @@ -1254,7 +1254,7 @@ static void e_po_dead(e_po_class* i_this) { } else { camera_player->mCamera.Stop(); camera_player->mCamera.SetTrimSize(3); - a_this->attention_info.flags &= ~0x400000; + a_this->attention_info.flags &= ~fopAc_AttnFlag_UNK_0x400000; i_this->mType = 3; } } @@ -2202,7 +2202,7 @@ static void e_po_holl_demo(e_po_class* i_this) { a_this->field_0x560 = 90; i_this->mSph2.OnCoSetBit(); i_this->field_0x5C1 = 1; - a_this->attention_info.flags = 0x400000; + a_this->attention_info.flags = fopAc_AttnFlag_UNK_0x400000; a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 3; fopAcM_SetGroup(a_this, 2); a_this->home.pos.set(a_this->current.pos); @@ -2478,9 +2478,9 @@ static void action(e_po_class* i_this) { var_f31 = 230.0f; var_f30 = 60.0f; fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags |= 4; + a_this->attention_info.flags |= fopAc_AttnFlag_BATTLE_e; if (i_this->field_0x5C1) { - a_this->attention_info.flags = 0x400004; + a_this->attention_info.flags = fopAc_AttnFlag_UNK_0x400000 | fopAc_AttnFlag_BATTLE_e; } if (i_this->mActionID == ACT_OPENING || i_this->mActionID == ACT_DAMAGE || i_this->mActionID == ACT_WOLF_BITE || i_this->mActionID == ACT_DEAD || @@ -2504,9 +2504,9 @@ static void action(e_po_class* i_this) { i_this->field_0x74A[3] = 5; i_this->field_0x754 = 10; fopAcM_OffStatus(a_this, 0); - a_this->attention_info.flags &= ~0x4; + a_this->attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (i_this->field_0x5C1) { - a_this->attention_info.flags = 0x400000; + a_this->attention_info.flags = fopAc_AttnFlag_UNK_0x400000; } } } @@ -3020,7 +3020,7 @@ static int daE_PO_Create(fopAc_ac_c* i_act_this) { i_act_this->attention_info.distances[fopAc_attn_BATTLE_e] = 25; } fopAcM_OffStatus(i_act_this, 0); - i_act_this->attention_info.flags &= ~0x4; + i_act_this->attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (mArg0Check(i_this, 0xFF) == 3 || mArg0Check(i_this, 0xFF) == 4) { i_this->BitSW = 0xFF; @@ -3151,7 +3151,7 @@ static int daE_PO_Create(fopAc_ac_c* i_act_this) { i_this->field_0x5C1 = TRUE; } if (i_this->field_0x5C1) { - i_act_this->attention_info.flags = 0x400000; + i_act_this->attention_info.flags = fopAc_AttnFlag_UNK_0x400000; } if (mArg0Check(i_this, 0) != 0) { if (!fopAcM_isSwitch(i_act_this, 0x43)) { diff --git a/src/d/actor/d_a_e_pz.cpp b/src/d/actor/d_a_e_pz.cpp index a59848d379..297fcf191e 100644 --- a/src/d/actor/d_a_e_pz.cpp +++ b/src/d/actor/d_a_e_pz.cpp @@ -178,7 +178,7 @@ void daE_PZ_c::mEntrySUB(bool param_0) { attention_info.distances[fopAc_attn_BATTLE_e] = 0; fopAcM_OffStatus(this, 0); - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } else { if ((arg0 == 0 || arg0 == 1) && field_0x844 != 0) { dComIfGp_particle_set(0x8897, &eff_pos, &shape_angle, NULL); @@ -188,7 +188,7 @@ void daE_PZ_c::mEntrySUB(bool param_0) { attention_info.distances[fopAc_attn_BATTLE_e] = 3; fopAcM_OnStatus(this, 0); - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } } @@ -1606,7 +1606,7 @@ void daE_PZ_c::executeDead() { field_0x843 = 0; fopAcM_OffStatus(this, 0); fopAcM_SetGroup(this, 0); - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; break; } @@ -2568,7 +2568,7 @@ int daE_PZ_c::create() { l_HIO.no = mDoHIO_CREATE_CHILD("ファントムザント", &l_HIO); } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mColliderStts.Init(0xFE, 0, this); @@ -2642,7 +2642,7 @@ int daE_PZ_c::create() { attention_info.distances[fopAc_attn_BATTLE_e] = 0; fopAcM_OffStatus(this, 0); - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (arg0 == 0) { field_0x7bc = 20.0f; diff --git a/src/d/actor/d_a_e_rb.cpp b/src/d/actor/d_a_e_rb.cpp index 1ccb43385a..eba7871a0e 100644 --- a/src/d/actor/d_a_e_rb.cpp +++ b/src/d/actor/d_a_e_rb.cpp @@ -482,7 +482,7 @@ static void action(e_rb_class* i_this) { if (attention_ON) { fopAcM_OnStatus(enemy, 0); - enemy->attention_info.flags = 4; + enemy->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(enemy, 0); enemy->attention_info.flags = 0; @@ -846,7 +846,7 @@ static int daE_RB_Create(fopAc_ac_c* i_this) { l_HIO.id = mDoHIO_CREATE_CHILD("リーバ", &l_HIO); } - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, a_this->modelMorf->getModel()->getBaseTRMtx()); i_this->health = 1; i_this->field_0x560 = 1; diff --git a/src/d/actor/d_a_e_rd.cpp b/src/d/actor/d_a_e_rd.cpp index 6762aff337..0e31dfdb49 100644 --- a/src/d/actor/d_a_e_rd.cpp +++ b/src/d/actor/d_a_e_rd.cpp @@ -3659,7 +3659,7 @@ static void e_rd_kiba_start(e_rd_class* i_this) { if (i_this->mpModelMorf->isStop()) { i_this->mAction = ACTION_WB_RUN; i_this->mMode = 0; - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } } } @@ -6887,7 +6887,7 @@ static int daE_RD_Execute(e_rd_class* i_this) { a_this->setHeadLockPos(&spd4); demo_camera(i_this); i_this->field_0x5bb = 1; - a_this->attention_info.flags |= 0x200000; + a_this->attention_info.flags |= fopAc_AttnFlag_UNK_0x200000; return 1; } @@ -7282,7 +7282,7 @@ static cPhs__Step daE_RD_Create(fopAc_ac_c* a_this) { } fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_000100); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (i_this->field_0x5b6 == 6) { i_this->mAction = ACTION_YAGURA; diff --git a/src/d/actor/d_a_e_rdb.cpp b/src/d/actor/d_a_e_rdb.cpp index ea236208bb..323be8d54e 100644 --- a/src/d/actor/d_a_e_rdb.cpp +++ b/src/d/actor/d_a_e_rdb.cpp @@ -970,7 +970,7 @@ static void action(e_rdb_class* i_this) { if (sVar2) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; diff --git a/src/d/actor/d_a_e_rdy.cpp b/src/d/actor/d_a_e_rdy.cpp index e7191c7491..0c5b96dd88 100644 --- a/src/d/actor/d_a_e_rdy.cpp +++ b/src/d/actor/d_a_e_rdy.cpp @@ -3229,7 +3229,7 @@ static void action(e_rdy_class* i_this) { if (i_this->mRideState == 0) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; @@ -4953,7 +4953,7 @@ static cPhs__Step daE_RDY_Create(fopAc_ac_c* i_this) { } fopAcM_OnStatus(i_this, fopAcStts_CULL_e); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; u8 path_id = i_this->home.angle.x & 0xff; if (path_id != 0xff) { diff --git a/src/d/actor/d_a_e_s1.cpp b/src/d/actor/d_a_e_s1.cpp index 0c17d30908..85419742f5 100644 --- a/src/d/actor/d_a_e_s1.cpp +++ b/src/d/actor/d_a_e_s1.cpp @@ -1516,7 +1516,7 @@ static void action(e_s1_class* i_this) { if (on_attention) { fopAcM_OnStatus(a_this, 0); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); i_this->attention_info.flags = 0; @@ -2064,7 +2064,7 @@ static int daE_S1_Execute(e_s1_class* i_this) { cXyz lockpos(a_this->eyePos); lockpos.y += NREG_F(7) + 130.0f; i_this->setHeadLockPos(&lockpos); - a_this->attention_info.flags |= 0x200000; + a_this->attention_info.flags |= fopAc_AttnFlag_UNK_0x200000; return 1; } @@ -2214,7 +2214,7 @@ static int daE_S1_Create(fopAc_ac_c* i_this) { } fopAcM_OnStatus(i_this, 0x100); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (!a_this->mRoofSpawn) { a_this->mAction = ACT_WAIT; diff --git a/src/d/actor/d_a_e_sb.cpp b/src/d/actor/d_a_e_sb.cpp index 1e10b20278..a8e4103d4e 100644 --- a/src/d/actor/d_a_e_sb.cpp +++ b/src/d/actor/d_a_e_sb.cpp @@ -664,7 +664,7 @@ void daE_SB_c::Search() { attention_info.flags = 0; if (temp_f31 < l_HIO.search_area) { if (!other_bg_check(this, player)) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mSound.setLinkSearch(1); field_0x5b0 = 4; if (temp_f31 < l_HIO.atk_start_range && (s16) (shape_angle.y - s_TargetAngle) > -0x3000 @@ -677,7 +677,7 @@ void daE_SB_c::Search() { } } else if (temp_f31 < (400.0f + l_HIO.search_area)) { if (!other_bg_check(this, player)) { - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } } else if (temp_f30 > l_HIO.distance_home) { field_0x5b0 = 4; @@ -1168,7 +1168,7 @@ cPhs__Step daE_SB_c::Create() { l_HIO.field_0x04 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 0x24; fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, 0.0f, -200.0f); diff --git a/src/d/actor/d_a_e_sg.cpp b/src/d/actor/d_a_e_sg.cpp index 84a861ef24..fdbdb28aa0 100644 --- a/src/d/actor/d_a_e_sg.cpp +++ b/src/d/actor/d_a_e_sg.cpp @@ -703,7 +703,7 @@ static void e_sg_drop(e_sg_class* i_this) { cXyz local_3c; cXyz local_48; - if (fopAcM_checkStatus(i_this, 0x100000) == 0) { + if (fopAcM_CheckStatus(i_this, 0x100000) == 0) { i_this->mStepSpeed = 1.2f; if (i_this->mAcch.ChkGroundHit()) { local_3c = i_this->home.pos - i_this->current.pos; @@ -908,10 +908,10 @@ static void action(e_sg_class* i_this) { if (att_flag) { fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = 0x4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(i_this, 0); - i_this->attention_info.flags = 0x0; + i_this->attention_info.flags = 0; } if (link_search_flag) { @@ -1215,7 +1215,7 @@ static int daE_SG_Create(fopAc_ac_c* i_this) { l_HIO.mUnk0 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, a_this->mpModel->getBaseTRMtx()); diff --git a/src/d/actor/d_a_e_sm.cpp b/src/d/actor/d_a_e_sm.cpp index 7f6325a18c..70359f3e51 100644 --- a/src/d/actor/d_a_e_sm.cpp +++ b/src/d/actor/d_a_e_sm.cpp @@ -2019,7 +2019,7 @@ cPhs__Step daE_SM_c::Create() { fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -800.0f, -200.0f, -800.0f); fopAcM_SetMax(this, 800.0f, 500.0f, 800.0f); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.distances[fopAc_attn_BATTLE_e] = 58; mSound.init(¤t.pos, NULL, 3, 1); diff --git a/src/d/actor/d_a_e_sm2.cpp b/src/d/actor/d_a_e_sm2.cpp index 8bc656c2ac..47d48c5236 100644 --- a/src/d/actor/d_a_e_sm2.cpp +++ b/src/d/actor/d_a_e_sm2.cpp @@ -1040,7 +1040,7 @@ static void action(e_sm2_class* i_this) { if (attn_ON) { fopAcM_OnStatus(actor, 0); - actor->attention_info.flags = 4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(actor, 0); actor->attention_info.flags = 0; diff --git a/src/d/actor/d_a_e_sw.cpp b/src/d/actor/d_a_e_sw.cpp index 4cb1fcaa31..77911c334e 100644 --- a/src/d/actor/d_a_e_sw.cpp +++ b/src/d/actor/d_a_e_sw.cpp @@ -920,7 +920,7 @@ void daE_SW_c::executeHook() { cLib_addCalcAngleS(&shape_angle.y, (s16)(field_0x6cc + field_0x6a4), 4, 0x1000, 0x100); current.angle.y = shape_angle.y; - if (!fopAcM_checkStatus(this, 0x100000)) { + if (!fopAcM_CheckStatus(this, 0x100000)) { setActionMode(7, 10); } break; @@ -1754,7 +1754,7 @@ cPhs__Step daE_SW_c::create() { l_HIO.field_0x4 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; if (mpModelMorf != NULL) { fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); @@ -2673,7 +2673,7 @@ void daE_SW_c::d_hook() { cLib_addCalcAngleS(&shape_angle.y, (s16)(field_0x6cc + field_0x6a4), 4, 0x1000, 0x100); current.angle.y = shape_angle.y; - if (!fopAcM_checkStatus(this, 0x100000)) { + if (!fopAcM_CheckStatus(this, 0x100000)) { speed.y = 20.0f; speedF = -10.0f; gravity = -5.0f; diff --git a/src/d/actor/d_a_e_th.cpp b/src/d/actor/d_a_e_th.cpp index 5020a72625..24044c94e9 100644 --- a/src/d/actor/d_a_e_th.cpp +++ b/src/d/actor/d_a_e_th.cpp @@ -642,7 +642,7 @@ static void action(e_th_class* i_this) { if (on_attention) { fopAcM_OnStatus(a_this, 0); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; diff --git a/src/d/actor/d_a_e_tk.cpp b/src/d/actor/d_a_e_tk.cpp index adc65b668b..85f0025af1 100644 --- a/src/d/actor/d_a_e_tk.cpp +++ b/src/d/actor/d_a_e_tk.cpp @@ -647,7 +647,7 @@ static int daE_TK_Execute(e_tk_class* i_this) { i_this->attention_info.flags = 0; } else { fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } MTXCopy(model->getAnmMtx(2), *calc_mtx); @@ -738,7 +738,7 @@ static int daE_TK_Create(fopAc_ac_c* i_this) { hioInit = true; l_HIO.field_0x04 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, a_this->mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -100.0f, -100.0f, -100.0f); diff --git a/src/d/actor/d_a_e_tk2.cpp b/src/d/actor/d_a_e_tk2.cpp index c4b84eeadb..d0266de628 100644 --- a/src/d/actor/d_a_e_tk2.cpp +++ b/src/d/actor/d_a_e_tk2.cpp @@ -457,7 +457,7 @@ static int daE_TK2_Execute(e_tk2_class* i_this) { i_this->attention_info.flags = 0; } else { fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } MTXCopy(model->getAnmMtx(2), *calc_mtx); @@ -540,7 +540,7 @@ static int daE_TK2_Create(fopAc_ac_c* i_this) { l_HIO.field_0x04 = -1; } - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(a_this, a_this->mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -100.0f, -100.0f, -100.0f); diff --git a/src/d/actor/d_a_e_tk_ball.cpp b/src/d/actor/d_a_e_tk_ball.cpp index bb057e02f5..babe9f9277 100644 --- a/src/d/actor/d_a_e_tk_ball.cpp +++ b/src/d/actor/d_a_e_tk_ball.cpp @@ -143,7 +143,7 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) { dAttention_c* attention = dComIfGp_getAttention(); if (attention->Lockon() && parent_actor == attention->LockonTarget(0)) { actor_lockon = true; - parent_actor->attention_info.flags |= 0x200000; + parent_actor->attention_info.flags |= fopAc_AttnFlag_UNK_0x200000; } } if (i_this->mTgSph.ChkTgHit() || i_this->mAtSph.ChkAtShieldHit()) { diff --git a/src/d/actor/d_a_e_vt.cpp b/src/d/actor/d_a_e_vt.cpp index 5b1570dd5a..c1f87974cc 100644 --- a/src/d/actor/d_a_e_vt.cpp +++ b/src/d/actor/d_a_e_vt.cpp @@ -1796,7 +1796,7 @@ void daE_VA_c::executeClearWait() { /* fallthrough */ case 0: setBck(ANM_INVI_WAIT_e, J3DFrameCtrl::EMode_LOOP, 20.0f, 1.0f); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mMode = 2; /* fallthrough */ case 2: @@ -1902,7 +1902,7 @@ void daE_VA_c::executeTransWait() { case 0: Z2GetAudioMgr()->changeSubBgmStatus(2); mAlphaType = 1; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; speedF = 0.0f; mMode = 1; setBck(ANM_TRANS_WAIT_e, J3DFrameCtrl::EMode_LOOP, 10.0f, 1.0f); @@ -2259,7 +2259,7 @@ void daE_VA_c::executeOpaciWait() { mKankyoColBlend = 1.0f; mKankyoColType = 1; field_0x1354 = 10; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mFadeAwayTimer = l_HIO.mFadeAwayTime; speedF = 0.0f; @@ -2344,7 +2344,7 @@ void daE_VA_c::executeOpaciWait() { dComIfGp_event_reset(); mFadeAwayTimer = l_HIO.mFadeAwayTime; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; setBck(ANM_SUBS_WAIT_e, J3DFrameCtrl::EMode_LOOP, 3.0f, 1.0f); mMode = 15; mDemoModeTimer = 30; @@ -2653,7 +2653,7 @@ void daE_VA_c::executeOpaciChase() { } else { if (abs((s16)(field_0x1334 - field_0x1330)) <= abs(field_0x1336)) { mMode = 12; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; } } } @@ -2776,7 +2776,7 @@ void daE_VA_c::executeOpaciDown() { mMode = 2; speedF = 0.0f; field_0x1383 = 0; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mSound.startCreatureVoice(Z2SE_EN_VA_V_DMG_L, -1); dComIfGs_onOneZoneSwitch(6, fopAcM_GetRoomNo(this)); /* fallthrough */ diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index 798ea8a6b2..979ffe4ecc 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -2185,7 +2185,7 @@ static void action(e_wb_class* i_this) { i_this->field_0x9c4.Init(0xdc, 0, i_this); } - i_this->attention_info.flags &= 0xffffff7f; + i_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; if (lbl_244_bss_45 != 0) { if (i_this->field_0x7a7 == 0) { @@ -2269,14 +2269,14 @@ static void action(e_wb_class* i_this) { int target_angle = abs(ang); if (target_angle < 0x6000 && target_angle > 0x3000) { - i_this->attention_info.flags |= 0x80; + i_this->attention_info.flags |= fopAc_AttnFlag_ETC_e; } else { - i_this->attention_info.flags &= 0xffffff7f; + i_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } } } } else { - i_this->attention_info.flags &= 0xffffff7f; + i_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } } @@ -2603,7 +2603,7 @@ static int daE_WB_Create(fopAc_ac_c* a_this) { fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = 4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; i_this->attention_info.distances[7] = 0xe; fopAcM_SetMtx(i_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); diff --git a/src/d/actor/d_a_e_ws.cpp b/src/d/actor/d_a_e_ws.cpp index 6e860cada8..6f7b0f20f9 100644 --- a/src/d/actor/d_a_e_ws.cpp +++ b/src/d/actor/d_a_e_ws.cpp @@ -932,7 +932,7 @@ int daE_WS_c::create() { mBodyScale = 0.8f; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_e_ww.cpp b/src/d/actor/d_a_e_ww.cpp index 66114ac005..53c676837e 100644 --- a/src/d/actor/d_a_e_ww.cpp +++ b/src/d/actor/d_a_e_ww.cpp @@ -1922,9 +1922,9 @@ void daE_WW_c::action() { lin_chk.Set(&dComIfGp_getCamera(0)->lookat.eye, &attention_info.position, this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } else { - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } } @@ -2309,7 +2309,7 @@ int daE_WW_c::create() { mCcStts.Init(0xFE, 0, this); field_0x75d = 1; - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; mSph1[0].Set(cc_ww_src); mSph1[0].SetStts(&mCcStts); mSph1[1].Set(cc_ww_src); diff --git a/src/d/actor/d_a_e_yc.cpp b/src/d/actor/d_a_e_yc.cpp index b1b342490e..99171e14fa 100644 --- a/src/d/actor/d_a_e_yc.cpp +++ b/src/d/actor/d_a_e_yc.cpp @@ -836,7 +836,7 @@ static cPhs__Step daE_YC_Create(fopAc_ac_c* i_this) { _this->mCounter = cM_rndF(0xffff); _this->mAction = e_yc_class::ACT_FLY; - _this->attention_info.flags = 4; + _this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; _this->attention_info.distances[fopAc_attn_BATTLE_e] = 26; daE_YC_Execute(_this); diff --git a/src/d/actor/d_a_e_yd.cpp b/src/d/actor/d_a_e_yd.cpp index 4295a34932..6872f26a0a 100644 --- a/src/d/actor/d_a_e_yd.cpp +++ b/src/d/actor/d_a_e_yd.cpp @@ -1060,10 +1060,10 @@ static void action(e_yd_class* i_this) { if (unkFlag1) { fopAcM_OnStatus(enemy, 0); - enemy->attention_info.flags = 0x4; + enemy->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(enemy, 0); - enemy->attention_info.flags = 0x0; + enemy->attention_info.flags = 0; } if (!unusedFlag) { @@ -1443,7 +1443,7 @@ static int daE_YD_Create(fopAc_ac_c* i_this) { l_HIO.field_0x4 = -1; } - i_this->attention_info.flags = 0x4; + i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(i_this, ((e_yd_class*)i_this)->mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(i_this, -300.0f, -400.0f, -300.0f); diff --git a/src/d/actor/d_a_e_yk.cpp b/src/d/actor/d_a_e_yk.cpp index 08263f6e1d..35177bea85 100644 --- a/src/d/actor/d_a_e_yk.cpp +++ b/src/d/actor/d_a_e_yk.cpp @@ -1313,7 +1313,7 @@ static int daE_YK_Execute(e_yk_class* i_this) { mDoMtx_stack_c::multVecZero(&_this->current.pos); } else { if (_this->health > 0 && i_this->mDeathFlag == 0 && player->current.pos.y < _this->current.pos.y) { - _this->attention_info.flags = 4; + _this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OffStatus(i_this,0); _this->attention_info.flags = 0; @@ -1531,7 +1531,7 @@ static int daE_YK_Create(fopAc_ac_c* i_this) { l_HIO.field_0x04 = -1; } - yk->attention_info.flags = 4; + yk->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(yk,yk->mpMorfSO->getModel()->getBaseTRMtx()); fopAcM_SetMin(yk,-200.0f,-200.0f,-200.0f); diff --git a/src/d/actor/d_a_e_ymb.cpp b/src/d/actor/d_a_e_ymb.cpp index b4d471ca28..b3f7ce1c8b 100644 --- a/src/d/actor/d_a_e_ymb.cpp +++ b/src/d/actor/d_a_e_ymb.cpp @@ -2257,7 +2257,7 @@ void daE_YMB_c::demo_skip(int param_1) { dComIfGp_getVibration().StopQuake(31); // fallthrough case 2: - attention_info.flags &= 0xFFBFFFFF; + attention_info.flags &= ~fopAc_AttnFlag_UNK_0x400000; setActionMode(1, 1); field_0x764 = 1; speedF = 0.0f; @@ -2668,7 +2668,7 @@ void daE_YMB_c::executeBattleDemo() { switch (mMode) { case 0: mMode = 1; - attention_info.flags |= 0x400000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x400000; // fallthrough case 1: if (!eventInfo.checkCommandDemoAccrpt()) { @@ -2771,7 +2771,7 @@ void daE_YMB_c::executeBattleDemo() { camera->mCamera.Start(); camera->mCamera.SetTrimSize(0); dComIfGp_event_reset(); - attention_info.flags &= 0xFFBFFFFF; + attention_info.flags &= ~fopAc_AttnFlag_UNK_0x400000; setActionMode(1, 1); field_0x764 = 1; } @@ -3140,9 +3140,9 @@ int daE_YMB_c::execute() { } if (field_0x764 == 0 || !field_0x6d8 || mAction == 9) { - attention_info.flags &= 0xfffffffb; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } else { - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } action(); @@ -3269,7 +3269,7 @@ cPhs__Step daE_YMB_c::create() { l_HIO.field_0x4 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; attention_info.field_0xa = 0x50; fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -400.0f, -400.0f, -400.0f); diff --git a/src/d/actor/d_a_e_yr.cpp b/src/d/actor/d_a_e_yr.cpp index fdb104b141..486ad7c9c8 100644 --- a/src/d/actor/d_a_e_yr.cpp +++ b/src/d/actor/d_a_e_yr.cpp @@ -2080,7 +2080,7 @@ static int daE_Yr_Execute(e_yr_class* i_this) { } } - actor->attention_info.flags = 0x4; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_OnStatus(actor, 0); diff --git a/src/d/actor/d_a_e_zh.cpp b/src/d/actor/d_a_e_zh.cpp index cd0c52476d..cdd60bf0d0 100644 --- a/src/d/actor/d_a_e_zh.cpp +++ b/src/d/actor/d_a_e_zh.cpp @@ -660,7 +660,7 @@ void daE_ZH_c::mStartParticleSet() { } fopAcM_OnStatus(this, 0); - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; mSound.startCreatureSound(Z2SE_EN_ZH_START, 0, -1); setBck(BCK_ZH_START, 0, 3.0f, 1.0f); } @@ -831,7 +831,7 @@ void daE_ZH_c::executeWait() { case 0: attention_info.distances[2] = 3; fopAcM_OnStatus(this, 0); - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; setBck(BCK_ZH_WAIT01, 0, 3.0f, 1.0f); field_0x78c = 0; mMoveMode = 1; @@ -886,7 +886,7 @@ void daE_ZH_c::executeBallWait() { case 1: if (bitSw != 0xFF && fopAcM_isSwitch(this, bitSw) && mStartFlag != 0) { fopAcM_OnStatus(this, 0); - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 3; mMoveMode = 10; } @@ -1518,7 +1518,7 @@ void daE_ZH_c::executeCatchFlyMove() { // fallthrough case 12: fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 0; for (int i = 0; i < 3; i++) { @@ -1661,7 +1661,7 @@ void daE_ZH_c::executeFlyDelete() { switch (mMoveMode) { case 0: fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 0; if (bitSw != 0xFF && fopAcM_isSwitch(this, bitSw)) { @@ -1684,7 +1684,7 @@ void daE_ZH_c::executeFlyDelete() { if (fabsf(current.pos.y - (fopAcM_rc_c::getRoofY() + 200.0f)) < 20.0f) { fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 0; if (arg0 == 0) { @@ -2228,7 +2228,7 @@ cPhs__Step daE_ZH_c::create() { if (arg0 == 2) { fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; attention_info.distances[2] = 0; fopAcM_SetGroup(this, 0); fopAcM_SetMin(this, -2000.0f, -2000.0f, -2000.0f); @@ -2262,7 +2262,7 @@ cPhs__Step daE_ZH_c::create() { l_HIO.field_0x4 = -1; } - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -20000.0f, -20000.0f, -20000.0f); fopAcM_SetMax(this, 20000.0f, 20000.0f, 20000.0f); @@ -2295,7 +2295,7 @@ cPhs__Step daE_ZH_c::create() { shape_angle.x = 0; attention_info.distances[2] = 3; fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; for (int i = 0; i < 8; i++) { field_0x758[i] = 0xFF; @@ -2323,7 +2323,7 @@ cPhs__Step daE_ZH_c::create() { field_0x78c = 0; attention_info.distances[2] = 3; fopAcM_OffStatus(this, 0); - attention_info.flags &= 0xFFFFFFFB; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; if (fopAcM_GetRoomNo(this) == 0x33 && !fopAcM_isSwitch(this, 18)) { fopAcM_OnStatus(this, fopAcM_STATUS_UNK_004000); diff --git a/src/d/actor/d_a_e_zs.cpp b/src/d/actor/d_a_e_zs.cpp index 5a45817595..8831aaff60 100644 --- a/src/d/actor/d_a_e_zs.cpp +++ b/src/d/actor/d_a_e_zs.cpp @@ -551,7 +551,7 @@ int daE_ZS_c::create() { } OS_REPORT("arg0 %d\n", field_0x672); - attention_info.flags = 4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f); diff --git a/src/d/actor/d_a_ep.cpp b/src/d/actor/d_a_ep.cpp index c1c9207437..eca3869cc1 100644 --- a/src/d/actor/d_a_ep.cpp +++ b/src/d/actor/d_a_ep.cpp @@ -295,7 +295,7 @@ static void hahen_move(ep_class* i_this) { for (int j = 0; j < 6; j++, epHahenS++) { local_d8 = player->current.pos - epHahenS->field_0x4; if (local_d8.abs() < fVar1) { - cLib_onBit(a_this->attention_info.flags, 0x80); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_ETC_e); a_this->current.pos = epHahenS->field_0x4; a_this->attention_info.position = a_this->eyePos = a_this->current.pos; a_this->current.angle = a_this->shape_angle = epHahenS->field_0x28; @@ -313,7 +313,7 @@ static void hahen_move(ep_class* i_this) { fVar1 += 20.0f; } } else { - cLib_offBit(a_this->attention_info.flags, 0x80); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_ETC_e); i_this->mHahen[i_this->field_0xa78].field_0x97 = 3; i_this->mHahen[i_this->field_0xa78].field_0x4 = a_this->current.pos; i_this->mHahen[i_this->field_0xa78].field_0x28 = a_this->shape_angle; @@ -747,7 +747,7 @@ static int daEp_Execute(ep_class* i_this) { fopAcM_OffStatus(a_this, 0); a_this->attention_info.flags = 0; - cLib_offBit(a_this->attention_info.flags, 4); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_BATTLE_e); if (i_this->field_0xa79 == 1) { i_this->field_0xa79 = 2; diff --git a/src/d/actor/d_a_fr.cpp b/src/d/actor/d_a_fr.cpp index 82e34a6945..5f44fc6fca 100644 --- a/src/d/actor/d_a_fr.cpp +++ b/src/d/actor/d_a_fr.cpp @@ -608,15 +608,11 @@ static int message(fr_class* i_this) { if ((i_this->field_0x991 == 2 && i_this->field_0x994 != -1) && daPy_py_c::checkNowWolf()) { fopAcM_OnStatus(i_this, 0); - cLib_onBit(i_this->attention_info.flags, 10); + cLib_onBit(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); i_this->eventInfo.onCondition(1); } else { fopAcM_OffStatus(i_this, 0); -#if DEBUG - cLib_offBit(i_this->attention_info.flags, 0x42); -#else - cLib_offBit(i_this->attention_info.flags, 0xa); -#endif + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } return 0; diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp index 1dbfadab5a..40d6b89849 100644 --- a/src/d/actor/d_a_horse.cpp +++ b/src/d/actor/d_a_horse.cpp @@ -1403,7 +1403,7 @@ void daHorse_c::acceptPlayerRide() { if (!checkStateFlg0(FLG0_UNK_1) && !daPy_py_c::checkNowWolf()) { int angle = fopAcM_seenPlayerAngleY(this); if (angle > 0x2800 && (!daAlink_getAlinkActorClass()->checkHorseZelda() || angle < 0x5800)) { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; } } } @@ -3575,7 +3575,7 @@ int daHorse_c::procWait() { if (!checkStateFlg0(FLG0_UNK_1)) { if (daPy_py_c::checkNowWolf()) { - attention_info.flags |= 0x8; + attention_info.flags |= fopAc_AttnFlag_SPEAK_e; eventInfo.onCondition(1); } else if (m_procID == PROC_WAIT_e) { acceptPlayerRide(); @@ -4289,7 +4289,7 @@ int daHorse_c::execute() { } m_resetStateFlg0 = 0; - attention_info.flags &= ~0x88; + attention_info.flags &= ~(fopAc_AttnFlag_ETC_e | fopAc_AttnFlag_SPEAK_e); field_0x16b6 = 0; field_0x16e8 = shape_angle.y; field_0x1710 = field_0x170e; diff --git a/src/d/actor/d_a_kytag03.cpp b/src/d/actor/d_a_kytag03.cpp index fcc666ae38..3fcc607349 100644 --- a/src/d/actor/d_a_kytag03.cpp +++ b/src/d/actor/d_a_kytag03.cpp @@ -379,13 +379,13 @@ static int daKytag03_Execute(kytag03_class* i_this) { daPy_py_c::checkNowWolf() && !var_r28) { i_this->attention_info.distances[fopAc_attn_ETC_e] = 0x3D; - a_this->attention_info.flags |= 0x80; + a_this->attention_info.flags |= fopAc_AttnFlag_ETC_e; } else { - a_this->attention_info.flags &= ~0x80; + a_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } if (i_this->field_0x588 == 1) { - a_this->attention_info.flags &= ~0x80; + a_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; i_this->field_0x587 = 1; i_this->field_0x58a = 30; } @@ -400,7 +400,7 @@ static int daKytag03_Execute(kytag03_class* i_this) { i_this->field_0x587 = 0; } } else { - a_this->attention_info.flags &= ~0x80; + a_this->attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } } diff --git a/src/d/actor/d_a_kytag05.cpp b/src/d/actor/d_a_kytag05.cpp index cebdd84566..7f1cab1d4a 100644 --- a/src/d/actor/d_a_kytag05.cpp +++ b/src/d/actor/d_a_kytag05.cpp @@ -41,7 +41,7 @@ static int daKytag05_Create(fopAc_ac_c* i_this) { if (!a_this->field_0x56c) { a_this->attention_info.distances[fopAc_attn_ETC_e] = 0x21; - a_this->attention_info.flags |= 0x80; + a_this->attention_info.flags |= fopAc_AttnFlag_ETC_e; } return cPhs_COMPLEATE_e; diff --git a/src/d/actor/d_a_mg_rod.cpp b/src/d/actor/d_a_mg_rod.cpp index 81b0d54b17..7f082cb121 100644 --- a/src/d/actor/d_a_mg_rod.cpp +++ b/src/d/actor/d_a_mg_rod.cpp @@ -4942,7 +4942,7 @@ static void play_camera(dmg_rod_class* i_this) { i_this->play_cam_center.y += (2.0f + TREG_F(17)) * cM_ssin(i_this->play_cam_timer * 1200); fopAcM_OnStatus(actor, 0); - cLib_onBit(actor->attention_info.flags, 0xA); + cLib_onBit(actor->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); cMtx_YrotS(*calc_mtx, player->shape_angle.y); if (i_this->field_0x1402 < 0) { diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp index f16b563d81..3caeb9fd51 100644 --- a/src/d/actor/d_a_midna.cpp +++ b/src/d/actor/d_a_midna.cpp @@ -2902,7 +2902,7 @@ static void* daMidna_searchNpc(fopAc_ac_c* i_actor, void* o_far) { daAlink_c* link = daAlink_getAlinkActorClass(); cXyz link_pos = link->current.pos; link_pos.y += 100.0f; - if (fopAcM_GetGroup(i_actor) == fopAc_NPC_e && !fopAcM_checkStatus(i_actor, 0x8000000) + if (fopAcM_GetGroup(i_actor) == fopAc_NPC_e && !fopAcM_CheckStatus(i_actor, 0x8000000) && fabsf(link_pos.y - i_actor->eyePos.y) <= 700.0f) { f32 dist = i_actor->eyePos.absXZ(link_pos); diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index b16928a95f..a7ac0cf31e 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -1274,9 +1274,9 @@ int daMyna_c::orderEvent() { case 13: case 14: case 15: - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } - if (attention_info.flags == 10) { + if (attention_info.flags == (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e)) { attention_info.distances[fopAc_attn_TALK_e] = 0x8B; attention_info.distances[fopAc_attn_SPEAK_e] = 0x8B; eventInfo.onCondition(1); diff --git a/src/d/actor/d_a_nbomb.cpp b/src/d/actor/d_a_nbomb.cpp index 13ab531cd0..5e67c44fa1 100644 --- a/src/d/actor/d_a_nbomb.cpp +++ b/src/d/actor/d_a_nbomb.cpp @@ -56,7 +56,7 @@ void daNbomb_c::tgHitCallback(dCcD_GObjInf* i_hitObj) { { procBoomerangMoveInit(i_hitObj); } - } else if (i_hitObj->ChkAtType(AT_TYPE_HOOKSHOT) && fopAcM_checkStatus(this, 0x80000)) { + } else if (i_hitObj->ChkAtType(AT_TYPE_HOOKSHOT) && fopAcM_CheckStatus(this, 0x80000)) { if (fopAcM_checkCarryNow(this)) { fopAcM_cancelCarryNow(this); } @@ -91,7 +91,7 @@ static void daNbomb_tgHitCallback(fopAc_ac_c* i_tgActor, dCcD_GObjInf* i_tgObjIn int daNbomb_c::searchEnemy(fopAc_ac_c* i_enemy) { mDoMtx_multVec(field_0xa70, &i_enemy->current.pos, &field_0xc14); - if (i_enemy->attention_info.flags & 5 && field_0xc14.abs2XZ() < 250000.0f && + if (i_enemy->attention_info.flags & (fopAc_AttnFlag_BATTLE_e | fopAc_AttnFlag_LOCK_e) && field_0xc14.abs2XZ() < 250000.0f && fabsf(field_0xc14.y) < 100.0f) { if (abs(field_0xc14.atan2sX_Z()) < 0x4000) { @@ -268,7 +268,7 @@ int daNbomb_c::create() { mExTime *= 0.75f; } - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAcM_OnCarryType(this, fopAcM_CARRY(fopAcM_CARRY_LIGHT | fopAcM_CARRY_SIDE)); field_0xb5c = shape_angle.y; @@ -710,7 +710,7 @@ BOOL daNbomb_c::procExplodeInit() { speed = cXyz::Zero; gravity = 0.0f; fopAcM_SetParam(this, PRM_NORMAL_BOMB_EXPLODE); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcSph.OffTgSetBit(); mCcSph.OffCoSetBit(); @@ -813,7 +813,7 @@ BOOL daNbomb_c::procCarryInit() { speedF = 0.0f; speed = cXyz::Zero; - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcSph.OffCoSetBit(); return true; } @@ -1081,14 +1081,14 @@ BOOL daNbomb_c::procWait() { if (field_0xc20.abs2() < 1.0f && field_0xc2c.abs2() < 1.0f && !checkStateFlg0(FLG0_FROZEN)) { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } else { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } } } } else { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } offStateFlg0(FLG0_UNK_20000); @@ -1101,7 +1101,7 @@ BOOL daNbomb_c::procFlowerWaitInit() { mCcSph.OnCoSetBit(); mCcSph.OffTgSetBit(); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); scale.set(0.1f, 0.1f, 0.1f); mCcStts.SetWeight(0xFE); mpModel->setBaseScale(scale); @@ -1116,7 +1116,7 @@ BOOL daNbomb_c::procFlowerWait() { scale.z = scale.x; mpModel->setBaseScale(scale); } else { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcSph.OnTgSetBit(); if (checkExplode()) { @@ -1149,7 +1149,7 @@ BOOL daNbomb_c::procBoomerangMoveInit(dCcD_GObjInf* unused) { fopAcM_SetParam(this, PRM_BOMB_BOOMERANG_MOVE); } - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcStts.SetWeight(30); mCcSph.OnCoSetBit(); mCcSph.SetCoHitCallback(daNbomb_coHitCallback); @@ -1220,7 +1220,7 @@ BOOL daNbomb_c::procInsectMoveInit() { setHitPolygon(0); mCcSph.OnCoSetBit(); mCcSph.SetCoHitCallback(daNbomb_coHitCallback); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); speedF = 20.0f; old.pos = current.pos; diff --git a/src/d/actor/d_a_ni.cpp b/src/d/actor/d_a_ni.cpp index 847a56f4d2..517e23a693 100644 --- a/src/d/actor/d_a_ni.cpp +++ b/src/d/actor/d_a_ni.cpp @@ -473,7 +473,7 @@ static void ni_carry_check(ni_class* i_this) { dComIfGp_getPlayer(0); if (fopAcM_checkCarryNow(i_this)) { - cLib_offBit(i_this->attention_info.flags, 0x10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); i_this->mAction = ACTION_CARRY_e; i_this->mMode = 0; i_this->speed.y = 0.0f; @@ -1713,10 +1713,10 @@ static void action(ni_class* i_this) { } if (var_r25) { - cLib_onBit(a_this->attention_info.flags, 0x10); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); ni_carry_check(i_this); } else { - cLib_offBit(a_this->attention_info.flags, 0x10); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); } } @@ -1945,11 +1945,11 @@ static int message(ni_class* i_this) { if (i_this->field_0xa50 == 2 && i_this->mFlowNo != -1 && daPy_py_c::checkNowWolf()) { fopAcM_OnStatus(i_this, 0); - cLib_onBit(i_this->attention_info.flags, 10); + cLib_onBit(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); i_this->eventInfo.onCondition(1); } else { fopAcM_OffStatus(i_this, 0); - cLib_offBit(i_this->attention_info.flags, 10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } return 0; diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index 904af1cf58..8b8c7d51ab 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -1940,9 +1940,9 @@ bool daNpcT_c::checkCullDraw() { /* 8014A064-8014A0B0 1449A4 004C+00 1/0 1/0 60/0 .text twilight__8daNpcT_cFv */ void daNpcT_c::twilight() { if (mTwilight) { - attention_info.flags |= 0x400000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x400000; mNoDraw = false; - attention_info.flags |= 0x800000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x800000; setHitodamaPrtcl(); } } @@ -1957,7 +1957,7 @@ void daNpcT_c::evtOrder() { mEvtId = dComIfGp_getEventManager().getEventIdx(this, mpEvtData[mEvtNo].eventName, 0xFF); fopAcM_orderOtherEventId(this, mEvtId, 0xFF, 0xFFFF, 40, 1); - } else if ((!mTwilight || daPy_py_c::checkNowWolfEyeUp()) && ((attention_info.flags & 8) || (attention_info.flags & 2))) { + } else if ((!mTwilight || daPy_py_c::checkNowWolfEyeUp()) && ((attention_info.flags & fopAc_AttnFlag_SPEAK_e) || (attention_info.flags & fopAc_AttnFlag_TALK_e))) { eventInfo.onCondition(dEvtCnd_CANTALK_e); if (chkXYItems()) { eventInfo.onCondition(dEvtCnd_CANTALKITEM_e); diff --git a/src/d/actor/d_a_npc2.cpp b/src/d/actor/d_a_npc2.cpp index 68039625f0..5845bccc87 100644 --- a/src/d/actor/d_a_npc2.cpp +++ b/src/d/actor/d_a_npc2.cpp @@ -520,7 +520,7 @@ void daBaseNpc_c::orderEvent(int param_0, char* i_evtName) { if (i_evtName != NULL) { mEvtIdx = dComIfGp_getEventManager().getEventIdx(this, i_evtName, -1); fopAcM_orderOtherEventId(this, mEvtIdx, 0xFF, 0xFFFF, 0, 1); - } else if (field_0x848 >= 0 && attention_info.flags == 10) { + } else if (field_0x848 >= 0 && attention_info.flags == (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e)) { eventInfo.onCondition(1); if (param_0 != 0) { fopAcM_orderSpeakEvent(this, 0, 0); diff --git a/src/d/actor/d_a_npc4.cpp b/src/d/actor/d_a_npc4.cpp index 1236ad347c..57cf1c20d6 100644 --- a/src/d/actor/d_a_npc4.cpp +++ b/src/d/actor/d_a_npc4.cpp @@ -573,8 +573,8 @@ BOOL daNpcF_c::execute() { setCollisions(); if (mTwilight) { - attention_info.flags |= 0x400000; - attention_info.flags |= 0x800000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x400000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x800000; setHitodamaPrtcl(); } @@ -1281,7 +1281,7 @@ void daNpcF_c::orderEvent(int i_speak, char* i_evtName, u16 param_2, u16 i_prior mEventIdx = dComIfGp_getEventManager().getEventIdx(this, i_evtName, 0xff); fopAcM_orderOtherEventId(this, mEventIdx, i_mapToolID, param_2, i_priority, i_flag); } else if (!mTwilight || daPy_py_c::checkNowWolfEyeUp()) { - if ((attention_info.flags & 8) || (attention_info.flags & 2)) { + if ((attention_info.flags & fopAc_AttnFlag_SPEAK_e) || (attention_info.flags & fopAc_AttnFlag_TALK_e)) { eventInfo.onCondition(dEvtCnd_CANTALK_e); if (i_speak) { fopAcM_orderSpeakEvent(this, 0, 0); diff --git a/src/d/actor/d_a_npc_ash.cpp b/src/d/actor/d_a_npc_ash.cpp index d7142753be..490df50634 100644 --- a/src/d/actor/d_a_npc_ash.cpp +++ b/src/d/actor/d_a_npc_ash.cpp @@ -1461,12 +1461,12 @@ static int daNpcAsh_IsDelete(void* i_this) { /* 8095BCF0-8095BF6C 003AF0 027C+00 1/0 0/0 0/0 .text setParam__10daNpcAsh_cFv */ void daNpcAsh_c::setParam() { searchActors(); - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; if (isSneaking()) { attention_info.distances[fopAc_attn_LOCK_e] = 0x4e; attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = 0x4d; - attention_info.flags |= 0x800000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x800000; } else { if (!strcmp(dComIfGp_getStartStageName(), "R_SP116")) { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(3, 6); diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp index 53cbf89812..e2d3362add 100644 --- a/src/d/actor/d_a_npc_ashB.cpp +++ b/src/d/actor/d_a_npc_ashB.cpp @@ -1192,7 +1192,7 @@ static bool daNpcAshB_IsDelete(void* param_0) { /* 80960A60-80960AE8 002D00 0088+00 1/0 0/0 0/0 .text setParam__11daNpcAshB_cFv */ void daNpcAshB_c::setParam() { - attention_info.flags = daPy_py_c::checkNowWolf() ? 0 : 10; + attention_info.flags = daPy_py_c::checkNowWolf() ? 0 : (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); attention_info.distances[0] = getDistTableIdx(daNpcAshB_Param_c::m.mTalkDistIdx,daNpcAshB_Param_c::m.mTalkAngleIdx); attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = getDistTableIdx(daNpcAshB_Param_c::m.mSpeakDistIdx,daNpcAshB_Param_c::m.mSpeakAngleIdx); diff --git a/src/d/actor/d_a_npc_besu.cpp b/src/d/actor/d_a_npc_besu.cpp index 9bbdfc7100..f9ad9f8e66 100644 --- a/src/d/actor/d_a_npc_besu.cpp +++ b/src/d/actor/d_a_npc_besu.cpp @@ -1025,7 +1025,7 @@ void daNpc_Besu_c::setParam() { selectAction(); srchActors(); - u32 att_flags = 10; + u32 att_flags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); s16 talk_dist = daNpc_Besu_Param_c::m.common.talk_distance; s16 talk_ang = daNpc_Besu_Param_c::m.common.talk_angle; s16 att_dist = daNpc_Besu_Param_c::m.common.attention_distance; diff --git a/src/d/actor/d_a_npc_bou.cpp b/src/d/actor/d_a_npc_bou.cpp index d1a878e2aa..a08fbcdf41 100644 --- a/src/d/actor/d_a_npc_bou.cpp +++ b/src/d/actor/d_a_npc_bou.cpp @@ -432,7 +432,7 @@ void daNpc_Bou_c::afterJntAnm(int param_1) { void daNpc_Bou_c::setParam() { selectAction(); srchActors(); - u32 uVar7 = 10; + u32 uVar7 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); s16 sVar10 = daNpc_Bou_Param_c::m.field_0x48; s16 sVar9 = daNpc_Bou_Param_c::m.field_0x4a; s16 sVar8 = daNpc_Bou_Param_c::m.field_0x4c; @@ -460,7 +460,7 @@ void daNpc_Bou_c::setParam() { attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = daNpcT_getDistTableIdx(sVar10, sVar9); if (mType == TYPE_1) { - uVar7 |= (0x80 << 16); + uVar7 |= fopAc_AttnFlag_UNK_0x800000; field_0xfdc = getActorDistance(daPy_getPlayerActorClass(), daNpcT_getDistTableIdx(field_0xfe0, field_0xfe4), attention_info.distances[1]); diff --git a/src/d/actor/d_a_npc_coach.cpp b/src/d/actor/d_a_npc_coach.cpp index c9713ea352..97157fcf51 100644 --- a/src/d/actor/d_a_npc_coach.cpp +++ b/src/d/actor/d_a_npc_coach.cpp @@ -878,7 +878,7 @@ void daNpcCoach_c::setCoachBlazing(u8 param_1) { uVar1 = 5; mCoachBlazing = true; uVar2 = 0; - attention_info.flags = 0x101; + attention_info.flags = fopAc_AttnFlag_CHECK_e | fopAc_AttnFlag_LOCK_e; } else { uVar1 = 2; param_1 = 0; diff --git a/src/d/actor/d_a_npc_doorboy.cpp b/src/d/actor/d_a_npc_doorboy.cpp index e5b7dadf5b..c1316fa139 100644 --- a/src/d/actor/d_a_npc_doorboy.cpp +++ b/src/d/actor/d_a_npc_doorboy.cpp @@ -823,7 +823,7 @@ void daNpcDoorBoy_c::setParam() { attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = getDistTableIdx(daNpcDoorBoy_Param_c::m.common.talk_distance, daNpcDoorBoy_Param_c::m.common.talk_angle); - attention_info.flags = daPy_py_c::checkNowWolf() ? 0 : 10; + attention_info.flags = daPy_py_c::checkNowWolf() ? 0 : (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); scale.setall(daNpcDoorBoy_Param_c::m.common.scale); mAcchCir.SetWallR(daNpcDoorBoy_Param_c::m.common.width); mAcchCir.SetWallH(daNpcDoorBoy_Param_c::m.common.knee_length); diff --git a/src/d/actor/d_a_npc_fairy_seirei.cpp b/src/d/actor/d_a_npc_fairy_seirei.cpp index f3a5418292..3532685dc7 100644 --- a/src/d/actor/d_a_npc_fairy_seirei.cpp +++ b/src/d/actor/d_a_npc_fairy_seirei.cpp @@ -170,7 +170,7 @@ void daNpc_FairySeirei_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = 0x27; attention_info.distances[fopAc_attn_TALK_e] = 0x27; attention_info.distances[fopAc_attn_SPEAK_e] = 0x27; - attention_info.flags = 8; + attention_info.flags = fopAc_AttnFlag_SPEAK_e; mCcStts.SetWeight(daNpc_FairySeirei_Param_c::m[4]); mCylH = daNpc_FairySeirei_Param_c::m[5]; mWallR = daNpc_FairySeirei_Param_c::m[7]; diff --git a/src/d/actor/d_a_npc_grc.cpp b/src/d/actor/d_a_npc_grc.cpp index f60eaaca42..13d7a2a126 100644 --- a/src/d/actor/d_a_npc_grc.cpp +++ b/src/d/actor/d_a_npc_grc.cpp @@ -483,7 +483,7 @@ int daNpc_grC_c::ctrlJointCallBack(J3DJoint* i_joint, int param_2) { /* 809CC12C-809CC26C 000D4C 0140+00 1/0 0/0 0/0 .text setParam__11daNpc_grC_cFv */ void daNpc_grC_c::setParam() { ActionFn action = mNextAction; - u32 uVar1 = 10; + u32 uVar1 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); selectAction(); if (!mTwilight && daPy_py_c::checkNowWolf()) { diff --git a/src/d/actor/d_a_npc_grmc.cpp b/src/d/actor/d_a_npc_grmc.cpp index 97b2d4b204..8ba453628c 100644 --- a/src/d/actor/d_a_npc_grmc.cpp +++ b/src/d/actor/d_a_npc_grmc.cpp @@ -420,7 +420,7 @@ void daNpc_grMC_c::afterJntAnm(int param_1) { /* 809D7DD4-809D7F28 000AB4 0154+00 1/0 0/0 0/0 .text setParam__12daNpc_grMC_cFv */ void daNpc_grMC_c::setParam() { - u32 uVar1 = 10; + u32 uVar1 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); if (field_0x10dc != 0) { if (field_0x10d8 == 2) { diff --git a/src/d/actor/d_a_npc_grr.cpp b/src/d/actor/d_a_npc_grr.cpp index f51a9edab1..9a5703bcd5 100644 --- a/src/d/actor/d_a_npc_grr.cpp +++ b/src/d/actor/d_a_npc_grr.cpp @@ -460,7 +460,7 @@ int daNpc_grR_c::ctrlJointCallBack(J3DJoint* i_joint, int param_2) { /* 809E0780-809E08FC 000FA0 017C+00 1/0 0/0 0/0 .text setParam__11daNpc_grR_cFv */ void daNpc_grR_c::setParam() { actionFunc action = mNextAction; - u32 uVar1 = 10; + u32 uVar1 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); selectAction(); if (!mTwilight && daPy_py_c::checkNowWolf()) { diff --git a/src/d/actor/d_a_npc_hanjo.cpp b/src/d/actor/d_a_npc_hanjo.cpp index c539a69996..1a4ad8eb29 100644 --- a/src/d/actor/d_a_npc_hanjo.cpp +++ b/src/d/actor/d_a_npc_hanjo.cpp @@ -477,7 +477,7 @@ void daNpc_Hanjo_c::setParam() { attention_info.distances[0] = daNpcT_getDistTableIdx(sVar4, sVar1); attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = daNpcT_getDistTableIdx(sVar6, sVar5); - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; scale.set(daNpc_Hanjo_Param_c::m.field_0x08, daNpc_Hanjo_Param_c::m.field_0x08, daNpc_Hanjo_Param_c::m.field_0x08); mCcStts.SetWeight(daNpc_Hanjo_Param_c::m.field_0x10); diff --git a/src/d/actor/d_a_npc_henna.cpp b/src/d/actor/d_a_npc_henna.cpp index 4475afb759..65b42b5e5e 100644 --- a/src/d/actor/d_a_npc_henna.cpp +++ b/src/d/actor/d_a_npc_henna.cpp @@ -280,10 +280,10 @@ static void message_shop(npc_henna_class* i_this) { } if (i_this->field_0x750 != 0) { fopAcM_OffStatus(&i_this->actor, NULL); - cLib_offBit(i_this->actor.attention_info.flags, (u32)0xa); + cLib_offBit(i_this->actor.attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } else { fopAcM_OnStatus(&i_this->actor, 0); - cLib_onBit(i_this->actor.attention_info.flags, (u32)0xa); + cLib_onBit(i_this->actor.attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); i_this->actor.attention_info.distances[1] = 4; i_this->actor.attention_info.distances[3] = 4; i_this->actor.eventInfo.onCondition(1); @@ -2196,14 +2196,6 @@ static void demo_camera_shop(npc_henna_class* i_this) { static u8 lbl_82_bss_289; -#ifdef DEBUG -#define ATTN_FLAGS ((u32)0x42) -#define ATTN_DIST_INDEX 6 -#else -#define ATTN_FLAGS ((u32)0xa) -#define ATTN_DIST_INDEX 3 -#endif - /* 805483F4-80548640 0055D4 024C+00 1/1 0/0 0/0 .text message_guide__FP15npc_henna_class */ static void message_guide(npc_henna_class* i_this) { @@ -2217,9 +2209,9 @@ static void message_guide(npc_henna_class* i_this) { if (i_this->field_0x5b5 == 2 && i_this->field_0x5ba != -1) { fopAcM_OnStatus(actor, 0); - cLib_onBit(actor->attention_info.flags, ATTN_FLAGS); + cLib_onBit(actor->attention_info.flags, (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e)); actor->attention_info.distances[1] = 2; - actor->attention_info.distances[ATTN_DIST_INDEX] = 2; + actor->attention_info.distances[fopAc_attn_SPEAK_e] = 2; actor->eventInfo.onCondition(dEvtCnd_CANTALK_e); @@ -2267,7 +2259,7 @@ static void message_guide(npc_henna_class* i_this) { } } else { fopAcM_OffStatus(actor, 0); - cLib_offBit(actor->attention_info.flags, ATTN_FLAGS); + cLib_offBit(actor->attention_info.flags, (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e)); if (i_this->field_0x7e1 == 0) { i_this->mIsTalking = 0; @@ -2729,7 +2721,7 @@ static int daNpc_Henna_Create(fopAc_ac_c* i_this) { // "Henna" l_HIO.field_0x4 = mDoHIO_CREATE_CHILD("ヘナさま", &l_HIO); } - i_this->attention_info.flags = ATTN_FLAGS; + i_this->attention_info.flags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); a_this->field_0x6a2 = 0; fopAcM_SetMtx(i_this, a_this->mpMorf->getModel()->getBaseTRMtx()); lbl_82_bss_90 = 0; diff --git a/src/d/actor/d_a_npc_impal.cpp b/src/d/actor/d_a_npc_impal.cpp index 810ab5c0dc..46a70f301e 100644 --- a/src/d/actor/d_a_npc_impal.cpp +++ b/src/d/actor/d_a_npc_impal.cpp @@ -1117,7 +1117,7 @@ void daNpcImpal_c::setParam() { getDistTableIdx(daNpcImpal_Param_c::m.mSpeakDistIdx, daNpcImpal_Param_c::m.mSpeakAngleIdx); if (field_0xde9) { - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } else { attention_info.flags = 0; } diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 409d3e352b..857d329b0d 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -535,7 +535,7 @@ void daNpc_Jagar_c::afterJntAnm(int param_1) { void daNpc_Jagar_c::setParam() { selectAction(); srchActors(); - u32 uVar7 = 10; + u32 uVar7 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); s16 sVar10 = daNpc_Jagar_Param_c::m.field_0x48; s16 sVar9 = daNpc_Jagar_Param_c::m.field_0x4a; s16 sVar8 = daNpc_Jagar_Param_c::m.field_0x4c; @@ -571,7 +571,7 @@ void daNpc_Jagar_c::setParam() { attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(sVar10, sVar9); if (mType == TYPE_1) { - uVar7 |= (0x80 << 16); + uVar7 |= fopAc_AttnFlag_UNK_0x800000; field_0xfec = getActorDistance(daPy_getPlayerActorClass(), daNpcT_getDistTableIdx(field_0xff0, field_0xff4), attention_info.distances[1]); @@ -582,7 +582,7 @@ void daNpc_Jagar_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = 20; attention_info.distances[fopAc_attn_TALK_e] = 20; attention_info.distances[fopAc_attn_SPEAK_e] = 20; - uVar7 = 2; + uVar7 = fopAc_AttnFlag_TALK_e; } attention_info.flags = uVar7; diff --git a/src/d/actor/d_a_npc_kasi_hana.cpp b/src/d/actor/d_a_npc_kasi_hana.cpp index 0985268dca..39497000fe 100644 --- a/src/d/actor/d_a_npc_kasi_hana.cpp +++ b/src/d/actor/d_a_npc_kasi_hana.cpp @@ -811,7 +811,7 @@ void daNpcKasiHana_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(daNpcKasiHana_Param_c::m.common.attention_distance, daNpcKasiHana_Param_c::m.common.attention_angle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = getDistTableIdx(daNpcKasiHana_Param_c::m.common.talk_distance, daNpcKasiHana_Param_c::m.common.talk_angle); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } /* 80A1CA60-80A1CD28 001BA0 02C8+00 1/0 0/0 0/0 .text main__15daNpcKasiHana_cFv */ diff --git a/src/d/actor/d_a_npc_kasi_kyu.cpp b/src/d/actor/d_a_npc_kasi_kyu.cpp index a8d9765edc..16ad9ac9dd 100644 --- a/src/d/actor/d_a_npc_kasi_kyu.cpp +++ b/src/d/actor/d_a_npc_kasi_kyu.cpp @@ -360,7 +360,7 @@ void daNpcKasiKyu_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(daNpcKasiKyu_Param_c::m.common.attention_distance, daNpcKasiKyu_Param_c::m.common.attention_angle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = getDistTableIdx(daNpcKasiKyu_Param_c::m.common.talk_distance, daNpcKasiKyu_Param_c::m.common.talk_angle); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } /* 80A26060-80A26064 000058 0004+00 1/2 0/0 0/0 .bss mTargetTag__14daNpcKasiKyu_c */ diff --git a/src/d/actor/d_a_npc_kasi_mich.cpp b/src/d/actor/d_a_npc_kasi_mich.cpp index 23878b97bc..b8b08a0a10 100644 --- a/src/d/actor/d_a_npc_kasi_mich.cpp +++ b/src/d/actor/d_a_npc_kasi_mich.cpp @@ -360,7 +360,7 @@ void daNpcKasiMich_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(daNpcKasiMich_Param_c::m.common.attention_distance, daNpcKasiMich_Param_c::m.common.attention_angle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = getDistTableIdx(daNpcKasiMich_Param_c::m.common.talk_distance, daNpcKasiMich_Param_c::m.common.talk_angle); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } /* 80A2A7F0-80A2A7F4 000058 0004+00 1/2 0/0 0/0 .bss mTargetTag__15daNpcKasiMich_c */ diff --git a/src/d/actor/d_a_npc_kn.cpp b/src/d/actor/d_a_npc_kn.cpp index f60111ded2..be42a4b7f3 100644 --- a/src/d/actor/d_a_npc_kn.cpp +++ b/src/d/actor/d_a_npc_kn.cpp @@ -891,7 +891,7 @@ void daNpc_Kn_c::setParam() { attention_info.distances[fopAc_attn_BATTLE_e] = daNpcT_getDistTableIdx(attention_distance, attention_angle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(talk_distance, talk_angle); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; mAcchCir.SetWallR(daNpc_Kn_Param_c::m.common.width); mAcchCir.SetWallH(daNpc_Kn_Param_c::m.common.knee_length); @@ -923,7 +923,7 @@ u32 daNpc_Kn_c::setParamTeach03() { mAcchCir.SetWallR(135.0f); mAcchCir.SetWallH(daNpc_Kn_Param_c::m.common.knee_length); - return 4; + return fopAc_AttnFlag_BATTLE_e; } /* 80A2C044-80A2C0FC 001724 00B8+00 1/1 0/0 0/0 .text setParamTeach04__10daNpc_Kn_cFv */ @@ -941,10 +941,10 @@ u32 daNpc_Kn_c::setParamTeach04() { if (mActionMode == 10 || mActionMode == 11) { mAcchCir.SetWallR(135.0f); mAcchCir.SetWallH(daNpc_Kn_Param_c::m.common.knee_length); - return 4; + return fopAc_AttnFlag_BATTLE_e; } - return 0x200004; + return (fopAc_AttnFlag_UNK_0x200000 | fopAc_AttnFlag_BATTLE_e); } /* 80A2C0FC-80A2C190 0017DC 0094+00 3/3 0/0 0/0 .text setParamTeach05__10daNpc_Kn_cFv */ @@ -961,7 +961,7 @@ u32 daNpc_Kn_c::setParamTeach05() { mAcchCir.SetWallR(135.0f); mAcchCir.SetWallH(daNpc_Kn_Param_c::m.common.knee_length); - return 4; + return fopAc_AttnFlag_BATTLE_e; } /* 80A2C190-80A2C1B0 001870 0020+00 1/1 0/0 0/0 .text setParamTeach06__10daNpc_Kn_cFv */ diff --git a/src/d/actor/d_a_npc_kn_base.inc b/src/d/actor/d_a_npc_kn_base.inc index 94ca72f060..a1fd61ff63 100644 --- a/src/d/actor/d_a_npc_kn_base.inc +++ b/src/d/actor/d_a_npc_kn_base.inc @@ -769,9 +769,9 @@ bool daNpc_Kn_c::checkCullDraw() { /* 80A3A25C-80A3A2A8 00F93C 004C+00 1/0 0/0 0/0 .text twilight__10daNpc_Kn_cFv */ void daNpc_Kn_c::twilight() { if (mTwilight) { - attention_info.flags |= 0x400000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x400000; mNoDraw = FALSE; - attention_info.flags |= 0x800000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x800000; setHitodamaPrtcl(); } } @@ -789,7 +789,7 @@ void daNpc_Kn_c::evtOrder() { } else { u32 flag_check = attention_info.flags; - if (flag_check & 8 || flag_check & 2) { + if (flag_check & fopAc_AttnFlag_SPEAK_e || flag_check & fopAc_AttnFlag_TALK_e) { eventInfo.onCondition(dEvtCnd_CANTALK_e); if (chkXYItems()) { diff --git a/src/d/actor/d_a_npc_kn_teach01.inc b/src/d/actor/d_a_npc_kn_teach01.inc index 06c4107147..886746cec9 100644 --- a/src/d/actor/d_a_npc_kn_teach01.inc +++ b/src/d/actor/d_a_npc_kn_teach01.inc @@ -25,7 +25,7 @@ u32 daNpc_Kn_c::setParamTeach01() { attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(talk_distance, talk_angle); mAcchCir.SetWallR(daNpc_Kn_Param_c::m.common.width); mAcchCir.SetWallH(daNpc_Kn_Param_c::m.common.knee_length); - return 4; + return fopAc_AttnFlag_BATTLE_e; case 3: attention_info.distances[fopAc_attn_LOCK_e] = daNpcT_getDistTableIdx(attention_distance, attention_angle); attention_info.distances[fopAc_attn_BATTLE_e] = 0xe4; @@ -33,10 +33,10 @@ u32 daNpc_Kn_c::setParamTeach01() { attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(talk_distance, talk_angle); mAcchCir.SetWallR(135.0f); mAcchCir.SetWallH(daNpc_Kn_Param_c::m.common.knee_length); - return 4; + return fopAc_AttnFlag_BATTLE_e; } - return 10; + return (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } /* 80A3CB14-80A3CBFC 0121F4 00E8+00 1/1 0/0 0/0 .text setCollisionTeach01__10daNpc_Kn_cFv diff --git a/src/d/actor/d_a_npc_kn_teach02.inc b/src/d/actor/d_a_npc_kn_teach02.inc index a7e93732be..b0fe5ce470 100644 --- a/src/d/actor/d_a_npc_kn_teach02.inc +++ b/src/d/actor/d_a_npc_kn_teach02.inc @@ -30,9 +30,9 @@ u32 daNpc_Kn_c::setParamTeach02() { f32 absxz = (daPy_getPlayerActorClass()->current.pos - pos).absXZ(); if (absxz < 255.0f) { - return 0x200004; + return fopAc_AttnFlag_UNK_0x200000 | fopAc_AttnFlag_BATTLE_e; } else { - return 4; + return fopAc_AttnFlag_BATTLE_e; } } case 4: @@ -45,7 +45,7 @@ u32 daNpc_Kn_c::setParamTeach02() { return 0; } - return 10; + return (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } /* 80A3EE38-80A3EF1C 014518 00E4+00 1/1 0/0 0/0 .text setCollisionTeach02__10daNpc_Kn_cFv diff --git a/src/d/actor/d_a_npc_kolin.cpp b/src/d/actor/d_a_npc_kolin.cpp index 60192768ca..dc548e8710 100644 --- a/src/d/actor/d_a_npc_kolin.cpp +++ b/src/d/actor/d_a_npc_kolin.cpp @@ -793,7 +793,7 @@ void daNpc_Kolin_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = daNpcT_getDistTableIdx(attention_distance, attention_angle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(talk_distance, talk_angle); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; if (mType == 4) { fopAcM_OffStatus(this, fopAcM_STATUS_UNK_000100); diff --git a/src/d/actor/d_a_npc_kolinb.cpp b/src/d/actor/d_a_npc_kolinb.cpp index 01c443c6ba..6874676124 100644 --- a/src/d/actor/d_a_npc_kolinb.cpp +++ b/src/d/actor/d_a_npc_kolinb.cpp @@ -492,7 +492,7 @@ void daNpc_Kolinb_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = daNpcT_getDistTableIdx(attention_distance, attention_angle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(talk_distance, talk_angle); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; scale.set(daNpc_Kolinb_Param_c::m.common.scale, daNpc_Kolinb_Param_c::m.common.scale, daNpc_Kolinb_Param_c::m.common.scale); mCcStts.SetWeight(daNpc_Kolinb_Param_c::m.common.weight); diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp index 72323b1a0d..725af4e7a4 100644 --- a/src/d/actor/d_a_npc_ks.cpp +++ b/src/d/actor/d_a_npc_ks.cpp @@ -1259,7 +1259,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { if (i_this->mTimers[2] == 0 && cage_p->field_0xdc4 == 0) { fopAcM_OnStatus(a_this, 0); - cLib_onBit(a_this->attention_info.flags, 0x2000000A); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_TALKCHECK_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); a_this->eventInfo.onCondition(dEvtCnd_CANTALK_e); a_this->attention_info.distances[1] = 2; a_this->attention_info.distances[3] = 2; @@ -5969,15 +5969,9 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) { cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 2, sVar1); -#if VERSION == VERSION_SHIELD_DEBUG - #define KS_FSDEMO_BIT 0x42UL -#else - #define KS_FSDEMO_BIT 0xAUL -#endif - if (iVar1 != 0) { fopAcM_OnStatus(a_this, 0); - cLib_onBit(a_this->attention_info.flags, KS_FSDEMO_BIT); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); a_this->eventInfo.onCondition(dEvtCnd_CANTALK_e); // TODO: fake match to force reuse of pointer dComIfG_play_c* play = &g_dComIfG_gameInfo.play; @@ -5998,7 +5992,7 @@ static int npc_ks_fsdemo(npc_ks_class* i_this) { } } else { fopAcM_OffStatus(a_this, 0); - cLib_offBit(a_this->attention_info.flags, KS_FSDEMO_BIT); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); i_this->field_0xaee = 0; } @@ -6188,12 +6182,7 @@ static void action(npc_ks_class* i_this) { cXyz sp44, sp50; fopAcM_OffStatus(a_this, 0); -#if VERSION == VERSION_SHIELD_DEBUG - #define KS_ACTION_BIT 0x20000042UL -#else - #define KS_ACTION_BIT 0x2000000AUL -#endif - cLib_offBit(a_this->attention_info.flags, KS_ACTION_BIT); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_TALKCHECK_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); if (i_this->field_0x5b5 != 0) { sp44 = player->eyePos - i_this->field_0x614; @@ -6598,12 +6587,6 @@ static void kantera_sub(npc_ks_class* i_this) { MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(14), mDoMtx_stack_c::get()); i_this->mpStickModel->setBaseTRMtx(mDoMtx_stack_c::get()); -#if VERSION == VERSION_SHIELD_DEBUG - #define KANTERA_SUB_BIT 0x80UL -#else - #define KANTERA_SUB_BIT 0x10UL -#endif - if (i_this->field_0xc17 == 2) { mDoMtx_stack_c::transM(44.0f + KREG_F(7), 144.5f + KREG_F(8), 11.0f + KREG_F(9)); mDoMtx_multVecZero(mDoMtx_stack_c::get(), &i_this->field_0xc04); @@ -6614,7 +6597,7 @@ static void kantera_sub(npc_ks_class* i_this) { daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); if (fopAcM_checkCarryNow(a_this) != 0 && player->getGrabUpStart()) { fopAcM_cancelCarryNow(a_this); - cLib_offBit(a_this->attention_info.flags, KANTERA_SUB_BIT); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); i_this->field_0xc17 = 0; dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE2] & 0xFFFF); } else { @@ -6644,7 +6627,7 @@ static void kantera_sub(npc_ks_class* i_this) { mDoMtx_stack_c::YrotM(5000); daPy_getPlayerActorClass()->setKandelaarMtx(mDoMtx_stack_c::get(), 0, 0); fopAcM_OnCarryType(a_this, fopAcM_CARRY_ITEM); - cLib_onBit(a_this->attention_info.flags, KANTERA_SUB_BIT); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); a_this->attention_info.distances[4] = 6; a_this->attention_info.position.x = i_this->field_0xc04.x; a_this->attention_info.position.y = i_this->field_0xc04.y + 30.0f; diff --git a/src/d/actor/d_a_npc_maro.cpp b/src/d/actor/d_a_npc_maro.cpp index f230b586fa..fb53f1ef7e 100644 --- a/src/d/actor/d_a_npc_maro.cpp +++ b/src/d/actor/d_a_npc_maro.cpp @@ -641,7 +641,7 @@ void daNpc_Maro_c::setParam() { } srchActors(); - u32 uVar7 = 10; + u32 uVar7 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); s16 sVar10 = daNpc_Maro_Param_c::m.common.talk_distance; s16 sVar9 = daNpc_Maro_Param_c::m.common.talk_angle; s16 sVar8 = daNpc_Maro_Param_c::m.common.attention_distance; diff --git a/src/d/actor/d_a_npc_midp.cpp b/src/d/actor/d_a_npc_midp.cpp index 4cf8f7c746..226af869a8 100644 --- a/src/d/actor/d_a_npc_midp.cpp +++ b/src/d/actor/d_a_npc_midp.cpp @@ -343,7 +343,7 @@ void daNpc_midP_c::setParam() { attention_info.distances[0] = daNpcT_getDistTableIdx(sVar3, sVar4); attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = daNpcT_getDistTableIdx(sVar1, sVar2); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; scale.setall(daNpc_midP_Param_c::m.mScale); mCcStts.SetWeight(daNpc_midP_Param_c::m.mWeight); diff --git a/src/d/actor/d_a_npc_moi.cpp b/src/d/actor/d_a_npc_moi.cpp index f39e9c3f6d..a87bdb68d8 100644 --- a/src/d/actor/d_a_npc_moi.cpp +++ b/src/d/actor/d_a_npc_moi.cpp @@ -605,7 +605,7 @@ void daNpc_Moi_c::setParam() { selectAction(); srchActors(); - int uVar5 = 0xa; + int uVar5 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); s16 sVar7 = daNpc_Moi_Param_c::m.field_0x48; s16 sVar6 = daNpc_Moi_Param_c::m.field_0x4a; s16 sVar5 = daNpc_Moi_Param_c::m.field_0x4c; @@ -617,13 +617,13 @@ void daNpc_Moi_c::setParam() { sVar6 = 6; sVar5 = 1; sVar4 = 6; - uVar5 = 0x800008; + uVar5 = fopAc_AttnFlag_UNK_0x800000 | fopAc_AttnFlag_SPEAK_e; } else { sVar7 = 6; sVar6 = 6; sVar5 = 19; sVar4 = 6; - uVar5 = 1; + uVar5 = fopAc_AttnFlag_LOCK_e; } } else if (mType == TYPE_1) { sVar7 = 5; @@ -1406,7 +1406,7 @@ int daNpc_Moi_c::poise() { if (field_0x1660 == 0) { if (field_0x165c != 0) { - attention_info.flags = 2; + attention_info.flags = fopAc_AttnFlag_TALK_e; mSpeakEvent = true; } } else { diff --git a/src/d/actor/d_a_npc_moir.cpp b/src/d/actor/d_a_npc_moir.cpp index 061a7ef72d..3418eba05e 100644 --- a/src/d/actor/d_a_npc_moir.cpp +++ b/src/d/actor/d_a_npc_moir.cpp @@ -1830,7 +1830,7 @@ static int daNpcMoiR_IsDelete(void* a_this) { void daNpcMoiR_c::setParam() { searchActors(); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; if (mMode == MODE_SIT) { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(3, 5); diff --git a/src/d/actor/d_a_npc_ne.cpp b/src/d/actor/d_a_npc_ne.cpp index e79e7ae1e1..f0c53cc471 100644 --- a/src/d/actor/d_a_npc_ne.cpp +++ b/src/d/actor/d_a_npc_ne.cpp @@ -2375,12 +2375,12 @@ static void action(npc_ne_class* i_this) { } if (carry_check && !i_this->mWantsFish) { - cLib_onBit(_this->attention_info.flags, 0x10); + cLib_onBit(_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); if (ne_carry_check(i_this)) { return; } } else { - cLib_offBit(_this->attention_info.flags, 0x10); + cLib_offBit(_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); } cXyz vec1, vec2; @@ -2924,14 +2924,14 @@ static int message(npc_ne_class* i_this) { if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::checkNowWolf() && !fopAcM_otherBgCheck(daPy_getLinkPlayerActorClass(), i_this)) { fopAcM_OnStatus(i_this, 0); - cLib_onBit(i_this->attention_info.flags, 0xa); + cLib_onBit(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); if (i_this->mResName == "Npc_net") { - cLib_onBit(i_this->attention_info.flags, 0xc00000); + cLib_onBit(i_this->attention_info.flags, fopAc_AttnFlag_UNK_0x800000 | fopAc_AttnFlag_UNK_0x400000); } i_this->eventInfo.onCondition(dEvtCnd_CANTALK_e); } else { fopAcM_OffStatus(i_this, 0); - cLib_offBit(i_this->attention_info.flags, 0xc0000a); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_UNK_0x800000 | fopAc_AttnFlag_UNK_0x400000 | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } return 0; diff --git a/src/d/actor/d_a_npc_prayer.cpp b/src/d/actor/d_a_npc_prayer.cpp index 54127ab0de..a4ea0e21d3 100644 --- a/src/d/actor/d_a_npc_prayer.cpp +++ b/src/d/actor/d_a_npc_prayer.cpp @@ -265,7 +265,7 @@ void daNpcPray_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(daNpcPray_Param_c::m.common.attention_distance, daNpcPray_Param_c::m.common.attention_angle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = getDistTableIdx(daNpcPray_Param_c::m.common.talk_distance, daNpcPray_Param_c::m.common.talk_angle); - attention_info.flags = 0xA; + attention_info.flags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); #if VERSION == VERSION_SHIELD_DEBUG scale.set(daNpcPray_Param_c::m.common.scale, daNpcPray_Param_c::m.common.scale, daNpcPray_Param_c::m.common.scale); diff --git a/src/d/actor/d_a_npc_saru.cpp b/src/d/actor/d_a_npc_saru.cpp index 65176b762b..8149cf5ae2 100644 --- a/src/d/actor/d_a_npc_saru.cpp +++ b/src/d/actor/d_a_npc_saru.cpp @@ -545,7 +545,7 @@ BOOL daNpc_Saru_c::checkChangeEvt() { void daNpc_Saru_c::setParam() { selectAction(); srchActors(); - u32 uVar1 = 10; + u32 uVar1 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); s16 sVar1 = daNpc_Saru_Param_c::m.common.talk_distance; s16 sVar2 = daNpc_Saru_Param_c::m.common.talk_angle; diff --git a/src/d/actor/d_a_npc_shad.cpp b/src/d/actor/d_a_npc_shad.cpp index a9320de8d1..79935086b9 100644 --- a/src/d/actor/d_a_npc_shad.cpp +++ b/src/d/actor/d_a_npc_shad.cpp @@ -819,7 +819,7 @@ void daNpcShad_c::reset() { attention_info.distances[fopAc_attn_LOCK_e] = 78; attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = 77; - attention_info.flags |= 0x800000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x800000; } else if (mMode == 0) { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(3, 3); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; @@ -2570,13 +2570,13 @@ static void dummy() { /* 80AE01BC-80AE0438 00809C 027C+00 1/0 0/0 0/0 .text setParam__11daNpcShad_cFv */ void daNpcShad_c::setParam() { searchActors(); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; if (isSneaking()) { attention_info.distances[fopAc_attn_LOCK_e] = 78; attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = 77; - attention_info.flags |= 0x800000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x800000; } else if (mMode == 0) { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(3, 5); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; diff --git a/src/d/actor/d_a_npc_shoe.cpp b/src/d/actor/d_a_npc_shoe.cpp index 2d946c6ca7..064c0c6250 100644 --- a/src/d/actor/d_a_npc_shoe.cpp +++ b/src/d/actor/d_a_npc_shoe.cpp @@ -648,7 +648,7 @@ void daNpcShoe_c::setParam() { attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = getDistTableIdx(daNpcShoe_Param_c::m.mSpeakDistIdx, daNpcShoe_Param_c::m.mSpeakAngleIdx); - attention_info.flags = (field_0xe1b != 0) ? 10 : 0; + attention_info.flags = (field_0xe1b != 0) ? (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e) : 0; scale.setall(daNpcShoe_Param_c::m.mScale); mAcchCir.SetWallR(daNpcShoe_Param_c::m.mWallR); diff --git a/src/d/actor/d_a_npc_shop0.cpp b/src/d/actor/d_a_npc_shop0.cpp index 38d830ab85..9f4a4ef3ef 100644 --- a/src/d/actor/d_a_npc_shop0.cpp +++ b/src/d/actor/d_a_npc_shop0.cpp @@ -187,7 +187,7 @@ int daNpc_Shop0_c::init() { mCyl.SetStts(&mStts); mCyl.Set(mCylDat); - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; eventInfo.setArchiveName(getResName()); field_0x9e8 = -1; @@ -247,7 +247,7 @@ int daNpc_Shop0_c::checkEvent() { /* 80AEB5E8-80AEB634 000E88 004C+00 1/1 0/0 0/0 .text orderEvent__13daNpc_Shop0_cFv */ void daNpc_Shop0_c::orderEvent() { - if (getFlowNodeNum() >= 0 && attention_info.flags == 0xa) { + if (getFlowNodeNum() >= 0 && attention_info.flags == (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e)) { eventInfo.onCondition(1); } } diff --git a/src/d/actor/d_a_npc_taro.cpp b/src/d/actor/d_a_npc_taro.cpp index 6342a47ae4..adcb73600a 100644 --- a/src/d/actor/d_a_npc_taro.cpp +++ b/src/d/actor/d_a_npc_taro.cpp @@ -726,7 +726,7 @@ void daNpc_Taro_c::afterJntAnm(int param_1) { void daNpc_Taro_c::setParam() { selectAction(); srchActors(); - int attentionFlags = 0xa; + int attentionFlags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); s16 sVar7 = daNpc_Taro_Param_c::m.field_0x48; s16 sVar5 = daNpc_Taro_Param_c::m.field_0x4a; s16 sVar6 = daNpc_Taro_Param_c::m.field_0x4c; diff --git a/src/d/actor/d_a_npc_the.cpp b/src/d/actor/d_a_npc_the.cpp index 3c76c6398c..19f8419e12 100644 --- a/src/d/actor/d_a_npc_the.cpp +++ b/src/d/actor/d_a_npc_the.cpp @@ -1317,12 +1317,12 @@ void daNpcThe_c::setParam() { int speak_angle_idx = mType == TYPE_KAKARIKO ? (s16)1 : daNpcThe_Param_c::m.mSpeakAngleIdx; int talk_angle_idx = mType == TYPE_KAKARIKO ? (s16)1 : daNpcThe_Param_c::m.mTalkAngleIdx; - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; if (isSneaking()) { attention_info.distances[fopAc_attn_LOCK_e] = 0x4e; attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = 0x4d; - attention_info.flags |= 0x800000; + attention_info.flags |= fopAc_AttnFlag_UNK_0x800000; } else { if (!strcmp(dComIfGp_getStartStageName(), "R_SP116")) { attention_info.distances[fopAc_attn_LOCK_e] diff --git a/src/d/actor/d_a_npc_tkj2.cpp b/src/d/actor/d_a_npc_tkj2.cpp index 574eb67ea9..bc366fe0a8 100644 --- a/src/d/actor/d_a_npc_tkj2.cpp +++ b/src/d/actor/d_a_npc_tkj2.cpp @@ -797,7 +797,7 @@ static void action(npc_tkj2_class* i_this) { i_this->field_0xa8c = 1; } - if (fopAcM_checkStatus(a_this, fopAcM_STATUS_HOOK_CARRY_NOW)) { + if (fopAcM_CheckStatus(a_this, fopAcM_STATUS_HOOK_CARRY_NOW)) { i_this->field_0x5ea = 1; } else if (i_this->field_0x5ea != 0) { i_this->field_0x5ea = 0; diff --git a/src/d/actor/d_a_npc_tks.cpp b/src/d/actor/d_a_npc_tks.cpp index a737883e91..5cf678eba4 100644 --- a/src/d/actor/d_a_npc_tks.cpp +++ b/src/d/actor/d_a_npc_tks.cpp @@ -598,7 +598,7 @@ BOOL daNpcTks_c::main() { } } - if (cLib_checkBit(attention_info.flags, 0x10) && fopAcM_checkCarryNow(this)) { + if (cLib_checkBit(attention_info.flags, fopAc_AttnFlag_CARRY_e) && fopAcM_checkCarryNow(this)) { setAction(&daNpcTks_c::demo_appear); } @@ -631,7 +631,7 @@ void daNpcTks_c::reset() { } attention_info.distances[fopAc_attn_CARRY_e] = 43; - attention_info.flags = 0x10; + attention_info.flags = fopAc_AttnFlag_CARRY_e; field_0x1370 = 0; field_0x1374 = 0; mAction = NULL; @@ -655,7 +655,7 @@ void daNpcTks_c::reset() { case 0: case 255: if (fopAcM_isSwitch(this, getSwitchNo())) { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0x138a = false; mTksTsubo.field_0x586 = 0; setAction(&daNpcTks_c::waitNude); @@ -954,7 +954,7 @@ void daNpcTks_c::setLookMode(int i_lookMode, fopAc_ac_c* actor_p) { void daNpcTks_c::wait() { switch (mMode) { case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setMotionAnm(ANM_WAIT_A, 0.0f); field_0x138a = false; speedF = 0.0f; @@ -1054,7 +1054,7 @@ void daNpcTks_c::setMotionAnm(int i_index, f32 i_morf) { void daNpcTks_c::waitNude() { switch (mMode) { case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setMotionAnm(ANM_WAIT_A, 0.0f); field_0x138a = false; speedF = 0.0f; @@ -1097,7 +1097,7 @@ void daNpcTks_c::waitNude() { void daNpcTks_c::waitLv6() { switch (mMode) { case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setMotionAnm(ANM_WAIT_A, 0.0f); field_0x138a = false; speedF = 0.0f; @@ -1120,7 +1120,7 @@ void daNpcTks_c::waitLv6() { } if (current.pos.y - fopAcM_GetPosition_p(daPy_getPlayerActorClass())->y < 100.0f && fopAcM_searchPlayerDistanceXZ(this) <= 400.0f) { - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; eventInfo.onCondition(dEvtCmd_INTALK_e); fopAcM_orderSpeakEvent(this, 0, 0); } @@ -1498,7 +1498,7 @@ void daNpcTks_c::damage() { switch (mMode) { case 0: setMotionAnm(ANM_SHAKE, 0.0f); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0x138a = true; speedF = 0.0f; mMode = 2; @@ -1515,7 +1515,7 @@ void daNpcTks_c::damage() { break; case 3: - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); break; default: @@ -1537,7 +1537,7 @@ void daNpcTks_c::broken() { } mTksTsubo.mSound.startCreatureSound(Z2SE_TKS_V_OUT_OF_POT, 0, -1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0x138a = false; mTksTsubo.field_0x586 = 0; fopAcM_onSwitch(this, getSwitchNo()); @@ -1569,7 +1569,7 @@ void daNpcTks_c::demo_appear() { eventInfo.setArchiveName(l_arcName); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, "TKS_ENCOUNTER", 0xFF); fopAcM_orderOtherEventId(this, mEventIdx, 0xFF, 0xFFFF, 4, 1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotionAnm(ANM_HIDE, 0.0f); mMode = 2; @@ -1613,7 +1613,7 @@ void daNpcTks_c::demo_appear() { dComIfGp_getVibration().StartShock(2, 15, cXyz(0.0f, 1.0f, 0.0f)); mTksTsubo.mSound.startCreatureSound(Z2SE_TKS_V_OUT_OF_POT, 0, -1); fopAcM_cancelCarryNow(this); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0x138a = false; mTksTsubo.field_0x586 = 0; speedF = daNpcTks_Param_c::m.movement_spd; @@ -1732,7 +1732,7 @@ void daNpcTks_c::demo_appear() { void daNpcTks_c::demo_scannon() { switch (mMode) { case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotion(MOT_WAIT_A, -1.0f, 0); field_0x138a = false; @@ -1839,7 +1839,7 @@ void daNpcTks_c::demo_scannon() { void daNpcTks_c::demo_Lv6Gate() { switch (mMode) { case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotion(MOT_WAIT_A, -1.0f, 0); field_0x138a = false; @@ -1912,7 +1912,7 @@ void daNpcTks_c::demo_farewell() { eventInfo.setArchiveName(l_arcName); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, "TKS_FAREWELL", 0xFF); fopAcM_orderOtherEventId(this, mEventIdx, 0xFF, 0xFFFF, 4, 1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotionAnm(ANM_WAIT_A, 0.0f); @@ -2084,7 +2084,7 @@ void daNpcTks_c::demo_warpBack() { eventInfo.setArchiveName(l_arcName); mEventIdx = dComIfGp_getEventManager().getEventIdx(this, "TKS_WARPBACK", 0xFF); fopAcM_orderOtherEventId(this, mEventIdx, 0xFF, 0xFFFF, 4, 1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotionAnm(ANM_WAIT_A, 0.0f); setLookMode(LOOK_PLAYER_TALK, NULL); @@ -2206,7 +2206,7 @@ void daNpcTks_c::demo_warpBack() { void daNpcTks_c::demo_walkBack() { switch (mMode){ case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotionAnm(ANM_WAIT_A, 0.0f); setLookMode(LOOK_PLAYER_TALK, NULL); @@ -2336,7 +2336,7 @@ void daNpcTks_c::demo_walkBack() { void daNpcTks_c::demo_Lv7Start() { switch (mMode) { case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotion(MOT_JUMP_S, -1.0f, 0); mMode = 2; @@ -2646,7 +2646,7 @@ void daNpcTks_c::demo_Lv7Start() { void daNpcTks_c::demo_Lv3PickUp() { switch (mMode) { case 0: - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotion(MOT_WAIT_A, -1.0f, 0); setLookMode(LOOK_PLAYER, NULL); @@ -2802,7 +2802,7 @@ void daNpcTks_c::demo_Lv6PickUp() { fopAcM_orderOtherEventId(this, mEventIdx, 0xFF, 0xFFFF, 4, 1); mMode = 2; } else { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); setExpression(EXPR_NONE, -1.0f); setMotion(MOT_WAIT_A, -1.0f, 0); setLookMode(LOOK_PLAYER, NULL); diff --git a/src/d/actor/d_a_npc_uri.cpp b/src/d/actor/d_a_npc_uri.cpp index edfbbd70b6..693f2f9f2f 100644 --- a/src/d/actor/d_a_npc_uri.cpp +++ b/src/d/actor/d_a_npc_uri.cpp @@ -527,7 +527,7 @@ void daNpc_Uri_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = daNpcT_getDistTableIdx(sVar5, sVar4); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(sVar7, sVar6); - attention_info.flags = 0xA; + attention_info.flags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); scale.set(daNpc_Uri_Param_c::m.field_0x08, daNpc_Uri_Param_c::m.field_0x08, daNpc_Uri_Param_c::m.field_0x08); mCcStts.SetWeight(daNpc_Uri_Param_c::m.field_0x10); diff --git a/src/d/actor/d_a_npc_wrestler.cpp b/src/d/actor/d_a_npc_wrestler.cpp index 80fdc29ec0..397fdda7bd 100644 --- a/src/d/actor/d_a_npc_wrestler.cpp +++ b/src/d/actor/d_a_npc_wrestler.cpp @@ -4802,7 +4802,7 @@ inline void daNpcWrestler_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = getDistTableIdx(5, 6); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = getDistTableIdx(3, 6); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; if (mType == 1 && daPy_py_c::checkNowWolf()) { attention_info.flags = 0; diff --git a/src/d/actor/d_a_npc_yelia.cpp b/src/d/actor/d_a_npc_yelia.cpp index 18e7dffaf2..7648ac126d 100644 --- a/src/d/actor/d_a_npc_yelia.cpp +++ b/src/d/actor/d_a_npc_yelia.cpp @@ -619,7 +619,7 @@ void daNpc_Yelia_c::setParam() { attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(speak_dist_idx, speak_angle_idx); - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; scale.set(l_HIO.m.mScale, l_HIO.m.mScale, l_HIO.m.mScale); mCcStts.SetWeight(l_HIO.m.mCcWeight); diff --git a/src/d/actor/d_a_npc_ykm.cpp b/src/d/actor/d_a_npc_ykm.cpp index c7529e6a5b..e079214598 100644 --- a/src/d/actor/d_a_npc_ykm.cpp +++ b/src/d/actor/d_a_npc_ykm.cpp @@ -945,7 +945,7 @@ void daNpc_ykM_c::setParam() { srchActors(); if (mType != TYPE_5 && mType != TYPE_6) { - u32 uVar1 = 10; + u32 uVar1 = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); dComIfGp_getAttention()->getDistTable(71).mDistMax = daNpc_ykM_Param_c::m.attention_dist; dComIfGp_getAttention()->getDistTable(71).mDistMaxRelease = daNpc_ykM_Param_c::m.attention_dist; dComIfGp_getAttention()->getDistTable(70).mDistMax = daNpc_ykM_Param_c::m.conversation_dist; @@ -975,7 +975,7 @@ void daNpc_ykM_c::setParam() { attention_info.distances[fopAc_attn_SPEAK_e] = 70; if (daPy_py_c::checkNowWolf()) { - uVar1 |= 0x800000; + uVar1 |= fopAc_AttnFlag_UNK_0x800000; } attention_info.flags = uVar1; diff --git a/src/d/actor/d_a_npc_ykw.cpp b/src/d/actor/d_a_npc_ykw.cpp index 5129778ff5..931e3a98c5 100644 --- a/src/d/actor/d_a_npc_ykw.cpp +++ b/src/d/actor/d_a_npc_ykw.cpp @@ -745,13 +745,7 @@ void daNpc_ykW_c::setParam() { srchActors(); if (field_0xf80 != 5 && field_0xf80 != 6) { - u32 newAttnFlags; -#if DEBUG - newAttnFlags = 0x42; -#else - newAttnFlags = 0x0a; -#endif - + u32 newAttnFlags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; s16 talkDist = HIO_PARAM(this)->common.talk_distance; s16 talkAngle = HIO_PARAM(this)->common.talk_angle; s16 attnDist = HIO_PARAM(this)->common.attention_distance; @@ -774,12 +768,12 @@ void daNpc_ykW_c::setParam() { #endif if (daPy_py_c::checkNowWolf()) { - newAttnFlags |= 0x800000; + newAttnFlags |= fopAc_AttnFlag_UNK_0x800000; } attention_info.flags = newAttnFlags; } else { - attention_info.flags = 0x0; + attention_info.flags = 0; } scale.set(HIO_PARAM(this)->common.scale, diff --git a/src/d/actor/d_a_npc_zant.cpp b/src/d/actor/d_a_npc_zant.cpp index de02eb1165..a8ae64398e 100644 --- a/src/d/actor/d_a_npc_zant.cpp +++ b/src/d/actor/d_a_npc_zant.cpp @@ -267,7 +267,7 @@ void daNpc_Zant_c::setParam() { attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = daNpcT_getDistTableIdx(sVar1, sVar2); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; scale.setall(daNpc_Zant_Param_c::m.field_0x8); diff --git a/src/d/actor/d_a_npc_zelR.cpp b/src/d/actor/d_a_npc_zelR.cpp index 05d2cc02a0..ab638e18a2 100644 --- a/src/d/actor/d_a_npc_zelR.cpp +++ b/src/d/actor/d_a_npc_zelR.cpp @@ -374,7 +374,7 @@ void daNpc_ZelR_c::setParam() { attention_info.distances[0] = daNpcT_getDistTableIdx(sVar3, sVar4); attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = daNpcT_getDistTableIdx(sVar1, sVar2); - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; scale.setall(l_HIO.m.field_0x8); mCcStts.SetWeight(l_HIO.m.mWeight); mCylH = l_HIO.m.mCylH; diff --git a/src/d/actor/d_a_npc_zelda.cpp b/src/d/actor/d_a_npc_zelda.cpp index 788fecfeef..e83c09e439 100644 --- a/src/d/actor/d_a_npc_zelda.cpp +++ b/src/d/actor/d_a_npc_zelda.cpp @@ -447,14 +447,7 @@ void daNpc_Zelda_c::setParam() { selectAction(); srchActors(); -#if DEBUG - s32 attnFlag = 0x2 | 0x40; -#define NPC_ZELDA_SETPARAM_DIST_IDX fopAc_attn_JUEL_e -#else - s32 attnFlag = 0x2 | 0x8; -#define NPC_ZELDA_SETPARAM_DIST_IDX fopAc_attn_SPEAK_e -#endif - + s32 attnFlag = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; s16 talkDist = HIO_PARAM(this).common.talk_distance; s16 talkAngle = HIO_PARAM(this).common.talk_angle; s16 attnDist = HIO_PARAM(this).common.attention_distance; @@ -462,7 +455,7 @@ void daNpc_Zelda_c::setParam() { attention_info.distances[fopAc_attn_LOCK_e] = daNpcT_getDistTableIdx(attnDist, attnAngle); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; - attention_info.distances[NPC_ZELDA_SETPARAM_DIST_IDX] = daNpcT_getDistTableIdx(talkDist, talkAngle); + attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(talkDist, talkAngle); attention_info.flags = attnFlag; scale.set(HIO_PARAM(this).common.scale, HIO_PARAM(this).common.scale, HIO_PARAM(this).common.scale); mCcStts.SetWeight(HIO_PARAM(this).common.weight); diff --git a/src/d/actor/d_a_npc_zra.cpp b/src/d/actor/d_a_npc_zra.cpp index 7ec117a6ef..83616f38c5 100644 --- a/src/d/actor/d_a_npc_zra.cpp +++ b/src/d/actor/d_a_npc_zra.cpp @@ -886,10 +886,10 @@ int daNpc_zrA_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) { /* 80B7AC08-80B7ADF0 0027E8 01E8+00 1/0 0/0 0/0 .text setParam__11daNpc_zrA_cFv */ void daNpc_zrA_c::setParam() { - u32 attn_flags = 0xa; + u32 attn_flags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); BOOL in_water = mAcch.ChkWaterIn(); if (mTwilight) { - attn_flags = 0x80000a; + attn_flags = (fopAc_AttnFlag_UNK_0x800000 | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } selectAction(); @@ -902,7 +902,7 @@ void daNpc_zrA_c::setParam() { field_0x14d0 = 0; field_0x14d4 = 0; - attn_flags = 2; + attn_flags = fopAc_AttnFlag_TALK_e; if (daPy_getPlayerActorClass()->checkSwimUp()) { attn_flags = 0; } diff --git a/src/d/actor/d_a_obj_batta.cpp b/src/d/actor/d_a_obj_batta.cpp index 82659f12f9..041406965e 100644 --- a/src/d/actor/d_a_obj_batta.cpp +++ b/src/d/actor/d_a_obj_batta.cpp @@ -408,7 +408,7 @@ void daObjBATTA_c::hook() { batta_setParticle(); } - if (!fopAcM_checkStatus(this, fopAcM_STATUS_HOOK_CARRY_NOW)) { + if (!fopAcM_CheckStatus(this, fopAcM_STATUS_HOOK_CARRY_NOW)) { setAction(&daObjBATTA_c::wait); } } diff --git a/src/d/actor/d_a_obj_carry.cpp b/src/d/actor/d_a_obj_carry.cpp index 85cbd69a7e..7e0b4c78b2 100644 --- a/src/d/actor/d_a_obj_carry.cpp +++ b/src/d/actor/d_a_obj_carry.cpp @@ -1083,7 +1083,7 @@ int daObjCarry_c::Create() { fopAcM_SetCullSize(this, fopAc_CULLSPHERE_8_e); fopAcM_setCullSizeSphere(this, data().m_cullsph_min_x, data().m_cullsph_min_y, data().m_cullsph_min_z, mpModel->getModelData()->getJointNodePointer(0)->getRadius() * data().scale); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); attention_info.distances[fopAc_attn_CARRY_e] = data().m_carry_attn_dist; if (checkFlag(4)) { @@ -1792,7 +1792,7 @@ int daObjCarry_c::execute() { } if (mType == TYPE_DOKURO && getSwbit() != 0xFF && !fopAcM_isSwitch(this, getSwbit())) { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); return 1; } @@ -1808,7 +1808,7 @@ int daObjCarry_c::execute() { mode_init_wait(); } - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); calc_rot_call(); setBaseMtx(); field_0xdb9 = mCtrl; @@ -2397,7 +2397,7 @@ void daObjCarry_c::mode_init_wait() { mCyl.OnTgSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0xda8 = 0; speedF = 0.0f; @@ -2490,7 +2490,7 @@ int daObjCarry_c::mode_proc_walk() { if (gnd_hit) { field_0xcec = current.pos.y; - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (0.0f == speedF && 0.0f == speed.y) { mode_init_wait(); @@ -2498,13 +2498,13 @@ int daObjCarry_c::mode_proc_walk() { if (mType == TYPE_IRON_BALL) { if (speedF > 25.0f) { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } else { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } } } else { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } f32 var_f29 = data().m_rollAngle; @@ -2620,7 +2620,7 @@ void daObjCarry_c::mode_init_carry() { } if (prm_chk_type_lightball()) { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); daPy_py_c* player = daPy_getPlayerActorClass(); if (player->getGrabActorID() == fopAcM_GetID(this)) { @@ -2740,7 +2740,7 @@ void daObjCarry_c::mode_init_drop(u8 param_0) { mCyl.OnCoSPrmBit(0x10); mCyl.OffAtSPrmBit(0xC); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mStts.SetWeight(data().m_colliderWeight); field_0xda8 = 0; @@ -2792,7 +2792,7 @@ void daObjCarry_c::mode_init_float() { mCyl.OnTgSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0xda8 = 0; field_0xdc4 = 0; @@ -2888,7 +2888,7 @@ void daObjCarry_c::mode_init_sink() { mCyl.OnTgSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0xda8 = 0; mStts.SetWeight(data().m_colliderWeight); @@ -2946,9 +2946,9 @@ int daObjCarry_c::mode_proc_sink() { fopAcM_posMoveF(this, mStts.GetCCMoveP()); if (mAcch.ChkGroundHit()) { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } else { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } field_0xcec = current.pos.y; @@ -2963,7 +2963,7 @@ void daObjCarry_c::mode_init_yogan() { mCyl.OffAtSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mStts.SetWeight(data().m_colliderWeight); @@ -3014,7 +3014,7 @@ void daObjCarry_c::mode_init_boomCarry() { mCyl.OnCoSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCanCrashRoll = false; gravity = calc_gravity(); @@ -3060,7 +3060,7 @@ void daObjCarry_c::mode_init_growth() { mCyl.OnCoSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0xdb0 = 1; scale.setall(0.0f); @@ -3099,7 +3099,7 @@ void daObjCarry_c::mode_init_dbDrop(u8 param_0) { mCyl.OnCoSPrmBit(0x10); mCyl.OffTgSPrmBit(1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAcM_SetMaxFallSpeed(this, -100.0f); mStts.SetWeight(data().m_colliderWeight); @@ -3126,7 +3126,7 @@ void daObjCarry_c::mode_init_hookCarry() { mCyl.OnCoSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCanCrashRoll = false; gravity = calc_gravity(); @@ -3163,7 +3163,7 @@ void daObjCarry_c::mode_init_fit() { mCyl.OnTgSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAcM_OffStatus(this, 0x80000); field_0xda8 = 0; @@ -3203,7 +3203,7 @@ void daObjCarry_c::mode_init_resetLightBall() { mCyl.OffTgSPrmBit(1); mCyl.OnCoSPrmBit(0x10); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); field_0xda8 = 0; speedF = 0.0f; diff --git a/src/d/actor/d_a_obj_crvgate.cpp b/src/d/actor/d_a_obj_crvgate.cpp index f286fcf363..37fa1272c4 100644 --- a/src/d/actor/d_a_obj_crvgate.cpp +++ b/src/d/actor/d_a_obj_crvgate.cpp @@ -723,7 +723,7 @@ void daObjCRVGATE_c::SetDoor() { if (mKeyParam == 0xff) { attention_info.position = mPos; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; attention_info.distances[5] = 0x0F; mKeyParam = 0x01; diff --git a/src/d/actor/d_a_obj_digholl.cpp b/src/d/actor/d_a_obj_digholl.cpp index 16196474ff..439dffbf5c 100644 --- a/src/d/actor/d_a_obj_digholl.cpp +++ b/src/d/actor/d_a_obj_digholl.cpp @@ -51,7 +51,7 @@ int daObjDigholl_c::execute() { (field_0x56a == 0xff || fopAcM_isSwitch(this, field_0x56a)) && (f32)fabsf(current.pos.y - player->current.pos.y) < 40.0f) { - attention_info.flags = 0x80; + attention_info.flags = fopAc_AttnFlag_ETC_e; } else { attention_info.flags = 0; } diff --git a/src/d/actor/d_a_obj_digplace.cpp b/src/d/actor/d_a_obj_digplace.cpp index 404b12446d..6838297543 100644 --- a/src/d/actor/d_a_obj_digplace.cpp +++ b/src/d/actor/d_a_obj_digplace.cpp @@ -99,7 +99,7 @@ int daObjDigpl_c::execute() { } } - attention_info.flags &= ~0x80; + attention_info.flags &= ~fopAc_AttnFlag_ETC_e; if (mpDigPoints != NULL) { current.pos.y = player_p->current.pos.y + 100000.0f; @@ -147,7 +147,7 @@ int daObjDigpl_c::execute() { f32 dist_to_player = fopAcM_searchPlayerDistanceXZ2(this); if (seen_angle <= 0x2800 || dist_to_player < 1600.0f) { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; } if (dist_to_player < 250000.0f && diff --git a/src/d/actor/d_a_obj_digsnow.cpp b/src/d/actor/d_a_obj_digsnow.cpp index 34eb5bfca9..6a33baa95e 100644 --- a/src/d/actor/d_a_obj_digsnow.cpp +++ b/src/d/actor/d_a_obj_digsnow.cpp @@ -74,7 +74,7 @@ int daObjDigSnow_c::create1st() { */ int daObjDigSnow_c::Execute(Mtx** i_mtx) { if (daPy_py_c::checkNowWolf()) { - attention_info.flags = 0x80; + attention_info.flags = fopAc_AttnFlag_ETC_e; } else { attention_info.flags = 0; } diff --git a/src/d/actor/d_a_obj_dmelevator.cpp b/src/d/actor/d_a_obj_dmelevator.cpp index b0845c5c5a..defdf6ca5c 100644 --- a/src/d/actor/d_a_obj_dmelevator.cpp +++ b/src/d/actor/d_a_obj_dmelevator.cpp @@ -24,7 +24,7 @@ static void rideCallBack(dBgW* param_0, fopAc_ac_c* param_1, fopAc_ac_c* param_2 daObjDmElevator_c* pthis = (daObjDmElevator_c*)param_1; daPy_py_c* pdVar1 = daPy_getPlayerActorClass(); - if (fopAcM_checkStatus(param_2, 0x400) != 0 && fopAcM_GetName(param_2) == 0xfd) { + if (fopAcM_CheckStatus(param_2, 0x400) != 0 && fopAcM_GetName(param_2) == 0xfd) { static cXyz l_push_check_pos0[4] = { cXyz(-50.0f, 0.0f, -50.0f), cXyz(50.0f, 0.0f, -50.0f), @@ -557,7 +557,7 @@ void daObjDmElevator_c::actionEvent() { /* 80BDF068-80BDF0A0 0017E8 0038+00 1/0 0/0 0/0 .text actionStartEvent__17daObjDmElevator_cFv */ void daObjDmElevator_c::actionStartEvent() { - if ( fopAcM_checkStatus(this, 0x1000) != 0) { + if ( fopAcM_CheckStatus(this, 0x1000) != 0) { demoProc(); } else { mAction = 0; diff --git a/src/d/actor/d_a_obj_fallobj.cpp b/src/d/actor/d_a_obj_fallobj.cpp index 45a75ebe01..3a08f384c4 100644 --- a/src/d/actor/d_a_obj_fallobj.cpp +++ b/src/d/actor/d_a_obj_fallobj.cpp @@ -166,10 +166,10 @@ int daObjFallObj_c::Execute(Mtx** i_mtx) { if (bVar1) { attention_info.distances[fopAc_attn_BATTLE_e] = 0x22; - attention_info.flags |= 4; + attention_info.flags |= fopAc_AttnFlag_BATTLE_e; } else { attention_info.distances[fopAc_attn_BATTLE_e] = 0x0; - attention_info.flags &= ~4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } field_0x5e0 += 1; diff --git a/src/d/actor/d_a_obj_food.cpp b/src/d/actor/d_a_obj_food.cpp index 0692fae449..e2de67ce48 100644 --- a/src/d/actor/d_a_obj_food.cpp +++ b/src/d/actor/d_a_obj_food.cpp @@ -153,7 +153,7 @@ static void food_normal(obj_food_class* i_this) { if (i_this->mAcch.ChkGroundHit()) { fopAcM_SetFoodStatus(i_this, fopAcM_FOOD_0); if (i_this->mBounces >= 3) { - cLib_onBit(i_this->attention_info.flags, 0x10); + cLib_onBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); i_this->speedF = 0.0f; if (fopAcM_checkCarryNow(i_this)) { @@ -265,14 +265,14 @@ static void action(obj_food_class* i_this) { break; case fopAcM_FOOD_1: food_normal(i_this); - cLib_offBit(i_this->attention_info.flags, 0x10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); break; case fopAcM_FOOD_2: food_carry(i_this); - cLib_offBit(i_this->attention_info.flags, 0x10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); break; case fopAcM_FOOD_3: - cLib_offBit(i_this->attention_info.flags, 0x10); + cLib_offBit(i_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); break; case fopAcM_FOOD_4: fopAcM_SetFoodStatus(i_this, fopAcM_FOOD_0); diff --git a/src/d/actor/d_a_obj_gra2.cpp b/src/d/actor/d_a_obj_gra2.cpp index 51d3e01054..ee641a5ba2 100644 --- a/src/d/actor/d_a_obj_gra2.cpp +++ b/src/d/actor/d_a_obj_gra2.cpp @@ -894,7 +894,7 @@ void daObj_GrA_c::setParam() { || checkProcess(&daObj_GrA_c::toStone)) { attnSttsOn(0, 0); } else { - attention_info.flags = 0x200004; + attention_info.flags = (fopAc_AttnFlag_UNK_0x200000 | fopAc_AttnFlag_BATTLE_e); } } else if (mMode == 1) { if (checkProcess(&daObj_GrA_c::standWaitJump)) { @@ -910,10 +910,10 @@ void daObj_GrA_c::setParam() { attention_info.flags = 0; } } else if (mMode == 2) { - attention_info.flags &= ~0x10; - attention_info.flags = 0x200000; + attention_info.flags &= ~fopAc_AttnFlag_CARRY_e; + attention_info.flags = fopAc_AttnFlag_UNK_0x200000; } else { - attention_info.flags &= ~0x10; + attention_info.flags &= ~fopAc_AttnFlag_CARRY_e; if (field_0x1508 == 0) { attnSttsOn(0, 0); } diff --git a/src/d/actor/d_a_obj_gra2_soldier.inc b/src/d/actor/d_a_obj_gra2_soldier.inc index e2baf700dd..98fbc6b4b5 100644 --- a/src/d/actor/d_a_obj_gra2_soldier.inc +++ b/src/d/actor/d_a_obj_gra2_soldier.inc @@ -1816,7 +1816,7 @@ void daObj_GrA_c::setCarryStatus() { mDoMtx_stack_c::transM(-current.pos.x, -current.pos.y, -current.pos.z); mDoMtx_stack_c::multVec(&daPy_getPlayerActorClass()->current.pos, &sp38); if (fabsf(sp38.x) < 100.0f && sp38.z > 0.0f && sp38.z < 800.0f) { - attention_info.flags |= 0x10; + attention_info.flags |= fopAc_AttnFlag_CARRY_e; } } diff --git a/src/d/actor/d_a_obj_gra_rock.cpp b/src/d/actor/d_a_obj_gra_rock.cpp index 570143f5c1..7160f7a104 100644 --- a/src/d/actor/d_a_obj_gra_rock.cpp +++ b/src/d/actor/d_a_obj_gra_rock.cpp @@ -37,7 +37,7 @@ void daObjGraRock_c::setAttnPos() { mDoMtx_stack_c::multVec(&cStack_50, &attention_info.position); attention_info.position += current.pos; attention_info.distances[0] = daNpcF_getDistTableIdx(8, 5); - attention_info.flags = 1; + attention_info.flags = fopAc_AttnFlag_LOCK_e; dAttention_c* attention = dComIfGp_getAttention(); if (attention->LockonTruth()) { if (attention->LockonTarget(0) == this && field_0x9bc == 0 && field_0x9b6 == 0) { diff --git a/src/d/actor/d_a_obj_iceleaf.cpp b/src/d/actor/d_a_obj_iceleaf.cpp index c9ced9427c..2f2ce09dc5 100644 --- a/src/d/actor/d_a_obj_iceleaf.cpp +++ b/src/d/actor/d_a_obj_iceleaf.cpp @@ -326,7 +326,7 @@ void daObjIceLeaf_c::modeDrop() { /* 80C258F8-80C25904 001258 000C+00 1/0 0/0 0/0 .text modePlayerWait__14daObjIceLeaf_cFv */ void daObjIceLeaf_c::modePlayerWait() { - attention_info.flags = 0x80; + attention_info.flags = fopAc_AttnFlag_ETC_e; } /* 80C25904-80C25908 001264 0004+00 1/0 0/0 0/0 .text modeRide__14daObjIceLeaf_cFv */ diff --git a/src/d/actor/d_a_obj_ito.cpp b/src/d/actor/d_a_obj_ito.cpp index 054921bde2..0fbaae8b7f 100644 --- a/src/d/actor/d_a_obj_ito.cpp +++ b/src/d/actor/d_a_obj_ito.cpp @@ -635,7 +635,7 @@ static cPhs__Step daObj_Ito_Create(fopAc_ac_c* a_this) { fopAcM_SetMtx(a_this, i_this->field_0x574[0]->getBaseTRMtx()); fopAcM_SetMin(a_this, -3000.0f, -3000.0f, -3000.0f); fopAcM_SetMax(a_this, 3000.0f, 3000.0f, 3000.0f); - a_this->attention_info.flags = 4; + a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 22; i_this->field_0x60c = cM_rndF(65535.0f); diff --git a/src/d/actor/d_a_obj_kag.cpp b/src/d/actor/d_a_obj_kag.cpp index d93603faeb..31a6d61ddd 100644 --- a/src/d/actor/d_a_obj_kag.cpp +++ b/src/d/actor/d_a_obj_kag.cpp @@ -464,7 +464,7 @@ void daObjKAG_c::hook() { kag_setParticle(); } - if (!fopAcM_checkStatus(this, fopAcM_STATUS_HOOK_CARRY_NOW)) { + if (!fopAcM_CheckStatus(this, fopAcM_STATUS_HOOK_CARRY_NOW)) { setAction(&daObjKAG_c::fly); } diff --git a/src/d/actor/d_a_obj_kago.cpp b/src/d/actor/d_a_obj_kago.cpp index 5223045918..9e5665aaf0 100644 --- a/src/d/actor/d_a_obj_kago.cpp +++ b/src/d/actor/d_a_obj_kago.cpp @@ -197,7 +197,7 @@ int daObj_Kago_c::Execute() { if (basket_p == this) { daNpcT_onTmpBit(23); } else { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAcM_OnCarryType(this, fopAcM_CARRY_CHICKEN); } } @@ -366,7 +366,7 @@ int daObj_Kago_c::Execute() { } if (mType == 0 && field_0xb9f == 0 && field_0xb9e == 0 && field_0xba1 == 0) { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAcM_OnCarryType(this, fopAcM_CARRY_CHICKEN); } diff --git a/src/d/actor/d_a_obj_kanban2.cpp b/src/d/actor/d_a_obj_kanban2.cpp index b655fcd774..a642606504 100644 --- a/src/d/actor/d_a_obj_kanban2.cpp +++ b/src/d/actor/d_a_obj_kanban2.cpp @@ -812,7 +812,7 @@ void daObj_Kanban2_c::setCenterPos() { /* 80582E68-80582EF0 0017E8 0088+00 2/2 0/0 0/0 .text checkCarryOn__15daObj_Kanban2_cFv */ BOOL daObj_Kanban2_c::checkCarryOn() { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (fopAcM_checkCarryNow(this)) { setActionMode(ACTION_CARRY_e, 0); @@ -986,12 +986,12 @@ void daObj_Kanban2_c::executeNormal() { switch (field_0x9fe) { case 0: if (mFlowID != -1 && cLib_distanceAngleS(shape_angle.y, fopAcM_searchPlayerAngleY(this)) < 0x3000) { - cLib_onBit(attention_info.flags, 0x4000000A); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_TALKREAD_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); attention_info.distances[fopAc_attn_TALK_e] = 21; attention_info.distances[fopAc_attn_SPEAK_e] = 21; eventInfo.onCondition(1); } else { - cLib_offBit(attention_info.flags, 0x4000000A); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_TALKREAD_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk()) { diff --git a/src/d/actor/d_a_obj_kantera.cpp b/src/d/actor/d_a_obj_kantera.cpp index d3235b1085..c79d38144f 100644 --- a/src/d/actor/d_a_obj_kantera.cpp +++ b/src/d/actor/d_a_obj_kantera.cpp @@ -150,7 +150,7 @@ int daItemKantera_c::actionInit() { int daItemKantera_c::actionWaitInit() { mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); attention_info.distances[fopAc_attn_CARRY_e] = 16; attention_info.position = current.pos; show(); @@ -164,23 +164,23 @@ int daItemKantera_c::actionWait() { mAcch.CrrPos(dComIfG_Bgsp()); bg_check(); if (mAcch.ChkGroundHit()) { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); speedF *= 0.9f; if (speedF < 1.0f) { speedF = 0.0f; } } else { - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } daPy_py_c* player = daPy_getPlayerActorClass(); if (fopAcM_checkCarryNow(this)) { - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (player->getGrabUpStart()) { fopAcM_cancelCarryNow(this); initActionOrderGetDemo(); } } else { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } attention_info.position = current.pos; return 1; @@ -189,7 +189,7 @@ int daItemKantera_c::actionWait() { /* 80C39234-80C392D0 000C34 009C+00 1/1 0/0 0/0 .text initActionOrderGetDemo__15daItemKantera_cFv */ int daItemKantera_c::initActionOrderGetDemo() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); hide(); diff --git a/src/d/actor/d_a_obj_kbacket.cpp b/src/d/actor/d_a_obj_kbacket.cpp index 9c2c61f2d5..b3df8ee64f 100644 --- a/src/d/actor/d_a_obj_kbacket.cpp +++ b/src/d/actor/d_a_obj_kbacket.cpp @@ -402,7 +402,7 @@ int daObj_KBacket_c::Execute() { } if (field_0xa48 == 0x0 && field_0xa47 == 0x0 && field_0xa4a == 0x0) { - cLib_onBit(attention_info.flags, (u32)0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } field_0x9d4 = speed; diff --git a/src/d/actor/d_a_obj_kbox.cpp b/src/d/actor/d_a_obj_kbox.cpp index 05be51f991..da94fcab82 100644 --- a/src/d/actor/d_a_obj_kbox.cpp +++ b/src/d/actor/d_a_obj_kbox.cpp @@ -99,9 +99,9 @@ static void kbox_ground(obj_kbox_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor; i_this->mSph.OnCoSetBit(); cLib_addCalc0(&a_this->speedF, 1.0f, 2.0f); - cLib_onBit(a_this->attention_info.flags, 0x10UL); + cLib_onBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); if (fopAcM_checkCarryNow(a_this)) { - cLib_offBit(a_this->attention_info.flags, 0x10UL); + cLib_offBit(a_this->attention_info.flags, fopAc_AttnFlag_CARRY_e); i_this->field_0x57a = 1; i_this->field_0x57c = 0; a_this->speedF = 0.0f; diff --git a/src/d/actor/d_a_obj_kgate.cpp b/src/d/actor/d_a_obj_kgate.cpp index ab6ef03ee0..8cc18a34b2 100644 --- a/src/d/actor/d_a_obj_kgate.cpp +++ b/src/d/actor/d_a_obj_kgate.cpp @@ -254,7 +254,7 @@ int daObjKGate_c::Create() { attention_info.position.y += 150.0f; eyePos.y += 150.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; initBaseMtx(); fopAcM_SetMtx(this, field_0xb18); diff --git a/src/d/actor/d_a_obj_lv4digsand.cpp b/src/d/actor/d_a_obj_lv4digsand.cpp index 32dc045be8..0a180b573f 100644 --- a/src/d/actor/d_a_obj_lv4digsand.cpp +++ b/src/d/actor/d_a_obj_lv4digsand.cpp @@ -73,7 +73,7 @@ int daObjL4DigSand_c::create1st() { /* 80C66D40-80C66DD0 0002A0 0090+00 1/0 0/0 0/0 .text Execute__16daObjL4DigSand_cFPPA3_A4_f */ int daObjL4DigSand_c::Execute(f32 (**param_0)[3][4]) { if (daPy_py_c::checkNowWolf() && checkItemGet(fpcNm_ITEM_SMELL_POH, 1)) { - attention_info.flags = 0x80; + attention_info.flags = fopAc_AttnFlag_ETC_e; } else { attention_info.flags = 0; } diff --git a/src/d/actor/d_a_obj_lv5ychndlr.cpp b/src/d/actor/d_a_obj_lv5ychndlr.cpp index 05d6a7d7f8..57fe5e8db4 100644 --- a/src/d/actor/d_a_obj_lv5ychndlr.cpp +++ b/src/d/actor/d_a_obj_lv5ychndlr.cpp @@ -281,10 +281,10 @@ int daObjYchndlr_c::Execute(Mtx** param_0) { if (field_0xc8c) { fopAcM_OffStatus(this, 0); - attention_info.flags &= ~0x4; + attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e; } else { fopAcM_OnStatus(this, 0); - attention_info.flags = 0x4; + attention_info.flags = fopAc_AttnFlag_BATTLE_e; Vec attn_pos, spA0, offset; f32 var_f31, var_f30; diff --git a/src/d/actor/d_a_obj_lv5yiblltray.cpp b/src/d/actor/d_a_obj_lv5yiblltray.cpp index 48bd062dbd..ce3ad274f7 100644 --- a/src/d/actor/d_a_obj_lv5yiblltray.cpp +++ b/src/d/actor/d_a_obj_lv5yiblltray.cpp @@ -255,13 +255,13 @@ static fopAc_ac_c* searchNearBackTrayIronball(void* i_ball, void* i_tray) { /* 80C6F440-80C6F450 0008C0 0010+00 1/1 0/0 0/0 .text onAttention__16daObjYIblltray_cFv */ void daObjYIblltray_c::onAttention() { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; } /* 80C6F450-80C6F460 0008D0 0010+00 1/1 0/0 0/0 .text offAttention__16daObjYIblltray_cFv */ void daObjYIblltray_c::offAttention() { - attention_info.flags &= ~0x80; + attention_info.flags &= ~fopAc_AttnFlag_ETC_e; } /* 80C6F460-80C702E0 0008E0 0E80+00 1/0 0/0 0/0 .text Execute__16daObjYIblltray_cFPPA3_A4_f */ diff --git a/src/d/actor/d_a_obj_master_sword.cpp b/src/d/actor/d_a_obj_master_sword.cpp index 17d7a1f069..dd745f912c 100644 --- a/src/d/actor/d_a_obj_master_sword.cpp +++ b/src/d/actor/d_a_obj_master_sword.cpp @@ -29,7 +29,7 @@ void daObjMasterSword_c::initBaseMtx() { /* 80C90AF8-80C90B50 000078 0058+00 1/0 0/0 0/0 .text initWait__18daObjMasterSword_cFv */ void daObjMasterSword_c::initWait() { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); current.pos = home.pos; current.angle = home.angle; shape_angle = home.angle; @@ -154,7 +154,7 @@ void daObjMasterSword_c::create_init() { initBaseMtx(); fopAcM_OnCarryType(this, fopAcM_CARRY_UNK_30); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); attention_info.distances[fopAc_attn_CARRY_e] = 74; attention_info.position = current.pos; attention_info.position.y += 100.0f; diff --git a/src/d/actor/d_a_obj_mie.cpp b/src/d/actor/d_a_obj_mie.cpp index 2e333bafd8..61c1cb02c4 100644 --- a/src/d/actor/d_a_obj_mie.cpp +++ b/src/d/actor/d_a_obj_mie.cpp @@ -272,7 +272,7 @@ int daObj_Mie_c::Execute() { field_0xa47 == 0) { fopAcM_OnCarryType(this, fopAcM_CARRY_SIDE); - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } } } diff --git a/src/d/actor/d_a_obj_nameplate.cpp b/src/d/actor/d_a_obj_nameplate.cpp index 21161135c8..fc72af31ef 100644 --- a/src/d/actor/d_a_obj_nameplate.cpp +++ b/src/d/actor/d_a_obj_nameplate.cpp @@ -220,13 +220,13 @@ void daObjNameplate_c::messageProc() { cLib_distanceAngleS(shape_angle.GetY(), fopAcM_searchPlayerAngleY(this)) < 0x3000) { fopAcM_OnStatus(this, 0); - cLib_onBit(attention_info.flags, 0x4000000A); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_TALKREAD_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); attention_info.distances[fopAc_attn_TALK_e] = 0x15; attention_info.distances[fopAc_attn_SPEAK_e] = 0x15; eventInfo.onCondition(1); } else { fopAcM_OffStatus(this, 0); - cLib_offBit(attention_info.flags, 0x4000000A); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_TALKREAD_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } if (dComIfGp_event_runCheck() && eventInfo.checkCommandTalk()) { diff --git a/src/d/actor/d_a_obj_nan.cpp b/src/d/actor/d_a_obj_nan.cpp index ba8b1df35a..7211fe6c7a 100644 --- a/src/d/actor/d_a_obj_nan.cpp +++ b/src/d/actor/d_a_obj_nan.cpp @@ -424,7 +424,7 @@ void daObjNAN_c::hook() { if (mDraw) { nan_setParticle(); } - if (!fopAcM_checkStatus(this, 0x100000)) { + if (!fopAcM_CheckStatus(this, 0x100000)) { setAction(&daObjNAN_c::drop); } dBgS_LinChk linkChk; diff --git a/src/d/actor/d_a_obj_onsenTaru.cpp b/src/d/actor/d_a_obj_onsenTaru.cpp index 19b624c9dc..7f8ff0499a 100644 --- a/src/d/actor/d_a_obj_onsenTaru.cpp +++ b/src/d/actor/d_a_obj_onsenTaru.cpp @@ -93,7 +93,7 @@ int daOnsTaru_c::create() { mCcCyl.OffAtSetBit(); fopAcM_OnCarryType(this, fopAcM_CARRY_TYPE_1); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); attention_info.distances[fopAc_attn_CARRY_e] = 42; mIsCarryNow = fopAcM_checkCarryNow(this); @@ -253,7 +253,7 @@ void daOnsTaru_c::mode_proc_call() { /* 80CA929C-80CA92CC 000DBC 0030+00 2/2 0/0 0/0 .text mode_init_wait__11daOnsTaru_cFv */ void daOnsTaru_c::mode_init_wait() { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); speedF = 0.0f; gravity = -7.0f; mMode = MODE_WAIT_e; @@ -267,7 +267,7 @@ void daOnsTaru_c::mode_proc_wait() { /* 80CA92F0-80CA9320 000E10 0030+00 1/1 0/0 0/0 .text mode_init_carry__11daOnsTaru_cFv */ void daOnsTaru_c::mode_init_carry() { mCcCyl.OffCoSetBit(); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); speedF = 0.0f; mMode = MODE_CARRY_e; } @@ -291,7 +291,7 @@ void daOnsTaru_c::mode_proc_carry() { void daOnsTaru_c::mode_init_drop() { mCcCyl.OnAtSetBit(); mCollisionRadius = l_HIO.mCollisionRadius; - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); gravity = -7.0f; mMode = MODE_DROP_e; } @@ -318,7 +318,7 @@ void daOnsTaru_c::mode_proc_break() {} /* 80CA9518-80CA9530 001038 0018+00 2/2 0/0 0/0 .text mode_init_sink__11daOnsTaru_cFv */ void daOnsTaru_c::mode_init_sink() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mMode = MODE_SINK_e; } @@ -340,9 +340,9 @@ void daOnsTaru_c::mode_proc_sink() { fopAcM_posMoveF(this, mCcStts.GetCCMoveP()); if (mAcch.ChkGroundHit()) { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } else { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } } diff --git a/src/d/actor/d_a_obj_rgate.cpp b/src/d/actor/d_a_obj_rgate.cpp index dcfb3935f4..edc8bd20ac 100644 --- a/src/d/actor/d_a_obj_rgate.cpp +++ b/src/d/actor/d_a_obj_rgate.cpp @@ -240,7 +240,7 @@ int daObjRgate_c::Create() { attention_info.position.y += 150.0f; eyePos.y += 150.0f; - attention_info.flags = 0x20; + attention_info.flags = fopAc_AttnFlag_DOOR_e; initBaseMtx(); fopAcM_SetMtx(this, field_0xb14); diff --git a/src/d/actor/d_a_obj_scannon.cpp b/src/d/actor/d_a_obj_scannon.cpp index a083049203..deaa184f66 100644 --- a/src/d/actor/d_a_obj_scannon.cpp +++ b/src/d/actor/d_a_obj_scannon.cpp @@ -5,492 +5,911 @@ #include "d/dolzel_rel.h" +#include "f_op/f_op_camera_mng.h" #include "d/actor/d_a_obj_scannon.h" -#include "dol2asm.h" +#include "d/actor/d_a_player.h" +#include "d/d_s_play.h" +/* 80CC9324-80CC9328 -00001 0004+00 0/3 0/0 0/0 .data l_arcName_Comp */ +char* l_arcName_Comp = "SkyCannon"; +/* 80CC9328-80CC932C -00001 0004+00 0/3 0/0 0/0 .data l_arcName_Crash */ +char* l_arcName_Crash = "SCanHai"; -// -// Forward References: -// +/* 80CC932C-80CC9330 -00001 0004+00 1/3 0/0 0/0 .data l_arcName_Zev */ +char* l_arcName_Zev = "SCanZev"; -extern "C" static void eventCallBack__FPvi(); -extern "C" static void daSCannon_c_createHeap__FP10fopAc_ac_c(); -extern "C" void __ct__11daSCannon_cFv(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" void __dt__11daSCannon_cFv(); -extern "C" void create__11daSCannon_cFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void execute__11daSCannon_cFv(); -extern "C" void draw__11daSCannon_cFv(); -extern "C" void Delete__11daSCannon_cFv(); -extern "C" void setModelMtx__11daSCannon_cFv(); -extern "C" void setPtlModelMtx__11daSCannon_cFv(); -extern "C" void createHeap__11daSCannon_cFv(); -extern "C" void middleExe__11daSCannon_cFv(); -extern "C" void orderEvtInit__11daSCannon_cFv(); -extern "C" void exeModeWait__11daSCannon_cFv(); -extern "C" void exeModeOrderEvt__11daSCannon_cFv(); -extern "C" void exeModeActionEvt__11daSCannon_cFv(); -extern "C" void exeModeEnd__11daSCannon_cFv(); -extern "C" void demoExe__11daSCannon_cFv(); -extern "C" void demoModeInit__11daSCannon_cFi(); -extern "C" void demoInitLinkIn__11daSCannon_cFv(); -extern "C" void demoExeLinkIn__11daSCannon_cFv(); -extern "C" void demoInitSet__11daSCannon_cFv(); -extern "C" void demoExeSet__11daSCannon_cFv(); -extern "C" void demoInitMove__11daSCannon_cFv(); -extern "C" void demoExeMove__11daSCannon_cFv(); -extern "C" void demoInitFire__11daSCannon_cFv(); -extern "C" void demoExeFire__11daSCannon_cFv(); -extern "C" void demoInitFinish__11daSCannon_cFv(); -extern "C" void demoExeFinish__11daSCannon_cFv(); -extern "C" void demoInitWarpEndWait__11daSCannon_cFv(); -extern "C" void demoExeWarpEndWait__11daSCannon_cFv(); -extern "C" void demoInitWarpEndMove__11daSCannon_cFv(); -extern "C" void demoExeWarpEndMove__11daSCannon_cFv(); -extern "C" void changeScene__11daSCannon_cFv(); -extern "C" void init__11daSCannon_cFv(); -extern "C" void initEmtRt__11daSCannon_cFUsiPCUsPP14JPABaseEmitter(); -extern "C" void exeEmtRt__11daSCannon_cFUsiPP14JPABaseEmitter(); -extern "C" void initEmtLine__11daSCannon_cFv(); -extern "C" void exeEmtLine__11daSCannon_cFv(); -extern "C" void delEmtAll__11daSCannon_cFv(); -extern "C" void setCannonRepair__11daSCannon_cFv(); -extern "C" static void daSCannon_create__FP11daSCannon_c(); -extern "C" static void daSCannon_Delete__FP11daSCannon_c(); -extern "C" static void daSCannon_execute__FP11daSCannon_c(); -extern "C" static void daSCannon_draw__FP11daSCannon_c(); -extern "C" void func_80CC8F14(void* _this, int*); -extern "C" void __sinit_d_a_obj_scannon_cpp(); -extern "C" static void func_80CC916C(); -extern "C" static void func_80CC9174(); -extern "C" void* const s_demoTable__11daSCannon_c[12]; -extern "C" extern char const* const d_a_obj_scannon__stringBase0; -extern "C" u8 s_exeProc__11daSCannon_c[48]; -extern "C" u8 s_demoExeProc_WarpEnd__11daSCannon_c[48]; -extern "C" u8 s_demoExeProc_FireTks__11daSCannon_c[72]; -extern "C" u8 s_demoExeProc_FireFirst__11daSCannon_c[24]; -extern "C" u8 s_demoExeProc_FireSecond__11daSCannon_c[96]; +/* 80CC9330-80CC9334 -00001 0004+00 0/3 0/0 0/0 .data l_arcName_Ptl */ +char* l_arcName_Ptl = "SCanPtl"; -// -// External References: -// +/* 80CC9334-80CC9338 -00001 0004+00 1/1 0/0 0/0 .data l_staffName */ +char* l_staffName = "SCannon"; -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void play__14mDoExt_baseAnmFv(); -extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss(); -extern "C" void entry__13mDoExt_btkAnmFP16J3DMaterialTablef(); -extern "C" void init__13mDoExt_bckAnmFP15J3DAnmTransformiifssb(); -extern "C" void entry__13mDoExt_bckAnmFP12J3DModelDataf(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff(); -extern "C" void fopAcM_orderOtherEventId__FP10fopAc_ac_csUcUsUsUs(); -extern "C" void dStage_changeScene__FifUlScsi(); -extern "C" void getLayerNo__14dComIfG_play_cFi(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfGp_getReverb__Fi(); -extern "C" void -dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj(); -extern "C" void onSwitch__12dSv_memBit_cFi(); -extern "C" void offSwitch__12dSv_memBit_cFi(); -extern "C" void onSwitch__10dSv_info_cFii(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void reset__14dEvt_control_cFv(); -extern "C" void setSkipProc__14dEvt_control_cFPvPFPvi_ii(); -extern "C" void getEventIdx__16dEvent_manager_cFP10fopAc_ac_cPCcUc(); -extern "C" void endCheck__16dEvent_manager_cFs(); -extern "C" void getMyStaffId__16dEvent_manager_cFPCcP10fopAc_ac_ci(); -extern "C" void getIsAddvance__16dEvent_manager_cFi(); -extern "C" void getMyActIdx__16dEvent_manager_cFiPCPCciii(); -extern "C" void getMySubstanceP__16dEvent_manager_cFiPCci(); -extern "C" void cutEnd__16dEvent_manager_cFi(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void StartQuake__12dVibration_cFii4cXyz(); -extern "C" void StopQuake__12dVibration_cFi(); -extern "C" void CheckQuake__12dVibration_cFv(); -extern "C" void Release__4cBgSFP9dBgW_Base(); -extern "C" void Regist__4dBgSFP9dBgW_BaseP10fopAc_ac_c(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void Set__4cBgWFP6cBgD_tUlPA3_A4_f(); -extern "C" void __ct__4dBgWFv(); -extern "C" void dCam_getAngleY__FP12camera_class(); -extern "C" void dCam_getAngleX__FP12camera_class(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void __ct__13cBgS_PolyInfoFv(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void ChkUsed__9cBgW_BgIdCFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void JPAGetXYZRotateMtx__FsssPA4_f(); -extern "C" void func_802807E0(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void getName__10JUTNameTabCFUs(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey(); -extern "C" void __ptmf_test(); -extern "C" void __ptmf_scall(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" extern u8 const __ptmf_null[12 + 4 /* padding */]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; - -// -// Declarations: -// +/* 80CC9338-80CC9348 -00001 0010+00 1/1 0/0 0/0 .data l_eventName */ +char* l_eventName[4] = { + "SKY_CANNON_WARP_END", + "SKY_CANNON_FIRE_FIRST", + "SKY_CANNON_FIRE_TKS", + "SKY_CANNON_FIRE_SECOND", +}; /* 80CC6A98-80CC6AEC 000078 0054+00 1/1 0/0 0/0 .text eventCallBack__FPvi */ -static void eventCallBack(void* param_0, int param_1) { - // NONMATCHING +static int eventCallBack(void* i_proc, int param_1) { + int layer = dComIfG_play_c::getLayerNo(0); + if ((layer == 3 || layer == 10) && i_proc != NULL) { + ((daSCannon_c*)i_proc)->changeScene(); + } + + return 1; } /* 80CC6AEC-80CC6B0C 0000CC 0020+00 1/1 0/0 0/0 .text daSCannon_c_createHeap__FP10fopAc_ac_c */ -static void daSCannon_c_createHeap(fopAc_ac_c* param_0) { - // NONMATCHING +static int daSCannon_c_createHeap(fopAc_ac_c* i_this) { + return ((daSCannon_c*)i_this)->createHeap(); } -/* ############################################################################################## */ -/* 80CC9224-80CC9224 00009C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80CC9224 = "SkyCannon"; -SECTION_DEAD static char const* const stringBase_80CC922E = "SCanHai"; -SECTION_DEAD static char const* const stringBase_80CC9236 = "SCanZev"; -SECTION_DEAD static char const* const stringBase_80CC923E = "SCanPtl"; -SECTION_DEAD static char const* const stringBase_80CC9246 = "SCannon"; -SECTION_DEAD static char const* const stringBase_80CC924E = "SKY_CANNON_WARP_END"; -SECTION_DEAD static char const* const stringBase_80CC9262 = "SKY_CANNON_FIRE_FIRST"; -SECTION_DEAD static char const* const stringBase_80CC9278 = "SKY_CANNON_FIRE_TKS"; -SECTION_DEAD static char const* const stringBase_80CC928C = "SKY_CANNON_FIRE_SECOND"; -SECTION_DEAD static char const* const stringBase_80CC92A3 = "head"; -SECTION_DEAD static char const* const stringBase_80CC92A8 = "Ni_SkyCannon_crash"; -SECTION_DEAD static char const* const stringBase_80CC92BB = "Tks"; -SECTION_DEAD static char const* const stringBase_80CC92BF = "WAIT"; -SECTION_DEAD static char const* const stringBase_80CC92C4 = "MOVE"; -SECTION_DEAD static char const* const stringBase_80CC92C9 = "0001_WAIT"; -SECTION_DEAD static char const* const stringBase_80CC92D3 = "0002_RUN"; -SECTION_DEAD static char const* const stringBase_80CC92DC = "0003_JUMP"; -SECTION_DEAD static char const* const stringBase_80CC92E6 = "LINK_IN"; -SECTION_DEAD static char const* const stringBase_80CC92EE = "SET"; -SECTION_DEAD static char const* const stringBase_80CC92F2 = "FIRE"; -SECTION_DEAD static char const* const stringBase_80CC92F7 = "FINISH"; -#pragma pop +/* 80CC6B0C-80CC6BC8 0000EC 00BC+00 2/2 0/0 0/0 .text __ct__11daSCannon_cFv */ +daSCannon_c::daSCannon_c() { + mpBgW = NULL; + memset(mpModels, 0, sizeof(mpModels)); + memset(mpEmtSmk, 0, sizeof(mpEmtSmk)); + memset(mpEmtApp, 0, sizeof(mpEmtApp)); + mpEmtLine = NULL; + mpCrashBtk = NULL; + mpPtlBtk = NULL; + mpPtlModel = NULL; +} -/* 80CC9324-80CC9328 -00001 0004+00 0/3 0/0 0/0 .data l_arcName_Comp */ -#pragma push -#pragma force_active on -SECTION_DATA static void* l_arcName_Comp = (void*)&d_a_obj_scannon__stringBase0; -#pragma pop +/* 80CC6C10-80CC6D10 0001F0 0100+00 1/0 0/0 0/0 .text __dt__11daSCannon_cFv */ +daSCannon_c::~daSCannon_c() { + char* arcname; + if (mLayerNo == 3 || mLayerNo == 10) { + arcname = l_arcName_Comp; + } else if (mLayerNo == 1) { + arcname = l_arcName_Crash; + if (mIsPortal) { + dComIfG_resDelete(&mPtlPhase, l_arcName_Ptl); + } + } -/* 80CC9328-80CC932C -00001 0004+00 0/3 0/0 0/0 .data l_arcName_Crash */ -#pragma push -#pragma force_active on -SECTION_DATA static void* l_arcName_Crash = (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xA); -#pragma pop + dComIfG_resDelete(this, arcname); + dComIfG_resDelete(&mZevPhase, l_arcName_Zev); +} -/* 80CC932C-80CC9330 -00001 0004+00 1/3 0/0 0/0 .data l_arcName_Zev */ -SECTION_DATA static void* l_arcName_Zev = (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x12); - -/* 80CC9330-80CC9334 -00001 0004+00 0/3 0/0 0/0 .data l_arcName_Ptl */ -#pragma push -#pragma force_active on -SECTION_DATA static void* l_arcName_Ptl = (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x1A); -#pragma pop - -/* 80CC9334-80CC9338 -00001 0004+00 1/1 0/0 0/0 .data l_staffName */ -SECTION_DATA static void* l_staffName = (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x22); - -/* 80CC9338-80CC9348 -00001 0010+00 1/1 0/0 0/0 .data l_eventName */ -SECTION_DATA static void* l_eventName[4] = { - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x2A), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x3E), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x54), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x68), +/* 80CC9188-80CC9194 000000 000C+00 11/11 0/0 0/0 .rodata TKS_SET_POS */ +static const Vec TKS_SET_POS = { + -98491.227f, -18346.793f, 52057.156f, }; -/* 80CC9348-80CC9354 -00001 000C+00 0/1 0/0 0/0 .data @4249 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4249[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeWait__11daSCannon_cFv, +/* 80CC9194-80CC919C 00000C 0006+02 0/1 0/0 0/0 .rodata SMK_PARTICLE_NAME */ +static const u16 SMK_PARTICLE_NAME[] = { + dPa_RM(ID_ZF_S_SKYCANNON00_SMK), + dPa_RM(ID_ZF_S_SKYCANNON01_SMK), + dPa_RM(ID_ZF_S_SKYCANNON02_SMK), }; -#pragma pop -/* 80CC9354-80CC9360 -00001 000C+00 0/1 0/0 0/0 .data @4250 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4250[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeOrderEvt__11daSCannon_cFv, +/* 80CC919C-80CC91A4 000014 0006+02 0/1 0/0 0/0 .rodata APP_PARTICLE_NAME */ +static const u16 APP_PARTICLE_NAME[] = { + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_APP_A), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_APP_B), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_APP_C), }; -#pragma pop -/* 80CC9360-80CC936C -00001 000C+00 0/1 0/0 0/0 .data @4251 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4251[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeActionEvt__11daSCannon_cFv, -}; -#pragma pop +/* 80CC6D10-80CC7124 0002F0 0414+00 1/1 0/0 0/0 .text create__11daSCannon_cFv */ +int daSCannon_c::create() { + fopAcM_SetupActor(this, daSCannon_c); -/* 80CC936C-80CC9378 -00001 000C+00 0/1 0/0 0/0 .data @4252 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4252[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeEnd__11daSCannon_cFv, -}; -#pragma pop + int layerNo = dComIfG_play_c::getLayerNo(0); + if (layerNo != 1 && layerNo != 3 && layerNo != 10) { + // "×××××××× City in the Sky config layer is not specified. Creation canceled. layerNo:%d\n" + OS_REPORT("××××××××天空砲台 配置レイヤが指定外です 生成中止 layerNo:%d\n", layerNo); + return cPhs_ERROR_e; + } + + char* arcname = l_arcName_Comp; + int ptl_phase_state = cPhs_COMPLEATE_e; + if (layerNo == 1) { + arcname = l_arcName_Crash; + mIsPortal = FALSE; + if (!fopAcM_isSwitch(this, getSw1())) { + mIsPortal = TRUE; + ptl_phase_state = dComIfG_resLoad(&mPtlPhase, l_arcName_Ptl); + if (ptl_phase_state == cPhs_ERROR_e || ptl_phase_state == cPhs_UNK3_e) { + return cPhs_ERROR_e; + } + } + } + + int phase_state = dComIfG_resLoad(this, arcname); + if (phase_state == cPhs_ERROR_e || phase_state == cPhs_UNK3_e) { + return cPhs_ERROR_e; + } + + int zev_phase_state = dComIfG_resLoad(&mZevPhase, l_arcName_Zev); + if (zev_phase_state == cPhs_ERROR_e || zev_phase_state == cPhs_UNK3_e) { + return cPhs_ERROR_e; + } + + if (phase_state == cPhs_COMPLEATE_e && zev_phase_state == cPhs_COMPLEATE_e && ptl_phase_state == cPhs_COMPLEATE_e) { + mLayerNo = layerNo; + + u32 heapsize = 0xF000; + if (layerNo == 3 || layerNo == 10) { + heapsize = 0x9000; + } else if (mIsPortal != 0) { + heapsize = 0xF000; + } else { + heapsize = 0xD500; + } + + if (!fopAcM_entrySolidHeap(this, daSCannon_c_createHeap, heapsize)) { + return cPhs_ERROR_e; + } + + if (dComIfG_Bgsp().Regist(mpBgW, this)) { + return cPhs_ERROR_e; + } + + init(); + + setModelMtx(); + fopAcM_SetMtx(this, mpModels[mIsRepaired]->getBaseTRMtx()); + fopAcM_setCullSizeFar(this, 5.0f); + + J3DJoint* joint_p = mpModels[mIsRepaired]->getModelData()->getJointNodePointer(0); + if (joint_p != NULL) { + fopAcM_setCullSizeBox(this, + joint_p->getMin()->x - 500.0f, joint_p->getMin()->y, joint_p->getMin()->z - 500.0f, + 500.0f + joint_p->getMax()->x, joint_p->getMax()->y, 500.0f + joint_p->getMax()->z); + } + + dBgS_AcchCir acchcir; + dBgS_ObjAcch acch; + acchcir.SetWall(0.0f, 10.0f); + acch.Set(¤t.pos, &old.pos, this, 1, &acchcir, fopAcM_GetSpeed_p(this), NULL, NULL); + acch.CrrPos(dComIfG_Bgsp()); + mGroundY = acch.GetGroundH(); + mGroundPoly = acch.m_gnd; + + if (layerNo == 3 || layerNo == 10) { + JUTNameTab* nametab_p = mpModels[mIsRepaired]->getModelData()->getJointTree().getJointName(); + for (int i = 0; i < mpModels[mIsRepaired]->getModelData()->getJointNum(); i++) { + if (strcmp(nametab_p->getName(i), "head") == 0) { + mHeadJointNo = i; + break; + } + } + } else if (mLayerNo == 1) { + execute(); + } + + return cPhs_COMPLEATE_e; + } + + return cPhs_INIT_e; +} + +/* 80CC7204-80CC7228 0007E4 0024+00 2/2 0/0 0/0 .text execute__11daSCannon_cFv */ +int daSCannon_c::execute() { + middleExe(); + return 1; +} + +/* 80CC7228-80CC747C 000808 0254+00 1/1 0/0 0/0 .text draw__11daSCannon_cFv */ +int daSCannon_c::draw() { + g_env_light.settingTevStruct(8, ¤t.pos, &tevStr); + g_env_light.setLightTevColorType_MAJI(mpModels[mIsRepaired], &tevStr); + + if (mLayerNo == 3 || mLayerNo == 10) { + mBck.entry(mpModels[mIsRepaired]->getModelData()); + } else if (mLayerNo == 1 && !fopAcM_isSwitch(this, getSw1())) { + if (mpCrashBtk != NULL) { + mpCrashBtk->entry(mpModels[mIsRepaired]->getModelData()); + } + + if (mpPtlModel != NULL) { + dComIfGd_setListDark(); + J3DModelData* modelData_p = mpPtlModel->getModelData(); + + if (mpPtlBtk != NULL) { + mpPtlBtk->entry(modelData_p); + } + + mDoExt_modelUpdateDL(mpPtlModel); + + if (mpPtlBtk != NULL) { + mpPtlBtk->remove(modelData_p); + } + + dComIfGd_setList(); + } + } + + dComIfGd_setList(); + mDoExt_modelUpdateDL(mpModels[mIsRepaired]); + + if (mpCrashBtk != NULL) { + mpCrashBtk->remove(mpModels[mIsRepaired]->getModelData()); + } + + if (mDrawShadow) { + cXyz sp8(current.pos.x, current.pos.y, current.pos.z); + mShadowKey = dComIfGd_setShadow(mShadowKey, 1, mpModels[mIsRepaired], &sp8, 2500.0f, 0.0f, current.pos.y + aREG_F(1), mGroundY + aREG_F(3), mGroundPoly, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + } + + return 1; +} + +/* 80CC747C-80CC7508 000A5C 008C+00 1/1 0/0 0/0 .text Delete__11daSCannon_cFv */ +int daSCannon_c::Delete() { + if (mpBgW != NULL && mpBgW->ChkUsed()) { + dComIfG_Bgsp().Release(mpBgW); + } + + if (mLayerNo == 3 || mLayerNo == 10) { + delEmtAll(); + } + + this->~daSCannon_c(); + return 1; +} + +/* 80CC7508-80CC7578 000AE8 0070+00 3/3 0/0 0/0 .text setModelMtx__11daSCannon_cFv */ +void daSCannon_c::setModelMtx() { + mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); + mDoMtx_stack_c::YrotM(shape_angle.y); + mpModels[mIsRepaired]->setBaseTRMtx(mDoMtx_stack_c::get()); +} + +/* 80CC7578-80CC7608 000B58 0090+00 1/1 0/0 0/0 .text setPtlModelMtx__11daSCannon_cFv */ +void daSCannon_c::setPtlModelMtx() { + if (mpPtlModel != NULL) { + mDoMtx_stack_c::transS(current.pos.x, 1800.0f + current.pos.y, current.pos.z); + mDoMtx_stack_c::YrotM(shape_angle.y); + mDoMtx_stack_c::scaleM(4.0f, 4.0f, 4.0f); + mpPtlModel->setBaseTRMtx(mDoMtx_stack_c::get()); + } +} + +/* 80CC7608-80CC7970 000BE8 0368+00 1/1 0/0 0/0 .text createHeap__11daSCannon_cFv */ +int daSCannon_c::createHeap() { + char* arcname; + int bmd_index; + int dzb_index; + + int layer_no = mLayerNo; + u32 mdl_diff_flags = J3D_DIFF_FLAG(FALSE, FALSE, TRUE, 8, 0, FALSE, 0, 0, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE); + if (layer_no == 3 || layer_no == 10) { + arcname = l_arcName_Comp; + bmd_index = 8; + dzb_index = 11; + mdl_diff_flags = J3D_DIFF_FLAG(FALSE, FALSE, TRUE, 8, 0, FALSE, 0, 0, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE); + } else if (layer_no == 1) { + arcname = l_arcName_Crash; + bmd_index = 5; + dzb_index = 12; + mdl_diff_flags = J3D_DIFF_FLAG(FALSE, FALSE, TRUE, 8, 2, FALSE, 0, 0, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE); + } + + J3DModelData* a_model_data_p = (J3DModelData*)dComIfG_getObjectRes(arcname, bmd_index); + JUT_ASSERT(541, a_model_data_p != 0); + + mpModels[0] = mDoExt_J3DModel__create(a_model_data_p, J3DMdlFlag_DifferedDLBuffer, mdl_diff_flags); + if (mpModels[0] == NULL) { + return 0; + } + + if (layer_no == 3 || layer_no == 10) { + J3DAnmTransform* a_bck_p = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName_Comp, 5); + JUT_ASSERT(562, a_bck_p != 0); + + int rt = mBck.init(a_bck_p, 1, 0, 0.0f, 0, -1, 0); + if (!rt) { + return 0; + } + } else if (layer_no == 1) { + J3DModelData* a_repair_model_data_p = (J3DModelData*)dComIfG_getObjectRes(l_arcName_Crash, 6); + JUT_ASSERT(583, a_repair_model_data_p != 0); + + mpModels[1] = mDoExt_J3DModel__create(a_repair_model_data_p, J3DMdlFlag_DifferedDLBuffer, J3D_DIFF_FLAG(FALSE, FALSE, TRUE, 8, 0, FALSE, 0, 0, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE)); + if (mpModels[1] == NULL) { + return 0; + } + + if (mIsPortal != 0) { + J3DAnmTextureSRTKey* a_btk_p = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName_Crash, 9); + JUT_ASSERT(606, a_btk_p != 0); + mpCrashBtk = new mDoExt_btkAnm(); + if (mpCrashBtk == NULL || !mpCrashBtk->init(a_model_data_p, a_btk_p, 1, 0, 0.0f, 0, -1)) { + return 0; + } + + J3DModelData* a_ptl_model_data_p = (J3DModelData*)dComIfG_getObjectRes(l_arcName_Ptl, 5); + JUT_ASSERT(623, a_ptl_model_data_p != 0); + mpPtlModel = mDoExt_J3DModel__create(a_ptl_model_data_p, J3DMdlFlag_DifferedDLBuffer, J3D_DIFF_FLAG(FALSE, FALSE, TRUE, 8, 2, FALSE, 0, 0, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE)); + if (mpPtlModel == NULL) { + return 0; + } + + a_btk_p = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName_Ptl, 0xC); + JUT_ASSERT(642, a_btk_p != 0); + mpPtlBtk = new mDoExt_btkAnm(); + if (mpPtlBtk == NULL || !mpPtlBtk->init(a_ptl_model_data_p, a_btk_p, 1, 2, 0.0f, 0, -1)) { + return 0; + } + } + } + + mpBgW = new dBgW(); + if (mpBgW == NULL) { + return 0; + } + + mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); + mDoMtx_stack_c::YrotM(shape_angle.y); + MTXCopy(mDoMtx_stack_c::get(), mBgMtx); + + if (mpBgW->Set((cBgD_t*)dComIfG_getObjectRes(arcname, dzb_index), 1, &mBgMtx) == 1) { + return 0; + } + + return 1; +} + +/* 80CC7970-80CC7A10 000F50 00A0+00 1/1 0/0 0/0 .text middleExe__11daSCannon_cFv */ +void daSCannon_c::middleExe() { + if (s_exeProc[mMode] != NULL) { + (this->*s_exeProc[mMode])(); + } + + setModelMtx(); + + if (mLayerNo == 3 || mLayerNo == 10) { + mBck.play(); + } else if (mLayerNo == 1) { + setPtlModelMtx(); + } +} + +/* 80CC7A10-80CC7AB8 000FF0 00A8+00 1/1 0/0 0/0 .text orderEvtInit__11daSCannon_cFv */ +void daSCannon_c::orderEvtInit() { + eventInfo.setArchiveName(l_arcName_Zev); + mEvtIdx = dComIfGp_getEventManager().getEventIdx(this, l_eventName[mDemoType], 0xFF); +#ifdef DEBUG + if (mEvtIdx == -1) { + // "××××××××××××× Sky Cannon d_a_obj_scannon.cpp: Failed to get event\n" + OS_REPORT("×××××××××××××天空砲台 d_a_obj_scannon.cpp:イベント取得失敗\n"); + OS_REPORT("________demo_type:%d\n", mDemoType); + return; + } +#endif + + int priority; + if (mDemoType == DEMOTYPE_FIRE_FIRST) { + priority = 0; + } else { + priority = 2; + } + + fopAcM_orderOtherEventId(this, mEvtIdx, 0xFF, 0xFFFF, priority, 1); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); +} + +/* 80CC7AB8-80CC7C48 001098 0190+00 1/0 0/0 0/0 .text exeModeWait__11daSCannon_cFv */ +void daSCannon_c::exeModeWait() { + if (mLayerNo == 3) { + switch (mDemoType) { + case DEMOTYPE_FIRE_FIRST: + if (fopAcM_checkHookCarryNow(this) && dComIfGp_checkPlayerStatus1(0, 0x10)) { + orderEvtInit(); + mMode = MODE_ORDER_EVT; + if (!fopAcM_isSwitch(this, getSw2())) { + cXyz pos(TKS_SET_POS); + fopAcM_create(PROC_NPC_TKS, 1, &pos, fopAcM_GetRoomNo(this), NULL, NULL, -1); + } + } + break; + case DEMOTYPE_FIRE_TKS: + case DEMOTYPE_FIRE_SECOND: + orderEvtInit(); + mMode = MODE_ORDER_EVT; + } + } else if (mLayerNo == 1 && mIsPortal != 0) { + JUTNameTab* nametab_p = mpModels[mIsRepaired]->getModelData()->getJointTree().getJointName(); + for (int i = 0; i < mpModels[mIsRepaired]->getModelData()->getJointNum(); i++) { + if (strcmp(nametab_p->getName(i), "Ni_SkyCannon_crash") == 0) { + mCrashJointNo = i; + break; + } + } + + orderEvtInit(); + mMode = MODE_ORDER_EVT; + } +} + +/* 80CC7C48-80CC7D14 001228 00CC+00 1/0 0/0 0/0 .text exeModeOrderEvt__11daSCannon_cFv */ +void daSCannon_c::exeModeOrderEvt() { + if (eventInfo.checkCommandDemoAccrpt()) { + const char* staffName = mDemoType == DEMOTYPE_FIRE_TKS ? "Tks" : l_staffName; + mStaffId = dComIfGp_evmng_getMyStaffId(staffName, NULL, 0); + mMode = MODE_ACTION_EVT; + demoModeInit(0); + return; + } + + int priority; + if (mDemoType == DEMOTYPE_FIRE_FIRST) { + priority = 0; + } else { + priority = 2; + } + + fopAcM_orderOtherEventId(this, mEvtIdx, 0xFF, 0xFFFF, priority, 1); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); +} /* 80CC9378-80CC93A8 000074 0030+00 1/2 0/0 0/0 .data s_exeProc__11daSCannon_c */ -SECTION_DATA u8 daSCannon_c::s_exeProc[48] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daSCannon_c::*daSCannon_c::s_exeProc[])() = { + &daSCannon_c::exeModeWait, + &daSCannon_c::exeModeOrderEvt, + &daSCannon_c::exeModeActionEvt, + &daSCannon_c::exeModeEnd, }; /* 80CC93A8-80CC93B0 -00001 0008+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_WARP_END */ -SECTION_DATA static void* CUT_TYPE_TABLE_WARP_END[2] = { - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0x9B), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xA0), +char* CUT_TYPE_TABLE_WARP_END[2] = { + "WAIT", + "MOVE", }; /* 80CC93B0-80CC93BC -00001 000C+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_FIRE_TKS */ -SECTION_DATA static void* CUT_TYPE_TABLE_FIRE_TKS[3] = { - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xA5), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xAF), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xB8), +char* CUT_TYPE_TABLE_FIRE_TKS[3] = { + "0001_WAIT", + "0002_RUN", + "0003_JUMP", }; /* 80CC93BC-80CC93C0 -00001 0004+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_FIRE_FIRST */ -SECTION_DATA static void* CUT_TYPE_TABLE_FIRE_FIRST = - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xC2); +char* CUT_TYPE_TABLE_FIRE_FIRST[1] = { + "LINK_IN", +}; /* 80CC93C0-80CC93D0 -00001 0010+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_FIRE_SECOND */ -SECTION_DATA static void* CUT_TYPE_TABLE_FIRE_SECOND[4] = { - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xCA), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xA0), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xCE), - (void*)(((char*)&d_a_obj_scannon__stringBase0) + 0xD3), +char* CUT_TYPE_TABLE_FIRE_SECOND[4] = { + "SET", + "MOVE", + "FIRE", + "FINISH", }; -/* 80CC93D0-80CC93DC -00001 000C+00 0/1 0/0 0/0 .data @4406 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4406[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitWarpEndWait__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC93DC-80CC93E8 -00001 000C+00 0/1 0/0 0/0 .data @4407 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4407[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeWarpEndWait__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC93E8-80CC93F4 -00001 000C+00 0/1 0/0 0/0 .data @4408 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4408[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitWarpEndMove__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC93F4-80CC9400 -00001 000C+00 0/1 0/0 0/0 .data @4409 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4409[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeWarpEndMove__11daSCannon_cFv, -}; -#pragma pop - /* 80CC9400-80CC9430 0000FC 0030+00 1/1 0/0 0/0 .data s_demoExeProc_WarpEnd__11daSCannon_c */ -SECTION_DATA u8 daSCannon_c::s_demoExeProc_WarpEnd[48] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daSCannon_c::*daSCannon_c::s_demoExeProc_WarpEnd[][2])() = { + {&daSCannon_c::demoInitWarpEndWait, &daSCannon_c::demoExeWarpEndWait}, + {&daSCannon_c::demoInitWarpEndMove, &daSCannon_c::demoExeWarpEndMove}, }; /* 80CC9430-80CC9478 00012C 0048+00 1/1 0/0 0/0 .data s_demoExeProc_FireTks__11daSCannon_c */ -SECTION_DATA u8 daSCannon_c::s_demoExeProc_FireTks[72] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daSCannon_c::*daSCannon_c::s_demoExeProc_FireTks[][2])() = { + {NULL, NULL}, + {NULL, NULL}, + {NULL, NULL}, }; -/* 80CC9478-80CC9484 -00001 000C+00 0/1 0/0 0/0 .data @4410 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4410[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitLinkIn__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC9484-80CC9490 -00001 000C+00 0/1 0/0 0/0 .data @4411 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4411[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeLinkIn__11daSCannon_cFv, -}; -#pragma pop - /* 80CC9490-80CC94A8 00018C 0018+00 1/1 0/0 0/0 .data s_demoExeProc_FireFirst__11daSCannon_c */ -SECTION_DATA u8 daSCannon_c::s_demoExeProc_FireFirst[24] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daSCannon_c::*daSCannon_c::s_demoExeProc_FireFirst[][2])() = { + {&daSCannon_c::demoInitLinkIn, &daSCannon_c::demoExeLinkIn}, }; -/* 80CC94A8-80CC94B4 -00001 000C+00 0/1 0/0 0/0 .data @4412 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4412[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitSet__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC94B4-80CC94C0 -00001 000C+00 0/1 0/0 0/0 .data @4413 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4413[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeSet__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC94C0-80CC94CC -00001 000C+00 0/1 0/0 0/0 .data @4414 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4414[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitMove__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC94CC-80CC94D8 -00001 000C+00 0/1 0/0 0/0 .data @4415 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4415[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeMove__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC94D8-80CC94E4 -00001 000C+00 0/1 0/0 0/0 .data @4416 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4416[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitFire__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC94E4-80CC94F0 -00001 000C+00 0/1 0/0 0/0 .data @4417 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4417[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeFire__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC94F0-80CC94FC -00001 000C+00 0/1 0/0 0/0 .data @4418 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4418[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitFinish__11daSCannon_cFv, -}; -#pragma pop - -/* 80CC94FC-80CC9508 -00001 000C+00 0/1 0/0 0/0 .data @4419 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4419[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeFinish__11daSCannon_cFv, -}; -#pragma pop - /* 80CC9508-80CC9568 000204 0060+00 1/1 0/0 0/0 .data s_demoExeProc_FireSecond__11daSCannon_c */ -SECTION_DATA u8 daSCannon_c::s_demoExeProc_FireSecond[96] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daSCannon_c::*daSCannon_c::s_demoExeProc_FireSecond[][2])() = { + {&daSCannon_c::demoInitSet, &daSCannon_c::demoExeSet}, + {&daSCannon_c::demoInitMove, &daSCannon_c::demoExeMove}, + {&daSCannon_c::demoInitFire, &daSCannon_c::demoExeFire}, + {&daSCannon_c::demoInitFinish, &daSCannon_c::demoExeFinish}, }; +/* 80CC7D14-80CC7EBC 0012F4 01A8+00 1/0 0/0 0/0 .text exeModeActionEvt__11daSCannon_cFv + */ +void daSCannon_c::exeModeActionEvt() { + if (dComIfGp_evmng_endCheck(mEvtIdx) != 0) { + dComIfGp_event_reset(); + if (mLayerNo == 3 || mLayerNo == 10) { + switch (mDemoType) { + case DEMOTYPE_FIRE_FIRST: + if (fopAcM_isSwitch(this, getSw2())) { + mDemoType = DEMOTYPE_FIRE_SECOND; + } else { + mDemoType = DEMOTYPE_FIRE_TKS; + } + mMode = MODE_WAIT; + return; + case DEMOTYPE_FIRE_TKS: + mDemoType = DEMOTYPE_FIRE_SECOND; + mMode = MODE_WAIT; + return; + case DEMOTYPE_FIRE_SECOND: + mMode = MODE_END; + return; + } + } else if (mLayerNo == 1) { + if (!fopAcM_isSwitch(this, getSw1())) { + fopAcM_onSwitch(this, getSw1()); + } + mDrawShadow = TRUE; + mMode = MODE_END; + } + } else { + if ((mLayerNo == 3 || mLayerNo == 10) && fopAcM_isSwitch(this, getSw2())) { + dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + } + demoExe(); + } +} + +/* 80CC7EBC-80CC7EC0 00149C 0004+00 1/0 0/0 0/0 .text exeModeEnd__11daSCannon_cFv */ +void daSCannon_c::exeModeEnd() {} + +/* 80CC91C4-80CC91F4 -00001 0030+00 2/2 0/0 0/0 .rodata s_demoTable__11daSCannon_c */ +const daSCannon_c::demoTable_s daSCannon_c::s_demoTable[] = { + {s_demoExeProc_WarpEnd, CUT_TYPE_TABLE_WARP_END, 2}, + {s_demoExeProc_FireFirst, CUT_TYPE_TABLE_FIRE_FIRST, 1}, + {s_demoExeProc_FireTks, CUT_TYPE_TABLE_FIRE_TKS, 3}, + {s_demoExeProc_FireSecond, CUT_TYPE_TABLE_FIRE_SECOND, 4}, +}; + +/* 80CC7EC0-80CC7FAC 0014A0 00EC+00 1/1 0/0 0/0 .text demoExe__11daSCannon_cFv */ +void daSCannon_c::demoExe() { + char** cut_table = s_demoTable[mDemoType].cut_table; + int cut_num = s_demoTable[mDemoType].cut_num; + int act_idx = dComIfGp_evmng_getMyActIdx(mStaffId, cut_table, cut_num, 0, 0); + if (act_idx != -1) { + if (dComIfGp_evmng_getIsAddvance(mStaffId)) { + demoModeInit(act_idx); + } + + if (s_demoTable[mDemoType].demo_proc_table[act_idx][1] != NULL) { + (this->*s_demoTable[mDemoType].demo_proc_table[act_idx][1])(); + } + } +} + +/* 80CC7FAC-80CC8044 00158C 0098+00 2/2 0/0 0/0 .text demoModeInit__11daSCannon_cFi */ +void daSCannon_c::demoModeInit(int i_actIdx) { + if (i_actIdx < 0 || i_actIdx >= s_demoTable[mDemoType].cut_num) { + return; + } + + if (s_demoTable[mDemoType].demo_proc_table[i_actIdx][0] != NULL) { + (this->*s_demoTable[mDemoType].demo_proc_table[i_actIdx][0])(); + } +} + +/* 80CC8044-80CC8048 001624 0004+00 1/0 0/0 0/0 .text demoInitLinkIn__11daSCannon_cFv */ +void daSCannon_c::demoInitLinkIn() {} + +/* 80CC8048-80CC8108 001628 00C0+00 1/0 0/0 0/0 .text demoExeLinkIn__11daSCannon_cFv */ +void daSCannon_c::demoExeLinkIn() { + if (!fopAcM_checkHookCarryNow(this)) { + daPy_py_c* player_p = daPy_getPlayerActorClass(); + if (player_p != NULL) { + player_p->onPlayerNoDraw(); + player_p->onPlayerShadowNoDraw(); + + cXyz pos(-102065.44f, -17973.893f, 53981.64f); + player_p->setPlayerPosAndAngle(&pos, player_p->shape_angle.y, 0); + mpBgW->OffRoofRegist(); + } + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CC8108-80CC81DC 0016E8 00D4+00 1/0 0/0 0/0 .text demoInitSet__11daSCannon_cFv */ +void daSCannon_c::demoInitSet() { + fopAcM_seStartCurrent(this, Z2SE_OBJ_TCANNON_ACTION_LAKE, 0); + mBck.setPlaySpeed(1.0f); + initEmtRt(mHeadJointNo, ARRAY_SIZE(mpEmtSmk), SMK_PARTICLE_NAME, mpEmtSmk); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER3, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); +} + +/* 80CC81DC-80CC8274 0017BC 0098+00 1/0 0/0 0/0 .text demoExeSet__11daSCannon_cFv */ +void daSCannon_c::demoExeSet() { + exeEmtRt(mHeadJointNo, ARRAY_SIZE(mpEmtSmk), mpEmtSmk); + if (mBck.checkFrame(84)) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CC8274-80CC8278 001854 0004+00 1/0 0/0 0/0 .text demoInitMove__11daSCannon_cFv */ +void daSCannon_c::demoInitMove() {} + +/* 80CC8278-80CC8378 001858 0100+00 1/0 0/0 0/0 .text demoExeMove__11daSCannon_cFv */ +void daSCannon_c::demoExeMove() { + exeEmtRt(mHeadJointNo, ARRAY_SIZE(mpEmtSmk), mpEmtSmk); + if (mBck.checkFrame(104.0f)) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + } else if (mBck.checkFrame(120.0f)) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + } else if (mBck.checkFrame(130.0f)) { + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CC8378-80CC83CC 001958 0054+00 1/0 0/0 0/0 .text demoInitFire__11daSCannon_cFv */ +void daSCannon_c::demoInitFire() { + dComIfGp_getVibration().StartQuake(3, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); +} + +/* 80CC83CC-80CC8430 0019AC 0064+00 1/0 0/0 0/0 .text demoExeFire__11daSCannon_cFv */ +void daSCannon_c::demoExeFire() { + exeEmtRt(mHeadJointNo, ARRAY_SIZE(mpEmtSmk), mpEmtSmk); + if (mBck.checkFrame(235.0f)) { + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CC8430-80CC8538 001A10 0108+00 1/0 0/0 0/0 .text demoInitFinish__11daSCannon_cFv */ +void daSCannon_c::demoInitFinish() { +#ifdef DEBUG + if (dComIfG_play_c::getLayerNo(0) == 3 || dComIfG_play_c::getLayerNo(0) == 10) { + J3DJoint* joint_p = mpModels[mIsRepaired]->getModelData()->getJointNodePointer(mHeadJointNo); + if (joint_p == NULL) { + // "××××××Sky Cannon—The head joint is missing!!!! ××××××" + OS_REPORT("______________________××××××天空砲台 頭部分のジョイントがありません!!!! ××××××____________\n"); + JUT_ASSERT(1351, 0); + } + } +#endif + + fopAcM_seStartCurrent(this, Z2SE_OBJ_BOMB_EXPLODE, 0); + fopAcM_OffStatus(this, 0x80); + + dComIfGp_getVibration().StopQuake(0x1F); + dComIfGp_getVibration().StartShock(8, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + + int* timer_p = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer"); + if (timer_p != NULL) { + mTimer = *timer_p; + } else { + mTimer = 1; + } +} + +/* 80CC8538-80CC8648 001B18 0110+00 1/0 0/0 0/0 .text demoExeFinish__11daSCannon_cFv */ +void daSCannon_c::demoExeFinish() { + exeEmtRt(mHeadJointNo, ARRAY_SIZE(mpEmtSmk), mpEmtSmk); + mDemoFinishTimer++; + + if (mDemoFinishTimer == 15) { + mDoAud_seStart(Z2SE_AL_V_CANON_JUMP, NULL, 0, 0); + initEmtLine(); + } else if (mDemoFinishTimer > 15) { + exeEmtLine(); + } + + if (mBck.isStop() && cLib_calcTimer(&mTimer) == 0) { + dComIfGp_evmng_cutEnd(mStaffId); + changeScene(); + } +} + +/* 80CC8648-80CC8714 001C28 00CC+00 1/0 0/0 0/0 .text demoInitWarpEndWait__11daSCannon_cFv */ +void daSCannon_c::demoInitWarpEndWait() { + int* timer_p = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer"); + if (timer_p != NULL) { + mTimer = *timer_p; + } else { + mTimer = 1; + } + + mpPtlBtk->setPlaySpeed(1.0f); + + daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0); + if (player_p != NULL) { + cXyz pos(-101987.7f, -18470.0f, 55863.813f); + player_p->setPlayerPosAndAngle(&pos, -0x7B71, 0); + } +} + +/* 80CC8714-80CC8804 001CF4 00F0+00 1/0 0/0 0/0 .text demoExeWarpEndWait__11daSCannon_cFv + */ +void daSCannon_c::demoExeWarpEndWait() { + if (mTimer == 35) { + initEmtRt(mCrashJointNo, ARRAY_SIZE(mpEmtApp), APP_PARTICLE_NAME, mpEmtApp); + fopAcM_seStartCurrent(this, Z2SE_OBJ_TCANNON_WARP_OUT, 0); + } else if (mTimer < 35) { + exeEmtRt(mCrashJointNo, ARRAY_SIZE(mpEmtApp), mpEmtApp); + } + + if (cLib_calcTimer(&mTimer) == 0) { + dComIfGp_evmng_cutEnd(mStaffId); + } + + mpCrashBtk->play(); + mpPtlBtk->play(); +} + +/* 80CC8804-80CC8818 001DE4 0014+00 1/0 0/0 0/0 .text demoInitWarpEndMove__11daSCannon_cFv */ +void daSCannon_c::demoInitWarpEndMove() { + mpCrashBtk->setPlaySpeed(1.0f); +} + +/* 80CC8818-80CC88A8 001DF8 0090+00 1/0 0/0 0/0 .text demoExeWarpEndMove__11daSCannon_cFv + */ +void daSCannon_c::demoExeWarpEndMove() { + exeEmtRt(mCrashJointNo, ARRAY_SIZE(mpEmtApp), mpEmtApp); + if (mpCrashBtk->isStop()) { + dComIfGp_evmng_cutEnd(mStaffId); + } + + mpCrashBtk->play(); + mpPtlBtk->play(); +} + +/* 80CC88A8-80CC8998 001E88 00F0+00 2/2 0/0 0/0 .text changeScene__11daSCannon_cFv */ +void daSCannon_c::changeScene() { + if (mLayerNo == 3 || mLayerNo == 10) { + if (dComIfGp_getVibration().CheckQuake()) { + dComIfGp_getVibration().StopQuake(0x1F); + } + + fopAcM_OnStatus(this, fopAcM_STATUS_UNK_000080); + + if (field_0x619 == 0) { + field_0x619 = 1; + } + + if (!fopAcM_isSwitch(this, getSw2())) { + fopAcM_onSwitch(this, getSw2()); + } + + dStage_changeScene(7, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1); + } +} + +/* 80CC8998-80CC8A30 001F78 0098+00 1/1 0/0 0/0 .text init__11daSCannon_cFv */ +void daSCannon_c::init() { + int layerNo = mLayerNo; + + mTimer = 0; + mShadowKey = 0; + field_0x619 = 0; + mDrawShadow = TRUE; + + if (layerNo == 3 || layerNo == 10) { + mMode = MODE_WAIT; + mDemoType = DEMOTYPE_FIRE_FIRST; + mIsRepaired = FALSE; + mDemoFinishTimer = 0; + mHeadJointNo = 0xFFFF; + } else if (layerNo == 1) { + if (mIsPortal) { + mDrawShadow = FALSE; + mMode = MODE_WAIT; + } else { + mMode = MODE_END; + } + + mIsRepaired = FALSE; + mDemoType = DEMOTYPE_WARP_END; + mCrashJointNo = 0xFFFF; + } +} + +/* 80CC8A30-80CC8B60 002010 0130+00 2/2 0/0 0/0 .text + * initEmtRt__11daSCannon_cFUsiPCUsPP14JPABaseEmitter */ +void daSCannon_c::initEmtRt(u16 i_jointNo, int i_emtNum, const u16* i_name_list, JPABaseEmitter** i_emt_list) { + MtxP mtx = mpModels[mIsRepaired]->getAnmMtx(i_jointNo); + if (mtx != NULL) { + cXyz pos(mtx[0][3], mtx[1][3], mtx[2][3]); + csXyz rot(shape_angle); + cXyz size(1.0f, 1.0f, 1.0f); + + for (int i = 0; i < i_emtNum; i++) { + i_emt_list[i] = dComIfGp_particle_set(i_name_list[i], &pos, &rot, &size); + if (i_emt_list[i] != NULL) { + i_emt_list[i]->setGlobalRTMatrix(mtx); + } + } + } +} + +/* 80CC8B60-80CC8BF4 002140 0094+00 6/6 0/0 0/0 .text + * exeEmtRt__11daSCannon_cFUsiPP14JPABaseEmitter */ +void daSCannon_c::exeEmtRt(u16 i_jointNo, int i_emtNum, JPABaseEmitter** i_emt_list) { + MtxP mtx = mpModels[mIsRepaired]->getAnmMtx(i_jointNo); + if (mtx != NULL) { + for (int i = 0; i < i_emtNum; i++) { + if (i_emt_list[i] != NULL) { + i_emt_list[i]->setGlobalRTMatrix(mtx); + } + } + } +} + +/* 80CC8BF4-80CC8CDC 0021D4 00E8+00 1/1 0/0 0/0 .text initEmtLine__11daSCannon_cFv */ +void daSCannon_c::initEmtLine() { + cXyz pos; + csXyz rot; + + camera_class* camera_p = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + if (camera_p != NULL) { + pos = *fopCamM_GetEye_p(camera_p); + rot.set(dCam_getAngleX(camera_p), dCam_getAngleY(camera_p), 0); + } + + mpEmtLine = dComIfGp_particle_set(dPa_RM(ID_ZF_S_TOBYCANNON00LINE), &pos, &tevStr, &rot, NULL); +} + +/* 80CC8CDC-80CC8DA0 0022BC 00C4+00 1/1 0/0 0/0 .text exeEmtLine__11daSCannon_cFv */ +void daSCannon_c::exeEmtLine() { + cXyz pos; + JGeometry::TVec3 rot; + if (mpEmtLine != NULL) { + camera_class* camera_p = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + if (camera_p != NULL) { + pos = *fopCamM_GetEye_p(camera_p); + rot.x = dCam_getAngleX(camera_p); + rot.y = dCam_getAngleY(camera_p); + rot.z = 0; + } + mpEmtLine->setGlobalTranslation(pos.x, pos.y, pos.z); + mpEmtLine->setGlobalRotation(rot); + } +} + +/* 80CC8DA0-80CC8DDC 002380 003C+00 1/1 0/0 0/0 .text delEmtAll__11daSCannon_cFv */ +void daSCannon_c::delEmtAll() { + if (mpEmtLine != NULL) { + mpEmtLine->becomeInvalidEmitter(); + mpEmtLine->quitImmortalEmitter(); + mpEmtLine = NULL; + } +} + +/* 80CC8DDC-80CC8E60 0023BC 0084+00 0/0 0/0 1/1 .text setCannonRepair__11daSCannon_cFv */ +void daSCannon_c::setCannonRepair() { + if (dComIfG_play_c::getLayerNo(0) == 1) { + mIsRepaired = TRUE; + setModelMtx(); + fopAcM_SetMtx(this, mpModels[mIsRepaired]->getBaseTRMtx()); + dComIfGs_offSaveSwitch(6, 0x35); + dComIfGs_onSaveSwitch(6, 0x36); + } +} + +/* 80CC8E60-80CC8EB4 002440 0054+00 1/0 0/0 0/0 .text daSCannon_create__FP11daSCannon_c + */ +static int daSCannon_create(daSCannon_c* i_this) { + fopAcM_SetupActor(i_this, daSCannon_c); + return i_this->create(); +} + +/* 80CC8EB4-80CC8ED4 002494 0020+00 1/0 0/0 0/0 .text daSCannon_Delete__FP11daSCannon_c + */ +static int daSCannon_Delete(daSCannon_c* i_this) { + return i_this->Delete(); +} + +/* 80CC8ED4-80CC8EF4 0024B4 0020+00 1/0 0/0 0/0 .text daSCannon_execute__FP11daSCannon_c + */ +static int daSCannon_execute(daSCannon_c* i_this) { + return i_this->execute(); +} + +/* 80CC8EF4-80CC8F14 0024D4 0020+00 1/0 0/0 0/0 .text daSCannon_draw__FP11daSCannon_c */ +static int daSCannon_draw(daSCannon_c* i_this) { + return i_this->draw(); +} + /* 80CC9568-80CC9588 -00001 0020+00 1/0 0/0 0/0 .data daSCannon_METHODS */ static actor_method_class daSCannon_METHODS = { - (process_method_func)daSCannon_create__FP11daSCannon_c, - (process_method_func)daSCannon_Delete__FP11daSCannon_c, - (process_method_func)daSCannon_execute__FP11daSCannon_c, + (process_method_func)daSCannon_create, + (process_method_func)daSCannon_Delete, + (process_method_func)daSCannon_execute, 0, - (process_method_func)daSCannon_draw__FP11daSCannon_c, + (process_method_func)daSCannon_draw, }; /* 80CC9588-80CC95B8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_SCannon */ @@ -510,534 +929,3 @@ extern actor_process_profile_definition g_profile_Obj_SCannon = { fopAc_ENV_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 80CC95B8-80CC95C4 0002B4 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; - -/* 80CC95C4-80CC95E8 0002C0 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80CC9174, - (void*)NULL, - (void*)NULL, - (void*)func_80CC916C, -}; - -/* 80CC95E8-80CC95F4 0002E4 000C+00 2/2 0/0 0/0 .data __vt__11daSCannon_c */ -SECTION_DATA extern void* __vt__11daSCannon_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__11daSCannon_cFv, -}; - -/* 80CC95F4-80CC9600 0002F0 000C+00 4/4 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; - -/* 80CC6B0C-80CC6BC8 0000EC 00BC+00 2/2 0/0 0/0 .text __ct__11daSCannon_cFv */ -daSCannon_c::daSCannon_c() { - // NONMATCHING -} - -/* 80CC6BC8-80CC6C10 0001A8 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING -} - -/* 80CC6C10-80CC6D10 0001F0 0100+00 1/0 0/0 0/0 .text __dt__11daSCannon_cFv */ -daSCannon_c::~daSCannon_c() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC9188-80CC9194 000000 000C+00 11/11 0/0 0/0 .rodata TKS_SET_POS */ -SECTION_RODATA static u8 const TKS_SET_POS[12] = { - 0xC7, 0xC0, 0x5D, 0x9D, 0xC6, 0x8F, 0x55, 0x96, 0x47, 0x4B, 0x59, 0x28, -}; -COMPILER_STRIP_GATE(0x80CC9188, &TKS_SET_POS); - -/* 80CC9194-80CC919C 00000C 0006+02 0/1 0/0 0/0 .rodata SMK_PARTICLE_NAME */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const SMK_PARTICLE_NAME[6 + 2 /* padding */] = { - 0x89, - 0xD9, - 0x89, - 0xDA, - 0x89, - 0xDB, - /* padding */ - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80CC9194, &SMK_PARTICLE_NAME); -#pragma pop - -/* 80CC919C-80CC91A4 000014 0006+02 0/1 0/0 0/0 .rodata APP_PARTICLE_NAME */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const APP_PARTICLE_NAME[6 + 2 /* padding */] = { - 0x8B, - 0x28, - 0x8B, - 0x29, - 0x8B, - 0x2A, - /* padding */ - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80CC919C, &APP_PARTICLE_NAME); -#pragma pop - -/* 80CC91A4-80CC91A8 00001C 0004+00 0/1 0/0 0/0 .rodata @3992 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3992 = 5.0f; -COMPILER_STRIP_GATE(0x80CC91A4, &lit_3992); -#pragma pop - -/* 80CC91A8-80CC91AC 000020 0004+00 0/1 0/0 0/0 .rodata @3993 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3993 = 500.0f; -COMPILER_STRIP_GATE(0x80CC91A8, &lit_3993); -#pragma pop - -/* 80CC91AC-80CC91B0 000024 0004+00 4/11 0/0 0/0 .rodata @3994 */ -SECTION_RODATA static u8 const lit_3994[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80CC91AC, &lit_3994); - -/* 80CC91B0-80CC91B4 000028 0004+00 0/1 0/0 0/0 .rodata @3995 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3995 = 10.0f; -COMPILER_STRIP_GATE(0x80CC91B0, &lit_3995); -#pragma pop - -/* 80CC6D10-80CC7124 0002F0 0414+00 1/1 0/0 0/0 .text create__11daSCannon_cFv */ -void daSCannon_c::create() { - // NONMATCHING -} - -/* 80CC7124-80CC7194 000704 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 80CC7194-80CC7204 000774 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 80CC7204-80CC7228 0007E4 0024+00 2/2 0/0 0/0 .text execute__11daSCannon_cFv */ -void daSCannon_c::execute() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC91B4-80CC91B8 00002C 0004+00 0/1 0/0 0/0 .rodata @4113 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4113 = 2500.0f; -COMPILER_STRIP_GATE(0x80CC91B4, &lit_4113); -#pragma pop - -/* 80CC91B8-80CC91BC 000030 0004+00 4/12 0/0 0/0 .rodata @4114 */ -SECTION_RODATA static f32 const lit_4114 = 1.0f; -COMPILER_STRIP_GATE(0x80CC91B8, &lit_4114); - -/* 80CC7228-80CC747C 000808 0254+00 1/1 0/0 0/0 .text draw__11daSCannon_cFv */ -void daSCannon_c::draw() { - // NONMATCHING -} - -/* 80CC747C-80CC7508 000A5C 008C+00 1/1 0/0 0/0 .text Delete__11daSCannon_cFv */ -void daSCannon_c::Delete() { - // NONMATCHING -} - -/* 80CC7508-80CC7578 000AE8 0070+00 3/3 0/0 0/0 .text setModelMtx__11daSCannon_cFv */ -void daSCannon_c::setModelMtx() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC91BC-80CC91C0 000034 0004+00 1/1 0/0 0/0 .rodata @4157 */ -SECTION_RODATA static f32 const lit_4157 = 1800.0f; -COMPILER_STRIP_GATE(0x80CC91BC, &lit_4157); - -/* 80CC91C0-80CC91C4 000038 0004+00 1/1 0/0 0/0 .rodata @4158 */ -SECTION_RODATA static f32 const lit_4158 = 4.0f; -COMPILER_STRIP_GATE(0x80CC91C0, &lit_4158); - -/* 80CC7578-80CC7608 000B58 0090+00 1/1 0/0 0/0 .text setPtlModelMtx__11daSCannon_cFv */ -void daSCannon_c::setPtlModelMtx() { - // NONMATCHING -} - -/* 80CC7608-80CC7970 000BE8 0368+00 1/1 0/0 0/0 .text createHeap__11daSCannon_cFv */ -void daSCannon_c::createHeap() { - // NONMATCHING -} - -/* 80CC7970-80CC7A10 000F50 00A0+00 1/1 0/0 0/0 .text middleExe__11daSCannon_cFv */ -void daSCannon_c::middleExe() { - // NONMATCHING -} - -/* 80CC7A10-80CC7AB8 000FF0 00A8+00 1/1 0/0 0/0 .text orderEvtInit__11daSCannon_cFv */ -void daSCannon_c::orderEvtInit() { - // NONMATCHING -} - -/* 80CC7AB8-80CC7C48 001098 0190+00 1/0 0/0 0/0 .text exeModeWait__11daSCannon_cFv */ -void daSCannon_c::exeModeWait() { - // NONMATCHING -} - -/* 80CC7C48-80CC7D14 001228 00CC+00 1/0 0/0 0/0 .text exeModeOrderEvt__11daSCannon_cFv */ -void daSCannon_c::exeModeOrderEvt() { - // NONMATCHING -} - -/* 80CC7D14-80CC7EBC 0012F4 01A8+00 1/0 0/0 0/0 .text exeModeActionEvt__11daSCannon_cFv - */ -void daSCannon_c::exeModeActionEvt() { - // NONMATCHING -} - -/* 80CC7EBC-80CC7EC0 00149C 0004+00 1/0 0/0 0/0 .text exeModeEnd__11daSCannon_cFv */ -void daSCannon_c::exeModeEnd() { - /* empty function */ -} - -/* ############################################################################################## */ -/* 80CC93A8-80CC93B0 -00001 0008+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_WARP_END */ -extern "C" void* CUT_TYPE_TABLE_WARP_END[2]; - -/* 80CC93B0-80CC93BC -00001 000C+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_FIRE_TKS */ -extern "C" void* CUT_TYPE_TABLE_FIRE_TKS[3]; - -/* 80CC93BC-80CC93C0 -00001 0004+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_FIRE_FIRST */ -extern "C" void* CUT_TYPE_TABLE_FIRE_FIRST; - -/* 80CC93C0-80CC93D0 -00001 0010+00 1/0 0/0 0/0 .data CUT_TYPE_TABLE_FIRE_SECOND */ -extern "C" void* CUT_TYPE_TABLE_FIRE_SECOND[4]; - -/* 80CC9400-80CC9430 0000FC 0030+00 1/1 0/0 0/0 .data s_demoExeProc_WarpEnd__11daSCannon_c */ -extern "C" u8 s_demoExeProc_WarpEnd__11daSCannon_c[48]; - -/* 80CC9430-80CC9478 00012C 0048+00 1/1 0/0 0/0 .data s_demoExeProc_FireTks__11daSCannon_c */ -extern "C" u8 s_demoExeProc_FireTks__11daSCannon_c[72]; - -/* 80CC9490-80CC94A8 00018C 0018+00 1/1 0/0 0/0 .data s_demoExeProc_FireFirst__11daSCannon_c */ -extern "C" u8 s_demoExeProc_FireFirst__11daSCannon_c[24]; - -/* 80CC9508-80CC9568 000204 0060+00 1/1 0/0 0/0 .data s_demoExeProc_FireSecond__11daSCannon_c */ -extern "C" u8 s_demoExeProc_FireSecond__11daSCannon_c[96]; - -/* 80CC91C4-80CC91F4 -00001 0030+00 2/2 0/0 0/0 .rodata s_demoTable__11daSCannon_c */ -SECTION_RODATA void* const daSCannon_c::s_demoTable[12] = { - (void*)&daSCannon_c::s_demoExeProc_WarpEnd, - (void*)&CUT_TYPE_TABLE_WARP_END, - (void*)0x00000002, - (void*)&daSCannon_c::s_demoExeProc_FireFirst, - (void*)&CUT_TYPE_TABLE_FIRE_FIRST, - (void*)0x00000001, - (void*)&daSCannon_c::s_demoExeProc_FireTks, - (void*)&CUT_TYPE_TABLE_FIRE_TKS, - (void*)0x00000003, - (void*)&daSCannon_c::s_demoExeProc_FireSecond, - (void*)&CUT_TYPE_TABLE_FIRE_SECOND, - (void*)0x00000004, -}; -COMPILER_STRIP_GATE(0x80CC91C4, &daSCannon_c::s_demoTable); - -/* 80CC7EC0-80CC7FAC 0014A0 00EC+00 1/1 0/0 0/0 .text demoExe__11daSCannon_cFv */ -void daSCannon_c::demoExe() { - // NONMATCHING -} - -/* 80CC7FAC-80CC8044 00158C 0098+00 2/2 0/0 0/0 .text demoModeInit__11daSCannon_cFi */ -void daSCannon_c::demoModeInit(int param_0) { - // NONMATCHING -} - -/* 80CC8044-80CC8048 001624 0004+00 1/0 0/0 0/0 .text demoInitLinkIn__11daSCannon_cFv */ -void daSCannon_c::demoInitLinkIn() { - /* empty function */ -} - -/* ############################################################################################## */ -/* 80CC91F4-80CC91F8 00006C 0004+00 0/1 0/0 0/0 .rodata @4476 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4476 = 0xC7C758B8; -COMPILER_STRIP_GATE(0x80CC91F4, &lit_4476); -#pragma pop - -/* 80CC91F8-80CC91FC 000070 0004+00 0/1 0/0 0/0 .rodata @4477 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4477 = 0xC68C6BC9; -COMPILER_STRIP_GATE(0x80CC91F8, &lit_4477); -#pragma pop - -/* 80CC91FC-80CC9200 000074 0004+00 0/1 0/0 0/0 .rodata @4478 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4478 = 0x4752DDA4; -COMPILER_STRIP_GATE(0x80CC91FC, &lit_4478); -#pragma pop - -/* 80CC8048-80CC8108 001628 00C0+00 1/0 0/0 0/0 .text demoExeLinkIn__11daSCannon_cFv */ -void daSCannon_c::demoExeLinkIn() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC9200-80CC9204 000078 0004+00 0/4 0/0 0/0 .rodata @4499 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4499 = -1.0f; -COMPILER_STRIP_GATE(0x80CC9200, &lit_4499); -#pragma pop - -/* 80CC8108-80CC81DC 0016E8 00D4+00 1/0 0/0 0/0 .text demoInitSet__11daSCannon_cFv */ -void daSCannon_c::demoInitSet() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC9204-80CC9208 00007C 0004+00 0/1 0/0 0/0 .rodata @4515 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4515 = 84.0f; -COMPILER_STRIP_GATE(0x80CC9204, &lit_4515); -#pragma pop - -/* 80CC81DC-80CC8274 0017BC 0098+00 1/0 0/0 0/0 .text demoExeSet__11daSCannon_cFv */ -void daSCannon_c::demoExeSet() { - // NONMATCHING -} - -/* 80CC8274-80CC8278 001854 0004+00 1/0 0/0 0/0 .text demoInitMove__11daSCannon_cFv */ -void daSCannon_c::demoInitMove() { - /* empty function */ -} - -/* ############################################################################################## */ -/* 80CC9208-80CC920C 000080 0004+00 0/1 0/0 0/0 .rodata @4545 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4545 = 104.0f; -COMPILER_STRIP_GATE(0x80CC9208, &lit_4545); -#pragma pop - -/* 80CC920C-80CC9210 000084 0004+00 0/1 0/0 0/0 .rodata @4546 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4546 = 120.0f; -COMPILER_STRIP_GATE(0x80CC920C, &lit_4546); -#pragma pop - -/* 80CC9210-80CC9214 000088 0004+00 0/1 0/0 0/0 .rodata @4547 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4547 = 130.0f; -COMPILER_STRIP_GATE(0x80CC9210, &lit_4547); -#pragma pop - -/* 80CC8278-80CC8378 001858 0100+00 1/0 0/0 0/0 .text demoExeMove__11daSCannon_cFv */ -void daSCannon_c::demoExeMove() { - // NONMATCHING -} - -/* 80CC8378-80CC83CC 001958 0054+00 1/0 0/0 0/0 .text demoInitFire__11daSCannon_cFv */ -void daSCannon_c::demoInitFire() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC9214-80CC9218 00008C 0004+00 1/1 0/0 0/0 .rodata @4566 */ -SECTION_RODATA static f32 const lit_4566 = 235.0f; -COMPILER_STRIP_GATE(0x80CC9214, &lit_4566); - -/* 80CC83CC-80CC8430 0019AC 0064+00 1/0 0/0 0/0 .text demoExeFire__11daSCannon_cFv */ -void daSCannon_c::demoExeFire() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC9224-80CC9224 00009C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80CC92FE = "Timer"; -#pragma pop - -/* 80CC8430-80CC8538 001A10 0108+00 1/0 0/0 0/0 .text demoInitFinish__11daSCannon_cFv */ -void daSCannon_c::demoInitFinish() { - // NONMATCHING -} - -/* 80CC8538-80CC8648 001B18 0110+00 1/0 0/0 0/0 .text demoExeFinish__11daSCannon_cFv */ -void daSCannon_c::demoExeFinish() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CC9218-80CC921C 000090 0004+00 0/1 0/0 0/0 .rodata @4642 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4642 = 0xC7C731DA; -COMPILER_STRIP_GATE(0x80CC9218, &lit_4642); -#pragma pop - -/* 80CC921C-80CC9220 000094 0004+00 0/1 0/0 0/0 .rodata @4643 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4643 = -18470.0f; -COMPILER_STRIP_GATE(0x80CC921C, &lit_4643); -#pragma pop - -/* 80CC9220-80CC9224 000098 0004+00 0/1 0/0 0/0 .rodata @4644 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4644 = 0x475A37D0; -COMPILER_STRIP_GATE(0x80CC9220, &lit_4644); -#pragma pop - -/* 80CC8648-80CC8714 001C28 00CC+00 1/0 0/0 0/0 .text demoInitWarpEndWait__11daSCannon_cFv */ -void daSCannon_c::demoInitWarpEndWait() { - // NONMATCHING -} - -/* 80CC8714-80CC8804 001CF4 00F0+00 1/0 0/0 0/0 .text demoExeWarpEndWait__11daSCannon_cFv - */ -void daSCannon_c::demoExeWarpEndWait() { - // NONMATCHING -} - -/* 80CC8804-80CC8818 001DE4 0014+00 1/0 0/0 0/0 .text demoInitWarpEndMove__11daSCannon_cFv */ -void daSCannon_c::demoInitWarpEndMove() { - // NONMATCHING -} - -/* 80CC8818-80CC88A8 001DF8 0090+00 1/0 0/0 0/0 .text demoExeWarpEndMove__11daSCannon_cFv - */ -void daSCannon_c::demoExeWarpEndMove() { - // NONMATCHING -} - -/* 80CC88A8-80CC8998 001E88 00F0+00 2/2 0/0 0/0 .text changeScene__11daSCannon_cFv */ -void daSCannon_c::changeScene() { - // NONMATCHING -} - -/* 80CC8998-80CC8A30 001F78 0098+00 1/1 0/0 0/0 .text init__11daSCannon_cFv */ -void daSCannon_c::init() { - // NONMATCHING -} - -/* 80CC8A30-80CC8B60 002010 0130+00 2/2 0/0 0/0 .text - * initEmtRt__11daSCannon_cFUsiPCUsPP14JPABaseEmitter */ -void daSCannon_c::initEmtRt(u16 param_0, int param_1, u16 const* param_2, - JPABaseEmitter** param_3) { - // NONMATCHING -} - -/* 80CC8B60-80CC8BF4 002140 0094+00 6/6 0/0 0/0 .text - * exeEmtRt__11daSCannon_cFUsiPP14JPABaseEmitter */ -void daSCannon_c::exeEmtRt(u16 param_0, int param_1, JPABaseEmitter** param_2) { - // NONMATCHING -} - -/* 80CC8BF4-80CC8CDC 0021D4 00E8+00 1/1 0/0 0/0 .text initEmtLine__11daSCannon_cFv */ -void daSCannon_c::initEmtLine() { - // NONMATCHING -} - -/* 80CC8CDC-80CC8DA0 0022BC 00C4+00 1/1 0/0 0/0 .text exeEmtLine__11daSCannon_cFv */ -void daSCannon_c::exeEmtLine() { - // NONMATCHING -} - -/* 80CC8DA0-80CC8DDC 002380 003C+00 1/1 0/0 0/0 .text delEmtAll__11daSCannon_cFv */ -void daSCannon_c::delEmtAll() { - // NONMATCHING -} - -/* 80CC8DDC-80CC8E60 0023BC 0084+00 0/0 0/0 1/1 .text setCannonRepair__11daSCannon_cFv */ -void daSCannon_c::setCannonRepair() { - // NONMATCHING -} - -/* 80CC8E60-80CC8EB4 002440 0054+00 1/0 0/0 0/0 .text daSCannon_create__FP11daSCannon_c - */ -static void daSCannon_create(daSCannon_c* param_0) { - // NONMATCHING -} - -/* 80CC8EB4-80CC8ED4 002494 0020+00 1/0 0/0 0/0 .text daSCannon_Delete__FP11daSCannon_c - */ -static void daSCannon_Delete(daSCannon_c* param_0) { - // NONMATCHING -} - -/* 80CC8ED4-80CC8EF4 0024B4 0020+00 1/0 0/0 0/0 .text daSCannon_execute__FP11daSCannon_c - */ -static void daSCannon_execute(daSCannon_c* param_0) { - // NONMATCHING -} - -/* 80CC8EF4-80CC8F14 0024D4 0020+00 1/0 0/0 0/0 .text daSCannon_draw__FP11daSCannon_c */ -static void daSCannon_draw(daSCannon_c* param_0) { - // NONMATCHING -} - -/* 80CC8F14-80CC8F30 0024F4 001C+00 2/2 0/0 0/0 .text cLib_calcTimer__FPi */ -extern "C" void func_80CC8F14(void* _this, int* param_0) { - // NONMATCHING -} - -/* 80CC8F30-80CC916C 002510 023C+00 0/0 1/0 0/0 .text __sinit_d_a_obj_scannon_cpp */ -void __sinit_d_a_obj_scannon_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80CC8F30, __sinit_d_a_obj_scannon_cpp); -#pragma pop - -/* 80CC916C-80CC9174 00274C 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80CC916C() { - // NONMATCHING -} - -/* 80CC9174-80CC917C 002754 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80CC9174() { - // NONMATCHING -} - -/* 80CC9224-80CC9224 00009C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_obj_scannon_crs.cpp b/src/d/actor/d_a_obj_scannon_crs.cpp index af0d286d4f..c679b41bdd 100644 --- a/src/d/actor/d_a_obj_scannon_crs.cpp +++ b/src/d/actor/d_a_obj_scannon_crs.cpp @@ -6,255 +6,555 @@ #include "d/dolzel_rel.h" #include "d/actor/d_a_obj_scannon_crs.h" -#include "dol2asm.h" - - - - - -// -// Forward References: -// - -extern "C" static void daSCannonCrs_c_createHeap__FP10fopAc_ac_c(); -extern "C" static void eventCallBack__FPvi(); -extern "C" void __ct__14daSCannonCrs_cFv(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" void __dt__14daSCannonCrs_cFv(); -extern "C" void create__14daSCannonCrs_cFv(); -extern "C" void Delete__14daSCannonCrs_cFv(); -extern "C" void draw__14daSCannonCrs_cFv(); -extern "C" void execute__14daSCannonCrs_cFv(); -extern "C" void middleExe__14daSCannonCrs_cFP9daMidna_c(); -extern "C" void exeModeWait__14daSCannonCrs_cFP9daMidna_c(); -extern "C" void exeModePreWait__14daSCannonCrs_cFP9daMidna_c(); -extern "C" void exeModeOrderEvt__14daSCannonCrs_cFP9daMidna_c(); -extern "C" void exeModeTalkEvt__14daSCannonCrs_cFP9daMidna_c(); -extern "C" void exeModeWarpEvt__14daSCannonCrs_cFP9daMidna_c(); -extern "C" void exeModeEnd__14daSCannonCrs_cFP9daMidna_c(); -extern "C" void demoExe__14daSCannonCrs_cFv(); -extern "C" void init__14daSCannonCrs_cFv(); -extern "C" void setModelMtx__14daSCannonCrs_cFv(); -extern "C" void createHeap__14daSCannonCrs_cFv(); -extern "C" void chkInTalkRange__14daSCannonCrs_cFv(); -extern "C" void initEmtRt__14daSCannonCrs_cFUsiPCUsPP14JPABaseEmitter(); -extern "C" void exeEmtRt__14daSCannonCrs_cFUsiPP14JPABaseEmitter(); -extern "C" void callMidnaBeamEmt__14daSCannonCrs_cFv(); -extern "C" static void daSCannonCrs_create__FP14daSCannonCrs_c(); -extern "C" static void daSCannonCrs_Delete__FP14daSCannonCrs_c(); -extern "C" static void daSCannonCrs_execute__FP14daSCannonCrs_c(); -extern "C" static void daSCannonCrs_draw__FP14daSCannonCrs_c(); -extern "C" void __sinit_d_a_obj_scannon_crs_cpp(); -extern "C" extern char const* const d_a_obj_scannon_crs__stringBase0; -extern "C" u8 s_exeProc__14daSCannonCrs_c[72]; - -// -// External References: -// - -extern "C" void mDoMtx_XrotM__FPA4_fs(); -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void mDoMtx_ZrotM__FPA4_fs(); -extern "C" void transS__14mDoMtx_stack_cFRC4cXyz(); -extern "C" void ZXYrotM__14mDoMtx_stack_cFRC5csXyz(); -extern "C" void play__14mDoExt_baseAnmFv(); -extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss(); -extern "C" void entry__13mDoExt_btkAnmFP16J3DMaterialTablef(); -extern "C" void init__13mDoExt_bckAnmFP15J3DAnmTransformiifssb(); -extern "C" void entry__13mDoExt_bckAnmFP12J3DModelDataf(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfGp_getReverb__Fi(); -extern "C" void dComIfGp_TargetWarpPt_set__FUc(); -extern "C" void dComIfGp_TransportWarp_check__Fv(); -extern "C" void onSwitch__12dSv_memBit_cFi(); -extern "C" void onEventBit__11dSv_event_cFUs(); -extern "C" void isEventBit__11dSv_event_cCFUs(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void reset__14dEvt_control_cFv(); -extern "C" void setSkipProc__14dEvt_control_cFPvPFPvi_ii(); -extern "C" void setPt2__14dEvt_control_cFPv(); -extern "C" void getEventIdx__16dEvent_manager_cFP10fopAc_ac_cPCcUc(); -extern "C" void startCheck__16dEvent_manager_cFs(); -extern "C" void endCheck__16dEvent_manager_cFs(); -extern "C" void getMyStaffId__16dEvent_manager_cFPCcP10fopAc_ac_ci(); -extern "C" void getIsAddvance__16dEvent_manager_cFi(); -extern "C" void getMyActIdx__16dEvent_manager_cFiPCPCciii(); -extern "C" void cutEnd__16dEvent_manager_cFi(); -extern "C" void getRunEventName__16dEvent_manager_cFv(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void StartQuake__12dVibration_cFii4cXyz(); -extern "C" void StopQuake__12dVibration_cFi(); -extern "C" void request__10dAttHint_cFP10fopAc_ac_ci(); -extern "C" void Release__4cBgSFP9dBgW_Base(); -extern "C" void Regist__4dBgSFP9dBgW_BaseP10fopAc_ac_c(); -extern "C" void Set__4cBgWFP6cBgD_tUlPA3_A4_f(); -extern "C" void __ct__4dBgWFv(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void __ct__10dMsgFlow_cFv(); -extern "C" void __dt__10dMsgFlow_cFv(); -extern "C" void init__10dMsgFlow_cFP10fopAc_ac_ciiPP10fopAc_ac_c(); -extern "C" void doFlow__10dMsgFlow_cFP10fopAc_ac_cPP10fopAc_ac_ci(); -extern "C" void getEventId__10dMsgFlow_cFPi(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void cM_atan2s__Fff(); -extern "C" void ChkUsed__9cBgW_BgIdCFv(); -extern "C" void func_802807E0(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void getName__10JUTNameTabCFUs(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey(); -extern "C" void __ptmf_test(); -extern "C" void __ptmf_scall(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_meter2_info[248]; -extern "C" u8 m_midnaActor__9daPy_py_c[4]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; - -// -// Declarations: -// +#include "d/actor/d_a_player.h" +#include "d/d_meter2_info.h" /* 80CC9678-80CC9698 000078 0020+00 1/1 0/0 0/0 .text daSCannonCrs_c_createHeap__FP10fopAc_ac_c */ -static void daSCannonCrs_c_createHeap(fopAc_ac_c* param_0) { - // NONMATCHING +static int daSCannonCrs_c_createHeap(fopAc_ac_c* i_this) { + return ((daSCannonCrs_c*)i_this)->createHeap(); } /* 80CC9698-80CC973C 000098 00A4+00 1/1 0/0 0/0 .text eventCallBack__FPvi */ -static void eventCallBack(void* param_0, int param_1) { - // NONMATCHING +static int eventCallBack(void* i_proc, int param_1) { + if (i_proc == NULL) { + return 1; + } + + daPy_py_c* player_p = daPy_getPlayerActorClass(); + if (player_p != NULL) { + player_p->skipPortalObjWarp(); + dComIfGp_TargetWarpPt_set(((daSCannonCrs_c*)i_proc)->getWarpId()); + + if (dComIfGp_TransportWarp_check()) { + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[400]); + dComIfGs_onSaveSwitch(6, 0x35); + } + } + + return 1; } -/* ############################################################################################## */ -/* 80CCB114-80CCB114 000094 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80CCB114 = "SCanCrs"; -SECTION_DEAD static char const* const stringBase_80CCB11C = "SKY_CANNON_WARP_START"; -SECTION_DEAD static char const* const stringBase_80CCB132 = "effect_p"; -SECTION_DEAD static char const* const stringBase_80CCB13B = "center"; -SECTION_DEAD static char const* const stringBase_80CCB142 = "WAIT"; -SECTION_DEAD static char const* const stringBase_80CCB147 = "BEAM_HIT"; -SECTION_DEAD static char const* const stringBase_80CCB150 = "READY"; -SECTION_DEAD static char const* const stringBase_80CCB156 = "UP"; -#pragma pop - /* 80CCB17C-80CCB180 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */ -SECTION_DATA static void* l_arcName = (void*)&d_a_obj_scannon_crs__stringBase0; +static char* l_arcName = "SCanCrs"; /* 80CCB180-80CCB184 -00001 0004+00 1/1 0/0 0/0 .data l_eventName */ -SECTION_DATA static void* l_eventName = (void*)(((char*)&d_a_obj_scannon_crs__stringBase0) + 0x8); +static char* l_eventName = "SKY_CANNON_WARP_START"; /* 80CCB184-80CCB188 -00001 0004+00 2/2 0/0 0/0 .data l_staffName */ -SECTION_DATA static void* l_staffName = (void*)&d_a_obj_scannon_crs__stringBase0; +static char* l_staffName = "SCanCrs"; -/* 80CCB188-80CCB194 -00001 000C+00 0/1 0/0 0/0 .data @3890 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3890[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeWait__14daSCannonCrs_cFP9daMidna_c, -}; -#pragma pop +/* 80CC973C-80CC97F4 00013C 00B8+00 2/2 0/0 0/0 .text __ct__14daSCannonCrs_cFv */ +daSCannonCrs_c::daSCannonCrs_c() { + mpBgW = NULL; + memset(mpDisapEmt, 0, sizeof(mpDisapEmt)); + memset(mpBeamEmt, 0, sizeof(mpBeamEmt)); +} -/* 80CCB194-80CCB1A0 -00001 000C+00 0/1 0/0 0/0 .data @3891 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3891[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModePreWait__14daSCannonCrs_cFP9daMidna_c, -}; -#pragma pop +/* 80CC983C-80CC9910 00023C 00D4+00 1/0 0/0 0/0 .text __dt__14daSCannonCrs_cFv */ +daSCannonCrs_c::~daSCannonCrs_c() { + dComIfG_resDelete(this, l_arcName); +} -/* 80CCB1A0-80CCB1AC -00001 000C+00 0/1 0/0 0/0 .data @3892 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3892[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeOrderEvt__14daSCannonCrs_cFP9daMidna_c, +/* 80CCB080-80CCB088 000000 0008+00 6/6 0/0 0/0 .rodata DISAP_PARTICLE_NAME */ +static const u16 DISAP_PARTICLE_NAME[] = { + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_DISAPP_A), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_DISAPP_B), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_DISAPP_C), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_DISAPP_D), }; -#pragma pop -/* 80CCB1AC-80CCB1B8 -00001 000C+00 0/1 0/0 0/0 .data @3893 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3893[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeTalkEvt__14daSCannonCrs_cFP9daMidna_c, +/* 80CCB088-80CCB090 000008 0008+00 0/1 0/0 0/0 .rodata BEAM_PARTICLE_NAME */ +static const u16 BEAM_PARTICLE_NAME[] = { + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_BIND_A), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_BIND_B), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_BIND_C), + dPa_RM(ID_ZI_S_SKYCANNON_CRASH_BIND_D), }; -#pragma pop -/* 80CCB1B8-80CCB1C4 -00001 000C+00 0/1 0/0 0/0 .data @3894 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3894[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeWarpEvt__14daSCannonCrs_cFP9daMidna_c, -}; -#pragma pop +/* 80CC9910-80CC9B10 000310 0200+00 1/1 0/0 0/0 .text create__14daSCannonCrs_cFv */ +int daSCannonCrs_c::create() { + fopAcM_SetupActor(this, daSCannonCrs_c); -/* 80CCB1C4-80CCB1D0 -00001 000C+00 0/1 0/0 0/0 .data @3895 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3895[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeEnd__14daSCannonCrs_cFP9daMidna_c, -}; -#pragma pop + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[400])) { + return cPhs_ERROR_e; + } + + int phase_state = dComIfG_resLoad(this, l_arcName); + if (phase_state == cPhs_COMPLEATE_e) { + if (!fopAcM_entrySolidHeap(this, daSCannonCrs_c_createHeap, 0x9000)) { + return cPhs_ERROR_e; + } + + if (dComIfG_Bgsp().Regist(mpBgW, this)) { + return cPhs_ERROR_e; + } + + init(); + + setModelMtx(); + fopAcM_SetMtx(this, mpModel->getBaseTRMtx()); + fopAcM_setCullSizeBox(this, + -500.0f, -100.0f, -500.0f, + 500.0f, 2500.0f, 500.0f); + + attention_info.distances[1] = 54; + attention_info.distances[3] = 54; + + eventInfo.setArchiveName(l_arcName); + mEvtIdx = dComIfGp_getEventManager().getEventIdx(this, l_eventName, 0xFF); + + JUTNameTab* nametab_p = mpModel->getModelData()->getJointTree().getJointName(); + for (int i = 0; i < mpModel->getModelData()->getJointNum(); i++) { + if (strcmp(nametab_p->getName(i), "effect_p") == 0) { + mEffectJointNo = i; + } else if (strcmp(nametab_p->getName(i), "center") == 0) { + mCenterJointNo = i; + } + } + } + + return phase_state; +} + +/* 80CC9B10-80CC9B80 000510 0070+00 1/1 0/0 0/0 .text Delete__14daSCannonCrs_cFv */ +int daSCannonCrs_c::Delete() { + if (mpBgW != NULL && mpBgW->ChkUsed()) { + dComIfG_Bgsp().Release(mpBgW); + } + + this->~daSCannonCrs_c(); + return 1; +} + +/* 80CC9B80-80CC9C64 000580 00E4+00 1/1 0/0 0/0 .text draw__14daSCannonCrs_cFv */ +int daSCannonCrs_c::draw() { + g_env_light.settingTevStruct(16, ¤t.pos, &tevStr); + g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr); + + dComIfGd_setListBG(); + mBck.entry(mpModel->getModelData()); + mBtk.entry(mpModel->getModelData()); + mDoExt_modelUpdateDL(mpModel); + + mBtk.remove(mpModel->getModelData()); + dComIfGd_setList(); + return 1; +} + +/* 80CC9C64-80CC9CA4 000664 0040+00 1/1 0/0 0/0 .text execute__14daSCannonCrs_cFv */ +int daSCannonCrs_c::execute() { + daMidna_c* midna_p = daPy_py_c::getMidnaActor(); + if (midna_p == NULL) { + return 1; + } + + middleExe(midna_p); + return 1; +} + +/* 80CC9CA4-80CC9D60 0006A4 00BC+00 1/1 0/0 0/0 .text middleExe__14daSCannonCrs_cFP9daMidna_c */ +void daSCannonCrs_c::middleExe(daMidna_c* i_midna_p) { + if (mVoiceTimer != 0) { + mVoiceTimer--; + } + + if (s_exeProc[mMode] != NULL) { + (this->*s_exeProc[mMode])(i_midna_p); + } + + if (!eventInfo.chkCondition(dEvtCnd_CANTALK_e)) { + field_0x651 = 0; + } + + setModelMtx(); + mBck.play(); + mBtk.play(); +} + +/* 80CC9D60-80CC9F34 000760 01D4+00 1/0 0/0 0/0 .text exeModeWait__14daSCannonCrs_cFP9daMidna_c */ +void daSCannonCrs_c::exeModeWait(daMidna_c* i_midna_p) { + if (dComIfGp_evmng_startCheck(mEvtIdx) != 0) { + if (strcmp(dComIfGp_getEventManager().getRunEventName(), "SKY_CANNON_WARP_START") == 0) { + dComIfGp_getEvent().setPt2(this); + + daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0); + if (player_p != NULL) { + cXyz pos(4750.0f, -1520.0f, -3900.0f); + player_p->setPlayerPosAndAngle(&pos, 0x4000, 0); + } + + mStaffId = dComIfGp_evmng_getMyStaffId(l_staffName, NULL, 0); + mMode = MODE_WARP_EVT; + return; + } + } + + if (chkInTalkRange()) { + daPy_py_c* player_p = (daPy_py_c*)daPy_getLinkPlayerActorClass(); + if (player_p != NULL && !player_p->checkPlayerFly() && field_0x651 == 0) { + field_0x651 = 1; + if (mVoiceTimer == 0) { + mDoAud_seStart(Z2SE_NAVI_CALLVOICE, NULL, 0, 0); + } + mVoiceTimer = 60; + } + + dComIfGp_TargetWarpPt_set(getWarpId()); + mMode = MODE_ORDER_EVT; + } else { + attention_info.flags = 0; + field_0x652 = 0; + i_midna_p->offTagWaitPos(); + } +} + +/* 80CC9F34-80CC9F80 000934 004C+00 1/0 0/0 0/0 .text exeModePreWait__14daSCannonCrs_cFP9daMidna_c + */ +void daSCannonCrs_c::exeModePreWait(daMidna_c* i_midna_p) { + if (eventInfo.checkCommandTalk()) { + dComIfGp_event_reset(); + } + + mMode = MODE_WAIT; +} + +/* 80CC9F80-80CCA240 000980 02C0+00 1/0 0/0 0/0 .text + * exeModeOrderEvt__14daSCannonCrs_cFP9daMidna_c */ +void daSCannonCrs_c::exeModeOrderEvt(daMidna_c* i_midna_p) { + if (eventInfo.checkCommandTalk()) { + i_midna_p->onTagWaitPosPortalObj(&mPortalWaitPos); + if (i_midna_p->current.pos.abs(mPortalWaitPos) < 5.0f) { + mMode = MODE_TALK_EVT; + mMsgFlow.init(this, getMsgId(), 0, NULL); + dComIfGp_TargetWarpPt_set(getWarpId()); + } + } else { + if (dComIfGp_evmng_startCheck(mEvtIdx) != 0) { + dComIfGp_getEvent().setPt2(this); + + daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0); + if (player_p != NULL) { + cXyz pos(4750.0f, -1520.0f, -3900.0f); + player_p->setPlayerPosAndAngle(&pos, 0x4000, 0); + } + + mStaffId = dComIfGp_evmng_getMyStaffId(l_staffName, NULL, 0); + mMode = MODE_WARP_EVT; + } else { + eventInfo.onCondition(dEvtCnd_CANTALK_e); + + daPy_py_c* player_p = daPy_getLinkPlayerActorClass(); + if (player_p != NULL && !player_p->checkPlayerFly()) { + if (field_0x652 != 0) { + attention_info.flags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); + } else { + dComIfGp_att_ZHintRequest(this, 0x1FF); + } + } + + if (!chkInTalkRange()) { + attention_info.flags = 0; + field_0x652 = 0; + mMode = MODE_PRE_WAIT; + } + } + } +} + +/* 80CCA240-80CCA2CC 000C40 008C+00 1/0 0/0 0/0 .text exeModeTalkEvt__14daSCannonCrs_cFP9daMidna_c + */ +void daSCannonCrs_c::exeModeTalkEvt(daMidna_c* i_midna_p) { + if (mMsgFlow.doFlow(this, NULL, 0)) { + field_0x652 = 1; + mMode = MODE_ORDER_EVT; + dComIfGp_event_reset(); + + int spC; + if (mMsgFlow.getEventId(&spC) == 11) { + dMeter2Info_setPauseStatus(6); + } + } +} + +/* 80CCA2CC-80CCA344 000CCC 0078+00 1/0 0/0 0/0 .text exeModeWarpEvt__14daSCannonCrs_cFP9daMidna_c + */ +void daSCannonCrs_c::exeModeWarpEvt(daMidna_c* i_midna_p) { + if (dComIfGp_evmng_endCheck(mEvtIdx) != 0) { + mMode = MODE_END; + } else { + dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + demoExe(); + } +} + +/* 80CCA344-80CCA348 000D44 0004+00 1/0 0/0 0/0 .text exeModeEnd__14daSCannonCrs_cFP9daMidna_c */ +void daSCannonCrs_c::exeModeEnd(daMidna_c* i_midna_p) {} /* 80CCB1D0-80CCB218 000074 0048+00 1/2 0/0 0/0 .data s_exeProc__14daSCannonCrs_c */ -SECTION_DATA u8 daSCannonCrs_c::s_exeProc[72] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daSCannonCrs_c::*daSCannonCrs_c::s_exeProc[])(daMidna_c*) = { + &daSCannonCrs_c::exeModeWait, + &daSCannonCrs_c::exeModePreWait, + &daSCannonCrs_c::exeModeOrderEvt, + &daSCannonCrs_c::exeModeTalkEvt, + &daSCannonCrs_c::exeModeWarpEvt, + &daSCannonCrs_c::exeModeEnd, }; -/* 80CCB218-80CCB228 -00001 0010+00 1/1 0/0 0/0 .data CUT_TYPE_TABLE$4066 */ -SECTION_DATA static void* CUT_TYPE_TABLE[4] = { - (void*)(((char*)&d_a_obj_scannon_crs__stringBase0) + 0x2E), - (void*)(((char*)&d_a_obj_scannon_crs__stringBase0) + 0x33), - (void*)(((char*)&d_a_obj_scannon_crs__stringBase0) + 0x3C), - (void*)(((char*)&d_a_obj_scannon_crs__stringBase0) + 0x42), -}; +/* 80CCA348-80CCA74C 000D48 0404+00 1/1 0/0 0/0 .text demoExe__14daSCannonCrs_cFv */ +void daSCannonCrs_c::demoExe() { + static char* CUT_TYPE_TABLE[4] = { + "WAIT", + "BEAM_HIT", + "READY", + "UP", + }; + + int act_idx = dComIfGp_evmng_getMyActIdx(mStaffId, CUT_TYPE_TABLE, ARRAY_SIZE(CUT_TYPE_TABLE), 0, 0); + if (act_idx != -1) { + if (dComIfGp_evmng_getIsAddvance(mStaffId)) { + switch (act_idx) { + case 0: + mBck.setPlaySpeed(0.0f); + mBtk.setPlaySpeed(0.0f); + break; + case 1: + mBck.setPlaySpeed(1.0f); + mBtk.setPlaySpeed(1.0f); + fopAcM_seStartCurrent(this, Z2SE_OBJ_TCANNON_LIFT_UP, 0); + fopAcM_seStartCurrent(this, Z2SE_MDN_WARP_MAGIC, 0); + callMidnaBeamEmt(); + initEmtRt(mCenterJointNo, 4, BEAM_PARTICLE_NAME, mpBeamEmt); + break; + case 2: + mBck.setPlaySpeed(1.0f); + mBtk.setPlaySpeed(1.0f); + dComIfGp_getVibration().StartQuake(2, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + break; + case 3: + mBck.setPlaySpeed(1.0f); + mBtk.setPlaySpeed(1.0f); + mWarpQuakeTimer = 0; + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER3, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_getVibration().StartQuake(2, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + + dComIfGp_TargetWarpPt_set(getWarpId()); + if (dComIfGp_TransportWarp_check()) { + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[400]); + dComIfGs_onSaveSwitch(6, 0x35); + } + break; + } + } + + switch (act_idx) { + case 0: + dComIfGp_evmng_cutEnd(mStaffId); + return; + case 1: + if (mBck.checkFrame(35.0f)) { + dComIfGp_evmng_cutEnd(mStaffId); + } + exeEmtRt(mCenterJointNo, 4, mpBeamEmt); + return; + case 2: + if (mBck.checkFrame(88.0f)) { + dComIfGp_getVibration().StopQuake(0x1F); + dComIfGp_evmng_cutEnd(mStaffId); + return; + } + break; + case 3: + mWarpQuakeTimer++; + if (mWarpQuakeTimer == 50) { + dComIfGp_getVibration().StopQuake(0x1F); + } + + if (mBck.checkFrame(240.0f)) { + initEmtRt(mEffectJointNo, 4, DISAP_PARTICLE_NAME, mpDisapEmt); + fopAcM_seStartCurrent(this, Z2SE_OBJ_TCANNON_WARP_IN, 0); + } else if (mBck.getFrame() > 240.0f) { + exeEmtRt(mEffectJointNo, 4, mpDisapEmt); + } + + if (mBck.isStop()) { + dComIfGp_evmng_cutEnd(mStaffId); + } + break; + } + } +} + +/* 80CCA74C-80CCA848 00114C 00FC+00 1/1 0/0 0/0 .text init__14daSCannonCrs_cFv */ +void daSCannonCrs_c::init() { + static const Vec MIDNA_WAIT_POS_OFFSET = {100.0f, 900.0f, 90.0f}; + cXyz wait_offset(MIDNA_WAIT_POS_OFFSET); + + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::ZXYrotM(shape_angle); + mDoMtx_stack_c::multVec(&wait_offset, &mPortalWaitPos); + attention_info.position = mPortalWaitPos; + attention_info.position.y += 200.0f; + + f32 talk_range = 10.0f * getTalkRange(); + mTalkRangeSqDist = SQUARE(talk_range); + mMode = MODE_WAIT; + mWarpQuakeTimer = 0; + mEffectJointNo = 0xFFFF; + mCenterJointNo = 0xFFFF; + mVoiceTimer = 0; + field_0x651 = 0; + field_0x652 = 0; +} + +/* 80CCA848-80CCA8CC 001248 0084+00 2/2 0/0 0/0 .text setModelMtx__14daSCannonCrs_cFv */ +void daSCannonCrs_c::setModelMtx() { + mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); + mDoMtx_stack_c::YrotM(shape_angle.y); + mDoMtx_stack_c::XrotM(shape_angle.x); + mDoMtx_stack_c::ZrotM(shape_angle.z); + mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); +} + +/* 80CCA8CC-80CCAAC4 0012CC 01F8+00 1/1 0/0 0/0 .text createHeap__14daSCannonCrs_cFv */ +int daSCannonCrs_c::createHeap() { + J3DModelData* a_model_data_p = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 10); + JUT_ASSERT(967, a_model_data_p != 0); + + mpModel = mDoExt_J3DModel__create(a_model_data_p, J3DMdlFlag_DifferedDLBuffer, J3D_DIFF_FLAG(FALSE, FALSE, TRUE, 8, 2, FALSE, 0, 0, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE)); + if (mpModel == NULL) { + return 0; + } + + J3DAnmTransform* a_bck_p = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, 7); + JUT_ASSERT(981, a_bck_p != 0); + int rt = mBck.init(a_bck_p, 1, 0, 0.0f, 0, -1, 0); + if (!rt) { + return 0; + } + + J3DAnmTextureSRTKey* a_btk_p = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 13); + JUT_ASSERT(1000, a_btk_p != 0); + rt = mBtk.init(a_model_data_p, a_btk_p, 1, 0, 0.0f, 0, -1); + if (!rt) { + return 0; + } + + mpBgW = new dBgW(); + if (mpBgW == NULL) { + return 0; + } + + mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); + mDoMtx_stack_c::YrotM(shape_angle.y); + mDoMtx_stack_c::XrotM(shape_angle.x); + mDoMtx_stack_c::ZrotM(shape_angle.z); + MTXCopy(mDoMtx_stack_c::get(), mBgMtx); + + if (mpBgW->Set((cBgD_t*)dComIfG_getObjectRes(l_arcName, 16), 1, &mBgMtx) == 1) { + return 0; + } + + return 1; +} + +/* 80CCAAC4-80CCAB24 0014C4 0060+00 2/2 0/0 0/0 .text chkInTalkRange__14daSCannonCrs_cFv + */ +bool daSCannonCrs_c::chkInTalkRange() { + fopAc_ac_c* player_p = dComIfGp_getPlayer(0); + if (player_p == NULL) { + return false; + } + + if (player_p->current.pos.abs2(current.pos) < mTalkRangeSqDist) { + return true; + } + + return false; +} + +/* 80CCAB24-80CCAC48 001524 0124+00 1/1 0/0 0/0 .text + * initEmtRt__14daSCannonCrs_cFUsiPCUsPP14JPABaseEmitter */ +void daSCannonCrs_c::initEmtRt(u16 i_jointNo, int i_emtNum, const u16* i_name_list, JPABaseEmitter** i_emt_list) { + MtxP mtx = mpModel->getAnmMtx(i_jointNo); + if (mtx != NULL) { + cXyz pos(mtx[0][3], mtx[1][3], mtx[2][3]); + csXyz rot(shape_angle); + cXyz size(1.0f, 1.0f, 1.0f); + + for (int i = 0; i < i_emtNum; i++) { + i_emt_list[i] = dComIfGp_particle_set(i_name_list[i], &pos, &rot, &size); + if (i_emt_list[i] != NULL) { + i_emt_list[i]->setGlobalRTMatrix(mtx); + } + } + } +} + +/* 80CCAC48-80CCACD0 001648 0088+00 1/1 0/0 0/0 .text + * exeEmtRt__14daSCannonCrs_cFUsiPP14JPABaseEmitter */ +void daSCannonCrs_c::exeEmtRt(u16 i_jointNo, int i_emtNum, JPABaseEmitter** i_emt_list) { + MtxP mtx = mpModel->getAnmMtx(i_jointNo); + if (mtx != NULL) { + for (int i = 0; i < i_emtNum; i++) { + if (i_emt_list[i] != NULL) { + i_emt_list[i]->setGlobalRTMatrix(mtx); + } + } + } +} + +/* 80CCACD0-80CCAF20 0016D0 0250+00 1/1 0/0 0/0 .text callMidnaBeamEmt__14daSCannonCrs_cFv */ +void daSCannonCrs_c::callMidnaBeamEmt() { + static const Vec MIDNA_BEAM_OFFSET = {0.0f, 50.0f, 0.0f}; + + daMidna_c* midna_p = daPy_py_c::getMidnaActor(); + if (midna_p != NULL) { + cXyz beam_pos; + cMtx_multVec(midna_p->getMtxHairTop(), &MIDNA_BEAM_OFFSET, &beam_pos); + cXyz eff_pos(current.pos.x, 400.0f + current.pos.y, current.pos.z); + cXyz beam_len = beam_pos - eff_pos; + + csXyz eff_rot; + eff_rot.y = cM_atan2s(beam_len.x, beam_len.z); + eff_rot.x = -cM_atan2s(beam_len.y, JMAFastSqrt(SQUARE(beam_len.x) + SQUARE(beam_len.z))); + eff_rot.z = 0; + + cXyz eff_size(1.0f, 1.0f, 1.0f); + JPABaseEmitter* emt_p = dComIfGp_particle_set(dPa_RM(ID_ZI_S_OBJWARP_BINDBEAM_A), &eff_pos, &eff_rot, &eff_size); + if (emt_p != NULL) { + emt_p->setGlobalParticleHeightScale(0.01f * beam_len.abs()); + } + } +} + +/* 80CCAF20-80CCAF74 001920 0054+00 1/0 0/0 0/0 .text daSCannonCrs_create__FP14daSCannonCrs_c */ +static int daSCannonCrs_create(daSCannonCrs_c* i_this) { + fopAcM_SetupActor(i_this, daSCannonCrs_c); + return i_this->create(); +} + +/* 80CCAF74-80CCAF94 001974 0020+00 1/0 0/0 0/0 .text daSCannonCrs_Delete__FP14daSCannonCrs_c */ +static int daSCannonCrs_Delete(daSCannonCrs_c* i_this) { + return i_this->Delete(); +} + +/* 80CCAF94-80CCAFB4 001994 0020+00 1/0 0/0 0/0 .text daSCannonCrs_execute__FP14daSCannonCrs_c */ +static int daSCannonCrs_execute(daSCannonCrs_c* i_this) { + return i_this->execute(); +} + +/* 80CCAFB4-80CCAFD4 0019B4 0020+00 1/0 0/0 0/0 .text daSCannonCrs_draw__FP14daSCannonCrs_c */ +static int daSCannonCrs_draw(daSCannonCrs_c* i_this) { + return i_this->draw(); +} /* 80CCB228-80CCB248 -00001 0020+00 1/0 0/0 0/0 .data daSCannonCrs_METHODS */ static actor_method_class daSCannonCrs_METHODS = { - (process_method_func)daSCannonCrs_create__FP14daSCannonCrs_c, - (process_method_func)daSCannonCrs_Delete__FP14daSCannonCrs_c, - (process_method_func)daSCannonCrs_execute__FP14daSCannonCrs_c, + (process_method_func)daSCannonCrs_create, + (process_method_func)daSCannonCrs_Delete, + (process_method_func)daSCannonCrs_execute, 0, - (process_method_func)daSCannonCrs_draw__FP14daSCannonCrs_c, + (process_method_func)daSCannonCrs_draw, }; /* 80CCB248-80CCB278 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_SCannonCrs */ @@ -274,372 +574,3 @@ extern actor_process_profile_definition g_profile_Obj_SCannonCrs = { fopAc_ENV_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 80CCB278-80CCB284 00011C 000C+00 2/2 0/0 0/0 .data __vt__14daSCannonCrs_c */ -SECTION_DATA extern void* __vt__14daSCannonCrs_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__14daSCannonCrs_cFv, -}; - -/* 80CCB284-80CCB290 000128 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; - -/* 80CC973C-80CC97F4 00013C 00B8+00 2/2 0/0 0/0 .text __ct__14daSCannonCrs_cFv */ -daSCannonCrs_c::daSCannonCrs_c() { - // NONMATCHING -} - -/* 80CC97F4-80CC983C 0001F4 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING -} - -/* 80CC983C-80CC9910 00023C 00D4+00 1/0 0/0 0/0 .text __dt__14daSCannonCrs_cFv */ -daSCannonCrs_c::~daSCannonCrs_c() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCB080-80CCB088 000000 0008+00 6/6 0/0 0/0 .rodata DISAP_PARTICLE_NAME */ -SECTION_RODATA static u8 const DISAP_PARTICLE_NAME[8] = { - 0x8B, 0x2B, 0x8B, 0x2C, 0x8B, 0x2D, 0x8B, 0x2E, -}; -COMPILER_STRIP_GATE(0x80CCB080, &DISAP_PARTICLE_NAME); - -/* 80CCB088-80CCB090 000008 0008+00 0/1 0/0 0/0 .rodata BEAM_PARTICLE_NAME */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const BEAM_PARTICLE_NAME[8] = { - 0x8B, 0x43, 0x8B, 0x44, 0x8B, 0x45, 0x8B, 0x46, -}; -COMPILER_STRIP_GATE(0x80CCB088, &BEAM_PARTICLE_NAME); -#pragma pop - -/* 80CCB090-80CCB094 000010 0004+00 0/1 0/0 0/0 .rodata @3822 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3822 = -500.0f; -COMPILER_STRIP_GATE(0x80CCB090, &lit_3822); -#pragma pop - -/* 80CCB094-80CCB098 000014 0004+00 0/1 0/0 0/0 .rodata @3823 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3823 = -100.0f; -COMPILER_STRIP_GATE(0x80CCB094, &lit_3823); -#pragma pop - -/* 80CCB098-80CCB09C 000018 0004+00 0/1 0/0 0/0 .rodata @3824 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3824 = 500.0f; -COMPILER_STRIP_GATE(0x80CCB098, &lit_3824); -#pragma pop - -/* 80CCB09C-80CCB0A0 00001C 0004+00 0/1 0/0 0/0 .rodata @3825 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3825 = 2500.0f; -COMPILER_STRIP_GATE(0x80CCB09C, &lit_3825); -#pragma pop - -/* 80CC9910-80CC9B10 000310 0200+00 1/1 0/0 0/0 .text create__14daSCannonCrs_cFv */ -void daSCannonCrs_c::create() { - // NONMATCHING -} - -/* 80CC9B10-80CC9B80 000510 0070+00 1/1 0/0 0/0 .text Delete__14daSCannonCrs_cFv */ -void daSCannonCrs_c::Delete() { - // NONMATCHING -} - -/* 80CC9B80-80CC9C64 000580 00E4+00 1/1 0/0 0/0 .text draw__14daSCannonCrs_cFv */ -void daSCannonCrs_c::draw() { - // NONMATCHING -} - -/* 80CC9C64-80CC9CA4 000664 0040+00 1/1 0/0 0/0 .text execute__14daSCannonCrs_cFv */ -void daSCannonCrs_c::execute() { - // NONMATCHING -} - -/* 80CC9CA4-80CC9D60 0006A4 00BC+00 1/1 0/0 0/0 .text middleExe__14daSCannonCrs_cFP9daMidna_c */ -void daSCannonCrs_c::middleExe(daMidna_c* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCB0A0-80CCB0A4 000020 0004+00 0/2 0/0 0/0 .rodata @3949 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3949 = 4750.0f; -COMPILER_STRIP_GATE(0x80CCB0A0, &lit_3949); -#pragma pop - -/* 80CCB0A4-80CCB0A8 000024 0004+00 0/2 0/0 0/0 .rodata @3950 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3950 = -1520.0f; -COMPILER_STRIP_GATE(0x80CCB0A4, &lit_3950); -#pragma pop - -/* 80CCB0A8-80CCB0AC 000028 0004+00 0/2 0/0 0/0 .rodata @3951 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3951 = -3900.0f; -COMPILER_STRIP_GATE(0x80CCB0A8, &lit_3951); -#pragma pop - -/* 80CCB0AC-80CCB0B0 00002C 0004+00 1/4 0/0 0/0 .rodata @3952 */ -SECTION_RODATA static f32 const lit_3952 = 1.0f; -COMPILER_STRIP_GATE(0x80CCB0AC, &lit_3952); - -/* 80CCB0B0-80CCB0B4 000030 0004+00 0/2 0/0 0/0 .rodata @3953 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3953 = -1.0f; -COMPILER_STRIP_GATE(0x80CCB0B0, &lit_3953); -#pragma pop - -/* 80CC9D60-80CC9F34 000760 01D4+00 1/0 0/0 0/0 .text exeModeWait__14daSCannonCrs_cFP9daMidna_c */ -void daSCannonCrs_c::exeModeWait(daMidna_c* param_0) { - // NONMATCHING -} - -/* 80CC9F34-80CC9F80 000934 004C+00 1/0 0/0 0/0 .text exeModePreWait__14daSCannonCrs_cFP9daMidna_c - */ -void daSCannonCrs_c::exeModePreWait(daMidna_c* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCB0B4-80CCB0B8 000034 0004+00 1/4 0/0 0/0 .rodata @4033 */ -SECTION_RODATA static u8 const lit_4033[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80CCB0B4, &lit_4033); - -/* 80CCB0B8-80CCB0C0 000038 0008+00 0/2 0/0 0/0 .rodata @4034 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4034[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CCB0B8, &lit_4034); -#pragma pop - -/* 80CCB0C0-80CCB0C8 000040 0008+00 0/2 0/0 0/0 .rodata @4035 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4035[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CCB0C0, &lit_4035); -#pragma pop - -/* 80CCB0C8-80CCB0D0 000048 0008+00 0/2 0/0 0/0 .rodata @4036 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4036[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CCB0C8, &lit_4036); -#pragma pop - -/* 80CCB0D0-80CCB0D4 000050 0004+00 0/1 0/0 0/0 .rodata @4037 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4037 = 5.0f; -COMPILER_STRIP_GATE(0x80CCB0D0, &lit_4037); -#pragma pop - -/* 80CC9F80-80CCA240 000980 02C0+00 1/0 0/0 0/0 .text - * exeModeOrderEvt__14daSCannonCrs_cFP9daMidna_c */ -void daSCannonCrs_c::exeModeOrderEvt(daMidna_c* param_0) { - // NONMATCHING -} - -/* 80CCA240-80CCA2CC 000C40 008C+00 1/0 0/0 0/0 .text exeModeTalkEvt__14daSCannonCrs_cFP9daMidna_c - */ -void daSCannonCrs_c::exeModeTalkEvt(daMidna_c* param_0) { - // NONMATCHING -} - -/* 80CCA2CC-80CCA344 000CCC 0078+00 1/0 0/0 0/0 .text exeModeWarpEvt__14daSCannonCrs_cFP9daMidna_c - */ -void daSCannonCrs_c::exeModeWarpEvt(daMidna_c* param_0) { - // NONMATCHING -} - -/* 80CCA344-80CCA348 000D44 0004+00 1/0 0/0 0/0 .text exeModeEnd__14daSCannonCrs_cFP9daMidna_c */ -void daSCannonCrs_c::exeModeEnd(daMidna_c* param_0) { - /* empty function */ -} - -/* ############################################################################################## */ -/* 80CCB0D4-80CCB0D8 000054 0004+00 0/1 0/0 0/0 .rodata @4189 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4189 = 35.0f; -COMPILER_STRIP_GATE(0x80CCB0D4, &lit_4189); -#pragma pop - -/* 80CCB0D8-80CCB0DC 000058 0004+00 0/1 0/0 0/0 .rodata @4190 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4190 = 88.0f; -COMPILER_STRIP_GATE(0x80CCB0D8, &lit_4190); -#pragma pop - -/* 80CCB0DC-80CCB0E0 00005C 0004+00 0/1 0/0 0/0 .rodata @4191 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4191 = 240.0f; -COMPILER_STRIP_GATE(0x80CCB0DC, &lit_4191); -#pragma pop - -/* 80CCA348-80CCA74C 000D48 0404+00 1/1 0/0 0/0 .text demoExe__14daSCannonCrs_cFv */ -void daSCannonCrs_c::demoExe() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCB0E0-80CCB0EC 000060 000C+00 0/1 0/0 0/0 .rodata MIDNA_WAIT_POS_OFFSET$4195 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const MIDNA_WAIT_POS_OFFSET[12] = { - 0x42, 0xC8, 0x00, 0x00, 0x44, 0x61, 0x00, 0x00, 0x42, 0xB4, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CCB0E0, &MIDNA_WAIT_POS_OFFSET); -#pragma pop - -/* 80CCB0EC-80CCB0F0 00006C 0004+00 0/1 0/0 0/0 .rodata @4205 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4205 = 200.0f; -COMPILER_STRIP_GATE(0x80CCB0EC, &lit_4205); -#pragma pop - -/* 80CCB0F0-80CCB0F8 000070 0004+04 0/1 0/0 0/0 .rodata @4206 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4206[1 + 1 /* padding */] = { - 10.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x80CCB0F0, &lit_4206); -#pragma pop - -/* 80CCB0F8-80CCB100 000078 0008+00 0/1 0/0 0/0 .rodata @4208 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4208[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CCB0F8, &lit_4208); -#pragma pop - -/* 80CCA74C-80CCA848 00114C 00FC+00 1/1 0/0 0/0 .text init__14daSCannonCrs_cFv */ -void daSCannonCrs_c::init() { - // NONMATCHING -} - -/* 80CCA848-80CCA8CC 001248 0084+00 2/2 0/0 0/0 .text setModelMtx__14daSCannonCrs_cFv */ -void daSCannonCrs_c::setModelMtx() { - // NONMATCHING -} - -/* 80CCA8CC-80CCAAC4 0012CC 01F8+00 1/1 0/0 0/0 .text createHeap__14daSCannonCrs_cFv */ -void daSCannonCrs_c::createHeap() { - // NONMATCHING -} - -/* 80CCAAC4-80CCAB24 0014C4 0060+00 2/2 0/0 0/0 .text chkInTalkRange__14daSCannonCrs_cFv - */ -void daSCannonCrs_c::chkInTalkRange() { - // NONMATCHING -} - -/* 80CCAB24-80CCAC48 001524 0124+00 1/1 0/0 0/0 .text - * initEmtRt__14daSCannonCrs_cFUsiPCUsPP14JPABaseEmitter */ -void daSCannonCrs_c::initEmtRt(u16 param_0, int param_1, u16 const* param_2, - JPABaseEmitter** param_3) { - // NONMATCHING -} - -/* 80CCAC48-80CCACD0 001648 0088+00 1/1 0/0 0/0 .text - * exeEmtRt__14daSCannonCrs_cFUsiPP14JPABaseEmitter */ -void daSCannonCrs_c::exeEmtRt(u16 param_0, int param_1, JPABaseEmitter** param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCB100-80CCB10C 000080 000C+00 0/1 0/0 0/0 .rodata MIDNA_BEAM_OFFSET$4360 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const MIDNA_BEAM_OFFSET[12] = { - 0x00, 0x00, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CCB100, &MIDNA_BEAM_OFFSET); -#pragma pop - -/* 80CCB10C-80CCB110 00008C 0004+00 0/1 0/0 0/0 .rodata @4434 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4434 = 400.0f; -COMPILER_STRIP_GATE(0x80CCB10C, &lit_4434); -#pragma pop - -/* 80CCB110-80CCB114 000090 0004+00 0/1 0/0 0/0 .rodata @4435 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4435 = 1.0f / 100.0f; -COMPILER_STRIP_GATE(0x80CCB110, &lit_4435); -#pragma pop - -/* 80CCACD0-80CCAF20 0016D0 0250+00 1/1 0/0 0/0 .text callMidnaBeamEmt__14daSCannonCrs_cFv */ -void daSCannonCrs_c::callMidnaBeamEmt() { - // NONMATCHING -} - -/* 80CCAF20-80CCAF74 001920 0054+00 1/0 0/0 0/0 .text daSCannonCrs_create__FP14daSCannonCrs_c */ -static void daSCannonCrs_create(daSCannonCrs_c* param_0) { - // NONMATCHING -} - -/* 80CCAF74-80CCAF94 001974 0020+00 1/0 0/0 0/0 .text daSCannonCrs_Delete__FP14daSCannonCrs_c */ -static void daSCannonCrs_Delete(daSCannonCrs_c* param_0) { - // NONMATCHING -} - -/* 80CCAF94-80CCAFB4 001994 0020+00 1/0 0/0 0/0 .text daSCannonCrs_execute__FP14daSCannonCrs_c */ -static void daSCannonCrs_execute(daSCannonCrs_c* param_0) { - // NONMATCHING -} - -/* 80CCAFB4-80CCAFD4 0019B4 0020+00 1/0 0/0 0/0 .text daSCannonCrs_draw__FP14daSCannonCrs_c */ -static void daSCannonCrs_draw(daSCannonCrs_c* param_0) { - // NONMATCHING -} - -/* 80CCAFD4-80CCB074 0019D4 00A0+00 0/0 1/0 0/0 .text __sinit_d_a_obj_scannon_crs_cpp */ -void __sinit_d_a_obj_scannon_crs_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80CCAFD4, __sinit_d_a_obj_scannon_crs_cpp); -#pragma pop - -/* 80CCB114-80CCB114 000094 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_obj_scannon_ten.cpp b/src/d/actor/d_a_obj_scannon_ten.cpp index 16762ffb8a..034e81dc32 100644 --- a/src/d/actor/d_a_obj_scannon_ten.cpp +++ b/src/d/actor/d_a_obj_scannon_ten.cpp @@ -6,380 +6,530 @@ #include "d/dolzel_rel.h" #include "d/actor/d_a_obj_scannon_ten.h" -#include "dol2asm.h" +#include "d/actor/d_a_player.h" +#include "d/d_s_play.h" +#include "f_op/f_op_camera_mng.h" +/* 80CCCCF0-80CCCCF4 -00001 0004+00 4/4 0/0 0/0 .data l_arcName */ +static char* l_arcName = "SCanTen"; +/* 80CCCCF4-80CCCCF8 -00001 0004+00 1/1 0/0 0/0 .data l_staffName */ +static char* l_staffName = "SCanTen"; -// -// Forward References: -// - -extern "C" static void eventCallBack__FPvi(); -extern "C" static void daObjSCannonTen_c_createHeap__FP10fopAc_ac_c(); -extern "C" void __ct__17daObjSCannonTen_cFv(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" void __dt__17daObjSCannonTen_cFv(); -extern "C" void createHeap__17daObjSCannonTen_cFv(); -extern "C" void create__17daObjSCannonTen_cFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void Delete__17daObjSCannonTen_cFv(); -extern "C" void draw__17daObjSCannonTen_cFv(); -extern "C" void execute__17daObjSCannonTen_cFv(); -extern "C" void middleExe__17daObjSCannonTen_cFv(); -extern "C" void exeModeWait__17daObjSCannonTen_cFv(); -extern "C" void exeModeOrderEvt__17daObjSCannonTen_cFv(); -extern "C" void exeModeActionEvt__17daObjSCannonTen_cFv(); -extern "C" void exeModeEnd__17daObjSCannonTen_cFv(); -extern "C" void demoExe__17daObjSCannonTen_cFv(); -extern "C" void demoModeInit__17daObjSCannonTen_cFi(); -extern "C" void demoInitLinkIn__17daObjSCannonTen_cFv(); -extern "C" void demoExeLinkIn__17daObjSCannonTen_cFv(); -extern "C" void demoInitSet__17daObjSCannonTen_cFv(); -extern "C" void demoExeSet__17daObjSCannonTen_cFv(); -extern "C" void demoInitMove__17daObjSCannonTen_cFv(); -extern "C" void demoExeMove__17daObjSCannonTen_cFv(); -extern "C" void demoInitFire__17daObjSCannonTen_cFv(); -extern "C" void demoExeFire__17daObjSCannonTen_cFv(); -extern "C" void demoInitFireEnd__17daObjSCannonTen_cFv(); -extern "C" void demoExeFireEnd__17daObjSCannonTen_cFv(); -extern "C" void demoInitFinish__17daObjSCannonTen_cFv(); -extern "C" void demoExeFinish__17daObjSCannonTen_cFv(); -extern "C" void init__17daObjSCannonTen_cFv(); -extern "C" void setModelMtx__17daObjSCannonTen_cFv(); -extern "C" void changeScene__17daObjSCannonTen_cFv(); -extern "C" void initEmtSmoke__17daObjSCannonTen_cFv(); -extern "C" void exeEmtSmoke__17daObjSCannonTen_cFv(); -extern "C" void initEmtLine__17daObjSCannonTen_cFv(); -extern "C" void exeEmtLine__17daObjSCannonTen_cFv(); -extern "C" void delEmtAll__17daObjSCannonTen_cFv(); -extern "C" static void daObjSCannonTen_create__FP17daObjSCannonTen_c(); -extern "C" static void daObjSCannonTen_Delete__FP17daObjSCannonTen_c(); -extern "C" static void daObjSCannonTen_execute__FP17daObjSCannonTen_c(); -extern "C" static void daObjSCannonTen_draw__FP17daObjSCannonTen_c(); -extern "C" void func_80CCCA6C(void* _this, int*); -extern "C" void __sinit_d_a_obj_scannon_ten_cpp(); -extern "C" static void func_80CCCC1C(); -extern "C" static void func_80CCCC24(); -extern "C" extern char const* const d_a_obj_scannon_ten__stringBase0; -extern "C" u8 s_exeProc__17daObjSCannonTen_c[48]; -extern "C" u8 s_demoExeProc__17daObjSCannonTen_c[144]; - -// -// External References: -// - -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void play__14mDoExt_baseAnmFv(); -extern "C" void init__13mDoExt_bckAnmFP15J3DAnmTransformiifssb(); -extern "C" void entry__13mDoExt_bckAnmFP12J3DModelDataf(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff(); -extern "C" void fopAcM_orderOtherEventId__FP10fopAc_ac_csUcUsUsUs(); -extern "C" void dStage_changeScene__FifUlScsi(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfGp_getReverb__Fi(); -extern "C" void -dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void reset__14dEvt_control_cFv(); -extern "C" void setSkipProc__14dEvt_control_cFPvPFPvi_ii(); -extern "C" void getEventIdx__16dEvent_manager_cFP10fopAc_ac_cPCcUc(); -extern "C" void endCheck__16dEvent_manager_cFs(); -extern "C" void getMyStaffId__16dEvent_manager_cFPCcP10fopAc_ac_ci(); -extern "C" void getIsAddvance__16dEvent_manager_cFi(); -extern "C" void getMyActIdx__16dEvent_manager_cFiPCPCciii(); -extern "C" void getMySubstanceP__16dEvent_manager_cFiPCci(); -extern "C" void cutEnd__16dEvent_manager_cFi(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void StartQuake__12dVibration_cFii4cXyz(); -extern "C" void StopQuake__12dVibration_cFi(); -extern "C" void CheckQuake__12dVibration_cFv(); -extern "C" void Release__4cBgSFP9dBgW_Base(); -extern "C" void Regist__4dBgSFP9dBgW_BaseP10fopAc_ac_c(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void Set__4cBgWFP6cBgD_tUlPA3_A4_f(); -extern "C" void __ct__4dBgWFv(); -extern "C" void dCam_getAngleY__FP12camera_class(); -extern "C" void dCam_getAngleX__FP12camera_class(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void __ct__13cBgS_PolyInfoFv(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void ChkUsed__9cBgW_BgIdCFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void JPAGetXYZRotateMtx__FsssPA4_f(); -extern "C" void func_802807E0(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void getName__10JUTNameTabCFUs(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void __ptmf_test(); -extern "C" void __ptmf_scall(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; - -// -// Declarations: -// +/* 80CCCCF8-80CCCCFC -00001 0004+00 1/1 0/0 0/0 .data l_eventName */ +static char* l_eventName = "SKY_CANNON_TEN_FIRE"; /* 80CCB318-80CCB344 000078 002C+00 1/1 0/0 0/0 .text eventCallBack__FPvi */ -static void eventCallBack(void* param_0, int param_1) { - // NONMATCHING +static int eventCallBack(void* i_proc, int param_1) { + if (i_proc != NULL) { + ((daObjSCannonTen_c*)i_proc)->changeScene(); + } + + return 1; } /* 80CCB344-80CCB364 0000A4 0020+00 1/1 0/0 0/0 .text daObjSCannonTen_c_createHeap__FP10fopAc_ac_c */ -static void daObjSCannonTen_c_createHeap(fopAc_ac_c* param_0) { - // NONMATCHING +static int daObjSCannonTen_c_createHeap(fopAc_ac_c* i_this) { + return ((daObjSCannonTen_c*)i_this)->createHeap(); } -/* ############################################################################################## */ -/* 80CCCC80-80CCCC80 000048 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80CCCC80 = "SCanTen"; -SECTION_DEAD static char const* const stringBase_80CCCC88 = "SKY_CANNON_TEN_FIRE"; -SECTION_DEAD static char const* const stringBase_80CCCC9C = "head"; -SECTION_DEAD static char const* const stringBase_80CCCCA1 = "LINK_IN"; -SECTION_DEAD static char const* const stringBase_80CCCCA9 = "SET"; -SECTION_DEAD static char const* const stringBase_80CCCCAD = "MOVE"; -SECTION_DEAD static char const* const stringBase_80CCCCB2 = "FIRE"; -SECTION_DEAD static char const* const stringBase_80CCCCB7 = "FIRE_END"; -SECTION_DEAD static char const* const stringBase_80CCCCC0 = "FINISH"; -#pragma pop +/* 80CCB364-80CCB3F4 0000C4 0090+00 2/2 0/0 0/0 .text __ct__17daObjSCannonTen_cFv */ +daObjSCannonTen_c::daObjSCannonTen_c() { + mpBgW = NULL; + memset(mpEmtSmk, 0, sizeof(mpEmtSmk)); + mpEmtLine = NULL; +} -/* 80CCCCF0-80CCCCF4 -00001 0004+00 4/4 0/0 0/0 .data l_arcName */ -SECTION_DATA static void* l_arcName = (void*)&d_a_obj_scannon_ten__stringBase0; +/* 80CCB43C-80CCB4EC 00019C 00B0+00 1/0 0/0 0/0 .text __dt__17daObjSCannonTen_cFv */ +daObjSCannonTen_c::~daObjSCannonTen_c() { + dComIfG_resDelete(this, l_arcName); +} -/* 80CCCCF4-80CCCCF8 -00001 0004+00 1/1 0/0 0/0 .data l_staffName */ -SECTION_DATA static void* l_staffName = (void*)&d_a_obj_scannon_ten__stringBase0; +/* 80CCB4EC-80CCB66C 00024C 0180+00 1/1 0/0 0/0 .text createHeap__17daObjSCannonTen_cFv + */ +int daObjSCannonTen_c::createHeap() { + J3DModelData* a_model_data_p = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 9); + JUT_ASSERT(116, a_model_data_p != 0); -/* 80CCCCF8-80CCCCFC -00001 0004+00 1/1 0/0 0/0 .data l_eventName */ -SECTION_DATA static void* l_eventName = (void*)(((char*)&d_a_obj_scannon_ten__stringBase0) + 0x8); + mpModel = mDoExt_J3DModel__create(a_model_data_p, J3DMdlFlag_DifferedDLBuffer, J3D_DIFF_FLAG(FALSE, FALSE, TRUE, 8, 0, FALSE, 0, 0, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE)); + if (mpModel == NULL) { + return 0; + } -/* 80CCCCFC-80CCCD08 -00001 000C+00 0/1 0/0 0/0 .data @3994 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3994[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeWait__17daObjSCannonTen_cFv, -}; -#pragma pop + J3DAnmTransform* a_bck_p = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, 6); + JUT_ASSERT(133, a_bck_p != 0); + int rt = mBck.init(a_bck_p, 1, 0, 0.0f, 0, -1, 0); + if (!rt) { + return 0; + } -/* 80CCCD08-80CCCD14 -00001 000C+00 0/1 0/0 0/0 .data @3995 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3995[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeOrderEvt__17daObjSCannonTen_cFv, -}; -#pragma pop + mpBgW = new dBgW(); + if (mpBgW == NULL) { + return 0; + } -/* 80CCCD14-80CCCD20 -00001 000C+00 0/1 0/0 0/0 .data @3996 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3996[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeActionEvt__17daObjSCannonTen_cFv, -}; -#pragma pop + mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); + mDoMtx_stack_c::YrotM(shape_angle.y); + MTXCopy(mDoMtx_stack_c::get(), mBgMtx); -/* 80CCCD20-80CCCD2C -00001 000C+00 0/1 0/0 0/0 .data @3997 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3997[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)exeModeEnd__17daObjSCannonTen_cFv, -}; -#pragma pop + if (mpBgW->Set((cBgD_t*)dComIfG_getObjectRes(l_arcName, 12), 1, &mBgMtx) == 1) { + return 0; + } + + return 1; +} + +/* 80CCB66C-80CCB900 0003CC 0294+00 1/1 0/0 0/0 .text create__17daObjSCannonTen_cFv */ +int daObjSCannonTen_c::create() { + fopAcM_SetupActor(this, daObjSCannonTen_c); + + int phase_state = dComIfG_resLoad(this, l_arcName); + if (phase_state == cPhs_COMPLEATE_e) { + if (!fopAcM_entrySolidHeap(this, daObjSCannonTen_c_createHeap, 0x9500)) { + return cPhs_ERROR_e; + } + + if (dComIfG_Bgsp().Regist(mpBgW, this)) { + return cPhs_ERROR_e; + } + + init(); + + setModelMtx(); + fopAcM_SetMtx(this, mpModel->getBaseTRMtx()); + fopAcM_setCullSizeFar(this, 5.0f); + + J3DJoint* joint_p = mpModel->getModelData()->getJointNodePointer(0); + if (joint_p != NULL) { + fopAcM_setCullSizeBox(this, + joint_p->getMin()->x - 500.0f, joint_p->getMin()->y, joint_p->getMin()->z - 500.0f, + 500.0f + joint_p->getMax()->x, joint_p->getMax()->y, 500.0f + joint_p->getMax()->z); + } + + dBgS_AcchCir acchcir; + dBgS_ObjAcch acch; + acchcir.SetWall(0.0f, 10.0f); + acch.Set(¤t.pos, &old.pos, this, 1, &acchcir, fopAcM_GetSpeed_p(this), NULL, NULL); + acch.CrrPos(dComIfG_Bgsp()); + mGroundY = acch.GetGroundH(); + mGroundPoly = acch.m_gnd; + + JUTNameTab* nametab_p = mpModel->getModelData()->getJointTree().getJointName(); + for (int i = 0; i < mpModel->getModelData()->getJointNum(); i++) { + if (strcmp(nametab_p->getName(i), "head") == 0) { + mHeadJointNo = i; + break; + } + } + } + + return phase_state; +} + +/* 80CCB9E0-80CCBA58 000740 0078+00 1/1 0/0 0/0 .text Delete__17daObjSCannonTen_cFv */ +int daObjSCannonTen_c::Delete() { + if (mpBgW != NULL && mpBgW->ChkUsed()) { + dComIfG_Bgsp().Release(mpBgW); + } + + delEmtAll(); + this->~daObjSCannonTen_c(); + return 1; +} + +/* 80CCBA58-80CCBB6C 0007B8 0114+00 1/1 0/0 0/0 .text draw__17daObjSCannonTen_cFv */ +int daObjSCannonTen_c::draw() { + g_env_light.settingTevStruct(8, ¤t.pos, &tevStr); + g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr); + + mBck.entry(mpModel->getModelData()); + + dComIfGd_setListBG(); + mDoExt_modelUpdateDL(mpModel); + dComIfGd_setList(); + + cXyz sp8(current.pos.x, current.pos.y, current.pos.z); + mShadowKey = dComIfGd_setShadow(mShadowKey, 1, mpModel, &sp8, 2500.0f, 0.0f, current.pos.y, mGroundY, mGroundPoly, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + return 1; +} + +/* 80CCBB6C-80CCBB90 0008CC 0024+00 1/1 0/0 0/0 .text execute__17daObjSCannonTen_cFv */ +int daObjSCannonTen_c::execute() { + middleExe(); + return 1; +} + +/* 80CCBB90-80CCBC08 0008F0 0078+00 1/1 0/0 0/0 .text middleExe__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::middleExe() { + if (s_exeProc[mMode] != NULL) { + (this->*s_exeProc[mMode])(); + } + + setModelMtx(); + + mBck.play(); +} + +/* 80CCBC08-80CCBCB0 000968 00A8+00 1/0 0/0 0/0 .text exeModeWait__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::exeModeWait() { + if (aREG_F(0) == 0.0f && fopAcM_checkHookCarryNow(this) && dComIfGp_checkPlayerStatus1(0, 0x10)) { + eventInfo.setArchiveName(l_arcName); + mEvtIdx = dComIfGp_getEventManager().getEventIdx(this, l_eventName, 0xFF); +#ifdef DEBUG + if (mEvtIdx == -1) { + // "××××××××××××× Sky Cannon (City in the Sky) d_a_obj_scannon_ten.cpp: Failed to get event\n" + OS_REPORT("×××××××××天空砲台(天空都市) d_a_obj_scannon_ten.cpp:イベント取得失敗\n"); + return; + } +#endif + + fopAcM_orderOtherEventId(this, mEvtIdx, 0xFF, 0xFFFF, 0, 1); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); + mMode = MODE_ORDER_EVT; + } +} + +/* 80CCBCB0-80CCBD4C 000A10 009C+00 1/0 0/0 0/0 .text exeModeOrderEvt__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::exeModeOrderEvt() { + if (eventInfo.checkCommandDemoAccrpt()) { + mStaffId = dComIfGp_evmng_getMyStaffId(l_staffName, NULL, 0); + mMode = MODE_ACTION_EVT; + demoModeInit(0); + } else { + fopAcM_orderOtherEventId(this, mEvtIdx, 0xFF, 0xFFFF, 0, 1); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); + } +} /* 80CCCD2C-80CCCD5C 00005C 0030+00 1/2 0/0 0/0 .data s_exeProc__17daObjSCannonTen_c */ -SECTION_DATA u8 daObjSCannonTen_c::s_exeProc[48] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daObjSCannonTen_c::*daObjSCannonTen_c::s_exeProc[])() = { + &daObjSCannonTen_c::exeModeWait, + &daObjSCannonTen_c::exeModeOrderEvt, + &daObjSCannonTen_c::exeModeActionEvt, + &daObjSCannonTen_c::exeModeEnd, }; -/* 80CCCD5C-80CCCD68 -00001 000C+00 0/1 0/0 0/0 .data @4043 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4043[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitLinkIn__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCD68-80CCCD74 -00001 000C+00 0/1 0/0 0/0 .data @4044 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4044[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeLinkIn__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCD74-80CCCD80 -00001 000C+00 0/1 0/0 0/0 .data @4045 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4045[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitSet__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCD80-80CCCD8C -00001 000C+00 0/1 0/0 0/0 .data @4046 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4046[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeSet__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCD8C-80CCCD98 -00001 000C+00 0/1 0/0 0/0 .data @4047 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4047[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitMove__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCD98-80CCCDA4 -00001 000C+00 0/1 0/0 0/0 .data @4048 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4048[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeMove__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCDA4-80CCCDB0 -00001 000C+00 0/1 0/0 0/0 .data @4049 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4049[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitFire__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCDB0-80CCCDBC -00001 000C+00 0/1 0/0 0/0 .data @4050 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4050[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeFire__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCDBC-80CCCDC8 -00001 000C+00 0/1 0/0 0/0 .data @4051 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4051[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitFireEnd__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCDC8-80CCCDD4 -00001 000C+00 0/1 0/0 0/0 .data @4052 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4052[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeFireEnd__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCDD4-80CCCDE0 -00001 000C+00 0/1 0/0 0/0 .data @4053 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4053[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoInitFinish__17daObjSCannonTen_cFv, -}; -#pragma pop - -/* 80CCCDE0-80CCCDEC -00001 000C+00 0/1 0/0 0/0 .data @4054 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_4054[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)demoExeFinish__17daObjSCannonTen_cFv, -}; -#pragma pop - /* 80CCCDEC-80CCCE7C 00011C 0090+00 2/3 0/0 0/0 .data s_demoExeProc__17daObjSCannonTen_c */ -SECTION_DATA u8 daObjSCannonTen_c::s_demoExeProc[144] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +void (daObjSCannonTen_c::*daObjSCannonTen_c::s_demoExeProc[][2])() = { + {&daObjSCannonTen_c::demoInitLinkIn, &daObjSCannonTen_c::demoExeLinkIn}, + {&daObjSCannonTen_c::demoInitSet, &daObjSCannonTen_c::demoExeSet}, + {&daObjSCannonTen_c::demoInitMove, &daObjSCannonTen_c::demoExeMove}, + {&daObjSCannonTen_c::demoInitFire, &daObjSCannonTen_c::demoExeFire}, + {&daObjSCannonTen_c::demoInitFireEnd, &daObjSCannonTen_c::demoExeFireEnd}, + {&daObjSCannonTen_c::demoInitFinish, &daObjSCannonTen_c::demoExeFinish}, }; -/* 80CCCE7C-80CCCE94 -00001 0018+00 1/1 0/0 0/0 .data CUT_TYPE_TABLE_FIRE_SECOND$4058 */ -SECTION_DATA static void* CUT_TYPE_TABLE_FIRE_SECOND[6] = { - (void*)(((char*)&d_a_obj_scannon_ten__stringBase0) + 0x21), - (void*)(((char*)&d_a_obj_scannon_ten__stringBase0) + 0x29), - (void*)(((char*)&d_a_obj_scannon_ten__stringBase0) + 0x2D), - (void*)(((char*)&d_a_obj_scannon_ten__stringBase0) + 0x32), - (void*)(((char*)&d_a_obj_scannon_ten__stringBase0) + 0x37), - (void*)(((char*)&d_a_obj_scannon_ten__stringBase0) + 0x40), -}; +/* 80CCBD4C-80CCBDCC 000AAC 0080+00 1/0 0/0 0/0 .text exeModeActionEvt__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::exeModeActionEvt() { + if (dComIfGp_evmng_endCheck(mEvtIdx) != 0) { + dComIfGp_event_reset(); + mMode = MODE_END; + } else { + dComIfGp_getEvent().setSkipProc(this, eventCallBack, 0); + demoExe(); + } +} + +/* 80CCBDCC-80CCBDD0 000B2C 0004+00 1/0 0/0 0/0 .text exeModeEnd__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::exeModeEnd() {} + +/* 80CCBDD0-80CCBE8C 000B30 00BC+00 1/1 0/0 0/0 .text demoExe__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::demoExe() { + static char* CUT_TYPE_TABLE_FIRE_SECOND[6] = { + "LINK_IN", + "SET", + "MOVE", + "FIRE", + "FIRE_END", + "FINISH", + }; + + int act_idx = dComIfGp_evmng_getMyActIdx(mStaffId, CUT_TYPE_TABLE_FIRE_SECOND, ARRAY_SIZE(CUT_TYPE_TABLE_FIRE_SECOND), 0, 0); + if (act_idx != -1) { + if (dComIfGp_evmng_getIsAddvance(mStaffId)) { + demoModeInit(act_idx); + } + + if (s_demoExeProc[act_idx][1] != NULL) { + (this->*s_demoExeProc[act_idx][1])(); + } + } +} + +/* 80CCBE8C-80CCBF00 000BEC 0074+00 2/2 0/0 0/0 .text demoModeInit__17daObjSCannonTen_cFi + */ +void daObjSCannonTen_c::demoModeInit(int i_actIdx) { + if (i_actIdx < 0 || i_actIdx >= 6) { + return; + } + + if (s_demoExeProc[i_actIdx][0] != NULL) { + (this->*s_demoExeProc[i_actIdx][0])(); + } +} + +/* 80CCBF00-80CCBF04 000C60 0004+00 1/0 0/0 0/0 .text demoInitLinkIn__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::demoInitLinkIn() {} + +/* 80CCBF04-80CCBFC4 000C64 00C0+00 1/0 0/0 0/0 .text demoExeLinkIn__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::demoExeLinkIn() { + if (!fopAcM_checkHookCarryNow(this)) { + daPy_py_c* player_p = daPy_getPlayerActorClass(); + if (player_p != NULL) { + player_p->onPlayerNoDraw(); + player_p->onPlayerShadowNoDraw(); + + cXyz pos(12.100221f, 264.13156f, 12069.783f); + player_p->setPlayerPosAndAngle(&pos, player_p->shape_angle.y, 0); + mpBgW->OffRoofRegist(); + } + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CCBFC4-80CCC088 000D24 00C4+00 1/0 0/0 0/0 .text demoInitSet__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::demoInitSet() { + fopAcM_seStartCurrent(this, Z2SE_OBJ_TCANNON_ACTION_L7, 0); + mBck.setPlaySpeed(1.0f); + initEmtSmoke(); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER3, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); +} + +/* 80CCC088-80CCC114 000DE8 008C+00 1/0 0/0 0/0 .text demoExeSet__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::demoExeSet() { + exeEmtSmoke(); + if (mBck.checkFrame(84)) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CCC114-80CCC118 000E74 0004+00 1/0 0/0 0/0 .text demoInitMove__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::demoInitMove() {} + +/* 80CCC118-80CCC20C 000E78 00F4+00 1/0 0/0 0/0 .text demoExeMove__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::demoExeMove() { + exeEmtSmoke(); + if (mBck.checkFrame(104.0f)) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + } else if (mBck.checkFrame(120.0f)) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + } else if (mBck.checkFrame(138.0f)) { + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CCC20C-80CCC260 000F6C 0054+00 1/0 0/0 0/0 .text demoInitFire__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::demoInitFire() { + dComIfGp_getVibration().StartQuake(3, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); +} + +/* 80CCC260-80CCC2B8 000FC0 0058+00 1/0 0/0 0/0 .text demoExeFire__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::demoExeFire() { + exeEmtSmoke(); + if (mBck.checkFrame(235.0f)) { + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CCC2B8-80CCC37C 001018 00C4+00 1/0 0/0 0/0 .text demoInitFireEnd__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::demoInitFireEnd() { + fopAcM_seStartCurrent(this, Z2SE_OBJ_BOMB_EXPLODE, 0); + + dComIfGp_getVibration().StopQuake(0x1F); + dComIfGp_getVibration().StartShock(8, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); +} + +/* 80CCC37C-80CCC3D4 0010DC 0058+00 1/0 0/0 0/0 .text demoExeFireEnd__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::demoExeFireEnd() { + exeEmtSmoke(); + if (mBck.checkFrame(255.0f)) { + dComIfGp_evmng_cutEnd(mStaffId); + } +} + +/* 80CCC3D4-80CCC498 001134 00C4+00 1/0 0/0 0/0 .text demoInitFinish__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::demoInitFinish() { +#ifdef DEBUG + J3DJoint* joint_p = mpModel->getModelData()->getJointNodePointer(mHeadJointNo); + if (joint_p == NULL) { + // "××××××Sky Cannon—The head joint is missing!!!! ××××××" + OS_REPORT("______________________××××××天空砲台 頭部分のジョイントがありません!!!! ××××××____________\n"); + JUT_ASSERT(1351, 0); + } +#endif + + mDoAud_seStart(Z2SE_AL_V_CANON_JUMP, NULL, 0, 0); + initEmtLine(); + fopAcM_OffStatus(this, fopAcM_STATUS_UNK_000080); + + int* timer_p = dComIfGp_evmng_getMyIntegerP(mStaffId, "Timer"); + if (timer_p != NULL) { + mTimer = *timer_p; + } else { + mTimer = 1; + } +} + +/* 80CCC498-80CCC528 0011F8 0090+00 1/0 0/0 0/0 .text demoExeFinish__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::demoExeFinish() { + exeEmtSmoke(); + exeEmtLine(); + + if (mBck.isStop() && cLib_calcTimer(&mTimer) == 0) { + dComIfGp_evmng_cutEnd(mStaffId); + changeScene(); + } +} + +/* 80CCC528-80CCC53C 001288 0014+00 1/1 0/0 0/0 .text init__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::init() { + mTimer = 0; + mMode = MODE_WAIT; + mShadowKey = 0; +} + +/* 80CCC53C-80CCC5A0 00129C 0064+00 2/2 0/0 0/0 .text setModelMtx__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::setModelMtx() { + mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); + mDoMtx_stack_c::YrotM(shape_angle.y); + mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); +} + +/* 80CCC5A0-80CCC628 001300 0088+00 2/2 0/0 0/0 .text changeScene__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::changeScene() { + if (dComIfGp_getVibration().CheckQuake()) { + dComIfGp_getVibration().StopQuake(0x1F); + } + + fopAcM_OnStatus(this, fopAcM_STATUS_UNK_000080); + + dStage_changeScene(1, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1); +} + +/* 80CCC628-80CCC74C 001388 0124+00 1/1 0/0 0/0 .text initEmtSmoke__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::initEmtSmoke() { + static const u16 PARTICLE_NAME[] = { + dPa_RM(ID_ZF_S_SKYCANNON00_SMK), + dPa_RM(ID_ZF_S_SKYCANNON01_SMK), + dPa_RM(ID_ZF_S_SKYCANNON02_SMK), + }; + + MtxP mtx = mpModel->getAnmMtx(mHeadJointNo); + if (mtx != NULL) { + cXyz pos(mtx[0][3], mtx[1][3], mtx[2][3]); + csXyz rot(current.angle); + cXyz size(1.0f, 1.0f, 1.0f); + + for (int i = 0; i < ARRAY_SIZE(mpEmtSmk); i++) { + mpEmtSmk[i] = dComIfGp_particle_set(PARTICLE_NAME[i], &pos, &rot, &size); + if (mpEmtSmk[i] != NULL) { + mpEmtSmk[i]->setGlobalRTMatrix(mtx); + } + } + } +} + +/* 80CCC74C-80CCC7D0 0014AC 0084+00 5/5 0/0 0/0 .text exeEmtSmoke__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::exeEmtSmoke() { + MtxP mtx = mpModel->getAnmMtx(mHeadJointNo); + if (mtx != NULL) { + for (int i = 0; i < ARRAY_SIZE(mpEmtSmk); i++) { + if (mpEmtSmk[i] != NULL) { + mpEmtSmk[i]->setGlobalRTMatrix(mtx); + } + } + } +} + +/* 80CCC7D0-80CCC8B8 001530 00E8+00 1/1 0/0 0/0 .text initEmtLine__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::initEmtLine() { + cXyz pos; + csXyz rot; + + camera_class* camera_p = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + if (camera_p != NULL) { + pos = *fopCamM_GetEye_p(camera_p); + rot.set(dCam_getAngleX(camera_p), dCam_getAngleY(camera_p), 0); + } + + mpEmtLine = dComIfGp_particle_set(dPa_RM(ID_ZF_S_TOBYCANNON00LINE), &pos, &tevStr, &rot, NULL); +} + +/* 80CCC8B8-80CCC97C 001618 00C4+00 1/1 0/0 0/0 .text exeEmtLine__17daObjSCannonTen_cFv + */ +void daObjSCannonTen_c::exeEmtLine() { + cXyz pos; + JGeometry::TVec3 rot; + if (mpEmtLine != NULL) { + camera_class* camera_p = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + if (camera_p != NULL) { + pos = *fopCamM_GetEye_p(camera_p); + rot.x = dCam_getAngleX(camera_p); + rot.y = dCam_getAngleY(camera_p); + rot.z = 0; + } + mpEmtLine->setGlobalTranslation(pos.x, pos.y, pos.z); + mpEmtLine->setGlobalRotation(rot); + } +} + +/* 80CCC97C-80CCC9B8 0016DC 003C+00 1/1 0/0 0/0 .text delEmtAll__17daObjSCannonTen_cFv */ +void daObjSCannonTen_c::delEmtAll() { + if (mpEmtLine != NULL) { + mpEmtLine->becomeInvalidEmitter(); + mpEmtLine->quitImmortalEmitter(); + mpEmtLine = NULL; + } +} + +/* 80CCC9B8-80CCCA0C 001718 0054+00 1/0 0/0 0/0 .text + * daObjSCannonTen_create__FP17daObjSCannonTen_c */ +static int daObjSCannonTen_create(daObjSCannonTen_c* i_this) { + fopAcM_SetupActor(i_this, daObjSCannonTen_c); + return i_this->create(); +} + +/* 80CCCA0C-80CCCA2C 00176C 0020+00 1/0 0/0 0/0 .text + * daObjSCannonTen_Delete__FP17daObjSCannonTen_c */ +static int daObjSCannonTen_Delete(daObjSCannonTen_c* i_this) { + return i_this->Delete(); +} + +/* 80CCCA2C-80CCCA4C 00178C 0020+00 1/0 0/0 0/0 .text + * daObjSCannonTen_execute__FP17daObjSCannonTen_c */ +static int daObjSCannonTen_execute(daObjSCannonTen_c* i_this) { + return i_this->execute(); +} + +/* 80CCCA4C-80CCCA6C 0017AC 0020+00 1/0 0/0 0/0 .text daObjSCannonTen_draw__FP17daObjSCannonTen_c + */ +static int daObjSCannonTen_draw(daObjSCannonTen_c* i_this) { + return i_this->draw(); +} /* 80CCCE94-80CCCEB4 -00001 0020+00 1/0 0/0 0/0 .data daObjSCannonTen_METHODS */ static actor_method_class daObjSCannonTen_METHODS = { - (process_method_func)daObjSCannonTen_create__FP17daObjSCannonTen_c, - (process_method_func)daObjSCannonTen_Delete__FP17daObjSCannonTen_c, - (process_method_func)daObjSCannonTen_execute__FP17daObjSCannonTen_c, + (process_method_func)daObjSCannonTen_create, + (process_method_func)daObjSCannonTen_Delete, + (process_method_func)daObjSCannonTen_execute, 0, - (process_method_func)daObjSCannonTen_draw__FP17daObjSCannonTen_c, + (process_method_func)daObjSCannonTen_draw, }; /* 80CCCEB4-80CCCEE4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_SCannonTen */ @@ -399,425 +549,3 @@ extern actor_process_profile_definition g_profile_Obj_SCannonTen = { fopAc_ENV_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 80CCCEE4-80CCCEF0 000214 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; - -/* 80CCCEF0-80CCCF14 000220 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80CCCC24, - (void*)NULL, - (void*)NULL, - (void*)func_80CCCC1C, -}; - -/* 80CCCF14-80CCCF20 000244 000C+00 2/2 0/0 0/0 .data __vt__17daObjSCannonTen_c */ -SECTION_DATA extern void* __vt__17daObjSCannonTen_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__17daObjSCannonTen_cFv, -}; - -/* 80CCCF20-80CCCF2C 000250 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; - -/* 80CCB364-80CCB3F4 0000C4 0090+00 2/2 0/0 0/0 .text __ct__17daObjSCannonTen_cFv */ -daObjSCannonTen_c::daObjSCannonTen_c() { - // NONMATCHING -} - -/* 80CCB3F4-80CCB43C 000154 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING -} - -/* 80CCB43C-80CCB4EC 00019C 00B0+00 1/0 0/0 0/0 .text __dt__17daObjSCannonTen_cFv */ -daObjSCannonTen_c::~daObjSCannonTen_c() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC38-80CCCC3C 000000 0004+00 11/11 0/0 0/0 .rodata @3832 */ -SECTION_RODATA static u8 const lit_3832[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80CCCC38, &lit_3832); - -/* 80CCB4EC-80CCB66C 00024C 0180+00 1/1 0/0 0/0 .text createHeap__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::createHeap() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC3C-80CCCC40 000004 0004+00 0/1 0/0 0/0 .rodata @3931 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3931 = 5.0f; -COMPILER_STRIP_GATE(0x80CCCC3C, &lit_3931); -#pragma pop - -/* 80CCCC40-80CCCC44 000008 0004+00 0/1 0/0 0/0 .rodata @3932 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3932 = 500.0f; -COMPILER_STRIP_GATE(0x80CCCC40, &lit_3932); -#pragma pop - -/* 80CCCC44-80CCCC48 00000C 0004+00 0/1 0/0 0/0 .rodata @3933 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3933 = 10.0f; -COMPILER_STRIP_GATE(0x80CCCC44, &lit_3933); -#pragma pop - -/* 80CCB66C-80CCB900 0003CC 0294+00 1/1 0/0 0/0 .text create__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::create() { - // NONMATCHING -} - -/* 80CCB900-80CCB970 000660 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 80CCB970-80CCB9E0 0006D0 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 80CCB9E0-80CCBA58 000740 0078+00 1/1 0/0 0/0 .text Delete__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::Delete() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC48-80CCCC4C 000010 0004+00 0/1 0/0 0/0 .rodata @3986 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3986 = 2500.0f; -COMPILER_STRIP_GATE(0x80CCCC48, &lit_3986); -#pragma pop - -/* 80CCCC4C-80CCCC50 000014 0004+00 4/9 0/0 0/0 .rodata @3987 */ -SECTION_RODATA static f32 const lit_3987 = 1.0f; -COMPILER_STRIP_GATE(0x80CCCC4C, &lit_3987); - -/* 80CCBA58-80CCBB6C 0007B8 0114+00 1/1 0/0 0/0 .text draw__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::draw() { - // NONMATCHING -} - -/* 80CCBB6C-80CCBB90 0008CC 0024+00 1/1 0/0 0/0 .text execute__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::execute() { - // NONMATCHING -} - -/* 80CCBB90-80CCBC08 0008F0 0078+00 1/1 0/0 0/0 .text middleExe__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::middleExe() { - // NONMATCHING -} - -/* 80CCBC08-80CCBCB0 000968 00A8+00 1/0 0/0 0/0 .text exeModeWait__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::exeModeWait() { - // NONMATCHING -} - -/* 80CCBCB0-80CCBD4C 000A10 009C+00 1/0 0/0 0/0 .text exeModeOrderEvt__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::exeModeOrderEvt() { - // NONMATCHING -} - -/* 80CCBD4C-80CCBDCC 000AAC 0080+00 1/0 0/0 0/0 .text exeModeActionEvt__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::exeModeActionEvt() { - // NONMATCHING -} - -/* 80CCBDCC-80CCBDD0 000B2C 0004+00 1/0 0/0 0/0 .text exeModeEnd__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::exeModeEnd() { - /* empty function */ -} - -/* 80CCBDD0-80CCBE8C 000B30 00BC+00 1/1 0/0 0/0 .text demoExe__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::demoExe() { - // NONMATCHING -} - -/* 80CCBE8C-80CCBF00 000BEC 0074+00 2/2 0/0 0/0 .text demoModeInit__17daObjSCannonTen_cFi - */ -void daObjSCannonTen_c::demoModeInit(int param_0) { - // NONMATCHING -} - -/* 80CCBF00-80CCBF04 000C60 0004+00 1/0 0/0 0/0 .text demoInitLinkIn__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::demoInitLinkIn() { - /* empty function */ -} - -/* ############################################################################################## */ -/* 80CCCC50-80CCCC54 000018 0004+00 0/1 0/0 0/0 .rodata @4110 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4110 = 0x41419A81; -COMPILER_STRIP_GATE(0x80CCCC50, &lit_4110); -#pragma pop - -/* 80CCCC54-80CCCC58 00001C 0004+00 0/1 0/0 0/0 .rodata @4111 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4111 = 0x438410D7; -COMPILER_STRIP_GATE(0x80CCCC54, &lit_4111); -#pragma pop - -/* 80CCCC58-80CCCC5C 000020 0004+00 0/1 0/0 0/0 .rodata @4112 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4112 = 0x463C9722; -COMPILER_STRIP_GATE(0x80CCCC58, &lit_4112); -#pragma pop - -/* 80CCBF04-80CCBFC4 000C64 00C0+00 1/0 0/0 0/0 .text demoExeLinkIn__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::demoExeLinkIn() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC5C-80CCCC60 000024 0004+00 1/3 0/0 0/0 .rodata @4133 */ -SECTION_RODATA static f32 const lit_4133 = -1.0f; -COMPILER_STRIP_GATE(0x80CCCC5C, &lit_4133); - -/* 80CCBFC4-80CCC088 000D24 00C4+00 1/0 0/0 0/0 .text demoInitSet__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::demoInitSet() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC60-80CCCC64 000028 0004+00 0/1 0/0 0/0 .rodata @4149 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4149 = 84.0f; -COMPILER_STRIP_GATE(0x80CCCC60, &lit_4149); -#pragma pop - -/* 80CCC088-80CCC114 000DE8 008C+00 1/0 0/0 0/0 .text demoExeSet__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::demoExeSet() { - // NONMATCHING -} - -/* 80CCC114-80CCC118 000E74 0004+00 1/0 0/0 0/0 .text demoInitMove__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::demoInitMove() { - /* empty function */ -} - -/* ############################################################################################## */ -/* 80CCCC64-80CCCC68 00002C 0004+00 0/1 0/0 0/0 .rodata @4179 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4179 = 104.0f; -COMPILER_STRIP_GATE(0x80CCCC64, &lit_4179); -#pragma pop - -/* 80CCCC68-80CCCC6C 000030 0004+00 0/1 0/0 0/0 .rodata @4180 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4180 = 120.0f; -COMPILER_STRIP_GATE(0x80CCCC68, &lit_4180); -#pragma pop - -/* 80CCCC6C-80CCCC70 000034 0004+00 0/1 0/0 0/0 .rodata @4181 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4181 = 138.0f; -COMPILER_STRIP_GATE(0x80CCCC6C, &lit_4181); -#pragma pop - -/* 80CCC118-80CCC20C 000E78 00F4+00 1/0 0/0 0/0 .text demoExeMove__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::demoExeMove() { - // NONMATCHING -} - -/* 80CCC20C-80CCC260 000F6C 0054+00 1/0 0/0 0/0 .text demoInitFire__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::demoInitFire() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC70-80CCCC74 000038 0004+00 1/1 0/0 0/0 .rodata @4200 */ -SECTION_RODATA static f32 const lit_4200 = 235.0f; -COMPILER_STRIP_GATE(0x80CCCC70, &lit_4200); - -/* 80CCC260-80CCC2B8 000FC0 0058+00 1/0 0/0 0/0 .text demoExeFire__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::demoExeFire() { - // NONMATCHING -} - -/* 80CCC2B8-80CCC37C 001018 00C4+00 1/0 0/0 0/0 .text demoInitFireEnd__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::demoInitFireEnd() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC74-80CCCC78 00003C 0004+00 1/1 0/0 0/0 .rodata @4228 */ -SECTION_RODATA static f32 const lit_4228 = 255.0f; -COMPILER_STRIP_GATE(0x80CCCC74, &lit_4228); - -/* 80CCC37C-80CCC3D4 0010DC 0058+00 1/0 0/0 0/0 .text demoExeFireEnd__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::demoExeFireEnd() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC80-80CCCC80 000048 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80CCCCC7 = "Timer"; -#pragma pop - -/* 80CCC3D4-80CCC498 001134 00C4+00 1/0 0/0 0/0 .text demoInitFinish__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::demoInitFinish() { - // NONMATCHING -} - -/* 80CCC498-80CCC528 0011F8 0090+00 1/0 0/0 0/0 .text demoExeFinish__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::demoExeFinish() { - // NONMATCHING -} - -/* 80CCC528-80CCC53C 001288 0014+00 1/1 0/0 0/0 .text init__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::init() { - // NONMATCHING -} - -/* 80CCC53C-80CCC5A0 00129C 0064+00 2/2 0/0 0/0 .text setModelMtx__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::setModelMtx() { - // NONMATCHING -} - -/* 80CCC5A0-80CCC628 001300 0088+00 2/2 0/0 0/0 .text changeScene__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::changeScene() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CCCC78-80CCCC80 000040 0006+02 1/1 0/0 0/0 .rodata PARTICLE_NAME$4297 */ -SECTION_RODATA static u8 const PARTICLE_NAME[6 + 2 /* padding */] = { - 0x89, - 0xD9, - 0x89, - 0xDA, - 0x89, - 0xDB, - /* padding */ - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80CCCC78, &PARTICLE_NAME); - -/* 80CCC628-80CCC74C 001388 0124+00 1/1 0/0 0/0 .text initEmtSmoke__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::initEmtSmoke() { - // NONMATCHING -} - -/* 80CCC74C-80CCC7D0 0014AC 0084+00 5/5 0/0 0/0 .text exeEmtSmoke__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::exeEmtSmoke() { - // NONMATCHING -} - -/* 80CCC7D0-80CCC8B8 001530 00E8+00 1/1 0/0 0/0 .text initEmtLine__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::initEmtLine() { - // NONMATCHING -} - -/* 80CCC8B8-80CCC97C 001618 00C4+00 1/1 0/0 0/0 .text exeEmtLine__17daObjSCannonTen_cFv - */ -void daObjSCannonTen_c::exeEmtLine() { - // NONMATCHING -} - -/* 80CCC97C-80CCC9B8 0016DC 003C+00 1/1 0/0 0/0 .text delEmtAll__17daObjSCannonTen_cFv */ -void daObjSCannonTen_c::delEmtAll() { - // NONMATCHING -} - -/* 80CCC9B8-80CCCA0C 001718 0054+00 1/0 0/0 0/0 .text - * daObjSCannonTen_create__FP17daObjSCannonTen_c */ -static void daObjSCannonTen_create(daObjSCannonTen_c* param_0) { - // NONMATCHING -} - -/* 80CCCA0C-80CCCA2C 00176C 0020+00 1/0 0/0 0/0 .text - * daObjSCannonTen_Delete__FP17daObjSCannonTen_c */ -static void daObjSCannonTen_Delete(daObjSCannonTen_c* param_0) { - // NONMATCHING -} - -/* 80CCCA2C-80CCCA4C 00178C 0020+00 1/0 0/0 0/0 .text - * daObjSCannonTen_execute__FP17daObjSCannonTen_c */ -static void daObjSCannonTen_execute(daObjSCannonTen_c* param_0) { - // NONMATCHING -} - -/* 80CCCA4C-80CCCA6C 0017AC 0020+00 1/0 0/0 0/0 .text daObjSCannonTen_draw__FP17daObjSCannonTen_c - */ -static void daObjSCannonTen_draw(daObjSCannonTen_c* param_0) { - // NONMATCHING -} - -/* 80CCCA6C-80CCCA88 0017CC 001C+00 1/1 0/0 0/0 .text cLib_calcTimer__FPi */ -extern "C" void func_80CCCA6C(void* _this, int* param_0) { - // NONMATCHING -} - -/* 80CCCA88-80CCCC1C 0017E8 0194+00 0/0 1/0 0/0 .text __sinit_d_a_obj_scannon_ten_cpp */ -void __sinit_d_a_obj_scannon_ten_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80CCCA88, __sinit_d_a_obj_scannon_ten_cpp); -#pragma pop - -/* 80CCCC1C-80CCCC24 00197C 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80CCCC1C() { - // NONMATCHING -} - -/* 80CCCC24-80CCCC2C 001984 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80CCCC24() { - // NONMATCHING -} - -/* 80CCCC80-80CCCC80 000048 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index 50a25c8eef..912e481437 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -2408,7 +2408,7 @@ int daObj_Sekizoa_c::puzzle(void* param_0) { if (mStagger.checkStagger() == 0) { if (daNpcT_chkTmpBit(0x31)) { if (mType == TYPE_0) { - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } if (daPy_getPlayerActorClass()->checkPlayerFly() != 0) { if (mType == TYPE_0) { diff --git a/src/d/actor/d_a_obj_shield.cpp b/src/d/actor/d_a_obj_shield.cpp index cde4d58cfd..df9db5ba63 100644 --- a/src/d/actor/d_a_obj_shield.cpp +++ b/src/d/actor/d_a_obj_shield.cpp @@ -248,7 +248,7 @@ int daItemShield_c::actionWait() { /* 80CD7C68-80CD7D04 001288 009C+00 1/1 0/0 0/0 .text initActionOrderGetDemo__14daItemShield_cFv */ int daItemShield_c::initActionOrderGetDemo() { - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); daItemBase_c::hide(); @@ -346,7 +346,7 @@ int daItemShield_c::execute() { setBaseMtx(); if (fopAcM_searchPlayerDistance(this) < 500.0f) { daPy_getPlayerActorClass()->setLookPos(&attention_info.position); - attention_info.flags = 0x100; + attention_info.flags = fopAc_AttnFlag_CHECK_e; } else { attention_info.flags = 0; } diff --git a/src/d/actor/d_a_obj_smallkey.cpp b/src/d/actor/d_a_obj_smallkey.cpp index 728cbcee5c..9d7ea2d90f 100644 --- a/src/d/actor/d_a_obj_smallkey.cpp +++ b/src/d/actor/d_a_obj_smallkey.cpp @@ -223,7 +223,7 @@ void daKey_c::bg_check() { /* 80CDA7E8-80CDA81C 0010A8 0034+00 1/1 0/0 0/0 .text actionInitInit__7daKey_cFv */ int daKey_c::actionInitInit() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); setStatus(STATUS_INIT_e); @@ -252,7 +252,7 @@ int daKey_c::actionInit() { /* 80CDA8C8-80CDA8FC 001188 0034+00 1/1 0/0 0/0 .text actionParentWaitInit__7daKey_cFv */ int daKey_c::actionParentWaitInit() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); setStatus(STATUS_PARENT_WAIT_e); @@ -279,7 +279,7 @@ int daKey_c::actionParentWait() { int daKey_c::actionWaitInit() { mCcCyl.OnTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); attention_info.distances[fopAc_attn_CARRY_e] = 16; attention_info.position = current.pos; @@ -295,25 +295,25 @@ int daKey_c::actionWait() { bg_check(); if (mAcch.ChkGroundHit()) { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); speedF *= 0.9f; if (speedF < 1.0f) { speedF = 0.0f; } } else { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } daPy_py_c* player = daPy_getPlayerActorClass(); if (fopAcM_checkCarryNow(this)) { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (player->getGrabUpStart()) { fopAcM_cancelCarryNow(this); initActionOrderGetDemo(); } } else { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } if (field_0x936 == 0) { @@ -330,7 +330,7 @@ int daKey_c::actionWait() { /* 80CDAB74-80CDAC18 001434 00A4+00 2/2 0/0 0/0 .text initActionOrderGetDemo__7daKey_cFv */ int daKey_c::initActionOrderGetDemo() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); hide(); @@ -375,7 +375,7 @@ int daKey_c::actionGetDemo() { /* 80CDAD28-80CDADD4 0015E8 00AC+00 1/1 0/0 0/0 .text actionInitSwOnWait__7daKey_cFv */ int daKey_c::actionInitSwOnWait() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); hide(); @@ -407,7 +407,7 @@ int daKey_c::actionSwOnWait() { /* 80CDAE54-80CDAF40 001714 00EC+00 1/1 0/0 0/0 .text actionInitBoomerangCarry__7daKey_cFv */ int daKey_c::actionInitBoomerangCarry() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OnTgSPrmBit(1); mCcCyl.OnCoSPrmBit(1); @@ -501,7 +501,7 @@ void daKey_c::seStartTwinkle_private(u32 i_soundId) { /* 80CDB36C-80CDB3D8 001C2C 006C+00 1/1 0/0 0/0 .text actionInitE_GB__7daKey_cFv */ int daKey_c::actionInitE_GB() { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mCcCyl.OffTgSPrmBit(1); mCcCyl.OffCoSPrmBit(1); effectSet(); diff --git a/src/d/actor/d_a_obj_smw_stone.cpp b/src/d/actor/d_a_obj_smw_stone.cpp index 55dcc8edf7..5daad4524f 100644 --- a/src/d/actor/d_a_obj_smw_stone.cpp +++ b/src/d/actor/d_a_obj_smw_stone.cpp @@ -116,7 +116,7 @@ void daSmWStone_c::exeModeHowl() { } attention_info.flags = 0; if (chkWlfInRange()) { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; attention_info.distances[fopAc_attn_ETC_e] = 0x41; daAlink_c* link = daAlink_getAlinkActorClass(); if (link != NULL && link->checkWolfHowlSuccessAnime()) { diff --git a/src/d/actor/d_a_obj_ss_item.cpp b/src/d/actor/d_a_obj_ss_item.cpp index 0f3bac5112..9684ac1ec1 100644 --- a/src/d/actor/d_a_obj_ss_item.cpp +++ b/src/d/actor/d_a_obj_ss_item.cpp @@ -288,7 +288,7 @@ int daObj_SSItem_c::setProcess(ProcessFunc i_process) { /* 80CE7BB4-80CE7C24 001014 0070+00 1/1 0/0 0/0 .text setParam__14daObj_SSItem_cFv */ void daObj_SSItem_c::setParam() { scale.set(1.4f, 1.4f, 1.4f); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mAcchCir.SetWallR(24.0f); mAcchCir.SetWallH(12.0f); gravity = -5.0f; diff --git a/src/d/actor/d_a_obj_stone.cpp b/src/d/actor/d_a_obj_stone.cpp index 03147be91a..80bae133ca 100644 --- a/src/d/actor/d_a_obj_stone.cpp +++ b/src/d/actor/d_a_obj_stone.cpp @@ -216,7 +216,7 @@ int daObjStone_c::Create() { } fopAcM_setCullSizeSphere(this, 0.0f, 0.0f, 0.0f, l_r[mStoneType] * 1.2f); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); attention_info.distances[fopAc_attn_CARRY_e] = 0x2A; fopAcM_OnCarryType(this, fopAcM_CARRY_LIGHT); @@ -530,7 +530,7 @@ void daObjStone_c::mode_proc_call() { void daObjStone_c::init_modePutWait() { mCollider.OffAtSPrmBit(1); mCollider.OnCoSPrmBit(1); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mInitialOffsetY = l_initial_offsetY[mStoneType]; mMode = 0; field_0x0907 = 3; @@ -545,7 +545,7 @@ void daObjStone_c::modePutWait() { void daObjStone_c::init_modeWait() { mCollider.OffAtSPrmBit(1); mCollider.OnCoSPrmBit(1); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mMode = 0; field_0x0907 = 0; } @@ -567,7 +567,7 @@ void daObjStone_c::modeWait() { void daObjStone_c::init_modeDrop() { mCollider.OnAtSPrmBit(1); mCollider.OnCoSPrmBit(1); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mMode = 0; mLastPosY = current.pos.y; field_0x0907 = 1; @@ -581,8 +581,8 @@ void daObjStone_c::modeDrop() { if (mIsInWater != 0) { mCollider.OffAtSPrmBit(1); - mChkObj.ChkGroundHit() ? cLib_onBit(attention_info.flags, 0x10) : - cLib_offBit(attention_info.flags, 0x10); + mChkObj.ChkGroundHit() ? cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e) : + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); pos2.x = speedF * cM_ssin(current.angle.y); pos2.y = speed.y; @@ -693,7 +693,7 @@ void daObjStone_c::modeCarry() { void daObjStone_c::init_modeWalk() { mCollider.OffAtSPrmBit(1); mCollider.OnCoSPrmBit(1); - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mMode = 0; field_0x0907 = 4; } diff --git a/src/d/actor/d_a_obj_sword.cpp b/src/d/actor/d_a_obj_sword.cpp index be946dd91b..e53caa9e14 100644 --- a/src/d/actor/d_a_obj_sword.cpp +++ b/src/d/actor/d_a_obj_sword.cpp @@ -62,13 +62,13 @@ cPhs__Step daObjSword_c::create() { int daObjSword_c::actionWait() { daPy_py_c* player = daPy_getPlayerActorClass(); if (fopAcM_checkCarryNow(this)) { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (player->getGrabUpStart()) { fopAcM_cancelCarryNow(this); initActionOrderGetDemo(); } } else { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } return 1; } diff --git a/src/d/actor/d_a_obj_swpush.cpp b/src/d/actor/d_a_obj_swpush.cpp index 23cf3cf4e3..47323a13cc 100644 --- a/src/d/actor/d_a_obj_swpush.cpp +++ b/src/d/actor/d_a_obj_swpush.cpp @@ -350,7 +350,7 @@ void daObjSwpush::Act_c::set_btp_frame() { /* 80483574-80483910 000914 039C+00 1/1 0/0 0/0 .text rideCB__Q211daObjSwpush5Act_cFP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ void daObjSwpush::Act_c::rideCB(dBgW* i_bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) { Act_c* i_this = (Act_c*)i_ac; - if (fopAcM_checkStatus(i_pt, fopAcStts_FREEZE_e)) { + if (fopAcM_CheckStatus(i_pt, fopAcStts_FREEZE_e)) { static cXyz no_push_vec[4] = { cXyz(-1.0f, 0.0f, -1.0f), cXyz(-1.0f, 0.0f, 1.0f), diff --git a/src/d/actor/d_a_obj_table.cpp b/src/d/actor/d_a_obj_table.cpp index 5d1cb50580..1e5da74807 100644 --- a/src/d/actor/d_a_obj_table.cpp +++ b/src/d/actor/d_a_obj_table.cpp @@ -130,7 +130,7 @@ int daObjTable_c::Create() { mpModel->getModelData()->getMaterialNodePointer(4)->getShape()->hide(); attention_info.flags = 0; } else { - attention_info.flags = 0x2000000a; + attention_info.flags = (fopAc_AttnFlag_TALKCHECK_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); attention_info.distances[fopAc_attn_LOCK_e] = dKy_darkworld_check() ? 218 : 98; attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[fopAc_attn_LOCK_e]; diff --git a/src/d/actor/d_a_obj_volcbom.cpp b/src/d/actor/d_a_obj_volcbom.cpp index c75e5f2cd6..78a0c96d9f 100644 --- a/src/d/actor/d_a_obj_volcbom.cpp +++ b/src/d/actor/d_a_obj_volcbom.cpp @@ -701,7 +701,7 @@ void daObjVolcBom_c::actionOrderATalkEvent() { midna->onTagWaitPosPortalObj(mMidnaWaitPos); dComIfGp_TargetWarpPt_set(9); eventInfo.onCondition(dEvtCnd_CANTALK_e); - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } else { midna->offTagWaitPos(); setAction(ACTION_WAIT); diff --git a/src/d/actor/d_a_obj_warp_kbrg.cpp b/src/d/actor/d_a_obj_warp_kbrg.cpp index a5ecebad57..106084e8eb 100644 --- a/src/d/actor/d_a_obj_warp_kbrg.cpp +++ b/src/d/actor/d_a_obj_warp_kbrg.cpp @@ -412,7 +412,7 @@ void daObjWarpKBrg_c::actionOrderATalkEvent() { midna_p->onTagWaitPosPortalObj(&mMidnaWaitPos); dComIfGp_TargetWarpPt_set(3); eventInfo.onCondition(dEvtCnd_CANTALK_e); - attention_info.flags = 0xA; + attention_info.flags = (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } else { midna_p->offTagWaitPos(); setAction(ACTION_WAIT_e); diff --git a/src/d/actor/d_a_obj_warp_obrg.cpp b/src/d/actor/d_a_obj_warp_obrg.cpp index dc983ff125..33c3952dde 100644 --- a/src/d/actor/d_a_obj_warp_obrg.cpp +++ b/src/d/actor/d_a_obj_warp_obrg.cpp @@ -291,7 +291,7 @@ void daObjWarpOBrg_c::actionOrderEvent() { } else { eventInfo.onCondition(1); if (checkTalkDistance()) { - attention_info.flags = 10; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } else { midna_p->offTagWaitPos(); setAction(ACTION_WAIT_e); diff --git a/src/d/actor/d_a_obj_wchain.cpp b/src/d/actor/d_a_obj_wchain.cpp index cd63b52bde..b143d4e404 100644 --- a/src/d/actor/d_a_obj_wchain.cpp +++ b/src/d/actor/d_a_obj_wchain.cpp @@ -266,9 +266,9 @@ int daObjWchain_c::execute() { setChainPos(); if (daPy_py_c::checkNowWolf() && !mRide && mPullLength < 0.1f) { - attention_info.flags |= 1; + attention_info.flags |= fopAc_AttnFlag_LOCK_e; } else { - attention_info.flags &= ~1; + attention_info.flags &= ~fopAc_AttnFlag_LOCK_e; } attention_info.position = current.pos; attention_info.position.y += 150.0f; diff --git a/src/d/actor/d_a_obj_wdStick.cpp b/src/d/actor/d_a_obj_wdStick.cpp index 7a220f7b9d..76b2998eb2 100644 --- a/src/d/actor/d_a_obj_wdStick.cpp +++ b/src/d/actor/d_a_obj_wdStick.cpp @@ -80,7 +80,7 @@ int daWdStick_c::create() { mSph2.Set(mCcDSph); mSph2.SetStts(&mStts); fopAcM_OnCarryType(this, fopAcM_CARRY_UNK_30); - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); attention_info.distances[4] = 59; misCarrying = fopAcM_checkCarryNow(this); mode_init_wait(); @@ -214,7 +214,7 @@ int daWdStick_c::Execute() { OS_REPORT("=== 木の棒再セット (%f) ===\n", current.pos.y - home.pos.y); field_0xaac = 0; field_0xaad = 0; - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); current.pos = home.pos; mode_init_wait(); } @@ -321,7 +321,7 @@ void daWdStick_c::mode_proc_call() { /* 80D3350C-80D3353C 001AAC 0030+00 4/4 0/0 0/0 .text mode_init_wait__11daWdStick_cFv */ void daWdStick_c::mode_init_wait() { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); speedF = 0.0f; gravity = -10.0f; mMode = MODE_WAIT; @@ -336,7 +336,7 @@ void daWdStick_c::mode_proc_wait() { /* 80D33588-80D335AC 001B28 0024+00 1/1 0/0 0/0 .text mode_init_carry__11daWdStick_cFv */ void daWdStick_c::mode_init_carry() { - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); speedF = 0.0f; mMode = MODE_CARRY; } @@ -393,7 +393,7 @@ void daWdStick_c::mode_proc_carry() { /* 80D3386C-80D33890 001E0C 0024+00 1/1 0/0 0/0 .text mode_init_drop__11daWdStick_cFv */ void daWdStick_c::mode_init_drop() { - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); gravity = -5.0f; mMode = MODE_DROP; } @@ -407,7 +407,7 @@ void daWdStick_c::mode_proc_drop() { /* 80D338DC-80D338F4 001E7C 0018+00 2/2 0/0 0/0 .text mode_init_roll__11daWdStick_cFv */ void daWdStick_c::mode_init_roll() { - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mMode = MODE_ROLL; } @@ -455,7 +455,7 @@ void daWdStick_c::mode_proc_roll() { mode_init_wait(); } } else { - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } mAcch.CrrPos(dComIfG_Bgsp()); bgCheck(); @@ -472,7 +472,7 @@ BOOL daWdStick_c::chkWaterLineIn() { void daWdStick_c::mode_init_sink() { field_0xab0 = 0; field_0xaae = 0; - cLib_offBit(attention_info.flags, 0x10UL); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); mMode = MODE_SINK; } @@ -491,12 +491,12 @@ void daWdStick_c::mode_proc_sink() { fopAcM_posMoveF(this, mStts.GetCCMoveP()); f32 waterHeight = mAcch.m_wtr.GetHeight(); if (current.pos.y < waterHeight + 100.0f) { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); current.pos = home.pos; mode_init_wait(); } if (mAcch.ChkGroundHit()) { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } } diff --git a/src/d/actor/d_a_obj_wind_stone.cpp b/src/d/actor/d_a_obj_wind_stone.cpp index 76bd63b8e0..cae8712edb 100644 --- a/src/d/actor/d_a_obj_wind_stone.cpp +++ b/src/d/actor/d_a_obj_wind_stone.cpp @@ -183,7 +183,7 @@ void daWindStone_c::exeModeHowl() { daAlink_getAlinkActorClass()->startWindStoneSound(tuneId, ¤t.pos); attention_info.flags = 0; if (chkWlfInRange()) { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; attention_info.distances[fopAc_attn_ETC_e] = 65; } } diff --git a/src/d/actor/d_a_obj_yel_bag.cpp b/src/d/actor/d_a_obj_yel_bag.cpp index 0ef3449635..d290006785 100644 --- a/src/d/actor/d_a_obj_yel_bag.cpp +++ b/src/d/actor/d_a_obj_yel_bag.cpp @@ -263,7 +263,7 @@ int daObj_YBag_c::Execute() { } } if (field_0xa33 == 0) { - cLib_onBit(attention_info.flags, 0x10UL); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAcM_OnCarryType(this, fopAcM_CARRY_ITEM); } diff --git a/src/d/actor/d_a_obj_yobikusa.cpp b/src/d/actor/d_a_obj_yobikusa.cpp index ba0e313e11..6252c504d5 100644 --- a/src/d/actor/d_a_obj_yobikusa.cpp +++ b/src/d/actor/d_a_obj_yobikusa.cpp @@ -159,7 +159,7 @@ void daObjYobikusa_c::create_init() { fopAcM_OnCarryType(this, fopAcM_CARRY_LIGHT); - attention_info.flags |= 0x10; + attention_info.flags |= fopAc_AttnFlag_CARRY_e; attention_info.distances[fopAc_attn_CARRY_e] = 42; initCcCylinder(); @@ -271,7 +271,7 @@ bool daObjYobikusa_c::toPickLeaf() { mPlayerDeltaAngle = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); mPlayerDeltaAngle -= 0x2000; - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); return true; } return false; @@ -287,7 +287,7 @@ bool daObjYobikusa_c::setNewLeaf() { mNewLeafTick += attr()->mNewLeafTickSpeed; if (mJointScale == 1.0f && mNewLeafAmplitude == 0.0f) { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); return true; } return false; @@ -381,7 +381,7 @@ int daObjYobikusa_c::execute() { mpActiveModel = mpModelTypeB; fopAcM_OffStatus(this, 0x80); - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); if (getType() == CALL_TYPE_FLY) { dComIfGp_particle_set(0x8347, ¤t.pos, NULL, NULL); diff --git a/src/d/actor/d_a_peru.cpp b/src/d/actor/d_a_peru.cpp index c9ba5e2f43..d2ae78a962 100644 --- a/src/d/actor/d_a_peru.cpp +++ b/src/d/actor/d_a_peru.cpp @@ -339,7 +339,7 @@ void daPeru_c::reset() { attention_info.distances[fopAc_attn_LOCK_e] = daNpcT_getDistTableIdx(daPeru_Param_c::m.field_0x48[2], daPeru_Param_c::m.field_0x48[3]); attention_info.distances[fopAc_attn_TALK_e] = attention_info.distances[0]; attention_info.distances[fopAc_attn_SPEAK_e] = daNpcT_getDistTableIdx(daPeru_Param_c::m.field_0x48[0], daPeru_Param_c::m.field_0x48[1]); - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; scale.setall(daPeru_Param_c::m.field_0x00[2]); mCcStts.SetWeight(daPeru_Param_c::m.field_0x00[4]); mCylH = daPeru_Param_c::m.field_0x00[5]; @@ -365,9 +365,9 @@ void daPeru_c::reset() { /* 80D47B20-80D47C4C 000D20 012C+00 1/0 0/0 0/0 .text setParam__8daPeru_cFv */ void daPeru_c::setParam() { srchActors(); - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; if (!daPy_py_c::checkNowWolf()) { - attention_info.flags = 0x2000000a; + attention_info.flags = (fopAc_AttnFlag_TALKCHECK_e | fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } if (mType == 0 && !daNpcT_chkEvtBit(0x127)) { attention_info.flags = 0; diff --git a/src/d/actor/d_a_tag_Lv6Gate.cpp b/src/d/actor/d_a_tag_Lv6Gate.cpp index c03c3ac002..a04ed81cb8 100644 --- a/src/d/actor/d_a_tag_Lv6Gate.cpp +++ b/src/d/actor/d_a_tag_Lv6Gate.cpp @@ -282,7 +282,7 @@ inline int daTagLv6Gate_c::execute() { void daTagLv6Gate_c::create_init() { fopAcM_setCullSizeBox(this, -50.0f, 0.0f, -50.0f, 50.0f, 100.0f, 50.0f); attention_info.position = current.pos; - attention_info.flags = (fopAcM_isSwitch(this, getSwitchNo1()) != 0) ? 0 : 0x80; + attention_info.flags = (fopAcM_isSwitch(this, getSwitchNo1()) != 0) ? 0 : fopAc_AttnFlag_ETC_e; attention_info.distances[fopAc_attn_ETC_e] = 89; mEvtId = -1; mIsMasterSwordStabbed = 0; diff --git a/src/d/actor/d_a_tag_Lv8Gate.cpp b/src/d/actor/d_a_tag_Lv8Gate.cpp index caf2f53006..9570535d20 100644 --- a/src/d/actor/d_a_tag_Lv8Gate.cpp +++ b/src/d/actor/d_a_tag_Lv8Gate.cpp @@ -41,7 +41,7 @@ inline void daTagLv8Gate_c::create_init() { fopAcM_setCullSizeBox(this, -100.0f, -50.0f, -100.0f, 100.0f, 220.0f, 100.0f); fopAcM_OnCarryType(this, fopAcM_CARRY_LIGHT); - attention_info.flags = 0x10; + attention_info.flags = fopAc_AttnFlag_CARRY_e; attention_info.distances[fopAc_attn_CARRY_e] = 90; mEventID = -1; @@ -189,7 +189,7 @@ int daTagLv8Gate_c::execute() { if (fopAcM_checkCarryNow(this)) { fopAcM_cancelCarryNow(this); - attention_info.flags &= ~0x10; + attention_info.flags &= ~fopAc_AttnFlag_CARRY_e; eventInfo.setArchiveName(l_arcName); dComIfGp_getEventManager().setObjectArchive(eventInfo.getArchiveName()); mEventID = dComIfGp_getEventManager().getEventIdx(this, "LV8_GATE_ENTRY", -1); diff --git a/src/d/actor/d_a_tag_attention.cpp b/src/d/actor/d_a_tag_attention.cpp index 892a134dd3..6e8c964de7 100644 --- a/src/d/actor/d_a_tag_attention.cpp +++ b/src/d/actor/d_a_tag_attention.cpp @@ -114,9 +114,9 @@ int daAttp_c::execute() { } if (bVar1) { - attention_info.flags = attention_info.flags | 1; + attention_info.flags |= fopAc_AttnFlag_LOCK_e; } else { - attention_info.flags = attention_info.flags & 0xfffffffe; + attention_info.flags &= ~fopAc_AttnFlag_LOCK_e; } return 1; diff --git a/src/d/actor/d_a_tag_bottle_item.cpp b/src/d/actor/d_a_tag_bottle_item.cpp index ea92d39bfc..5600a025b8 100644 --- a/src/d/actor/d_a_tag_bottle_item.cpp +++ b/src/d/actor/d_a_tag_bottle_item.cpp @@ -133,12 +133,12 @@ s32 daTag_BottleItem_c::orderEvent() { makeSoup(); if (!daPy_py_c::checkNowWolf() && mBottleItemType != fpcNm_ITEM_EMPTY_BOTTLE) { - attention_info.flags = 0x20000008; + attention_info.flags = (fopAc_AttnFlag_TALKCHECK_e | fopAc_AttnFlag_SPEAK_e); } else { attention_info.flags = 0; } - if (attention_info.flags == 0x20000008) { + if (attention_info.flags == (fopAc_AttnFlag_TALKCHECK_e | fopAc_AttnFlag_SPEAK_e)) { attention_info.distances[fopAc_attn_TALK_e] = fpcNm_ITEM_EMPTY_BOTTLE; attention_info.distances[fopAc_attn_SPEAK_e] = fpcNm_ITEM_EMPTY_BOTTLE; eventInfo.onCondition(dEvtCnd_CANTALK_e); diff --git a/src/d/actor/d_a_tag_chkpoint.cpp b/src/d/actor/d_a_tag_chkpoint.cpp index 0aa53e90f4..c4eced456e 100644 --- a/src/d/actor/d_a_tag_chkpoint.cpp +++ b/src/d/actor/d_a_tag_chkpoint.cpp @@ -69,7 +69,7 @@ int daTag_Chk_c::execute() { if (set_attention) { daPy_getPlayerActorClass()->setLookPos(&attention_info.position); - attention_info.flags = 0x100; + attention_info.flags = fopAc_AttnFlag_CHECK_e; } return 1; diff --git a/src/d/actor/d_a_tag_howl.cpp b/src/d/actor/d_a_tag_howl.cpp index 0abd847252..b7dd65d708 100644 --- a/src/d/actor/d_a_tag_howl.cpp +++ b/src/d/actor/d_a_tag_howl.cpp @@ -28,7 +28,7 @@ int daTag_Howl_c::execute() { attention_info.flags = 0; if (isAreaCheck()) { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; attention_info.distances[fopAc_attn_ETC_e] = 0x41; } diff --git a/src/d/actor/d_a_tag_kmsg.cpp b/src/d/actor/d_a_tag_kmsg.cpp index ababb97e1c..d28d6297a8 100644 --- a/src/d/actor/d_a_tag_kmsg.cpp +++ b/src/d/actor/d_a_tag_kmsg.cpp @@ -74,7 +74,7 @@ int daTag_KMsg_c::Execute() { } if (getType() == KMSG_TYPE_3) { if (field_0x5c3 == 0) { - attention_info.flags = 0x80; + attention_info.flags = fopAc_AttnFlag_ETC_e; attention_info.distances[fopAc_attn_ETC_e] = 0x4a; } else { attention_info.flags = 0; @@ -87,9 +87,9 @@ int daTag_KMsg_c::Execute() { #endif attention_info.distances[fopAc_attn_SPEAK_e] = attention_info.distances[fopAc_attn_TALK_e]; if (getAttnPosOffset() != 1000000000.0f) { - attention_info.flags = 0xa; + attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } else { - attention_info.flags = 0x8; + attention_info.flags = fopAc_AttnFlag_SPEAK_e; } } if ((getType() == KMSG_TYPE_1 || getType() == KMSG_TYPE_4 || getType() == KMSG_TYPE_5) && @@ -142,7 +142,7 @@ int daTag_KMsg_c::Execute() { } } else if (getType() == KMSG_TYPE_3) { if (field_0x5c2 != 0x0) { - attention_info.flags &= ~0x10; + attention_info.flags &= ~fopAc_AttnFlag_CARRY_e; fopAcM_cancelCarryNow(this); if (strlen(l_evtList[1].mEventName) != 0) { if (strlen(l_resNameList[l_evtList[1].field_0x4]) != 0) { diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp index 616ba49544..4ec5eabdf1 100644 --- a/src/d/actor/d_a_tag_msg.cpp +++ b/src/d/actor/d_a_tag_msg.cpp @@ -36,7 +36,7 @@ int daTag_Msg_c::create() { int phase_state = dComIfG_resLoad(&mPhase, getResName()); if (phase_state == cPhs_COMPLEATE_e) { - attention_info.flags = 0x20000008; + attention_info.flags = (fopAc_AttnFlag_TALKCHECK_e | fopAc_AttnFlag_SPEAK_e); getParam(); eventInfo.setArchiveName(getResName()); diff --git a/src/d/actor/d_a_tag_mwait.cpp b/src/d/actor/d_a_tag_mwait.cpp index 4151d7ed2a..ec424a10d9 100644 --- a/src/d/actor/d_a_tag_mwait.cpp +++ b/src/d/actor/d_a_tag_mwait.cpp @@ -138,7 +138,7 @@ int daTagMwait_c::execute() { player_p->current.pos.y >= current.pos.y && player_p->current.pos.y <= current.pos.y + scale.y) { - attention_info.flags = 2; + attention_info.flags = fopAc_AttnFlag_TALK_e; eventInfo.onCondition(dEvtCnd_CANTALK_e); } } diff --git a/src/d/actor/d_a_tag_ss_drink.cpp b/src/d/actor/d_a_tag_ss_drink.cpp index 07b986e1ff..7d5abf8ff2 100644 --- a/src/d/actor/d_a_tag_ss_drink.cpp +++ b/src/d/actor/d_a_tag_ss_drink.cpp @@ -188,12 +188,12 @@ int daTag_SSDrink_c::orderEvent() { if (!dComIfGp_getLinkPlayer()->checkWolf() && fopAcM_isSwitch(this, getSwitchFromParam()) && field_0x5D3 != 0x60 && getFlowNodeNum() != 0xFFFF) { - attention_info.flags = 0x40000008; + attention_info.flags = (fopAc_AttnFlag_TALKREAD_e | fopAc_AttnFlag_SPEAK_e); } else { attention_info.flags = 0; } - if (attention_info.flags == 0x40000008) { + if (attention_info.flags == (fopAc_AttnFlag_TALKREAD_e | fopAc_AttnFlag_SPEAK_e)) { if (fopAcM_searchPlayerDistanceXZ(this) <= 160.0f && fopAcM_seenPlayerAngleY() <= 0x2000) { attention_info.distances[fopAc_attn_TALK_e] = 0x9D; attention_info.distances[fopAc_attn_SPEAK_e] = 0x9D; diff --git a/src/d/actor/d_a_tag_wara_howl.cpp b/src/d/actor/d_a_tag_wara_howl.cpp index 89a6d945e1..38c7f7feed 100644 --- a/src/d/actor/d_a_tag_wara_howl.cpp +++ b/src/d/actor/d_a_tag_wara_howl.cpp @@ -38,7 +38,7 @@ int daTagWrHowl_c::execute() { attention_info.flags = 0; if (chkWlfInTag()) { - attention_info.flags |= 0x80; + attention_info.flags |= fopAc_AttnFlag_ETC_e; attention_info.distances[fopAc_attn_ETC_e] = 65; } diff --git a/src/d/actor/d_a_tag_wljump.cpp b/src/d/actor/d_a_tag_wljump.cpp index ffdb242925..b91e7d6214 100644 --- a/src/d/actor/d_a_tag_wljump.cpp +++ b/src/d/actor/d_a_tag_wljump.cpp @@ -208,11 +208,7 @@ int daTagWljump_c::execute() { field_0x570 = field_0x568; field_0x568 = -1; } else { -#if DEBUG - attention_info.flags |= 0x801; -#else - attention_info.flags |= 0x81; -#endif + attention_info.flags |= fopAc_AttnFlag_ETC_e | fopAc_AttnFlag_LOCK_e; } } else { field_0x572 = 0; diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index 84d751df21..18a1485529 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -1858,8 +1858,8 @@ cPhs__Step daTbox_c::create1st() { } CreateInit(); - attention_info.flags = 0x40; - attention_info.flags |= 0x400000; + attention_info.flags = fopAc_AttnFlag_JUEL_e; + attention_info.flags |= fopAc_AttnFlag_UNK_0x400000; return step; } diff --git a/src/d/actor/d_a_tbox2.cpp b/src/d/actor/d_a_tbox2.cpp index c5019654e4..6668011a77 100644 --- a/src/d/actor/d_a_tbox2.cpp +++ b/src/d/actor/d_a_tbox2.cpp @@ -77,8 +77,8 @@ int daTbox2_c::Create() { fopAcM_SetMtx(this, mpModel->getBaseTRMtx()); fopAcM_setCullSizeBox2(this, mpModel->getModelData()); - attention_info.flags = 0x40; - attention_info.flags |= 0x400000; + attention_info.flags = fopAc_AttnFlag_JUEL_e; + attention_info.flags |= fopAc_AttnFlag_UNK_0x400000; mAcchCir.SetWall(50.0f, 0.0f); mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, diff --git a/src/d/d_att_dist.cpp b/src/d/d_att_dist.cpp index f8975ae237..218a68a4a4 100644 --- a/src/d/d_att_dist.cpp +++ b/src/d/d_att_dist.cpp @@ -3,7 +3,6 @@ #include "d/d_att_dist.h" #include "d/d_attention.h" -/* ############################################################################################## */ /* 803A9C70-803AB608 006D90 1998+00 0/0 5/5 13/13 .data dist_table__12dAttention_c */ dist_entry dAttention_c::dist_table[234] = { {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.01f, 0}, diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index 1e992bf016..8d8a652ebd 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -1,25 +1,26 @@ -// -// Generated By: dol2asm -// Translation Unit: d/d_attention -// - #include "d/dolzel.h" #include "d/d_attention.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "d/actor/d_a_player.h" #include "d/d_com_inf_game.h" +#include "d/d_s_play.h" +#include "d/d_debug_viewer.h" +#include "d/d_stage.h" #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_controller_pad.h" +#include "SSystem/SComponent/c_counter.h" #define DRAW_TYPE_YELLOW 0 #define DRAW_TYPE_RED 1 -class dAttDrawParam_c { +class dAttDrawParam_c : public JORReflexible { public: /* 80070158 */ dAttDrawParam_c(); /* 80073FC4 */ virtual ~dAttDrawParam_c() {} + void genMessage(JORMContext*); + /* 0x4 */ s8 field_0x4; /* 0x8 */ f32 mCursorDistance; /* 0xC */ f32 field_0xc; @@ -28,6 +29,10 @@ public: /* 80070018-80070038 06A958 0020+00 2/2 0/0 0/0 .text padLockButton__25@unnamed@d_attention_cpp@Fl */ namespace { +static bool padLockTrigger(s32 i_padNo) { + return mDoCPd_c::getTrigL(i_padNo) != 0; +} + static bool padLockButton(s32 i_padNo) { return mDoCPd_c::getHoldLockL(i_padNo) != 0; } @@ -35,18 +40,18 @@ static bool padLockButton(s32 i_padNo) { /* 803A9BF8-803A9C04 006D18 000C+00 2/2 0/0 0/0 .data loc_type_tbl__12dAttention_c */ type_tbl_entry dAttention_c::loc_type_tbl[3] = { - {fopAc_attn_LOCK_e, 0x1}, - {fopAc_attn_TALK_e, 0x2}, - {fopAc_attn_BATTLE_e, 0x4}, + {fopAc_attn_LOCK_e, fopAc_AttnFlag_LOCK_e}, + {fopAc_attn_TALK_e, fopAc_AttnFlag_TALK_e}, + {fopAc_attn_BATTLE_e, fopAc_AttnFlag_BATTLE_e}, }; /* 803A9C04-803A9C18 006D24 0014+00 1/1 0/0 0/0 .data act_type_tbl__12dAttention_c */ type_tbl_entry dAttention_c::act_type_tbl[5] = { - {fopAc_attn_SPEAK_e, 0x8}, - {fopAc_attn_CARRY_e, 0x10}, - {fopAc_attn_DOOR_e, 0x20}, - {fopAc_attn_JUEL_e, 0x40}, - {fopAc_attn_ETC_e, 0x80}, + {fopAc_attn_SPEAK_e, fopAc_AttnFlag_SPEAK_e}, + {fopAc_attn_CARRY_e, fopAc_AttnFlag_CARRY_e}, + {fopAc_attn_DOOR_e, fopAc_AttnFlag_DOOR_e}, + {fopAc_attn_JUEL_e, fopAc_AttnFlag_JUEL_e}, + {fopAc_attn_ETC_e, fopAc_AttnFlag_ETC_e}, }; /* 80450F58-80450F60 000458 0008+00 0/0 2/2 0/0 .sbss None */ @@ -78,11 +83,61 @@ dAttParam_c::dAttParam_c(s32) { field_0x38 = 1.7f; field_0x3c = 1.0f; - l_isFinalBossStg = strcmp(dComIfGp_getStartStageName(), "D_MN09B") == 0; + if (strcmp(dComIfGp_getStartStageName(), "D_MN09B") == 0) { + l_isFinalBossStg = 1; + } else { + l_isFinalBossStg = 0; + } + +#if DEBUG + // "Attention System" + connectHIO("注目システム"); +#endif } /* 80070110-80070158 06AA50 0048+00 2/1 0/0 0/0 .text __dt__11dAttParam_cFv */ -dAttParam_c::~dAttParam_c() {} +dAttParam_c::~dAttParam_c() { +#if DEBUG + releaseHIO(); +#endif +} + +#if DEBUG +void dAttParam_c::genMessage(JORMContext* mctx) { + mctx->genCheckBox(" リスト表示", &mFlags, 0x4000, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genCheckBox(" 有効", &mFlags, 4, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genCheckBox(" ホールドモード", &mFlags, 1, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genCheckBox(" 矢印表示OFF", &mFlags, 0x10, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("カーソル", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("選択時", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("スケールX", &mSelCursorScaleX, 1.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("スケールY", &mSelCursorScaleY, 1.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("Y Pos Offset", &mSelCursorOffsetY, -100.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("注目時", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("スケールX", &mAttnCursorScaleX, 1.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("スケールY", &mAttnCursorScaleY, 1.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("Y Pos Offset", &mAttnCursorOffsetY, -100.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("出現フレーム", &mAttnCursorAppearFrames, 0, 0xff, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("消去フレーム", &mAttnCursorDisappearFrames, 0, 0xff, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("アニメーションスピード", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("選択時", &field_0x38, 1.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("注目時", &field_0x3c, 1.0f, 100.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider(" SW Mode 解除", &mSWModeDisable, -1.0f, 0.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genCheckBox(" 表示デバック", &mFlags, 2, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider(" 警告BGM距離", &mDangerBGMDistance, 0.0f, 8000.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider(" + マージン", &mBGMDistMargin, 0.0f, 8000.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genCheckBox(" デバッグ表示", &mFlags, 0x8000, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider(" 表示位置 X", &mDebugDispPosX, 0, 0x280, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider(" Y", &mDebugDispPosY, 0, 0x1e0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genCheckBox(" KEEP挙動", &mFlags, 8, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); +} +#endif /* 80070158-80070178 06AA98 0020+00 1/1 0/0 0/0 .text __ct__15dAttDrawParam_cFv */ dAttDrawParam_c::dAttDrawParam_c() { @@ -90,11 +145,18 @@ dAttDrawParam_c::dAttDrawParam_c() { field_0xc = 2.0f; } +#if DEBUG +void dAttDrawParam_c::genMessage(JORMContext* mctx) { + mctx->genLabel("カーソル", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); + mctx->genSlider("距離", &mCursorDistance, 0.0f, 500000.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); +} +#endif + /* 80070178-80070198 06AAB8 0020+00 1/0 0/0 0/0 .text * execute__19dAttDraw_CallBack_cFUsP16J3DTransformInfo */ int dAttDraw_CallBack_c::execute(u16 param_0, J3DTransformInfo* transform) { if (param_0 == 0) { - transform->mTranslate.y *= 0.6f; + transform->mTranslate.y *= YREG_F(17) + 0.6f; } return 1; @@ -112,14 +174,11 @@ dAttention_c::dAttention_c(fopAc_ac_c* i_player, u32 i_padNo) { field_0x32e = 0; field_0x32f = 0; - mCheckObjectOffset = 0; - mActionOffset = 0; - mLockOnOffset = 0; + mLockOnOffset = mActionOffset = mCheckObjectOffset = 0; initList(0xFFFFFFFF); mPlayerAttentionFlags = 0; - field_0x32a = 0; - mAttnStatus = EState_NONE; + mAttnStatus = field_0x32a = EState_NONE; field_0x32b = 4; field_0x32c = 0; mAttnBlockTimer = 0; @@ -135,10 +194,10 @@ dAttention_c::dAttention_c(fopAc_ac_c* i_player, u32 i_padNo) { for (int i = 0; i < 2; i++) { draw[i].mModel[DRAW_TYPE_YELLOW] = mDoExt_J3DModel__create(modelDataY, 0x80000, 0x11000285); - JUT_ASSERT(0x1CA, draw[i].mModel[DRAW_TYPE_YELLOW] != 0); + JUT_ASSERT(0x1CA, draw[i].mModel[0] != 0); draw[i].mModel[DRAW_TYPE_RED] = mDoExt_J3DModel__create(modelDataR, 0x80000, 0x11000285); - JUT_ASSERT(0x1D4, draw[i].mModel[DRAW_TYPE_RED] != 0); + JUT_ASSERT(0x1D4, draw[i].mModel[1] != 0); int res; res = draw[i].mNoticeCursorBck[DRAW_TYPE_YELLOW].init((J3DAnmTransform*)dComIfG_getObjectRes("Always", 0x11), TRUE, 2, 1.0f, 0, -1, false); @@ -206,7 +265,7 @@ dAttention_c::dAttention_c(fopAc_ac_c* i_player, u32 i_padNo) { mLookTarget.init(); new (&mAttParam) dAttParam_c(0); - g_AttDwHIO.field_0x4 = -1; + g_AttDwHIO.field_0x4 = mDoHIO_CREATE_CHILD("注目カーソル", &g_AttDwHIO); } /* 80070774-80070844 06B0B4 00D0+00 0/0 2/2 0/0 .text __dt__12dAttention_cFv */ @@ -215,6 +274,8 @@ dAttention_c::~dAttention_c() { mDoExt_destroySolidHeap(heap); heap = NULL; } + + mDoHIO_DELETE_CHILD(g_AttDwHIO.field_0x4); } /* 80070844-80070880 06B184 003C+00 2/2 2/2 8/8 .text GetLockonList__12dAttention_cFl */ @@ -230,12 +291,13 @@ dAttList_c* dAttention_c::GetLockonList(s32 i_no) { dAttList_c* dAttention_c::getActionBtnB() { int i; dAttList_c* list = GetLockonList(0); + fopAc_ac_c* actor; - if (list != NULL && list->getActor() != NULL && - list->mType == fopAc_attn_TALK_e && LockonTruth() && - !(list->getActor()->attention_info.flags & 0x2000000)) - { - return list; + if (list != NULL && list->getActor() != NULL && list->mType == fopAc_attn_TALK_e && LockonTruth()) { + actor = list->getActor(); + if (!(actor->attention_info.flags & fopAc_AttnFlag_NOTALK_e)) { + return list; + } } if (mActionCount == 0) { @@ -244,7 +306,8 @@ dAttList_c* dAttention_c::getActionBtnB() { for (i = 0; i < mActionCount; i++) { if (mActionList[i].mType == fopAc_attn_SPEAK_e) { - if (!(mActionList[i].getActor()->attention_info.flags & 0x2000000)) { + actor = mActionList[i].getActor(); + if (!(actor->attention_info.flags & fopAc_AttnFlag_NOTALK_e)) { return &mActionList[i]; } continue; @@ -259,9 +322,11 @@ dAttList_c* dAttention_c::getActionBtnB() { dAttList_c* dAttention_c::getActionBtnXY() { int i; dAttList_c* list = GetLockonList(0); + fopAc_ac_c* actor; if (list != NULL && list->getActor() != NULL && list->mType == fopAc_attn_TALK_e && LockonTruth()) { - if (list->getActor()->eventInfo.chkCondition(dEvtCnd_CANTALKITEM_e)) { + actor = list->getActor(); + if (actor->eventInfo.chkCondition(dEvtCnd_CANTALKITEM_e)) { return list; } @@ -274,7 +339,8 @@ dAttList_c* dAttention_c::getActionBtnXY() { for (i = 0; i < mActionCount; i++) { if (mActionList[i].mType == fopAc_attn_SPEAK_e) { - if (mActionList[i].getActor()->eventInfo.chkCondition(dEvtCnd_CANTALKITEM_e)) { + actor = mActionList[i].getActor(); + if (actor->eventInfo.chkCondition(dEvtCnd_CANTALKITEM_e)) { return &mActionList[i]; } } @@ -288,7 +354,8 @@ int dAttention_c::loc_type_num = 3; /* 80070A70-80070AC0 06B3B0 0050+00 1/1 0/0 0/0 .text chkAttMask__12dAttention_cFUlUl */ int dAttention_c::chkAttMask(u32 i_type, u32 i_mask) { - for (int i = 0; i < loc_type_num; i++) { + int i; + for (i = 0; i < loc_type_num; i++) { if (i_type == loc_type_tbl[i].type) { return i_mask & loc_type_tbl[i].mask; } @@ -300,15 +367,12 @@ int dAttention_c::chkAttMask(u32 i_type, u32 i_mask) { /* 80070AC0-80070B2C 06B400 006C+00 2/2 0/0 0/0 .text check_event_condition__FUlUs */ static int check_event_condition(u32 i_attnType, u16 i_condition) { switch (i_attnType) { - case fopAc_attn_SPEAK_e: case fopAc_attn_TALK_e: + case fopAc_attn_SPEAK_e: if (!(i_condition & dEvtCnd_CANTALK_e)) { return true; } break; - case fopAc_attn_CARRY_e: - case fopAc_attn_BATTLE_e: - break; case fopAc_attn_DOOR_e: if (!(i_condition & dEvtCnd_CANDOOR_e)) { return true; @@ -329,7 +393,7 @@ int dAttention_c::act_type_num = 5; /* 80450668-8045066C 0000E8 0004+00 1/1 0/0 0/0 .sdata chk_type_tbl__12dAttention_c */ type_tbl_entry dAttention_c::chk_type_tbl[1] = { - {fopAc_attn_CHECK_e, 0x100}, + {fopAc_attn_CHECK_e, fopAc_AttnFlag_CHECK_e}, }; /* 8045066C-80450670 0000EC 0004+00 1/1 0/0 0/0 .sdata chk_type_num__12dAttention_c */ @@ -360,7 +424,8 @@ static int check_flontofplayer(u32 i_checkMask, s16 i_ang1, s16 i_ang2) { i_ang2 = -i_ang2; } - for (int i = 0; i < 3; i++) { + int i; + for (i = 0; i < 3; i++) { if (i_checkMask & ftp_table[i]) { if (i_ang1 > ang_table[i]) { return true; @@ -368,7 +433,7 @@ static int check_flontofplayer(u32 i_checkMask, s16 i_ang1, s16 i_ang2) { } } - for (int i = 8; i > 2; i--) { + for (i = 8; i >= 3; i--) { if (i_checkMask & ftp_table[i]) { if (i_ang2 > ang_table2[i - 3]) { return true; @@ -381,18 +446,20 @@ static int check_flontofplayer(u32 i_checkMask, s16 i_ang1, s16 i_ang2) { /* 80070BF4-80070C40 06B534 004C+00 2/2 0/0 0/0 .text distace_weight__Ffsf */ static f32 distace_weight(f32 i_distance, s16 i_angle, f32 i_ratio) { - f32 tmp = i_angle / (f32)0x8000; - return i_distance * ((1.0f - i_ratio) + (i_ratio * (tmp * tmp))); + f32 var_f31 = i_angle / (f32)0x8000; + f32 var_f30 = SQUARE(var_f31); + return i_distance * ((1.0f - i_ratio) + (i_ratio * var_f30)); } /* 80070C40-80070CA0 06B580 0060+00 2/2 0/0 0/0 .text distace_angle_adjust__Ffsf */ static f32 distace_angle_adjust(f32 i_distAdjust, s16 i_angle, f32 i_ratio) { - f32 tmp = i_angle / (f32)0x8000; - if (tmp < 0.0f) { - tmp = -tmp; + f32 var_f31 = i_angle / (f32)0x8000; + if (var_f31 < 0.0f) { + var_f31 = -var_f31; } + f32 var_f30 = SQUARE(1.0f - var_f31); - return i_distAdjust * ((1.0f - i_ratio) + (i_ratio * ((1.0f - tmp) * (1.0f - tmp)))); + return i_distAdjust * ((1.0f - i_ratio) + (i_ratio * var_f30)); } /* 80070CA0-80070E90 06B5E0 01F0+00 3/3 0/0 0/0 .text check_distace__FP4cXyzsP4cXyzffff @@ -431,7 +498,7 @@ f32 dAttention_c::calcWeight(int i_listType, fopAc_ac_c* i_actor, f32 i_distance table = loc_type_tbl; break; default: - OS_REPORT("attention: %d: illegal type\n", 0x419); + OS_REPORT("attention: %d: illegal type\n", 1049); case 'A': num = act_type_num; table = act_type_tbl; @@ -445,9 +512,11 @@ f32 dAttention_c::calcWeight(int i_listType, fopAc_ac_c* i_actor, f32 i_distance f32 weight = 0.0f; f32 max_weight = -1.0f; + int dist_index; daPy_py_c* player = daPy_getPlayerActorClass(); if (player != NULL) { - if (i_actor == fopAcM_SearchByID(player->getGrabActorID())) { + fpc_ProcID grab_actor_id = player->getGrabActorID(); + if (i_actor == fopAcM_SearchByID(grab_actor_id)) { return 0.0f; } } @@ -457,10 +526,10 @@ f32 dAttention_c::calcWeight(int i_listType, fopAc_ac_c* i_actor, f32 i_distance type_tbl_entry* type_tbl_entry = &table[i]; if (mPlayerAttentionFlags & type_tbl_entry->mask & i_actor->attention_info.flags) { - u8 dist_index = i_actor->attention_info.distances[type_tbl_entry->type]; + dist_index = i_actor->attention_info.distances[type_tbl_entry->type]; dist_entry* dist_tbl_entry = &dist_table[dist_index]; - if (fopAcM_checkStatus(i_actor, 0x20000000) || + if (fopAcM_CheckStatus(i_actor, 0x20000000) || check_event_condition(type_tbl_entry->type, i_actor->eventInfo.getCondition())) { dist_weight = 0.0f; } else if (check_flontofplayer(dist_tbl_entry->mAngleSelect, i_angle, i_invAngle)) { @@ -491,7 +560,7 @@ void dAttention_c::setList(int i_listType, fopAc_ac_c* i_actor, f32 i_weight, f3 cSAngle i_angle, u32 i_attnType) { int max; int* list_count; - s32 maxIndex; + int maxIndex; dAttList_c* list; switch (i_listType) { @@ -505,6 +574,7 @@ void dAttention_c::setList(int i_listType, fopAc_ac_c* i_actor, f32 i_weight, f3 list = mLockOnList; break; default: + OS_REPORT("attention: %d: illegal type\n", 1169); case 'A': max = 4; list_count = &mActionCount; @@ -517,16 +587,14 @@ void dAttention_c::setList(int i_listType, fopAc_ac_c* i_actor, f32 i_weight, f3 break; } - f32 weight = 0.0f; - - if (i_weight > weight) { + if (i_weight > 0.0f) { if (*list_count < max) { maxIndex = *list_count; (*list_count)++; } else { - f32 maxWeight = weight; - s32 i = 0; - maxIndex = 0; + f32 maxWeight = 0.0f; + int i = 0; + maxIndex = i; for (; i < max; i++) { if (list[i].mWeight > maxWeight) { maxWeight = list[i].mWeight; @@ -587,7 +655,9 @@ static int select_attention(fopAc_ac_c* i_actor, void* i_attention) { return 0; } - return ((dAttention_c*)i_attention)->SelectAttention(i_actor); + dAttention_c* attention = (dAttention_c*)i_attention; + int rt = attention->SelectAttention(i_actor); + return rt; } /* 800713CC-80071424 06BD0C 0058+00 4/4 0/0 0/0 .text makeList__12dAttention_cFv */ @@ -622,17 +692,17 @@ int dAttention_c::SelectAttention(fopAc_ac_c* i_actor) { inv_angle = cSAngle(globe.U().Inv()) - fopAcM_GetShapeAngle_p(i_actor)->y; u32 attn_type; - if ((i_actor->attention_info.flags & 7) && !chkFlag(0x4000)) { + if ((i_actor->attention_info.flags & fopAc_AttnFlags_LOCK) && !chkFlag(0x4000)) { f32 weight = calcWeight('L', i_actor, globe.R(), angle.Val(), inv_angle.Val(), &attn_type); setList('L', i_actor, weight, globe.R(), angle, attn_type); } - if (i_actor->attention_info.flags & 0xF8) { + if (i_actor->attention_info.flags & fopAc_AttnFlags_ACTION) { f32 weight = calcWeight('A', i_actor, globe.R(), angle.Val(), inv_angle.Val(), &attn_type); setList('A', i_actor, weight, globe.R(), angle, attn_type); } - if (i_actor->attention_info.flags & 0x100) { + if (i_actor->attention_info.flags & fopAc_AttnFlag_CHECK_e) { f32 weight = calcWeight('C', i_actor, globe.R(), angle.Val(), inv_angle.Val(), &attn_type); setList('C', i_actor, weight, globe.R(), angle, attn_type); } @@ -748,6 +818,9 @@ int dAttention_c::freeAttention() { /* 80071A98-80071CC0 06C3D8 0228+00 2/2 0/0 0/0 .text chaseAttention__12dAttention_cFv */ bool dAttention_c::chaseAttention() { + cSAngle a1; + cSAngle a2; + int offset = mLockOnOffset; fopAc_ac_c* actor = mLockOnList[offset].getActor(); @@ -757,11 +830,9 @@ bool dAttention_c::chaseAttention() { if (!chkFlag(0x4000)) { cSGlobe g1 = actor->attention_info.position - mOwnerAttnPos; - cSAngle a1; a1 = g1.U() - fopAcM_GetShapeAngle_p(mpPlayer)->y; cSGlobe g2(mOwnerAttnPos - actor->attention_info.position); - cSAngle a2; a2 = g2.U() - fopAcM_GetShapeAngle_p(actor)->y; u32 type; @@ -780,7 +851,8 @@ bool dAttention_c::chaseAttention() { dist_table[tbl_idx].mDistMaxRelease, dist_table[tbl_idx].mDistanceAdjust, dist_table[tbl_idx].mUpperY, dist_table[tbl_idx].mLowerY)) { - mLockOnList[offset].mWeight = distace_weight(g1.R(), a1.Val(), 0.5f); + f32 weight = distace_weight(g1.R(), a1.Val(), 0.5f); + mLockOnList[offset].mWeight = weight; return true; } @@ -794,63 +866,60 @@ bool dAttention_c::chaseAttention() { return true; } - return (actor->attention_info.flags & 7) != false; + return (actor->attention_info.flags & fopAc_AttnFlags_LOCK) != false; } - /* 80071CC0-80071D6C 06C600 00AC+00 1/1 0/0 0/0 .text EnemyDistance__12dAttention_cFP10fopAc_ac_c */ f32 dAttention_c::EnemyDistance(fopAc_ac_c* i_actor) { - f32 distance; - if (i_actor == mpPlayer || mpPlayer == NULL) { - distance = -1.0f; + return -1.0f; } else if (fopAcM_GetProfName(i_actor) == PROC_ALINK) { - distance = -1.0f; - } else if (!(i_actor->attention_info.flags & 4) && - !(i_actor->attention_info.flags & 0x4000000)) { - distance = -1.0f; + return -1.0f; + } else if (!(i_actor->attention_info.flags & fopAc_AttnFlag_BATTLE_e) && + !(i_actor->attention_info.flags & fopAc_AttnFlag_ENEMY_NOLOCK_e)) { + return -1.0f; } else { - distance = fopAcM_searchActorDistance(mpPlayer, i_actor); - u8 tmp = i_actor->attention_info.distances[fopAc_attn_BATTLE_e]; + f32 distance = fopAcM_searchActorDistance(mpPlayer, i_actor); + int tmp = i_actor->attention_info.distances[fopAc_attn_BATTLE_e]; if (distance < dist_table[tmp].mDistMax + dist_table[tmp].mDistanceAdjust) { return distance; } - - distance = -1.0f; } - return distance; + return -1.0f; } /* 80071D6C-80071DEC 06C6AC 0080+00 1/1 0/0 0/0 .text sound_attention__FP10fopAc_ac_cPv */ static int sound_attention(fopAc_ac_c* i_actor, void* i_attention) { - f32 dist = ((dAttention_c*)i_attention)->EnemyDistance(i_actor); + dAttention_c* attention = (dAttention_c*)i_attention; + f32 dist = attention->EnemyDistance(i_actor); if (dist < 0.0f) { return 0; } - if (dist < ((dAttention_c*)i_attention)->mEnemyDist) { - ((dAttention_c*)i_attention)->mEnemyActorID = fopAcM_GetID(i_actor); - ((dAttention_c*)i_attention)->mEnemyDist = dist; + if (dist < attention->mEnemyDist) { + attention->mEnemyActorID = fopAcM_GetID(i_actor); + attention->mEnemyDist = dist; } return 0; } - /* 80071DEC-80071E84 06C72C 0098+00 1/1 0/0 0/0 .text runSoundProc__12dAttention_cFv */ void dAttention_c::runSoundProc() { mEnemyActorID = fpcM_ERROR_PROCESS_ID_e; mEnemyDist = 10000.0f; + fopAc_ac_c* enemy_p; if (!chkFlag(0x80000000)) { fopAcIt_Executor((fopAcIt_ExecutorFunc)sound_attention, this); - if (fopAcM_SearchByID(mEnemyActorID) != NULL) { + enemy_p = fopAcM_SearchByID(mEnemyActorID); + if (enemy_p != NULL) { mDoAud_bgmNowBattle(mEnemyDist * 0.1f); setFlag(0x100); } @@ -859,7 +928,9 @@ void dAttention_c::runSoundProc() { /* 80071E84-800720F4 06C7C4 0270+00 1/1 0/0 0/0 .text runDrawProc__12dAttention_cFv */ void dAttention_c::runDrawProc() { - if ((mFlags >> 3) & 1) { + int lockon_cnt = GetLockonCount(); + + if (chkFlag(8)) { draw[0].setAlphaAnm(mAttParam.mAttnCursorAppearFrames, 0); draw[0].setAnm(DRAW_TYPE_RED, mAttParam.field_0x3c); draw[0].mCursorSizeX = mAttParam.mAttnCursorScaleX; @@ -919,8 +990,96 @@ void dAttention_c::runDrawProc() { } } +#if DEBUG +void dAttention_c::runDebugDisp0() { + f32 analog_l = mDoCPd_c::getAnalogL(mPadNo); + if (mAttParam.CheckFlag(0x8000)) { + dDbVw_Report(mAttParam.mDebugDispPosX, mAttParam.mDebugDispPosY, "attention %d/%d", mLockOnOffset, mLockonCount); + dDbVw_Report(mAttParam.mDebugDispPosX, mAttParam.mDebugDispPosY + 20, "L %f (%d:%d)", analog_l, padLockTrigger(mPadNo), mDoCPd_c::getHoldL(mPadNo)); + dDbVw_Report(mAttParam.mDebugDispPosX, mAttParam.mDebugDispPosY + 40, "LS %d stick.y = %f", mAttnStatus, mDoCPd_c::getStickY(mPadNo)); + + if (LockonTarget(0)) { + dDbVw_Report(mAttParam.mDebugDispPosX, mAttParam.mDebugDispPosY + 60, "LTN %s", dStage_getName(fopAcM_GetProfName(LockonTarget(0)), -1)); + } + } +} +#endif + /* 800720F4-800720F8 06CA34 0004+00 1/1 0/0 0/0 .text runDebugDisp__12dAttention_cFv */ -void dAttention_c::runDebugDisp() {} +void dAttention_c::runDebugDisp() { +#if DEBUG + if (mAttParam.CheckFlag(0x4000)) { + int i; + int print_y = 100; + int no = 0; + + char* type_str[] = { + "LOCK", + "TALK", + "BATL", + "SPEK", + "CARY", + "DOOR", + "JUEL", + "ETC?", + "CHEK", + "????", + }; + + dDbVw_Report(10, print_y, " **** attention **** %03d", field_0x32e); + dDbVw_Report(10, print_y += 15, " No TYPE WEIGHT PID NAME"); + + if (mLockonCount != 0) { + for (i = 0; i < mLockonCount; i++) { + char name[16]; + fopAcM_getNameString(mLockOnList[i].getActor(), name); + + char sp9; + if (i == mLockOnOffset) { + sp9 = '*'; + } else { + sp9 = ' '; + } + + dDbVw_Report(10, print_y += 15, "%c%02d %s %06.1f %3d %s", sp9, no, type_str[mLockOnList[i].mType], mLockOnList[i].mWeight, mLockOnList[i].getPid(), name); + no++; + } + + print_y += 15; + } + + if (mActionCount != 0) { + for (i = 0; i < mActionCount; i++) { + char name[16]; + fopAcM_getNameString(mActionList[i].getActor(), name); + dDbVw_Report(10, print_y += 15, " %02d %s %06.1f %3d %s", no, type_str[mActionList[i].mType], mActionList[i].mWeight, mActionList[i].getPid(), name); + no++; + } + } + + if (mCheckObjectCount != 0) { + for (i = 0; i < mCheckObjectCount; i++) { + char name[16]; + fopAcM_getNameString(mCheckObjectList[i].getActor(), name); + + char sp8; + if (i == mCheckObjectOffset) { + sp8 = '+'; + } else { + sp8 = ' '; + } + + dDbVw_Report(10, print_y += 15, "%c%02d %s %06.1f %3d %s", sp8, no, type_str[mCheckObjectList[i].mType], mCheckObjectList[i].mAngle.Degree(), mCheckObjectList[i].getPid(), name); + no++; + } + } + + if (no == 0) { + dDbVw_Report(10, print_y += 15, " (EMPTY)"); + } + } +#endif +} /* 800720F8-800722A0 06CA38 01A8+00 1/1 0/0 0/0 .text checkButton__12dAttention_cFv */ void dAttention_c::checkButton() { @@ -991,8 +1150,12 @@ int dAttention_c::lostCheck() { /* 80072344-800725F0 06CC84 02AC+00 1/1 0/0 0/0 .text judgementStatus4Hold__12dAttention_cFv */ void dAttention_c::judgementStatus4Hold() { + int var_r29 = mAttnStatus; + int var_r30 = -1; + switch (mAttnStatus) { case EState_NONE: + var_r30 = 10; field_0x32f = 0; field_0x32e = 0; mLockTargetID = fpcM_ERROR_PROCESS_ID_e; @@ -1001,11 +1164,13 @@ void dAttention_c::judgementStatus4Hold() { if (field_0x32b == 0 && triggerProc()) { mAttnStatus = EState_LOCK; field_0x32e = 15; + var_r30 = 11; } break; case EState_LOCK: mLockTargetID = LockonTargetPId(0); field_0x32f = 0; + var_r30 = 20; if (lostCheck()) { mLockTargetID = fpcM_ERROR_PROCESS_ID_e; @@ -1018,16 +1183,19 @@ void dAttention_c::judgementStatus4Hold() { freeAttention(); setFlag(0x800000); } + var_r30 = 21; } else if (field_0x32b == 4) { mAttnStatus = EState_RELEASE; setFlag(0x10); field_0x32f = 10; + var_r30 = 22; } else if (field_0x32e == 0) { initList(0xFFFFFFFF); if (makeList()) { sortList(); } + var_r30 = 23; } if (field_0x32e != 0) { @@ -1037,6 +1205,7 @@ void dAttention_c::judgementStatus4Hold() { break; case EState_RELEASE: setFlag(0x40); + var_r30 = 30; if (lostCheck()) { mLockTargetID = fpcM_ERROR_PROCESS_ID_e; @@ -1049,6 +1218,7 @@ void dAttention_c::judgementStatus4Hold() { freeAttention(); setFlag(0x800000); } + var_r30 = 31; } else if (field_0x32b == 0) { if (nextAttention()) { setFlag(0x8); @@ -1058,9 +1228,11 @@ void dAttention_c::judgementStatus4Hold() { mAttnStatus = EState_NONE; freeAttention(); } + var_r30 = 32; } else if (LockonTarget(0) == NULL || field_0x32f == 0) { mAttnStatus = EState_NONE; freeAttention(); + var_r30 = 33; } if (field_0x32f != 0) { @@ -1078,29 +1250,42 @@ void dAttention_c::judgementStatus4Hold() { sortList(); } } + +#if DEBUG + if (var_r29 != mAttnStatus) { + OS_REPORT("%06d: attention: status %d, %d -> %d (%d)\n", g_Counter.mCounter0, mLockonCount, var_r29, mAttnStatus, var_r30); + } +#endif } /* 800725F0-80072924 06CF30 0334+00 1/1 0/0 0/0 .text judgementStatus4Switch__12dAttention_cFv */ void dAttention_c::judgementStatus4Switch() { + int var_r29 = mAttnStatus; + int var_r30 = -1; + switch (mAttnStatus) { case EState_NONE: mLockTargetID = fpcM_ERROR_PROCESS_ID_e; stockAttention(); field_0x32f = 0; field_0x32e = 0; + var_r30 = 10; if (field_0x32b == 0 && triggerProc()) { mAttnStatus = EState_LOCK; field_0x32e = 15; field_0x32f = 15; + var_r30 = 11; } break; case EState_LOCK: mLockTargetID = LockonTargetPId(0); + var_r30 = 20; if (field_0x32f == 0) { mAttnStatus = EState_NONE; freeAttention(); + var_r30 = 29; } else if (lostCheck()) { mLockTargetID = fpcM_ERROR_PROCESS_ID_e; stockAttention(); @@ -1112,8 +1297,9 @@ void dAttention_c::judgementStatus4Switch() { freeAttention(); setFlag(0x800000); } + var_r30 = 21; } else if (field_0x32b == 0) { - if (mDoCPd_c::getStickY(mPadNo) < -0.9f) { + if (mDoCPd_c::getStickY(mPadNo) < mAttParam.FreeStick()) { mAttnStatus = EState_NONE; freeAttention(); } else if (nextAttention()) { @@ -1124,12 +1310,14 @@ void dAttention_c::judgementStatus4Switch() { mAttnStatus = EState_NONE; freeAttention(); } + var_r30 = 22; } else if (field_0x32e == 0) { initList(0xFFFFFFFF); if (makeList()) { sortList(); } + var_r30 = 23; } if (!chkFlag(0x8) && field_0x32e != 0) { @@ -1147,6 +1335,7 @@ void dAttention_c::judgementStatus4Switch() { break; case EState_RELEASE: setFlag(0x40); + var_r30 = 30; if (lostCheck()) { mLockTargetID = fpcM_ERROR_PROCESS_ID_e; @@ -1159,6 +1348,7 @@ void dAttention_c::judgementStatus4Switch() { freeAttention(); setFlag(0x800000); } + var_r30 = 31; } else if (field_0x32b == 0) { mAttnStatus = EState_NONE; @@ -1167,9 +1357,11 @@ void dAttention_c::judgementStatus4Switch() { field_0x32e = 15; field_0x32f = 15; } + var_r30 = 32; } else if (LockonTarget(0) == NULL || field_0x32f == 0) { mAttnStatus = EState_NONE; freeAttention(); + var_r30 = 33; } break; @@ -1183,6 +1375,12 @@ void dAttention_c::judgementStatus4Switch() { sortList(); } } + +#if DEBUG + if (var_r29 != mAttnStatus) { + OS_REPORT("%06d: attention: status %d, %d -> %d (%d)\n", g_Counter.mCounter0, mLockonCount, var_r29, mAttnStatus, var_r30); + } +#endif } /* 80072924-80072BD4 06D264 02B0+00 0/0 1/1 0/0 .text Run__12dAttention_cFv */ @@ -1196,6 +1394,12 @@ int dAttention_c::Run() { attn_opt_hold = usingHold; +#if DEBUG + if (mAttParam.CheckFlag(4)) { + attn_opt_hold = mAttParam.CheckFlag(1); + } +#endif + if (mAttnBlockTimer != 0) { mAttnBlockTimer--; return 1; @@ -1206,6 +1410,10 @@ int dAttention_c::Run() { mPadNo = PAD_1; } +#if DEBUG + runDebugDisp0(); +#endif + setOwnerAttentionPos(); if (dComIfGp_event_runCheck() || chkFlag(0x10000)) { @@ -1225,7 +1433,7 @@ int dAttention_c::Run() { judgementStatus4Switch(); } - if ((mFlags >> 0x17) & 1) { + if (chkFlag(0x800000)) { freeAttention(); if (LockonTarget(0) == NULL) { setFlag(0x20000020); @@ -1281,24 +1489,41 @@ void dAttention_c::Draw() { } Mtx inv_m; - MTXInverse(dComIfGd_getViewRotMtx(), inv_m); + cMtx_inverse(dComIfGd_getViewRotMtx(), inv_m); fopAc_ac_c* lockon_actor = LockonTarget(0); if (!dComIfGp_event_runCheck()) { + #if DEBUG + if (mAttParam.CheckFlag(4) && mAttParam.CheckFlag(0x10)) { + return; + } + #endif + if (lockon_actor != NULL) { + #if DEBUG + if (mAttParam.CheckFlag(8)) { + dDbVw_Report(300, 40, "000"); + } + #endif + draw[0].draw(lockon_actor->attention_info.position, inv_m); if (mLockonCount >= 2 && draw[1].field_0x173 == 2) { int listIdx = mLockOnOffset; - if (mLockOnOffset == 0) { listIdx = mLockonCount - 1; } else { listIdx--; } + if (mLockOnList[listIdx].getActor() != NULL) { - fopAc_ac_c* actor = mLockOnList[listIdx].getActor(); - draw[1].draw(actor->attention_info.position, inv_m); + draw[1].draw(mLockOnList[listIdx].getActor()->attention_info.position, inv_m); + + #if DEBUG + if (mAttParam.CheckFlag(8)) { + dDbVw_Report(300, 40, "111"); + } + #endif } } @@ -1314,6 +1539,12 @@ void dAttention_c::Draw() { } else { draw[0].draw(mDrawAttnPos, inv_m); } + + #if DEBUG + if (mAttParam.CheckFlag(8)) { + dDbVw_Report(300, 40, "222"); + } + #endif } } } @@ -1412,18 +1643,20 @@ void dAttDraw_c::draw(cXyz& i_pos, Mtx i_mtx) { mModel[mDrawType]->setBaseTRMtx(mDoMtx_stack_c::get()); view_class* view = dComIfGd_getView(); - f32 temp_f31 = tan(DEG_TO_RAD(0.5f * view->fovy)); - f32 temp_f30 = (-100.0f - g_AttDwHIO.mCursorDistance) / temp_f31; + f32 fovy = view->fovy; + f32 temp_f31 = std::tan(DEG_TO_RAD(0.5f * fovy)); + f32 temp_f30 = (-100.0f + -g_AttDwHIO.mCursorDistance) / temp_f31; cXyz view_pos; - MTXMultVec(dComIfGd_getViewMtx(), &i_pos, &view_pos); + cMtx_multVec(dComIfGd_getViewMtx(), &i_pos, &view_pos); f32 size = 1.0f; if (view_pos.z < temp_f30) { - size = (view_pos.z * temp_f31) / (-100.0f - g_AttDwHIO.mCursorDistance); + size = (view_pos.z * temp_f31) / (-100.0f + -g_AttDwHIO.mCursorDistance); } - mModel[mDrawType]->setBaseScale(cXyz(mCursorSizeX * size, mCursorSizeY * size, mCursorSizeX * size)); + cXyz scale(mCursorSizeX * size, mCursorSizeY * size, mCursorSizeX * size); + mModel[mDrawType]->setBaseScale(scale); alphaAnm(); @@ -1462,7 +1695,7 @@ fopAc_ac_c* dAttention_c::LockonTarget(s32 i_no) { } fopAc_ac_c* actor = mLockOnList[listIdx].getActor(); - if (actor == NULL || !(actor->attention_info.flags & 7)) { + if (actor == NULL || !(actor->attention_info.flags & fopAc_AttnFlags_LOCK)) { return NULL; } diff --git a/src/d/d_cc_s.cpp b/src/d/d_cc_s.cpp index be363a8e58..52487902df 100644 --- a/src/d/d_cc_s.cpp +++ b/src/d/d_cc_s.cpp @@ -387,7 +387,7 @@ void dCcS::ProcAtTgHitmark(bool i_setAt, bool i_setTg, cCcD_Obj* param_2, cCcD_O cXyz* i_hitPos, bool i_chkShield) { if (!i_atObjInf->ChkAtNoHitMark() && !i_tgObjInf->ChkTgNoHitMark() && (i_atObjInf->GetAtType() != AT_TYPE_10000000 || i_tgObjInf->GetAc() == NULL || - fopAcM_checkStatus(i_tgObjInf->GetAc(), AT_TYPE_10000000))) + fopAcM_CheckStatus(i_tgObjInf->GetAc(), AT_TYPE_10000000))) { if ((i_atObjInf->GetAtType() & (AT_TYPE_WOLF_ATTACK | AT_TYPE_WOLF_CUT_TURN | AT_TYPE_10000000 | AT_TYPE_MIDNA_LOCK | diff --git a/src/d/d_cc_uty.cpp b/src/d/d_cc_uty.cpp index bf72621af4..7b95f07e35 100644 --- a/src/d/d_cc_uty.cpp +++ b/src/d/d_cc_uty.cpp @@ -145,7 +145,7 @@ static u32 getHitId(cCcD_Obj* i_ccObj, int i_useReboundSe) { void def_se_set(Z2Creature* i_sound, cCcD_Obj* i_ccObj, u32 i_mapInfo, fopAc_ac_c* i_actor) { if (i_sound != NULL) { int useReboundSe; - if (i_actor != NULL && fopAcM_checkStatus(i_actor, 0x280000)) { + if (i_actor != NULL && fopAcM_CheckStatus(i_actor, 0x280000)) { useReboundSe = false; } else { useReboundSe = true; @@ -408,7 +408,7 @@ fopAc_ac_c* cc_at_check(fopAc_ac_c* i_enemy, dCcU_AtInfo* i_AtInfo) { } if (i_AtInfo->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) && - fopAcM_checkStatus(i_enemy, 0x380000)) + fopAcM_CheckStatus(i_enemy, 0x380000)) { i_AtInfo->mAttackPower = 0; } @@ -450,7 +450,7 @@ fopAc_ac_c* cc_at_check(fopAc_ac_c* i_enemy, dCcU_AtInfo* i_AtInfo) { int uvar8; if (i_AtInfo->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) && - !fopAcM_checkStatus(i_enemy, 0x280000)) + !fopAcM_CheckStatus(i_enemy, 0x280000)) { uvar8 = 1; } else { diff --git a/src/d/d_event.cpp b/src/d/d_event.cpp index 3ad89e2eee..d2de86d86c 100644 --- a/src/d/d_event.cpp +++ b/src/d/d_event.cpp @@ -920,7 +920,7 @@ int dEvt_control_c::Step() { */ int dEvt_control_c::moveApproval(void* param_0) { fopAc_ac_c* actor = (fopAc_ac_c*)param_0; - if (fopAcM_checkStatus(actor, 0x20000)) { + if (fopAcM_CheckStatus(actor, 0x20000)) { return 2; } @@ -950,11 +950,11 @@ int dEvt_control_c::moveApproval(void* param_0) { break; } - if (fopAcM_checkStatus(actor, 0x8000)) { + if (fopAcM_CheckStatus(actor, 0x8000)) { return 2; } - if (fopAcM_checkStatus(actor, 0x800)) { + if (fopAcM_CheckStatus(actor, 0x800)) { return 1; } @@ -963,7 +963,7 @@ int dEvt_control_c::moveApproval(void* param_0) { return 0; } - if (mMode == EVT_MODE_TALK && fopAcM_checkStatus(actor, 0x40)) { + if (mMode == EVT_MODE_TALK && fopAcM_CheckStatus(actor, 0x40)) { return 1; } @@ -971,15 +971,15 @@ int dEvt_control_c::moveApproval(void* param_0) { return 1; } - if ((getMode() == 3 || getMode() == EVT_MODE_TALK) && fopAcM_checkStatus(actor, 0x4000000)) { + if ((getMode() == 3 || getMode() == EVT_MODE_TALK) && fopAcM_CheckStatus(actor, 0x4000000)) { return 0; } - if (fopAcM_checkStatus(actor, 0x4000)) { + if (fopAcM_CheckStatus(actor, 0x4000)) { return 1; } - if (fopAcM_checkStatus(actor, 0x2000)) { + if (fopAcM_CheckStatus(actor, 0x2000)) { return 1; } diff --git a/src/d/d_insect.cpp b/src/d/d_insect.cpp index fc1765f2c1..fdb15164a6 100644 --- a/src/d/d_insect.cpp +++ b/src/d/d_insect.cpp @@ -47,7 +47,7 @@ void dInsect_c::Insect_GetDemoMain() { switch (m_mode) { case 0: if (fopAcM_checkCarryNow(this)) { - cLib_offBit(attention_info.flags, 0x10); + cLib_offBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); fopAcM_cancelCarryNow(this); fopAcM_orderItemEvent(this, 0, 0); eventInfo.onCondition(dEvtCnd_CANGETITEM_e); @@ -60,7 +60,7 @@ void dInsect_c::Insect_GetDemoMain() { field_0x585 = 1; } } else { - cLib_onBit(attention_info.flags, 0x10); + cLib_onBit(attention_info.flags, fopAc_AttnFlag_CARRY_e); } break; case 1: diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index 7e546acc3d..0ef5810063 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -1392,7 +1392,7 @@ void dPa_control_c::setHitMark(u16 param_1, fopAc_ac_c* param_2, cXyz const* par cXyz const* pPos = param_3; csXyz const* pAngle = param_4; if (param_2 != NULL) { - if (fopAcM_checkStatus(param_2, 0x40000000)) { + if (fopAcM_CheckStatus(param_2, 0x40000000)) { return; } fopAcM_OnStatus(param_2, 0x40000000); diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index 74c25ebacf..0c2b86228e 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -1511,7 +1511,7 @@ dStage_objectNameInf* dStage_searchName(char const* objName) { return NULL; } -static const char* dStage_getName(s16 procName, s8 subtype) { +const char* dStage_getName(s16 procName, s8 subtype) { static char tmp_name[8]; dStage_objectNameInf* obj = l_objectName; diff --git a/src/f_op/f_op_actor.cpp b/src/f_op/f_op_actor.cpp index d12bec7bda..1ff1a7f736 100644 --- a/src/f_op/f_op_actor.cpp +++ b/src/f_op/f_op_actor.cpp @@ -39,9 +39,9 @@ static int fopAc_Draw(void* i_this) { int ret = 1; if (!dComIfGp_isPauseFlag()) { if ((dComIfGp_event_moveApproval(a_this) == 2 || - (!fopAcM_checkStatus(a_this, fopAc_ac_c::stopStatus) && - (!fopAcM_checkStatus(a_this, fopAcStts_CULL_e) || !fopAcM_cullingCheck(a_this)))) && - !fopAcM_checkStatus(a_this, 0x21000000)) + (!fopAcM_CheckStatus(a_this, fopAc_ac_c::stopStatus) && + (!fopAcM_CheckStatus(a_this, fopAcStts_CULL_e) || !fopAcM_cullingCheck(a_this)))) && + !fopAcM_CheckStatus(a_this, 0x21000000)) { fopAcM_OffCondition(a_this, fopAcCnd_NODRAW_e); ret = fpcLf_DrawMethod((leafdraw_method_class*)a_this->sub_method, a_this); @@ -67,10 +67,10 @@ static int fopAc_Execute(void* i_this) { s32 move = dComIfGp_event_moveApproval(i_this); fopAcM_OffStatus(a_this, 0x40000000); - if (!fopAcM_checkStatus(a_this, 0x20000000) && + if (!fopAcM_CheckStatus(a_this, 0x20000000) && (move == 2 || - (move != 0 && !fopAcM_checkStatus(a_this, fopAc_ac_c::stopStatus) && - (!fopAcM_checkStatus(a_this, fopAcStts_NOEXEC_e) || !fopAcM_CheckCondition(a_this, fopAcCnd_NODRAW_e))))) + (move != 0 && !fopAcM_CheckStatus(a_this, fopAc_ac_c::stopStatus) && + (!fopAcM_CheckStatus(a_this, fopAcStts_NOEXEC_e) || !fopAcM_CheckCondition(a_this, fopAcCnd_NODRAW_e))))) { fopAcM_OffCondition(a_this, fopAcCnd_NOEXEC_e); a_this->old = a_this->current; @@ -80,7 +80,7 @@ static int fopAc_Execute(void* i_this) { fopAcM_OnCondition(a_this, fopAcCnd_NOEXEC_e); } - if (fopAcM_checkStatus(a_this, 0x20) && + if (fopAcM_CheckStatus(a_this, 0x20) && a_this->home.pos.y - a_this->current.pos.y > 5000.0f) { fopAcM_delete(a_this);