mirror of
https://github.com/zeldaret/tp
synced 2026-06-09 12:46:13 -04:00
dbg npc_aru (-1 func), npc_maro, and npc_bans equiv (#3053)
* dbg npc_aru (-1 func), npc_maro, and tag_push equiv * daNpc_Aru_c::adjustMoveDir doesn't match. I don't know how to fix it without breaking GCN * JORM default args + PR comments * npc_bans dbg equiv
This commit is contained in:
@@ -277,7 +277,7 @@ public:
|
||||
u32 checkCutTurnCancel() const { return checkEndResetStateFlg0(ERFLG0_CUT_TURN_CANCEL); }
|
||||
u32 checkTurnCancelKeep() const { return checkStateFlg0(FLG0_TURN_CANCEL_KEEP); }
|
||||
u32 checkRodeoLeft() const { return checkStateFlg0(FLG0_RODEO_LEFT); }
|
||||
u32 checkHorseCallWait() const { return checkStateFlg0(FLG0_NO_DRAW_WAIT); }
|
||||
u32 checkHorseCallWait() { return checkStateFlg0(FLG0_NO_DRAW_WAIT); }
|
||||
BOOL checkTurn() const { return m_procID == PROC_TURN_e && field_0x1720 == 0; }
|
||||
BOOL checkStop() const { return m_procID == PROC_STOP_e; }
|
||||
BOOL checkJump() const { return m_procID == PROC_JUMP_e; }
|
||||
|
||||
@@ -153,7 +153,9 @@ public:
|
||||
char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
i_arcNames) {
|
||||
OS_REPORT("|%06d:%x|daNpc_Aru_c -> コンストラクト\n", g_Counter.mCounter0, this);
|
||||
}
|
||||
u16 getEyeballMaterialNo() { return ARU_EYEBALL_M; }
|
||||
s32 getHeadJointNo() { return JNT_HEAD; }
|
||||
s32 getNeckJointNo() { return JNT_NECK; }
|
||||
@@ -165,13 +167,9 @@ public:
|
||||
|
||||
int getFlowNodeNo() {
|
||||
u16 nodeNo = home.angle.x;
|
||||
if (nodeNo == 0xffff) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return nodeNo;
|
||||
return (nodeNo == 0xFFFF) ? -1 : nodeNo;
|
||||
}
|
||||
int getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
|
||||
u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
|
||||
void setLastIn() { mLastGoatIn = true; }
|
||||
|
||||
static char* mCutNameList[7];
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
struct daNpc_Maro_HIOParam {
|
||||
/* 0x00 */ daNpcT_HIOParam common;
|
||||
/* 0x8C */ s16 field_0x8c;
|
||||
/* 0x8C */ s16 tease_interval;
|
||||
};
|
||||
|
||||
class daNpc_Maro_Param_c {
|
||||
@@ -125,6 +125,7 @@ public:
|
||||
int arrowTutorial(void*);
|
||||
int talk(void*);
|
||||
int shop(void*);
|
||||
BOOL test(void*);
|
||||
daNpc_Maro_c(
|
||||
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
|
||||
daNpcT_motionAnmData_c const* i_motionAnmData,
|
||||
@@ -169,16 +170,21 @@ public:
|
||||
static char* mCutNameList[17];
|
||||
static cutFunc mCutList[17];
|
||||
|
||||
u8 getGroupId() {
|
||||
return (fopAcM_GetParam(this) & 0xF0000000) >> 28;
|
||||
}
|
||||
|
||||
u8 getPathID() {
|
||||
return (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
}
|
||||
|
||||
int getFlowNodeNo() {
|
||||
u16 nodeNo = home.angle.x;
|
||||
if (nodeNo == 0xffff) {
|
||||
return -1;
|
||||
}
|
||||
return nodeNo;
|
||||
return (nodeNo == 0xFFFF) ? -1 : nodeNo;
|
||||
}
|
||||
|
||||
u8 getMaxNumItem() {
|
||||
return (fopAcM_GetParam(this) & 0xf000000) >> 0x18;
|
||||
return (fopAcM_GetParam(this) & 0xF000000) >> 24;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
void setTimeMs(s32 i_time) { mTimeMs = i_time; }
|
||||
s32 getTimeMs() { return mTimeMs; }
|
||||
u8 getNowCount() { return mNowCount; }
|
||||
int getMaxCount() { return mMaxCount; }
|
||||
u8 getMaxCount() { return mMaxCount; }
|
||||
void setScopeZoomPointer(u8 param_0) { mScopeZoomPointer = param_0; }
|
||||
u8 getItemExplainWindowStatus() { return mItemExplainWindowStatus; }
|
||||
void setItemExplainWindowStatus(u8 i_value) { mItemExplainWindowStatus = i_value; }
|
||||
@@ -671,7 +671,7 @@ inline u8 dMeter2Info_getNowCount() {
|
||||
return g_meter2_info.getNowCount();
|
||||
}
|
||||
|
||||
inline int dMeter2Info_getMaxCount() {
|
||||
inline u8 dMeter2Info_getMaxCount() {
|
||||
return g_meter2_info.getMaxCount();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@ public:
|
||||
/* 0x2c */ fopAc_ac_c* field_0x2c;
|
||||
/* 0x30 */ fopAc_ac_c* field_0x30;
|
||||
/* 0x34 */ fopAc_ac_c* field_0x34;
|
||||
/* 0x38 */ cXyz field_0x38;
|
||||
/* 0x44 */ cXyz field_0x44;
|
||||
/* 0x38 */ Vec field_0x38;
|
||||
/* 0x44 */ Vec field_0x44;
|
||||
/* 0x50 */ f32 field_0x50;
|
||||
/* 0x54 */ cXyz field_0x54;
|
||||
/* 0x60 */ cXyz field_0x60;
|
||||
/* 0x54 */ Vec field_0x54;
|
||||
/* 0x60 */ Vec field_0x60;
|
||||
/* 0x6c */ f32 field_0x6c;
|
||||
/* 0x70 */ cXyz field_0x70;
|
||||
/* 0x7C */ cXyz field_0x7c;
|
||||
|
||||
+285
-159
@@ -14,6 +14,10 @@
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#if DEBUG
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#endif
|
||||
|
||||
enum Aru_RES_File_ID {
|
||||
/* BCK */
|
||||
@@ -136,6 +140,109 @@ enum Type {
|
||||
/* 0x4 */ TYPE_4,
|
||||
};
|
||||
|
||||
const daNpc_Aru_HIOParam daNpc_Aru_Param_c::m = {
|
||||
220.0f,
|
||||
-3.0f,
|
||||
1.0f,
|
||||
600.0f,
|
||||
255.0f,
|
||||
210.0f,
|
||||
35.0f,
|
||||
40.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
10.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-10.0f,
|
||||
45.0f,
|
||||
-45.0f,
|
||||
0.6f,
|
||||
12.0f,
|
||||
6,
|
||||
6,
|
||||
9,
|
||||
6,
|
||||
110.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
60,
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
4.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
1500.0f,
|
||||
24.0f,
|
||||
4.0f,
|
||||
10,
|
||||
20,
|
||||
45.0f,
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
daNpc_Aru_HIO_c::daNpc_Aru_HIO_c() {
|
||||
m = daNpc_Aru_Param_c::m;
|
||||
}
|
||||
|
||||
void daNpc_Aru_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
|
||||
char msg_buffer[2000];
|
||||
|
||||
JORReflexible::listenPropertyEvent(event);
|
||||
|
||||
JORFile aJStack_910;
|
||||
int len;
|
||||
switch ((u32)event->id) {
|
||||
case 0x40000002:
|
||||
if (aJStack_910.open(6, "すべてのファイル(*.*)\0*.*\0", NULL, NULL, NULL) != 0) {
|
||||
memset(msg_buffer, 0, 2000);
|
||||
len = 0;
|
||||
daNpcT_cmnListenPropertyEvent(msg_buffer, &len, &m.common);
|
||||
sprintf(msg_buffer + len, "%.3ff,\t// 警戒範囲\n", m.warning_range);
|
||||
len = strlen(msg_buffer);
|
||||
sprintf(msg_buffer + len, "%.3ff,\t// 走る速度\n", m.run_speed);
|
||||
len = strlen(msg_buffer);
|
||||
sprintf(msg_buffer + len, "%.3ff,\t// 歩き速度\n", m.walk_speed);
|
||||
len = strlen(msg_buffer);
|
||||
sprintf(msg_buffer + len, "%d, \t// 旋回禁止時間\n", m.no_turn_time);
|
||||
len = strlen(msg_buffer);
|
||||
sprintf(msg_buffer + len, "%d, \t// 避け時間\n", m.avoid_time);
|
||||
len = strlen(msg_buffer);
|
||||
sprintf(msg_buffer + len, "%.3ff,\t// 前方視界\n", m.forward_visibility);
|
||||
len = strlen(msg_buffer);
|
||||
aJStack_910.writeData(msg_buffer, len);
|
||||
aJStack_910.close();
|
||||
OS_REPORT("write append success!::%6d\n", len);
|
||||
} else {
|
||||
OS_REPORT("write append failure!\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void daNpc_Aru_HIO_c::genMessage(JORMContext* ctx) {
|
||||
daNpcT_cmnGenMessage(ctx, &m.common);
|
||||
ctx->genSlider("警戒範囲 ", &m.warning_range, 0.0f, 10000.0f);
|
||||
ctx->genSlider("走る速度 ", &m.run_speed, 0.0f, 10000.0f);
|
||||
ctx->genSlider("歩く速度 ", &m.walk_speed, 0.0f, 10000.0f);
|
||||
ctx->genSlider("旋回禁止時間 ", &m.no_turn_time, 0, 10000);
|
||||
ctx->genSlider("避け時間 ", &m.avoid_time, 0, 10000);
|
||||
ctx->genSlider("前方視界 ", &m.forward_visibility, 0.0f, 180.0f);
|
||||
// export file:
|
||||
ctx->genButton("ファイル書き出し", 0x40000002);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int l_bmdData[1][2] = {
|
||||
{BMDR_ARU, ARU},
|
||||
};
|
||||
@@ -257,73 +364,11 @@ daNpc_Aru_c::cutFunc daNpc_Aru_c::mCutList[7] = {
|
||||
&daNpc_Aru_c::cutNoEntrance,
|
||||
};
|
||||
|
||||
const daNpc_Aru_HIOParam daNpc_Aru_Param_c::m = {
|
||||
220.0f,
|
||||
-3.0f,
|
||||
1.0f,
|
||||
600.0f,
|
||||
255.0f,
|
||||
210.0f,
|
||||
35.0f,
|
||||
40.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
10.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-10.0f,
|
||||
45.0f,
|
||||
-45.0f,
|
||||
0.6f,
|
||||
12.0f,
|
||||
6,
|
||||
6,
|
||||
9,
|
||||
6,
|
||||
110.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
60,
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
4.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
1500.0f,
|
||||
24.0f,
|
||||
4.0f,
|
||||
10,
|
||||
20,
|
||||
45.0f,
|
||||
};
|
||||
|
||||
static NPC_ARU_HIO_CLASS l_HIO;
|
||||
|
||||
#if DEBUG
|
||||
daNpc_Aru_HIO_c::daNpc_Aru_HIO_c() {
|
||||
m = daNpc_Aru_Param_c::m;
|
||||
}
|
||||
|
||||
void daNpc_Aru_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void daNpc_Aru_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// NONMATCHING
|
||||
}
|
||||
#endif
|
||||
|
||||
daNpc_Aru_c::~daNpc_Aru_c() {
|
||||
// destruct
|
||||
OS_REPORT("|%06d:%x|daNpc_Aru_c -> デストラクト\n", g_Counter.mCounter0, this);
|
||||
if (mpMorf[0] != NULL) {
|
||||
mpMorf[0]->stopZelAnime();
|
||||
}
|
||||
@@ -347,7 +392,8 @@ cPhs__Step daNpc_Aru_c::create() {
|
||||
|
||||
cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList);
|
||||
if (phase == cPhs_COMPLEATE_e) {
|
||||
OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, (getPathID() >> 32) & 0xFF, fopAcM_GetParam(this));
|
||||
OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this),
|
||||
mType, mFlowNodeNo, getPathID(), fopAcM_GetParam(this));
|
||||
|
||||
if (isDelete()) {
|
||||
OS_REPORT("===>isDelete:TRUE\n");
|
||||
@@ -365,6 +411,7 @@ cPhs__Step daNpc_Aru_c::create() {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); // unused
|
||||
fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx());
|
||||
fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f);
|
||||
|
||||
@@ -406,17 +453,24 @@ cPhs__Step daNpc_Aru_c::create() {
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::CreateHeap() {
|
||||
J3DModelData* mdlData_p = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_resNameList[l_bmdData[0][1]], l_bmdData[0][0]));
|
||||
J3DModelData* mdlData_p = NULL;
|
||||
J3DModel* model = NULL;
|
||||
int bmdIdx = FALSE;
|
||||
int res_name_idx = l_bmdData[bmdIdx][1];
|
||||
int my_bmd = l_bmdData[bmdIdx][0];
|
||||
mdlData_p = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_resNameList[res_name_idx], my_bmd));
|
||||
if (mdlData_p == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
mpMorf[0] = new mDoExt_McaMorfSO(mdlData_p, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, 0x11020284);
|
||||
u32 sp_0x18 = 0x11020284;
|
||||
mpMorf[0] = new mDoExt_McaMorfSO(mdlData_p, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000,
|
||||
sp_0x18);
|
||||
if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
J3DModel* model = mpMorf[0]->getModel();
|
||||
model = mpMorf[0]->getModel();
|
||||
for (u16 i = 0; i < mdlData_p->getJointNum(); i++) {
|
||||
mdlData_p->getJointNodePointer(i)->setCallBack(ctrlJointCallBack);
|
||||
}
|
||||
@@ -435,6 +489,8 @@ int daNpc_Aru_c::CreateHeap() {
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::Delete() {
|
||||
OS_REPORT("|%06d:%x|daNpc_Aru_c -> Delete\n", g_Counter.mCounter0, this);
|
||||
fopAcM_RegisterDeleteID(this, "NPC_ARU");
|
||||
this->~daNpc_Aru_c();
|
||||
return 1;
|
||||
}
|
||||
@@ -452,15 +508,17 @@ int daNpc_Aru_c::Draw() {
|
||||
return draw(NpcT_CHK_ACTION(daNpc_Aru_c), FALSE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE);
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::createHeapCallBack(fopAc_ac_c* a_this) {
|
||||
return static_cast<daNpc_Aru_c*>(a_this)->CreateHeap();
|
||||
int daNpc_Aru_c::createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
daNpc_Aru_c* a_this = static_cast<daNpc_Aru_c*>(i_this);
|
||||
return a_this->CreateHeap();
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::ctrlJointCallBack(J3DJoint* i_joint, int param_2) {
|
||||
if (param_2 == 0) {
|
||||
daNpc_Aru_c* i_this = (daNpc_Aru_c*)j3dSys.getModel()->getUserArea();
|
||||
J3DModel* model = j3dSys.getModel();
|
||||
daNpc_Aru_c* i_this = (daNpc_Aru_c*) model->getUserArea();
|
||||
if (i_this != NULL) {
|
||||
i_this->ctrlJoint(i_joint, j3dSys.getModel());
|
||||
i_this->ctrlJoint(i_joint, model);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,9 +526,10 @@ int daNpc_Aru_c::ctrlJointCallBack(J3DJoint* i_joint, int param_2) {
|
||||
}
|
||||
|
||||
void* daNpc_Aru_c::srchCow(void* i_actor, void* i_data) {
|
||||
fopAc_ac_c* data_p = (fopAc_ac_c*) i_data;
|
||||
if (mFindCount < 50) {
|
||||
fopAc_ac_c* actor_p = (fopAc_ac_c*)i_actor;
|
||||
if (actor_p != NULL && actor_p != i_data) {
|
||||
fopAc_ac_c* actor_p = (fopAc_ac_c*) i_actor;
|
||||
if (actor_p != NULL && actor_p != data_p) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(actor_p)) && fopAcM_GetName(actor_p) == PROC_COW && !((daCow_c*)actor_p)->isGuardFad()) {
|
||||
mFindActorPtrs[mFindCount] = actor_p;
|
||||
mFindCount++;
|
||||
@@ -482,10 +541,14 @@ void* daNpc_Aru_c::srchCow(void* i_actor, void* i_data) {
|
||||
}
|
||||
|
||||
void* daNpc_Aru_c::srchUDoor(void* i_actor, void* i_data) {
|
||||
if (mFindCount < 50 && i_actor != NULL && i_actor != i_data) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(i_actor)) && fopAcM_GetName(i_actor) == PROC_OBJ_UDOOR) {
|
||||
mFindActorPtrs[mFindCount] = (fopAc_ac_c*)i_actor;
|
||||
mFindCount++;
|
||||
fopAc_ac_c* data_p = (fopAc_ac_c*) i_data;
|
||||
if (mFindCount < 50) {
|
||||
fopAc_ac_c* actor_p = (fopAc_ac_c*) i_actor;
|
||||
if (actor_p != NULL && actor_p != data_p) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(actor_p)) && fopAcM_GetName(actor_p) == PROC_OBJ_UDOOR) {
|
||||
mFindActorPtrs[mFindCount] = (fopAc_ac_c*) actor_p;
|
||||
mFindCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,17 +556,18 @@ void* daNpc_Aru_c::srchUDoor(void* i_actor, void* i_data) {
|
||||
}
|
||||
|
||||
BOOL daNpc_Aru_c::chkThrust(fopAc_ac_c* actor_p) {
|
||||
cM_atan2s(actor_p->speed.x, actor_p->speed.z);
|
||||
fopAcM_searchActorAngleY(actor_p, this);
|
||||
s16 reg_r27 = cM_atan2s(actor_p->speed.x, actor_p->speed.z); // unused
|
||||
reg_r27 = reg_r27 - fopAcM_searchActorAngleY(actor_p, this);
|
||||
f32 actorDistance = fopAcM_searchActorDistance(this, actor_p);
|
||||
|
||||
if (actor_p != NULL) {
|
||||
if (cM3d_IsZero(actor_p->speedF) <= 0 && (cM3d_IsZero(actor_p->speed.x) <= 0 || cM3d_IsZero(actor_p->speed.z) <= 0)) {
|
||||
f32 fVar2 = fopAcM_searchActorDistance(this, actor_p);
|
||||
s16 sVar1 = cM_atan2s(actor_p->speed.x, actor_p->speed.z) - fopAcM_searchActorAngleY(actor_p, this);
|
||||
s16 reg_r28 = cM_atan2s(actor_p->speed.x, actor_p->speed.z);
|
||||
reg_r28 = reg_r28 - fopAcM_searchActorAngleY(actor_p, this);
|
||||
|
||||
if (fVar2 < mpHIO->m.warning_range) {
|
||||
if (abs(sVar1) < cM_deg2s(35.0f)) {
|
||||
if (abs(reg_r28) < cM_deg2s(35.0f)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -518,6 +582,7 @@ BOOL daNpc_Aru_c::chkThrust(fopAc_ac_c* actor_p) {
|
||||
}
|
||||
|
||||
fopAc_ac_c* daNpc_Aru_c::getCowP(int param_1) {
|
||||
int i = 0;
|
||||
mFindCount = 0;
|
||||
|
||||
if (daPy_py_c::checkNowWolf()) {
|
||||
@@ -543,7 +608,7 @@ fopAc_ac_c* daNpc_Aru_c::getCowP(int param_1) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (int i = 0; i < mFindCount; i++) {
|
||||
for (i = 0; i < mFindCount; i++) {
|
||||
if (chkThrust(mFindActorPtrs[i])) {
|
||||
return mFindActorPtrs[i];
|
||||
}
|
||||
@@ -587,13 +652,14 @@ fopAc_ac_c* daNpc_Aru_c::getUDoor_r_P() {
|
||||
}
|
||||
|
||||
u8 daNpc_Aru_c::getType() {
|
||||
switch (fopAcM_GetParam(this) & 0xFF) {
|
||||
u8 prm = fopAcM_GetParam(this);
|
||||
switch (prm & 0xFF) {
|
||||
case 0:
|
||||
return 0;
|
||||
|
||||
case 1:
|
||||
return 1;
|
||||
|
||||
|
||||
case 2:
|
||||
return 2;
|
||||
|
||||
@@ -771,6 +837,17 @@ BOOL daNpc_Aru_c::checkChangeEvt() {
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
switch (mType) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -783,7 +860,7 @@ void daNpc_Aru_c::setAfterTalkMotion() {
|
||||
case FACE_NORMAL:
|
||||
i_index = FACE_H_NORMAL;
|
||||
break;
|
||||
|
||||
|
||||
case FACE_GRUMPY:
|
||||
i_index = FACE_H_GRUMPY;
|
||||
break;
|
||||
@@ -892,7 +969,8 @@ BOOL daNpc_Aru_c::evtCutProc() {
|
||||
}
|
||||
|
||||
void daNpc_Aru_c::action() {
|
||||
fopAc_ac_c* actor_p = hitChk(&mCyl, 0xFFFFFFFF);
|
||||
fopAc_ac_c* actor_p = NULL;
|
||||
actor_p = hitChk(&mCyl, 0xFFFFFFFF);
|
||||
|
||||
if (actor_p != NULL && mCyl.GetTgHitObj()->ChkAtType(AT_TYPE_THROW_OBJ)) {
|
||||
mStagger.setParam(this, actor_p, mCurAngle.y);
|
||||
@@ -957,13 +1035,14 @@ void daNpc_Aru_c::setAttnPos() {
|
||||
|
||||
static cXyz prtclScl(1.0f, 1.0f, 1.0f);
|
||||
setFootPos();
|
||||
setFootPrtcl(&prtclScl, 0.0f, 0.0f);
|
||||
setFootPrtcl(&prtclScl, MREG_F(19), 0.0f);
|
||||
}
|
||||
|
||||
void daNpc_Aru_c::setCollision() {
|
||||
cXyz pos;
|
||||
|
||||
if (!mHide) {
|
||||
u32 co_sprm = 0x79;
|
||||
u32 tgType = 0xD8FBFDFF;
|
||||
u32 tgSPrm = 0x1F;
|
||||
|
||||
@@ -975,7 +1054,7 @@ void daNpc_Aru_c::setCollision() {
|
||||
tgSPrm = 0;
|
||||
}
|
||||
|
||||
mCyl.SetCoSPrm(0x79);
|
||||
mCyl.SetCoSPrm(co_sprm);
|
||||
mCyl.SetTgType(tgType);
|
||||
mCyl.SetTgSPrm(tgSPrm);
|
||||
mCyl.OnTgNoHitMark();
|
||||
@@ -998,11 +1077,37 @@ void daNpc_Aru_c::setCollision() {
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::drawDbgInfo() {
|
||||
return 0;
|
||||
#if DEBUG
|
||||
if (mpHIO->m.common.debug_info_ON) {
|
||||
f32 dist_max_speak = dComIfGp_getAttention()->getDistTable(attention_info.distances[fopAc_attn_SPEAK_e]).mDistMax;
|
||||
f32 dist_max_talk = dComIfGp_getAttention()->getDistTable(attention_info.distances[fopAc_attn_TALK_e]).mDistMax;
|
||||
dDbVw_drawCircleOpa(attention_info.position, dist_max_speak, (GXColor){0x00, 0xC8, 0x00, 0xFF}, 1, 12);
|
||||
dDbVw_drawCircleOpa(attention_info.position, dist_max_talk, (GXColor){0xC8, 0x00, 0x00, 0xFF}, 1, 12);
|
||||
dDbVw_drawSphereXlu(eyePos, 18.0f, (GXColor){0x80, 0x80, 0x80, 0xA0}, 1);
|
||||
dDbVw_drawSphereXlu(attention_info.position, 9.0f, (GXColor){0x80, 0x80, 0x80, 0xA0}, 1);
|
||||
cXyz vec_0x2c = mFootLPos;
|
||||
cXyz vec_0x20 = vec_0x2c;
|
||||
vec_0x20.y -= MREG_F(19);
|
||||
dDbVw_drawLineOpa(vec_0x2c, vec_0x20, (GXColor){0x80, 0x80, 0x00, 0xA0}, 1, 12);
|
||||
vec_0x2c = mFootRPos;
|
||||
vec_0x20 = vec_0x2c;
|
||||
vec_0x20.y -= MREG_F(19);
|
||||
dDbVw_drawLineOpa(vec_0x2c, vec_0x20, (GXColor){0x80, 0x80, 0x00, 0xA0}, 1, 12);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL daNpc_Aru_c::selectAction() {
|
||||
mNextAction = NULL;
|
||||
#if DEBUG
|
||||
if (mpHIO->m.common.debug_mode_ON) {
|
||||
mNextAction = &daNpc_Aru_c::test;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (mType) {
|
||||
case TYPE_0:
|
||||
@@ -1018,7 +1123,7 @@ BOOL daNpc_Aru_c::selectAction() {
|
||||
|
||||
mNextAction = &daNpc_Aru_c::wait;
|
||||
break;
|
||||
|
||||
|
||||
case TYPE_2:
|
||||
if (chkBullRunningStage()) {
|
||||
mNextAction = &daNpc_Aru_c::bullRunning;
|
||||
@@ -1071,35 +1176,27 @@ BOOL daNpc_Aru_c::setAction(actionFunc action) {
|
||||
}
|
||||
|
||||
BOOL daNpc_Aru_c::chkBullRunningStage() {
|
||||
BOOL rv;
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP00") == 0) {
|
||||
rv = dComIfG_play_c::getLayerNo(0) == 4 || dComIfG_play_c::getLayerNo(0) == 5;
|
||||
return dComIfG_play_c::getLayerNo(0) == 4 || dComIfG_play_c::getLayerNo(0) == 5;
|
||||
} else {
|
||||
rv = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
BOOL daNpc_Aru_c::chkSkipFenceStage() {
|
||||
BOOL rv;
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP00") == 0) {
|
||||
rv = dComIfG_play_c::getLayerNo(0) == 6 || dComIfG_play_c::getLayerNo(0) == 7;
|
||||
return dComIfG_play_c::getLayerNo(0) == 6 || dComIfG_play_c::getLayerNo(0) == 7;
|
||||
} else {
|
||||
rv = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
s16 daNpc_Aru_c::srchActorDirection(fopAc_ac_c* actor_p) {
|
||||
s16 rv;
|
||||
s16 sVar1 = fopAcM_searchActorAngleY(this, actor_p) - mCurAngle.y;
|
||||
s16 sVar2 = abs(sVar1);
|
||||
s16 sVar3 = cM_deg2s(mpHIO->m.forward_visibility);
|
||||
|
||||
s16 rv = 0;
|
||||
|
||||
if (sVar2 < sVar3) {
|
||||
if (sVar1 > 0) {
|
||||
rv = 7;
|
||||
@@ -1125,23 +1222,24 @@ void daNpc_Aru_c::adjustMoveDir() {
|
||||
cM3dGPla planes[3];
|
||||
cXyz sp84, sp90, sp9c;
|
||||
s16 sVar1[3] = {0, -0x2000, 0x2000};
|
||||
bool bVar1[3];
|
||||
u8 bVar1[3];
|
||||
f32 fVar1[3];
|
||||
s16 sVar3[3];
|
||||
|
||||
sp84 = current.pos;
|
||||
sp84.y += mpHIO->m.common.knee_length;
|
||||
f32 reg_f31 = 400.0f;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
bVar1[i] = 0;
|
||||
sp90 = sp84;
|
||||
|
||||
if (i != 0) {
|
||||
sp90.x += cM_ssin(mCurAngle.y + sVar1[i]) * 280.0f;
|
||||
sp90.z += cM_scos(mCurAngle.y + sVar1[i]) * 280.0f;
|
||||
sp90.x += 0.7f * reg_f31 * cM_ssin(mCurAngle.y + sVar1[i]);
|
||||
sp90.z += 0.7f * reg_f31 * cM_scos(mCurAngle.y + sVar1[i]);
|
||||
} else {
|
||||
sp90.x += cM_ssin(mCurAngle.y + sVar1[i]) * 400.0f;
|
||||
sp90.z += cM_scos(mCurAngle.y + sVar1[i]) * 400.0f;
|
||||
sp90.x += cM_ssin(mCurAngle.y + sVar1[i]) * reg_f31;
|
||||
sp90.z += cM_scos(mCurAngle.y + sVar1[i]) * reg_f31;
|
||||
}
|
||||
|
||||
mLinChk.Set(&sp84, &sp90, this);
|
||||
@@ -1149,9 +1247,7 @@ void daNpc_Aru_c::adjustMoveDir() {
|
||||
if (dComIfG_Bgsp().LineCross(&mLinChk)) {
|
||||
bVar1[i] = dComIfG_Bgsp().GetTriPla(mLinChk, &planes[i]);
|
||||
f32 fVar2 = cM_ssin(0x6000);
|
||||
f32 fVar3 = std::abs(planes[i].mNormal.y);
|
||||
|
||||
if (fVar3 <= fVar2) {
|
||||
if (std::abs(planes[i].mNormal.y) <= fVar2) {
|
||||
sp9c = current.pos - mLinChk.GetCross();
|
||||
fVar1[i] = sp9c.absXZ();
|
||||
sVar3[i] = cM_atan2s(planes[i].mNormal.x, planes[i].mNormal.z);
|
||||
@@ -1218,7 +1314,7 @@ void daNpc_Aru_c::adjustMoveDir() {
|
||||
field_0xfca = 6;
|
||||
mTimer = mpHIO->m.no_turn_time;
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
field_0xfca = 7;
|
||||
break;
|
||||
@@ -1256,11 +1352,11 @@ void daNpc_Aru_c::adjustMoveDir() {
|
||||
case 7:
|
||||
field_0xfca = 2;
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
field_0xfca = 6;
|
||||
break;
|
||||
|
||||
|
||||
case 6:
|
||||
field_0xfca = 1;
|
||||
break;
|
||||
@@ -1277,8 +1373,9 @@ void daNpc_Aru_c::adjustMoveDir() {
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::duck(int param_1) {
|
||||
fopAc_ac_c* cow_p;
|
||||
fopAc_ac_c* cow_p = NULL;
|
||||
int iVar1 = mpHIO->m.avoid_time;
|
||||
int weight = 37;
|
||||
cow_p = getCowP(param_1);
|
||||
|
||||
if (cow_p != NULL) {
|
||||
@@ -1297,7 +1394,7 @@ int daNpc_Aru_c::duck(int param_1) {
|
||||
if (cLib_calcTimer(&field_0xfc4) != 0) {
|
||||
cow_p = mActorMngrs[2].getActorP();
|
||||
if (cow_p != NULL) {
|
||||
mActorDirection = srchActorDirection(cow_p);
|
||||
mActorDirection = (s16) srchActorDirection(cow_p);
|
||||
}
|
||||
|
||||
adjustMoveDir();
|
||||
@@ -1305,19 +1402,19 @@ int daNpc_Aru_c::duck(int param_1) {
|
||||
|
||||
switch (field_0xfca) {
|
||||
case 1:
|
||||
sVar1 -= 0x1000;
|
||||
sVar1 -= (s16) 0x1000;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
sVar1 += 0x1000;
|
||||
sVar1 += (s16) 0x1000;
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
sVar1 -= 0x4000;
|
||||
sVar1 -= (s16) 0x4000;
|
||||
break;
|
||||
|
||||
|
||||
case 6:
|
||||
sVar1 += 0x4000;
|
||||
sVar1 += (s16) 0x4000;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1332,7 +1429,7 @@ int daNpc_Aru_c::duck(int param_1) {
|
||||
speedF *= 0.85f;
|
||||
}
|
||||
|
||||
mCcStts.SetWeight(37);
|
||||
mCcStts.SetWeight(weight);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1345,6 +1442,7 @@ int daNpc_Aru_c::duck(int param_1) {
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::lookround(s16 param_1) {
|
||||
s16 reg_30, reg_29;
|
||||
if (field_0xfd1) {
|
||||
cLib_addCalcAngleS2(¤t.angle.y, param_1, MREG_S(0) + 4, MREG_S(1) + 0x800);
|
||||
shape_angle.y = current.angle.y;
|
||||
@@ -1353,15 +1451,21 @@ int daNpc_Aru_c::lookround(s16 param_1) {
|
||||
if (mMotionSeqMngr.getNo() != MOT_STEP_R) {
|
||||
mMotionSeqMngr.setNo(MOT_STEP_R, -1.0f, FALSE, 0);
|
||||
} else if (mMotionSeqMngr.checkEndSequence()) {
|
||||
if (cM_deg2s(4.0f) >= (s16)abs((s16)(param_1 - mCurAngle.y))) {
|
||||
reg_30 = param_1 - mCurAngle.y;
|
||||
reg_29 = abs(reg_30);
|
||||
if (reg_29 <= cM_deg2s(4.0f)) {
|
||||
mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, FALSE, 0);
|
||||
field_0xfd1 = false;
|
||||
} else {
|
||||
mMotionSeqMngr.setNo(MOT_STEP_R, 0.0f, TRUE, 0);
|
||||
}
|
||||
}
|
||||
} else if (cM_deg2s(90.0f) < (s16)abs((s16)(param_1 - mCurAngle.y))) {
|
||||
field_0xfd1 = true;
|
||||
} else {
|
||||
reg_30 = param_1 - mCurAngle.y;
|
||||
reg_29 = abs(reg_30);
|
||||
if (cM_deg2s(90.0f) < reg_29) {
|
||||
field_0xfd1 = true;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -1369,8 +1473,9 @@ int daNpc_Aru_c::lookround(s16 param_1) {
|
||||
|
||||
int daNpc_Aru_c::cutRideOnHorse(int i_staffID) {
|
||||
int rv = 0;
|
||||
int* piVar1 = NULL;
|
||||
int prm = -1;
|
||||
int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
if (piVar1 != NULL) {
|
||||
prm = *piVar1;
|
||||
}
|
||||
@@ -1380,7 +1485,7 @@ int daNpc_Aru_c::cutRideOnHorse(int i_staffID) {
|
||||
case 0:
|
||||
initTalk(mFlowNodeNo, NULL);
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, FALSE, 0);
|
||||
mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, FALSE, 0);
|
||||
@@ -1411,8 +1516,9 @@ int daNpc_Aru_c::cutRideOnHorse(int i_staffID) {
|
||||
|
||||
int daNpc_Aru_c::cutGotoBullRunningStage(int i_staffID) {
|
||||
int rv = 0;
|
||||
int* piVar1 = NULL;
|
||||
int prm = -1;
|
||||
int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
if (piVar1 != NULL) {
|
||||
prm = *piVar1;
|
||||
}
|
||||
@@ -1426,7 +1532,7 @@ int daNpc_Aru_c::cutGotoBullRunningStage(int i_staffID) {
|
||||
mStepMode = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, FALSE, 0);
|
||||
mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, FALSE, 0);
|
||||
@@ -1454,8 +1560,9 @@ int daNpc_Aru_c::cutGotoBullRunningStage(int i_staffID) {
|
||||
|
||||
int daNpc_Aru_c::cutEndBullRunning(int i_staffID) {
|
||||
int rv = 0;
|
||||
int* piVar1 = NULL;
|
||||
int prm = -1;
|
||||
int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
if (piVar1 != NULL) {
|
||||
prm = *piVar1;
|
||||
}
|
||||
@@ -1468,7 +1575,7 @@ int daNpc_Aru_c::cutEndBullRunning(int i_staffID) {
|
||||
case 1:
|
||||
mDoAud_subBgmStop();
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
if (daNpcT_chkTmpBit(181)) { // dSv_event_tmp_flag_c::T_0181 - Ordon Ranch - Started Goat herding Ⅱ
|
||||
daNpcT_onTmpBit(182); // dSv_event_tmp_flag_c::T_0182 - Ordon Ranch - Finished Goat herding Ⅱ
|
||||
@@ -1503,14 +1610,18 @@ int daNpc_Aru_c::cutEndBullRunning(int i_staffID) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (dComIfG_getTimerPtr() != NULL && dComIfG_getTimerMode() == 2 && !dComIfG_TimerDeleteCheck(2)) {
|
||||
dComIfG_TimerDeleteRequest(2);
|
||||
if (dComIfG_getTimerPtr() != NULL && dComIfG_getTimerMode() == 2) {
|
||||
if (!dComIfG_TimerDeleteCheck(2)) {
|
||||
dComIfG_TimerDeleteRequest(2);
|
||||
}
|
||||
} else {
|
||||
rv = 1; // useless statement, as rv set to 1 below
|
||||
}
|
||||
|
||||
action();
|
||||
rv = 1;
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
action();
|
||||
rv = 1;
|
||||
@@ -1544,8 +1655,9 @@ int daNpc_Aru_c::cutEndBullRunning(int i_staffID) {
|
||||
|
||||
int daNpc_Aru_c::cutGotoSkipFenceStage(int i_staffID) {
|
||||
int rv = 0;
|
||||
int* piVar1 = NULL;
|
||||
int prm = -1;
|
||||
int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
if (piVar1 != NULL) {
|
||||
prm = *piVar1;
|
||||
}
|
||||
@@ -1554,7 +1666,7 @@ int daNpc_Aru_c::cutGotoSkipFenceStage(int i_staffID) {
|
||||
switch (prm) {
|
||||
case 0:
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
mDoAud_subBgmStop();
|
||||
break;
|
||||
@@ -1566,7 +1678,7 @@ int daNpc_Aru_c::cutGotoSkipFenceStage(int i_staffID) {
|
||||
action();
|
||||
rv = 1;
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
if (dComIfG_getTimerPtr() != NULL && dComIfG_getTimerMode() == 2) {
|
||||
if (!dComIfG_TimerDeleteCheck(2)) {
|
||||
@@ -1585,8 +1697,9 @@ int daNpc_Aru_c::cutGotoSkipFenceStage(int i_staffID) {
|
||||
|
||||
int daNpc_Aru_c::cutSpeakTo(int i_staffID) {
|
||||
int rv = 0;
|
||||
int* piVar1 = NULL;
|
||||
int prm = -1;
|
||||
int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
if (piVar1 != NULL) {
|
||||
prm = *piVar1;
|
||||
}
|
||||
@@ -1660,11 +1773,13 @@ int daNpc_Aru_c::cutSpeakTo(int i_staffID) {
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::cutNoEntrance(int i_staffID) {
|
||||
fopAc_ac_c* actor_p = NULL;
|
||||
cXyz work;
|
||||
csXyz angle;
|
||||
int rv = 0;
|
||||
int* piVar1 = NULL;
|
||||
int prm = -1;
|
||||
int* piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
piVar1 = dComIfGp_evmng_getMyIntegerP(i_staffID, "prm");
|
||||
if (piVar1 != NULL) {
|
||||
prm = *piVar1;
|
||||
}
|
||||
@@ -1672,7 +1787,7 @@ int daNpc_Aru_c::cutNoEntrance(int i_staffID) {
|
||||
if (dComIfGp_getEventManager().getIsAddvance(i_staffID)) {
|
||||
switch (prm) {
|
||||
case 0: {
|
||||
fopAc_ac_c* actor_p = mActorMngrs[3].getActorP();
|
||||
actor_p = mActorMngrs[3].getActorP();
|
||||
|
||||
JUT_ASSERT(3279, NULL != actor_p);
|
||||
|
||||
@@ -1703,7 +1818,7 @@ int daNpc_Aru_c::cutNoEntrance(int i_staffID) {
|
||||
setAngle(cLib_targetAngleY(¤t.pos, &work));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 1:
|
||||
initTalk(54, NULL);
|
||||
break;
|
||||
@@ -1714,7 +1829,7 @@ int daNpc_Aru_c::cutNoEntrance(int i_staffID) {
|
||||
case 0:
|
||||
rv = 1;
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
if (talkProc(NULL, FALSE, NULL, FALSE) && mFlow.checkEndFlow()) {
|
||||
rv = 1;
|
||||
@@ -1725,15 +1840,22 @@ int daNpc_Aru_c::cutNoEntrance(int i_staffID) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::wait(void* param_1) {
|
||||
fopAc_ac_c* actor_p;
|
||||
int daNpc_Aru_c::wait(void*) {
|
||||
fopAc_ac_c* actor_p = NULL;
|
||||
int reg_29 = 0; // used but not set
|
||||
|
||||
switch (mMode) {
|
||||
case MODE_ENTER:
|
||||
case MODE_INIT:
|
||||
if (!mStagger.checkStagger()) {
|
||||
mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, FALSE, 0);
|
||||
mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, FALSE, 0);
|
||||
if (mType == TYPE_1 && reg_29 > 0) {
|
||||
// cannot enter here
|
||||
mFaceMotionSeqMngr.setNo(FACE_H_WORRY, -1.0f, FALSE, 0);
|
||||
mMotionSeqMngr.setNo(MOT_TALK_D, -1.0f, FALSE, 0);
|
||||
} else {
|
||||
mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, FALSE, 0);
|
||||
mMotionSeqMngr.setNo(MOT_WAIT_A, -1.0f, FALSE, 0);
|
||||
}
|
||||
field_0xfd1 = false;
|
||||
mMode = MODE_RUN;
|
||||
}
|
||||
@@ -1751,7 +1873,7 @@ int daNpc_Aru_c::wait(void* param_1) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case TYPE_2:
|
||||
if (field_0xfcf) {
|
||||
mSpeakEvent = true;
|
||||
@@ -1806,8 +1928,8 @@ int daNpc_Aru_c::wait(void* param_1) {
|
||||
if (checkStep()) {
|
||||
mStepMode = 0;
|
||||
}
|
||||
} else if (mType == TYPE_0 || mType == TYPE_2 &&
|
||||
daNpcT_chkTmpBit(182)) { // dSv_event_tmp_flag_c::T_0182 - Ordon Ranch - Finished Goat herding Ⅱ
|
||||
} else if (mType == TYPE_0 || (mType == TYPE_2 && daNpcT_chkTmpBit(182))) {
|
||||
// dSv_event_tmp_flag_c::T_0182 - Ordon Ranch - Finished Goat herding Ⅱ
|
||||
mJntAnm.lookPlayer(0);
|
||||
lookround(fopAcM_searchPlayerAngleY(this));
|
||||
} else {
|
||||
@@ -1815,8 +1937,7 @@ int daNpc_Aru_c::wait(void* param_1) {
|
||||
mPlayerActorMngr.remove();
|
||||
}
|
||||
|
||||
fopAc_ac_c* actor_p = mPlayerActorMngr.getActorP();
|
||||
if (actor_p != NULL) {
|
||||
if (mPlayerActorMngr.getActorP() != NULL) {
|
||||
mJntAnm.lookPlayer(0);
|
||||
if (!chkActorInSight(mPlayerActorMngr.getActorP(), mAttnFovY, mCurAngle.y)) {
|
||||
mJntAnm.lookNone(0);
|
||||
@@ -1844,7 +1965,10 @@ int daNpc_Aru_c::wait(void* param_1) {
|
||||
}
|
||||
}
|
||||
|
||||
mJntAnm.getMode();
|
||||
switch (mJntAnm.getMode()) {
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1856,7 +1980,8 @@ int daNpc_Aru_c::wait(void* param_1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::bullRunning(void* param_1) {
|
||||
int daNpc_Aru_c::bullRunning(void*) {
|
||||
int reg_r30 = 0; // unused
|
||||
switch (mMode) {
|
||||
case MODE_ENTER:
|
||||
case MODE_INIT:
|
||||
@@ -1868,7 +1993,7 @@ int daNpc_Aru_c::bullRunning(void* param_1) {
|
||||
}
|
||||
// fallthrough
|
||||
case MODE_RUN:
|
||||
if (dMeter2Info_getNowCount() == (u32)dMeter2Info_getMaxCount() && field_0xfd3) {
|
||||
if (dMeter2Info_getNowCount() == dMeter2Info_getMaxCount() && field_0xfd3) {
|
||||
mDoAud_subBgmStart(Z2BGM_MINIGAME_WIN01);
|
||||
|
||||
if (dComIfG_getTimerPtr() != NULL) {
|
||||
@@ -1960,13 +2085,14 @@ int daNpc_Aru_c::skipFence(void* param_1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpc_Aru_c::talk(void* param_1) {
|
||||
int daNpc_Aru_c::talk(void*) {
|
||||
daHorse_c* horse_p = NULL;
|
||||
switch (mMode) {
|
||||
case MODE_ENTER:
|
||||
case MODE_INIT:
|
||||
if (!mStagger.checkStagger()) {
|
||||
daNpcT_offTmpBit(90); // dSv_event_tmp_flag_c::T_0090 - Ordon Ranch - Epona is at the range (used in goat herding game)
|
||||
daHorse_c* horse_p = dComIfGp_getHorseActor();
|
||||
horse_p = dComIfGp_getHorseActor();
|
||||
if (horse_p != NULL && !horse_p->checkHorseCallWait()) {
|
||||
daNpcT_onTmpBit(90); // dSv_event_tmp_flag_c::T_0090 - Ordon Ranch - Epona is at the range (used in goat herding game)
|
||||
}
|
||||
|
||||
@@ -137,6 +137,51 @@ enum Type {
|
||||
/* 0x5 */ TYPE_DEFAULT,
|
||||
};
|
||||
|
||||
daNpc_Bans_HIOParam const daNpc_Bans_Param_c::m = {
|
||||
200.0f,
|
||||
-3.0f,
|
||||
1.0f,
|
||||
400.0f,
|
||||
255.0f,
|
||||
190.0f,
|
||||
35.0f,
|
||||
30.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
10.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-10.0f,
|
||||
45.0f,
|
||||
-45.0f,
|
||||
0.6f,
|
||||
12.0f,
|
||||
3,
|
||||
6,
|
||||
5,
|
||||
6,
|
||||
110.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
60,
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
4.0f,
|
||||
-20.0f,
|
||||
0.0f,
|
||||
-20.0f,
|
||||
20.0f,
|
||||
40.0f,
|
||||
20.0f,
|
||||
110.0f,
|
||||
10.0f,
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
daNpc_Bans_HIO_c::daNpc_Bans_HIO_c() {
|
||||
m = daNpc_Bans_Param_c::m;
|
||||
@@ -150,7 +195,7 @@ void daNpc_Bans_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
|
||||
|
||||
switch ((u32)event->id) {
|
||||
case 0x40000002:
|
||||
if (jorFile.open(6, "", NULL, NULL, NULL)) {
|
||||
if (jorFile.open(6, "すべてのファイル(*.*)\0*.*\0", NULL, NULL, NULL)) {
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
len = 0;
|
||||
daNpcT_cmnListenPropertyEvent(buffer, &len, &m.common);
|
||||
@@ -325,51 +370,6 @@ daNpc_Bans_c::~daNpc_Bans_c() {
|
||||
deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList);
|
||||
}
|
||||
|
||||
daNpc_Bans_HIOParam const daNpc_Bans_Param_c::m = {
|
||||
200.0f,
|
||||
-3.0f,
|
||||
1.0f,
|
||||
400.0f,
|
||||
255.0f,
|
||||
190.0f,
|
||||
35.0f,
|
||||
30.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
10.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-10.0f,
|
||||
45.0f,
|
||||
-45.0f,
|
||||
0.6f,
|
||||
12.0f,
|
||||
3,
|
||||
6,
|
||||
5,
|
||||
6,
|
||||
110.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
60,
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
4.0f,
|
||||
-20.0f,
|
||||
0.0f,
|
||||
-20.0f,
|
||||
20.0f,
|
||||
40.0f,
|
||||
20.0f,
|
||||
110.0f,
|
||||
10.0f,
|
||||
};
|
||||
|
||||
static NPC_BANS_HIO_CLASS l_HIO;
|
||||
|
||||
cPhs__Step daNpc_Bans_c::create() {
|
||||
@@ -439,13 +439,11 @@ cPhs__Step daNpc_Bans_c::create() {
|
||||
}
|
||||
|
||||
int daNpc_Bans_c::CreateHeap() {
|
||||
J3DModelData* modelData;
|
||||
int bmdIdx;
|
||||
int resIdx;
|
||||
u32 idx = 0;
|
||||
idx = mTwilight == true ? TRUE : FALSE;
|
||||
resIdx = l_bmdData[idx][1];
|
||||
bmdIdx = l_bmdData[idx][0];
|
||||
J3DModelData* modelData = NULL;
|
||||
J3DModel* model = NULL;
|
||||
u32 idx = mTwilight == true ? TRUE : FALSE;
|
||||
int resIdx = l_bmdData[idx][1];
|
||||
int bmdIdx = l_bmdData[idx][0];
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes(l_resNameList[resIdx], bmdIdx);
|
||||
if (modelData == NULL) {
|
||||
return 0;
|
||||
@@ -457,7 +455,7 @@ int daNpc_Bans_c::CreateHeap() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
J3DModel* model = mpMorf[0]->getModel();
|
||||
model = mpMorf[0]->getModel();
|
||||
for (u16 i = 0; i < modelData->getJointNum(); i++) {
|
||||
modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack);
|
||||
}
|
||||
@@ -477,8 +475,8 @@ int daNpc_Bans_c::CreateHeap() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 uVar3 = 0x11000084;
|
||||
mpScoopMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, NULL, J3DMdlFlag_DifferedDLBuffer, uVar3);
|
||||
uVar2 = 0x11000084;
|
||||
mpScoopMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, NULL, J3DMdlFlag_DifferedDLBuffer, uVar2);
|
||||
if (mpScoopMorf == NULL || mpScoopMorf->getModel() == NULL) {
|
||||
return 0;
|
||||
}
|
||||
@@ -1119,10 +1117,10 @@ bool daNpc_Bans_c::setScoopAnm(int i_idx, int i_attr, f32 i_morf) {
|
||||
};
|
||||
|
||||
J3DAnmTransform* anm = NULL;
|
||||
|
||||
int my_idx = i_idx;
|
||||
if (mpScoopMorf != NULL) {
|
||||
if (scoopAnmData[i_idx][0] > 0) {
|
||||
anm = getTrnsfrmKeyAnmP(l_resNameList[scoopAnmData[i_idx][1]], scoopAnmData[i_idx][0]);
|
||||
if (scoopAnmData[my_idx][0] > 0) {
|
||||
anm = getTrnsfrmKeyAnmP(l_resNameList[scoopAnmData[my_idx][1]], scoopAnmData[my_idx][0]);
|
||||
}
|
||||
|
||||
if (anm != NULL) {
|
||||
@@ -1133,12 +1131,9 @@ bool daNpc_Bans_c::setScoopAnm(int i_idx, int i_attr, f32 i_morf) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool daNpc_Bans_c::afterSetMotionAnm(int i_idx, int i_attr, f32 i_morf, int param_4) {
|
||||
if (mCreating == true) {
|
||||
i_morf = 0.0f;
|
||||
}
|
||||
|
||||
return setScoopAnm(i_idx, i_attr, i_morf);
|
||||
bool daNpc_Bans_c::afterSetMotionAnm(int i_idx, int i_attr, f32 i_morf, int) {
|
||||
f32 morf_val = (mCreating == true) ? 0.0f : i_morf;
|
||||
return setScoopAnm(i_idx, i_attr, morf_val);
|
||||
}
|
||||
|
||||
BOOL daNpc_Bans_c::selectAction() {
|
||||
@@ -1184,43 +1179,35 @@ BOOL daNpc_Bans_c::setAction(actionFunc action) {
|
||||
}
|
||||
|
||||
BOOL daNpc_Bans_c::checkPlayerIn2ndFloorOfBombShop() {
|
||||
bool rv = false;
|
||||
|
||||
return strcmp("R_SP109", dComIfGp_getStartStageName()) == 0 && dComIfGp_roomControl_getStayNo() == 1 &&
|
||||
300.0f < fabsf(daPy_getPlayerActorClass()->current.pos.y - current.pos.y);
|
||||
}
|
||||
|
||||
void daNpc_Bans_c::orderAngerEvt() {
|
||||
daTag_EvtArea_c* actor = NULL;
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
|
||||
if (player->checkUseKandelaar(0) && player->getKandelaarFlamePos() != NULL) {
|
||||
mEvtNo = EVT_ANGER;
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
daTag_EvtArea_c* actor = (daTag_EvtArea_c*)mActorMngrs[i + 5].getActorP();
|
||||
bool bVar1 = false;
|
||||
bool bVar2 = false;
|
||||
|
||||
if (actor != NULL) {
|
||||
cXyz& pos(player->current.pos);
|
||||
bVar1 = true;
|
||||
if (actor->chkPointInArea(pos)) {
|
||||
mEvtNo = EVT_ANGER_NEAR;
|
||||
break;
|
||||
}
|
||||
actor = (daTag_EvtArea_c*)mActorMngrs[i + 5].getActorP();
|
||||
if (actor != NULL && actor->chkPointInArea(player->current.pos)) {
|
||||
mEvtNo = EVT_ANGER_NEAR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fopAc_ac_c* daNpc_Bans_c::getKMsgTagP() {
|
||||
f32 fVar1 = 1000000000.0f;
|
||||
int reg_r29 = 0; // unused
|
||||
f32 fVar1 = G_CM3D_F_INF;
|
||||
mFindCount = 0;
|
||||
mSrchName = PROC_TAG_KMSG;
|
||||
fopAcM_Search(srchActor, this);
|
||||
int i = 0;
|
||||
|
||||
for (; i < mFindCount; i++) {
|
||||
for (int i = 0; i < mFindCount; i++) {
|
||||
if (((daTag_KMsg_c*)mFindActorPtrs[i])->getType() == 1) {
|
||||
return mFindActorPtrs[i];
|
||||
}
|
||||
@@ -1485,7 +1472,7 @@ int daNpc_Bans_c::cutPurchase(int i_staffId) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
int daNpc_Bans_c::wait(void* param_1) {
|
||||
int daNpc_Bans_c::wait(void*) {
|
||||
daNpc_Len_c* actor_p = NULL;
|
||||
|
||||
switch (mMode) {
|
||||
@@ -1599,7 +1586,7 @@ int daNpc_Bans_c::wait(void* param_1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpc_Bans_c::tend(void* param_1) {
|
||||
int daNpc_Bans_c::tend(void*) {
|
||||
fopAc_ac_c* actor_p = NULL;
|
||||
|
||||
switch (mMode) {
|
||||
@@ -1731,7 +1718,7 @@ int daNpc_Bans_c::tend(void* param_1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpc_Bans_c::talk(void* param_1) {
|
||||
int daNpc_Bans_c::talk(void*) {
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -1779,7 +1766,7 @@ int daNpc_Bans_c::talk(void* param_1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int daNpc_Bans_c::shop(void* param_1) {
|
||||
int daNpc_Bans_c::shop(void*) {
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -1820,7 +1807,7 @@ int daNpc_Bans_c::shop(void* param_1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int daNpc_Bans_c::test(void* param_1) {
|
||||
int daNpc_Bans_c::test(void*) {
|
||||
int rv = 0;
|
||||
|
||||
switch (mMode) {
|
||||
@@ -1860,7 +1847,7 @@ static int daNpc_Bans_Draw(void* i_this) {
|
||||
return static_cast<daNpc_Bans_c*>(i_this)->Draw();
|
||||
}
|
||||
|
||||
static int daNpc_Bans_IsDelete(void* i_this) {
|
||||
static int daNpc_Bans_IsDelete(void*) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -360,7 +360,6 @@ void daNpc_Besu_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
|
||||
}
|
||||
|
||||
void daNpc_Besu_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// NONMATCHING
|
||||
daNpcT_cmnGenMessage(ctx, &m.common);
|
||||
// animation playback speed:
|
||||
ctx->genSlider("アニメ再生速度 ", &m.field_0x8c, -0.0f, 16.0f);
|
||||
|
||||
+243
-146
@@ -17,10 +17,100 @@
|
||||
#include "d/d_com_static.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_timer.h"
|
||||
#if DEBUG
|
||||
#include "d/d_debug_viewer.h"
|
||||
#endif
|
||||
|
||||
const daNpc_Maro_HIOParam daNpc_Maro_Param_c::m = {
|
||||
100.0f,
|
||||
-3.0f,
|
||||
1.0f,
|
||||
400.0f,
|
||||
255.0f,
|
||||
80.0f,
|
||||
35.0f,
|
||||
30.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
10.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-30.0f,
|
||||
0.6f,
|
||||
12.0f,
|
||||
3,
|
||||
6,
|
||||
5,
|
||||
6,
|
||||
110.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
60,
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
4.0f,
|
||||
-15.0f,
|
||||
0.0f,
|
||||
-15.0f,
|
||||
15.0f,
|
||||
30.0f,
|
||||
15.0f,
|
||||
30.0f,
|
||||
0x0078,
|
||||
};
|
||||
|
||||
#if VERSION != VERSION_WII_USA_R0 && VERSION != VERSION_SHIELD
|
||||
daNpc_Maro_c::actionFunc dummy_lit_4085() {
|
||||
return &daNpc_Maro_c::choccai;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
daNpc_Maro_HIO_c::daNpc_Maro_HIO_c() {
|
||||
m = daNpc_Maro_Param_c::m;
|
||||
}
|
||||
|
||||
void daNpc_Maro_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
|
||||
char msg_buffer[2000];
|
||||
|
||||
JORReflexible::listenPropertyEvent(event);
|
||||
|
||||
JORFile aJStack_910;
|
||||
int len;
|
||||
switch ((u32)event->id) {
|
||||
case 0x40000002:
|
||||
if (aJStack_910.open(6, "すべてのファイル(*.*)\0*.*\0", NULL, NULL, NULL) != 0) {
|
||||
memset(msg_buffer, 0, 2000);
|
||||
len = 0;
|
||||
daNpcT_cmnListenPropertyEvent(msg_buffer, &len, &m.common);
|
||||
// Interval between interactions
|
||||
sprintf(msg_buffer + len, "%d, \t// ちょっかい間隔\n", m.tease_interval);
|
||||
len = strlen(msg_buffer);
|
||||
aJStack_910.writeData(msg_buffer, len);
|
||||
aJStack_910.close();
|
||||
OS_REPORT("write append success!::%6d\n", len);
|
||||
} else {
|
||||
OS_REPORT("write append failure!\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void daNpc_Maro_HIO_c::genMessage(JORMContext* ctx) {
|
||||
daNpcT_cmnGenMessage(ctx, &m.common);
|
||||
// teasing interval
|
||||
ctx->genSlider("ちょっかい間隔 ", &m.tease_interval, 1, 0x400);
|
||||
// export file:
|
||||
ctx->genButton("ファイル書き出し", 0x40000002);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int l_bmdData[2][2] = {
|
||||
{11, 1}, {5, 2},
|
||||
@@ -155,68 +245,11 @@ daNpc_Maro_c::cutFunc daNpc_Maro_c::mCutList[17] = {
|
||||
&daNpc_Maro_c::cutTalkToKakashi,
|
||||
};
|
||||
|
||||
const daNpc_Maro_HIOParam daNpc_Maro_Param_c::m = {
|
||||
100.0f,
|
||||
-3.0f,
|
||||
1.0f,
|
||||
400.0f,
|
||||
255.0f,
|
||||
80.0f,
|
||||
35.0f,
|
||||
30.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
10.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-10.0f,
|
||||
30.0f,
|
||||
-30.0f,
|
||||
0.6f,
|
||||
12.0f,
|
||||
3,
|
||||
6,
|
||||
5,
|
||||
6,
|
||||
110.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
60,
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
4.0f,
|
||||
-15.0f,
|
||||
0.0f,
|
||||
-15.0f,
|
||||
15.0f,
|
||||
30.0f,
|
||||
15.0f,
|
||||
30.0f,
|
||||
0x0078,
|
||||
};
|
||||
|
||||
static NPC_MARO_HIO_CLASS l_HIO;
|
||||
|
||||
#if DEBUG
|
||||
daNpc_Maro_HIO_c::daNpc_Maro_HIO_c() {
|
||||
m = daNpc_Maro_Param_c::m;
|
||||
}
|
||||
|
||||
void daNpc_Maro_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void daNpc_Maro_HIO_c::genMessage(JORMContext* ctx) {
|
||||
// NONMATCHING
|
||||
}
|
||||
#endif
|
||||
|
||||
daNpc_Maro_c::~daNpc_Maro_c() {
|
||||
// destruct
|
||||
OS_REPORT("|%06d:%x|daNpc_Maro_c -> デストラクト\n", g_Counter.mCounter0, this);
|
||||
deleteObject();
|
||||
if (field_0x10bc != 0xFFFFFFFF) {
|
||||
dComIfG_TimerDeleteRequest(0);
|
||||
@@ -244,8 +277,8 @@ int daNpc_Maro_c::create() {
|
||||
0,
|
||||
};
|
||||
daNpcT_ct(this, daNpc_Maro_c, l_faceMotionAnmData, l_motionAnmData,
|
||||
l_faceMotionSequenceData, 4, l_motionSequenceData, 4,
|
||||
l_evtList, l_resNameList
|
||||
l_faceMotionSequenceData, 4, l_motionSequenceData, 4,
|
||||
l_evtList, l_resNameList
|
||||
);
|
||||
mType = getType();
|
||||
mFlowNodeNo = getFlowNodeNo();
|
||||
@@ -256,10 +289,15 @@ int daNpc_Maro_c::create() {
|
||||
|
||||
int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList);
|
||||
if (rv == cPhs_COMPLEATE_e) {
|
||||
OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x, BitSW:%02x, MaxItem:%d, group:%d<%08x> ", fopAcM_getProcNameString(this),
|
||||
mType, mFlowNodeNo, getPathID(), getBitSW(), getMaxNumItem(), getGroupId(), fopAcM_GetParam(this));
|
||||
if (isDelete()) {
|
||||
OS_REPORT("===>isDelete:TRUE\n");
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
OS_REPORT("\n");
|
||||
|
||||
if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -299,26 +337,24 @@ int daNpc_Maro_c::create() {
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::CreateHeap() {
|
||||
int bmd_get_idx;
|
||||
if (mTwilight == 1) {
|
||||
bmd_get_idx = 1;
|
||||
} else {
|
||||
bmd_get_idx = 0;
|
||||
}
|
||||
|
||||
J3DModelData* modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(
|
||||
l_resNameList[l_bmdData[bmd_get_idx][1]], l_bmdData[bmd_get_idx][0]));
|
||||
J3DModelData* modelData = NULL;
|
||||
J3DModel* model = NULL;
|
||||
int bmdIdx = mTwilight == true ? TRUE : FALSE;
|
||||
int res_name_idx = l_bmdData[bmdIdx][1];
|
||||
int my_bmd = l_bmdData[bmdIdx][0];
|
||||
modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_resNameList[res_name_idx], my_bmd));
|
||||
if (modelData == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound,
|
||||
0x80000, 0x11020284);
|
||||
u32 sp_0x1c = 0x11020284;
|
||||
mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000,
|
||||
sp_0x1c);
|
||||
if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
J3DModel* model = mpMorf[0]->getModel();
|
||||
model = mpMorf[0]->getModel();
|
||||
for (u16 i = 0; i < modelData->getJointNum(); i++) {
|
||||
modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack);
|
||||
}
|
||||
@@ -337,7 +373,8 @@ int daNpc_Maro_c::CreateHeap() {
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::Delete() {
|
||||
fopAcM_GetID(this);
|
||||
OS_REPORT("|%06d:%x|daNpc_Maro_c -> Delete\n", g_Counter.mCounter0, this);
|
||||
fopAcM_RegisterDeleteID(this, "NPC_MARO");
|
||||
this->~daNpc_Maro_c();
|
||||
return 1;
|
||||
}
|
||||
@@ -366,11 +403,12 @@ int daNpc_Maro_c::Draw() {
|
||||
J3DModelData* modelData = mpMorf[0]->getModel()->getModelData();
|
||||
modelData->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm[0]);
|
||||
}
|
||||
return daNpcT_c::draw(0, 0, mRealShadowSize, NULL, 100.0f, 0, 0, 0);
|
||||
return daNpcT_c::draw(NpcT_CHK_ACTION(daNpc_Maro_c), 0, mRealShadowSize, NULL, 100.0f, 0, 0, 0);
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
return static_cast<daNpc_Maro_c*>(i_this)->CreateHeap();
|
||||
daNpc_Maro_c* a_this = static_cast<daNpc_Maro_c*>(i_this);
|
||||
return a_this->CreateHeap();
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) {
|
||||
@@ -385,11 +423,15 @@ int daNpc_Maro_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void* daNpc_Maro_c::srchArrow(void* param_1, void* param_2) {
|
||||
if (mFindCount < 50 && param_1 != NULL && param_1 != param_2) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(param_1)) && fopAcM_GetName(param_1) == PROC_ARROW) {
|
||||
mFindActorPtrs[mFindCount] = (fopAc_ac_c*)param_1;
|
||||
mFindCount++;
|
||||
void* daNpc_Maro_c::srchArrow(void* arg0, void* arg1) {
|
||||
fopAc_ac_c* fop1 = (fopAc_ac_c*) arg1;
|
||||
if (mFindCount < 50) {
|
||||
fopAc_ac_c* fop0 = (fopAc_ac_c*) arg0;
|
||||
if (fop0 != NULL && fop0 != fop1) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(fop0)) && fopAcM_GetName(fop0) == PROC_ARROW) {
|
||||
mFindActorPtrs[mFindCount] = fop0;
|
||||
mFindCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
@@ -413,10 +455,13 @@ fopAc_ac_c* daNpc_Maro_c::getArrowP() {
|
||||
|
||||
void* daNpc_Maro_c::srchItaMato(void* arg0, void* arg1) {
|
||||
fopAc_ac_c* fop1 = (fopAc_ac_c*) arg1;
|
||||
if (mFindCount < 50 && arg0 != NULL && arg0 != fop1) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(arg0)) && fopAcM_GetName(arg0) == PROC_OBJ_ITAMATO) {
|
||||
mFindActorPtrs[mFindCount] = (fopAc_ac_c*)arg0;
|
||||
mFindCount++;
|
||||
if (mFindCount < 50) {
|
||||
fopAc_ac_c* fop0 = (fopAc_ac_c*) arg0;
|
||||
if (fop0 != NULL && fop0 != fop1) {
|
||||
if (fopAcM_IsExecuting(fopAcM_GetID(fop0)) && fopAcM_GetName(fop0) == PROC_OBJ_ITAMATO) {
|
||||
mFindActorPtrs[mFindCount] = fop0;
|
||||
mFindCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
@@ -594,11 +639,13 @@ void daNpc_Maro_c::reset() {
|
||||
}
|
||||
|
||||
field_0x10bc = -1;
|
||||
#if VERSION != VERSION_WII_USA_R0
|
||||
daNpcT_offTmpBit(0x3C);
|
||||
daNpcT_offTmpBit(0x3F);
|
||||
daNpcT_offTmpBit(0x40);
|
||||
daNpcT_offTmpBit(0x41);
|
||||
daNpcT_offTmpBit(0x42);
|
||||
#endif
|
||||
daNpcT_offTmpBit(0x64);
|
||||
setAngle(acStack_20);
|
||||
}
|
||||
@@ -778,37 +825,37 @@ void daNpc_Maro_c::srchActors() {
|
||||
switch (mType) {
|
||||
case TYPE_0: {
|
||||
if (mActorMngr[0].getActorP() == NULL) {
|
||||
mActorMngr[0].entry(getNearestActorP(0x241));
|
||||
mActorMngr[0].entry(getNearestActorP(PROC_NPC_KAKASHI));
|
||||
}
|
||||
|
||||
if (mActorMngr[1].getActorP() == NULL) {
|
||||
mActorMngr[1].entry(getNearestActorP(0x26E));
|
||||
mActorMngr[1].entry(getNearestActorP(PROC_NPC_TARO));
|
||||
}
|
||||
|
||||
if (mActorMngr[2].getActorP() == NULL) {
|
||||
mActorMngr[2].entry(getNearestActorP(0x245));
|
||||
mActorMngr[2].entry(getNearestActorP(PROC_NPC_BESU));
|
||||
}
|
||||
|
||||
if (mActorMngr[3].getActorP() == NULL) {
|
||||
mActorMngr[3].entry(getNearestActorP(0x25D));
|
||||
mActorMngr[3].entry(getNearestActorP(PROC_NPC_KOLIN));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case TYPE_1: {
|
||||
if (mActorMngr[0].getActorP() == NULL) {
|
||||
mActorMngr[0].entry(getNearestActorP(0x241));
|
||||
mActorMngr[0].entry(getNearestActorP(PROC_NPC_KAKASHI));
|
||||
}
|
||||
|
||||
if (mActorMngr[1].getActorP() == NULL) {
|
||||
mActorMngr[1].entry(getNearestActorP(0x26E));
|
||||
mActorMngr[1].entry(getNearestActorP(PROC_NPC_TARO));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case TYPE_3: {
|
||||
if (mActorMngr[8].getActorP() == NULL) {
|
||||
mActorMngr[8].entry(getNearestActorP(0x250));
|
||||
mActorMngr[8].entry(getNearestActorP(PROC_NPC_LEN));
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -818,7 +865,7 @@ void daNpc_Maro_c::srchActors() {
|
||||
case TYPE_7: {
|
||||
if (&daNpc_Maro_c::arrowTutorial == field_0x110c) {
|
||||
if (mActorMngr[1].getActorP() == NULL) {
|
||||
mActorMngr[1].entry(getNearestActorP(0x26E));
|
||||
mActorMngr[1].entry(getNearestActorP(PROC_NPC_TARO));
|
||||
}
|
||||
|
||||
if (mActorMngr[6].getActorP() == NULL) {
|
||||
@@ -835,7 +882,7 @@ void daNpc_Maro_c::srchActors() {
|
||||
|
||||
case TYPE_10: {
|
||||
if (mActorMngr[2].getActorP() == NULL) {
|
||||
mActorMngr[2].entry(getNearestActorP(0x245));
|
||||
mActorMngr[2].entry(getNearestActorP(PROC_NPC_BESU));
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -843,34 +890,34 @@ void daNpc_Maro_c::srchActors() {
|
||||
|
||||
case TYPE_12: {
|
||||
if (mActorMngr[1].getActorP() == NULL) {
|
||||
mActorMngr[1].entry(getNearestActorP(0x26E));
|
||||
mActorMngr[1].entry(getNearestActorP(PROC_NPC_TARO));
|
||||
}
|
||||
|
||||
if (mActorMngr[3].getActorP() == NULL) {
|
||||
mActorMngr[3].entry(getNearestActorP(0x25d));
|
||||
mActorMngr[3].entry(getNearestActorP(PROC_NPC_KOLIN));
|
||||
}
|
||||
|
||||
if (mActorMngr[7].getActorP() == NULL) {
|
||||
mActorMngr[7].entry(getNearestActorP(0x264));
|
||||
mActorMngr[7].entry(getNearestActorP(PROC_NPC_SARU));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case TYPE_13: {
|
||||
if (mActorMngr[0].getActorP() == NULL) {
|
||||
mActorMngr[0].entry(getNearestActorP(0x241));
|
||||
mActorMngr[0].entry(getNearestActorP(PROC_NPC_KAKASHI));
|
||||
}
|
||||
|
||||
if (mActorMngr[1].getActorP() == NULL) {
|
||||
mActorMngr[1].entry(getNearestActorP(0x26E));
|
||||
mActorMngr[1].entry(getNearestActorP(PROC_NPC_TARO));
|
||||
}
|
||||
|
||||
if (mActorMngr[2].getActorP() == NULL) {
|
||||
mActorMngr[2].entry(getNearestActorP(0x245));
|
||||
mActorMngr[2].entry(getNearestActorP(PROC_NPC_BESU));
|
||||
}
|
||||
|
||||
if (mActorMngr[3].getActorP() == NULL) {
|
||||
mActorMngr[3].entry(getNearestActorP(0x25D));
|
||||
mActorMngr[3].entry(getNearestActorP(PROC_NPC_KOLIN));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1024,6 +1071,7 @@ void daNpc_Maro_c::setAttnPos() {
|
||||
void daNpc_Maro_c::setCollision() {
|
||||
cXyz cStack_48;
|
||||
if (!mHide) {
|
||||
u32 co_sprm = 0x79;
|
||||
int tgType = 0xd8fbfdff;
|
||||
int tgSPrm = 0x1f;
|
||||
if (mTwilight) {
|
||||
@@ -1033,7 +1081,7 @@ void daNpc_Maro_c::setCollision() {
|
||||
tgType = 0;
|
||||
tgSPrm = 0;
|
||||
}
|
||||
mCyl1.SetCoSPrm(0x79);
|
||||
mCyl1.SetCoSPrm(co_sprm);
|
||||
mCyl1.SetTgType(tgType);
|
||||
mCyl1.SetTgSPrm(tgSPrm);
|
||||
mCyl1.OnTgNoHitMark();
|
||||
@@ -1054,6 +1102,17 @@ void daNpc_Maro_c::setCollision() {
|
||||
}
|
||||
|
||||
BOOL daNpc_Maro_c::drawDbgInfo() {
|
||||
#if DEBUG
|
||||
if (mpHIO->m.common.debug_info_ON) {
|
||||
f32 dist_max_speak = dComIfGp_getAttention()->getDistTable(attention_info.distances[fopAc_attn_SPEAK_e]).mDistMax;
|
||||
f32 dist_max_talk = dComIfGp_getAttention()->getDistTable(attention_info.distances[fopAc_attn_TALK_e]).mDistMax;
|
||||
dDbVw_drawCircleOpa(attention_info.position, dist_max_speak, (GXColor){0x00, 0xC8, 0x00, 0xFF}, 1, 12);
|
||||
dDbVw_drawCircleOpa(attention_info.position, dist_max_talk, (GXColor){0xC8, 0x00, 0x00, 0xFF}, 1, 12);
|
||||
dDbVw_drawSphereXlu(eyePos, 18.0f, (GXColor){0x80, 0x80, 0x80, 0xA0}, 1);
|
||||
dDbVw_drawSphereXlu(attention_info.position, 9.0f, (GXColor){0x80, 0x80, 0x80, 0xA0}, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1087,6 +1146,13 @@ void daNpc_Maro_c::drawOtherMdl() {
|
||||
|
||||
int daNpc_Maro_c::selectAction() {
|
||||
field_0x110c = NULL;
|
||||
#if DEBUG
|
||||
if (mpHIO->m.common.debug_mode_ON) {
|
||||
field_0x110c = &daNpc_Maro_c::test;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (mType) {
|
||||
case 7: {
|
||||
field_0x110c = &daNpc_Maro_c::tend;
|
||||
@@ -1384,7 +1450,7 @@ int daNpc_Maro_c::cutFindMonkey(int arg0) {
|
||||
mJntAnm.lookNone(0);
|
||||
if (mEventTimer == 0) {
|
||||
actor_p = dComIfGp_getHorseActor();
|
||||
JUT_ASSERT(0xA99, NULL != actor_p);
|
||||
JUT_ASSERT(2713, NULL != actor_p);
|
||||
my_vec_0 = actor_p->current.pos;
|
||||
if (50.0f < current.pos.absXZ(my_vec_0)) {
|
||||
cLib_addCalcAngleS2(¤t.angle.y, cLib_targetAngleY(¤t.pos, &my_vec_0), 4, 0x800);
|
||||
@@ -1464,7 +1530,7 @@ int daNpc_Maro_c::cutGiveMeWoodSwd(int arg0) {
|
||||
|
||||
case 1: {
|
||||
actor_p = mActorMngr[3].getActorP();
|
||||
JUT_ASSERT(0xB00, NULL != actor_p);
|
||||
JUT_ASSERT(2816, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
retval = 1;
|
||||
break;
|
||||
@@ -1568,7 +1634,7 @@ int daNpc_Maro_c::cutGetWoodSwd(int arg0) {
|
||||
|
||||
case 1: {
|
||||
actor_p = mActorMngr[3].getActorP();
|
||||
JUT_ASSERT(0xB79, NULL != actor_p);
|
||||
JUT_ASSERT(2937, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
retval = 1;
|
||||
break;
|
||||
@@ -1577,7 +1643,7 @@ int daNpc_Maro_c::cutGetWoodSwd(int arg0) {
|
||||
case 2:
|
||||
case 3: {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xB81, NULL != actor_p);
|
||||
JUT_ASSERT(2945, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
retval = 1;
|
||||
break;
|
||||
@@ -1585,7 +1651,7 @@ int daNpc_Maro_c::cutGetWoodSwd(int arg0) {
|
||||
|
||||
case 4: {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xB81, NULL != actor_p);
|
||||
JUT_ASSERT(2952, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
if (mEventTimer == 0) {
|
||||
my_vec_0.set(0.0f, 0.0f, 1600.0f);
|
||||
@@ -1628,7 +1694,6 @@ int daNpc_Maro_c::cutGetWoodSwd(int arg0) {
|
||||
|
||||
int daNpc_Maro_c::cutConversationWithMaro(int arg0) {
|
||||
fopAc_ac_c* actor_p = NULL;
|
||||
cXyz my_vec_0;
|
||||
int retval = 0;
|
||||
int* param_p = NULL;
|
||||
int prm_val = -1;
|
||||
@@ -1637,11 +1702,19 @@ int daNpc_Maro_c::cutConversationWithMaro(int arg0) {
|
||||
prm_val = *param_p;
|
||||
}
|
||||
|
||||
dComIfGp_getEventManager().getIsAddvance(arg0);
|
||||
if (dComIfGp_getEventManager().getIsAddvance(arg0)) {
|
||||
#if DEBUG
|
||||
switch (prm_val) {
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
switch (prm_val) {
|
||||
case 0: {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xB81, NULL != actor_p);
|
||||
JUT_ASSERT(3040, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
retval = 1;
|
||||
break;
|
||||
@@ -1675,6 +1748,7 @@ int daNpc_Maro_c::cutCacaricoConversation(int arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
int dummy_vals[2] = {-1, -1}; // unused
|
||||
switch (prm_val) {
|
||||
case 0: {
|
||||
mJntAnm.lookPlayer(0);
|
||||
@@ -1748,11 +1822,6 @@ int daNpc_Maro_c::cutSurprise(int arg0) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
int dummy_lit_6272(int arg) {
|
||||
int dummy_vals[2] = {-1, -1};
|
||||
return dummy_vals[arg];
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
fopAc_ac_c* actor_p = NULL;
|
||||
cXyz my_vec_0, temp, my_vec_2;
|
||||
@@ -1797,7 +1866,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
case 0: {
|
||||
mActorMngr[4].entry(getItaMatoP(1));
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xCC3, NULL != actor_p);
|
||||
JUT_ASSERT(3267, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPtI(actor_p);
|
||||
break;
|
||||
}
|
||||
@@ -1810,7 +1879,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
case 2:
|
||||
case 4: {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xCCE, NULL != actor_p);
|
||||
JUT_ASSERT(3278, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
break;
|
||||
}
|
||||
@@ -1866,7 +1935,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
dComIfGp_getEvent()->setPtT(this);
|
||||
mActorMngr[4].entry(getItaMatoP(1));
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xD0B, NULL != actor_p);
|
||||
JUT_ASSERT(3339, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPtI(actor_p);
|
||||
break;
|
||||
}
|
||||
@@ -1885,7 +1954,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
case 32: {
|
||||
mActorMngr[4].entry(getItaMatoP(2));
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xD1E, NULL != actor_p);
|
||||
JUT_ASSERT(3358, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPtI(actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
}
|
||||
@@ -1901,7 +1970,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
mEventTimer = timer_val;
|
||||
mActorMngr[4].entry(getItaMatoP(2));
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xD2E, NULL != actor_p);
|
||||
JUT_ASSERT(3374, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPtI(actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
break;
|
||||
@@ -1937,7 +2006,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
case 65: {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xD2E, NULL != actor_p);
|
||||
JUT_ASSERT(3415, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
break;
|
||||
}
|
||||
@@ -2007,7 +2076,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
mDoMtx_stack_c::multVec(&my_vec_0, &temp);
|
||||
mGndChk.SetPos(&temp);
|
||||
temp.y = dComIfG_Bgsp().GroundCross(&mGndChk);
|
||||
JUT_ASSERT(0xDA9, -G_CM3D_F_INF != temp.y);
|
||||
JUT_ASSERT(3497, -G_CM3D_F_INF != temp.y);
|
||||
dComIfGp_evmng_setGoal(&temp);
|
||||
}
|
||||
|
||||
@@ -2017,7 +2086,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
case 34: {
|
||||
mActorMngr[4].entry(getItaMatoP(2));
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xDB3, NULL != actor_p);
|
||||
JUT_ASSERT(3507, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPtI(actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
}
|
||||
@@ -2029,7 +2098,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
case 44: {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xDBD, NULL != actor_p);
|
||||
JUT_ASSERT(3517, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
break;
|
||||
}
|
||||
@@ -2072,7 +2141,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
if (prm_val == 1 && retval != 0) {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xDF0, NULL != actor_p);
|
||||
JUT_ASSERT(3568, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
}
|
||||
|
||||
@@ -2084,7 +2153,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
case 5: {
|
||||
if (prm_val != 5) {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xDFA, NULL != actor_p);
|
||||
JUT_ASSERT(3578, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, 0.0f, 0);
|
||||
}
|
||||
|
||||
@@ -2166,7 +2235,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
case 30: {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3656, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, 0.0f, 0);
|
||||
if (cLib_calcTimer(&mEventTimer) == 0) {
|
||||
retval = 1;
|
||||
@@ -2178,7 +2247,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
case 32:
|
||||
case 91: {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3666, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, 0.0f, 0);
|
||||
my_vals[0] = msgNo_val;
|
||||
if (talkProc(my_vals, send_val, local_4c, false)) {
|
||||
@@ -2209,7 +2278,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
case 40: {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3697, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, 0.0f, 0);
|
||||
if (cLib_calcTimer(&mEventTimer) == 0) {
|
||||
retval = 1;
|
||||
@@ -2220,7 +2289,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
case 41: {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3706, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, 0.0f, 0);
|
||||
my_vals[0] = msgNo_val;
|
||||
if (talkProc(my_vals, 0, local_4c, false)) {
|
||||
@@ -2235,7 +2304,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
if (retval != 0) {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3721, NULL != actor_p);
|
||||
dComIfGp_getEvent()->setPt2(actor_p);
|
||||
}
|
||||
|
||||
@@ -2246,7 +2315,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
case 43:
|
||||
case 92: {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3730, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
my_vals[0] = msgNo_val;
|
||||
if (talkProc(my_vals, send_val, local_4c, false)) {
|
||||
@@ -2437,7 +2506,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
case 34: {
|
||||
actor_p = mActorMngr[4].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3927, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, 0.0f, 0);
|
||||
my_vals[0] = msgNo_val;
|
||||
if (talkProc(my_vals, send_val, local_4c, 0)) {
|
||||
@@ -2468,7 +2537,7 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
|
||||
case 44: {
|
||||
actor_p = mActorMngr[1].getActorP();
|
||||
JUT_ASSERT(0xE48, NULL != actor_p);
|
||||
JUT_ASSERT(3958, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
my_vals[0] = msgNo_val;
|
||||
if (talkProc(my_vals, send_val, local_4c, 0)) {
|
||||
@@ -2560,7 +2629,7 @@ int daNpc_Maro_c::cutMarosWhisper(int arg0) {
|
||||
case 0: {
|
||||
endChoccai();
|
||||
actor_p = mActorMngr[0].getActorP();
|
||||
JUT_ASSERT(0xFF8, NULL != actor_p);
|
||||
JUT_ASSERT(4088, NULL != actor_p);
|
||||
angle_y = fopAcM_searchActorAngleY(daPy_getPlayerActorClass(), actor_p);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&daPy_getPlayerActorClass()->current.pos,
|
||||
angle_y, 0);
|
||||
@@ -2622,6 +2691,7 @@ int daNpc_Maro_c::cutMarosWhisper(int arg0) {
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::cutTagPush1(int arg0) {
|
||||
int retval = 0;
|
||||
int* param_p = NULL;
|
||||
int prm_val = -1;
|
||||
param_p = dComIfGp_evmng_getMyIntegerP(arg0, "prm");
|
||||
@@ -2648,15 +2718,22 @@ int daNpc_Maro_c::cutTagPush1(int arg0) {
|
||||
case 0: {
|
||||
action();
|
||||
mEvtNo = 0;
|
||||
return 1;
|
||||
retval = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
case 1: {
|
||||
return 1;
|
||||
retval = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
retval = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return retval;
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::cutNotGonnaLet(int arg0) {
|
||||
@@ -2682,7 +2759,7 @@ int daNpc_Maro_c::cutNotGonnaLet(int arg0) {
|
||||
mFaceMotionSeqMngr.setNo(9, 0.0f, 0, 0);
|
||||
mMotionSeqMngr.setNo(4, 0.0f, 0, 0);
|
||||
actor_p = mActorMngr[3].getActorP();
|
||||
JUT_ASSERT(0x108E, NULL != actor_p);
|
||||
JUT_ASSERT(4238, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
my_vec_0.set(-718.0f, 1331.0f, -2139.0f);
|
||||
setPos(my_vec_0);
|
||||
@@ -2711,7 +2788,7 @@ int daNpc_Maro_c::cutNotGonnaLet(int arg0) {
|
||||
mFaceMotionSeqMngr.setNo(9, 0.0f, 0, 0);
|
||||
mMotionSeqMngr.setNo(0, 0.0f, 0, 0);
|
||||
actor_p = mActorMngr[3].getActorP();
|
||||
JUT_ASSERT(0x10B0, NULL != actor_p);
|
||||
JUT_ASSERT(4272, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 0);
|
||||
my_vec_0.set(-718.0f, 1331.0f, -2139.0f);
|
||||
setPos(my_vec_0);
|
||||
@@ -2819,7 +2896,7 @@ int daNpc_Maro_c::cutTalkToKakashi(int arg0) {
|
||||
mDoMtx_stack_c::multVec(&my_vec_0, &temp);
|
||||
mGndChk.SetPos(&temp);
|
||||
temp.y = dComIfG_Bgsp().GroundCross(&mGndChk);
|
||||
JUT_ASSERT(0xDA9, -G_CM3D_F_INF != temp.y);
|
||||
JUT_ASSERT(4393, -G_CM3D_F_INF != temp.y);
|
||||
angle_y = cLib_targetAngleY(&temp, ¤t.pos);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&temp, angle_y, 0);
|
||||
break;
|
||||
@@ -2829,7 +2906,7 @@ int daNpc_Maro_c::cutTalkToKakashi(int arg0) {
|
||||
mFaceMotionSeqMngr.setNo(9, 0.0f, 0, 0);
|
||||
mMotionSeqMngr.setNo(0, 0.0f, 0, 0);
|
||||
actor_p = mActorMngr[0].getActorP();
|
||||
JUT_ASSERT(0x1133, NULL != actor_p);
|
||||
JUT_ASSERT(4403, NULL != actor_p);
|
||||
mJntAnm.lookActor(actor_p, -40.0f, 1);
|
||||
initTalk(mFlowNodeNo, NULL);
|
||||
break;
|
||||
@@ -2862,7 +2939,7 @@ int daNpc_Maro_c::cutTalkToKakashi(int arg0) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::wait(void* param_0) {
|
||||
int daNpc_Maro_c::wait(void*) {
|
||||
fopAc_ac_c* actor_p = NULL;
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
@@ -3302,7 +3379,7 @@ int daNpc_Maro_c::arrowTutorial(void* ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::talk(void* param_0) {
|
||||
int daNpc_Maro_c::talk(void*) {
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
case 1: {
|
||||
@@ -3352,7 +3429,7 @@ int daNpc_Maro_c::talk(void* param_0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int daNpc_Maro_c::shop(void* param_0) {
|
||||
int daNpc_Maro_c::shop(void*) {
|
||||
int retval = 0;
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
@@ -3389,6 +3466,26 @@ int daNpc_Maro_c::shop(void* param_0) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
BOOL daNpc_Maro_c::test(void*) {
|
||||
switch(mMode) {
|
||||
case 0:
|
||||
case 1:
|
||||
speedF = 0.0f;
|
||||
speed.setall(0.0f);
|
||||
mMode = 2;
|
||||
// fallthrough
|
||||
case 2:
|
||||
mFaceMotionSeqMngr.setNo(mpHIO->m.common.face_expression, -1.0f, 0, 0);
|
||||
mMotionSeqMngr.setNo(mpHIO->m.common.motion, -1.0f, 0, 0);
|
||||
mJntAnm.lookNone(0);
|
||||
attention_info.flags = 0;
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daNpc_Maro_Create(void* i_this) {
|
||||
return static_cast<daNpc_Maro_c*>(i_this)->create();
|
||||
}
|
||||
@@ -3405,7 +3502,7 @@ static int daNpc_Maro_Draw(void* i_this) {
|
||||
return static_cast<daNpc_Maro_c*>(i_this)->Draw();
|
||||
}
|
||||
|
||||
static int daNpc_Maro_IsDelete(void* i_this) {
|
||||
static int daNpc_Maro_IsDelete(void*) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -2007,7 +2007,7 @@ int daNpc_Toby_c::walk(void*) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpc_Toby_c::play(void* param_0) {
|
||||
int daNpc_Toby_c::play(void*) {
|
||||
daObj_AutoMata_c* actor_p = (daObj_AutoMata_c*) mActorMngr[1].getActorP();
|
||||
int reg_r29 = 1;
|
||||
if (actor_p != NULL) {
|
||||
@@ -2192,7 +2192,7 @@ static int daNpc_Toby_Draw(void* i_this) {
|
||||
return static_cast<daNpc_Toby_c*>(i_this)->Draw();
|
||||
}
|
||||
|
||||
static int daNpc_Toby_IsDelete(void* i_this) {
|
||||
static int daNpc_Toby_IsDelete(void*) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ static int daTag_Push_Draw(void* i_this) {
|
||||
return static_cast<daTag_Push_c*>(i_this)->Draw();
|
||||
}
|
||||
|
||||
static int daTag_Push_IsDelete(void* i_this) {
|
||||
static int daTag_Push_IsDelete(void*) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user