mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-05 09:05:26 -04:00
d_a_npc debug work (#2863)
* Remove d_a_npc3.cpp This file appears to not actually be real and the asserts in its functions all reference d_a_npc2.cpp instead. * d_a_npc debug almost matching
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d/d_menu_window.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_camera.h"
|
||||
#include "c/c_damagereaction.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_kytag04.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
/* 8046CB58-8046CFE8 000078 0490+00 1/0 0/0 0/0 .text daKytag04_Draw__FP13kytag04_class
|
||||
|
||||
+403
-343
File diff suppressed because it is too large
Load Diff
+450
-51
@@ -1,9 +1,28 @@
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc2.h"
|
||||
|
||||
static s32 daBaseNpc_chkPnt(cXyz param_0, dPnt* param_1, u16 param_2, u16 param_3, int param_4, int param_5);
|
||||
static u16 daBaseNpc_putNurbs(dPnt* i_CPnts, int i_CPntNum, int i_maxPntNum, dPnt* o_curve_p, BOOL i_isClosed);
|
||||
static s16 daBaseNpc_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1);
|
||||
|
||||
/* 803B375C-803B37A0 01087C 0044+00 0/0 0/0 1/1 .data mCcDCyl__11daBaseNpc_c */
|
||||
dCcD_SrcCyl daBaseNpc_c::mCcDCyl = {
|
||||
daBaseNpc_c::mCcDObj,
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
0.0f, // mRadius
|
||||
0.0f // mHeight
|
||||
} // mCyl
|
||||
};
|
||||
|
||||
/* 803B37A0-803B37E0 0108C0 0040+00 0/0 0/0 1/1 .data mCcDSph__11daBaseNpc_c */
|
||||
dCcD_SrcSph daBaseNpc_c::mCcDSph = {
|
||||
daBaseNpc_c::mCcDObj,
|
||||
{
|
||||
{{0.0f, 0.0f, 0.0f}, 0.0f} // mSph
|
||||
} // mSphAttr
|
||||
};
|
||||
|
||||
/* 8014D538-8014D584 147E78 004C+00 2/2 0/0 0/0 .text daBaseNpc_addIdx__FiiPUsi */
|
||||
static int daBaseNpc_addIdx(int i_step, int i_num, u16* i_idx, BOOL i_closed) {
|
||||
BOOL new_idx = *i_idx;
|
||||
@@ -16,7 +35,11 @@ static int daBaseNpc_addIdx(int i_step, int i_num, u16* i_idx, BOOL i_closed) {
|
||||
if (i_closed) {
|
||||
new_idx -= i_num * (new_idx / i_num);
|
||||
} else {
|
||||
new_idx = i_num != 0 ? i_num - 1 : 0;
|
||||
if (i_num != 0) {
|
||||
new_idx = i_num - 1;
|
||||
} else {
|
||||
new_idx = 0;
|
||||
}
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -48,33 +71,39 @@ static BOOL daBaseNpc_subIdx(int i_step, int i_num, u16* i_idx, BOOL i_closed) {
|
||||
|
||||
/* 8014D5C4-8014D620 147F04 005C+00 2/2 0/0 0/0 .text daBaseNpc_incIdx__FiPUsii */
|
||||
static BOOL daBaseNpc_incIdx(int i_pathNo, u16* i_pathIdx, BOOL i_pathClosed, int i_pathDirection) {
|
||||
BOOL result = FALSE;
|
||||
if (i_pathDirection < 0) {
|
||||
return daBaseNpc_subIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
result = daBaseNpc_subIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
} else {
|
||||
return daBaseNpc_addIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
result = daBaseNpc_addIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 8014D620-8014D67C 147F60 005C+00 1/1 0/0 0/0 .text daBaseNpc_decIdx__FiPUsii */
|
||||
static void daBaseNpc_decIdx(int i_pathNo, u16* i_pathIdx, BOOL i_pathClosed, int i_pathDirection) {
|
||||
static BOOL daBaseNpc_decIdx(int i_pathNo, u16* i_pathIdx, BOOL i_pathClosed, int i_pathDirection) {
|
||||
BOOL result = FALSE;
|
||||
if (i_pathDirection < 0) {
|
||||
daBaseNpc_addIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
result = daBaseNpc_addIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
} else {
|
||||
daBaseNpc_subIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
result = daBaseNpc_subIdx(1, i_pathNo, i_pathIdx, i_pathClosed);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 8014D67C-8014D804 147FBC 0188+00 1/1 0/0 0/0 .text daNpcBase_BBasis__FiiiPi */
|
||||
static f32 daNpcBase_BBasis(int i_deg, int i_pntNo, int i_knotNo, int* i_knotVector_p) {
|
||||
f32 basis;
|
||||
f32 var_f31;
|
||||
f32 var_f30;
|
||||
|
||||
if (i_deg != 0) {
|
||||
f32 var_f31 = (f32)(i_knotVector_p[i_pntNo + i_deg + 1] - i_knotVector_p[i_pntNo + 1]);
|
||||
var_f31 = (f32)(i_knotVector_p[i_pntNo + i_deg + 1] - i_knotVector_p[i_pntNo + 1]);
|
||||
if (var_f31 != 0.0f) {
|
||||
var_f31 = ((f32)(i_knotVector_p[i_pntNo + i_deg + 1] - i_knotNo) / var_f31) * daNpcBase_BBasis(i_deg - 1, i_pntNo + 1, i_knotNo, i_knotVector_p);
|
||||
}
|
||||
|
||||
f32 var_f30 = (f32)(i_knotVector_p[i_pntNo + i_deg] - i_knotVector_p[i_pntNo]);
|
||||
var_f30 = (f32)(i_knotVector_p[i_pntNo + i_deg] - i_knotVector_p[i_pntNo]);
|
||||
if (var_f30 != 0.0f) {
|
||||
var_f30 = ((f32)(i_knotNo - i_knotVector_p[i_pntNo]) / var_f30) * daNpcBase_BBasis(i_deg - 1, i_pntNo, i_knotNo, i_knotVector_p);
|
||||
}
|
||||
@@ -102,7 +131,8 @@ void daBaseNpc_acMngr_c::entry(fopAc_ac_c* i_ActorP) {
|
||||
/* 8014D838-8014D884 148178 004C+00 0/0 0/0 6/6 .text getActor__18daBaseNpc_acMngr_cFv */
|
||||
fopAc_ac_c* daBaseNpc_acMngr_c::getActor() {
|
||||
fopAc_ac_c* ret = NULL;
|
||||
if (fopAcM_SearchByID(mActorId, &ret) && ret != NULL) {
|
||||
BOOL foundActor = fopAcM_SearchByID(mActorId, &ret);
|
||||
if (foundActor && ret != NULL) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -116,20 +146,20 @@ void daBaseNpc_matAnm_c::calc(J3DMaterial* i_material) const {
|
||||
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
if (getTexMtxAnm(i).getAnmFlag()) {
|
||||
J3DTexMtxInfo* curr_mtx_info =
|
||||
&i_material->getTexGenBlock()->getTexMtx(i)->getTexMtxInfo();
|
||||
J3DTextureSRTInfo* curr_mtx_info =
|
||||
&i_material->getTexGenBlock()->getTexMtx(i)->getTexMtxInfo().mSRT;
|
||||
|
||||
if (mMorfFrm != 0) {
|
||||
f32 var_f31 = 1.0f / (mMorfFrm + 1);
|
||||
curr_mtx_info->mSRT.mTranslationX = field_0xF4 * (1.0f - var_f31) + curr_mtx_info->mSRT.mTranslationX * var_f31;
|
||||
curr_mtx_info->mSRT.mTranslationY = field_0xF8 * (1.0f - var_f31) + curr_mtx_info->mSRT.mTranslationY * var_f31;
|
||||
curr_mtx_info->mTranslationX = field_0xF4 * (1.0f - var_f31) + curr_mtx_info->mTranslationX * var_f31;
|
||||
curr_mtx_info->mTranslationY = field_0xF8 * (1.0f - var_f31) + curr_mtx_info->mTranslationY * var_f31;
|
||||
} else if (mEyeMoveFlg != 0) {
|
||||
curr_mtx_info->mSRT.mTranslationX = mNowOffsetX;
|
||||
curr_mtx_info->mSRT.mTranslationY = mNowOffsetY;
|
||||
curr_mtx_info->mTranslationX = mNowOffsetX;
|
||||
curr_mtx_info->mTranslationY = mNowOffsetY;
|
||||
}
|
||||
|
||||
field_0xF4 = curr_mtx_info->mSRT.mTranslationX;
|
||||
field_0xF8 = curr_mtx_info->mSRT.mTranslationY;
|
||||
field_0xF4 = curr_mtx_info->mTranslationX;
|
||||
field_0xF8 = curr_mtx_info->mTranslationY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,7 +169,7 @@ daBaseNpc_path_c::daBaseNpc_path_c() {}
|
||||
|
||||
/* 8014D9A8-8014D9BC 1482E8 0014+00 1/1 0/0 4/4 .text isPath__16daBaseNpc_path_cFv */
|
||||
BOOL daBaseNpc_path_c::isPath() {
|
||||
return mPathInfo != NULL;
|
||||
return NULL != mPathInfo;
|
||||
}
|
||||
|
||||
/* 8014D9BC-8014DA48 1482FC 008C+00 0/0 0/0 1/1 .text setPathInfo__16daBaseNpc_path_cFUcScSc */
|
||||
@@ -170,7 +200,7 @@ void daBaseNpc_path_c::reverseDir() {
|
||||
direction = 1;
|
||||
}
|
||||
|
||||
mDirection = direction;
|
||||
mDirection = (int)direction;
|
||||
}
|
||||
|
||||
/* 8014DA64-8014DAC4 1483A4 0060+00 0/0 0/0 3/3 .text chkPnt__16daBaseNpc_path_cF4cXyz */
|
||||
@@ -200,27 +230,65 @@ Vec daBaseNpc_path_c::getPntPos(u16 iIdx) {
|
||||
return mPathInfo->m_points[iIdx].m_position;
|
||||
}
|
||||
|
||||
void daBaseNpc_path_c::dbgDraw(f32 param_0) {
|
||||
GXColor green = {0x80, 0xff, 0x80, 0xff};
|
||||
GXColor blue = {0x80, 0x80, 0xff, 0xff};
|
||||
GXColor red = {0xff, 0x80, 0x80, 0xff};
|
||||
GXColor yellow = {0xff, 0xff, 0x80, 0xff};
|
||||
|
||||
cXyz unkXyz1;
|
||||
cXyz unkXyz2;
|
||||
|
||||
for (int i = 0; i <= mPathInfo->m_num; i++) {
|
||||
unkXyz1.set(mPathInfo->m_points[i].m_position.x, param_0,
|
||||
mPathInfo->m_points[i].m_position.z);
|
||||
dDbVw_drawSphereOpa(unkXyz1, 9.0f, red, 1);
|
||||
|
||||
if (i != 0) {
|
||||
unkXyz1.set(mPathInfo->m_points[i - 1].m_position.x, param_0,
|
||||
mPathInfo->m_points[i - 1].m_position.z);
|
||||
if (mPathInfo->m_num == i) {
|
||||
if (!dPath_ChkClose(mPathInfo)) {
|
||||
return;
|
||||
}
|
||||
unkXyz2.set(mPathInfo->m_points[0].m_position.x, param_0,
|
||||
mPathInfo->m_points[0].m_position.z);
|
||||
} else {
|
||||
unkXyz2.set(mPathInfo->m_points[i].m_position.x, param_0,
|
||||
mPathInfo->m_points[i].m_position.z);
|
||||
}
|
||||
|
||||
dDbVw_drawLineOpa(unkXyz1, unkXyz2, red, 1, 12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 8014DB40-8014DBB4 148480 0074+00 1/1 0/0 0/0 .text limitter__18daBaseNpc_lookat_cFsPsss */
|
||||
void daBaseNpc_lookat_c::limitter(s16 i_value, s16* o_value_p, s16 i_max, s16 i_min) {
|
||||
int tmp = i_value;
|
||||
int tmp2 = tmp + *o_value_p;
|
||||
int tmp = 0;
|
||||
tmp = (int)i_value + *o_value_p;
|
||||
|
||||
if (i_max < tmp2) {
|
||||
if (tmp < i_max) {
|
||||
*o_value_p -= tmp2 - i_max;
|
||||
if (i_max < tmp) {
|
||||
if ((int)i_value < i_max) {
|
||||
*o_value_p -= tmp - i_max;
|
||||
} else {
|
||||
*o_value_p = 0;
|
||||
}
|
||||
}
|
||||
|
||||
tmp += *o_value_p;
|
||||
tmp = (int)i_value + *o_value_p;
|
||||
|
||||
if (tmp >= (s16)i_min) {
|
||||
if (tmp >= i_min) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (i_min < i_value) {
|
||||
*o_value_p -= (int)(tmp - i_min);
|
||||
//TODO: fakematch
|
||||
#if VERSION == VERSION_SHIELD_DEBUG
|
||||
*o_value_p -= tmp - i_min;
|
||||
#else
|
||||
*o_value_p -= tmp - (s16)i_min;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -426,11 +494,11 @@ int daBaseNpc_c::draw(f32 param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x40)) {
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x40)) {
|
||||
mBtp.entry(modelData_p);
|
||||
}
|
||||
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x80)) {
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x80)) {
|
||||
mBtk.entry(modelData_p);
|
||||
}
|
||||
|
||||
@@ -442,11 +510,11 @@ int daBaseNpc_c::draw(f32 param_0) {
|
||||
mpModelMorf->entryDL();
|
||||
}
|
||||
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x40)) {
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x40)) {
|
||||
mBtp.remove(modelData_p);
|
||||
}
|
||||
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x80)) {
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x80)) {
|
||||
mBtk.remove(modelData_p);
|
||||
}
|
||||
|
||||
@@ -462,14 +530,17 @@ const char* daBaseNpc_c::getResName() {
|
||||
|
||||
/* 8014EE44-8014EE80 149784 003C+00 0/0 0/0 2/2 .text getTrnsfrmKeyAnmP__11daBaseNpc_cFPci */
|
||||
J3DAnmTransform* daBaseNpc_c::getTrnsfrmKeyAnmP(char* i_arcName, int i_resIdx) {
|
||||
return (J3DAnmTransform*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
void* objectRes = dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
return (J3DAnmTransform*)objectRes;
|
||||
}
|
||||
|
||||
/* 8014EE80-8014EEE4 1497C0 0064+00 0/0 0/0 1/1 .text
|
||||
* setMcaMorfAnm__11daBaseNpc_cFP18J3DAnmTransformKeyffiii */
|
||||
int daBaseNpc_c::setMcaMorfAnm(J3DAnmTransformKey* i_anm, f32 i_speed, f32 i_morf,
|
||||
int i_mode, int i_start, int i_end) {
|
||||
mpModelMorf->setAnm(i_anm, i_mode, i_morf, i_speed, i_start, i_end);
|
||||
f32 start = i_start;
|
||||
f32 end = i_end;
|
||||
mpModelMorf->setAnm(i_anm, i_mode, i_morf, i_speed, start, end);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -477,13 +548,16 @@ int daBaseNpc_c::setMcaMorfAnm(J3DAnmTransformKey* i_anm, f32 i_speed, f32 i_mor
|
||||
* setBckAnm__11daBaseNpc_cFP15J3DAnmTransformfiiib */
|
||||
int daBaseNpc_c::setBckAnm(J3DAnmTransform* i_anm, f32 i_speed, int i_mode, int i_start,
|
||||
int i_end, bool i_modify) {
|
||||
return mBck.init(i_anm, TRUE, i_mode, i_speed, i_start, i_end, i_modify);
|
||||
s16 start = i_start;
|
||||
s16 end = i_end;
|
||||
return mBck.init(i_anm, TRUE, i_mode, i_speed, start, end, i_modify);
|
||||
}
|
||||
|
||||
/* 8014EF28-8014EF64 149868 003C+00 0/0 0/0 1/1 .text getTexPtrnAnmP__11daBaseNpc_cFPci
|
||||
*/
|
||||
J3DAnmTransform* daBaseNpc_c::getTexPtrnAnmP(char* i_arcName, int i_resIdx) {
|
||||
return (J3DAnmTransform*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
void* objectRes = dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
return (J3DAnmTransform*)objectRes;
|
||||
}
|
||||
|
||||
/* 8014EF64-8014EFA4 1498A4 0040+00 0/0 0/0 1/1 .text
|
||||
@@ -495,18 +569,18 @@ int daBaseNpc_c::setBtpAnm(J3DAnmTexPattern* i_anm, J3DModelData* i_modelData, f
|
||||
|
||||
/* 8014EFA4-8014EFF0 1498E4 004C+00 2/0 0/0 2/0 .text attnSttsOn__11daBaseNpc_cFii */
|
||||
void daBaseNpc_c::attnSttsOn(int param_0, int param_1) {
|
||||
u32 attn_flags;
|
||||
u32 attn_flags = 0;
|
||||
|
||||
if (dComIfGp_getLinkPlayer()->checkWolf()) {
|
||||
if (daPy_py_c::checkNowWolf()) {
|
||||
if (param_1 != 0) {
|
||||
attn_flags = 10;
|
||||
attn_flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e;
|
||||
} else {
|
||||
attn_flags = 1;
|
||||
attn_flags = fopAc_AttnFlag_LOCK_e;
|
||||
}
|
||||
} else if (param_0 != 0) {
|
||||
attn_flags = 10;
|
||||
attn_flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e;
|
||||
} else {
|
||||
attn_flags = 1;
|
||||
attn_flags = fopAc_AttnFlag_LOCK_e;
|
||||
}
|
||||
|
||||
attention_info.flags = attn_flags;
|
||||
@@ -539,7 +613,7 @@ void daBaseNpc_c::setEnvTevColor() {
|
||||
|
||||
/* 8014F0FC-8014F140 149A3C 0044+00 1/1 0/0 2/2 .text setRoomNo__11daBaseNpc_cFv */
|
||||
void daBaseNpc_c::setRoomNo() {
|
||||
s32 room_id = dComIfG_Bgsp().GetRoomId(field_0x9d4);
|
||||
s8 room_id = dComIfG_Bgsp().GetRoomId(field_0x9d4);
|
||||
fopAcM_SetRoomNo(this, room_id);
|
||||
mCcStts.SetRoomId(room_id);
|
||||
}
|
||||
@@ -558,6 +632,7 @@ int daBaseNpc_c::checkEndAnm(f32 param_0) {
|
||||
case J3DFrameCtrl::EMode_RESET:
|
||||
return mpModelMorf->isStop() && param_0 != mpModelMorf->getPlaySpeed();
|
||||
case J3DFrameCtrl::EMode_REVERSE:
|
||||
case J3DFrameCtrl::EMode_LOOP_REVERSE:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -574,6 +649,7 @@ int daBaseNpc_c::checkEndAnm(J3DFrameCtrl* i_framectrl) {
|
||||
case J3DFrameCtrl::EMode_RESET:
|
||||
return i_framectrl->checkState(1) || i_framectrl->getRate() == 0.0f;
|
||||
case J3DFrameCtrl::EMode_REVERSE:
|
||||
case J3DFrameCtrl::EMode_LOOP_REVERSE:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -582,7 +658,9 @@ int daBaseNpc_c::checkEndAnm(J3DFrameCtrl* i_framectrl) {
|
||||
|
||||
/* 8014F228-8014F38C 149B68 0164+00 2/0 0/0 2/0 .text allAnmPlay__11daBaseNpc_cFv */
|
||||
void daBaseNpc_c::allAnmPlay() {
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x10) && !cLib_checkBit<u16>(field_0x840, 1)) {
|
||||
u32 offMask = 0x10F;
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x10) &&
|
||||
!cLib_checkBit<u16>((u16)field_0x840, 1)) {
|
||||
f32 temp_f31 = mpModelMorf->getPlaySpeed();
|
||||
mpModelMorf->play(0, 0);
|
||||
|
||||
@@ -591,17 +669,20 @@ void daBaseNpc_c::allAnmPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x80) && !cLib_checkBit<u16>(field_0x840, 8) && !btkCtrl()) {
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x80) &&
|
||||
!cLib_checkBit<u16>((u16)field_0x840, 8) && !btkCtrl()) {
|
||||
mBtk.play();
|
||||
}
|
||||
|
||||
if (!cLib_checkBit<u16>(field_0x840, 0x100)) {
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x20) && !cLib_checkBit<u16>(field_0x840, 2)) {
|
||||
if (!cLib_checkBit<u16>((u16)field_0x840, 0x100)) {
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x20) &&
|
||||
!cLib_checkBit<u16>((u16)field_0x840, 2)) {
|
||||
mBck.play();
|
||||
}
|
||||
|
||||
if (cLib_checkBit<u16>(field_0x840, 0x40) && !cLib_checkBit<u16>(field_0x840, 4)) {
|
||||
mBtp.getFrame();
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x40) &&
|
||||
!cLib_checkBit<u16>((u16)field_0x840, 4)) {
|
||||
f32 frame = mBtp.getFrame();
|
||||
mBtp.play();
|
||||
|
||||
if (mBtp.getFrameCtrl()->getAttribute() == 2) {
|
||||
@@ -619,7 +700,7 @@ void daBaseNpc_c::allAnmPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
cLib_offBit<u16>(field_0x840, 0x10F);
|
||||
cLib_offBit<u16>(field_0x840, offMask);
|
||||
}
|
||||
|
||||
/* 8014F38C-8014F390 149CCC 0004+00 2/0 0/0 1/0 .text adjustShapeAngle__11daBaseNpc_cFv
|
||||
@@ -643,10 +724,10 @@ void daBaseNpc_c::setMtx(int param_0) {
|
||||
model->setUserArea(0);
|
||||
}
|
||||
|
||||
if ((field_0x840 & 0x10) && field_0x83c) {
|
||||
if (cLib_checkBit<u16>((u16)field_0x840, 0x10) && field_0x83c) {
|
||||
u16 tmp = 0;
|
||||
while (field_0x83c[tmp] != 0xFFFF) {
|
||||
mBck.entryJoint(modelData, field_0x83c[tmp], mBck.getFrame());
|
||||
mBck.entryJoint(modelData, field_0x83c[tmp]);
|
||||
tmp++;
|
||||
}
|
||||
|
||||
@@ -675,3 +756,321 @@ void daBaseNpc_c::drawOtherMdls() {}
|
||||
bool daBaseNpc_c::dbgDraw() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 8014F4B4-8014F4F8 149DF4 0044+00 0/0 0/0 1/1 .text __ct__23daBaseNpc_moveBgActor_cFv
|
||||
*/
|
||||
daBaseNpc_moveBgActor_c::daBaseNpc_moveBgActor_c() {
|
||||
mpBgw = 0;
|
||||
}
|
||||
|
||||
/* 8014F4F8-8014F518 149E38 0020+00 1/1 0/0 0/0 .text CheckCreateHeap__FP10fopAc_ac_c */
|
||||
static int CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
daBaseNpc_moveBgActor_c* moveBgActor = (daBaseNpc_moveBgActor_c*)i_this;
|
||||
return moveBgActor->MoveBGCreateHeap();
|
||||
}
|
||||
|
||||
/* 80450FE0-80450FE4 0004E0 0004+00 2/2 0/0 0/0 .sbss m_name__23daBaseNpc_moveBgActor_c
|
||||
*/
|
||||
const char* daBaseNpc_moveBgActor_c::m_name;
|
||||
|
||||
/* 80450FE4-80450FE8 0004E4 0004+00 2/2 0/0 0/0 .sbss m_dzb_id__23daBaseNpc_moveBgActor_c
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::m_dzb_id;
|
||||
|
||||
/* 80450FE8-80450FEC 0004E8 0004+00 2/2 0/0 0/0 .sbss m_set_func__23daBaseNpc_moveBgActor_c */
|
||||
MoveBGActor_SetFunc daBaseNpc_moveBgActor_c::m_set_func;
|
||||
|
||||
/* 8014F518-8014F60C 149E58 00F4+00 1/1 0/0 0/0 .text
|
||||
* MoveBGCreateHeap__23daBaseNpc_moveBgActor_cFv */
|
||||
int daBaseNpc_moveBgActor_c::MoveBGCreateHeap() {
|
||||
if (!CreateHeap()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (m_dzb_id == -1) {
|
||||
mpBgw = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
mpBgw = new dBgW();
|
||||
|
||||
if (mpBgw != NULL && !mpBgw->Set((cBgD_t*)dComIfG_getObjectRes(m_name, m_dzb_id), 1, &mBgMtx)) {
|
||||
if (m_set_func != NULL) {
|
||||
mpBgw->SetCrrFunc(m_set_func);
|
||||
}
|
||||
} else {
|
||||
mpBgw = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 8014F60C-8014F6FC 149F4C 00F0+00 0/0 0/0 1/1 .text
|
||||
* MoveBGCreate__23daBaseNpc_moveBgActor_cFPCciPFP4dBgWPvRC13cBgS_PolyInfobP4cXyzP5csXyzP5csXyz_vUl
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::MoveBGCreate(char const* i_arcName, int i_dzbId, MoveBGActor_SetFunc i_setFunc,
|
||||
u32 i_heapSize) {
|
||||
int unusedInt1 = 1;
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
|
||||
m_name = i_arcName;
|
||||
m_dzb_id = i_dzbId;
|
||||
m_set_func = i_setFunc;
|
||||
|
||||
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, i_heapSize)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mpBgw != NULL && mpBgw->ChkUsed()) {
|
||||
BOOL isConnect = mDoCPd_c::isConnect(PAD_3);
|
||||
if (isConnect) {
|
||||
JUT_WARN(2019, "%s", "dBgS_MoveBgActor::MoveBGCreate() Don't Regist CreateHeap\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mpBgw != NULL && dComIfG_Bgsp().Regist(mpBgw, this)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
//TODO: Possible fakematch - retail definitely looks like a ternary but
|
||||
// debug looks like if-else and has inverted order
|
||||
#if DEBUG
|
||||
if (!Create()) {
|
||||
return 5;
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
#else
|
||||
//return Create() ? cPhs_COMPLEATE_e : cPhs_ERROR_e; // using enums here changes code gen
|
||||
return Create() ? 4 : 5;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* 8014F6FC-8014F770 14A03C 0074+00 0/0 0/0 1/1 .text MoveBGDelete__23daBaseNpc_moveBgActor_cFv */
|
||||
int daBaseNpc_moveBgActor_c::MoveBGDelete() {
|
||||
int rt = Delete();
|
||||
if (mpBgw != NULL && mpBgw->ChkUsed()) {
|
||||
bool result = dComIfG_Bgsp().Release(mpBgw);
|
||||
if (result) {
|
||||
OS_REPORT("Release Error\n");
|
||||
}
|
||||
}
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
/* 8014F770-8014F81C 14A0B0 00AC+00 0/0 0/0 2/2 .text MoveBGExecute__23daBaseNpc_moveBgActor_cFv
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::MoveBGExecute() {
|
||||
Mtx* sp8 = NULL;
|
||||
int rt = Execute(&sp8);
|
||||
|
||||
if (sp8 == NULL) {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
} else {
|
||||
MTXCopy(*sp8, mBgMtx);
|
||||
}
|
||||
|
||||
if (mpBgw != NULL) {
|
||||
mpBgw->Move();
|
||||
}
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
/* 8014F81C-8014F8C4 14A15C 00A8+00 1/1 0/0 0/0 .text
|
||||
* daBaseNpc_PntVsLineSegmentLengthSquare2D__FffffffPfPfPf */
|
||||
static int daBaseNpc_PntVsLineSegmentLengthSquare2D(f32 param_0, f32 param_1, f32 param_2,
|
||||
f32 param_3, f32 param_4, f32 param_5,
|
||||
f32* param_6, f32* param_7, f32* param_8) {
|
||||
int var_r31 = 0;
|
||||
|
||||
f32 temp_f31 = param_4 - param_2;
|
||||
f32 temp_f30 = param_5 - param_3;
|
||||
f32 temp_f28 = (temp_f31 * temp_f31) + (temp_f30 * temp_f30);
|
||||
if (temp_f28 == 0.0f) {
|
||||
*param_8 = 0.0f;
|
||||
return 0;
|
||||
}
|
||||
|
||||
f32 temp_f29 = ((temp_f31 * (param_0 - param_2)) + (temp_f30 * (param_1 - param_3))) / temp_f28;
|
||||
if (0.0f <= temp_f29 && temp_f29 <= 1.0f) {
|
||||
var_r31 = 1;
|
||||
}
|
||||
|
||||
*param_6 = param_2 + (temp_f31 * temp_f29);
|
||||
*param_7 = param_3 + (temp_f30 * temp_f29);
|
||||
*param_8 = ((*param_6 - param_0) * (*param_6 - param_0)) + ((*param_7 - param_1) * (*param_7 - param_1));
|
||||
return var_r31;
|
||||
}
|
||||
|
||||
/* 8014F8C4-8014FB28 14A204 0264+00 1/1 0/0 0/0 .text daBaseNpc_putNurbs__FP4dPntiiP4dPnti */
|
||||
static u16 daBaseNpc_putNurbs(dPnt* i_CPnts, int i_CPntNum, int i_maxPntNum, dPnt* o_curve_p, BOOL i_isClosed) {
|
||||
int knotVector[daBaseNpc_path_c::MAXNUMCONTROLPNT_e + 4];
|
||||
int weights[daBaseNpc_path_c::MAXNUMCONTROLPNT_e];
|
||||
|
||||
int i;
|
||||
int aDeg = 2; // curve degree
|
||||
int aMaxNumCPnt; // max control points
|
||||
if (i_isClosed) {
|
||||
aMaxNumCPnt = i_CPntNum + 1;
|
||||
} else {
|
||||
aMaxNumCPnt = i_CPntNum;
|
||||
}
|
||||
|
||||
JUT_ASSERT(2190, aDeg < aMaxNumCPnt && aMaxNumCPnt < daBaseNpc_path_c::MAXNUMCONTROLPNT_e);
|
||||
JUT_ASSERT(2191, aDeg == 2 || aDeg == 3);
|
||||
|
||||
// create knot vector
|
||||
for (i = 0; i < aDeg + aMaxNumCPnt + 1; i++) {
|
||||
if (aMaxNumCPnt < i) {
|
||||
knotVector[i] = knotVector[i - 1];
|
||||
} else if (aDeg < i) {
|
||||
knotVector[i] = knotVector[i - 1] + 10;
|
||||
} else {
|
||||
knotVector[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// initialize weights
|
||||
for (i = 0; i < aMaxNumCPnt; i++) {
|
||||
weights[i] = 1;
|
||||
}
|
||||
|
||||
int cur_knot;
|
||||
u16 out_pnt_no = 0;
|
||||
f32 total_weight;
|
||||
f32 basis;
|
||||
for (cur_knot = knotVector[aDeg]; cur_knot < knotVector[aDeg + aMaxNumCPnt]; cur_knot += 2, out_pnt_no++) {
|
||||
if (i_maxPntNum <= out_pnt_no) {
|
||||
break;
|
||||
}
|
||||
|
||||
o_curve_p[out_pnt_no].m_position.x = 0.0f;
|
||||
o_curve_p[out_pnt_no].m_position.z = 0.0f;
|
||||
|
||||
total_weight = 0.0f;
|
||||
for (i = 0; i < aMaxNumCPnt; i++) {
|
||||
basis = daNpcBase_BBasis(aDeg, i, cur_knot, knotVector);
|
||||
if (i == i_CPntNum) {
|
||||
o_curve_p[out_pnt_no].m_position.x += i_CPnts[0].m_position.x * basis;
|
||||
o_curve_p[out_pnt_no].m_position.z += i_CPnts[0].m_position.z * basis;
|
||||
} else {
|
||||
o_curve_p[out_pnt_no].m_position.x += i_CPnts[i].m_position.x * basis;
|
||||
o_curve_p[out_pnt_no].m_position.z += i_CPnts[i].m_position.z * basis;
|
||||
}
|
||||
|
||||
total_weight += basis * weights[i];
|
||||
}
|
||||
|
||||
o_curve_p[out_pnt_no].m_position.x /= total_weight;
|
||||
o_curve_p[out_pnt_no].m_position.z /= total_weight;
|
||||
}
|
||||
|
||||
// add final point for open curves
|
||||
if (!i_isClosed) {
|
||||
o_curve_p[out_pnt_no].m_position.x = i_CPnts[i_CPntNum - 1].m_position.x;
|
||||
o_curve_p[out_pnt_no].m_position.z = i_CPnts[i_CPntNum - 1].m_position.z;
|
||||
out_pnt_no++;
|
||||
}
|
||||
|
||||
return out_pnt_no;
|
||||
}
|
||||
|
||||
/* 8014FB28-80150230 14A468 0708+00 1/1 0/0 0/0 .text daBaseNpc_chkPnt__F4cXyzP4dPntUsUsii */
|
||||
static s32 daBaseNpc_chkPnt(cXyz param_0, dPnt* param_1, u16 param_2, u16 param_3, int param_4,
|
||||
int param_5) {
|
||||
u16 var_r29 = param_2;
|
||||
u16 sp12, sp10;
|
||||
sp10 = var_r29;
|
||||
sp12 = var_r29;
|
||||
daBaseNpc_incIdx(param_3, &sp10, param_4, 1);
|
||||
daBaseNpc_decIdx(param_3, &sp12, param_4, 1);
|
||||
|
||||
cXyz sp70;
|
||||
cXyz sp64(param_1[sp12].m_position.x, param_1[sp12].m_position.y, param_1[sp12].m_position.z);
|
||||
cXyz sp58(param_1[var_r29].m_position.x, param_1[var_r29].m_position.y, param_1[var_r29].m_position.z);
|
||||
cXyz sp4C(param_1[sp10].m_position.x, param_1[sp10].m_position.y, param_1[sp10].m_position.z);
|
||||
|
||||
f32 sp24;
|
||||
s16 var_r31;
|
||||
if (sp12 == var_r29 && var_r29 == sp10) {
|
||||
JUT_ASSERT(2288, FALSE);
|
||||
} else if (sp12 < var_r29 && var_r29 < sp10) {
|
||||
sp24 = (sp4C - sp64).absXZ();
|
||||
var_r31 = cM_atan2s(sp4C.x - sp64.x, sp4C.z - sp64.z);
|
||||
|
||||
sp70 = sp64;
|
||||
sp64.x = sp70.x + (-1.0f * sp24 * cM_ssin(var_r31));
|
||||
sp64.z = sp70.z + (-1.0f * sp24 * cM_scos(var_r31));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(var_r31));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(var_r31));
|
||||
} else if (sp12 < var_r29) {
|
||||
sp24 = (sp58 - sp64).absXZ();
|
||||
var_r31 = cM_atan2s(sp58.x - sp64.x, sp58.z - sp64.z);
|
||||
|
||||
sp70 = sp58;
|
||||
sp64.x = sp70.x + (-2.0f * sp24 * cM_ssin(var_r31));
|
||||
sp64.z = sp70.z + (-2.0f * sp24 * cM_scos(var_r31));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(var_r31));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(var_r31));
|
||||
} else if (var_r29 < sp10) {
|
||||
sp24 = (sp4C - sp58).absXZ();
|
||||
var_r31 = cM_atan2s(sp4C.x - sp58.x, sp4C.z - sp58.z);
|
||||
|
||||
sp70 = sp58;
|
||||
sp64.x = sp70.x + (-2.0f * sp24 * cM_ssin(var_r31));
|
||||
sp64.z = sp70.z + (-2.0f * sp24 * cM_scos(var_r31));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(var_r31));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(var_r31));
|
||||
} else {
|
||||
JUT_ASSERT(2322, FALSE);
|
||||
}
|
||||
|
||||
f32 sp20;
|
||||
f32 sp1C;
|
||||
f32 sp18;
|
||||
f32 sp14;
|
||||
|
||||
daBaseNpc_PntVsLineSegmentLengthSquare2D(param_0.x, param_0.z, sp64.x, sp64.z, sp4C.x, sp4C.z, &sp20, &sp1C, &sp24);
|
||||
|
||||
if (cM3d_IsZero(sp24)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
daBaseNpc_PntVsLineSegmentLengthSquare2D(sp58.x, sp58.z, sp64.x, sp64.z, sp4C.x, sp4C.z, &sp18, &sp14, &sp24);
|
||||
|
||||
if (param_5 < 0) {
|
||||
var_r31 = cM_atan2s(sp64.x - sp4C.x, sp64.z - sp4C.z);
|
||||
} else {
|
||||
var_r31 = cM_atan2s(sp4C.x - sp64.x, sp4C.z - sp64.z);
|
||||
}
|
||||
|
||||
var_r31 -= cM_atan2s(sp18 - sp20, sp14 - sp1C);
|
||||
return (u16)abs(var_r31) > 0x4000;
|
||||
}
|
||||
|
||||
/* 80150230-801502EC 14AB70 00BC+00 1/1 0/0 0/0 .text daBaseNpc_getGroundAngle__FP13cBgS_PolyInfos
|
||||
*/
|
||||
static s16 daBaseNpc_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) {
|
||||
if (dComIfG_Bgsp().ChkPolySafe(*param_0)) {
|
||||
cM3dGPla spC;
|
||||
bool triPla = dComIfG_Bgsp().GetTriPla(*param_0, &spC);
|
||||
if (!triPla || !cBgW_CheckBGround(spC.mNormal.y)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return fopAcM_getPolygonAngle(&spC, param_1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,301 +0,0 @@
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/d_bg_w.h"
|
||||
|
||||
static BOOL daBaseNpc_incIdx(int i_pathNo, u16* i_pathIdx, BOOL i_pathClosed, int i_pathDirection);
|
||||
static void daBaseNpc_decIdx(int i_pathNo, u16* i_pathIdx, int i_pathClosed, int i_pathDirection);
|
||||
static f32 daNpcBase_BBasis(int i_deg, int i_pntNo, int i_knotNo, int* i_knotVector_p);
|
||||
|
||||
/* 8014F4B4-8014F4F8 149DF4 0044+00 0/0 0/0 1/1 .text __ct__23daBaseNpc_moveBgActor_cFv
|
||||
*/
|
||||
daBaseNpc_moveBgActor_c::daBaseNpc_moveBgActor_c() {
|
||||
mpBgw = 0;
|
||||
}
|
||||
|
||||
/* 8014F4F8-8014F518 149E38 0020+00 1/1 0/0 0/0 .text CheckCreateHeap__FP10fopAc_ac_c */
|
||||
static int CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
return ((daBaseNpc_moveBgActor_c*)i_this)->MoveBGCreateHeap();
|
||||
}
|
||||
|
||||
/* 80450FE0-80450FE4 0004E0 0004+00 2/2 0/0 0/0 .sbss m_name__23daBaseNpc_moveBgActor_c
|
||||
*/
|
||||
const char* daBaseNpc_moveBgActor_c::m_name;
|
||||
|
||||
/* 80450FE4-80450FE8 0004E4 0004+00 2/2 0/0 0/0 .sbss m_dzb_id__23daBaseNpc_moveBgActor_c
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::m_dzb_id;
|
||||
|
||||
/* 80450FE8-80450FEC 0004E8 0004+00 2/2 0/0 0/0 .sbss m_set_func__23daBaseNpc_moveBgActor_c */
|
||||
MoveBGActor_SetFunc daBaseNpc_moveBgActor_c::m_set_func;
|
||||
|
||||
/* 8014F518-8014F60C 149E58 00F4+00 1/1 0/0 0/0 .text
|
||||
* MoveBGCreateHeap__23daBaseNpc_moveBgActor_cFv */
|
||||
int daBaseNpc_moveBgActor_c::MoveBGCreateHeap() {
|
||||
if (!CreateHeap()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (m_dzb_id == -1) {
|
||||
mpBgw = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
mpBgw = new dBgW();
|
||||
|
||||
if (mpBgw != NULL && !mpBgw->Set((cBgD_t*)dComIfG_getObjectRes(m_name, m_dzb_id), 1, &mBgMtx)) {
|
||||
if (m_set_func != NULL) {
|
||||
mpBgw->SetCrrFunc(m_set_func);
|
||||
}
|
||||
} else {
|
||||
mpBgw = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 8014F60C-8014F6FC 149F4C 00F0+00 0/0 0/0 1/1 .text
|
||||
* MoveBGCreate__23daBaseNpc_moveBgActor_cFPCciPFP4dBgWPvRC13cBgS_PolyInfobP4cXyzP5csXyzP5csXyz_vUl
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::MoveBGCreate(char const* i_arcName, int i_dzbId, MoveBGActor_SetFunc i_setFunc,
|
||||
u32 i_heapSize) {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
|
||||
m_name = i_arcName;
|
||||
m_dzb_id = i_dzbId;
|
||||
m_set_func = i_setFunc;
|
||||
|
||||
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, i_heapSize)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mpBgw != NULL && mpBgw->ChkUsed() && mDoCPd_c::isConnect(PAD_3)) {
|
||||
JUT_WARN(2019, "%s", "dBgS_MoveBgActor::MoveBGCreate() Don't Regist CreateHeap\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mpBgw != NULL && dComIfG_Bgsp().Regist(mpBgw, this)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
// return Create() ? cPhs_COMPLEATE_e : cPhs_ERROR_e; // using enums here changes code gen
|
||||
return Create() ? 4 : 5;
|
||||
}
|
||||
|
||||
/* 8014F6FC-8014F770 14A03C 0074+00 0/0 0/0 1/1 .text MoveBGDelete__23daBaseNpc_moveBgActor_cFv */
|
||||
int daBaseNpc_moveBgActor_c::MoveBGDelete() {
|
||||
int rt = Delete();
|
||||
if (mpBgw != NULL && mpBgw->ChkUsed() && dComIfG_Bgsp().Release(mpBgw)) {
|
||||
OS_REPORT("Release Error\n");
|
||||
}
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
/* 8014F770-8014F81C 14A0B0 00AC+00 0/0 0/0 2/2 .text MoveBGExecute__23daBaseNpc_moveBgActor_cFv
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::MoveBGExecute() {
|
||||
Mtx* sp8 = NULL;
|
||||
int rt = Execute(&sp8);
|
||||
|
||||
if (sp8 == NULL) {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
} else {
|
||||
MTXCopy(*sp8, mBgMtx);
|
||||
}
|
||||
|
||||
if (mpBgw != NULL) {
|
||||
mpBgw->Move();
|
||||
}
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
/* 8014F81C-8014F8C4 14A15C 00A8+00 1/1 0/0 0/0 .text
|
||||
* daBaseNpc_PntVsLineSegmentLengthSquare2D__FffffffPfPfPf */
|
||||
static int daBaseNpc_PntVsLineSegmentLengthSquare2D(f32 param_0, f32 param_1, f32 param_2,
|
||||
f32 param_3, f32 param_4, f32 param_5,
|
||||
f32* param_6, f32* param_7, f32* param_8) {
|
||||
int var_r31 = 0;
|
||||
|
||||
f32 temp_f31 = param_4 - param_2;
|
||||
f32 temp_f30 = param_5 - param_3;
|
||||
f32 temp_f28 = (temp_f31 * temp_f31) + (temp_f30 * temp_f30);
|
||||
if (temp_f28 == 0.0f) {
|
||||
*param_8 = 0.0f;
|
||||
return 0;
|
||||
}
|
||||
|
||||
f32 temp_f29 = ((temp_f31 * (param_0 - param_2)) + (temp_f30 * (param_1 - param_3))) / temp_f28;
|
||||
if (0.0f <= temp_f29 && temp_f29 <= 1.0f) {
|
||||
var_r31 = 1;
|
||||
}
|
||||
|
||||
*param_6 = param_2 + (temp_f31 * temp_f29);
|
||||
*param_7 = param_3 + (temp_f30 * temp_f29);
|
||||
*param_8 = ((*param_6 - param_0) * (*param_6 - param_0)) + ((*param_7 - param_1) * (*param_7 - param_1));
|
||||
return var_r31;
|
||||
}
|
||||
|
||||
/* 8014F8C4-8014FB28 14A204 0264+00 1/1 0/0 0/0 .text daBaseNpc_putNurbs__FP4dPntiiP4dPnti */
|
||||
static u16 daBaseNpc_putNurbs(dPnt* i_CPnts, int i_CPntNum, int i_maxPntNum, dPnt* o_curve_p, BOOL i_isClosed) {
|
||||
int knotVector[daBaseNpc_path_c::MAXNUMCONTROLPNT_e + 4];
|
||||
int weights[daBaseNpc_path_c::MAXNUMCONTROLPNT_e];
|
||||
|
||||
int i;
|
||||
int aDeg = 2; // curve degree
|
||||
int aMaxNumCPnt; // max control points
|
||||
if (i_isClosed) {
|
||||
aMaxNumCPnt = i_CPntNum + 1;
|
||||
} else {
|
||||
aMaxNumCPnt = i_CPntNum;
|
||||
}
|
||||
|
||||
JUT_ASSERT(2190, aDeg < aMaxNumCPnt && aMaxNumCPnt < daBaseNpc_path_c::MAXNUMCONTROLPNT_e);
|
||||
JUT_ASSERT(2191, aDeg == 2 || aDeg == 3);
|
||||
|
||||
// create knot vector
|
||||
for (i = 0; i < aDeg + aMaxNumCPnt + 1; i++) {
|
||||
if (aMaxNumCPnt < i) {
|
||||
knotVector[i] = knotVector[i - 1];
|
||||
} else if (aDeg < i) {
|
||||
knotVector[i] = knotVector[i - 1] + 10;
|
||||
} else {
|
||||
knotVector[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// initialize weights
|
||||
for (i = 0; i < aMaxNumCPnt; i++) {
|
||||
weights[i] = 1;
|
||||
}
|
||||
|
||||
int cur_knot;
|
||||
u16 out_pnt_no;
|
||||
for (out_pnt_no = 0, cur_knot = knotVector[aDeg]; cur_knot < knotVector[aDeg + aMaxNumCPnt]; cur_knot += 2, out_pnt_no++) {
|
||||
if (i_maxPntNum <= out_pnt_no) {
|
||||
break;
|
||||
}
|
||||
|
||||
o_curve_p[out_pnt_no].m_position.x = 0.0f;
|
||||
o_curve_p[out_pnt_no].m_position.z = 0.0f;
|
||||
|
||||
f32 total_weight = 0.0f;
|
||||
for (i = 0; i < aMaxNumCPnt; i++) {
|
||||
f32 basis = daNpcBase_BBasis(aDeg, i, cur_knot, knotVector);
|
||||
if (i == i_CPntNum) {
|
||||
o_curve_p[out_pnt_no].m_position.x += i_CPnts[0].m_position.x * basis;
|
||||
o_curve_p[out_pnt_no].m_position.z += i_CPnts[0].m_position.z * basis;
|
||||
} else {
|
||||
o_curve_p[out_pnt_no].m_position.x += i_CPnts[i].m_position.x * basis;
|
||||
o_curve_p[out_pnt_no].m_position.z += i_CPnts[i].m_position.z * basis;
|
||||
}
|
||||
|
||||
total_weight += basis * weights[i];
|
||||
}
|
||||
|
||||
o_curve_p[out_pnt_no].m_position.x /= total_weight;
|
||||
o_curve_p[out_pnt_no].m_position.z /= total_weight;
|
||||
}
|
||||
|
||||
// add final point for open curves
|
||||
if (!i_isClosed) {
|
||||
o_curve_p[out_pnt_no].m_position.x = i_CPnts[i_CPntNum - 1].m_position.x;
|
||||
o_curve_p[out_pnt_no].m_position.z = i_CPnts[i_CPntNum - 1].m_position.z;
|
||||
out_pnt_no++;
|
||||
}
|
||||
|
||||
return out_pnt_no;
|
||||
}
|
||||
|
||||
/* 8014FB28-80150230 14A468 0708+00 1/1 0/0 0/0 .text daBaseNpc_chkPnt__F4cXyzP4dPntUsUsii */
|
||||
static s32 daBaseNpc_chkPnt(cXyz param_0, dPnt* param_1, u16 param_2, u16 param_3, int param_4,
|
||||
int param_5) {
|
||||
u16 sp12, sp10;
|
||||
sp10 = param_2;
|
||||
sp12 = param_2;
|
||||
daBaseNpc_incIdx(param_3, &sp10, param_4, 1);
|
||||
daBaseNpc_decIdx(param_3, &sp12, param_4, 1);
|
||||
|
||||
cXyz sp70;
|
||||
cXyz sp64(param_1[sp12].m_position.x, param_1[sp12].m_position.y, param_1[sp12].m_position.z);
|
||||
cXyz sp58(param_1[param_2].m_position.x, param_1[param_2].m_position.y, param_1[param_2].m_position.z);
|
||||
cXyz sp4C(param_1[sp10].m_position.x, param_1[sp10].m_position.y, param_1[sp10].m_position.z);
|
||||
|
||||
f32 sp24;
|
||||
if (sp12 == param_2 && param_2 == sp10) {
|
||||
JUT_ASSERT(2288, FALSE);
|
||||
} else if (sp12 < param_2 && param_2 < sp10) {
|
||||
sp24 = (sp4C - sp64).absXZ();
|
||||
s16 temp_r31 = cM_atan2s(sp4C.x - sp64.x, sp4C.z - sp64.z);
|
||||
|
||||
sp70 = sp64;
|
||||
sp64.x = sp70.x + (-1.0f * sp24 * cM_ssin(temp_r31));
|
||||
sp64.z = sp70.z + (-1.0f * sp24 * cM_scos(temp_r31));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(temp_r31));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(temp_r31));
|
||||
} else if (sp12 < param_2) {
|
||||
sp24 = (sp58 - sp64).absXZ();
|
||||
s16 temp_r31_2 = cM_atan2s(sp58.x - sp64.x, sp58.z - sp64.z);
|
||||
|
||||
sp70 = sp58;
|
||||
sp64.x = sp70.x + (-2.0f * sp24 * cM_ssin(temp_r31_2));
|
||||
sp64.z = sp70.z + (-2.0f * sp24 * cM_scos(temp_r31_2));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(temp_r31_2));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(temp_r31_2));
|
||||
} else if (param_2 < sp10) {
|
||||
sp24 = (sp4C - sp58).absXZ();
|
||||
s16 temp_r31_3 = cM_atan2s(sp4C.x - sp58.x, sp4C.z - sp58.z);
|
||||
|
||||
sp70 = sp58;
|
||||
sp64.x = sp70.x + (-2.0f * sp24 * cM_ssin(temp_r31_3));
|
||||
sp64.z = sp70.z + (-2.0f * sp24 * cM_scos(temp_r31_3));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(temp_r31_3));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(temp_r31_3));
|
||||
} else {
|
||||
JUT_ASSERT(2322, FALSE);
|
||||
}
|
||||
|
||||
f32 sp20;
|
||||
f32 sp1C;
|
||||
f32 sp18;
|
||||
f32 sp14;
|
||||
|
||||
daBaseNpc_PntVsLineSegmentLengthSquare2D(param_0.x, param_0.z, sp64.x, sp64.z, sp4C.x, sp4C.z, &sp20, &sp1C, &sp24);
|
||||
|
||||
if (cM3d_IsZero(sp24)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
daBaseNpc_PntVsLineSegmentLengthSquare2D(sp58.x, sp58.z, sp64.x, sp64.z, sp4C.x, sp4C.z, &sp18, &sp14, &sp24);
|
||||
|
||||
s16 var_r31;
|
||||
if (param_5 < 0) {
|
||||
var_r31 = cM_atan2s(sp64.x - sp4C.x, sp64.z - sp4C.z);
|
||||
} else {
|
||||
var_r31 = cM_atan2s(sp4C.x - sp64.x, sp4C.z - sp64.z);
|
||||
}
|
||||
|
||||
return 0x4000 - (u16)abs((s16)(var_r31 - cM_atan2s(sp18 - sp20, sp14 - sp1C))) < 0;
|
||||
}
|
||||
|
||||
/* 80150230-801502EC 14AB70 00BC+00 1/1 0/0 0/0 .text daBaseNpc_getGroundAngle__FP13cBgS_PolyInfos
|
||||
*/
|
||||
static s16 daBaseNpc_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) {
|
||||
if (dComIfG_Bgsp().ChkPolySafe(*param_0)) {
|
||||
cM3dGPla spC;
|
||||
if (!dComIfG_Bgsp().GetTriPla(*param_0, &spC) || !cBgW_CheckBGround(spC.mNormal.y)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return fopAcM_getPolygonAngle(&spC, param_1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
+395
-124
@@ -1,4 +1,4 @@
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_npc_tk.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/actor/d_a_tag_evtarea.h"
|
||||
@@ -47,14 +47,24 @@ static BOOL daNpcF_subIdx(int i_step, int i_num, u16& i_idx, BOOL i_isClosed) {
|
||||
|
||||
/* 801505F8-80150654 14AF38 005C+00 4/4 0/0 0/0 .text daNpcF_incIdx__FiRUsii */
|
||||
static BOOL daNpcF_incIdx(int i_num, u16& i_idx, BOOL i_isClosed, int i_reverse) {
|
||||
return i_reverse ? daNpcF_subIdx(1, i_num, i_idx, i_isClosed) :
|
||||
daNpcF_addIdx(1, i_num, i_idx, i_isClosed);
|
||||
BOOL result = FALSE;
|
||||
if (i_reverse) {
|
||||
result = daNpcF_subIdx(1, i_num, i_idx, i_isClosed);
|
||||
} else {
|
||||
result = daNpcF_addIdx(1, i_num, i_idx, i_isClosed);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 80150654-801506B0 14AF94 005C+00 3/3 0/0 0/0 .text daNpcF_decIdx__FiRUsii */
|
||||
static BOOL daNpcF_decIdx(int i_num, u16& i_idx, BOOL i_isClosed, int i_reverse) {
|
||||
return i_reverse ? daNpcF_addIdx(1, i_num, i_idx, i_isClosed) :
|
||||
daNpcF_subIdx(1, i_num, i_idx, i_isClosed);
|
||||
BOOL result = FALSE;
|
||||
if (i_reverse) {
|
||||
result = daNpcF_addIdx(1, i_num, i_idx, i_isClosed);
|
||||
} else {
|
||||
result = daNpcF_subIdx(1, i_num, i_idx, i_isClosed);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 801506B0-801506BC 14AFF0 000C+00 0/0 0/0 130/130 .text initialize__18daNpcF_ActorMngr_cFv */
|
||||
@@ -82,7 +92,8 @@ void daNpcF_ActorMngr_c::remove() {
|
||||
fopAc_ac_c* daNpcF_ActorMngr_c::getActorP() {
|
||||
fopAc_ac_c* actor = NULL;
|
||||
|
||||
if (fopAcM_SearchByID(mActorID, &actor) == 1 && actor != NULL) {
|
||||
BOOL foundActor = fopAcM_SearchByID(mActorID, &actor);
|
||||
if (foundActor == TRUE && actor != NULL) {
|
||||
return actor;
|
||||
}
|
||||
|
||||
@@ -106,28 +117,26 @@ void daNpcF_MatAnm_c::calc(J3DMaterial* i_material) const {
|
||||
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
if (J3DMaterialAnm::getTexMtxAnm(i).getAnmFlag()) {
|
||||
J3DTexMtxInfo* curr_mtx_info =
|
||||
&i_material->getTexGenBlock()->getTexMtx(i)->getTexMtxInfo();
|
||||
J3DTextureSRTInfo* curr_mtx_info =
|
||||
&i_material->getTexGenBlock()->getTexMtx(i)->getTexMtxInfo().mSRT;
|
||||
|
||||
if (mMorfFrm != 0) {
|
||||
f32 tmp8 = 1.0f / (mMorfFrm + 1);
|
||||
f32 tmp9 = (1.0f - tmp8);
|
||||
f32 tmp10 = field_0xF4 * (1.0f - tmp8);
|
||||
|
||||
curr_mtx_info->mSRT.mTranslationX =
|
||||
tmp10 + curr_mtx_info->mSRT.mTranslationX * tmp8;
|
||||
curr_mtx_info->mSRT.mTranslationY =
|
||||
field_0xF8 * tmp9 + curr_mtx_info->mSRT.mTranslationY * tmp8;
|
||||
curr_mtx_info->mTranslationX =
|
||||
field_0xF4 * (1.0f - tmp8) + curr_mtx_info->mTranslationX * tmp8;
|
||||
curr_mtx_info->mTranslationY =
|
||||
field_0xF8 * (1.0f - tmp8) + curr_mtx_info->mTranslationY * tmp8;
|
||||
|
||||
} else {
|
||||
if (mEyeMoveFlag != 0) {
|
||||
curr_mtx_info->mSRT.mTranslationX = mNowOffsetX;
|
||||
curr_mtx_info->mSRT.mTranslationY = mNowOffsetY;
|
||||
curr_mtx_info->mTranslationX = mNowOffsetX;
|
||||
curr_mtx_info->mTranslationY = mNowOffsetY;
|
||||
}
|
||||
}
|
||||
|
||||
field_0xF4 = curr_mtx_info->mSRT.mTranslationX;
|
||||
field_0xF8 = curr_mtx_info->mSRT.mTranslationY;
|
||||
field_0xF4 = curr_mtx_info->mTranslationX;
|
||||
field_0xF8 = curr_mtx_info->mTranslationY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,7 +176,33 @@ void daNpcF_Path_c::initialize() {
|
||||
|
||||
#if DEBUG
|
||||
void daNpcF_Path_c::drawDbgInfoXyz() {
|
||||
// UNFINISHED
|
||||
GXColor green = {0x80, 0xff, 0x80, 0xff};
|
||||
GXColor blue = {0x80, 0x80, 0xff, 0xff};
|
||||
GXColor red = {0xff, 0x80, 0x80, 0xff};
|
||||
GXColor yellow = {0xff, 0xff, 0x80, 0xff};
|
||||
|
||||
cXyz unkXyz1;
|
||||
cXyz unkXyz2;
|
||||
|
||||
for (int i = 0; i <= getNumPnts(); i++) {
|
||||
if (i < getNumPnts()) {
|
||||
unkXyz1.set(getPntPos(i).x, getPntPos(i).y, getPntPos(i).z);
|
||||
if (i != 0) {
|
||||
unkXyz2.set(getPntPos(i - 1).x, getPntPos(i - 1).y, getPntPos(i - 1).z);
|
||||
dDbVw_drawLineOpa(unkXyz1, unkXyz2, red, 1, 12);
|
||||
}
|
||||
|
||||
if (i == getIdx()) {
|
||||
dDbVw_drawSphereOpa(unkXyz1, 50.0f, yellow, 1);
|
||||
} else {
|
||||
dDbVw_drawSphereOpa(unkXyz1, 9.0f, (GXColor){0xff, 0xff, 0xff, 0xff}, 1);
|
||||
}
|
||||
} else if (mIsClosed) {
|
||||
unkXyz1.set(getPntPos(i - 1).x, getPntPos(i - 1).y, getPntPos(i - 1).z);
|
||||
unkXyz2.set(getPntPos(0).x, getPntPos(0).y, getPntPos(0).z);
|
||||
dDbVw_drawLineOpa(unkXyz1, unkXyz2, red, 1, 12);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -233,8 +268,9 @@ int daNpcF_Path_c::getBeforeIdx() {
|
||||
|
||||
/* 80150CA8-80150D44 14B5E8 009C+00 0/0 0/0 1/1 .text getBeforePos__13daNpcF_Path_cFR4cXyz */
|
||||
BOOL daNpcF_Path_c::getBeforePos(cXyz& o_pos) {
|
||||
BOOL ret = FALSE;
|
||||
u16 idx = mIdx;
|
||||
BOOL ret = daNpcF_decIdx(mPathInfo->m_num, idx, chkClose(), mIsReversed);
|
||||
ret = daNpcF_decIdx(mPathInfo->m_num, idx, chkClose(), mIsReversed);
|
||||
|
||||
o_pos = getPntPos(idx);
|
||||
return ret;
|
||||
@@ -243,9 +279,10 @@ BOOL daNpcF_Path_c::getBeforePos(cXyz& o_pos) {
|
||||
/* 80150D44-80150DE0 14B684 009C+00 0/0 0/0 1/1 .text getNextPos__13daNpcF_Path_cFR4cXyz
|
||||
*/
|
||||
BOOL daNpcF_Path_c::getNextPos(cXyz& o_pos) {
|
||||
BOOL ret = FALSE;
|
||||
u16 idx = mIdx;
|
||||
|
||||
BOOL ret = daNpcF_incIdx(mPathInfo->m_num, idx, chkClose(), mIsReversed);
|
||||
ret = daNpcF_incIdx(mPathInfo->m_num, idx, chkClose(), mIsReversed);
|
||||
|
||||
o_pos = getPntPos(idx);
|
||||
return ret;
|
||||
@@ -253,18 +290,18 @@ BOOL daNpcF_Path_c::getNextPos(cXyz& o_pos) {
|
||||
|
||||
/* 80150DE0-80150EB4 14B720 00D4+00 0/0 0/0 16/16 .text getDstPos__13daNpcF_Path_cF4cXyzR4cXyz */
|
||||
int daNpcF_Path_c::getDstPos(cXyz i_pos1, cXyz& o_pos2) {
|
||||
BOOL ret = false;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
while (!ret) {
|
||||
o_pos2 = getPntPos(getIdx());
|
||||
|
||||
if (!chkPassed(i_pos1)) {
|
||||
if (chkPassed(i_pos1)) {
|
||||
if (setNextIdx()) {
|
||||
ret = true;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
if (setNextIdx()) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -370,7 +407,7 @@ void daNpcF_Lookat_c::calc(fopAc_ac_c* i_actor, Mtx i_baseTransformMtx, csXyz**
|
||||
cLib_addCalc2(&sp1C, angY, 0.25f, (f32)(0x800 / j));
|
||||
|
||||
if (i_debug) {
|
||||
OS_REPORT("|%d| a:%f(%d), b:%f(%d), axis:%d\n", i, sp1C, o_lookatAngle[i]->y, angY, mRotAngle[i].y, i_snap);
|
||||
OS_REPORT("|%d| a:%f(%d), b:%f(%d), axis:%d\n", i, sp1C, o_lookatAngle[i]->y, angY, mRotAngle[i].y, i_axis);
|
||||
}
|
||||
|
||||
if (i_axis > 0 && angY - sp1C < 0.0f) {
|
||||
@@ -443,8 +480,7 @@ void daNpcF_Lookat_c::initCalc(fopAc_ac_c* i_actor, Mtx i_baseTransformMtx, cXyz
|
||||
mDoMtx_stack_c::multVec(&local_90, ¶m_5);
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
cXyz* vec = ¶m_2[i];
|
||||
local_90 = vec[1] - vec[0];
|
||||
local_90 = (param_2 + i)[1] - (param_2 + i)[0];
|
||||
param_4[i] = local_90.abs();
|
||||
param_3[i].setall(0);
|
||||
param_3[i].x = -cM_atan2s(local_90.y, local_90.absXZ());
|
||||
@@ -474,8 +510,7 @@ void daNpcF_Lookat_c::update(cXyz* param_0, csXyz* param_1, f32* param_2) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mDoMtx_stack_c::XYZrotS(param_1[i]);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), mtx);
|
||||
pparam0i = ¶m_0[i];
|
||||
mDoMtx_stack_c::transS(pparam0i[0]);
|
||||
mDoMtx_stack_c::transS(param_0[i]);
|
||||
|
||||
ang.x += mAngularMoveDis[i].x;
|
||||
ang.y += mAngularMoveDis[i].y;
|
||||
@@ -483,7 +518,7 @@ void daNpcF_Lookat_c::update(cXyz* param_0, csXyz* param_1, f32* param_2) {
|
||||
mDoMtx_stack_c::concat(mtx);
|
||||
|
||||
vec.set(0.0f, 0.0f, param_2[i]);
|
||||
mDoMtx_stack_c::multVec(&vec, &pparam0i[1]);
|
||||
mDoMtx_stack_c::multVec(&vec, ¶m_0[i] + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,23 +526,34 @@ void daNpcF_Lookat_c::update(cXyz* param_0, csXyz* param_1, f32* param_2) {
|
||||
* calcMoveDisAngle__15daNpcF_Lookat_cFiP4cXyzP5csXyz4cXyzii */
|
||||
void daNpcF_Lookat_c::calcMoveDisAngle(int i_no, cXyz* param_1, csXyz* param_2, cXyz param_3,
|
||||
int i_axis, int i_debug) {
|
||||
cXyz vec1;
|
||||
cXyz vec2;
|
||||
|
||||
if (i_axis == 0) {
|
||||
field_0x94[i_no] = false;
|
||||
}
|
||||
|
||||
s16 pitch1, yaw1, pitch2, yaw2, mvx, mvy;
|
||||
if (!field_0x94[i_no]) {
|
||||
cXyz vec1 = param_3 - param_1[i_no];
|
||||
vec1 = param_3 - param_1[i_no];
|
||||
if (!vec1.isZero()) {
|
||||
vec1.normalize();
|
||||
cXyz vec2 = param_1[3] - param_1[i_no];
|
||||
vec2 = param_1[3] - param_1[i_no];
|
||||
if (!vec2.isZero()) {
|
||||
vec2.normalize();
|
||||
s16 ivar3 = -cM_atan2s(vec1.y, vec1.absXZ());
|
||||
s16 ivar4 = cM_atan2s(vec1.x, vec1.z);
|
||||
s16 ivar5 = -cM_atan2s(vec2.y, vec2.absXZ());
|
||||
s16 ivar6 = cM_atan2s(vec2.x, vec2.z);
|
||||
mAngularMoveDis[i_no].x += (s16)(ivar3 - ivar5);
|
||||
mAngularMoveDis[i_no].y += (s16)(ivar4 - ivar6);
|
||||
pitch1 = -cM_atan2s(vec1.y, vec1.absXZ());
|
||||
yaw1 = cM_atan2s(vec1.x, vec1.z);
|
||||
pitch2 = -cM_atan2s(vec2.y, vec2.absXZ());
|
||||
yaw2 = cM_atan2s(vec2.x, vec2.z);
|
||||
mvx = pitch1 - pitch2;
|
||||
mvy = yaw1 - yaw2;
|
||||
mAngularMoveDis[i_no].x += mvx;
|
||||
mAngularMoveDis[i_no].y += mvy;
|
||||
if (i_debug) {
|
||||
OS_REPORT("*******%d: mvy:%d, mAngularMoveDis:%d, angle:%d(%d/%d)\n",
|
||||
i_no, mvy, mAngularMoveDis[i_no].y, param_2[i_no].y,
|
||||
mMinAngle[i_no].y, mMaxAngle[i_no].y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -517,6 +563,11 @@ void daNpcF_Lookat_c::calcMoveDisAngle(int i_no, cXyz* param_1, csXyz* param_2,
|
||||
adjustMoveDisAngle(mAngularMoveDis[i_no].y, param_2[i_no].y,
|
||||
mMinAngle[i_no].y, mMaxAngle[i_no].y);
|
||||
|
||||
if (i_debug) {
|
||||
OS_REPORT("+++++++%d: mvy:%d, mAngularMoveDis:%d\n",
|
||||
i_no, mvy, mAngularMoveDis[i_no].y);
|
||||
}
|
||||
|
||||
if (i_axis < 0 && mAngularMoveDis[i_no].y > 0) {
|
||||
field_0x94[i_no] = false;
|
||||
}
|
||||
@@ -643,19 +694,17 @@ int daNpcF_c::draw(BOOL i_isTest, BOOL param_1, f32 i_shadowDepth, _GXColorS10*
|
||||
} else {
|
||||
g_env_light.settingTevStruct(0, ¤t.pos, &tevStr);
|
||||
}
|
||||
g_env_light.setLightTevColorType_MAJI(model->getModelData(), &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model, &tevStr);
|
||||
|
||||
if (!drawDbgInfo()) {
|
||||
if (mAnmFlags & ANM_PLAY_BTP) {
|
||||
mBtpAnm.entry(&modelData->getMaterialTable(), (s16)mBtpAnm.getFrame());
|
||||
mBtpAnm.entry(modelData);
|
||||
}
|
||||
if (mAnmFlags & ANM_PLAY_BTK) {
|
||||
frame = mBtkAnm.getFrame();
|
||||
mBtkAnm.entry(&modelData->getMaterialTable(), frame);
|
||||
mBtkAnm.entry(modelData);
|
||||
}
|
||||
if (mAnmFlags & ANM_PLAY_BRK) {
|
||||
frame = mBrkAnm.getFrame();
|
||||
mBrkAnm.entry(&modelData->getMaterialTable(), frame);
|
||||
mBrkAnm.entry(modelData);
|
||||
}
|
||||
|
||||
if (param_1) {
|
||||
@@ -696,15 +745,35 @@ int daNpcF_c::draw(BOOL i_isTest, BOOL param_1, f32 i_shadowDepth, _GXColorS10*
|
||||
void daNpcF_c::tgHitCallBack(fopAc_ac_c* i_this, dCcD_GObjInf* param_1, fopAc_ac_c* i_actor,
|
||||
dCcD_GObjInf* param_3) {
|
||||
if (i_actor != NULL && fopAcM_GetProfName(i_actor) == PROC_ALINK) {
|
||||
daNpcF_c* npc = static_cast<daNpcF_c*>(i_this);
|
||||
if (daPy_getPlayerActorClass() == i_actor) {
|
||||
u8 cut_type = static_cast<daPy_py_c*>(i_actor)->getCutType();
|
||||
static_cast<daNpcF_c*>(i_this)->setCutType(cut_type);
|
||||
npc->setCutType(static_cast<daPy_py_c*>(i_actor)->getCutType());
|
||||
} else {
|
||||
static_cast<daNpcF_c*>(i_this)->setCutType(daPy_py_c::CUT_TYPE_NM_VERTICAL);
|
||||
npc->setCutType(daPy_py_c::CUT_TYPE_NM_VERTICAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 803B37E0-803B3824 010900 0044+00 0/0 0/0 36/36 .data mCcDCyl__8daNpcF_c */
|
||||
dCcD_SrcCyl daNpcF_c::mCcDCyl = {
|
||||
daNpcF_c::mCcDObjInfo,
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
0.0f, // mRadius
|
||||
0.0f // mHeight
|
||||
} // mCyl
|
||||
};
|
||||
|
||||
/* 803B3824-803B3864 010944 0040+00 0/0 0/0 2/2 .data mCcDSph__8daNpcF_c */
|
||||
dCcD_SrcSph daNpcF_c::mCcDSph = {
|
||||
daNpcF_c::mCcDObjInfo,
|
||||
{
|
||||
{{0.0f, 0.0f, 0.0f}, 0.0f} // mSph
|
||||
} // mSphAttr
|
||||
};
|
||||
|
||||
char daNpcF_c::mFileNameBuf[0x15];
|
||||
|
||||
/* 804257E8-80425978 052508 0190+00 4/4 0/0 0/0 .bss mFindActorPList__8daNpcF_c */
|
||||
fopAc_ac_c* daNpcF_c::mFindActorPList[100];
|
||||
|
||||
@@ -713,12 +782,15 @@ s32 daNpcF_c::mFindCount;
|
||||
|
||||
/* 80152654-801526E8 14CF94 0094+00 0/0 0/0 12/12 .text srchAttnActor1__8daNpcF_cFPvPv */
|
||||
void* daNpcF_c::srchAttnActor1(void* i_proc, void* param_1) {
|
||||
void* param_1_copy = param_1;
|
||||
fopAc_ac_c* actor = NULL;
|
||||
if (mFindCount < 100 && fopAcM_IsActor(i_proc)
|
||||
&& (fopAcM_GetName(i_proc) == PROC_NI || fopAcM_GetName(i_proc) == PROC_COW
|
||||
|| fopAcM_GetName(i_proc) == PROC_NPC_NE || fopAcM_GetName(i_proc) == PROC_DO
|
||||
|| fopAcM_GetName(i_proc) == PROC_SQ || fopAcM_GetName(i_proc) == PROC_BD))
|
||||
{
|
||||
mFindActorPList[mFindCount] = static_cast<fopAc_ac_c*>(i_proc);
|
||||
actor = static_cast<fopAc_ac_c*>(i_proc);
|
||||
mFindActorPList[mFindCount] = actor;
|
||||
mFindCount++;
|
||||
}
|
||||
return NULL;
|
||||
@@ -729,10 +801,13 @@ s16 daNpcF_c::mSrchActorName;
|
||||
|
||||
/* 801526E8-8015276C 14D028 0084+00 1/1 0/0 0/0 .text srchActor__8daNpcF_cFPvPv */
|
||||
void* daNpcF_c::srchActor(void* i_proc, void* i_this) {
|
||||
if (mFindCount < 100 && fopAc_IsActor(i_proc) && i_proc != i_this
|
||||
void* i_this_copy = i_this;
|
||||
fopAc_ac_c* actor = NULL;
|
||||
if (mFindCount < 100 && fopAcM_IsActor(i_proc) && i_proc != i_this
|
||||
&& mSrchActorName == fopAcM_GetName(i_proc))
|
||||
{
|
||||
mFindActorPList[mFindCount] = static_cast<fopAc_ac_c*>(i_proc);
|
||||
actor = static_cast<fopAc_ac_c*>(i_proc);
|
||||
mFindActorPList[mFindCount] = actor;
|
||||
mFindCount++;
|
||||
}
|
||||
|
||||
@@ -742,6 +817,7 @@ void* daNpcF_c::srchActor(void* i_proc, void* i_this) {
|
||||
/* 8015276C-801527FC 14D0AC 0090+00 2/0 0/0 40/9 .text setMtx__8daNpcF_cFv */
|
||||
void daNpcF_c::setMtx() {
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
J3DModelData* modelData = model->getModelData();
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(mCurAngle);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
@@ -759,6 +835,7 @@ void daNpcF_c::setMtx() {
|
||||
/* 801527FC-801528C8 14D13C 00CC+00 2/0 0/0 38/0 .text setMtx2__8daNpcF_cFv */
|
||||
void daNpcF_c::setMtx2() {
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
J3DModelData* modelData = model->getModelData();
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(mCurAngle);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
@@ -872,30 +949,36 @@ void daNpcF_c::initialize() {
|
||||
/* 80152B2C-80152B68 14D46C 003C+00 0/0 0/0 69/69 .text getTrnsfrmKeyAnmP__8daNpcF_cFPci
|
||||
*/
|
||||
J3DAnmTransformKey* daNpcF_c::getTrnsfrmKeyAnmP(char* i_arcName, int i_resIdx) {
|
||||
return (J3DAnmTransformKey*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
J3DAnmTransformKey* key = (J3DAnmTransformKey*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
return key;
|
||||
}
|
||||
|
||||
/* 80152B68-80152BA4 14D4A8 003C+00 0/0 0/0 31/31 .text getTexPtrnAnmP__8daNpcF_cFPci */
|
||||
J3DAnmTexPattern* daNpcF_c::getTexPtrnAnmP(char* i_arcName, int i_resIdx) {
|
||||
return (J3DAnmTexPattern*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
J3DAnmTexPattern* pattern = (J3DAnmTexPattern*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
return pattern;
|
||||
}
|
||||
|
||||
/* 80152BA4-80152BE0 14D4E4 003C+00 0/0 0/0 50/50 .text getTexSRTKeyAnmP__8daNpcF_cFPci
|
||||
*/
|
||||
J3DAnmTextureSRTKey* daNpcF_c::getTexSRTKeyAnmP(char* i_arcName, int i_resIdx) {
|
||||
return (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
J3DAnmTextureSRTKey* key = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
return key;
|
||||
}
|
||||
|
||||
/* 80152BE0-80152C1C 14D520 003C+00 0/0 0/0 2/2 .text getTevRegKeyAnmP__8daNpcF_cFPci */
|
||||
J3DAnmTevRegKey* daNpcF_c::getTevRegKeyAnmP(char* i_arcName, int i_resIdx) {
|
||||
return (J3DAnmTevRegKey*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
J3DAnmTevRegKey* key = (J3DAnmTevRegKey*)dComIfG_getObjectRes(i_arcName, i_resIdx);
|
||||
return key;
|
||||
}
|
||||
|
||||
/* 80152C1C-80152C80 14D55C 0064+00 0/0 0/0 38/38 .text
|
||||
* setMcaMorfAnm__8daNpcF_cFP18J3DAnmTransformKeyffiii */
|
||||
BOOL daNpcF_c::setMcaMorfAnm(J3DAnmTransformKey* i_anm, f32 i_speed, f32 i_morf, int i_mode,
|
||||
int i_start, int i_end) {
|
||||
mAnm_p->setAnm(i_anm, i_mode, i_morf, i_speed, (f32)i_start, (f32)i_end);
|
||||
f32 start = i_start;
|
||||
f32 end = i_end;
|
||||
mAnm_p->setAnm(i_anm, i_mode, i_morf, i_speed, start, end);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -903,7 +986,9 @@ BOOL daNpcF_c::setMcaMorfAnm(J3DAnmTransformKey* i_anm, f32 i_speed, f32 i_morf,
|
||||
* setBckAnm__8daNpcF_cFP15J3DAnmTransformfiiib */
|
||||
BOOL daNpcF_c::setBckAnm(J3DAnmTransform* i_bck, f32 i_speed, int i_mode, int i_start, int i_end,
|
||||
bool i_modify) {
|
||||
return mBckAnm.init(i_bck, true, i_mode, i_speed, (s16)i_start, (s16)i_end, i_modify);
|
||||
s16 start = i_start;
|
||||
s16 end = i_end;
|
||||
return mBckAnm.init(i_bck, true, i_mode, i_speed, start, end, i_modify);
|
||||
}
|
||||
|
||||
/* 80152CC4-80152D04 14D604 0040+00 0/0 0/0 32/32 .text
|
||||
@@ -935,7 +1020,7 @@ void daNpcF_c::setEnvTevColor() {
|
||||
|
||||
/* 80152DE0-80152E24 14D720 0044+00 1/1 0/0 40/40 .text setRoomNo__8daNpcF_cFv */
|
||||
void daNpcF_c::setRoomNo() {
|
||||
int room_id = dComIfG_Bgsp().GetRoomId(mGndChk);
|
||||
s8 room_id = dComIfG_Bgsp().GetRoomId(mGndChk);
|
||||
fopAcM_SetRoomNo(this, room_id);
|
||||
mCcStts.SetRoomId(room_id);
|
||||
}
|
||||
@@ -949,6 +1034,7 @@ BOOL daNpcF_c::chkEndAnm(f32 param_0) {
|
||||
case J3DFrameCtrl::EMode_RESET:
|
||||
return mAnm_p->isStop() && mAnm_p->getPlaySpeed() == 0.0f && param_0 != 0.0f;
|
||||
case J3DFrameCtrl::EMode_REVERSE:
|
||||
case J3DFrameCtrl::EMode_LOOP_REVERSE:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -970,6 +1056,7 @@ BOOL daNpcF_c::chkEndAnm(J3DFrameCtrl* frameCtrl, f32 prevRate) {
|
||||
case J3DFrameCtrl::EMode_RESET:
|
||||
return frameCtrl->checkState(1) && frameCtrl->getRate() == 0.0f && prevRate != 0.0f;
|
||||
case J3DFrameCtrl::EMode_REVERSE:
|
||||
case J3DFrameCtrl::EMode_LOOP_REVERSE:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -1151,7 +1238,7 @@ void daNpcF_c::setLookatMtx(int i_jointNo, int* i_jointList, f32 i_neckHeadAngle
|
||||
mLookatAngle[1].y = (s16)((f32)mLookatAngle[2].y * i_neckHeadAngleRatio);
|
||||
mLookatAngle[1].z = (s16)((f32)mLookatAngle[2].z * i_neckHeadAngleRatio);
|
||||
|
||||
MTXCopy(mDoMtx_stack_c::get(), baseMtx);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), baseMtx);
|
||||
pos.set(baseMtx[0][3], baseMtx[1][3], baseMtx[2][3]);
|
||||
baseMtx[0][3] = baseMtx[1][3] = baseMtx[2][3] = 0.0f;
|
||||
|
||||
@@ -1164,7 +1251,7 @@ void daNpcF_c::setLookatMtx(int i_jointNo, int* i_jointList, f32 i_neckHeadAngle
|
||||
}
|
||||
}
|
||||
mDoMtx_stack_c::inverse();
|
||||
MTXCopy(mDoMtx_stack_c::get(), invParentMtx);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), invParentMtx);
|
||||
|
||||
mDoMtx_stack_c::transS(pos);
|
||||
mDoMtx_stack_c::XYZrotM(mCurAngle);
|
||||
@@ -1183,12 +1270,15 @@ void daNpcF_c::setLookatMtx(int i_jointNo, int* i_jointList, f32 i_neckHeadAngle
|
||||
/* 80153578-80153658 14DEB8 00E0+00 0/0 0/0 13/13 .text hitChk2__8daNpcF_cFP8dCcD_Cylii
|
||||
*/
|
||||
BOOL daNpcF_c::hitChk2(dCcD_Cyl* i_ccCyl, BOOL param_1, BOOL param_2) {
|
||||
fopAc_ac_c* hit_actor = NULL;
|
||||
s16 actorAngleY;
|
||||
static_cast<dCcD_Stts*>(i_ccCyl->GetStts())->Move();
|
||||
|
||||
if (mDamageTimer == 0 && i_ccCyl->ChkTgHit()) {
|
||||
fopAc_ac_c* hit_actor = i_ccCyl->GetTgHitAc();
|
||||
hit_actor = i_ccCyl->GetTgHitAc();
|
||||
if (hit_actor != NULL) {
|
||||
field_0x990 = fopAcM_searchActorAngleY(this, hit_actor) - mCurAngle.y;
|
||||
actorAngleY = fopAcM_searchActorAngleY(this, hit_actor);
|
||||
field_0x990 = actorAngleY - mCurAngle.y;
|
||||
if (fopAcM_GetName(hit_actor) == PROC_NPC_TK) {
|
||||
if (param_1) {
|
||||
static_cast<daNPC_TK_c*>(hit_actor)->setBump();
|
||||
@@ -1219,8 +1309,8 @@ void daNpcF_c::setDamage(int i_timer, int i_expression, int i_motion) {
|
||||
setMotion(i_motion, 0.0f, true);
|
||||
}
|
||||
|
||||
field_0x984[0] = 8192.0f;
|
||||
field_0x984[2] = 12743.0f;
|
||||
field_0x984[0] = cM_deg2s(45.0f);
|
||||
field_0x984[2] = cM_deg2s(70.0f);
|
||||
field_0x992 = 0x4000;
|
||||
mTotalDamageTimer = i_timer;
|
||||
mDamageTimer = mTotalDamageTimer;
|
||||
@@ -1236,8 +1326,7 @@ int daNpcF_c::ctrlMsgAnm(int& o_expression, int& o_motion, fopAc_ac_c* param_2,
|
||||
o_motion = -1;
|
||||
|
||||
if (param_3 || eventInfo.checkCommandTalk() || mStaffID != -1) {
|
||||
fopAc_ac_c* talkPartner = dComIfGp_event_getTalkPartner();
|
||||
if (talkPartner == param_2) {
|
||||
if (dComIfGp_event_getTalkPartner() == param_2) {
|
||||
msg_class* msg_p = dMsgObject_c::getActor();
|
||||
JUT_ASSERT(2780, NULL != msg_p);
|
||||
|
||||
@@ -1250,7 +1339,7 @@ int daNpcF_c::ctrlMsgAnm(int& o_expression, int& o_motion, fopAc_ac_c* param_2,
|
||||
field_0x9a4 = msg_p->msg_idx;
|
||||
}
|
||||
|
||||
if (dMsgObject_c::isMouthCheck()) {
|
||||
if (dMsgObject_isMouthCheck()) {
|
||||
mAnmFlags &= ~ANM_PAUSE_EXPRESSION;
|
||||
} else {
|
||||
mAnmFlags |= ANM_PAUSE_EXPRESSION;
|
||||
@@ -1284,7 +1373,13 @@ void daNpcF_c::orderEvent(int i_speak, char* i_evtName, u16 param_2, u16 i_prior
|
||||
if (i_evtName != NULL) {
|
||||
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()) {
|
||||
} else if (
|
||||
#if PLATFORM_SHIELD
|
||||
true
|
||||
#else
|
||||
!mTwilight|| daPy_py_c::checkNowWolfEyeUp()
|
||||
#endif
|
||||
) {
|
||||
if ((attention_info.flags & fopAc_AttnFlag_SPEAK_e) || (attention_info.flags & fopAc_AttnFlag_TALK_e)) {
|
||||
eventInfo.onCondition(dEvtCnd_CANTALK_e);
|
||||
if (i_speak) {
|
||||
@@ -1312,10 +1407,10 @@ void daNpcF_c::changeEvent(char* i_arcName, char* i_evtName, u16 param_2, u16 pa
|
||||
/* 801539F0-80153A78 14E330 0088+00 0/0 0/0 21/21 .text chkActorInSight__8daNpcF_cFP10fopAc_ac_cf
|
||||
*/
|
||||
BOOL daNpcF_c::chkActorInSight(fopAc_ac_c* i_actor, f32 i_fovY) {
|
||||
s16 tmp = mHeadAngle.y;
|
||||
s16 angle = fopAcM_searchActorAngleY(this, i_actor) - tmp;
|
||||
s16 abs_angle = abs(angle);
|
||||
return i_fovY == 180.0f || abs_angle < cM_deg2s(i_fovY);
|
||||
s16 angle = mHeadAngle.y;
|
||||
angle = fopAcM_searchActorAngleY(this, i_actor) - angle;
|
||||
angle = abs(angle);
|
||||
return i_fovY == 180.0f || angle < cM_deg2s(i_fovY);
|
||||
}
|
||||
|
||||
/* 80153A78-80153BDC 14E3B8 0164+00 1/1 0/0 0/0 .text
|
||||
@@ -1329,8 +1424,8 @@ BOOL daNpcF_c::chkActorInSight(fopAc_ac_c* i_actor, f32 i_fovY) {
|
||||
* @return Whether the actor's position vector lies in the elliptic cylinder.
|
||||
*/
|
||||
BOOL daNpcF_c::chkActorInArea(fopAc_ac_c* i_actor, cXyz i_center, cXyz i_bounds, s16 i_angleY) {
|
||||
cXyz delta, relPos;
|
||||
BOOL ret = false;
|
||||
cXyz delta, relPos;
|
||||
|
||||
mDoMtx_stack_c::YrotS(-i_angleY);
|
||||
mDoMtx_stack_c::transM(-i_center.x, -i_center.y, -i_center.z);
|
||||
@@ -1382,9 +1477,8 @@ BOOL daNpcF_c::chkActorInAttnArea(fopAc_ac_c* i_actorCheck, fopAc_ac_c* i_actorA
|
||||
/* 80153D1C-80153D84 14E65C 0068+00 0/0 0/0 118/118 .text initTalk__8daNpcF_cFiPP10fopAc_ac_c */
|
||||
BOOL daNpcF_c::initTalk(int i_flowID, fopAc_ac_c** param_1) {
|
||||
mFlow.init(this, i_flowID, 0, param_1);
|
||||
f32 tmp = 0.0f;
|
||||
speedF = tmp;
|
||||
speed.set(tmp, tmp, tmp);
|
||||
speedF = 0.0f;
|
||||
speed.setall(0.0f);
|
||||
mOrderSpeakEvt = false;
|
||||
field_0x9ec = false;
|
||||
return true;
|
||||
@@ -1397,9 +1491,9 @@ BOOL daNpcF_c::talkProc(int* param_0, BOOL param_1, fopAc_ac_c** i_talkPartners_
|
||||
motion = -1;
|
||||
expression = -1;
|
||||
|
||||
if (dMsgObject_c::isMsgSendControl()) {
|
||||
if (dMsgObject_isMsgSendControl()) {
|
||||
if (param_1) {
|
||||
dMsgObject_c::offMsgSendControl();
|
||||
dMsgObject_offMsgSendControl();
|
||||
}
|
||||
} else if (mFlow.doFlow(this, i_talkPartners_p, 0)) {
|
||||
ret = true;
|
||||
@@ -1430,7 +1524,7 @@ BOOL daNpcF_c::talkProc(int* param_0, BOOL param_1, fopAc_ac_c** i_talkPartners_
|
||||
BOOL daNpcF_c::turn(s16 i_targetAngle, f32 i_rate, int i_direction) {
|
||||
int target_angle = i_targetAngle;
|
||||
if (mTurnAmount == 0) {
|
||||
mTurnStepNum = fabsf(cM_sht2d((s16)(current.angle.y - target_angle)));
|
||||
mTurnStepNum = fabsf(cM_sht2d((s16)(current.angle.y - i_targetAngle)));
|
||||
mTurnStepNum = (mTurnStepNum / 180.0f) * i_rate;
|
||||
mTurnStepNum = (int)mTurnStepNum + 1;
|
||||
if (mTurnStepNum < 8.0f) {
|
||||
@@ -1441,16 +1535,15 @@ BOOL daNpcF_c::turn(s16 i_targetAngle, f32 i_rate, int i_direction) {
|
||||
|
||||
s16 turn_start_angle = mTurnStartAngle;
|
||||
if (i_direction == 0) {
|
||||
i_direction = (s16)(target_angle - turn_start_angle) >= 0 ? 1 : -1;
|
||||
i_direction = (s16)(i_targetAngle - mTurnStartAngle) >= 0 ? 1 : -1;
|
||||
}
|
||||
|
||||
u16 angle_diff = target_angle - turn_start_angle;
|
||||
int signed_angle_diff = angle_diff;
|
||||
u32 turn_angle = (u16)(target_angle - turn_start_angle);
|
||||
if (i_direction < 0) {
|
||||
signed_angle_diff = -(u16)(0xffff - angle_diff);
|
||||
turn_angle = -(u16)(0xffff - turn_angle);
|
||||
}
|
||||
|
||||
int turn_angle = (int)(signed_angle_diff * cM_ssin(mTurnAmount));
|
||||
turn_angle = (int)((int)turn_angle * cM_ssin(mTurnAmount));
|
||||
mTurnAmount = (int)((f32)mTurnAmount + (f32)0x4000 / mTurnStepNum);
|
||||
if ((u16)mTurnAmount >= 0x4000) {
|
||||
current.angle.y = i_targetAngle;
|
||||
@@ -1465,7 +1558,8 @@ BOOL daNpcF_c::turn(s16 i_targetAngle, f32 i_rate, int i_direction) {
|
||||
/* 801540A4-80154250 14E9E4 01AC+00 0/0 0/0 58/58 .text step__8daNpcF_cFsiii */
|
||||
BOOL daNpcF_c::step(s16 i_targetAngle, int i_expression, int i_motion, int i_rate) {
|
||||
if (mTurnMode == 0) {
|
||||
if ((int)fabsf(cM_sht2d((s16)(i_targetAngle - mCurAngle.y))) > 40) {
|
||||
s16 angleDiff = i_targetAngle - mCurAngle.y;
|
||||
if ((int)fabsf(cM_sht2d(angleDiff)) > 40) {
|
||||
if (i_expression >= 0) {
|
||||
setExpression(i_expression, -1.0f);
|
||||
}
|
||||
@@ -1563,8 +1657,10 @@ fopAc_ac_c* daNpcF_c::getAttnActorP(BOOL i_playerAttn, fpcLyIt_JudgeFunc i_searc
|
||||
fpcM_Search(i_searchFunc, this);
|
||||
|
||||
int i, j;
|
||||
BOOL sp30;
|
||||
int unusedInt1;
|
||||
for (i = 0; i < mFindCount; i++) {
|
||||
BOOL sp30 = chkPointInArea(getAttentionPos(mFindActorPList[i]), attention_info.position,
|
||||
sp30 = chkPointInArea(getAttentionPos(mFindActorPList[i]), attention_info.position,
|
||||
var_f30, i_offsetY1, i_offsetY2, 0);
|
||||
if (sp30 && chkActorInSight2(mFindActorPList[i], i_fovY, i_sightAngle)) {
|
||||
for (j = 0; j < 5; j++) {
|
||||
@@ -1593,8 +1689,9 @@ fopAc_ac_c* daNpcF_c::getAttnActorP(BOOL i_playerAttn, fpcLyIt_JudgeFunc i_searc
|
||||
if (actor != NULL) {
|
||||
sp34 = 900;
|
||||
i = 0;
|
||||
j = unusedInt1 = 0;
|
||||
|
||||
for (j = 0; j < 5; j++) {
|
||||
for (; j < 5; j++) {
|
||||
if (mAttnActorTimer[j] < sp34) {
|
||||
sp34 = mAttnActorTimer[j];
|
||||
i = j;
|
||||
@@ -1633,10 +1730,10 @@ BOOL daNpcF_c::chkActorInSight2(fopAc_ac_c* i_actor, f32 i_fovY, s16 i_sightAngl
|
||||
if (ang_diff < 0) {
|
||||
ang_diff = -ang_diff;
|
||||
}
|
||||
return ang_diff <= fov_y;
|
||||
} else {
|
||||
return true;
|
||||
return (ang_diff > fov_y) == FALSE;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 80154834-801548F4 14F174 00C0+00 2/2 0/0 0/0 .text chkPointInArea__8daNpcF_cF4cXyz4cXyzfffs */
|
||||
@@ -1644,10 +1741,10 @@ BOOL daNpcF_c::chkPointInArea(cXyz i_point, cXyz param_1, f32 i_radius, f32 i_of
|
||||
f32 i_offsetY2, s16 i_angleY) {
|
||||
cXyz bounds, center;
|
||||
|
||||
f32 lower = i_offsetY2;
|
||||
f32 upper = i_offsetY1;
|
||||
f32 lower = i_offsetY2;
|
||||
|
||||
if (i_offsetY1 < i_offsetY2) {
|
||||
if (upper < lower) {
|
||||
lower = i_offsetY1;
|
||||
upper = i_offsetY2;
|
||||
}
|
||||
@@ -1706,9 +1803,10 @@ BOOL daNpcF_c::chkFindPlayer2(BOOL i_hasAttn, s16 i_angle) {
|
||||
fovy = 135.0f;
|
||||
}
|
||||
|
||||
sp20 = chkPointInArea(attn_pos, attention_info.position, dist_max, lower_y, upper_y, 0);
|
||||
if (sp20 && chkActorInSight2(daPy_getPlayerActorClass(), fovy, i_angle)) {
|
||||
return true;
|
||||
if (chkPointInArea(attn_pos, attention_info.position, dist_max, lower_y, upper_y, 0)) {
|
||||
if (chkActorInSight2(daPy_getPlayerActorClass(), fovy, i_angle)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1750,6 +1848,7 @@ BOOL daNpcF_pntVsLineSegmentLengthSquare2D(f32 i_pntX, f32 i_pntZ, f32 i_startX,
|
||||
f32 i_endX, f32 i_endZ, f32* o_projX, f32* o_projZ,
|
||||
f32* o_dist2) {
|
||||
BOOL ret = false;
|
||||
f32 prm;
|
||||
f32 len2;
|
||||
f32 line_x = i_endX - i_startX;
|
||||
f32 line_z = i_endZ - i_startZ;
|
||||
@@ -1760,7 +1859,7 @@ BOOL daNpcF_pntVsLineSegmentLengthSquare2D(f32 i_pntX, f32 i_pntZ, f32 i_startX,
|
||||
return false;
|
||||
}
|
||||
|
||||
f32 prm = (line_x * (i_pntX - i_startX) + line_z * (i_pntZ - i_startZ)) / len2;
|
||||
prm = (line_x * (i_pntX - i_startX) + line_z * (i_pntZ - i_startZ)) / len2;
|
||||
|
||||
if (0.0f <= prm && prm <= 1.0f) {
|
||||
ret = true;
|
||||
@@ -1801,7 +1900,9 @@ BOOL daNpcF_chkPassed(cXyz i_pos, dPnt* i_points, u16 i_idx, u16 i_num, BOOL i_i
|
||||
|
||||
f32 dist;
|
||||
s16 angle;
|
||||
if (prev_idx != i_idx || next_idx != i_idx) {
|
||||
if (prev_idx == i_idx && next_idx == i_idx) {
|
||||
JUT_ASSERT(0xff9, FALSE);
|
||||
} else {
|
||||
if (prev_idx < i_idx && i_idx < next_idx) {
|
||||
dist = (next_pos - prev_pos).absXZ();
|
||||
angle = cM_atan2s(next_pos.x - prev_pos.x, next_pos.z - prev_pos.z);
|
||||
@@ -1826,6 +1927,8 @@ BOOL daNpcF_chkPassed(cXyz i_pos, dPnt* i_points, u16 i_idx, u16 i_num, BOOL i_i
|
||||
prev_pos.z = pos.z + dist * -2.0f * cM_scos(angle);
|
||||
next_pos.x = pos.x + dist * 2.0f * cM_ssin(angle);
|
||||
next_pos.z = pos.z + dist * 2.0f * cM_scos(angle);
|
||||
} else {
|
||||
JUT_ASSERT(0x1029, FALSE);
|
||||
}
|
||||
|
||||
f32 proj_x, proj_z, proj2_x, proj2_z;
|
||||
@@ -1836,18 +1939,17 @@ BOOL daNpcF_chkPassed(cXyz i_pos, dPnt* i_points, u16 i_idx, u16 i_num, BOOL i_i
|
||||
} else {
|
||||
daNpcF_pntVsLineSegmentLengthSquare2D(cur_pos.x, cur_pos.z, prev_pos.x, prev_pos.z,
|
||||
next_pos.x, next_pos.z, &proj2_x, &proj2_z, &dist);
|
||||
s16 angle2;
|
||||
if (i_isReversed) {
|
||||
angle2 = cM_atan2s(prev_pos.x - next_pos.x, prev_pos.z - next_pos.z);
|
||||
angle = cM_atan2s(prev_pos.x - next_pos.x, prev_pos.z - next_pos.z);
|
||||
} else {
|
||||
angle2 = cM_atan2s(next_pos.x - prev_pos.x, next_pos.z - prev_pos.z);
|
||||
angle = cM_atan2s(next_pos.x - prev_pos.x, next_pos.z - prev_pos.z);
|
||||
}
|
||||
u16 angle_diff = abs((s16)(angle2 - cM_atan2s(proj2_x - proj_x, proj2_z - proj_z)));
|
||||
return angle_diff > 0x4000;
|
||||
angle = angle - cM_atan2s(proj2_x - proj_x, proj2_z - proj_z);
|
||||
return (u16)abs(angle) > 0x4000;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 8015556C-80155634 14FEAC 00C8+00 1/1 0/0 8/8 .text daNpcF_getGroundAngle__FP13cBgS_PolyInfos */
|
||||
@@ -1855,39 +1957,40 @@ s16 daNpcF_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) {
|
||||
cM3dGPla plane;
|
||||
|
||||
if (dComIfG_Bgsp().ChkPolySafe(*param_0)) {
|
||||
if (!dComIfG_Bgsp().GetTriPla(*param_0, &plane) || !cBgW_CheckBGround(plane.mNormal.y)) {
|
||||
BOOL triPla = dComIfG_Bgsp().GetTriPla(*param_0, &plane);
|
||||
if (!triPla || !cBgW_CheckBGround(plane.mNormal.y)) {
|
||||
return 0;
|
||||
} else {
|
||||
return fopAcM_getPolygonAngle(&plane, param_1);
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80155634-80155674 14FF74 0040+00 0/0 0/0 69/69 .text daNpcF_chkEvtBit__FUl */
|
||||
BOOL daNpcF_chkEvtBit(u32 i_no) {
|
||||
return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
return dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
/* 80155674-801556B4 14FFB4 0040+00 0/0 0/0 13/13 .text daNpcF_onEvtBit__FUl */
|
||||
void daNpcF_onEvtBit(u32 i_no) {
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
/* 801556B4-801556F4 14FFF4 0040+00 0/0 0/0 6/6 .text daNpcF_chkTmpBit__FUl */
|
||||
BOOL daNpcF_chkTmpBit(u32 i_no) {
|
||||
return dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_no]);
|
||||
return dComIfGs_isTmpBit((u16)dSv_event_tmp_flag_c::tempBitLabels[i_no]);
|
||||
}
|
||||
|
||||
/* 801556F4-80155734 150034 0040+00 0/0 0/0 6/6 .text daNpcF_onTmpBit__FUl */
|
||||
void daNpcF_onTmpBit(u32 i_no) {
|
||||
dComIfGs_onTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_no]);
|
||||
dComIfGs_onTmpBit((u16)dSv_event_tmp_flag_c::tempBitLabels[i_no]);
|
||||
}
|
||||
|
||||
/* 80155734-80155774 150074 0040+00 1/1 0/0 36/36 .text daNpcF_offTmpBit__FUl */
|
||||
void daNpcF_offTmpBit(u32 i_no) {
|
||||
dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_no]);
|
||||
dComIfGs_offTmpBit((u16)dSv_event_tmp_flag_c::tempBitLabels[i_no]);
|
||||
}
|
||||
|
||||
/* 80155774-80155854 1500B4 00E0+00 0/0 2/2 5/5 .text daNpcF_getPlayerInfoFromPlayerList__FiiR4cXyzR5csXyz */
|
||||
@@ -1897,13 +2000,14 @@ int daNpcF_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz& param_2,
|
||||
dStage_roomDt_c* room_p = dComIfGp_roomControl_getStatusRoomDt(i_roomNo);
|
||||
stage_actor_data_class* entries = room_p->getPlayer()->m_entries;
|
||||
|
||||
for (int i = 0; i < room_p->getPlayerNum(); entries++, i++) {
|
||||
for (int i = 0; i < room_p->getPlayerNum(); i++) {
|
||||
if (param_0 == (u8)entries->base.angle.z) {
|
||||
param_2 = entries->base.position;
|
||||
param_3 = entries->base.angle;
|
||||
rv = 1;
|
||||
break;
|
||||
}
|
||||
entries++;
|
||||
}
|
||||
|
||||
return rv;
|
||||
@@ -1914,6 +2018,8 @@ BOOL daNpcF_chkDoBtnEqSpeak(fopAc_ac_c* i_actor_p) {
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if (daPy_getPlayerActorClass()->checkPriActorOwn(i_actor_p)) {
|
||||
JUT_ASSERT(0x10dd, NULL != dComIfGp_getAttention());
|
||||
|
||||
for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) {
|
||||
if (dComIfGp_getAttention()->ActionTarget(i) == i_actor_p &&
|
||||
dComIfGp_getAttention()->getActionBtnB() &&
|
||||
@@ -1926,7 +2032,11 @@ BOOL daNpcF_chkDoBtnEqSpeak(fopAc_ac_c* i_actor_p) {
|
||||
for (int i = 0; i < dComIfGp_getAttention()->GetLockonCount(); i++) {
|
||||
if (dComIfGp_getAttention()->LockonTarget(i) == i_actor_p &&
|
||||
dComIfGp_getAttention()->getActionBtnB() &&
|
||||
dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_TALK_e)
|
||||
(dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_TALK_e
|
||||
#if DEBUG
|
||||
|| dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_UNK_4
|
||||
#endif
|
||||
))
|
||||
{
|
||||
ret = TRUE;
|
||||
}
|
||||
@@ -1951,14 +2061,19 @@ BOOL daNpcF_chkPointInArea(cXyz i_point, cXyz i_center, cXyz i_bounds, s16 i_ang
|
||||
|
||||
cXyz delta = i_center - i_point;
|
||||
|
||||
f32 tmp_float1;
|
||||
f32 tmp_float2;
|
||||
f32 tmp_float3;
|
||||
if (delta.y <= -i_bounds.y || i_bounds.y <= delta.y) {
|
||||
return FALSE;
|
||||
} else {
|
||||
f32 tmp_float1 = (delta_x * delta_x) / (bound_x * bound_x);
|
||||
f32 tmp_float2 = (delta_z * delta_z) / (bound_z * bound_z);
|
||||
f32 tmp_float3 = tmp_float1 + tmp_float2;
|
||||
return tmp_float3 <= 1.0f;
|
||||
if ((delta_x * delta_x) / (bound_x * bound_x) +
|
||||
(delta_z * delta_z) / (bound_z * bound_z) <= 1.0f) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 80155AD4-80155AE8 150414 0014+00 1/1 0/0 1/1 .text daNpcF_getDistTableIdx__Fii */
|
||||
@@ -1967,12 +2082,168 @@ u8 daNpcF_getDistTableIdx(int param_0, int param_1) {
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
void daNpcF_commonListenPropertyEvent(char*, int*, daNpcF_HIOParam*) {
|
||||
// TODO.
|
||||
void daNpcF_commonListenPropertyEvent(char* param_1, int* param_2, daNpcF_HIOParam* param_3) {
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 注目オフセット\n", param_3->attention_offset);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 重力\n", param_3->gravity);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// スケ−ル\n", param_3->scale);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// リアル影サイズ\n", param_3->real_shadow_size);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 体重\n", param_3->weight);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 高さ\n", param_3->height);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// ひざ丈\n", param_3->knee_length);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 幅\n", param_3->width);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 腰のX角上限\n", param_3->body_angleX_max);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 腰のX角下限\n", param_3->body_angleX_min);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 腰のY角上限\n", param_3->body_angleY_max);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 腰のY角下限\n", param_3->body_angleY_min);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 頭のX角上限\n", param_3->head_angleX_max);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 頭のX角下限\n", param_3->head_angleX_min);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 頭のY角上限\n", param_3->head_angleY_max);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 頭のY角下限\n", param_3->head_angleY_min);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 首の回転比率\n", param_3->neck_rotation_ratio);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 補間フレ−ム\n", param_3->morf_frame);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 会話距離\n", param_3->talk_distance);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 会話角度\n", param_3->talk_angle);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 注目距離\n", param_3->attention_distance);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 注目角度\n", param_3->attention_angle);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// 視界\n", param_3->fov);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// サ−チ距離\n", param_3->search_distance);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// サ−チ高さ\n", param_3->search_height);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%.3ff,\t// サ−チ低さ\n", param_3->search_depth);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 注目時間\n", param_3->attention_time);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// ダメ-ジ期間\n", param_3->damage_time);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 表情\n", param_3->face_expression);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 動作\n", param_3->motion);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// 注視モ−ド\n", param_3->look_mode);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// デバグモ−ドON\n", param_3->debug_mode_ON);
|
||||
*param_2 = strlen(param_1);
|
||||
sprintf(param_1 + *param_2, "%d, \t// デバグ情報ON\n", param_3->debug_info_ON);
|
||||
*param_2 = strlen(param_1);
|
||||
return;
|
||||
}
|
||||
|
||||
void daNpcF_commonGenMessage(JORMContext*, daNpcF_HIOParam*) {
|
||||
// TODO
|
||||
void daNpcF_commonGenMessage(JORMContext* i_ctx, daNpcF_HIOParam* i_hio) {
|
||||
i_ctx->genSlider("注目オフセット ", &i_hio->attention_offset, 0.0f, 1000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("重力 ", &i_hio->gravity, -100.0f, 100.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("スケ−ル ", &i_hio->scale, 0.0f, 100.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("リアル影サイズ ", &i_hio->real_shadow_size, 0.0f, 10000.0, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("体重 ", &i_hio->weight, 0.0f, 255.0f, 0, NULL, 0xffff, 0xffff,0x200, 0x18);
|
||||
i_ctx->genSlider("高さ ", &i_hio->height, 0.0f, 1000.0f, 0, NULL, 0xffff, 0xffff,0x200, 0x18);
|
||||
i_ctx->genSlider("ひざ丈 ", &i_hio->knee_length, 0.0f, 1000.0f, 0, NULL, 0xffff, 0xffff,0x200, 0x18);
|
||||
i_ctx->genSlider("幅 ", &i_hio->width, 0.0f, 1000.0f, 0, NULL, 0xffff, 0xffff,0x200, 0x18);
|
||||
i_ctx->genSlider("腰のX角上限 ", &i_hio->body_angleX_max, -90.0f, 90.0f, 0, NULL, 0xffff,0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("腰のX角下限 ", &i_hio->body_angleX_min, -90.0f, 90.0f, 0, NULL, 0xffff,0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("腰のY角上限 ", &i_hio->body_angleY_max, -180.0, 179.0, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("腰のY角下限 ", &i_hio->body_angleY_min, -180.0, 179.0, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("頭のX角上限 ", &i_hio->head_angleX_max, -90.0f, 90.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("頭のX角下限 ", &i_hio->head_angleX_min, -90.0f, 90.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("頭のY角上限 ", &i_hio->head_angleY_max, -180.0f, 179.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("頭のY角下限 ", &i_hio->head_angleY_min, -180.0f, 179.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("首の回転比率 ", &i_hio->neck_rotation_ratio, 0.0f, 1.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("補間フレ-ム ", &i_hio->morf_frame, 0.0f, 100.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->startComboBox("会話距離 ", &i_hio->talk_distance, 0, NULL, 0xffff, 0xffff, 0x100, 0x1a);
|
||||
i_ctx->genComboBoxItem(" 50", 0);
|
||||
i_ctx->genComboBoxItem(" 100", 1);
|
||||
i_ctx->genComboBoxItem(" 150", 2);
|
||||
i_ctx->genComboBoxItem(" 200", 3);
|
||||
i_ctx->genComboBoxItem(" 250", 4);
|
||||
i_ctx->genComboBoxItem(" 300", 5);
|
||||
i_ctx->genComboBoxItem(" 350", 6);
|
||||
i_ctx->genComboBoxItem(" 400", 7);
|
||||
i_ctx->genComboBoxItem(" 450", 8);
|
||||
i_ctx->genComboBoxItem(" 500", 9);
|
||||
i_ctx->genComboBoxItem(" 550", 10);
|
||||
i_ctx->genComboBoxItem(" 600", 11);
|
||||
i_ctx->genComboBoxItem(" 650", 12);
|
||||
i_ctx->genComboBoxItem(" 700", 13);
|
||||
i_ctx->genComboBoxItem(" 750", 14);
|
||||
i_ctx->genComboBoxItem(" 800", 15);
|
||||
i_ctx->genComboBoxItem(" 850", 16);
|
||||
i_ctx->genComboBoxItem(" 900", 17);
|
||||
i_ctx->genComboBoxItem(" 950", 18);
|
||||
i_ctx->genComboBoxItem("1000", 19);
|
||||
i_ctx->endComboBox();
|
||||
i_ctx->startComboBox("会話角度 ", &i_hio->talk_angle, 0, NULL, 0xffff, 0xffff, 0x100, 0x1a);
|
||||
i_ctx->genComboBoxItem(" 30", 0);
|
||||
i_ctx->genComboBoxItem(" 45", 1);
|
||||
i_ctx->genComboBoxItem(" 60", 2);
|
||||
i_ctx->genComboBoxItem(" 90", 3);
|
||||
i_ctx->genComboBoxItem(" 110", 4);
|
||||
i_ctx->genComboBoxItem(" 135", 5);
|
||||
i_ctx->genComboBoxItem(" 180", 6);
|
||||
i_ctx->endComboBox();
|
||||
i_ctx->startComboBox("注目距離 ", &i_hio->attention_distance, 0, NULL, 0xffff, 0xffff, 0x100, 0x1a);
|
||||
i_ctx->genComboBoxItem(" 50", 0);
|
||||
i_ctx->genComboBoxItem(" 100", 1);
|
||||
i_ctx->genComboBoxItem(" 150", 2);
|
||||
i_ctx->genComboBoxItem(" 200", 3);
|
||||
i_ctx->genComboBoxItem(" 250", 4);
|
||||
i_ctx->genComboBoxItem(" 300", 5);
|
||||
i_ctx->genComboBoxItem(" 350", 6);
|
||||
i_ctx->genComboBoxItem(" 400", 7);
|
||||
i_ctx->genComboBoxItem(" 450", 8);
|
||||
i_ctx->genComboBoxItem(" 500", 9);
|
||||
i_ctx->genComboBoxItem(" 550", 10);
|
||||
i_ctx->genComboBoxItem(" 600", 11);
|
||||
i_ctx->genComboBoxItem(" 650", 12);
|
||||
i_ctx->genComboBoxItem(" 700", 13);
|
||||
i_ctx->genComboBoxItem(" 750", 14);
|
||||
i_ctx->genComboBoxItem(" 800", 15);
|
||||
i_ctx->genComboBoxItem(" 850", 16);
|
||||
i_ctx->genComboBoxItem(" 900", 17);
|
||||
i_ctx->genComboBoxItem(" 950", 18);
|
||||
i_ctx->genComboBoxItem("1000", 19);
|
||||
i_ctx->endComboBox();
|
||||
i_ctx->startComboBox("注目角度 ", &i_hio->attention_angle, 0, NULL, 0xffff, 0xffff, 0x100, 0x1a);
|
||||
i_ctx->genComboBoxItem(" 30", 0);
|
||||
i_ctx->genComboBoxItem(" 45", 1);
|
||||
i_ctx->genComboBoxItem(" 60", 2);
|
||||
i_ctx->genComboBoxItem(" 90", 3);
|
||||
i_ctx->genComboBoxItem(" 110", 4);
|
||||
i_ctx->genComboBoxItem(" 135", 5);
|
||||
i_ctx->genComboBoxItem(" 180", 6);
|
||||
i_ctx->endComboBox();
|
||||
i_ctx->genSlider("視界 ", &i_hio->fov, 0.0f, 180.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("サ-チ距離 ", &i_hio->search_distance, 0.0f, 10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("サ-チ高さ ", &i_hio->search_height, -10000.0,10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("サ-チ低さ ", &i_hio->search_depth, -10000.0,10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("注目時間 ", &i_hio->attention_time, 0, 10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("ダメ-ジ期間 ", &i_hio->damage_time, 0,10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("表情 ", &i_hio->face_expression, 0,10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("動作 ", &i_hio->motion, 0, 10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genSlider("注視モ-ド ", &i_hio->look_mode, 0, 10000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genCheckBox("デバグモ-ドON", &i_hio->debug_mode_ON, 1, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
i_ctx->genCheckBox("デバグ情報ON ", &i_hio->debug_info_ON, 1, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_ash.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_tag_evtarea.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/actor/d_a_npc_ash.h"
|
||||
#include "d/actor/d_a_tag_evtarea.h"
|
||||
|
||||
/* 8095D640-8095D6AC 000000 006C+00 14/14 0/0 0/0 .rodata m__16daNpcAsh_Param_c */
|
||||
const daNpcAsh_HIOParam daNpcAsh_Param_c::m = {
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "d/actor/d_a_npc_ashB.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
|
||||
/* 809620E4-80962154 000000 0070+00 11/11 0/0 0/0 .rodata m__17daNpcAshB_Param_c */
|
||||
const daNpcAshB_HIOParam daNpcAshB_Param_c::m = {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc_chin.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_doorboy.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
|
||||
enum DoorBoy_RES_File_ID {
|
||||
/* BMDR */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_drainSol.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
|
||||
/* 809AFACC-809AFAD4 000000 0008+00 1/1 0/0 0/0 .data l_bmdGetParamList */
|
||||
static int l_bmdGetParamList[] = {
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_fairy.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
|
||||
enum fairy_RES_File_ID {
|
||||
/* BCK */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_fairy_seirei.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/actor/d_a_obj_onsenTaru.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc_gra.h"
|
||||
#include "d/actor/d_a_tag_gra.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_grc.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
enum grC_RES_File_ID {
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_npc_grd.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
enum Animation {
|
||||
/* 0x00 */ ANM_UNK_0,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_grmc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
|
||||
enum grC_RES_File_ID {
|
||||
/* BCK */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_grr.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
enum grR_RES_File_ID {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_grz.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_obj_grz_rock.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_gwolf.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/d_camera.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_impal.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
|
||||
/* 80A0C270-80A0C2E0 000000 0070+00 12/12 0/0 0/0 .rodata m__18daNpcImpal_Param_c */
|
||||
daNpcImpal_HIOParam const daNpcImpal_Param_c::m = {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_ins.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_msg_object.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_kasi_hana.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc_chin.h"
|
||||
#include "d/actor/d_a_npc_kasi_kyu.h"
|
||||
#include "d/actor/d_a_npc_kasi_mich.h"
|
||||
@@ -1577,7 +1578,7 @@ void* daNpcKasiHana_c::_srch_escape_tag(void* i_actor, void* i_data) {
|
||||
int daNpcKasiHana_c::getWolfPathNearIdx() {
|
||||
int iVar1 = 0;
|
||||
f32 fVar1 = 0.0f;
|
||||
u16 numPnts = mPath.getNumPnts();
|
||||
int numPnts = mPath.getNumPnts();
|
||||
cXyz sp44, sp50;
|
||||
|
||||
int rv = 0;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_kasi_kyu.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
enum kasi_kyu_RES_File_ID {
|
||||
@@ -945,7 +946,7 @@ void* daNpcKasiKyu_c::_srch_escape_tag(void* i_actor, void* i_data) {
|
||||
int daNpcKasiKyu_c::getWolfPathNearIdx() {
|
||||
int iVar1 = 0;
|
||||
f32 fVar1 = 0.0f;
|
||||
u16 numPnts = mPath.getNumPnts();
|
||||
int numPnts = mPath.getNumPnts();
|
||||
cXyz sp44, sp50;
|
||||
|
||||
int rv = 0;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_kasi_mich.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
enum kasi_mich_RES_File_ID {
|
||||
@@ -945,7 +946,7 @@ void* daNpcKasiMich_c::_srch_escape_tag(void* i_actor, void* i_data) {
|
||||
int daNpcKasiMich_c::getWolfPathNearIdx() {
|
||||
int iVar1 = 0;
|
||||
f32 fVar1 = 0.0f;
|
||||
u16 numPnts = mPath.getNumPnts();
|
||||
int numPnts = mPath.getNumPnts();
|
||||
cXyz sp44, sp50;
|
||||
|
||||
int rv = 0;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_ep.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_npc_moi.h"
|
||||
#include "d/actor/d_a_npc_uri.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_myna2.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "d/actor/d_a_npc_pachi_taro.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "d/actor/d_a_tag_pachi.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_npc_pachi_maro.h"
|
||||
#include "d/actor/d_a_npc_pachi_besu.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_rafrel.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
|
||||
/* 80AC0324-80AC0328 000014 0004+00 1/1 0/0 0/0 .bss l_HIO */
|
||||
static daNpcRafrel_Param_c l_HIO;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_shoe.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
|
||||
/* 80AEA3B0-80AEA41C 000000 006C+00 11/11 0/0 0/0 .rodata m__17daNpcShoe_Param_c */
|
||||
const daNpcShoe_HIOParam daNpcShoe_Param_c::m = {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_soldierA.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_npc_soldierA.h"
|
||||
#include "d/actor/d_a_npc_soldierB.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc_soldierA.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
enum Joint {
|
||||
/* 0x00 */ JNT_CENTER,
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_the.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_tag_evtarea.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/actor/d_a_npc_the.h"
|
||||
#include "d/actor/d_a_tag_evtarea.h"
|
||||
|
||||
/* 80AFBE0C-80AFBE78 000000 006C+00 11/11 0/0 0/0 .rodata m__16daNpcThe_Param_c */
|
||||
const daNpcThe_HIOParam daNpcThe_Param_c::m = {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_tkc.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/d_camera.h"
|
||||
|
||||
enum Tkc_RES_File_ID {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_tkj.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
|
||||
/* 805766D4-805766DC 000020 0008+00 1/1 0/0 0/0 .data l_bmdData */
|
||||
static int l_bmdData[1][2] = {
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_tks.h"
|
||||
#include "d/d_a_obj.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc_tkc.h"
|
||||
#include "d/d_a_obj.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_zrc.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc_zrz.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "d/actor/d_a_obj_grave_stone.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "d/actor/d_a_obj_gadget.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_path.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_obj_gra2.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_tag_gra.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
@@ -16,9 +16,8 @@
|
||||
#include "d/d_debug_viewer.h"
|
||||
#endif
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_attention.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cmath.h>
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
class daObj_GrA_Param_c {
|
||||
public:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "d/actor/d_a_obj_gra_rock.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_bg_w.h"
|
||||
|
||||
static void dummy() {
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "dol2asm.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
|
||||
#include "d/actor/d_a_obj_kbacket.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_obj_mie.h"
|
||||
#include "d/actor/d_a_npc_pouya.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_npc_pouya.h"
|
||||
#include "d/d_path.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
/* 80C95B88-80C95B90 000000 0008+00 3/3 0/0 0/0 .data l_bmdData */
|
||||
|
||||
@@ -6,14 +6,15 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_obj_pumpkin.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_npc_jagar.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
#if DEBUG
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#endif
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
#include "d/actor/d_a_npc_jagar.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80CB8370-80CB83A4 000000 0034+00 5/5 0/0 0/0 .rodata m__21daObj_Pumpkin_Param_c */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_obj_tks.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/d_camera.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "d/actor/d_a_obj_yel_bag.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "SSystem/SComponent/c_lib.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_allmato.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_obj_itamato.h"
|
||||
#include "d/actor/d_a_obj_boumato.h"
|
||||
#include "d/actor/d_a_arrow.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_evtmsg.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "d/actor/d_a_tag_mstop.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
/* 805A6138-805A6318 000078 01E0+00 1/1 0/0 0/0 .text create__12daTagMstop_cFv */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_tag_push.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
/* 804902B8-80490418 000078 0160+00 2/1 0/0 0/0 .text srchActor__12daTag_Push_cFPvPv */
|
||||
|
||||
+1
-1
@@ -552,7 +552,7 @@ u32 dBgS::ChkGrpInf(cBgS_PolyInfo const& poly, u32 param_1) {
|
||||
}
|
||||
|
||||
/* 80075100-8007519C 06FA40 009C+00 0/0 16/16 60/60 .text GetRoomId__4dBgSFRC13cBgS_PolyInfo */
|
||||
s32 dBgS::GetRoomId(cBgS_PolyInfo const& poly) {
|
||||
int dBgS::GetRoomId(cBgS_PolyInfo const& poly) {
|
||||
if (!poly.ChkSetInfo()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "JSystem/JMessage/JMessage.h"
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/d_item_data.h"
|
||||
#include "d/d_meter2.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
|
||||
Reference in New Issue
Block a user