mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_a_tbox2 done, f_op_actor_mng cleanup, cleanup fopAc_ac_c member names (#2084)
This commit is contained in:
@@ -921,9 +921,9 @@ cPhs__Step daNpcAsh_c::Create() {
|
||||
|
||||
fopAcM_SetMtx(this, mMcaMorf->getModel()->getBaseTRMtx());
|
||||
fopAcM_setCullSizeBox(this, -100.0f, -50.0f, -100.0f, 100.0f, 220.0f, 100.0f);
|
||||
mZ2.init(¤t.pos, &mEyePos, 3, 1);
|
||||
mZ2.init(¤t.pos, &eyePos, 3, 1);
|
||||
mAcchCir.SetWall(daNpcAsh_Param_c::m.m1C, daNpcAsh_Param_c::m.m18);
|
||||
mAcch.Set(&fopAcM_GetPosition_p(this), &fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, &fopAcM_GetSpeed_p(this), &fopAcM_GetAngle_p(this), &fopAcM_GetShapeAngle_p(this));
|
||||
mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this));
|
||||
mAcch.SetRoofNone();
|
||||
mAcch.SetWaterNone();
|
||||
mAcch.CrrPos(dComIfG_Bgsp());
|
||||
@@ -1153,11 +1153,11 @@ int daNpcAsh_c::Draw() {
|
||||
mMcaMorf->getModel()->getModelData()->getMaterialNodePointer(2)->setMaterialAnm(mpMatAnm);
|
||||
draw(0, 0, daNpcAsh_Param_c::m.mShadow, NULL, 0);
|
||||
if (field_0xf60 == 1) {
|
||||
g_env_light.setLightTevColorType_MAJI(mModelBow->mModelData, &mTevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(mModelBow->mModelData, &tevStr);
|
||||
mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(16));
|
||||
mModelBow->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoExt_modelUpdateDL(mModelBow);
|
||||
g_env_light.setLightTevColorType_MAJI(mModelQuiver->mModelData, &mTevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(mModelQuiver->mModelData, &tevStr);
|
||||
mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(2));
|
||||
mModelQuiver->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoExt_modelUpdateDL(mModelQuiver);
|
||||
@@ -1382,10 +1382,10 @@ void daNpcAsh_c::reset() {
|
||||
mLookMode = -1;
|
||||
field_0xf5c = 0;
|
||||
mGravity = daNpcAsh_Param_c::m.mGravity;
|
||||
current.pos = orig.pos;
|
||||
next.pos = current.pos;
|
||||
current.angle.set(0, orig.angle.y, 0);
|
||||
next.angle = current.angle;
|
||||
current.pos = home.pos;
|
||||
old.pos = current.pos;
|
||||
current.angle.set(0, home.angle.y, 0);
|
||||
old.angle = current.angle;
|
||||
shape_angle = current.angle;
|
||||
field_0x8f0 = current.angle;
|
||||
field_0x8f6 = field_0x8f0;
|
||||
@@ -1816,7 +1816,7 @@ bool daNpcAsh_c::wait_type0(void* param_0) {
|
||||
setExpression(7, -1.0f);
|
||||
if (!isMap()) {
|
||||
setMotion(0, -1.0f, false);
|
||||
} else if (field_0x8f0.y == orig.angle.y) {
|
||||
} else if (field_0x8f0.y == home.angle.y) {
|
||||
setMotion(1, -1.0f, false);
|
||||
}
|
||||
field_0x96c = 0;
|
||||
@@ -1844,8 +1844,8 @@ bool daNpcAsh_c::wait_type0(void* param_0) {
|
||||
} else {
|
||||
setLookMode(0, NULL);
|
||||
}
|
||||
if (orig.angle.y != field_0x8f0.y) {
|
||||
if (step(orig.angle.y, true)) {
|
||||
if (home.angle.y != field_0x8f0.y) {
|
||||
if (step(home.angle.y, true)) {
|
||||
setExpression(7, -1.0f);
|
||||
if (!isMap()) {
|
||||
setMotion(0, -1.0f, false);
|
||||
@@ -1857,7 +1857,7 @@ bool daNpcAsh_c::wait_type0(void* param_0) {
|
||||
}
|
||||
daTag_EvtArea_c* evtArea = (daTag_EvtArea_c*)mActorMngr[5].getActorP();
|
||||
if (evtArea != NULL) {
|
||||
if (evtArea->chkPointInArea(fopAcM_GetPosition_p(daPy_getPlayerActorClass()))) {
|
||||
if (evtArea->chkPointInArea(*fopAcM_GetPosition_p(daPy_getPlayerActorClass()))) {
|
||||
daNpcF_offTmpBit(11);
|
||||
mOrderEvtNo = 2;
|
||||
fopAcM_delete(evtArea);
|
||||
@@ -1865,8 +1865,8 @@ bool daNpcAsh_c::wait_type0(void* param_0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (field_0x8f0.y != orig.angle.y) {
|
||||
if (step(orig.angle.y, true)) {
|
||||
if (field_0x8f0.y != home.angle.y) {
|
||||
if (step(home.angle.y, true)) {
|
||||
if (!isMap()) {
|
||||
setMotion(0, -1.0f, false);
|
||||
} else {
|
||||
@@ -1876,7 +1876,7 @@ bool daNpcAsh_c::wait_type0(void* param_0) {
|
||||
}
|
||||
}
|
||||
if (i_dComIfGp_event_runCheck()) {
|
||||
if (mEvtInfo.checkCommandTalk()) {
|
||||
if (eventInfo.checkCommandTalk()) {
|
||||
if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) {
|
||||
if (isSneaking()) {
|
||||
mOrderEvtNo = 3;
|
||||
@@ -1892,7 +1892,7 @@ bool daNpcAsh_c::wait_type0(void* param_0) {
|
||||
}
|
||||
} else {
|
||||
if (mOrderEvtNo != 0) {
|
||||
mEvtInfo.setArchiveName("Ash");
|
||||
eventInfo.setArchiveName("Ash");
|
||||
}
|
||||
orderEvent(mMapToolId, mOrderEvtNo != 0 ? l_evtNames[mOrderEvtNo] : NULL, -1, 40, -1, 1);
|
||||
}
|
||||
@@ -1970,7 +1970,7 @@ bool daNpcAsh_c::wait_type1(void* param_0) {
|
||||
case 0:
|
||||
if (daNpcF_chkTmpBit(0x76)) {
|
||||
current.pos.set(-4300.0f, 0.0f, 8627.657f);
|
||||
next.pos = current.pos;
|
||||
old.pos = current.pos;
|
||||
setAngle(-0x6000);
|
||||
field_0xf54++;
|
||||
}
|
||||
@@ -2076,7 +2076,7 @@ bool daNpcAsh_c::demo(void* param_0) {
|
||||
field_0xf5c = 2;
|
||||
// no break
|
||||
case 2:
|
||||
if (i_dComIfGp_event_runCheck() && !mEvtInfo.checkCommandTalk()) {
|
||||
if (i_dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) {
|
||||
s32 cutIndex = i_dComIfGp_getEventManager().getMyStaffId(l_myName, NULL, 0);
|
||||
if (cutIndex != -1) {
|
||||
mCutIndex = cutIndex;
|
||||
@@ -2088,7 +2088,7 @@ bool daNpcAsh_c::demo(void* param_0) {
|
||||
i_dComIfGp_getEventManager().cutEnd(cutIndex);
|
||||
}
|
||||
}
|
||||
if (mEvtInfo.checkCommandDemoAccrpt() && field_0x9d4 != -1 && i_dComIfGp_getEventManager().endCheck(field_0x9d4)) {
|
||||
if (eventInfo.checkCommandDemoAccrpt() && field_0x9d4 != -1 && i_dComIfGp_getEventManager().endCheck(field_0x9d4)) {
|
||||
i_dComIfGp_event_reset();
|
||||
mOrderEvtNo = 0;
|
||||
field_0x9d4 = -1;
|
||||
@@ -2448,21 +2448,21 @@ asm void calc__11J3DTexNoAnmCFPUs() {
|
||||
// literals
|
||||
void daNpcAsh_c::setParam() {
|
||||
searchActors();
|
||||
mAttentionInfo.mFlags = 0xa;
|
||||
attention_info.flags = 0xa;
|
||||
if (isSneaking()) {
|
||||
mAttentionInfo.field_0x0[0] = 0x4e;
|
||||
mAttentionInfo.field_0x0[1] = mAttentionInfo.field_0x0[0];
|
||||
mAttentionInfo.field_0x0[3] = 0x4d;
|
||||
mAttentionInfo.mFlags |= 0x800000;
|
||||
attention_info.field_0x0[0] = 0x4e;
|
||||
attention_info.field_0x0[1] = attention_info.field_0x0[0];
|
||||
attention_info.field_0x0[3] = 0x4d;
|
||||
attention_info.flags |= 0x800000;
|
||||
} else {
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "R_SP116")) {
|
||||
mAttentionInfo.field_0x0[0] = getDistTableIdx(3, 6);
|
||||
mAttentionInfo.field_0x0[1] = mAttentionInfo.field_0x0[0];
|
||||
mAttentionInfo.field_0x0[3] = getDistTableIdx(2, 6);
|
||||
attention_info.field_0x0[0] = getDistTableIdx(3, 6);
|
||||
attention_info.field_0x0[1] = attention_info.field_0x0[0];
|
||||
attention_info.field_0x0[3] = getDistTableIdx(2, 6);
|
||||
} else {
|
||||
mAttentionInfo.field_0x0[0] = getDistTableIdx(daNpcAsh_Param_c::m.m4C, daNpcAsh_Param_c::m.m4E);
|
||||
mAttentionInfo.field_0x0[1] = mAttentionInfo.field_0x0[0];
|
||||
mAttentionInfo.field_0x0[3] = getDistTableIdx(daNpcAsh_Param_c::m.m48, daNpcAsh_Param_c::m.m4A);
|
||||
attention_info.field_0x0[0] = getDistTableIdx(daNpcAsh_Param_c::m.m4C, daNpcAsh_Param_c::m.m4E);
|
||||
attention_info.field_0x0[1] = attention_info.field_0x0[0];
|
||||
attention_info.field_0x0[3] = getDistTableIdx(daNpcAsh_Param_c::m.m48, daNpcAsh_Param_c::m.m4A);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2482,7 +2482,7 @@ BOOL daNpcAsh_c::main() {
|
||||
if (mpActionFn != NULL) {
|
||||
(this->*mpActionFn)(NULL);
|
||||
}
|
||||
if (i_dComIfGp_event_runCheck() != 0 && !mEvtInfo.checkCommandTalk() && mItemPartnerId != -1) {
|
||||
if (i_dComIfGp_event_runCheck() != 0 && !eventInfo.checkCommandTalk() && mItemPartnerId != -1) {
|
||||
dComIfGp_event_setItemPartnerId(mItemPartnerId);
|
||||
mItemPartnerId = -1;
|
||||
}
|
||||
@@ -2596,14 +2596,14 @@ void daNpcAsh_c::setAttnPos() {
|
||||
cXyz vec(10.0f, 10.0f, 0.0f);
|
||||
mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(4));
|
||||
mDoMtx_stack_c::multVecZero(&mHeadPos);
|
||||
mDoMtx_stack_c::multVec(&vec, &mEyePos);
|
||||
mDoMtx_stack_c::multVec(&vec, &eyePos);
|
||||
vec.x = 0.0f;
|
||||
mDoMtx_stack_c::multVec(&vec, &vec);
|
||||
field_0x902.x = cLib_targetAngleX(&mHeadPos, &vec);
|
||||
field_0x902.y = cLib_targetAngleY(&mHeadPos, &vec);
|
||||
cXyz* attnPos = mLookat.getAttnPos();
|
||||
if (attnPos != NULL) {
|
||||
cXyz local_48 = *attnPos - mEyePos;
|
||||
cXyz local_48 = *attnPos - eyePos;
|
||||
field_0x8fc.y = -(field_0x91a[2].y + field_0x8f0.y);
|
||||
field_0x8fc.y += cM_atan2s(local_48.x, local_48.z);
|
||||
field_0x8fc.x = -cM_atan2s(local_48.y, local_48.absXZ());
|
||||
@@ -2612,7 +2612,7 @@ void daNpcAsh_c::setAttnPos() {
|
||||
field_0x8fc.y = 0;
|
||||
field_0x8fc.x = 0;
|
||||
}
|
||||
mAttentionInfo.mPosition.set(mHeadPos.x, mHeadPos.y + 35.0f, mHeadPos.z);
|
||||
attention_info.position.set(mHeadPos.x, mHeadPos.y + 35.0f, mHeadPos.z);
|
||||
cXyz center;
|
||||
mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(2));
|
||||
mDoMtx_stack_c::multVecZero(¢er);
|
||||
@@ -2705,7 +2705,7 @@ void daNpcAsh_c::lookat() {
|
||||
break;
|
||||
}
|
||||
if (actor != NULL) {
|
||||
mLookPos = actor->mAttentionInfo.mPosition;
|
||||
mLookPos = actor->attention_info.position;
|
||||
if (mLookMode != 2 && mLookMode != 3) {
|
||||
mLookPos.y -= 40.0f;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ extern "C" extern char const* const d_a_npc_ne__stringBase0;
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void fopAcM_riverStream__FP4cXyzPsPff();
|
||||
extern "C" void mDoMtx_XrotM__FPA4_fs();
|
||||
extern "C" void mDoMtx_YrotS__FPA4_fs();
|
||||
extern "C" void mDoMtx_YrotM__FPA4_fs();
|
||||
@@ -485,7 +486,7 @@ SECTION_DATA extern void* __vt__14daNpc_Ne_HIO_c[3] = {
|
||||
// matches with literals
|
||||
daNpc_Ne_HIO_c::daNpc_Ne_HIO_c() :
|
||||
field_0x04(-1),
|
||||
mScale(1.0f),
|
||||
scale(1.0f),
|
||||
mWalkSpeed(2.5f),
|
||||
mRunSpeed(12.0f),
|
||||
field_0x14(2.0f),
|
||||
@@ -619,11 +620,11 @@ static int daNpc_Ne_Draw(npc_ne_class* i_this) {
|
||||
if (!dComIfGs_wolfeye_effect_check()) {
|
||||
return 1;
|
||||
}
|
||||
g_env_light.settingTevStruct(4, &i_this->current.pos, &i_this->mTevStr);
|
||||
g_env_light.settingTevStruct(4, &i_this->current.pos, &i_this->tevStr);
|
||||
} else {
|
||||
g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->mTevStr);
|
||||
g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr);
|
||||
}
|
||||
g_env_light.setLightTevColorType_MAJI(model->mModelData, &i_this->mTevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model->mModelData, &i_this->tevStr);
|
||||
|
||||
i_this->mpBtkAnm->entry(model->getModelData());
|
||||
i_this->mpBtpAnm->entry(model->getModelData());
|
||||
@@ -633,14 +634,14 @@ static int daNpc_Ne_Draw(npc_ne_class* i_this) {
|
||||
cXyz vec(i_this->current.pos.x, i_this->current.pos.y + 100.0f, i_this->current.pos.z);
|
||||
i_this->mShadowKey = dComIfGd_setShadow(
|
||||
i_this->mShadowKey, 1, model, &vec, 0.0f, 400.0f, i_this->current.pos.y,
|
||||
i_this->mAcch.GetGroundH(), i_this->mAcch.m_gnd, &i_this->mTevStr,
|
||||
i_this->mAcch.GetGroundH(), i_this->mAcch.m_gnd, &i_this->tevStr,
|
||||
0, 1.0f, dDlst_shadowControl_c::getSimpleTex()
|
||||
);
|
||||
}
|
||||
|
||||
if (i_this->field_0x5b4 == 3) {
|
||||
g_env_light.setLightTevColorType_MAJI(i_this->mpDishMorf->getModel()->mModelData,
|
||||
&i_this->mTevStr);
|
||||
&i_this->tevStr);
|
||||
i_this->mpDishMorf->entryDL();
|
||||
}
|
||||
|
||||
@@ -1124,9 +1125,9 @@ static fopAc_ac_c* search_bird(npc_ne_class* i_this) {
|
||||
while (i < target_info_count) {
|
||||
fopAc_ac_c* actor = target_info[i];
|
||||
cXyz eye_delta, delta;
|
||||
eye_delta.x = actor->current.pos.x - i_this->mEyePos.x;
|
||||
eye_delta.y = actor->current.pos.y + 50.0f - i_this->mEyePos.y;
|
||||
eye_delta.z = actor->current.pos.z - i_this->mEyePos.z;
|
||||
eye_delta.x = actor->current.pos.x - i_this->eyePos.x;
|
||||
eye_delta.y = actor->current.pos.y + 50.0f - i_this->eyePos.y;
|
||||
eye_delta.z = actor->current.pos.z - i_this->eyePos.z;
|
||||
delta.x = actor->current.pos.x - i_this->current.pos.x;
|
||||
delta.z = actor->current.pos.z - i_this->current.pos.z;
|
||||
f32 eye_dist = JMAFastSqrt(eye_delta.x * eye_delta.x + eye_delta.z * eye_delta.z);
|
||||
@@ -1135,7 +1136,7 @@ static fopAc_ac_c* search_bird(npc_ne_class* i_this) {
|
||||
if (target_bgc[i] || other_bg_check(i_this, actor)) {
|
||||
target_bgc[i] = true;
|
||||
} else {
|
||||
if (fabsf(actor->current.pos.y + 50.0f - i_this->mEyePos.y) <= 100.0f) {
|
||||
if (fabsf(actor->current.pos.y + 50.0f - i_this->eyePos.y) <= 100.0f) {
|
||||
s16 angle = i_this->shape_angle.y - cM_atan2s(eye_delta.x, eye_delta.z);
|
||||
if (angle < 0x4000 && angle > -0x4000) {
|
||||
return actor;
|
||||
@@ -2770,7 +2771,7 @@ static int npc_ne_home(npc_ne_class* i_this) {
|
||||
i_this->current.pos.x = home_path[i_this->mHomePathIdx].mPosition.x;
|
||||
i_this->current.pos.y = home_path[i_this->mHomePathIdx].mPosition.y;
|
||||
i_this->current.pos.z = home_path[i_this->mHomePathIdx].mPosition.z;
|
||||
i_this->next.pos = i_this->current.pos;
|
||||
i_this->old.pos = i_this->current.pos;
|
||||
anm_init(i_this, npc_ne_class::ANM_TO_JUMP, 5.0f, 0, 1.0f);
|
||||
i_this->mState = 11;
|
||||
i_this->mHomePathIdx = home_path_search(i_this, 0);
|
||||
@@ -2851,7 +2852,7 @@ static int npc_ne_home(npc_ne_class* i_this) {
|
||||
i_this->current.pos.x = home_path[i_this->mHomePathIdx].mPosition.x;
|
||||
i_this->current.pos.y = home_path[i_this->mHomePathIdx].mPosition.y;
|
||||
i_this->current.pos.z = home_path[i_this->mHomePathIdx].mPosition.z;
|
||||
i_this->next.pos = i_this->current.pos;
|
||||
i_this->old.pos = i_this->current.pos;
|
||||
i_this->field_0xcb4 = 1;
|
||||
i_this->field_0xc5e = 0x7a;
|
||||
}
|
||||
@@ -2869,7 +2870,7 @@ static int npc_ne_home(npc_ne_class* i_this) {
|
||||
target_speed = l_HIO.mRunSpeed * 1.5f;
|
||||
ret = 0;
|
||||
i_this->speed.y = 0.0f;
|
||||
i_this->mGravity = 0.0f;
|
||||
i_this->gravity = 0.0f;
|
||||
vec.x = home_path[0].mPosition.x;
|
||||
vec.z = home_path[0].mPosition.z;
|
||||
vec -= i_this->current.pos;
|
||||
@@ -3135,7 +3136,7 @@ static void npc_ne_swim(npc_ne_class* i_this) {
|
||||
cLib_addCalc2(&i_this->speedF, l_HIO.mSwimSpeed, 1.0f, 0.1f);
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 0x20, max_angle_step);
|
||||
i_this->speed.y = 0.0f;
|
||||
i_this->mGravity = 0.0f;
|
||||
i_this->gravity = 0.0f;
|
||||
cLib_addCalc2(&i_this->current.pos.y,
|
||||
i_this->field_0x6bc - i_this->mBaseScale.z * 45.0f, 1.0f, 5.0f);
|
||||
if (i_this->mTimers[1] == 0 && i_this->mAcch.ChkWallHit()) {
|
||||
@@ -3211,7 +3212,7 @@ static void npc_ne_outswim(npc_ne_class* i_this) {
|
||||
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 4, 0x800);
|
||||
i_this->speed.y = 0.0f;
|
||||
i_this->mGravity = 0.0f;
|
||||
i_this->gravity = 0.0f;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
@@ -3259,7 +3260,7 @@ static int npc_ne_climb(npc_ne_class* i_this) {
|
||||
if (wall_angle != 1) {
|
||||
anm_init(i_this, npc_ne_class::ANM_TO_JUMP, 5.0f, 0, 1.0f);
|
||||
i_this->current.angle.y = wall_angle;
|
||||
i_this->current.pos = i_this->next.pos;
|
||||
i_this->current.pos = i_this->old.pos;
|
||||
i_this->speedF = 0.0f;
|
||||
i_this->mState++;
|
||||
} else {
|
||||
@@ -3333,7 +3334,7 @@ static int npc_ne_climb(npc_ne_class* i_this) {
|
||||
if (ret == 0) {
|
||||
i_this->speed.y = 0.0f;
|
||||
i_this->speedF = 0.0f;
|
||||
i_this->mGravity = 0.0f;
|
||||
i_this->gravity = 0.0f;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -3410,7 +3411,7 @@ static void npc_ne_s_drop(npc_ne_class* i_this) {
|
||||
i_this->field_0x67a = 3;
|
||||
i_this->speed.y = 0.0f;
|
||||
i_this->speedF = 0.0f;
|
||||
i_this->mGravity = 0.0f;
|
||||
i_this->gravity = 0.0f;
|
||||
if (!i_this->mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
@@ -3519,7 +3520,7 @@ static int npc_ne_carry(npc_ne_class* i_this) {
|
||||
if (fabsf(i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk)) < 30.0f) {
|
||||
i_this->current.pos.y = dComIfG_Bgsp().GroundCross(&gnd_chk);
|
||||
i_this->field_0x91c = i_this->current.pos.y;
|
||||
i_this->mGravity = 0.0f;
|
||||
i_this->gravity = 0.0f;
|
||||
} else {
|
||||
i_this->mAction = npc_ne_class::ACT_DROP;
|
||||
i_this->mState = 0;
|
||||
@@ -3542,7 +3543,7 @@ static int npc_ne_carry(npc_ne_class* i_this) {
|
||||
dBgS_LinChk lin_chk;
|
||||
cXyz pos = i_this->current.pos;
|
||||
pos.y += 2.0f;
|
||||
lin_chk.Set(&player->mEyePos, &pos, i_this);
|
||||
lin_chk.Set(&player->eyePos, &pos, i_this);
|
||||
if (dComIfG_Bgsp().LineCross(&lin_chk)) {
|
||||
i_this->current.pos = lin_chk.i_GetCross();
|
||||
}
|
||||
@@ -3653,7 +3654,7 @@ COMPILER_STRIP_GATE(0x80A92550, &lit_6812);
|
||||
// regalloc
|
||||
static void action(npc_ne_class* i_this) {
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
i_this->mGravity = -7.0f;
|
||||
i_this->gravity = -7.0f;
|
||||
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
i_this->mDistToTarget = 10000.0f;
|
||||
@@ -3665,7 +3666,7 @@ static void action(npc_ne_class* i_this) {
|
||||
}
|
||||
i_this->mAngleToPlayer = fopAcM_searchPlayerAngleY(i_this);
|
||||
|
||||
i_this->field_0x6b8 = fabsf(player->mEyePos.y - player->current.pos.y);
|
||||
i_this->field_0x6b8 = fabsf(player->eyePos.y - player->current.pos.y);
|
||||
if (fabsf(i_this->current.pos.y - player->current.pos.y) > 50.0f) {
|
||||
i_this->field_0x6b8 = 100.0f;
|
||||
}
|
||||
@@ -3806,12 +3807,12 @@ static void action(npc_ne_class* i_this) {
|
||||
}
|
||||
|
||||
if (bvar9 && i_this->field_0x701 == 0) {
|
||||
cLib_onBit<u32>(i_this->mAttentionInfo.mFlags, 0x10);
|
||||
cLib_onBit<u32>(i_this->attention_info.flags, 0x10);
|
||||
if (ne_carry_check(i_this)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
cLib_offBit<u32>(i_this->mAttentionInfo.mFlags, 0x10);
|
||||
cLib_offBit<u32>(i_this->attention_info.flags, 0x10);
|
||||
}
|
||||
|
||||
cXyz vec1, vec2, vec3;
|
||||
@@ -3822,7 +3823,7 @@ static void action(npc_ne_class* i_this) {
|
||||
&& rod->field_0x13b4 != 0 && !i_this->mNoFollow) {
|
||||
if (i_this->mDistToTarget > 500.0f) {
|
||||
i_this->current.pos = ground_search(i_this);
|
||||
i_this->next = i_this->current;
|
||||
i_this->old = i_this->current;
|
||||
}
|
||||
} else if (!i_this->mNoFollow) {
|
||||
if (i_this->mDistToTarget > 700.0f && fopAcM_CheckCondition(i_this, 4)
|
||||
@@ -3846,7 +3847,7 @@ static void action(npc_ne_class* i_this) {
|
||||
i_this->mState = 0;
|
||||
}
|
||||
i_this->current.pos = vec2;
|
||||
i_this->next = i_this->current;
|
||||
i_this->old = i_this->current;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -3856,7 +3857,7 @@ static void action(npc_ne_class* i_this) {
|
||||
i_this->current.pos.set(3400.0f, 84.13f, 64.0f);
|
||||
i_this->current.angle.y = -0x6987;
|
||||
i_this->shape_angle.y = i_this->current.angle.y;
|
||||
i_this->next = i_this->orig = i_this->current;
|
||||
i_this->old = i_this->home = i_this->current;
|
||||
i_this->speedF = 0.0f;
|
||||
}
|
||||
}
|
||||
@@ -3870,7 +3871,7 @@ static void action(npc_ne_class* i_this) {
|
||||
MtxPosition(&vec1, &vec2);
|
||||
i_this->speed.x = vec2.x;
|
||||
i_this->speed.z = vec2.z;
|
||||
i_this->speed.y += i_this->mGravity;
|
||||
i_this->speed.y += i_this->gravity;
|
||||
i_this->current.pos += i_this->speed;
|
||||
if (i_this->speed.y < -120.0f) {
|
||||
i_this->speed.y = -120.0f;
|
||||
@@ -3932,7 +3933,7 @@ static void action(npc_ne_class* i_this) {
|
||||
i_this->mState = 0;
|
||||
i_this->mSound.startSound(Z2SE_CAT_CRY_ANNOY, 0, -1);
|
||||
} else if (fvar15 > 30.0f && i_this->mAction != npc_ne_class::ACT_ROOF) {
|
||||
i_this->current.pos = i_this->next.pos;
|
||||
i_this->current.pos = i_this->old.pos;
|
||||
i_this->mAction = npc_ne_class::ACT_S_DROP;
|
||||
i_this->mState = 0;
|
||||
}
|
||||
@@ -3987,7 +3988,7 @@ static void action(npc_ne_class* i_this) {
|
||||
if (i_this->field_0x668 == 2) {
|
||||
vec1 = i_this->field_0x66c - i_this->current.pos;
|
||||
} else {
|
||||
vec1 = player->mEyePos - i_this->current.pos;
|
||||
vec1 = player->eyePos - i_this->current.pos;
|
||||
if (!daPy_py_c::i_checkNowWolf()) {
|
||||
vec1.y += i_this->mBaseScale.z * -40.0f;
|
||||
}
|
||||
@@ -4047,7 +4048,7 @@ static void action(npc_ne_class* i_this) {
|
||||
i_this->field_0x68a = 0;
|
||||
|
||||
if (ivar5 != 0) {
|
||||
cXyz vec4 = i_this->mEyePos;
|
||||
cXyz vec4 = i_this->eyePos;
|
||||
vec4.y = i_this->field_0x6bc;
|
||||
if (ivar5 == 1) {
|
||||
if (i_this->field_0x658 == 0) {
|
||||
@@ -4265,13 +4266,13 @@ static int message(npc_ne_class* i_this) {
|
||||
i_this->field_0xc0a = 0;
|
||||
if (i_this->field_0x5b7 == 1 && (i_this->mMsgFlow.getNowMsgNo() == 0x18a1 ||
|
||||
i_this->mMsgFlow.getNowMsgNo() == 0x18a2)) {
|
||||
fopAcM_createItem(&dComIfGp_getPlayer(0)->mEyePos, SILVER_RUPEE, -1,
|
||||
fopAcM_createItem(&dComIfGp_getPlayer(0)->eyePos, SILVER_RUPEE, -1,
|
||||
fopAcM_GetRoomNo(i_this), NULL, NULL, 3);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
} else {
|
||||
if (i_dComIfGp_event_runCheck() && i_this->mEvtInfo.checkCommandTalk()) {
|
||||
if (i_dComIfGp_event_runCheck() && i_this->eventInfo.checkCommandTalk()) {
|
||||
i_this->mMsgFlow.init(i_this, i_this->mFlowID, 0, NULL);
|
||||
i_this->field_0xc0a = 1;
|
||||
}
|
||||
@@ -4279,14 +4280,14 @@ static int message(npc_ne_class* i_this) {
|
||||
if (i_this->field_0xc08 == 2 && i_this->mFlowID != -1 && daPy_py_c::i_checkNowWolf() &&
|
||||
!fopAcM_otherBgCheck(daPy_getLinkPlayerActorClass(), i_this)) {
|
||||
fopAcM_OnStatus(i_this, 0);
|
||||
i_this->mAttentionInfo.mFlags |= 0xa;
|
||||
i_this->attention_info.flags |= 0xa;
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
i_this->mAttentionInfo.mFlags |= 0xc00000;
|
||||
i_this->attention_info.flags |= 0xc00000;
|
||||
}
|
||||
i_this->mEvtInfo.i_onCondition(1);
|
||||
i_this->eventInfo.i_onCondition(1);
|
||||
} else {
|
||||
fopAcM_OffStatus(i_this, 0);
|
||||
i_this->mAttentionInfo.mFlags &= ~0xc0000a;
|
||||
i_this->attention_info.flags &= ~0xc0000a;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -4368,11 +4369,11 @@ static int daNpc_Ne_Execute(npc_ne_class* i_this) {
|
||||
mDoMtx_stack_c::YrotM(i_this->shape_angle.y);
|
||||
mDoMtx_stack_c::XrotM(i_this->shape_angle.x);
|
||||
mDoMtx_stack_c::ZrotM(i_this->shape_angle.z);
|
||||
i_this->mScale.x = i_this->mBaseScale.x * l_HIO.mScale;
|
||||
mDoMtx_stack_c::scaleM(i_this->mScale.x, i_this->mScale.x, i_this->mScale.x);
|
||||
i_this->scale.x = i_this->mBaseScale.x * l_HIO.scale;
|
||||
mDoMtx_stack_c::scaleM(i_this->scale.x, i_this->scale.x, i_this->scale.x);
|
||||
J3DModel* model = i_this->mpMorf->getModel();
|
||||
model->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
i_this->mpMorf->play(&i_this->mEyePos, 0, 0);
|
||||
i_this->mpMorf->play(&i_this->eyePos, 0, 0);
|
||||
i_this->mpBtkAnm->setFrame(i_this->mBtkFrame);
|
||||
i_this->mpBtpAnm->setFrame(i_this->mBtpFrame);
|
||||
i_this->mpMorf->modelCalc();
|
||||
@@ -4381,14 +4382,14 @@ static int daNpc_Ne_Execute(npc_ne_class* i_this) {
|
||||
mDoMtx_stack_c::transS(i_this->mDishPos.x, i_this->mDishPos.y, i_this->mDishPos.z);
|
||||
mDoMtx_stack_c::YrotM(i_this->shape_angle.y);
|
||||
i_this->mpDishMorf->getModel()->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
i_this->mpDishMorf->play(&i_this->mEyePos, 0, 0);
|
||||
i_this->mpDishMorf->play(&i_this->eyePos, 0, 0);
|
||||
i_this->mpDishMorf->modelCalc();
|
||||
}
|
||||
|
||||
PSMTXCopy(model->i_getAnmMtx(4), *calc_mtx);
|
||||
MtxPosition(&vec1, &i_this->mEyePos);
|
||||
i_this->mAttentionInfo.mPosition = i_this->mEyePos;
|
||||
i_this->mAttentionInfo.mPosition.y += i_this->mBaseScale.y * 20.0f;
|
||||
MtxPosition(&vec1, &i_this->eyePos);
|
||||
i_this->attention_info.position = i_this->eyePos;
|
||||
i_this->attention_info.position.y += i_this->mBaseScale.y * 20.0f;
|
||||
|
||||
PSMTXCopy(model->i_getAnmMtx(3), *calc_mtx);
|
||||
vec1.set(i_this->field_0xbf4 + -30.0f, 0.0f, 0.0f);
|
||||
@@ -4403,7 +4404,7 @@ static int daNpc_Ne_Execute(npc_ne_class* i_this) {
|
||||
dComIfG_Ccsp()->Set(&i_this->mCcSph);
|
||||
|
||||
cXyz vec3(-20000.0f, 300000.0f, -10000.0f);
|
||||
vec2 = i_this->mEyePos;
|
||||
vec2 = i_this->eyePos;
|
||||
if (i_this->field_0xbcc == 0) {
|
||||
vec2 += vec3;
|
||||
} else {
|
||||
@@ -4421,7 +4422,7 @@ static int daNpc_Ne_Execute(npc_ne_class* i_this) {
|
||||
static u16 e_name[2] = {0x8497, 0x8498};
|
||||
for (int i = 0; i < 2; i++) {
|
||||
i_this->mParticle[i] = dComIfGp_particle_set(i_this->mParticle[i], e_name[i],
|
||||
&i_this->mEyePos, NULL, NULL);
|
||||
&i_this->eyePos, NULL, NULL);
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mParticle[i]);
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalAlpha(!dComIfGs_wolfeye_effect_check() ? 0xff : 0);
|
||||
@@ -4446,12 +4447,12 @@ static int daNpc_Ne_Execute(npc_ne_class* i_this) {
|
||||
}
|
||||
fish->mpMorf->play(NULL, 0, 0);
|
||||
fish->mpMorf->modelCalc();
|
||||
fish->current.pos = i_this->mEyePos;
|
||||
fish->mEyePos = i_this->mEyePos;
|
||||
fish->current.pos = i_this->eyePos;
|
||||
fish->eyePos = i_this->eyePos;
|
||||
}
|
||||
|
||||
if (i_this->current.pos.y - i_this->orig.pos.y < -5000.0f && fopAcM_CheckCondition(i_this, 4)) {
|
||||
i_this->next.pos = i_this->current.pos = i_this->orig.pos;
|
||||
if (i_this->current.pos.y - i_this->home.pos.y < -5000.0f && fopAcM_CheckCondition(i_this, 4)) {
|
||||
i_this->old.pos = i_this->current.pos = i_this->home.pos;
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -4480,7 +4481,7 @@ static int daNpc_Ne_Delete(npc_ne_class* i_this) {
|
||||
if (i_this->field_0xcc1 != 0) {
|
||||
l_hioInit = false;
|
||||
}
|
||||
if (i_this->mHeap != NULL) {
|
||||
if (i_this->heap != NULL) {
|
||||
i_this->mSound.deleteObject();
|
||||
}
|
||||
return 1;
|
||||
@@ -4654,7 +4655,7 @@ static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) {
|
||||
if (i_dComIfGs_isEventBit(0x1001)) {
|
||||
_this->mAction = npc_ne_class::ACT_ROOF;
|
||||
_this->current.pos.set(1005.0f, 766.0f, -1423.0f);
|
||||
_this->next = _this->orig = _this->current;
|
||||
_this->old = _this->home = _this->current;
|
||||
_this->current.angle.y = 0;
|
||||
_this->mNoFollow = true;
|
||||
} else {
|
||||
@@ -4662,7 +4663,7 @@ static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) {
|
||||
_this->current.pos.set(3400.0f, 84.13f, 64.0f);
|
||||
_this->current.angle.y = -0x6987;
|
||||
_this->shape_angle.y = _this->current.angle.y;
|
||||
_this->next = _this->orig = _this->current;
|
||||
_this->old = _this->home = _this->current;
|
||||
_this->mNoFollow = true;
|
||||
_this->field_0x701 = 1;
|
||||
}
|
||||
@@ -4681,10 +4682,10 @@ static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) {
|
||||
|
||||
fopAcM_OnStatus(_this, 0x100);
|
||||
fopAcM_OnCarryType(_this, fopAcM_CARRY_TYPE_8);
|
||||
_this->mAttentionInfo.mFlags = 0;
|
||||
_this->mAttentionInfo.field_0x0[4] = 7;
|
||||
_this->attention_info.flags = 0;
|
||||
_this->attention_info.field_0x0[4] = 7;
|
||||
fopAcM_SetMtx(_this, _this->mpMorf->getModel()->getBaseTRMtx());
|
||||
_this->mHealth = 1;
|
||||
_this->health = 1;
|
||||
_this->field_0x560 = 1;
|
||||
|
||||
/* 80A92950-80A92990 000360 0040+00 1/1 0/0 0/0 .data cc_sph_src$7518 */
|
||||
@@ -4738,7 +4739,7 @@ static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) {
|
||||
} else {
|
||||
_this->mBaseScale.set(1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
_this->mAcch.Set(&_this->current.pos, &_this->next.pos, _this, 1,
|
||||
_this->mAcch.Set(&_this->current.pos, &_this->old.pos, _this, 1,
|
||||
&_this->mAcchCir, &_this->speed, NULL, NULL);
|
||||
_this->mAcchCir.SetWall(_this->mBaseScale.y * 30.0f, _this->mBaseScale.z * 35.0f);
|
||||
_this->field_0x5e0 = cM_rndFX(0.2f) + 1.0f;
|
||||
|
||||
@@ -221,8 +221,8 @@ static asm int nodeCallBack(J3DJoint* param_0, int param_1) {
|
||||
|
||||
/* 80B25B78-80B25BDC 000258 0064+00 1/0 0/0 0/0 .text daNPC_TR_Draw__FP12npc_tr_class */
|
||||
static int daNPC_TR_Draw(npc_tr_class* npc_tr) {
|
||||
g_env_light.settingTevStruct(0, &npc_tr->current.pos, &npc_tr->mTevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(npc_tr->field_0x5b8->mModelData, &npc_tr->mTevStr);
|
||||
g_env_light.settingTevStruct(0, &npc_tr->current.pos, &npc_tr->tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(npc_tr->field_0x5b8->mModelData, &npc_tr->tevStr);
|
||||
mDoExt_modelUpdateDL(npc_tr->field_0x5b8);
|
||||
return 1;
|
||||
}
|
||||
@@ -387,9 +387,9 @@ static void npc_tr_move(npc_tr_class* npc_tr) {
|
||||
case 0:
|
||||
if (npc_tr->field_0x5dc[0] == 0) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
npc_tr->field_0x5c4.x = npc_tr->orig.pos.x + cM_rndFX(1000.0f);
|
||||
npc_tr->field_0x5c4.y = npc_tr->orig.pos.y + cM_rndFX(200.0f);
|
||||
npc_tr->field_0x5c4.z = npc_tr->orig.pos.z + cM_rndFX(1000.0f);
|
||||
npc_tr->field_0x5c4.x = npc_tr->home.pos.x + cM_rndFX(1000.0f);
|
||||
npc_tr->field_0x5c4.y = npc_tr->home.pos.y + cM_rndFX(200.0f);
|
||||
npc_tr->field_0x5c4.z = npc_tr->home.pos.z + cM_rndFX(1000.0f);
|
||||
|
||||
cXyz distance = npc_tr->field_0x5c4 - npc_tr->current.pos;
|
||||
distance.y = 0.0f;
|
||||
@@ -521,7 +521,7 @@ static int daNPC_TR_Execute(npc_tr_class* npc_tr) {
|
||||
mDoMtx_stack_c::YrotM(npc_tr->shape_angle.y + npc_tr->field_0x5f0);
|
||||
mDoMtx_stack_c::XrotM(npc_tr->shape_angle.x);
|
||||
|
||||
f32 scale = npc_tr->mScale.x * l_HIO.field_0x8;
|
||||
f32 scale = npc_tr->scale.x * l_HIO.field_0x8;
|
||||
mDoMtx_stack_c::scaleM(scale, scale, scale);
|
||||
MTXCopy(mDoMtx_stack_c::get(), npc_tr->field_0x5b8->mBaseTransformMtx);
|
||||
|
||||
@@ -587,8 +587,8 @@ static int daNPC_TR_Create(fopAc_ac_c* i_this) {
|
||||
l_HIO.field_0x4 = -1;
|
||||
}
|
||||
|
||||
npc_tr->mCullMtx = npc_tr->field_0x5b8->getBaseTRMtx();
|
||||
npc_tr->mScale.x = cM_rndFX(0.1f) + 0.8f;
|
||||
npc_tr->cullMtx = npc_tr->field_0x5b8->getBaseTRMtx();
|
||||
npc_tr->scale.x = cM_rndFX(0.1f) + 0.8f;
|
||||
daNPC_TR_Execute(npc_tr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user