mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-23 06:54:16 -04:00
d_attention cleanup, add mDoCPd inlines
This commit is contained in:
@@ -96,7 +96,7 @@ public:
|
||||
void offHyoiKamome() { m_hyoi_kamome = false; }
|
||||
|
||||
s16 XyCheckCB(int);
|
||||
int callDemoStartCheck();
|
||||
BOOL callDemoStartCheck();
|
||||
s16 XyEventCB(int);
|
||||
~daNpc_kam_c();
|
||||
void setAttention(bool, int);
|
||||
|
||||
+28
-25
@@ -68,6 +68,7 @@ public:
|
||||
/* 0x10 */ f32 mDangerBGMDistance;
|
||||
/* 0x14 */ f32 mBGMDistMargin;
|
||||
/* 0x18 */ f32 mSWModeDisable;
|
||||
/* 0x1C vtable */
|
||||
|
||||
public:
|
||||
dAttParam_c() {}
|
||||
@@ -75,7 +76,12 @@ public:
|
||||
|
||||
virtual ~dAttParam_c();
|
||||
|
||||
/* 0x1C vtable */
|
||||
// These are likely debug-only functions.
|
||||
// void CheckFlag(u16) {}
|
||||
// void FreeStick() {}
|
||||
// void connectHIO() {}
|
||||
// void genMessage(JORMContext*) {}
|
||||
// void releaseHIO() {}
|
||||
}; // Size: 0x20
|
||||
|
||||
class dAttLook_c {
|
||||
@@ -168,7 +174,7 @@ public:
|
||||
dAttList_c* getActionBtnX();
|
||||
dAttList_c* getActionBtnY();
|
||||
dAttList_c* getActionBtnZ();
|
||||
s32 chkAttMask(u32, u32);
|
||||
BOOL chkAttMask(u32, u32);
|
||||
f32 calcWeight(int, fopAc_ac_c*, f32, s16, s16, u32*);
|
||||
void setLList(fopAc_ac_c*, f32, f32, u32);
|
||||
void setAList(fopAc_ac_c*, f32, f32, u32);
|
||||
@@ -187,7 +193,7 @@ public:
|
||||
void runDebugDisp();
|
||||
void judgementButton();
|
||||
void judgementTriggerProc();
|
||||
int judgementLostCheck();
|
||||
BOOL judgementLostCheck();
|
||||
void judgementStatusSw(u32);
|
||||
void judgementStatusHd(u32);
|
||||
bool Run(u32 interactMask);
|
||||
@@ -198,9 +204,9 @@ public:
|
||||
fopAc_ac_c* ActionTarget(s32);
|
||||
bool LockonTruth();
|
||||
|
||||
void Init(fopAc_ac_c* i_owner, u32 i_playerNo) {
|
||||
void Init(fopAc_ac_c* i_owner, u32 i_padNo) {
|
||||
mpPlayer = (daPy_lk_c*)i_owner;
|
||||
mPlayerNo = i_playerNo;
|
||||
mPadNo = i_padNo;
|
||||
}
|
||||
|
||||
fopAc_ac_c* Owner() { return (fopAc_ac_c*)mpPlayer; }
|
||||
@@ -208,17 +214,14 @@ public:
|
||||
bool chkFlag(u32 flag) { return (mFlags & flag) ? true : false; }
|
||||
void setFlag(u32 flag) { mFlags |= flag; }
|
||||
void clrFlag(u32 flag) { mFlags &= ~flag; }
|
||||
void changeOwner() { setFlag(AttnFlag_00000080); }
|
||||
bool Lockon() { return LockonTruth() || chkFlag(AttnFlag_20000000); } // regswap
|
||||
void offAleart() {
|
||||
setFlag(AttnFlag_80000000);
|
||||
}
|
||||
void revivalAleart() {
|
||||
clrFlag(AttnFlag_80000000);
|
||||
}
|
||||
void offAleart() { setFlag(AttnFlag_80000000); }
|
||||
void revivalAleart() { clrFlag(AttnFlag_80000000); }
|
||||
|
||||
void CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 param_2, f32 param_3,
|
||||
f32 param_4, s16 param_5, int param_6) {
|
||||
mCatch.request(param_0, param_1, param_2, param_3, param_4, param_5, param_6);
|
||||
void CatchRequest(fopAc_ac_c* reqActor, u8 itemNo, f32 horizontalDist, f32 upDist,
|
||||
f32 downDist, s16 angle, int param_6) {
|
||||
mCatch.request(reqActor, itemNo, horizontalDist, upDist, downDist, angle, param_6);
|
||||
}
|
||||
u8 getCatchChgItem() { return mCatch.getChangeItem(); }
|
||||
fopAc_ac_c* getCatghTarget() { return mCatch.getCatghTarget(); }
|
||||
@@ -231,6 +234,8 @@ public:
|
||||
return mHint.request(param_1, param_2);
|
||||
}
|
||||
|
||||
int GetLockonCount() { return mLockonCount; }
|
||||
|
||||
static s32 loc_type_num;
|
||||
static u32 act_type_num;
|
||||
struct LocTbl {
|
||||
@@ -250,20 +255,18 @@ public:
|
||||
} dist_table[];
|
||||
|
||||
// TODO:
|
||||
void GetLockonCount() {}
|
||||
void LockEdge() {}
|
||||
void changeOwner() {}
|
||||
void chkEnemySound() {}
|
||||
void LookRequest(fopAc_ac_c*, f32, f32, f32, s16, int) {}
|
||||
void Look2RequestF(fopAc_ac_c*, s16, int) {}
|
||||
|
||||
public:
|
||||
/* 0x000 */ daPy_lk_c* mpPlayer;
|
||||
/* 0x004 */ int mLockOnTargetBsPcID;
|
||||
/* 0x004 */ fpc_ProcID mLockonTargetID;
|
||||
/* 0x008 */ dAttDraw_CallBack_c mCallBack;
|
||||
/* 0x00C */ int mPlayerNo;
|
||||
/* 0x00C */ int mPadNo;
|
||||
/* 0x010 */ u32 mFlagMask;
|
||||
/* 0x014 */ u8 field_0x014[0x018 - 0x014]; // seemingly unused but removing this yields a smaller structure
|
||||
/* 0x014 */ u8 field_0x014[0x018 - 0x014];
|
||||
/* 0x018 */ u8 mLockOnState;
|
||||
/* 0x019 */ u8 field_0x019; // data copied from mLockState, looks to be same as TP's dAttention_c::field_0x32a
|
||||
/* 0x01A */ u8 field_0x01a;
|
||||
@@ -274,17 +277,17 @@ public:
|
||||
/* 0x028 */ s8 field_0x028; // looks to be same as TP's dAttention_c::field_0x328
|
||||
/* 0x02C */ cXyz mDrawAttnPos;
|
||||
/* 0x038 */ dAttDraw_c draw[2];
|
||||
/* 0x050 */ u32 mlockedOnPId;
|
||||
/* 0x050 */ fpc_ProcID mDrawLockonTargetID;
|
||||
/* 0x054 */ dAttList_c mLockOnList[8];
|
||||
/* 0x0D4 */ int mLockOnNum;
|
||||
/* 0x0D8 */ int mLockOnOffs;
|
||||
/* 0x0D4 */ int mLockonCount;
|
||||
/* 0x0D8 */ int mLockOnOffset;
|
||||
/* 0x0DC */ dAttList_c mActionList[4];
|
||||
/* 0x11C */ int mActionNum;
|
||||
/* 0x120 */ int mActionOffs;
|
||||
/* 0x11C */ int mActionCount;
|
||||
/* 0x120 */ int mActionOffset;
|
||||
/* 0x124 */ dAttHint_c mHint;
|
||||
/* 0x130 */ dAttCatch_c mCatch;
|
||||
/* 0x148 */ dAttLook_c mLook[2];
|
||||
/* 0x168 */ int mEnemyBsPcId;
|
||||
/* 0x168 */ fpc_ProcID mEnemyID;
|
||||
/* 0x16C */ f32 mEnemyDistance;
|
||||
/* 0x170 */ dAttParam_c mAttParam;
|
||||
}; // Size: 0x190
|
||||
|
||||
@@ -3849,9 +3849,9 @@ inline void dComIfGp_att_Look2RequestF(fopAc_ac_c* param_0, s16 param_1, int par
|
||||
dComIfGp_getAttention().Look2RequestF(param_0, param_1, param_2);
|
||||
}
|
||||
|
||||
inline void dComIfGp_att_CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 param_2, f32 param_3,
|
||||
f32 param_4, s16 param_5, int param_6) {
|
||||
dComIfGp_getAttention().CatchRequest(param_0, param_1, param_2, param_3, param_4,param_5, param_6);
|
||||
inline void dComIfGp_att_CatchRequest(fopAc_ac_c* reqActor, u8 itemNo, f32 horizontalDist, f32 upDist,
|
||||
f32 downDist, s16 angle, int param_6) {
|
||||
dComIfGp_getAttention().CatchRequest(reqActor, itemNo, horizontalDist, upDist, downDist,angle, param_6);
|
||||
}
|
||||
|
||||
inline u8 dComIfGp_att_getCatchChgItem() {
|
||||
@@ -3863,7 +3863,7 @@ inline fopAc_ac_c* dComIfGp_att_getCatghTarget() {
|
||||
}
|
||||
|
||||
inline void dComIfGp_att_ChangeOwner() {
|
||||
dComIfGp_getAttention().setFlag(AttnFlag_00000080);
|
||||
dComIfGp_getAttention().changeOwner();
|
||||
}
|
||||
|
||||
inline fopAc_ac_c* dComIfGp_att_getLookTarget() {
|
||||
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
void setXyCheckCB(CallbackFunc cb) { mpCheckCB = cb; }
|
||||
s16 runXyCheckCB(void* ac, int i_itemBtn) {
|
||||
if (mpCheckCB == NULL)
|
||||
return 1;
|
||||
return true;
|
||||
return mpCheckCB(ac, i_itemBtn);
|
||||
}
|
||||
void setPhotoEventCB(CallbackFunc cb) { mpPhotoCB = cb; }
|
||||
|
||||
@@ -36,8 +36,34 @@ extern interface_of_controller_pad g_mDoCPd_cpadInfo[4];
|
||||
int mDoCPd_Create();
|
||||
int mDoCPd_Read();
|
||||
|
||||
inline bool mDoCPd_L_LOCK_BUTTON(unsigned long i_playerNo) {
|
||||
return g_mDoCPd_cpadInfo[i_playerNo].mHoldLockL;
|
||||
inline bool mDoCPd_L_LOCK_BUTTON(u32 i_padNo) {
|
||||
return g_mDoCPd_cpadInfo[i_padNo].mHoldLockL;
|
||||
}
|
||||
|
||||
inline bool mDoCPd_L_LOCK_TRIGGER(u32 i_padNo) {
|
||||
return g_mDoCPd_cpadInfo[i_padNo].mTrigLockL;
|
||||
}
|
||||
|
||||
inline bool mDoCPd_R_LOCK_BUTTON(u32 i_padNo) {
|
||||
return g_mDoCPd_cpadInfo[i_padNo].mHoldLockR;
|
||||
}
|
||||
|
||||
inline bool mDoCPd_R_LOCK_TRIGGER(u32 i_padNo) {
|
||||
return g_mDoCPd_cpadInfo[i_padNo].mTrigLockR;
|
||||
}
|
||||
|
||||
inline void mDoCPd_ANALOG_CONV(u8 analog, f32& param_1) {
|
||||
param_1 = analog * (1.0f / 15.0f);
|
||||
if (param_1 > 1.0f) {
|
||||
param_1 = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
inline void mDoCPd_TRIGGER_CONV(u8 analog, f32& param_1) {
|
||||
param_1 = analog * (1.0f / 140.0f);
|
||||
if (param_1 > 1.0f) {
|
||||
param_1 = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+171
-171
@@ -85,180 +85,180 @@ u8 JAIZelBasic::m_dy_wave_set_2nd[][2] = {
|
||||
};
|
||||
|
||||
JAIZelBasic::scene_info_s JAIZelBasic::m_scene_info[] = {
|
||||
{0x0000, 0x00, 0x00},
|
||||
{JA_BGM_D_RYU_MT, 0x01, 0x05},
|
||||
{0x0000, 0x01, 0x01},
|
||||
{JA_BGM_D_FOREST, 0x03, 0x05},
|
||||
{JA_BGM_I_MAJU_2ND, 0x02, 0x05},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{0x0000, 0x03, 0x02},
|
||||
{JA_BGM_I_MAJU, 0x02, 0x05},
|
||||
{0x0000, 0x07, 0x04},
|
||||
{JA_BGM_KAMI_TOWER, 0x06, 0x05},
|
||||
{JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{JA_BGM_PIRATE_C, 0x04, 0x00},
|
||||
{JA_BGM_HOUSE_G, 0x09, 0x00},
|
||||
{JA_BGM_BOAT_SHOP, 0x10, 0x00},
|
||||
{JA_BGM_D_EARTH, 0x12, 0x05},
|
||||
{JA_BGM_I_LINK_FOREST, 0x05, 0x03},
|
||||
{JA_BGM_PIRATE, 0x0E, 0x00},
|
||||
{0x0000, 0x00, 0x00},
|
||||
{JA_BGM_I_MAJU, 0x02, 0x00},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_JABOO_CAVE, 0x28, 0x00},
|
||||
{JA_BGM_D_WIND, 0x08, 0x05},
|
||||
{0x0000, 0x08, 0x09},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_DRUG_STORE, 0x16, 0x00},
|
||||
{JA_BGM_HOUSE, 0x0C, 0x00},
|
||||
{JA_BGM_HOUSE, 0x1A, 0x00},
|
||||
{JA_BGM_HOUSE, 0x0D, 0x00},
|
||||
{JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{0x0000, 0x19, 0x00},
|
||||
{JA_BGM_HOUSE, 0x19, 0x00},
|
||||
{0x0000, 0x01, 0x05},
|
||||
{JA_BGM_D_GANON_2, 0x18, 0x0A},
|
||||
{0x0000, 0x06, 0x07},
|
||||
{JA_BGM_DRUG_STORE, 0x16, 0x00},
|
||||
{JA_BGM_I_WOOD_INNER, 0x0F, 0x0C},
|
||||
{0x0000, 0x1C, 0x00},
|
||||
{JA_BGM_JABOO_CAVE, 0x22, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_JABOO_CAVE, 0x27, 0x00},
|
||||
{0x0000, 0x12, 0x0B},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_UNK_130, 0x17, 0x00},
|
||||
{JA_BGM_UNK_131, 0x17, 0x00},
|
||||
{JA_BGM_UNK_132, 0x17, 0x00},
|
||||
{JA_BGM_UNK_133, 0x17, 0x00},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_DEATH_VALLEY, 0x25, 0x00},
|
||||
{JA_BGM_HYRULE_ON, 0x14, 0x00},
|
||||
{0x0000, 0x1D, 0x00},
|
||||
{JA_BGM_KAMI_TOWER, 0x06, 0x05},
|
||||
{0x0000, 0x0F, 0x0C},
|
||||
{0x0000, 0x1E, 0x00},
|
||||
{0x0000, 0x1F, 0x00},
|
||||
{JA_BGM_D_EARTH, 0x12, 0x05},
|
||||
{JA_BGM_HOUSE, 0x19, 0x00},
|
||||
{JA_BGM_D_FOREST, 0x03, 0x05},
|
||||
{JA_BGM_I_MAJU_2ND, 0x02, 0x05},
|
||||
{0x0000, 0x07, 0x04},
|
||||
{JA_BGM_D_WIND, 0x08, 0x05},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_ELF, 0x24, 0x00},
|
||||
{JA_BGM_ELF, 0x24, 0x00},
|
||||
{JA_BGM_ELF, 0x24, 0x00},
|
||||
{JA_BGM_ELF, 0x24, 0x00},
|
||||
{JA_BGM_ELF, 0x24, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x23, 0x0D},
|
||||
{0x0000, 0x06, 0x05},
|
||||
{JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{JA_BGM_HOUSE, 0x0C, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x29, 0x00},
|
||||
{JA_BGM_HYRULE_ON, 0x14, 0x05},
|
||||
{0x0000, 0x2C, 0x00},
|
||||
{0x0000, 0x2A, 0x00},
|
||||
{0x0000, 0x20, 0x00},
|
||||
{JA_BGM_ELF, 0x24, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{JA_BGM_HOUSE_G, 0x09, 0x00},
|
||||
{JA_BGM_D_GANON_2, 0x18, 0x0A},
|
||||
{JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{0x0000, 0x00, 0x00},
|
||||
{0x0000, 0x00, 0x00},
|
||||
{0x0000, 0x00, 0x00},
|
||||
{0x0000, 0x00, 0x00},
|
||||
{(u16)0x0000, 0x00, 0x00},
|
||||
{(u16)JA_BGM_D_RYU_MT, 0x01, 0x05},
|
||||
{(u16)0x0000, 0x01, 0x01},
|
||||
{(u16)JA_BGM_D_FOREST, 0x03, 0x05},
|
||||
{(u16)JA_BGM_I_MAJU_2ND, 0x02, 0x05},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)0x0000, 0x03, 0x02},
|
||||
{(u16)JA_BGM_I_MAJU, 0x02, 0x05},
|
||||
{(u16)0x0000, 0x07, 0x04},
|
||||
{(u16)JA_BGM_KAMI_TOWER, 0x06, 0x05},
|
||||
{(u16)JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{(u16)JA_BGM_PIRATE_C, 0x04, 0x00},
|
||||
{(u16)JA_BGM_HOUSE_G, 0x09, 0x00},
|
||||
{(u16)JA_BGM_BOAT_SHOP, 0x10, 0x00},
|
||||
{(u16)JA_BGM_D_EARTH, 0x12, 0x05},
|
||||
{(u16)JA_BGM_I_LINK_FOREST, 0x05, 0x03},
|
||||
{(u16)JA_BGM_PIRATE, 0x0E, 0x00},
|
||||
{(u16)0x0000, 0x00, 0x00},
|
||||
{(u16)JA_BGM_I_MAJU, 0x02, 0x00},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_JABOO_CAVE, 0x28, 0x00},
|
||||
{(u16)JA_BGM_D_WIND, 0x08, 0x05},
|
||||
{(u16)0x0000, 0x08, 0x09},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_DRUG_STORE, 0x16, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x0C, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x1A, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x0D, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{(u16)0x0000, 0x19, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x19, 0x00},
|
||||
{(u16)0x0000, 0x01, 0x05},
|
||||
{(u16)JA_BGM_D_GANON_2, 0x18, 0x0A},
|
||||
{(u16)0x0000, 0x06, 0x07},
|
||||
{(u16)JA_BGM_DRUG_STORE, 0x16, 0x00},
|
||||
{(u16)JA_BGM_I_WOOD_INNER, 0x0F, 0x0C},
|
||||
{(u16)0x0000, 0x1C, 0x00},
|
||||
{(u16)JA_BGM_JABOO_CAVE, 0x22, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_JABOO_CAVE, 0x27, 0x00},
|
||||
{(u16)0x0000, 0x12, 0x0B},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_UNK_130, 0x17, 0x00},
|
||||
{(u16)JA_BGM_UNK_131, 0x17, 0x00},
|
||||
{(u16)JA_BGM_UNK_132, 0x17, 0x00},
|
||||
{(u16)JA_BGM_UNK_133, 0x17, 0x00},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_DEATH_VALLEY, 0x25, 0x00},
|
||||
{(u16)JA_BGM_HYRULE_ON, 0x14, 0x00},
|
||||
{(u16)0x0000, 0x1D, 0x00},
|
||||
{(u16)JA_BGM_KAMI_TOWER, 0x06, 0x05},
|
||||
{(u16)0x0000, 0x0F, 0x0C},
|
||||
{(u16)0x0000, 0x1E, 0x00},
|
||||
{(u16)0x0000, 0x1F, 0x00},
|
||||
{(u16)JA_BGM_D_EARTH, 0x12, 0x05},
|
||||
{(u16)JA_BGM_HOUSE, 0x19, 0x00},
|
||||
{(u16)JA_BGM_D_FOREST, 0x03, 0x05},
|
||||
{(u16)JA_BGM_I_MAJU_2ND, 0x02, 0x05},
|
||||
{(u16)0x0000, 0x07, 0x04},
|
||||
{(u16)JA_BGM_D_WIND, 0x08, 0x05},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_ELF, 0x24, 0x00},
|
||||
{(u16)JA_BGM_ELF, 0x24, 0x00},
|
||||
{(u16)JA_BGM_ELF, 0x24, 0x00},
|
||||
{(u16)JA_BGM_ELF, 0x24, 0x00},
|
||||
{(u16)JA_BGM_ELF, 0x24, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x23, 0x0D},
|
||||
{(u16)0x0000, 0x06, 0x05},
|
||||
{(u16)JA_BGM_HOUSE, 0x1B, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x0C, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x29, 0x00},
|
||||
{(u16)JA_BGM_HYRULE_ON, 0x14, 0x05},
|
||||
{(u16)0x0000, 0x2C, 0x00},
|
||||
{(u16)0x0000, 0x2A, 0x00},
|
||||
{(u16)0x0000, 0x20, 0x00},
|
||||
{(u16)JA_BGM_ELF, 0x24, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE, 0x09, 0x00},
|
||||
{(u16)JA_BGM_HOUSE_G, 0x09, 0x00},
|
||||
{(u16)JA_BGM_D_GANON_2, 0x18, 0x0A},
|
||||
{(u16)JA_BGM_D_GANON_1, 0x17, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)JA_BGM_SUB_DUNGEON, 0x26, 0x00},
|
||||
{(u16)0x0000, 0x00, 0x00},
|
||||
{(u16)0x0000, 0x00, 0x00},
|
||||
{(u16)0x0000, 0x00, 0x00},
|
||||
{(u16)0x0000, 0x00, 0x00},
|
||||
};
|
||||
|
||||
JAIZelBasic::scene_info_s JAIZelBasic::m_isle_info[] = {
|
||||
/* 0x00 */ {0x0000, 0x00, 0x00},
|
||||
/* 0x01 */ {JA_BGM_I_MAJU, 0x02, 0x0A},
|
||||
/* 0x02 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x03 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x04 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x05 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x06 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x07 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x08 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x09 */ {0x0000, 0x2B, 0x06},
|
||||
/* 0x0A */ {0x0000, 0x1A, 0x06},
|
||||
/* 0x0B */ {JA_BGM_ISLAND_TAURA, 0x0B, 0x00},
|
||||
/* 0x0C */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x0D */ {JA_BGM_ISLAND_DRAGON, 0x19, 0x06},
|
||||
/* 0x0E */ {0x0000, 0x15, 0x06},
|
||||
/* 0x0F */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x10 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x11 */ {0x0000, 0x11, 0x06},
|
||||
/* 0x12 */ {0x0000, 0x21, 0x06},
|
||||
/* 0x13 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x14 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x15 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x16 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x17 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x18 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x19 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x1A */ {0x0000, 0x10, 0x06},
|
||||
/* 0x1B */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x1C */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x1D */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x1E */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x1F */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x20 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x21 */ {0x0000, 0x13, 0x06},
|
||||
/* 0x22 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x23 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x24 */ {0x0000, 0x13, 0x06},
|
||||
/* 0x25 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x26 */ {0x0000, 0x21, 0x06},
|
||||
/* 0x27 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x28 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x29 */ {JA_BGM_ISLAND_WOOD, 0x0F, 0x00},
|
||||
/* 0x2A */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x2B */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x2C */ {JA_BGM_ISLAND_LINK, 0x0A, 0x06},
|
||||
/* 0x2D */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x2E */ {0x0000, 0x24, 0x06},
|
||||
/* 0x2F */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x30 */ {0x0000, 0x15, 0x06},
|
||||
/* 0x31 */ {0x0000, 0x0A, 0x06},
|
||||
/* 0x00 */ {(u16)0x0000, 0x00, 0x00},
|
||||
/* 0x01 */ {(u16)JA_BGM_I_MAJU, 0x02, 0x0A},
|
||||
/* 0x02 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x03 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x04 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x05 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x06 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x07 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x08 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x09 */ {(u16)0x0000, 0x2B, 0x06},
|
||||
/* 0x0A */ {(u16)0x0000, 0x1A, 0x06},
|
||||
/* 0x0B */ {(u16)JA_BGM_ISLAND_TAURA, 0x0B, 0x00},
|
||||
/* 0x0C */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x0D */ {(u16)JA_BGM_ISLAND_DRAGON, 0x19, 0x06},
|
||||
/* 0x0E */ {(u16)0x0000, 0x15, 0x06},
|
||||
/* 0x0F */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x10 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x11 */ {(u16)0x0000, 0x11, 0x06},
|
||||
/* 0x12 */ {(u16)0x0000, 0x21, 0x06},
|
||||
/* 0x13 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x14 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x15 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x16 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x17 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x18 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x19 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x1A */ {(u16)0x0000, 0x10, 0x06},
|
||||
/* 0x1B */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x1C */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x1D */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x1E */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x1F */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x20 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x21 */ {(u16)0x0000, 0x13, 0x06},
|
||||
/* 0x22 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x23 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x24 */ {(u16)0x0000, 0x13, 0x06},
|
||||
/* 0x25 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x26 */ {(u16)0x0000, 0x21, 0x06},
|
||||
/* 0x27 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x28 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x29 */ {(u16)JA_BGM_ISLAND_WOOD, 0x0F, 0x00},
|
||||
/* 0x2A */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x2B */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x2C */ {(u16)JA_BGM_ISLAND_LINK, 0x0A, 0x06},
|
||||
/* 0x2D */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x2E */ {(u16)0x0000, 0x24, 0x06},
|
||||
/* 0x2F */ {(u16)0x0000, 0x0A, 0x06},
|
||||
/* 0x30 */ {(u16)0x0000, 0x15, 0x06},
|
||||
/* 0x31 */ {(u16)0x0000, 0x0A, 0x06},
|
||||
};
|
||||
|
||||
const char* JAIZelBasic::spot_dir_name[] = {
|
||||
|
||||
@@ -82,7 +82,7 @@ s16 daNpc_kam_c::XyCheckCB(int i_itemBtn) {
|
||||
}
|
||||
|
||||
/* 000002A4-000004F0 .text callDemoStartCheck__11daNpc_kam_cFv */
|
||||
int daNpc_kam_c::callDemoStartCheck() {
|
||||
BOOL daNpc_kam_c::callDemoStartCheck() {
|
||||
if (l_demo_start_chk_cnt != 0) {
|
||||
return l_demo_start_chk_flag;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ int daNpc_kam_c::callDemoStartCheck() {
|
||||
mDescendStartAngle.set(0x1555, angle + 0x8000, 0);
|
||||
mLinChk.OffBackFlag();
|
||||
l_demo_start_chk_flag = 1;
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ int daNpc_kam_c::callDemoStartCheck() {
|
||||
|
||||
mLinChk.OffBackFlag();
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 0000052C-0000054C .text daNpc_kam_XyEventCB__FPvi */
|
||||
|
||||
@@ -151,7 +151,11 @@ static s16 daObjMknjD_XyEventCB(void* i_this, int i_param2) {
|
||||
|
||||
/* 000002F0-00000314 .text XyCheckCB__Q210daObjMknjD5Act_cFi */
|
||||
s16 daObjMknjD::Act_c::XyCheckCB(int i_itemBtn) {
|
||||
return dComIfGp_getSelectItem(i_itemBtn) == dItem_WIND_WAKER_e ? 1 : 0;
|
||||
if (dComIfGp_getSelectItem(i_itemBtn) == dItem_WIND_WAKER_e) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000314-0000031C .text XyEventCB__Q210daObjMknjD5Act_cFi */
|
||||
|
||||
@@ -1639,7 +1639,7 @@ BOOL daShip_c::procSteerMove() {
|
||||
mFwdVel > 16.5f) {
|
||||
if (!checkForceMove() && windPower >= 11.0f) {
|
||||
onStateFlg(daSFLG_JUMP_OK_e);
|
||||
if (g_mDoCPd_cpadInfo[0].mTrigLockR) {
|
||||
if (mDoCPd_R_LOCK_TRIGGER(0)) {
|
||||
onStateFlg((daSHIP_SFLG)(daSFLG_FLY_e | daSFLG_JUMP_e));
|
||||
speed.y = windPower;
|
||||
if (speed.y < 15.0f) {
|
||||
@@ -1733,7 +1733,7 @@ BOOL daShip_c::procCannon() {
|
||||
cLib_addCalcAngleS(&m0396, cM_atan2s(-cannonPos.y, cannonPos.absXZ()) + 0x4000, 5, 0x180, 0x40);
|
||||
cLib_addCalcAngleS(&m0394, cM_atan2s(cannonPos.x, cannonPos.z) - shape_angle.y, 5, 0x180, 0x40);
|
||||
|
||||
} else if (!g_mDoCPd_cpadInfo[0].mHoldLockR) {
|
||||
} else if (!mDoCPd_R_LOCK_BUTTON(0)) {
|
||||
float adjust = mStickMVal * (m0404 * 4.0f + 1.0f);
|
||||
m0396 += (adjust * 384.0f) * cM_scos(mStickMAng);
|
||||
m0394 += (s16)((adjust * 384.0f) * cM_ssin(mStickMAng));
|
||||
@@ -1767,7 +1767,7 @@ BOOL daShip_c::procCannon() {
|
||||
m037A--;
|
||||
}
|
||||
|
||||
if (g_mDoCPd_cpadInfo[0].mHoldLockR) {
|
||||
if (mDoCPd_R_LOCK_BUTTON(0)) {
|
||||
setSelfMove(1);
|
||||
} else {
|
||||
setSelfMove(0);
|
||||
@@ -1890,7 +1890,7 @@ BOOL daShip_c::procCrane() {
|
||||
}
|
||||
}
|
||||
cLib_chaseAngleS(&m039C, sVar3, 0x100);
|
||||
if (mRopeCnt == 20 && !g_mDoCPd_cpadInfo[0].mHoldLockR && mStickMVal > 0.1f) {
|
||||
if (mRopeCnt == 20 && !mDoCPd_R_LOCK_BUTTON(0) && mStickMVal > 0.1f) {
|
||||
sVar2 = mCraneBaseAngle;
|
||||
if ((mStickMAng < -0x2000) && (mStickMAng > -0x6000)) {
|
||||
mCraneBaseAngle = 0x3000;
|
||||
@@ -1911,7 +1911,7 @@ BOOL daShip_c::procCrane() {
|
||||
cLib_chaseAngleS(&m03A6, 0x1800, 0x100);
|
||||
cLib_addCalcAngleS(&m0398, mCraneBaseAngle, 5, m03A6, 0x100);
|
||||
}
|
||||
if (g_mDoCPd_cpadInfo[0].mHoldLockR && mRopeCnt == 20) {
|
||||
if (mDoCPd_R_LOCK_BUTTON(0) && mRopeCnt == 20) {
|
||||
setSelfMove(1);
|
||||
if (cM_rnd() < 0.5f) {
|
||||
m0353 = 1;
|
||||
|
||||
+109
-124
@@ -9,27 +9,26 @@
|
||||
#include "d/d_s_play.h"
|
||||
#include "SSystem/SComponent/c_angle.h"
|
||||
#include "d/res/res_always.h"
|
||||
#include "f_op/f_op_camera.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
|
||||
s32 dAttention_c::loc_type_num = 3;
|
||||
u32 dAttention_c::act_type_num = 5;
|
||||
|
||||
dAttention_c::LocTbl dAttention_c::loc_type_tbl[3] = {
|
||||
{ 0, 1 },
|
||||
{ 1, 2 },
|
||||
{ 2, 4 },
|
||||
{ fopAc_Attn_TYPE_MISC_e, fopAc_Attn_LOCKON_MISC_e },
|
||||
{ fopAc_Attn_TYPE_TALK_e, fopAc_Attn_LOCKON_TALK_e },
|
||||
{ fopAc_Attn_TYPE_BATTLE_e, fopAc_Attn_LOCKON_BATTLE_e },
|
||||
};
|
||||
|
||||
dAttention_c::LocTbl dAttention_c::act_type_tbl[5] = {
|
||||
{ 3, 0x08 },
|
||||
{ 4, 0x10 },
|
||||
{ 5, 0x20 },
|
||||
{ 6, 0x40 },
|
||||
{ 7, 0x80 },
|
||||
{ fopAc_Attn_TYPE_SPEAK_e, fopAc_Attn_ACTION_SPEAK_e },
|
||||
{ fopAc_Attn_TYPE_CARRY_e, fopAc_Attn_ACTION_CARRY_e },
|
||||
{ fopAc_Attn_TYPE_DOOR_e, fopAc_Attn_ACTION_DOOR_e },
|
||||
{ fopAc_Attn_TYPE_TREASURE_e, fopAc_Attn_ACTION_TREASURE_e },
|
||||
{ fopAc_Attn_TYPE_SHIP_e, fopAc_Attn_ACTION_SHIP_e },
|
||||
};
|
||||
|
||||
s32 dAttention_c::loc_type_num = ARRAY_SIZE(loc_type_tbl);
|
||||
u32 dAttention_c::act_type_num = ARRAY_SIZE(act_type_tbl);
|
||||
|
||||
/* 8009D220-8009D268 .text __ct__11dAttParam_cFl */
|
||||
dAttParam_c::dAttParam_c(s32) {
|
||||
field_0x04 = 45.0f;
|
||||
@@ -54,9 +53,9 @@ bool dAttDraw_CallBack_c::execute(u16 timing, J3DTransformInfo* xform) {
|
||||
}
|
||||
|
||||
/* 8009D2E0-8009D654 .text __ct__12dAttention_cFP10fopAc_ac_cUl */
|
||||
dAttention_c::dAttention_c(fopAc_ac_c* player, u32 playerNo) {
|
||||
mpPlayer = (daPy_lk_c*)player;
|
||||
mPlayerNo = playerNo;
|
||||
dAttention_c::dAttention_c(fopAc_ac_c* i_player, u32 i_padNo) {
|
||||
mpPlayer = (daPy_lk_c*)i_player;
|
||||
mPadNo = i_padNo;
|
||||
initList(0xFFFFFFFF);
|
||||
mFlagMask = 0;
|
||||
field_0x01c = -1;
|
||||
@@ -64,7 +63,7 @@ dAttention_c::dAttention_c(fopAc_ac_c* player, u32 playerNo) {
|
||||
mLockOnState = LockState_NONE;
|
||||
field_0x01a = 0;
|
||||
field_0x01b = 0;
|
||||
mLockOnTargetBsPcID = fpcM_ERROR_PROCESS_ID_e;
|
||||
mLockonTargetID = fpcM_ERROR_PROCESS_ID_e;
|
||||
heap = mDoExt_createSolidHeapFromGameToCurrent(0x3600, 0);
|
||||
JUT_ASSERT(0xb9, heap != NULL);
|
||||
|
||||
@@ -122,16 +121,16 @@ dAttention_c::~dAttention_c() {
|
||||
|
||||
/* 8009D6EC-8009D728 .text GetActionList__12dAttention_cFl */
|
||||
dAttList_c* dAttention_c::GetActionList(s32 idx) {
|
||||
if (mActionNum != 0)
|
||||
return &mActionList[(mActionOffs + idx) % mActionNum];
|
||||
if (mActionCount != 0)
|
||||
return &mActionList[(mActionOffset + idx) % mActionCount];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* 8009D728-8009D764 .text GetLockonList__12dAttention_cFl */
|
||||
dAttList_c* dAttention_c::GetLockonList(s32 idx) {
|
||||
if (mLockOnNum != 0)
|
||||
return &mLockOnList[(mLockOnOffs + idx) % mLockOnNum];
|
||||
if (mLockonCount != 0)
|
||||
return &mLockOnList[(mLockOnOffset + idx) % mLockonCount];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -146,10 +145,10 @@ dAttList_c* dAttention_c::getActionBtnB() {
|
||||
!(list->getActor()->attention_info.flags & fopAc_Attn_TALKFLAG_NOTALK_e))
|
||||
return list;
|
||||
|
||||
if (mActionNum == 0)
|
||||
if (mActionCount == 0)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < mActionNum; i++) {
|
||||
for (i = 0; i < mActionCount; i++) {
|
||||
if (mActionList[i].mType == fopAc_Attn_TYPE_SPEAK_e) {
|
||||
if (!(mActionList[i].getActor()->attention_info.flags & fopAc_Attn_TALKFLAG_NOTALK_e))
|
||||
return &mActionList[i];
|
||||
@@ -173,22 +172,22 @@ dAttList_c* dAttention_c::getActionBtnXYZ_local(int button) {
|
||||
}
|
||||
|
||||
return NULL;
|
||||
} else {
|
||||
if (mActionNum == 0)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < mActionNum; i++) {
|
||||
if (mActionList[i].mType == fopAc_Attn_TYPE_SPEAK_e) {
|
||||
fopAc_ac_c* actor = mActionList[i].getActor();
|
||||
if (actor->eventInfo.chkCondition(dEvtCnd_CANTALKITEM_e)) {
|
||||
if (actor->eventInfo.runXyCheckCB(actor, button))
|
||||
return &mActionList[i];
|
||||
}
|
||||
if (mActionCount == 0)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < mActionCount; i++) {
|
||||
if (mActionList[i].mType == fopAc_Attn_TYPE_SPEAK_e) {
|
||||
fopAc_ac_c* actor = mActionList[i].getActor();
|
||||
if (actor->eventInfo.chkCondition(dEvtCnd_CANTALKITEM_e)) {
|
||||
if (actor->eventInfo.runXyCheckCB(actor, button))
|
||||
return &mActionList[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* 8009D9A8-8009D9FC .text getActionBtnX__12dAttention_cFv */
|
||||
@@ -216,14 +215,14 @@ dAttList_c* dAttention_c::getActionBtnZ() {
|
||||
}
|
||||
|
||||
/* 8009DAA4-8009DAF4 .text chkAttMask__12dAttention_cFUlUl */
|
||||
s32 dAttention_c::chkAttMask(u32 type, u32 mask) {
|
||||
BOOL dAttention_c::chkAttMask(u32 type, u32 mask) {
|
||||
for (s32 i = 0; i < loc_type_num; i++) {
|
||||
if (type == loc_type_tbl[i].mType) {
|
||||
return mask & loc_type_tbl[i].mMask;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 8009DAF4-8009DB60 .text check_event_condition__FUlUs */
|
||||
@@ -258,9 +257,7 @@ s32 check_flontofplayer(u32 checkMask, s16 angle1, s16 angle2) {
|
||||
0x04, 0x01, 0x02, 0x08, 0x10, 0x20, 0x40, 0x80, 0x100,
|
||||
};
|
||||
static s16 ang_table[3] = {
|
||||
0x4000,
|
||||
0x2000,
|
||||
0x0AAA,
|
||||
0x4000, 0x2000, 0x0AAA,
|
||||
};
|
||||
static s16 ang_table2[] = {
|
||||
0x0AAA, 0x2000, 0x2AAA, 0x4000, 0x4E38, 0x6000,
|
||||
@@ -384,9 +381,9 @@ f32 dAttention_c::calcWeight(int listType, fopAc_ac_c* actor, f32 distance, s16
|
||||
void dAttention_c::setLList(fopAc_ac_c* i_actor, f32 i_weight, f32 i_distance, u32 i_attnType) {
|
||||
if (i_weight > 0.0f) {
|
||||
int i, maxIndex;
|
||||
if (mLockOnNum < (s32)ARRAY_SIZE(mLockOnList)) {
|
||||
maxIndex = mLockOnNum;
|
||||
mLockOnNum++;
|
||||
if (mLockonCount < (s32)ARRAY_SIZE(mLockOnList)) {
|
||||
maxIndex = mLockonCount;
|
||||
mLockonCount++;
|
||||
} else {
|
||||
f32 bestWeight = 0.0f;
|
||||
for (i = 0, maxIndex = 0; i < (s32)ARRAY_SIZE(mLockOnList); i++) {
|
||||
@@ -410,9 +407,9 @@ void dAttention_c::setLList(fopAc_ac_c* i_actor, f32 i_weight, f32 i_distance, u
|
||||
void dAttention_c::setAList(fopAc_ac_c* i_actor, f32 i_weight, f32 i_distance, u32 i_attnType) {
|
||||
if (i_weight > 0.0f) {
|
||||
int i, maxIndex;
|
||||
if (mActionNum < (s32)ARRAY_SIZE(mActionList)) {
|
||||
maxIndex = mActionNum;
|
||||
mActionNum++;
|
||||
if (mActionCount < (s32)ARRAY_SIZE(mActionList)) {
|
||||
maxIndex = mActionCount;
|
||||
mActionCount++;
|
||||
} else {
|
||||
f32 bestWeight = 0.0f;
|
||||
for (i = 0, maxIndex = 0; i < (s32)ARRAY_SIZE(mActionList); i++) {
|
||||
@@ -442,15 +439,15 @@ void dAttention_c::initList(u32 flagMask) {
|
||||
mLockOnList[i].setActor(NULL);
|
||||
mLockOnList[i].mWeight = FLOAT_MAX;
|
||||
}
|
||||
mLockOnOffs = 0;
|
||||
mLockOnNum = 0;
|
||||
mLockOnOffset = 0;
|
||||
mLockonCount = 0;
|
||||
|
||||
for (i = 0; i < (s32)ARRAY_SIZE(mActionList); i++) {
|
||||
mActionList[i].setActor(NULL);
|
||||
mActionList[i].mWeight = FLOAT_MAX;
|
||||
}
|
||||
mActionOffs = 0;
|
||||
mActionNum = 0;
|
||||
mActionOffset = 0;
|
||||
mActionCount = 0;
|
||||
}
|
||||
|
||||
/* 8009E2CC-8009E2F8 .text select_attention__FP10fopAc_ac_cPv */
|
||||
@@ -462,7 +459,7 @@ int select_attention(fopAc_ac_c* pActor, void* i_attention) {
|
||||
/* 8009E2F8-8009E33C .text makeList__12dAttention_cFv */
|
||||
s32 dAttention_c::makeList() {
|
||||
fopAcIt_Executor((fopAcIt_ExecutorFunc)select_attention, this);
|
||||
return mLockOnNum + mActionNum;
|
||||
return mLockonCount + mActionCount;
|
||||
}
|
||||
|
||||
/* 8009E33C-8009E474 .text SelectAttention__12dAttention_cFP10fopAc_ac_c */
|
||||
@@ -496,8 +493,8 @@ void dAttention_c::sortList() {
|
||||
dAttList_c* list;
|
||||
|
||||
list = mLockOnList;
|
||||
for (i = 0; i < mLockOnNum - 1; i++) {
|
||||
for (j = i + 1; j < mLockOnNum; j++) {
|
||||
for (i = 0; i < mLockonCount - 1; i++) {
|
||||
for (j = i + 1; j < mLockonCount; j++) {
|
||||
if (list[i].mWeight > list[j].mWeight) {
|
||||
memcpy(&swap, &list[j], sizeof(dAttList_c));
|
||||
memcpy(&list[j], &list[i], sizeof(dAttList_c));
|
||||
@@ -507,8 +504,8 @@ void dAttention_c::sortList() {
|
||||
}
|
||||
|
||||
list = mActionList;
|
||||
for (i = 0; i < mActionNum - 1; i++) {
|
||||
for (j = i + 1; j < mActionNum; j++) {
|
||||
for (i = 0; i < mActionCount - 1; i++) {
|
||||
for (j = i + 1; j < mActionCount; j++) {
|
||||
if (list[i].mWeight > list[j].mWeight) {
|
||||
memcpy(&swap, &list[j], sizeof(dAttList_c));
|
||||
memcpy(&list[j], &list[i], sizeof(dAttList_c));
|
||||
@@ -541,30 +538,30 @@ fopAc_ac_c* dAttention_c::stockAttention(u32 interactMask) {
|
||||
|
||||
/* 8009E684-8009E728 .text nextAttention__12dAttention_cFUl */
|
||||
fopAc_ac_c *dAttention_c::nextAttention(u32 interactMask) {
|
||||
fopAc_ac_c * pTarget = fopAcM_SearchByID(mLockOnTargetBsPcID);
|
||||
fopAc_ac_c * pTarget = fopAcM_SearchByID(mLockonTargetID);
|
||||
initList(interactMask);
|
||||
if (makeList())
|
||||
sortList();
|
||||
|
||||
if (pTarget == mLockOnList[0].getActor() && mLockOnNum > 1)
|
||||
mLockOnOffs = 1;
|
||||
if (pTarget == mLockOnList[0].getActor() && mLockonCount > 1)
|
||||
mLockOnOffset = 1;
|
||||
|
||||
return LockonTarget(0);
|
||||
}
|
||||
|
||||
/* 8009E728-8009E764 .text freeAttention__12dAttention_cFv */
|
||||
s32 dAttention_c::freeAttention() {
|
||||
mLockOnOffs = 0;
|
||||
mLockOnNum = 0;
|
||||
mActionOffs = 0;
|
||||
mActionNum = 0;
|
||||
mLockOnOffset = 0;
|
||||
mLockonCount = 0;
|
||||
mActionOffset = 0;
|
||||
mActionCount = 0;
|
||||
initList(0xFFFFFFFF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 8009E764-8009E978 .text chaseAttention__12dAttention_cFv */
|
||||
bool dAttention_c::chaseAttention() {
|
||||
int offset = mLockOnOffs;
|
||||
int offset = mLockOnOffset;
|
||||
fopAc_ac_c* actor = mLockOnList[offset].getActor();
|
||||
|
||||
if (actor == NULL) {
|
||||
@@ -634,7 +631,7 @@ BOOL sound_attention(fopAc_ac_c* actor, void* userWork) {
|
||||
if (dist < 0.0f)
|
||||
return FALSE;
|
||||
if (dist < i_this->mEnemyDistance) {
|
||||
i_this->mEnemyBsPcId = fopAcM_GetID(actor);
|
||||
i_this->mEnemyID = fopAcM_GetID(actor);
|
||||
i_this->mEnemyDistance = dist;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -642,12 +639,11 @@ BOOL sound_attention(fopAc_ac_c* actor, void* userWork) {
|
||||
|
||||
/* 8009EAA4-8009EB38 .text runSoundProc__12dAttention_cFv */
|
||||
void dAttention_c::runSoundProc() {
|
||||
mEnemyBsPcId = fpcM_ERROR_PROCESS_ID_e;
|
||||
mEnemyID = fpcM_ERROR_PROCESS_ID_e;
|
||||
mEnemyDistance = 10000.0f;
|
||||
if (!chkFlag(AttnFlag_80000000)) {
|
||||
fopAcIt_Executor((fopAcIt_ExecutorFunc)sound_attention, this);
|
||||
fopAc_ac_c* actor = fopAcM_SearchByID(mEnemyBsPcId);
|
||||
if (actor != NULL) {
|
||||
if (fopAcM_SearchByID(mEnemyID) != NULL) {
|
||||
mDoAud_bgmNowBattle(mEnemyDistance * 0.1f);
|
||||
setFlag(AttnFlag_00000100);
|
||||
}
|
||||
@@ -680,7 +676,7 @@ void dAttention_c::runDrawProc() {
|
||||
draw[0].setAnm(ALWAYS_BCK_YJ_IN, ALWAYS_BPK_YJ_IN, J3DFrameCtrl::EMode_NONE);
|
||||
draw[1].setAnm(ALWAYS_BCK_YJ_OUT, ALWAYS_BPK_YJ_OUT, J3DFrameCtrl::EMode_NONE);
|
||||
setFlag(AttnFlag_40000000);
|
||||
} else if (mLockOnNum <= 0 && field_0x028 == 0) {
|
||||
} else if (mLockonCount <= 0 && field_0x028 == 0) {
|
||||
draw[0].setAnm(ALWAYS_BCK_YJ_OUT, ALWAYS_BPK_YJ_OUT, J3DFrameCtrl::EMode_NONE);
|
||||
field_0x028 = 1;
|
||||
setFlag(AttnFlag_40000000);
|
||||
@@ -697,7 +693,7 @@ void dAttention_c::runDrawProc() {
|
||||
result = draw[0].anm->play(NULL, 0, 0);
|
||||
if (result) {
|
||||
clrFlag(AttnFlag_40000000);
|
||||
field_0x028 = 0xff;
|
||||
field_0x028 = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -727,7 +723,7 @@ void dAttention_c::judgementButton() {
|
||||
} else {
|
||||
switch(field_0x01a) {
|
||||
case 0:
|
||||
if (!mDoCPd_L_LOCK_BUTTON(mPlayerNo)) {
|
||||
if (!mDoCPd_L_LOCK_BUTTON(mPadNo)) {
|
||||
break;
|
||||
}
|
||||
field_0x01a = 1;
|
||||
@@ -735,7 +731,7 @@ void dAttention_c::judgementButton() {
|
||||
case 1:
|
||||
field_0x01a = 2;
|
||||
case 2:
|
||||
if (!mDoCPd_L_LOCK_BUTTON(mPlayerNo)) {
|
||||
if (!mDoCPd_L_LOCK_BUTTON(mPadNo)) {
|
||||
field_0x01a = 0;
|
||||
}
|
||||
break;
|
||||
@@ -753,7 +749,7 @@ void dAttention_c::judgementTriggerProc() {
|
||||
}
|
||||
|
||||
/* 8009EED8-8009EF40 .text judgementLostCheck__12dAttention_cFv */
|
||||
int dAttention_c::judgementLostCheck() {
|
||||
BOOL dAttention_c::judgementLostCheck() {
|
||||
bool haveTarget = chaseAttention();
|
||||
if (haveTarget) {
|
||||
return false;
|
||||
@@ -767,25 +763,19 @@ int dAttention_c::judgementLostCheck() {
|
||||
|
||||
/* 8009EF40-8009F0A4 .text judgementStatusSw__12dAttention_cFUl */
|
||||
void dAttention_c::judgementStatusSw(u32 interactMask) {
|
||||
fpc_ProcID target;
|
||||
fopAc_ac_c *actor;
|
||||
|
||||
switch(mLockOnState) {
|
||||
case LockState_NONE:
|
||||
mLockOnTargetBsPcID = -1;
|
||||
mLockonTargetID = fpcM_ERROR_PROCESS_ID_e;
|
||||
stockAttention(interactMask);
|
||||
if (field_0x01a == 1) {
|
||||
judgementTriggerProc();
|
||||
}
|
||||
break;
|
||||
case LockState_LOCK:
|
||||
target = LockonTargetPId(0);
|
||||
mLockOnTargetBsPcID = target;
|
||||
mLockonTargetID = LockonTargetPId(0);
|
||||
if (field_0x01a == 1) {
|
||||
f32 stickY = g_mDoCPd_cpadInfo[mPlayerNo].mMainStickPosY;
|
||||
if (-0.9f < stickY &&
|
||||
(actor = nextAttention(interactMask), actor != 0) &&
|
||||
mLockOnNum > 1) {
|
||||
f32 stickY = g_mDoCPd_cpadInfo[mPadNo].mMainStickPosY;
|
||||
if (-0.9f < stickY && nextAttention(interactMask) != NULL && mLockonCount > 1) {
|
||||
setFlag(AttnFlag_00000008);
|
||||
} else {
|
||||
mLockOnState = LockState_RELEASE;
|
||||
@@ -802,8 +792,7 @@ void dAttention_c::judgementStatusSw(u32 interactMask) {
|
||||
judgementTriggerProc();
|
||||
}
|
||||
else {
|
||||
actor = LockonTarget(0);
|
||||
if (actor == NULL || !chkFlag(AttnFlag_40000000)) {
|
||||
if (LockonTarget(0) == NULL || !chkFlag(AttnFlag_40000000)) {
|
||||
mLockOnState = LockState_NONE;
|
||||
freeAttention();
|
||||
}
|
||||
@@ -816,15 +805,14 @@ void dAttention_c::judgementStatusSw(u32 interactMask) {
|
||||
void dAttention_c::judgementStatusHd(u32 interactMask) {
|
||||
switch(mLockOnState) {
|
||||
case LockState_NONE:
|
||||
mLockOnTargetBsPcID = -1;
|
||||
mLockonTargetID = fpcM_ERROR_PROCESS_ID_e;
|
||||
stockAttention(interactMask);
|
||||
if (field_0x01a == 1) {
|
||||
judgementTriggerProc();
|
||||
}
|
||||
break;
|
||||
case LockState_LOCK: {
|
||||
fpc_ProcID target = LockonTargetPId(0);
|
||||
mLockOnTargetBsPcID = target;
|
||||
mLockonTargetID = LockonTargetPId(0);
|
||||
s32 result = judgementLostCheck();
|
||||
if (result == 0 && field_0x01a == 0) {
|
||||
mLockOnState = LockState_RELEASE;
|
||||
@@ -860,7 +848,7 @@ bool dAttention_c::Run(u32 interactMask) {
|
||||
bool var = dComIfGs_getOptAttentionType() == 0;
|
||||
if (chkFlag(AttnFlag_00000080)) {
|
||||
mpPlayer = (daPy_lk_c*)dComIfGp_getPlayer(0);
|
||||
mPlayerNo = 0;
|
||||
mPadNo = 0;
|
||||
}
|
||||
runDebugDisp0();
|
||||
clrFlag(~(AttnFlag_80000000 | AttnFlag_40000000 | AttnFlag_20000000 | AttnFlag_10000000 | AttnFlag_08000000));
|
||||
@@ -871,7 +859,7 @@ bool dAttention_c::Run(u32 interactMask) {
|
||||
clrFlag(AttnFlag_20000000);
|
||||
clrFlag(AttnFlag_10000000);
|
||||
clrFlag(~(AttnFlag_80000000 | AttnFlag_40000000 | AttnFlag_20000000 | AttnFlag_10000000 | AttnFlag_08000000));
|
||||
mLockOnTargetBsPcID = -1;
|
||||
mLockonTargetID = fpcM_ERROR_PROCESS_ID_e;
|
||||
freeAttention();
|
||||
} else {
|
||||
judgementButton();
|
||||
@@ -882,14 +870,14 @@ bool dAttention_c::Run(u32 interactMask) {
|
||||
}
|
||||
|
||||
if (chkFlag(AttnFlag_10000000)) {
|
||||
if (!mDoCPd_L_LOCK_BUTTON(mPlayerNo)) {
|
||||
if (!mDoCPd_L_LOCK_BUTTON(mPadNo)) {
|
||||
if (chkFlag(AttnFlag_20000000)) {
|
||||
mDoAud_seStart(JA_SE_CAMERA_L_CANCEL);
|
||||
clrFlag(AttnFlag_20000000);
|
||||
}
|
||||
clrFlag(AttnFlag_10000000);
|
||||
}
|
||||
} else if (mDoCPd_L_LOCK_BUTTON(mPlayerNo)) {
|
||||
} else if (mDoCPd_L_LOCK_BUTTON(mPadNo)) {
|
||||
fopAc_ac_c *target = LockonTarget(0);
|
||||
if (target == NULL) {
|
||||
setFlag(AttnFlag_20000000 | AttnFlag_00000020);
|
||||
@@ -903,9 +891,9 @@ bool dAttention_c::Run(u32 interactMask) {
|
||||
runDrawProc();
|
||||
runDebugDisp();
|
||||
if (mLockOnState == LockState_LOCK) {
|
||||
dComIfGp_onCameraAttentionStatus(mPlayerNo, 1);
|
||||
dComIfGp_onCameraAttentionStatus(mPadNo, 1);
|
||||
} else {
|
||||
dComIfGp_offCameraAttentionStatus(mPlayerNo, 1);
|
||||
dComIfGp_offCameraAttentionStatus(mPadNo, 1);
|
||||
}
|
||||
|
||||
mHint.proc();
|
||||
@@ -918,7 +906,7 @@ bool dAttention_c::Run(u32 interactMask) {
|
||||
/* 8009F460-8009F5FC .text Draw__12dAttention_cFv */
|
||||
void dAttention_c::Draw() {
|
||||
Mtx invCamera;
|
||||
MTXInverse(dComIfGd_getViewRotMtx(), invCamera);
|
||||
cMtx_inverse(dComIfGd_getViewRotMtx(), invCamera);
|
||||
fopAc_ac_c *target = LockonTarget(0);
|
||||
if (dComIfGp_event_runCheck() || dComIfGp_getScopeMesgStatus() != 0)
|
||||
return;
|
||||
@@ -927,11 +915,11 @@ void dAttention_c::Draw() {
|
||||
draw[0].draw(target->attention_info.position, invCamera);
|
||||
}
|
||||
|
||||
if (mLockOnNum >= 2 && draw[1].mpAnmClr != NULL) {
|
||||
int listIdx = mLockOnOffs;
|
||||
if (mLockonCount >= 2 && draw[1].mpAnmClr != NULL) {
|
||||
int listIdx = mLockOnOffset;
|
||||
|
||||
if (mLockOnOffs == 0) {
|
||||
listIdx = mLockOnNum - 1;
|
||||
if (mLockOnOffset == 0) {
|
||||
listIdx = mLockonCount - 1;
|
||||
} else {
|
||||
listIdx--;
|
||||
}
|
||||
@@ -942,19 +930,16 @@ void dAttention_c::Draw() {
|
||||
}
|
||||
}
|
||||
|
||||
fpc_ProcID id = LockonTargetPId(0);
|
||||
mlockedOnPId = id;
|
||||
mDrawLockonTargetID = LockonTargetPId(0);
|
||||
mDrawAttnPos = target->attention_info.position;
|
||||
field_0x028 = 0;
|
||||
} else {
|
||||
if (field_0x028 > 0) {
|
||||
target = fopAcM_SearchByID(mlockedOnPId);
|
||||
if (target != NULL) {
|
||||
draw[0].draw(target->attention_info.position, invCamera);
|
||||
mDrawAttnPos = target->attention_info.position;
|
||||
} else {
|
||||
draw[0].draw(mDrawAttnPos, invCamera);
|
||||
}
|
||||
} else if (field_0x028 > 0) {
|
||||
target = fopAcM_SearchByID(mDrawLockonTargetID);
|
||||
if (target != NULL) {
|
||||
draw[0].draw(target->attention_info.position, invCamera);
|
||||
mDrawAttnPos = target->attention_info.position;
|
||||
} else {
|
||||
draw[0].draw(mDrawAttnPos, invCamera);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1008,12 +993,12 @@ void dAttDraw_c::draw(cXyz &pos, Mtx mtx) {
|
||||
|
||||
/* 8009F834-8009F88C .text LockonTarget__12dAttention_cFl */
|
||||
fopAc_ac_c* dAttention_c::LockonTarget(s32 idx) {
|
||||
if (idx >= mLockOnNum)
|
||||
if (idx >= mLockonCount)
|
||||
return NULL;
|
||||
|
||||
s32 listIdx = mLockOnOffs + idx;
|
||||
if (listIdx >= mLockOnNum)
|
||||
listIdx -= mLockOnNum;
|
||||
s32 listIdx = mLockOnOffset + idx;
|
||||
if (listIdx >= mLockonCount)
|
||||
listIdx -= mLockonCount;
|
||||
|
||||
return mLockOnList[listIdx].getActor();
|
||||
}
|
||||
@@ -1024,12 +1009,12 @@ f32 dAttention_c::LockonReleaseDistanse() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
fopAc_ac_c* actor = mLockOnList[mLockOnOffs].getActor();
|
||||
fopAc_ac_c* actor = mLockOnList[mLockOnOffset].getActor();
|
||||
if (actor == NULL) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
int idx = actor->attention_info.distances[mLockOnList[mLockOnOffs].mType];
|
||||
int idx = actor->attention_info.distances[mLockOnList[mLockOnOffset].mType];
|
||||
cSGlobe globe(actor->attention_info.position - mpPlayer->attention_info.position);
|
||||
cSAngle angle(globe.U() - fopAcM_GetShapeAngle_p(mpPlayer)->y);
|
||||
|
||||
@@ -1038,24 +1023,24 @@ f32 dAttention_c::LockonReleaseDistanse() {
|
||||
|
||||
/* 8009F980-8009F9B8 .text LockonTargetPId__12dAttention_cFl */
|
||||
fpc_ProcID dAttention_c::LockonTargetPId(s32 idx) {
|
||||
if (idx >= mLockOnNum)
|
||||
if (idx >= mLockonCount)
|
||||
return NULL;
|
||||
|
||||
s32 listIdx = mLockOnOffs + idx;
|
||||
if (listIdx >= mLockOnNum)
|
||||
listIdx -= mLockOnNum;
|
||||
s32 listIdx = mLockOnOffset + idx;
|
||||
if (listIdx >= mLockonCount)
|
||||
listIdx -= mLockonCount;
|
||||
|
||||
return mLockOnList[listIdx].getPid();
|
||||
}
|
||||
|
||||
/* 8009F9B8-8009FA10 .text ActionTarget__12dAttention_cFl */
|
||||
fopAc_ac_c* dAttention_c::ActionTarget(s32 idx) {
|
||||
if (idx >= mActionNum)
|
||||
if (idx >= mActionCount)
|
||||
return NULL;
|
||||
|
||||
s32 listIdx = mActionOffs + idx;
|
||||
if (listIdx >= mActionNum)
|
||||
listIdx -= mActionNum;
|
||||
s32 listIdx = mActionOffset + idx;
|
||||
if (listIdx >= mActionCount)
|
||||
listIdx -= mActionCount;
|
||||
|
||||
return mActionList[listIdx].getActor();
|
||||
}
|
||||
@@ -1119,7 +1104,7 @@ fopAc_ac_c* dAttCatch_c::convPId(fpc_ProcID i_procID) {
|
||||
|
||||
/* 8009FBBC-8009FBDC .text init__11dAttCatch_cFv */
|
||||
void dAttCatch_c::init() {
|
||||
mCatchItemNo = 0x56;
|
||||
mCatchItemNo = dItem_WATER_BOTTLE_e;
|
||||
mRequestActorID = fpcM_ERROR_PROCESS_ID_e;
|
||||
mCatghTargetID = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x4 = 3;
|
||||
@@ -1131,7 +1116,7 @@ void dAttCatch_c::proc() {
|
||||
mChangeItem = mCatchItemNo;
|
||||
mRequestActorID = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x4 = 3;
|
||||
mCatchItemNo = 0x56;
|
||||
mCatchItemNo = dItem_WATER_BOTTLE_e;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -535,8 +535,8 @@ void dCamera_c::updatePad() {
|
||||
mTriggerLeftDelta = mTriggerLeftLast - fVar1;
|
||||
mTriggerLeftLast = fVar1;
|
||||
|
||||
mHoldLockL = (bool)g_mDoCPd_cpadInfo[mPadId].mHoldLockL;
|
||||
mTrigLockL = (bool)g_mDoCPd_cpadInfo[mPadId].mTrigLockL;
|
||||
mHoldLockL = mDoCPd_L_LOCK_BUTTON(mPadId);
|
||||
mTrigLockL = mDoCPd_L_LOCK_TRIGGER(mPadId);
|
||||
|
||||
if (mTriggerLeftLast > mCamSetup.m0A0) {
|
||||
if (m19A == 0) {
|
||||
@@ -557,8 +557,8 @@ void dCamera_c::updatePad() {
|
||||
mTriggerRightDelta = mTriggerRightLast - fVar1;
|
||||
mTriggerRightLast = fVar1;
|
||||
|
||||
mHoldLockR = (bool)g_mDoCPd_cpadInfo[mPadId].mHoldLockR;
|
||||
mTrigLockR = (bool)g_mDoCPd_cpadInfo[mPadId].mTrigLockR;
|
||||
mHoldLockR = mDoCPd_R_LOCK_BUTTON(mPadId);
|
||||
mTrigLockR = mDoCPd_R_LOCK_TRIGGER(mPadId);
|
||||
|
||||
if (mTriggerRightLast > mCamSetup.m0A0) {
|
||||
if (m1A6 == 0) {
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
#include "m_Do/m_Do_printf.h"
|
||||
#include "math.h"
|
||||
|
||||
#include "weak_data_1811.h" // IWYU pragma: keep
|
||||
#include "weak_data_2100_2080.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/d_kankyo_dayproc.inc"
|
||||
|
||||
@@ -2093,7 +2093,7 @@ void dKy_event_proc() {
|
||||
static f32 S_wether_time_pat03[] = {5.0f, 12.5f, 5.0f};
|
||||
|
||||
static u8 S_wether_mode_pat04[] = {4, 0xFF};
|
||||
static f32 S_wether_time_pat04[] = {10.0f, 0.0f};
|
||||
static f32 S_wether_time_pat04[] = {10.0f};
|
||||
|
||||
dScnKy_env_light_c& env_light = dKy_getEnvlight();
|
||||
|
||||
|
||||
@@ -14,20 +14,6 @@
|
||||
JUTGamePad* g_mDoCPd_gamePad[4];
|
||||
interface_of_controller_pad g_mDoCPd_cpadInfo[4];
|
||||
|
||||
inline void mDoCPd_ANALOG_CONV(u8 analog, f32& param_1) {
|
||||
param_1 = analog * (1.0f / 15.0f);
|
||||
if (param_1 > 1.0f) {
|
||||
param_1 = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
inline void mDoCPd_TRIGGER_CONV(u8 analog, f32& param_1) {
|
||||
param_1 = analog * 0.0071428571827709675f;
|
||||
if (param_1 > 1.0f) {
|
||||
param_1 = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80007598-800078C0 .text mDoCPd_Convert__FP27interface_of_controller_padP10JUTGamePad */
|
||||
static s32 mDoCPd_Convert(interface_of_controller_pad* pInterface, JUTGamePad* pPad) {
|
||||
pInterface->mButtonHold.up = pPad->mButton.mButton & CButton::DPAD_UP;
|
||||
|
||||
Reference in New Issue
Block a user