Miscellaneous improvements (#2603)

This commit is contained in:
Max Roncace
2025-08-25 18:33:44 -04:00
committed by GitHub
parent 19c8b6995e
commit b309e0cf57
17 changed files with 632 additions and 885 deletions
+3 -3
View File
@@ -1569,7 +1569,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01"), "d_a_e_nest"),
ActorRel(MatchingFor("GZ2E01"), "d_a_e_rd"),
ActorRel(MatchingFor("GZ2E01"), "d_a_econt"),
ActorRel(NonMatching, "d_a_fr"),
ActorRel(MatchingFor("GZ2E01"), "d_a_fr"),
ActorRel(NonMatching, "d_a_grass"),
ActorRel(MatchingFor("GZ2E01"), "d_a_kytag05"),
ActorRel(MatchingFor("GZ2E01"), "d_a_kytag10"),
@@ -1707,7 +1707,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01"), "d_a_e_mb"),
ActorRel(MatchingFor("GZ2E01"), "d_a_e_md"),
ActorRel(MatchingFor("GZ2E01"), "d_a_e_mf"),
ActorRel(NonMatching, "d_a_e_mk"),
ActorRel(MatchingFor("GZ2E01"), "d_a_e_mk"),
ActorRel(NonMatching, "d_a_e_mk_bo"),
ActorRel(NonMatching, "d_a_e_mm"),
ActorRel(NonMatching, "d_a_e_mm_mt"),
@@ -1887,7 +1887,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_npc_zelR"),
ActorRel(NonMatching, "d_a_npc_zelRo"),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_zelda"),
ActorRel(NonMatching, "d_a_npc_zra", extra_cflags=[DANPCF_C_HACK]),
ActorRel(Equivalent, "d_a_npc_zra", extra_cflags=[DANPCF_C_HACK]), # regalloc
ActorRel(NonMatching, "d_a_npc_zrc", extra_cflags=[DANPCF_C_HACK]),
ActorRel(NonMatching, "d_a_npc_zrz", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_Lv5Key"),
+3 -3
View File
@@ -138,7 +138,7 @@ public:
void getGlobalTranslation(JGeometry::TVec3<f32>* out) const { out->set(mGlobalTrs); }
void setGlobalDynamicsScale(const JGeometry::TVec3<f32>& i_scale) { mGlobalScl.set(i_scale); }
void setGlobalAlpha(u8 alpha) { mGlobalPrmClr.a = alpha; }
u8 getGlobalAlpha() { return mGlobalPrmClr.a; }
u8 getGlobalAlpha() const { return mGlobalPrmClr.a; }
void getGlobalPrmColor(GXColor& color) { color = mGlobalPrmClr; }
void setGlobalPrmColor(u8 r, u8 g, u8 b) { mGlobalPrmClr.r = r; mGlobalPrmClr.g = g; mGlobalPrmClr.b = b; }
void setGlobalEnvColor(u8 r, u8 g, u8 b) { mGlobalEnvClr.r = r; mGlobalEnvClr.g = g; mGlobalEnvClr.b = b; }
@@ -198,10 +198,10 @@ public:
u32 getUserWork() { return mpUserWork; }
void setUserWork(u32 userWork) { mpUserWork = userWork; }
u32 getParticleNumber() {
u32 getParticleNumber() const {
return mAlivePtclBase.getNum() + mAlivePtclChld.getNum();
}
bool isEnableDeleteEmitter() {
bool isEnableDeleteEmitter() const {
return checkStatus(JPAEmtrStts_EnableDeleteEmitter) && getParticleNumber() == 0;
}
void setDrawTimes(u8 drawTimes) { mDrawTimes = drawTimes; }
+15 -15
View File
@@ -221,9 +221,9 @@ public:
/* 0x0 */ u8 unk_0x0;
};
class daAlinkHIO_c
class daAlinkHIO_c
#ifdef DEBUG
: public mDoHIO_entry_c
: public mDoHIO_entry_c
#endif
{
public:
@@ -3475,19 +3475,19 @@ public:
u32 getStartEvent() { return fopAcM_GetParam(this) >> 0x18; }
BOOL checkClimbFall() { return checkLadderFall(); }
bool checkMidnaWolfDashAnime() { return checkNoResetFlg1(FLG1_DASH_MODE); }
bool checkMidnaClingAnime() { return mMidnaAnm == 1; }
bool checkMidnaLowClingAnime() { return mMidnaAnm == 2; }
bool checkMidnaLookAroundAnime() { return mMidnaAnm == 3; }
bool checkMidnaPanicAnime() { return mMidnaAnm == 5; }
bool checkMidnaWolfDeadAnime() { return mMidnaAnm == 6; }
bool checkMidnaWolfSwimDeadAnime() { return mMidnaAnm == 7; }
bool checkMidnaRopeWaitStaggerAnime() { return mMidnaAnm == 8; }
bool checkMidnaRopeMoveStaggerAnime() { return mMidnaAnm == 9; }
bool checkMidnaGanonCatchAnm() { return mMidnaAnm == 10; }
bool checkMidnaGanonThrowLeftAnm() { return mMidnaAnm == 11; }
bool checkMidnaGanonThrowRightAnm() { return mMidnaAnm == 12; }
bool checkMidnaDigInAnime() { return mMidnaAnm == 13; }
bool checkMidnaWolfDashAnime() const { return checkNoResetFlg1(FLG1_DASH_MODE); }
bool checkMidnaClingAnime() const { return mMidnaAnm == 1; }
bool checkMidnaLowClingAnime() const { return mMidnaAnm == 2; }
bool checkMidnaLookAroundAnime() const { return mMidnaAnm == 3; }
bool checkMidnaPanicAnime() const { return mMidnaAnm == 5; }
bool checkMidnaWolfDeadAnime() const { return mMidnaAnm == 6; }
bool checkMidnaWolfSwimDeadAnime() const { return mMidnaAnm == 7; }
bool checkMidnaRopeWaitStaggerAnime() const { return mMidnaAnm == 8; }
bool checkMidnaRopeMoveStaggerAnime() const { return mMidnaAnm == 9; }
bool checkMidnaGanonCatchAnm() const { return mMidnaAnm == 10; }
bool checkMidnaGanonThrowLeftAnm() const { return mMidnaAnm == 11; }
bool checkMidnaGanonThrowRightAnm() const { return mMidnaAnm == 12; }
bool checkMidnaDigInAnime() const { return mMidnaAnm == 13; }
void clearMidnaMsgNum() {
mMidnaMsgNum = 0xffff;
-18
View File
@@ -18,8 +18,6 @@
*/
class e_mk_class {
public:
/* 8071C190 */ e_mk_class() {}
enum e_mk_ACTION {
ACT_WAIT,
ACT_MOVE,
@@ -128,20 +126,4 @@ public:
STATIC_ASSERT(sizeof(e_mk_class) == 0xcf8);
class daE_MK_HIO_c : public JORReflexible {
public:
/* 8071412C */ daE_MK_HIO_c();
/* 8071C3EC */ virtual ~daE_MK_HIO_c() {};
void genMessage(JORMContext*);
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 mSize;
/* 0x0C */ f32 mBoomerangRatio;
/* 0x10 */ f32 mPlayerThrowDistMax;
/* 0x14 */ u8 mHaltAction;
/* 0x18 */ cXyz mCrownPosAdjust;
};
#endif /* D_A_E_MK_H */
-20
View File
@@ -59,25 +59,5 @@ public:
STATIC_ASSERT(sizeof(fr_class) == 0x9e8);
class daFr_HIO_c : public JORReflexible {
public:
/* 805198EC */ daFr_HIO_c();
/* 8051B920 */ virtual ~daFr_HIO_c() {};
void genMessage(JORMContext*);
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xc;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x1C */ f32 field_0x1c;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ f32 field_0x24;
/* 0x28 */ f32 field_0x28;
/* 0x2C */ f32 field_0x2c;
};
#endif /* D_A_FR_H */
+1 -1
View File
@@ -319,7 +319,7 @@ public:
MtxP getMtxHairTop() { return mpShadowModel->getAnmMtx(10); }
bool checkSetAnime(int param_0, daMidna_ANM i_anm) {
bool checkSetAnime(int param_0, daMidna_ANM i_anm) const {
return mBckHeap[param_0].getIdx() == m_anmDataTable[i_anm].mResID;
}
+14 -20
View File
@@ -165,7 +165,7 @@ inline f32 Cd2_HIO_cylH(int param_1) {
return param_1 < 16 ? l_Cd2_HIO.field_0x0004[param_1].mCylH : l_Cd2_HIO.field_0x20c4[param_1 - 16].mCylH;
}
inline int Cd2_HIO_maxLmtX_BACKBONE(int param_1) {
inline s16 Cd2_HIO_maxLmtX_BACKBONE(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_BACKBONE;
@@ -175,7 +175,7 @@ inline int Cd2_HIO_maxLmtX_BACKBONE(int param_1) {
return rv;
}
inline int Cd2_HIO_maxLmtY_BACKBONE(int param_1) {
inline s16 Cd2_HIO_maxLmtY_BACKBONE(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_BACKBONE;
@@ -185,7 +185,7 @@ inline int Cd2_HIO_maxLmtY_BACKBONE(int param_1) {
return rv;
}
inline int Cd2_HIO_maxLmtX_NECK(int param_1) {
inline s16 Cd2_HIO_maxLmtX_NECK(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_NECK;
@@ -195,7 +195,7 @@ inline int Cd2_HIO_maxLmtX_NECK(int param_1) {
return rv;
}
inline int Cd2_HIO_maxLmtY_NECK(int param_1) {
inline s16 Cd2_HIO_maxLmtY_NECK(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_NECK;
@@ -205,7 +205,7 @@ inline int Cd2_HIO_maxLmtY_NECK(int param_1) {
return rv;
}
inline int Cd2_HIO_maxLmtX_HEAD(int param_1) {
inline s16 Cd2_HIO_maxLmtX_HEAD(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_HEAD;
@@ -215,7 +215,7 @@ inline int Cd2_HIO_maxLmtX_HEAD(int param_1) {
return rv;
}
inline int Cd2_HIO_maxLmtY_HEAD(int param_1) {
inline s16 Cd2_HIO_maxLmtY_HEAD(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_HEAD;
@@ -225,7 +225,7 @@ inline int Cd2_HIO_maxLmtY_HEAD(int param_1) {
return rv;
}
inline int Cd2_HIO_minLmtX_BACKBONE(int param_1) {
inline s16 Cd2_HIO_minLmtX_BACKBONE(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_BACKBONE;
@@ -235,7 +235,7 @@ inline int Cd2_HIO_minLmtX_BACKBONE(int param_1) {
return rv;
}
inline int Cd2_HIO_minLmtY_BACKBONE(int param_1) {
inline s16 Cd2_HIO_minLmtY_BACKBONE(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_BACKBONE;
@@ -245,7 +245,7 @@ inline int Cd2_HIO_minLmtY_BACKBONE(int param_1) {
return rv;
}
inline int Cd2_HIO_minLmtX_NECK(int param_1) {
inline s16 Cd2_HIO_minLmtX_NECK(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_NECK;
@@ -255,7 +255,7 @@ inline int Cd2_HIO_minLmtX_NECK(int param_1) {
return rv;
}
inline int Cd2_HIO_minLmtY_NECK(int param_1) {
inline s16 Cd2_HIO_minLmtY_NECK(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_NECK;
@@ -265,7 +265,7 @@ inline int Cd2_HIO_minLmtY_NECK(int param_1) {
return rv;
}
inline int Cd2_HIO_minLmtX_HEAD(int param_1) {
inline s16 Cd2_HIO_minLmtX_HEAD(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_HEAD;
@@ -275,7 +275,7 @@ inline int Cd2_HIO_minLmtX_HEAD(int param_1) {
return rv;
}
inline int Cd2_HIO_minLmtY_HEAD(int param_1) {
inline s16 Cd2_HIO_minLmtY_HEAD(int param_1) {
s16 rv;
if (param_1 < 16) {
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_HEAD;
@@ -304,16 +304,10 @@ public:
bool isPath() { return mPath != NULL; }
s8 getArg0() { return mPath->m_points[field_0x20].mArg0; }
s8 getArg1() { return mPath->m_points[field_0x20].mArg1; }
Vec getPoint(int index) { return mPath->m_points[index].m_position; }
Vec getPoint(u16 index) { return mPath->m_points[(u16)index].m_position; }
void setLastPointNum() { field_0x20 = mPath->m_num - 1; }
u16 getLastPointNum() {
u32 rv;
if (field_0x24 == 1) {
rv = mPath->m_num - 1;
} else {
return 0;
}
return rv;
return field_0x24 == 1 ? mPath->m_num - 1 : 0;
}
/* 0x00 */ fopAc_ac_c* mMyself;
+7 -7
View File
@@ -149,12 +149,12 @@ public:
u16 startTime = getStartTime();
u16 endTime = getEndTime();
if (startTime != 0xff && endTime != 0xff) {
u32 x = (u16)(startTime / 10);
u32 y = startTime % 10;
field_0xb8e = ((u16)(y * 10) + (x * 60));
u32 x2 = (u16)(endTime / 10);
u32 y2 = endTime % 10;
field_0xb8e = ((u16)(y2 * 10) + (x2 * 60));
u16 x = startTime / 10;
u16 y = (startTime % 10) * 10;
field_0xb8c = y + x * 60;
x = endTime / 10;
y = (endTime % 10) * 10;
field_0xb8e = y + x * 60;
field_0xb96 = 0;
} else {
field_0xb96 = 1;
@@ -320,7 +320,7 @@ public:
return 1;
}
inline bool searchFirstScheduleTag(fopAc_ac_c* param_1);
inline bool searchFirstScheduleTag();
inline bool searchNextScheduleTag();
static actionFunc ActionTable[8][2];
+2 -1
View File
@@ -3,6 +3,7 @@
#include "d/actor/d_a_npc.h"
class daNpc_zrA_HIO_c;
/**
* @ingroup actors-npcs
* @class daNpc_zrA_Path_c
@@ -332,7 +333,7 @@ public:
/* 0x1248 */ daNpcF_Lookat_c mLookat;
/* 0x12E4 */ dPaPo_c mPaPo;
/* 0x131C */ daNpcF_ActorMngr_c mActorMngr[3];
/* 0x1334 */ u8 field_0x1334[4];
/* 0x1334 */ daNpc_zrA_HIO_c* mpHIO;
/* 0x1338 */ dCcD_Cyl mCcCyl;
/* 0x1474 */ ActionFn mpNextActionFn;
/* 0x1480 */ ActionFn mpActionFn;
+177 -149
View File
@@ -19,6 +19,21 @@
#include "d/d_camera.h"
#include "Z2AudioLib/Z2Instances.h"
class daE_MK_HIO_c : public JORReflexible {
public:
/* 8071412C */ daE_MK_HIO_c();
/* 8071C3EC */ virtual ~daE_MK_HIO_c() {}
void genMessage(JORMContext*);
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 mSize;
/* 0x0C */ f32 mBoomerangRatio;
/* 0x10 */ f32 mPlayerThrowDistMax;
/* 0x14 */ u8 mHaltAction;
/* 0x18 */ Vec mCrownPosAdjust;
};
/* 8071412C-8071417C 0000EC 0050+00 1/1 0/0 0/0 .text __ct__12daE_MK_HIO_cFv */
daE_MK_HIO_c::daE_MK_HIO_c() {
field_0x4 = -1;
@@ -1052,7 +1067,6 @@ static int e_mk_e_demo(e_mk_class* i_this) {
/* 80716F48-80717400 002F08 04B8+00 2/1 0/0 0/0 .text e_mk_r04_demo__FP10e_mk_class */
static void e_mk_r04_demo(e_mk_class* i_this) {
// NONMATCHING
int frame = i_this->mpModelMorf->getFrame();
f32 fVar2 = 0.0f;
i_this->field_0x704 = 5;
@@ -1193,19 +1207,19 @@ static void cam_3d_morf(e_mk_class* i_this, f32 param_2) {
/* 807174E4-8071823C 0034A4 0D58+00 1/1 0/0 0/0 .text demo_camera_start__FP10e_mk_class */
static void demo_camera_start(e_mk_class* i_this) {
// NONMATCHING
fopAc_ac_c* a_this = &i_this->enemy;
fopAc_ac_c* actor1, * actor2, * actor3;
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
actor1 = fopAcM_SearchByID(i_this->field_0x708);
fopAc_ac_c* actor_sp1c; // sp1c
fopAc_ac_c* actor_sp18; // sp18
fopAc_ac_c* actor_sp14; // sp14
actor_sp14 = fopAcM_SearchByID(i_this->field_0x708);
camera_class* camera1 = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
camera_class* camera2 = dComIfGp_getCamera(0);
camera_class* camera2 = (camera_class*)dComIfGp_getCamera(0);
cXyz sp34, sp40, sp4c, sp58;
switch (i_this->mDemoMode) {
case 0:
break;
case 1:
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0);
@@ -1213,18 +1227,18 @@ static void demo_camera_start(e_mk_class* i_this) {
return;
}
camera2->mCamera.Stop();
camera1->mCamera.Stop();
i_this->mDemoMode = 2;
i_this->mDemoCamTimer = 0;
i_this->mDemoCamFovy = 50.0f;
camera2->mCamera.SetTrimSize(3);
i_this->field_0xc90 = 2500.0f;
i_this->mDemoCamFovy = 50.0f + NREG_F(10);
camera1->mCamera.SetTrimSize(3);
i_this->field_0xc90 = 2500.0f + NREG_F(11);
daPy_getPlayerActorClass()->changeOriginalDemo();
Z2GetAudioMgr()->bgmStreamPrepare(0x200000D);
i_this->mCamEye = camera1->lookat.eye;
i_this->mCamCenter = camera1->lookat.center;
i_this->mCamEye = camera2->lookat.eye;
i_this->mCamCenter = camera2->lookat.center;
i_this->field_0xc50.set(-271.0f, 4559.0f, -7241.0f);
i_this->field_0xc5c.set(-70.0f, 4378.0f, -6233.0f);
@@ -1235,31 +1249,32 @@ static void demo_camera_start(e_mk_class* i_this) {
i_this->field_0xc74.y = fabsf(i_this->field_0xc5c.y - i_this->mCamCenter.y);
i_this->field_0xc74.z = fabsf(i_this->field_0xc5c.z - i_this->mCamCenter.z);
dComIfGp_getEvent().startCheckSkipEdge(i_this);
dComIfGp_getEvent().startCheckSkipEdge(a_this);
// fallthrough
case 2:
if (i_this->mDemoCamTimer == 8) {
daPy_getPlayerActorClass()->changeDemoMode(25, 0, 0, 0);
if (i_this->mDemoCamTimer == (s16)(8 + VREG_S(0))) {
((daPy_py_c*)daPy_getPlayerActorClass())->changeDemoMode(25, 0, 0, 0);
}
if (i_this->mDemoCamTimer >= 35) {
if (i_this->mDemoCamTimer >= (s16)(35 + VREG_S(1))) {
cam_3d_morf(i_this, 0.1f);
cLib_addCalc2(&i_this->field_0xc84, 0.03f, 1.0f, 0.0005f);
cLib_addCalc2(&i_this->field_0xc84, 0.03f + VREG_F(1), 1.0f, 0.0005f + VREG_F(2));
}
if (i_this->mDemoCamTimer >= 160) {
if (i_this->mDemoCamTimer >= (s16)(160 + VREG_S(2))) {
i_this->mDemoCamTimer = 0;
i_this->mDemoMode = 3;
}
break;
case 3:
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
sp34.set(0.0f, 150.0f, 250.0f);
sp34.x = 0.0f;
sp34.y = 150.0f + NREG_F(6);
sp34.z = 250.0f + NREG_F(7);
MtxPosition(&sp34, &sp40);
i_this->mCamEye = a_this->current.pos + sp40;
i_this->mCamCenter = a_this->current.pos;
i_this->mCamCenter.y += 150.0f;
i_this->mCamCenter.y += 150.0f + NREG_F(8);
if (i_this->mDemoCamTimer >= 60) {
i_this->mDemoCamTimer = 0;
i_this->mDemoMode = 4;
@@ -1267,60 +1282,69 @@ static void demo_camera_start(e_mk_class* i_this) {
}
break;
case 4:
case 4:
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
sp34.set(0.0f, 150.0f, 700.0f);
sp34.x = 0.0f;
sp34.y = 150.0f + NREG_F(9);
sp34.z = 700.0f + NREG_F(10);
MtxPosition(&sp34, &sp40);
i_this->mCamEye = a_this->current.pos + sp40;
i_this->mCamCenter = a_this->current.pos;
i_this->mCamCenter.y += 230.0f;
i_this->mCamCenter.y += 230.0f + NREG_F(11);
if (i_this->mDemoCamTimer == 35) {
daPy_getPlayerActorClass()->changeDemoMode(12, 0, 1, 0);
}
if (i_this->mDemoCamTimer >= 95) {
if (i_this->mDemoCamTimer >= (s16)(95 + XREG_S(0))) {
i_this->mDemoCamTimer = 0;
i_this->mDemoMode = 5;
i_this->field_0xc9c = 1100.0f;
i_this->field_0xc84 = 0.0f;
i_this->field_0xc90 = 2500.0f;
i_this->field_0xc90 = 2500.0f + NREG_F(12);
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
cMtx_XrotM(*calc_mtx, 0x6A4);
cMtx_XrotM(*calc_mtx, 1700 + NREG_S(2));
sp34.x = 0.0f;
sp34.y = 0.0f;
sp34.z = i_this->field_0xc90;
MtxPosition(&sp34, &sp4c);
sp4c += a_this->current.pos;
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
sp34.set(-300.0f, 0.0f, 0.0f);
sp34.x = NREG_F(2) - 300.0f;
sp34.y = 0.0f;
sp34.z = 0.0f;
MtxPosition(&sp34, &sp40);
sp4c += sp40;
sp34.set(100.0f, 0.0f, 200.0f);
sp34.x = 100.0f + NREG_F(13);
sp34.y = 0.0f;
sp34.z = 200.0f + NREG_F(14);
MtxPosition(&sp34, &sp40);
sp40 += sp4c;
sp40.y = player->current.pos.y;
player->setPlayerPosAndAngle(&sp40, a_this->current.angle.y + (u16)-0x8000, 0);
}
break;
case 5:
i_this->field_0xc90 = 2450.0f;
i_this->field_0xc9c = 500.0f;
i_this->field_0xc90 = 2500.0f + NREG_F(12) - 50.0f;
i_this->field_0xc9c = -700.0f + TREG_F(14) + 200.0f + 1000.0f;
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
cMtx_XrotM(*calc_mtx, i_this->field_0xc9c);
sp34.set(0.0f, 0.0f, 3500.0f);
sp34.x = 0.0f;
sp34.y = 0.0f;
sp34.z = 3500.0f + NREG_F(0);
MtxPosition(&sp34, &i_this->mCamCenter);
i_this->mCamCenter += a_this->current.pos;
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
cMtx_XrotM(*calc_mtx, 2000);
cMtx_XrotM(*calc_mtx, 2000 + NREG_S(2));
sp34.x = 0.0f;
sp34.y = 0.0f;
sp34.z = i_this->field_0xc90;
MtxPosition(&sp34, &i_this->mCamEye);
i_this->mCamEye += a_this->current.pos;
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
sp34.set(-300.0f, 0.0f, 0.0f);
sp34.x = NREG_F(2) - 300.0f;
sp34.y = 0.0f;
sp34.z = 0.0f;
MtxPosition(&sp34, &sp40);
i_this->mCamEye += sp40;
@@ -1333,14 +1357,15 @@ static void demo_camera_start(e_mk_class* i_this) {
i_this->mDemoMode = 6;
}
break;
case 6:
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
sp34.set(0.0f, 150.0f, 700.0f);
sp34.x = 0.0f;
sp34.y = 150.0f + NREG_F(9);
sp34.z = 700.0f + NREG_F(10);
MtxPosition(&sp34, &sp40);
i_this->mCamEye = a_this->current.pos + sp40;
i_this->mCamCenter = a_this->current.pos;
i_this->mCamCenter.y += 230.0f;
i_this->mCamCenter.y += 230.0f + NREG_F(11);
if (i_this->mDemoCamTimer == 2) {
i_this->field_0x707 = 7;
@@ -1349,91 +1374,98 @@ static void demo_camera_start(e_mk_class* i_this) {
if (i_this->mDemoCamTimer >= 10) {
i_this->mMode = 4;
i_this->mDemoMode = 100;
sp34.set(200.0f, 0.0f,-150.0f);
sp34.x = 200.0f + JREG_F(14);
sp34.y = 0.0f;
sp34.z = -150.0f + JREG_F(15);
MtxPosition(&sp34, &sp40);
sp40 += player->current.pos;
player->setPlayerPosAndAngle(&sp40, a_this->current.angle.y + (u16)-0x8000, 0);
}
break;
case 7:
if (actor1 == NULL) break;
if (actor_sp14 == NULL) break;
i_this->mCamCenter = actor1->current.pos;
i_this->mCamCenter = actor_sp14->current.pos;
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
sp34.set(300.0f, -200.0f, 1000.0f);
sp34.x = 300.0f + NREG_F(16);
sp34.y = -200.0f + NREG_F(17);
sp34.z = 1000.0f + NREG_F(18);
MtxPosition(&sp34, &sp40);
i_this->mCamEye = a_this->current.pos + sp40;
i_this->mDemoMode = 8;
i_this->mDemoCamTimer = 0;
// fallthrough
case 8:
cLib_addCalc2(&i_this->mCamCenter.x, actor1->current.pos.x, 0.2f, 100.0f);
cLib_addCalc2(&i_this->mCamCenter.y, actor1->current.pos.y + i_this->field_0xc8c, 0.2f, 100.0f);
cLib_addCalc2(&i_this->mCamCenter.z, actor1->current.pos.z, 0.2f, 100.0f);
cLib_addCalc2(&i_this->field_0xc8c, -300.0f, 1.0f, 5.0f);
cLib_addCalc2(&i_this->mCamCenter.x, actor_sp14->current.pos.x, 0.2f, 100.0f);
cLib_addCalc2(&i_this->mCamCenter.y, actor_sp14->current.pos.y + i_this->field_0xc8c, 0.2f, 100.0f);
cLib_addCalc2(&i_this->mCamCenter.z, actor_sp14->current.pos.z, 0.2f, 100.0f);
cLib_addCalc2(&i_this->field_0xc8c, -300.0f + JREG_F(7), 1.0f, 5.0f + JREG_F(8));
i_this->mCamEye += (actor1->speed * 0.45f);
i_this->mCamEye.y -= 3.0f;
if (i_this->mDemoCamTimer < 65) break;
i_this->mCamEye += actor_sp14->speed * (0.45f + TREG_F(19));
i_this->mCamEye.y -= 3.0f + JREG_F(3);
if (i_this->mDemoCamTimer < 65) {
break;
}
i_this->mDemoMode = 9;
i_this->mDemoCamTimer = 0;
// fallthrough
case 9:
actor2 = fopAcM_SearchByID(i_this->mBabaChildID);
actor3 = fopAcM_SearchByID(i_this->mBabaChildID2);
actor_sp18 = fopAcM_SearchByID(i_this->mBabaChildID);
actor_sp1c = fopAcM_SearchByID(i_this->mBabaChildID2);
if (i_this->mDemoCamTimer == 0) {
actor2->current.pos.x = player->current.pos.x - 200.0f;
actor2->current.pos.y = player->current.pos.y + 500.0f;
actor2->current.pos.z = player->current.pos.z - 1200.0f;
actor2->speed.y = 0.0f;
actor3->current.pos.x = player->current.pos.x + 200.0f;
actor3->current.pos.y = player->current.pos.y + 1000.0f;
actor3->current.pos.z = player->current.pos.z - 1000.0f;
actor3->speed.y = 0.0f;
i_this->mCamCenter.x = actor2->current.pos.x;
i_this->mCamCenter.z = actor2->current.pos.z;
actor_sp18->current.pos.x = player->current.pos.x - 200.0f;
actor_sp18->current.pos.y = player->current.pos.y + 500.0f;
actor_sp18->current.pos.z = player->current.pos.z - 1200.0f;
actor_sp18->speed.y = 0.0f;
actor_sp1c->current.pos.x = player->current.pos.x + 200.0f;
actor_sp1c->current.pos.y = player->current.pos.y + 1000.0f;
actor_sp1c->current.pos.z = player->current.pos.z - 1000.0f;
actor_sp1c->speed.y = 0.0f;
i_this->mCamCenter.x = actor_sp18->current.pos.x;
i_this->mCamCenter.z = actor_sp18->current.pos.z;
}
i_this->mCamEye.x = player->current.pos.x + 100.0f;
i_this->mCamEye.y = player->current.pos.y + 100.0f;
i_this->mCamEye.z = player->current.pos.z - 400.0f;
i_this->mCamCenter.y = actor2->current.pos.y;
i_this->mCamEye.x = player->current.pos.x + 100.0f + ZREG_F(0);
i_this->mCamEye.y = player->current.pos.y + 100.0f + ZREG_F(1);
i_this->mCamEye.z = player->current.pos.z - 400.0f + ZREG_F(2);
i_this->mCamCenter.y = actor_sp18->current.pos.y + ZREG_F(3);
cLib_addCalc2(&i_this->mCamCenter.x, actor2->current.pos.x + 100.0f, 0.1f, 50.0f);
cLib_addCalc2(&i_this->mCamCenter.z, actor2->current.pos.z, 0.1f, 50.0f);
cLib_addCalc2(&i_this->mCamCenter.x, actor_sp18->current.pos.x + 100.0f, 0.1f, 50.0f);
cLib_addCalc2(&i_this->mCamCenter.z, actor_sp18->current.pos.z, 0.1f, 50.0f);
if (i_this->mDemoCamTimer <= 60) {
actor1->current.pos -= actor1->speed;
if (i_this->mDemoCamTimer <= (s16)(60 + AREG_S(0))) {
actor_sp14->current.pos -= actor_sp14->speed;
}
if (i_this->mDemoCamTimer >= 80) {
if (i_this->mDemoCamTimer >= (s16)(80 + AREG_S(0))) {
i_this->mDemoMode = 10;
i_this->mDemoCamTimer = 0;
}
break;
case 10:
cMtx_YrotS(*calc_mtx, STAGE_ANGLE_Y);
sp34.set(0.0f, 150.0f, 700.0f);
sp34.x = 0.0f;
sp34.y = 150.0f + NREG_F(9);
sp34.z = 700.0f + NREG_F(10);
MtxPosition(&sp34, &sp40);
i_this->mCamEye = a_this->current.pos + sp40;
i_this->mCamCenter = a_this->current.pos;
i_this->mCamCenter.y += 230.0f;
i_this->mCamCenter.y += 230.0f + NREG_F(11);
actor1 = fopAcM_SearchByID(i_this->mBabaChildID);
actor2 = fopAcM_SearchByID(i_this->mBabaChildID2);
actor1->current.pos.x = player->current.pos.x - 200.0f;
actor1->current.pos.z = player->current.pos.z - 1200.0f;
actor2->current.pos.x = player->current.pos.x + 200.0f;
actor2->current.pos.z = player->current.pos.z - 1000.0f;
actor_sp18 = fopAcM_SearchByID(i_this->mBabaChildID);
actor_sp1c = fopAcM_SearchByID(i_this->mBabaChildID2);
actor_sp18->current.pos.x = player->current.pos.x - 200.0f;
actor_sp18->current.pos.z = player->current.pos.z - 1200.0f;
actor_sp1c->current.pos.x = player->current.pos.x + 200.0f;
actor_sp1c->current.pos.z = player->current.pos.z - 1000.0f;
break;
case 11:
if (i_this->mDemoCamTimer >= 30) {
if (i_this->mDemoCamTimer >= (s16)(30 + JREG_S(9))) {
cMtx_YrotS(*calc_mtx, player->shape_angle.y);
sp34.set(0.0f, 200.0f, -400.0f);
sp34.x = 0.0f;
sp34.y = 200.0f;
sp34.z = -400.0f;
MtxPosition(&sp34, &i_this->mCamEye);
i_this->mCamEye += player->current.pos;
i_this->mCamCenter = player->current.pos;
@@ -1443,20 +1475,19 @@ static void demo_camera_start(e_mk_class* i_this) {
Z2GetAudioMgr()->subBgmStart(Z2BGM_BOOMERAMG_MONKEY);
}
actor1 = fopAcM_SearchByID(i_this->mBabaChildID);
actor2 = fopAcM_SearchByID(i_this->mBabaChildID2);
actor1->current.pos.x = player->current.pos.x - 200.0f;
actor1->current.pos.z = player->current.pos.z - 1200.0f;
actor2->current.pos.x = player->current.pos.x + 200.0f;
actor2->current.pos.z = player->current.pos.z - 1000.0f;
actor_sp18 = fopAcM_SearchByID(i_this->mBabaChildID);
actor_sp1c = fopAcM_SearchByID(i_this->mBabaChildID2);
actor_sp18->current.pos.x = player->current.pos.x - 200.0f;
actor_sp18->current.pos.z = player->current.pos.z - 1200.0f;
actor_sp1c->current.pos.x = player->current.pos.x + 200.0f;
actor_sp1c->current.pos.z = player->current.pos.z - 1000.0f;
break;
case 100:
break;
}
if (dComIfGp_getEvent().checkSkipEdge()) {
u8 i_no = fopAcM_GetParam(i_this) >> 16;
u8 i_no = (fopAcM_GetParam(i_this) & 0xff0000) >> 16;
if (i_no != 0xff) {
dComIfGs_onSwitch(i_no, fopAcM_GetRoomNo(a_this));
}
@@ -1467,11 +1498,10 @@ static void demo_camera_start(e_mk_class* i_this) {
/* 8071823C-80719488 0041FC 124C+00 1/1 0/0 0/0 .text demo_camera_end__FP10e_mk_class */
static void demo_camera_end(e_mk_class* i_this) {
// NONMATCHING
fopEn_enemy_c* a_this = &i_this->enemy;
fopEn_enemy_c* a_this = (fopEn_enemy_c*)&i_this->enemy;
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
fopAc_ac_c* actor = fopAcM_SearchByID(i_this->field_0x708);
camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_SearchByID(i_this->field_0x708);
camera_class* camera = (camera_class*)dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
cXyz sp2c, i_pos, sp44, sp50;
switch (i_this->mDemoMode) {
@@ -2748,8 +2778,7 @@ static int useHeapInit(fopAc_ac_c* actor) {
}
/* 8071BD14-8071C190 007CD4 047C+00 1/0 0/0 0/0 .text daE_MK_Create__FP10fopAc_ac_c */
static int daE_MK_Create(fopAc_ac_c* actor) {
// EQUIVALENT - REGALLOC
static int daE_MK_Create(fopAc_ac_c* i_actor) {
static dCcD_SrcSph cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x43}, 0x75}}, // mObj
@@ -2762,102 +2791,101 @@ static int daE_MK_Create(fopAc_ac_c* actor) {
} // mSphAttr
};
fopAcM_SetupActor(actor, e_mk_class);
e_mk_class* i_this;
fopAc_ac_c* a_this = &i_this->enemy;
e_mk_class* mk = (e_mk_class*)i_actor;
int phase = dComIfG_resLoad(&i_this->mPhase, "E_mk");
fopAcM_SetupActor(&mk->enemy, e_mk_class);
int phase = dComIfG_resLoad(&mk->mPhase, "E_mk");
if (phase == cPhs_COMPLEATE_e) {
OS_REPORT("E_MK PARAM %x\n", fopAcM_GetParam(i_this));
OS_REPORT("E_MK PARAM %x\n", fopAcM_GetParam(i_actor));
if (strcmp(dComIfGp_getStartStageName(), "D_MN05B") == 0 && dComIfGs_isStageMiddleBoss()) {
OS_REPORT("中ボスE_MK やられ後なので再セットしません\n"); // Since it's the middle boss E_MK after being defeated, I won't reset it.
return cPhs_ERROR_e;
}
u32 i_no = fopAcM_GetParam(i_this) >> 24;
u8 i_no = (fopAcM_GetParam(i_actor) & 0xff000000) >> 24;
if (i_no != 0xFF) {
if (dComIfGs_isSwitch(i_no, fopAcM_GetRoomNo(a_this))) {
if (dComIfGs_isSwitch(i_no, fopAcM_GetRoomNo(i_actor))) {
OS_REPORT("E_MK やられ後なので再セットしません\n"); // Since it's after the E_MK was done, I won't reset it.
return cPhs_ERROR_e;
}
}
i_this->mParam = fopAcM_GetParam(i_this);
mk->mParam = fopAcM_GetParam(i_actor);
OS_REPORT("E_MK//////////////E_MK SET 1 !!\n");
if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x56f0)) {
if (!fopAcM_entrySolidHeap(i_actor, useHeapInit, 0x56f0)) {
OS_REPORT("//////////////E_MK SET NON !!\n");
return cPhs_ERROR_e;
}
lbl_210_bss_130 = 0;
if (lbl_210_bss_AA == 0) {
i_this->field_0xcf5 = 1;
mk->field_0xcf5 = 1;
lbl_210_bss_AA = 1;
l_HIO.field_0x4 = -1;
l_HIO.field_0x4 = mDoHIO_CREATE_CHILD("ブーメラン猿", &l_HIO);
}
a_this->attention_info.flags = 4;
i_actor->attention_info.flags = 4;
fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx());
fopAcM_SetMin(a_this, -500.0f, -500.0f, -500.0f);
fopAcM_SetMax(a_this, 500.0f, 500.0f, 500.0f);
fopAcM_SetMtx(i_actor, mk->mpModelMorf->getModel()->getBaseTRMtx());
fopAcM_SetMin(i_actor, -500.0f, -500.0f, -500.0f);
fopAcM_SetMax(i_actor, 500.0f, 500.0f, 500.0f);
i_this->mAcch.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), &i_this->enemy, 1, &i_this->mAcchCir,
fopAcM_GetSpeed_p(a_this), NULL, NULL);
i_this->mAcchCir.SetWall(80.0f, 30.0f);
a_this->health = 200;
a_this->field_0x560 = 200;
mk->mAcch.Set(fopAcM_GetPosition_p(i_actor), fopAcM_GetOldPosition_p(i_actor), &mk->enemy, 1, &mk->mAcchCir,
fopAcM_GetSpeed_p(i_actor), NULL, NULL);
mk->mAcchCir.SetWall(80.0f, 30.0f);
i_actor->field_0x560 = i_actor->health = 200;
i_this->mSound.init(&a_this->current.pos, &a_this->eyePos, 3, 1);
i_this->mAtInfo.mpSound = &i_this->mSound;
mk->mSound.init(&i_actor->current.pos, &i_actor->eyePos, 3, 1);
mk->mAtInfo.mpSound = &mk->mSound;
a_this->attention_info.distances[2] = 4;
i_actor->attention_info.distances[2] = 4;
i_this->field_0x95c.Init(0xFF, 0, a_this);
i_this->field_0xad0.Set(cc_sph_src);
i_this->field_0xad0.SetStts(&i_this->field_0x95c);
i_this->field_0x998.Set(cc_sph_src);
i_this->field_0x998.SetStts(&i_this->field_0x95c);
i_this->field_0x998.OnTgNoHitMark();
i_this->field_0x60c = 1;
i_this->field_0x60d = 1;
mk->field_0x95c.Init(0xFF, 0, i_actor);
mk->field_0xad0.Set(cc_sph_src);
mk->field_0xad0.SetStts(&mk->field_0x95c);
mk->field_0x998.Set(cc_sph_src);
mk->field_0x998.SetStts(&mk->field_0x95c);
mk->field_0x998.OnTgNoHitMark();
mk->field_0x60c = 1;
mk->field_0x60d = 1;
if (fopAcM_GetRoomNo(a_this) == 4) {
i_this->mAction = e_mk_class::ACT_R04_DEMO;
a_this->current.pos.set(0.0f, 3900.0f, -3000.0f);
a_this->current.angle.y = 0;
a_this->home = a_this->current;
if (fopAcM_GetRoomNo(i_actor) == 4) {
mk->mAction = e_mk_class::ACT_R04_DEMO;
i_actor->current.pos.set(0.0f, 3900.0f, -3000.0f);
i_actor->current.angle.y = 0;
i_actor->home = i_actor->current;
} else {
STAGE_CENTER_POS = a_this->home.pos;
STAGE_CENTER_POS = i_actor->home.pos;
STAGE_CENTER_POS.y -= 500.0f;
STAGE_ANGLE_Y = a_this->home.angle.y;
STAGE_ANGLE_Y = i_actor->home.angle.y;
u8 i_no = fopAcM_GetParamBit(i_this, 16, 8);
if (i_no != 0xFF && dComIfGs_isSwitch(i_no, fopAcM_GetRoomNo(a_this))) {
dComIfGs_offSwitch(i_no, fopAcM_GetRoomNo(a_this));
i_this->mAction = e_mk_class::ACT_WAIT;
u8 i_no = (fopAcM_GetParam(i_actor) & 0xff0000) >> 16;
if (i_no != 0xFF && dComIfGs_isSwitch(i_no, fopAcM_GetRoomNo(i_actor))) {
dComIfGs_offSwitch(i_no, fopAcM_GetRoomNo(i_actor));
mk->mAction = e_mk_class::ACT_WAIT;
Z2GetAudioMgr()->subBgmStart(Z2BGM_BOOMERAMG_MONKEY);
} else {
i_this->mAction = e_mk_class::ACT_S_DEMO;
u32 i_parameters = fopAcM_GetParam(i_this) & 0xFF000000 | 0xFFFF01;
mk->mAction = e_mk_class::ACT_S_DEMO;
u32 i_parameters = fopAcM_GetParam(i_actor) & 0xFF000000 | 0xFFFF01;
cXyz sp30(-21.0f, 5114.0f, -4941.0f);
i_this->mBabaChildID = fopAcM_createChild(PROC_E_DB, fopAcM_GetID(i_this), i_parameters,
&sp30, fopAcM_GetRoomNo(a_this), NULL,
mk->mBabaChildID = fopAcM_createChild(PROC_E_DB, fopAcM_GetID(i_actor), i_parameters,
&sp30, fopAcM_GetRoomNo(i_actor), NULL,
NULL, -1, NULL);
sp30.set(-10.0f, 5114.0f, -4401.0f);
i_this->mBabaChildID2 = fopAcM_createChild(PROC_E_DB, fopAcM_GetID(i_this), i_parameters,
&sp30, fopAcM_GetRoomNo(a_this), NULL,
mk->mBabaChildID2 = fopAcM_createChild(PROC_E_DB, fopAcM_GetID(i_actor), i_parameters,
&sp30, fopAcM_GetRoomNo(i_actor), NULL,
NULL, -1, NULL);
fopAcM_OnStatus(a_this, 0x4000);
fopAcM_OnStatus(i_actor, 0x4000);
}
}
a_this->gravity = -5.0f;
a_this->scale.x = l_HIO.mSize * l_HIO.mBoomerangRatio;
daE_MK_Execute(i_this);
i_actor->gravity = -5.0f;
i_actor->scale.x = l_HIO.mSize * l_HIO.mBoomerangRatio;
daE_MK_Execute(mk);
}
return phase;
+25 -24
View File
@@ -838,11 +838,13 @@ static void e_po_dead(e_po_class* i_this) {
camera_class* camera = static_cast<camera_class*>(dComIfGp_getCamera(0));
dBgS_LinChk lin_chk;
cXyz scale(1.0f, 1.0f, 1.0f);
csXyz local_1a4; // Angle for particles
dBgS_GndChk gnd_chk;
i_this->field_0x754 = 10;
daPy_py_c* player_actor = daPy_getPlayerActorClass();
player_actor->setWolfEnemyHangBiteAngle(fopAcM_searchPlayerAngleY(a_this) + 0x8000);
int i;
switch (i_this->mType) {
case 30:
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
@@ -970,7 +972,7 @@ static void e_po_dead(e_po_class* i_this) {
case 4:
J3DModel* model_p = i_this->mpMorf3->getModel();
for (int i = 0; i < 4; i++) {
for (i = 0; i < 4; i++) {
i_this->mParticleKey[i] =
dComIfGp_particle_set(i_this->mParticleKey[i], dead_eff_Dt1[i],
&a_this->current.pos, &a_this->shape_angle, &scale);
@@ -979,27 +981,27 @@ static void e_po_dead(e_po_class* i_this) {
emitter->setGlobalRTMatrix(model_p->getAnmMtx(0x10));
}
i_this->mParticleKey2[i] =
dComIfGp_particle_set(i_this->mParticleKey2[i], dead_eff_Dt1[i],
i_this->mParticleKey2[i + 4] =
dComIfGp_particle_set(i_this->mParticleKey2[i + 4], dead_eff_Dt1[i],
&a_this->current.pos, &a_this->shape_angle, &scale);
emitter = dComIfGp_particle_getEmitter(i_this->mParticleKey2[i]);
emitter = dComIfGp_particle_getEmitter(i_this->mParticleKey2[i + 4]);
if (emitter != NULL) {
emitter->setGlobalRTMatrix(model_p->getAnmMtx(0x15));
}
}
for (int i = 0; i < 2; i++) {
i_this->mParticleKey3[i] =
dComIfGp_particle_set(i_this->mParticleKey3[i], dead_eff_Dt2[i],
for (i = 0; i < 2; i++) {
i_this->mParticleKey3[i + 8] =
dComIfGp_particle_set(i_this->mParticleKey3[i + 8], dead_eff_Dt2[i],
&a_this->current.pos, &a_this->shape_angle, &scale);
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mParticleKey3[i]);
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mParticleKey3[i + 8]);
if (emitter != NULL) {
emitter->setGlobalRTMatrix(model_p->getAnmMtx(0xA));
}
i_this->mParticleKey4[i] =
dComIfGp_particle_set(i_this->mParticleKey4[i], dead_eff_Dt3[i],
i_this->mParticleKey4[i + 10] =
dComIfGp_particle_set(i_this->mParticleKey4[i + 10], dead_eff_Dt3[i],
&a_this->current.pos, &a_this->shape_angle, &scale);
emitter = dComIfGp_particle_getEmitter(i_this->mParticleKey4[i]);
emitter = dComIfGp_particle_getEmitter(i_this->mParticleKey4[i + 10]);
if (emitter != NULL) {
emitter->setGlobalRTMatrix(model_p->getAnmMtx(0x7));
}
@@ -1040,13 +1042,12 @@ static void e_po_dead(e_po_class* i_this) {
break;
case 5:
csXyz local_1a4; // Angle for particles
cLib_addCalc0(&i_this->field_0x800, 0.8f, 10.0f);
if (i_this->field_0x74A[1] != 0) {
if (i_this->field_0x74A[1] == 1) {
if (!i_this->field_0x788.x && !i_this->field_0x788.z) {
PSMTXCopy(i_this->mpMorf3->getModel()->getAnmMtx(0x15), *calc_mtx);
J3DModel* model = i_this->mpMorf3->getModel();
PSMTXCopy(model->getAnmMtx(0x15), *calc_mtx);
local_100.set(50.0f, 0.0f, 0.0f);
MtxPosition(&local_100, &i_this->field_0x788);
if (i_this->mAcch.GetGroundH() != -1e9f) {
@@ -1054,10 +1055,9 @@ static void e_po_dead(e_po_class* i_this) {
}
}
local_1a4 = i_this->field_0x764;
local_1a4.z = 0;
local_1a4.x = 0;
local_1a4.x = local_1a4.z = 0;
local_100.set(i_this->field_0x788);
for (int i = 0; i < 7; i++) {
for (i = 0; i < 7; i++) {
dComIfGp_particle_set(particleNmaeDt[i], &local_100, &local_1a4, &scale);
}
i_this->field_0x74A[2] = 50;
@@ -1074,9 +1074,7 @@ static void e_po_dead(e_po_class* i_this) {
Z2GetAudioMgr()->seStartLevel(Z2SE_OBJ_FIRE_FLY, &i_this->field_0x788, 0, 0, 1.0f, 1.0f,
-1.0f, -1.0f, 0);
} else {
local_1a4.z = 0;
local_1a4.y = 0;
local_1a4.x = 0;
local_1a4.x = local_1a4.y = local_1a4.z = 0;
if (i_this->field_0x758 == 0) {
Z2GetAudioMgr()->seStart(Z2SE_OBJ_KNTR_BREAK, &i_this->field_0x788, 0, 0, 1.0f,
1.0f, -1.0f, -1.0f, 0);
@@ -1090,7 +1088,7 @@ static void e_po_dead(e_po_class* i_this) {
i_this->field_0x788.y - (i_this->field_0x788.y + i_this->field_0x7C4);
i_this->field_0x814.z = i_this->field_0x788.z - i_this->field_0x788.z;
i_this->field_0x814 *= 0.8f;
for (int i = 0; i < 2; i++) {
for (i = 0; i < 2; i++) {
i_this->mParticleKey5[i] =
dComIfGp_particle_set(i_this->mParticleKey5[i], dead_eff_Dt4[i],
&i_this->field_0x788, &local_1a4, &scale);
@@ -1109,7 +1107,8 @@ static void e_po_dead(e_po_class* i_this) {
var_r0 = TRUE;
}
if (var_r0) {
u32 param = i_this->mArg0 | 0xFFFFF000;
u32 param = 0xFFFFF000;
param |= i_this->mArg0;
i_this->field_0x5B8 = fopAcM_create(PROC_Obj_poFire, param, &i_this->field_0x788,
fopAcM_GetRoomNo(a_this), NULL, NULL, -1);
i_this->mType = 7;
@@ -1128,10 +1127,12 @@ static void e_po_dead(e_po_class* i_this) {
camera_player->mCamera.SetTrimSize(0);
dComIfGp_event_reset();
dComIfGs_addPohSpiritNum();
if (g_dComIfG_gameInfo.info.getPlayer().getCollect().getPohNum() == 0x14) {
#if !PLATFORM_SHIELD
if (dComIfGs_getPohSpiritNum() == 0x14) {
/* dSv_event_flag_c::F_0457 - Castle Town - Revived cat */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[457]);
}
#endif
daPy_getPlayerActorClass()->cancelOriginalDemo();
} else if (mArg0Check(i_this, 0) != 0) {
if (!fopAcM_isSwitch(a_this, 0x22)) {
@@ -1225,7 +1226,7 @@ static void e_po_dead(e_po_class* i_this) {
i_this->mType += 1;
case 51:
if (dComIfGp_event_runCheck() != FALSE) {
if (dComIfGp_event_runCheck()) {
if (a_this->eventInfo.checkCommandDemoAccrpt()) {
if (dComIfGp_getEventManager().endCheck(i_this->field_0x762) != 0) {
dComIfGp_event_reset();
+66 -51
View File
@@ -16,6 +16,27 @@
#include "dol2asm.h"
#include "f_op/f_op_kankyo_mng.h"
class daFr_HIO_c : public JORReflexible {
public:
/* 805198EC */ daFr_HIO_c();
/* 8051B920 */ virtual ~daFr_HIO_c() {}
#if DEBUG
void genMessage(JORMContext*);
#endif
/* 0x04 */ s8 field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xc;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x1C */ f32 field_0x1c;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ f32 field_0x24;
/* 0x28 */ f32 field_0x28;
};
/* 805198EC-8051994C 0000EC 0060+00 1/1 0/0 0/0 .text __ct__10daFr_HIO_cFv */
daFr_HIO_c::daFr_HIO_c() {
field_0x4 = -1;
@@ -97,15 +118,15 @@ static wd_ss* wd_check(fr_class* i_this) {
/* 80519D28-80519E24 000528 00FC+00 4/4 0/0 0/0 .text way_bg_check__FP8fr_class */
static BOOL way_bg_check(fr_class* i_this) {
// NONMATCHING
fopAc_ac_c* actor = (fopAc_ac_c*)i_this;
cXyz sp24;
cXyz sp18;
cXyz sp0c;
sp24 = i_this->current.pos;
sp24 = actor->current.pos;
sp24.y += 20.0f;
cMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
cMtx_YrotS(*calc_mtx, actor->shape_angle.y);
sp0c.x = 0.0f;
sp0c.y = 0.0f;
@@ -114,7 +135,7 @@ static BOOL way_bg_check(fr_class* i_this) {
sp18 += sp24;
dBgS_LinChk dStack_84;
dStack_84.Set(&sp24, &sp18, i_this);
dStack_84.Set(&sp24, &sp18, actor);
if (dComIfG_Bgsp().LineCross(&dStack_84)) {
return TRUE;
@@ -131,8 +152,7 @@ static daFr_HIO_c l_HIO;
/* 80519E24-8051A0D8 000624 02B4+00 1/2 0/0 0/0 .text fr_normal__FP8fr_class */
static void fr_normal(fr_class* i_this) {
// NONMATCHING
fopAc_ac_c* actor = i_this;
fopAc_ac_c* actor = (fopAc_ac_c*)i_this;
fopAc_ac_c* player = dComIfGp_getPlayer(0);
cXyz sp18;
@@ -161,9 +181,9 @@ static void fr_normal(fr_class* i_this) {
i_this->current.angle.y += 0x8000;
} else {
i_this->field_0x5e8 = l_HIO.field_0x14;
f32 x = i_this->home.pos.x + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.x;
f32 z = i_this->home.pos.z + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.z;
cLib_addCalcAngleS2(&i_this->current.angle.y, cM_atan2s(x, z), 1, 0x2000 + TREG_S(2));
sp18.x = i_this->home.pos.x + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.x;
sp18.z = i_this->home.pos.z + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.z;
cLib_addCalcAngleS2(&i_this->current.angle.y, cM_atan2s(sp18.x, sp18.z), 1, 0x2000 + TREG_S(2));
}
i_this->field_0x5d4++;
@@ -308,7 +328,6 @@ static void fr_s_wait(fr_class* i_this) {
/* 8051A620-8051A820 000E20 0200+00 1/1 0/0 0/0 .text fr_s_away__FP8fr_class */
static void fr_s_away(fr_class* i_this) {
// NONMATCHING
fopAc_ac_c* actor = i_this;
fopAc_ac_c* player = dComIfGp_getPlayer(0);
@@ -322,7 +341,7 @@ static void fr_s_away(fr_class* i_this) {
break;
case 1:
if ((int)i_this->mMorf->getFrame() >= 10) {
if ((int)i_this->mMorf->getFrame() >= 25) {
if ((int)i_this->mMorf->getFrame() <= 25) {
cLib_addCalc2(&i_this->speedF, l_HIO.field_0x28, 1.0f, l_HIO.field_0x28 * 0.2f);
if ((int)i_this->mMorf->getFrame() >= 10) {
if ((int)i_this->mMorf->getFrame() <= 15 && (s8)i_this->field_0x5cc == 0) {
@@ -330,7 +349,7 @@ static void fr_s_away(fr_class* i_this) {
i_this->current.angle.y += 0x8000;
} else {
cLib_addCalcAngleS2(&i_this->current.angle.y,
(s16)(fopAcM_searchPlayerAngleY(i_this) + (s16)cM_rndFX(8000.0f)) + 0x8000,
fopAcM_searchPlayerAngleY(i_this) + 0x8000 + (s16)cM_rndFX(8000.0f),
1, 0x2000 + TREG_S(2));
}
@@ -470,8 +489,7 @@ static void fr_message(fr_class* i_this) {
/* 8051AD04-8051B04C 001504 0348+00 2/1 0/0 0/0 .text action__FP8fr_class */
static void action(fr_class* i_this) {
// NONMATCHING
fopAc_ac_c* this_actor = i_this;
fopAc_ac_c* this_actor = (fopAc_ac_c*)i_this;
cXyz sp30;
cXyz sp24;
@@ -521,12 +539,12 @@ static void action(fr_class* i_this) {
if (cVar4 != -2) {
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 2, 0x4000);
cMtx_YrotS(*calc_mtx, i_this->current.angle.y);
sp24.x = 0.0f;
sp24.y = 0.0f;
sp24.z = i_this->speedF;
MtxPosition(&sp24, &sp30);
i_this->speed.x = sp30.x;
i_this->speed.z = sp30.z;
sp30.x = 0.0f;
sp30.y = 0.0f;
sp30.z = i_this->speedF;
MtxPosition(&sp30, &sp24);
i_this->speed.x = sp24.x;
i_this->speed.z = sp24.z;
i_this->speed.y += i_this->gravity;
i_this->current.pos += (i_this->speed * i_this->scale.x) * 1.33f;
@@ -534,18 +552,18 @@ static void action(fr_class* i_this) {
if (i_this->speed.y < -80.0f) {
i_this->speed.y = -80.0f;
}
sp24 = i_this->current.pos;
sp24.y += 200.0f;
sp30 = i_this->current.pos;
sp30.y += 200.0f;
f32 fVar6 = i_this->mAcch.GetGroundH();
dBgS_ObjGndChk_Spl(cStack_78);
i_this->field_0x5ec = 0;
bool bVar2 = false;
BOOL bVar2 = FALSE;
if (wd_check(i_this)) {
bVar2 = true;
bVar2 = TRUE;
} else {
cStack_78.SetPos(&sp24);
cStack_78.SetPos(&sp30);
i_this->field_0x5f0 = dComIfG_Bgsp().GroundCross(&cStack_78);
if (fVar6 < i_this->field_0x5f0 && i_this->current.pos.y <= i_this->field_0x5f0 + YREG_F(0)) {
@@ -666,8 +684,7 @@ static int daFr_Delete(fr_class* i_this) {
}
/* 8051B3B0-8051B550 001BB0 01A0+00 1/1 0/0 0/0 .text useHeapIfrt__FP10fopAc_ac_c */
static int useHeapIfrt(fopAc_ac_c* a_this) {
// NONMATCHING
static BOOL useHeapIfrt(fopAc_ac_c* a_this) {
fr_class* i_this = (fr_class*)a_this;
i_this->mMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("Fr", 14), NULL, NULL,
@@ -679,65 +696,63 @@ static int useHeapIfrt(fopAc_ac_c* a_this) {
}
i_this->mBtkAnm = new mDoExt_btkAnm();
if (!i_this->mBtkAnm) {
return 0;
} else if (i_this->mBtkAnm->init(i_this->mMorf->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Fr", 17),
1, 0, 1.0f, 0, -1)) {
if (i_this->mBtkAnm == 0) {
return 0;
}
return 1;
return i_this->mBtkAnm->init(i_this->mMorf->getModel()->getModelData(),
(J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Fr", 17), 1, 0, 1.0f, 0,
-1) != 0 ? 1 : 0;
}
/* 8051B598-8051B820 001D98 0288+00 1/0 0/0 0/0 .text daFr_Create__FP10fopAc_ac_c */
static int daFr_Create(fopAc_ac_c* a_this) {
// NONMATCHING
fr_class* i_this = (fr_class*)a_this;
fopAc_ac_c* actor = a_this;
fr_class* i_this = (fr_class*)actor;
fopAcM_SetupActor(i_this, fr_class);
int phase_state = dComIfG_resLoad(&i_this->mPhase, "Fr");
if (phase_state == cPhs_COMPLEATE_e) {
OS_REPORT("FR PARAM %x\n", fopAcM_GetParam(i_this));
OS_REPORT("FR PARAM %x\n", fopAcM_GetParam(actor));
i_this->field_0x5b4 = fopAcM_GetParam(i_this);
i_this->current.angle.x = 0;
i_this->field_0x994 = i_this->current.angle.z;
i_this->shape_angle.z = 0;
i_this->current.angle.z = 0;
i_this->field_0x5b4 = fopAcM_GetParam(actor);
actor->current.angle.x = 0;
i_this->field_0x994 = actor->current.angle.z;
actor->current.angle.z = actor->shape_angle.z = 0;
OS_REPORT("FR MSGFLOWNO %d\n", i_this->field_0x994);
OS_REPORT("FR//////////////FR SET 1 !!\n");
if (!fopAcM_entrySolidHeap(i_this, useHeapIfrt, 0x14e0)) {
if (!fopAcM_entrySolidHeap(actor, useHeapIfrt, 0x14e0)) {
OS_REPORT("//////////////FR SET NON !!\n");
return cPhs_ERROR_e;
}
OS_REPORT("//////////////FR SET 2 !!\n");
if (!l_initHIO) {
i_this->field_0x9e4 = 1;
l_initHIO = true;
l_HIO.field_0x4 = -1;
l_HIO.field_0x4 = mDoHIO_CREATE_CHILD("カエル", &l_HIO);
}
i_this->field_0x5d2 = 0;
i_this->scale.x = 0.75f;
actor->scale.x = 0.75f;
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127")) {
i_this->scale.x = 0.4f;
actor->scale.x = 0.4f + KREG_F(11);
}
fopAcM_SetMtx(i_this, i_this->mMorf->getModel()->getBaseTRMtx());
fopAcM_SetMtx(actor, i_this->mMorf->getModel()->getBaseTRMtx());
i_this->mAcch.Set(fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this),
i_this, 1, &i_this->mAcchCir, fopAcM_GetSpeed_p(i_this), NULL, NULL);
i_this->mAcch.Set(fopAcM_GetPosition_p(actor), fopAcM_GetOldPosition_p(actor),
actor, 1, &i_this->mAcchCir, fopAcM_GetSpeed_p(actor), NULL, NULL);
i_this->mAcchCir.SetWall(20.0f, 20.0f);
i_this->field_0x5cd = i_this->field_0x5b4;
if (i_this->field_0x5cd > 3) {
i_this->field_0x5cd = 0;
}
i_this->field_0x5e8 = 500.0f;
i_this->field_0x5e8 = 500.0f + TREG_F(3);
i_this->field_0x5d0 = cM_rndF(65536.0f);
daFr_Execute(i_this);
+7 -8
View File
@@ -1781,6 +1781,8 @@ void daMidna_c::setBckAnime(J3DAnmTransform* i_bck, int i_attr, f32 i_morf) {
/* 804C103C-804C287C 004E9C 1840+00 2/2 0/0 0/0 .text setAnm__9daMidna_cFv */
// NONMATCHING regalloc
void daMidna_c::setAnm() {
BOOL bVar1, bVar2, bVar3;
offStateFlg0((daMidna_FLG0)(FLG0_NO_HAIR_SCALE | FLG0_UNK_200000));
if (setDemoAnm()) {
@@ -1789,14 +1791,13 @@ void daMidna_c::setAnm() {
daAlink_c* link = daAlink_getAlinkActorClass();
BOOL bVar1;
if (dComIfGp_event_runCheck() || checkEndResetStateFlg0(ERFLG0_NO_SERVICE_WAIT)) {
bVar1 = TRUE;
} else {
bVar1 = FALSE;
}
BOOL bVar2 = FALSE;
BOOL bVar3 = TRUE;
bVar2 = FALSE;
bVar3 = TRUE;
bool tired = checkMidnaTired();
daMidna_ANM anm;
@@ -2073,7 +2074,7 @@ void daMidna_c::setAnm() {
} else if (anm == ANM_S_RETURN) {
current.pos.x += 90.0f * cM_ssin(shape_angle.y);
current.pos.z += 90.0f * cM_scos(shape_angle.y);
shape_angle.y += 0x8000;
shape_angle.y += (s16)0x8000;
field_0x85a = shape_angle.y;
current.angle.y = shape_angle.y;
mpMorf->getOldTransInfo()[JNT_BACKBONE1].mTranslate.z += 90.0f;
@@ -2134,8 +2135,7 @@ void daMidna_c::setAnm() {
|| (checkSetAnime(0, ANM_SWAITC) && fabsf(speedF) > 0.1f))
{
offStateFlg0(FLG0_UNK_1);
u16 res_id = m_anmDataTable[anm].mResID;
J3DAnmTransform* bck = (J3DAnmTransform*)mBckHeap[0].loadDataIdx(res_id);
J3DAnmTransform* bck = (J3DAnmTransform*)mBckHeap[0].loadDataIdx(m_anmDataTable[anm].mResID);
setBckAnime(bck, J3DFrameCtrl::EMode_LOOP, 5.0f);
setUpperAnime(mBckHeap[0].getIdx(), 0xffff);
} else if (checkSetAnime(0, ANM_SWAITB) && mUpperBck.checkFrame(95.0f)
@@ -2143,8 +2143,7 @@ void daMidna_c::setAnm() {
{
anm = ANM_SWAITC;
setUpperAnimeAndSe(ANM_SWAITC);
u16 res_id = m_anmDataTable[anm].mResID;
J3DAnmTransform* bck = (J3DAnmTransform*)mBckHeap[0].loadDataIdx(res_id);
J3DAnmTransform* bck = (J3DAnmTransform*)mBckHeap[0].loadDataIdx(m_anmDataTable[anm].mResID);
setBckAnime(bck, J3DFrameCtrl::EMode_NONE, 0.0f);
}
} else if (daPy_py_c::checkNowWolf() && !bVar1
+19 -283
View File
@@ -9,271 +9,6 @@
#include "d/d_msg_object.h"
#include "dol2asm.h"
//
// Forward References:
//
extern "C" static void createHeapCallBack__FP10fopAc_ac_c();
extern "C" void setAction__11daNpcCdn3_cFQ211daNpcCdn3_c6Mode_e();
extern "C" void callInit__11daNpcCdn3_cFv();
extern "C" void callExecute__11daNpcCdn3_cFv();
extern "C" void initWait__11daNpcCdn3_cFv();
extern "C" void executeWait__11daNpcCdn3_cFv();
extern "C" void initPath__11daNpcCdn3_cFv();
extern "C" void executePath__11daNpcCdn3_cFv();
extern "C" void __dt__8cM3dGPlaFv();
extern "C" void __dt__4cXyzFv();
extern "C" void initTalk__11daNpcCdn3_cFv();
extern "C" void executeTalk__11daNpcCdn3_cFv();
extern "C" void initEscape__11daNpcCdn3_cFv();
extern "C" void executeEscape__11daNpcCdn3_cFv();
extern "C" void initFear__11daNpcCdn3_cFv();
extern "C" void executeFear__11daNpcCdn3_cFv();
extern "C" void initFear2__11daNpcCdn3_cFv();
extern "C" void executeFear2__11daNpcCdn3_cFv();
extern "C" void initFight__11daNpcCdn3_cFv();
extern "C" void executeFight__11daNpcCdn3_cFv();
extern "C" void initRelief__11daNpcCdn3_cFv();
extern "C" void executeRelief__11daNpcCdn3_cFv();
extern "C" void setAngle__11daNpcCdn3_cFv();
extern "C" void pathMoveF__11daNpcCdn3_cFv();
extern "C" void ctrlMsgAnm__11daNpcCdn3_cFv();
extern "C" static void s_sub1__FPvPv();
extern "C" void searchNextScheduleTagSub__11daNpcCdn3_cFP10fopAc_ac_c();
extern "C" static void s_sub2__FPvPv();
extern "C" void searchFirstScheduleTagSub__11daNpcCdn3_cFP10fopAc_ac_c();
extern "C" void checkSchedule__11daNpcCdn3_cFv();
extern "C" void setSchedule__11daNpcCdn3_cFP15daTagSchedule_c();
extern "C" void isInShop__11daNpcCdn3_cFv();
extern "C" void isChairStyle__11daNpcCdn3_cFv();
extern "C" void isNoTurnTalk__11daNpcCdn3_cFv();
extern "C" void waita__11daNpcCdn3_cFPv();
extern "C" void talka__11daNpcCdn3_cFPv();
extern "C" void waitwall__11daNpcCdn3_cFPv();
extern "C" void talkwall__11daNpcCdn3_cFPv();
extern "C" void talkbwall__11daNpcCdn3_cFPv();
extern "C" void talkb__11daNpcCdn3_cFPv();
extern "C" void talkc__11daNpcCdn3_cFPv();
extern "C" void waitb__11daNpcCdn3_cFPv();
extern "C" void sitwaita__11daNpcCdn3_cFPv();
extern "C" void sittalka__11daNpcCdn3_cFPv();
extern "C" void sittalkab__11daNpcCdn3_cFPv();
extern "C" void sitwaitb__11daNpcCdn3_cFPv();
extern "C" void sittalkb__11daNpcCdn3_cFPv();
extern "C" void sittalkbb__11daNpcCdn3_cFPv();
extern "C" void looka__11daNpcCdn3_cFPv();
extern "C" void lookb__11daNpcCdn3_cFPv();
extern "C" void playm__11daNpcCdn3_cFPv();
extern "C" void turnr__11daNpcCdn3_cFPv();
extern "C" void turnl__11daNpcCdn3_cFPv();
extern "C" void walka__11daNpcCdn3_cFPv();
extern "C" void walkb__11daNpcCdn3_cFPv();
extern "C" void runa__11daNpcCdn3_cFPv();
extern "C" void runb__11daNpcCdn3_cFPv();
extern "C" void browsea__11daNpcCdn3_cFPv();
extern "C" void browseb__11daNpcCdn3_cFPv();
extern "C" void dance__11daNpcCdn3_cFPv();
extern "C" void ladytalka__11daNpcCdn3_cFPv();
extern "C" void ladytalkb__11daNpcCdn3_cFPv();
extern "C" void normtalka__11daNpcCdn3_cFPv();
extern "C" void normtalkb__11daNpcCdn3_cFPv();
extern "C" void sellme__11daNpcCdn3_cFPv();
extern "C" void sing__11daNpcCdn3_cFPv();
extern "C" static void daNpcCdn3_Create__FPv();
extern "C" void create__11daNpcCdn3_cFv();
extern "C" void create_init__11daNpcCdn3_cFv();
extern "C" void setMtx__11daNpcCdn3_cFv();
extern "C" void lookat__11daNpcCdn3_cFv();
extern "C" void __dt__5csXyzFv();
extern "C" static void daNpcCdn3_Delete__FPv();
extern "C" void __dt__11daNpcCdn3_cFv();
extern "C" static void daNpcCdn3_Execute__FPv();
extern "C" void execute__11daNpcCdn3_cFv();
extern "C" void checkTimeSchedule__11daNpcCdn3_cFv();
extern "C" static void daNpcCdn3_Draw__FPv();
extern "C" static bool daNpcCdn3_IsDelete__FPv();
extern "C" void __dt__10cCcD_GSttsFv();
extern "C" void __sinit_d_a_npc_cdn3_cpp();
extern "C" static void func_8097EFD8();
extern "C" static void func_8097EFE0();
extern "C" void __dt__18daNpcT_ActorMngr_cFv();
extern "C" void __dt__10daNpcCd2_cFv();
extern "C" void __dt__16dNpcLib_lookat_cFv();
extern "C" void __dt__8cM3dGCylFv();
extern "C" void __dt__8cM3dGAabFv();
extern "C" void __dt__10dCcD_GSttsFv();
extern "C" void __dt__12dBgS_AcchCirFv();
extern "C" void __dt__12dBgS_ObjAcchFv();
extern "C" extern char const* const d_a_npc_cdn3__stringBase0;
extern "C" u8 ActionTable__11daNpcCdn3_c[192];
extern "C" void* m_funcTbl__11daNpcCdn3_c[44];
extern "C" u8 m_seq00_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq01_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq02_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq03_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq04_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq05_funcTbl__11daNpcCdn3_c[48];
extern "C" u8 m_seq06_funcTbl__11daNpcCdn3_c[48];
extern "C" u8 m_seq07_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq08_funcTbl__11daNpcCdn3_c[84];
extern "C" u8 m_seq09_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq10_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq11_funcTbl__11daNpcCdn3_c[72];
extern "C" u8 m_seq12_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq13_funcTbl__11daNpcCdn3_c[72];
extern "C" u8 m_seq14_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq15_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq16_funcTbl__11daNpcCdn3_c[84];
extern "C" u8 m_seq17_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq18_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq19_funcTbl__11daNpcCdn3_c[84];
extern "C" u8 m_seq20_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq21_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq22_funcTbl__11daNpcCdn3_c[48];
extern "C" u8 m_seq23_funcTbl__11daNpcCdn3_c[84];
extern "C" u8 m_seq24_funcTbl__11daNpcCdn3_c[60];
extern "C" u8 m_seq25_funcTbl__11daNpcCdn3_c[84];
extern "C" u8 m_seq26_funcTbl__11daNpcCdn3_c[36];
extern "C" u8 m_seq27_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq28_funcTbl__11daNpcCdn3_c[36];
extern "C" u8 m_seq29_funcTbl__11daNpcCdn3_c[36];
extern "C" u8 m_seq30_funcTbl__11daNpcCdn3_c[72];
extern "C" u8 m_seq31_funcTbl__11daNpcCdn3_c[72];
extern "C" u8 m_seq32_funcTbl__11daNpcCdn3_c[84];
extern "C" u8 m_seq33_funcTbl__11daNpcCdn3_c[84];
extern "C" u8 m_seq34_funcTbl__11daNpcCdn3_c[108];
extern "C" u8 m_seq35_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq36_funcTbl__11daNpcCdn3_c[48];
extern "C" u8 m_seq37_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq38_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq39_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq40_funcTbl__11daNpcCdn3_c[36];
extern "C" u8 m_seq41_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq42_funcTbl__11daNpcCdn3_c[24];
extern "C" u8 m_seq43_funcTbl__11daNpcCdn3_c[36];
//
// External References:
//
extern "C" void mDoMtx_YrotM__FPA4_fs();
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
extern "C" void setMorf__13mDoExt_morf_cFf();
extern "C" void modelCalc__16mDoExt_McaMorfSOFv();
extern "C" void stopZelAnime__16mDoExt_McaMorfSOFv();
extern "C" void __ct__10fopAc_ac_cFv();
extern "C" void __dt__10fopAc_ac_cFv();
extern "C" void fopAc_IsActor__FPv();
extern "C" void fopAcM_delete__FP10fopAc_ac_c();
extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff();
extern "C" void fopAcM_posMoveF__FP10fopAc_ac_cPC4cXyz();
extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c();
extern "C" void fopAcM_getPolygonAngle__FPC8cM3dGPlas();
extern "C" void fpcEx_Search__FPFPvPv_PvPv();
extern "C" void getLayerNo__14dComIfG_play_cFi();
extern "C" void isEventBit__11dSv_event_cCFUs();
extern "C" void onSwitch__12dSv_danBit_cFi();
extern "C" void reset__14dEvt_control_cFv();
extern "C" void convPId__14dEvt_control_cFUi();
extern "C" void ChkPresentEnd__16dEvent_manager_cFv();
extern "C" void GetTriPla__4cBgSCFRC13cBgS_PolyInfoP8cM3dGPla();
extern "C" void __ct__12dBgS_AcchCirFv();
extern "C" void SetWallR__12dBgS_AcchCirFf();
extern "C" void SetWall__12dBgS_AcchCirFff();
extern "C" void __dt__9dBgS_AcchFv();
extern "C" void __ct__9dBgS_AcchFv();
extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz();
extern "C" void CrrPos__9dBgS_AcchFR4dBgS();
extern "C" void SetObj__16dBgS_PolyPassChkFv();
extern "C" void __ct__10dCcD_GSttsFv();
extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c();
extern "C" void __ct__12dCcD_GObjInfFv();
extern "C" void __dt__12dCcD_GObjInfFv();
extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl();
extern "C" void initialize__18daNpcT_ActorMngr_cFv();
extern "C" void entry__18daNpcT_ActorMngr_cFP10fopAc_ac_c();
extern "C" void remove__18daNpcT_ActorMngr_cFv();
extern "C" void getActorP__18daNpcT_ActorMngr_cFv();
extern "C" void NpcCreate__10daNpcCd2_cFi();
extern "C" void ObjCreate__10daNpcCd2_cFi();
extern "C" void ChairCreate__10daNpcCd2_cFf();
extern "C" void isM___10daNpcCd2_cFv();
extern "C" void getAnmP__10daNpcCd2_cFii();
extern "C" void setAttention__10daNpcCd2_cFi();
extern "C" void loadResrc__10daNpcCd2_cFii();
extern "C" void removeResrc__10daNpcCd2_cFii();
extern "C" void setEnvTevCol__10daNpcCd2_cFv();
extern "C" void setRoomNo__10daNpcCd2_cFv();
extern "C" void animation__10daNpcCd2_cFi();
extern "C" void setAnm__10daNpcCd2_cFP18J3DAnmTransformKeyffiii();
extern "C" void drawShadow__10daNpcCd2_cFf();
extern "C" void drawObj__10daNpcCd2_cFiP8J3DModelf();
extern "C" void drawNpc__10daNpcCd2_cFv();
extern "C" void getEscapeTag__10daNpcCd2_cFv();
extern "C" void checkFearSituation__10daNpcCd2_cFv();
extern "C" void setPath__11PathTrace_cFiiiP4cXyzb();
extern "C" void checkPoint__11PathTrace_cF4cXyzf();
extern "C" void checkPathEnd__11PathTrace_cF4cXyzf();
extern "C" void getTargetPoint__11PathTrace_cFP3Vec();
extern "C" void setNextPoint__11PathTrace_cFR4cXyz();
extern "C" void checkObstacle__11PathTrace_cFP10fopAc_ac_c();
extern "C" void checkNowWolfEyeUp__9daPy_py_cFv();
extern "C" void dKy_getdaytime_hour__Fv();
extern "C" void dKy_getdaytime_minute__Fv();
extern "C" void dKy_getDarktime_hour__Fv();
extern "C" void dKy_getDarktime_minute__Fv();
extern "C" void dKy_getDarktime_week__Fv();
extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
extern "C" void dKy_get_dayofweek__Fv();
extern "C" void dKy_darkworld_check__Fv();
extern "C" void getActor__12dMsgObject_cFv();
extern "C" void __ct__10dMsgFlow_cFv();
extern "C" void __dt__10dMsgFlow_cFv();
extern "C" void init__10dMsgFlow_cFP10fopAc_ac_ciiPP10fopAc_ac_c();
extern "C" void doFlow__10dMsgFlow_cFP10fopAc_ac_cPP10fopAc_ac_ci();
extern "C" void __ct__16dNpcLib_lookat_cFv();
extern "C" void init__16dNpcLib_lookat_cFP8J3DModelPiP5csXyzP5csXyz();
extern "C" void action__16dNpcLib_lookat_cF4cXyz4cXyzP10fopAc_ac_cPA4_fi();
extern "C" void dbView__16dNpcLib_lookat_cFv();
extern "C" void Set__4cCcSFP8cCcD_Obj();
extern "C" void __ct__5csXyzFsss();
extern "C" void __dt__13cBgS_PolyInfoFv();
extern "C" void __dt__8cM3dGCirFv();
extern "C" void SetC__8cM3dGCylFRC4cXyz();
extern "C" void SetH__8cM3dGCylFf();
extern "C" void SetR__8cM3dGCylFf();
extern "C" void cLib_addCalc2__FPffff();
extern "C" void cLib_addCalcAngleS__FPsssss();
extern "C" void cLib_addCalcAngleS2__FPssss();
extern "C" void cLib_chaseF__FPfff();
extern "C" void cLib_targetAngleY__FPC3VecPC3Vec();
extern "C" void cLib_targetAngleY__FRC3VecRC3Vec();
extern "C" void cLib_distanceAngleS__Fss();
extern "C" void __ct__17Z2CreatureCitizenFv();
extern "C" void __dt__17Z2CreatureCitizenFv();
extern "C" void playVoice__17Z2CreatureCitizenFi();
extern "C" void __dl__FPv();
extern "C" void checkPass__12J3DFrameCtrlFf();
extern "C" void __destroy_arr();
extern "C" void __ptmf_test();
extern "C" void __ptmf_scall();
extern "C" void _savegpr_28();
extern "C" void _savegpr_29();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" u8 const m_cylDat__10daNpcCd2_c[68];
extern "C" extern u8 const __ptmf_null[12 + 4 /* padding */];
extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
extern "C" extern void* __vt__8dCcD_Cyl[36];
extern "C" extern void* __vt__9dCcD_Stts[11];
extern "C" extern void* __vt__12cCcD_CylAttr[25];
extern "C" extern void* __vt__14cCcD_ShapeAttr[22];
extern "C" extern void* __vt__9cCcD_Stts[8];
extern "C" u8 now__14mDoMtx_stack_c[48];
extern "C" f32 Zero__4cXyz[3];
//
// Declarations:
//
@@ -1360,7 +1095,7 @@ void daNpcCdn3_c::setSchedule(daTagSchedule_c* param_1) {
/* 8097B5A8-8097B60C 002948 0064+00 2/2 0/0 0/0 .text isInShop__11daNpcCdn3_cFv */
inline bool daNpcCdn3_c::isInShop() {
BOOL rv = FALSE;
u8 rv = FALSE;
if (strcmp(dComIfGp_getStartStageName(), "R_SP160") == 0 && dComIfG_play_c::getLayerNo(0) <= 1) {
rv = TRUE;
}
@@ -1853,7 +1588,6 @@ int daNpcCdn3_c::create() {
}
/* 8097CC58-8097D078 003FF8 0420+00 1/1 0/0 0/0 .text create_init__11daNpcCdn3_cFv */
// NONMATCHING - issues with initParamTime division and mod interaction with u16
void daNpcCdn3_c::create_init() {
gravity = -3.0f;
initTimeSchedule();
@@ -1913,15 +1647,19 @@ void daNpcCdn3_c::setMtx() {
}
/* 8097D120-8097D614 0044C0 04F4+00 1/1 0/0 0/0 .text lookat__11daNpcCdn3_cFv */
// NONMATCHING - stack + r3 init order
// NONMATCHING - r3 init order + regalloc
void daNpcCdn3_c::lookat() {
csXyz vecs1[3] = {
csXyz((s32)Cd2_HIO_maxLmtX_BACKBONE(m_type), (s32)Cd2_HIO_maxLmtY_BACKBONE(m_type), 0),
csXyz((s32)Cd2_HIO_maxLmtX_NECK(m_type), (s32)Cd2_HIO_maxLmtY_NECK(m_type), 0),
csXyz((s32)Cd2_HIO_maxLmtX_HEAD(m_type), (s32)Cd2_HIO_maxLmtY_HEAD(m_type), 0),
};
csXyz vecs2[3] = {
csXyz((s32)Cd2_HIO_minLmtX_BACKBONE(m_type), (s32)Cd2_HIO_minLmtY_BACKBONE(m_type), 0),
csXyz((s32)Cd2_HIO_minLmtX_NECK(m_type), (s32)Cd2_HIO_minLmtY_NECK(m_type), 0),
csXyz((s32)Cd2_HIO_minLmtX_HEAD(m_type), (s32)Cd2_HIO_minLmtY_HEAD(m_type), 0),
};
int local_68[4];
csXyz cStack_4c = csXyz(Cd2_HIO_maxLmtX_BACKBONE(m_type), Cd2_HIO_maxLmtY_BACKBONE(m_type), 0);
csXyz cStack_46 = csXyz(Cd2_HIO_maxLmtX_NECK(m_type), Cd2_HIO_maxLmtY_NECK(m_type), 0);
csXyz cStack_40 = csXyz(Cd2_HIO_maxLmtX_HEAD(m_type), Cd2_HIO_maxLmtY_HEAD(m_type), 0);
csXyz cStack_60 = csXyz(Cd2_HIO_minLmtX_BACKBONE(m_type), Cd2_HIO_minLmtY_BACKBONE(m_type), 0);
csXyz cStack_5a = csXyz(Cd2_HIO_minLmtX_NECK(m_type), Cd2_HIO_minLmtY_NECK(m_type), 0);
csXyz cStack_54 = csXyz(Cd2_HIO_minLmtX_HEAD(m_type), Cd2_HIO_minLmtY_HEAD(m_type), 0);
cXyz cStack_80(cXyz::Zero);
if (isM_()) {
local_68[0] = 1;
@@ -1934,7 +1672,7 @@ void daNpcCdn3_c::lookat() {
local_68[2] = 3;
local_68[3] = -1;
}
mLookat.init(mpMorf->getModel(), local_68, &cStack_4c,&cStack_60);
mLookat.init(mpMorf->getModel(), local_68, &vecs1[0], &vecs2[0]);
Mtx afStack_38;
if (m_targetAct.getActorP() != NULL) {
cMtx_copy(mpMorf->getModel()->getBaseTRMtx(), afStack_38);
@@ -1966,7 +1704,6 @@ static int daNpcCdn3_Execute(void* i_this) {
}
/* 8097D748-8097DABC 004AE8 0374+00 1/1 0/0 0/0 .text execute__11daNpcCdn3_cFv */
// NONMATCHING - isInShop bool issue
int daNpcCdn3_c::execute() {
mAcchCir.SetWallH(Cd2_HIO_chkWallH(m_type));
mAcchCir.SetWallR(Cd2_HIO_chkWallR(m_type));
@@ -1999,7 +1736,7 @@ int daNpcCdn3_c::execute() {
return 1;
}
inline bool daNpcCdn3_c::searchFirstScheduleTag(fopAc_ac_c* param_1) {
inline bool daNpcCdn3_c::searchFirstScheduleTag() {
field_0xb88 = NULL;
fpcM_Search(s_sub2, this);
if (mTagSched != NULL) {
@@ -2028,7 +1765,6 @@ inline bool daNpcCdn3_c::searchNextScheduleTag() {
/* 8097DABC-8097DEF4 004E5C 0438+00 1/1 0/0 0/0 .text checkTimeSchedule__11daNpcCdn3_cFv
*/
// NONMATCHING - getLastPointNum issues
void daNpcCdn3_c::checkTimeSchedule() {
int iVar2 = getTime();
if (getGroupID() == 0xff) {
@@ -2041,7 +1777,7 @@ void daNpcCdn3_c::checkTimeSchedule() {
}
} else {
if (mTagSched == NULL) {
if (searchFirstScheduleTag(this)) {
if (searchFirstScheduleTag()) {
setSchedule(mTagSched);
if (mTagSched->getStartEnd() == 1) {
if (field_0xb88 == 0) {
@@ -2055,8 +1791,8 @@ void daNpcCdn3_c::checkTimeSchedule() {
home.pos.set(current.pos);
old.pos.set(current.pos);
current.angle.y =
cLib_targetAngleY(m_path.getPoint(m_path.getLastPointNum()),
m_path.getPoint(m_path.getLastPointNum() - 1));
(s16)cLib_targetAngleY(m_path.getPoint(m_path.getLastPointNum() - 1),
m_path.getPoint(m_path.getLastPointNum()));
shape_angle.y = current.angle.y;
home.angle.y = current.angle.y;
old.angle.y = current.angle.y;
@@ -2065,8 +1801,8 @@ void daNpcCdn3_c::checkTimeSchedule() {
}
} else if (field_0xb95 != 0 && mTagSched->getStartEnd() != 1) {
int day = getDayOfWeek();
int schedDay = mTagSched->getWeekNum();
if (schedDay == day && field_0xb8c <= iVar2) {
int weekNum = mTagSched->getWeekNum();
if (weekNum == day && field_0xb8c <= iVar2) {
field_0xb95 = 0;
}
}
+39 -25
View File
@@ -18,6 +18,17 @@
#include "d/actor/d_a_npc_hoz.h"
#include "d/actor/d_a_obj_zraMark.h"
class daNpc_zrA_HIO_c {
public:
daNpc_zrA_Param_c::param m;
};
#if DEBUG
#define HIO_PARAM(i_this) (i_this->mpHIO->m)
#else
#define HIO_PARAM(_) (daNpc_zrA_Param_c::m)
#endif
//
// Declarations:
//
@@ -459,16 +470,16 @@ char* daNpc_zrA_c::mEvtCutNameList[11] = {
daNpc_zrA_c::EventFn daNpc_zrA_c::mEvtCutList[11] = {
NULL,
&ECut_talkSwim,
&ECut_beforeBlastzrR,
&ECut_afterBlastzrR,
&ECut_thanksBlast,
&ECut_resultAnnounce,
&ECut_carryWaterfall,
&ECut_carryWaterfallSkip,
&ECut_searchPrince1,
&ECut_searchPrince2,
&ECut_talkMulti,
&daNpc_zrA_c::ECut_talkSwim,
&daNpc_zrA_c::ECut_beforeBlastzrR,
&daNpc_zrA_c::ECut_afterBlastzrR,
&daNpc_zrA_c::ECut_thanksBlast,
&daNpc_zrA_c::ECut_resultAnnounce,
&daNpc_zrA_c::ECut_carryWaterfall,
&daNpc_zrA_c::ECut_carryWaterfallSkip,
&daNpc_zrA_c::ECut_searchPrince1,
&daNpc_zrA_c::ECut_searchPrince2,
&daNpc_zrA_c::ECut_talkMulti,
};
/* 80B7956C-80B79798 00114C 022C+00 1/1 0/0 0/0 .text __ct__11daNpc_zrA_cFv */
@@ -2052,10 +2063,11 @@ bool daNpc_zrA_c::selectAction() {
/* 80B7DF40-80B7E668 005B20 0728+00 1/1 0/0 0/0 .text doEvent__11daNpc_zrA_cFv */
// NONMATCHING regalloc
BOOL daNpc_zrA_c::doEvent() {
dEvent_manager_c* event_manager = NULL;
BOOL ret = false;
if (dComIfGp_event_runCheck() != false) {
dEvent_manager_c& event_manager = dComIfGp_getEventManager();
if (dComIfGp_event_runCheck() != FALSE) {
event_manager = &dComIfGp_getEventManager();
if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) {
mOrderNewEvt = false;
}
@@ -2067,10 +2079,10 @@ BOOL daNpc_zrA_c::doEvent() {
l_evtNames[l_evtGetParamList[mOrderEvtNo].fileIdx], 1, 0xffff);
mStaffName = l_myName[1];
} else if (mType == TYPE_WATERFALL) {
if (chkAction(&talkSwim)) {
if (chkAction(&daNpc_zrA_c::talkSwim)) {
(this->*mpActionFn)(NULL);
} else if (dComIfGp_event_chkTalkXY() == false || dComIfGp_evmng_ChkPresentEnd()) {
setAction(&talkSwim);
setAction(&daNpc_zrA_c::talkSwim);
}
} else if (mType == TYPE_SEARCH) {
mOrderEvtNo = EVT_SEARCH_PRINCE;
@@ -2085,7 +2097,7 @@ BOOL daNpc_zrA_c::doEvent() {
changeEvent(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx],
l_evtNames[l_evtGetParamList[mOrderEvtNo].fileIdx], 1, 0xffff);
} else {
if (chkAction(&talk)) {
if (chkAction(&daNpc_zrA_c::talk)) {
(this->*mpActionFn)(NULL);
} else if (dComIfGp_event_chkTalkXY()) {
if (dComIfGp_evmng_ChkPresentEnd()) {
@@ -2099,7 +2111,7 @@ BOOL daNpc_zrA_c::doEvent() {
} else {
mFlowID = 6;
}
setAction(&talk);
setAction(&daNpc_zrA_c::talk);
} else {
s16 event_idx =
dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff);
@@ -2109,7 +2121,7 @@ BOOL daNpc_zrA_c::doEvent() {
}
}
} else {
setAction(&talk);
setAction(&daNpc_zrA_c::talk);
}
}
ret = true;
@@ -2119,23 +2131,25 @@ BOOL daNpc_zrA_c::doEvent() {
mItemID = -1;
}
int staff_id = event_manager.getMyStaffId(mStaffName, this, 0);
int staff_id = event_manager->getMyStaffId(mStaffName, this, 0);
if (staff_id != -1) {
mStaffID = staff_id;
int act_idx = event_manager.getMyActIdx(staff_id, mEvtCutNameList,
int act_idx = event_manager->getMyActIdx(staff_id, mEvtCutNameList,
ARRAY_SIZE(mEvtCutNameList), 0, 0);
JUT_ASSERT(0xf0e, act_idx >= 0 && act_idx < 11);
JUT_ASSERT(0xf0f, mEvtCutList[act_idx] != 0);
if ((this->*mEvtCutList[act_idx])(staff_id)) {
event_manager.cutEnd(staff_id);
event_manager->cutEnd(staff_id);
}
ret = true;
}
if (eventInfo.checkCommandDemoAccrpt()) {
if (mEventIdx != -1 && event_manager.endCheck(mEventIdx)) {
if (mEventIdx != -1 && event_manager->endCheck(mEventIdx)) {
switch (mOrderEvtNo) {
case EVT_TALK_SWIM:
dComIfGp_event_reset();
setAction(&swim);
setAction(&daNpc_zrA_c::swim);
mOrderEvtNo = 0;
mEventIdx = -1;
mStaffName = l_myName[0];
@@ -2144,7 +2158,7 @@ BOOL daNpc_zrA_c::doEvent() {
case EVT_RESULT_ANNOUNCE:
dComIfGp_event_reset();
mActionSelect = 5;
setAction(&returnRiverDescend);
setAction(&daNpc_zrA_c::returnRiverDescend);
mOrderEvtNo = 0;
mEventIdx = -1;
dComIfGs_offSwitch(mSwitch1, fopAcM_GetRoomNo(this));
@@ -2154,7 +2168,7 @@ BOOL daNpc_zrA_c::doEvent() {
case EVT_CARRY_WATERFALL_NIGHT:
dComIfGp_event_reset();
mActionSelect = 3;
setAction(&diveWaterfall);
setAction(&daNpc_zrA_c::diveWaterfall);
mOrderEvtNo = 0;
mEventIdx = -1;
break;
@@ -2177,8 +2191,8 @@ BOOL daNpc_zrA_c::doEvent() {
}
}
int prev_msg_timer = mMsgTimer;
int expression, motion;
int prev_msg_timer = mMsgTimer;
if (ctrlMsgAnm(expression, motion, this, false)) {
if (!field_0x9eb) {
setExpression(expression, -1.0f);
File diff suppressed because it is too large Load Diff
-2
View File
@@ -17,8 +17,6 @@
#include "d/d_debug_viewer.h"
#endif
#include "dol2asm.h"
/* 80D156D4-80D15794 000000 00C0+00 1/1 0/0 0/0 .data r05yuka_image */
static s8 r05yuka_image[192] = {
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,