mirror of https://github.com/zeldaret/tp.git
parent
ed42b15988
commit
559d389e3d
|
|
@ -21,8 +21,6 @@ struct daNpc_GetParam2 { // name unknown
|
|||
/* 0x8 */ int arcIdx;
|
||||
};
|
||||
|
||||
struct dPnt : public dStage_dPnt_c {};
|
||||
|
||||
class daNpcT_ActorMngr_c {
|
||||
private:
|
||||
/* 0x0 */ fpc_ProcID mActorID;
|
||||
|
|
@ -1165,7 +1163,7 @@ private:
|
|||
/* 0x02 */ u16 field_0x02;
|
||||
/* 0x04 */ bool mIsReversed;
|
||||
/* 0x05 */ bool mIsClosed;
|
||||
/* 0x08 */ dStage_dPnt_c mPoints[96];
|
||||
/* 0x08 */ dPnt mPoints[96];
|
||||
|
||||
public:
|
||||
/* 80150870 */ void initialize(dPath*, int);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,18 @@
|
|||
#define D_D_PATH_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "mtx.h"
|
||||
|
||||
class cBgS_PolyInfo;
|
||||
struct cXyz;
|
||||
struct dStage_dPnt_c;
|
||||
|
||||
struct dPnt {
|
||||
/* 0x0 */ u8 mArg1;
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
/* 0x2 */ u8 field_0x2;
|
||||
/* 0x3 */ u8 mArg0;
|
||||
/* 0x4 */ Vec m_position;
|
||||
}; // Size: 0x10
|
||||
|
||||
struct dPath {
|
||||
/* 0x0 */ u16 m_num;
|
||||
|
|
@ -14,14 +22,14 @@ struct dPath {
|
|||
/* 0x5 */ bool m_closed;
|
||||
/* 0x6 */ u8 field_0x6;
|
||||
/* 0x7 */ u8 field_0x7;
|
||||
/* 0x8 */ dStage_dPnt_c* m_points;
|
||||
/* 0x8 */ dPnt* m_points;
|
||||
};
|
||||
|
||||
inline BOOL dPath_ChkClose(dPath* i_path) { return i_path->m_closed & 1; }
|
||||
|
||||
dPath* dPath_GetRoomPath(int path_index, int room_no);
|
||||
dPath* dPath_GetNextRoomPath(dPath const* i_path, int room_no);
|
||||
dStage_dPnt_c* dPath_GetPnt(dPath const* i_path, int pnt_index);
|
||||
dPnt* dPath_GetPnt(dPath const* i_path, int pnt_index);
|
||||
u8 dPath_GetPolyRoomPathVec(cBgS_PolyInfo const& poly, cXyz* p_pathVec, int* param_2);
|
||||
|
||||
#endif /* D_D_PATH_H */
|
||||
|
|
|
|||
|
|
@ -289,12 +289,9 @@ public:
|
|||
|
||||
// PPNT
|
||||
struct dStage_dPnt_c {
|
||||
/* 0x0 */ u8 mArg1;
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
/* 0x2 */ u8 field_0x2;
|
||||
/* 0x3 */ u8 mArg0;
|
||||
/* 0x4 */ Vec m_position;
|
||||
}; // Size: 0x10
|
||||
/* 0x0 */ int num;
|
||||
/* 0x4 */ u32 m_pnt_offset;
|
||||
}; // Size: 0x8
|
||||
|
||||
struct dStage_FloorInfo_c {
|
||||
// FLOR
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
typedef struct Vec {
|
||||
f32 x, y, z;
|
||||
} Vec, *VecPtr, Point3d, *Point3dPtr;
|
||||
|
||||
|
|
|
|||
|
|
@ -14992,7 +14992,7 @@ s16 daAlink_c::getSceneExitMoveAngle() {
|
|||
return mDemo.getMoveAngle();
|
||||
}
|
||||
|
||||
dStage_dPnt_c* var_r30 = &field_0x2f58->m_points[field_0x2fc2];
|
||||
dPnt* var_r30 = &field_0x2f58->m_points[field_0x2fc2];
|
||||
f32 dx = var_r30->m_position.x - current.pos.x;
|
||||
f32 dz = var_r30->m_position.z - current.pos.z;
|
||||
|
||||
|
|
|
|||
|
|
@ -956,7 +956,7 @@ void daB_DS_c::mCreateTrap(bool param_0) {
|
|||
|
||||
dPath* path = dPath_GetRoomPath(3, fopAcM_GetRoomNo(this));
|
||||
if (path != NULL) {
|
||||
dStage_dPnt_c& point = path->m_points[trap_create_id];
|
||||
dPnt& point = path->m_points[trap_create_id];
|
||||
pos = point.m_position;
|
||||
vec = pos - current.pos;
|
||||
if (vec.abs() <= 200.0f) {
|
||||
|
|
|
|||
|
|
@ -3151,7 +3151,7 @@ u8 daCow_c::initialize() {
|
|||
mPath = dPath_GetRoomPath(prm1, fopAcM_GetRoomNo(this));
|
||||
mPointIndex = 0;
|
||||
|
||||
dStage_dPnt_c* point = dPath_GetPnt(mPath, mPointIndex);
|
||||
dPnt* point = dPath_GetPnt(mPath, mPointIndex);
|
||||
current.pos = point->m_position;
|
||||
|
||||
setProcess(&daCow_c::action_crazy, false);
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ static BOOL path_check(e_ba_class* i_this) {
|
|||
vec1 = i_this->current.pos;
|
||||
vec1.y += 100.0f;
|
||||
static bool check_index[255];
|
||||
dStage_dPnt_c* point = i_this->mpPath->m_points;
|
||||
dPnt* point = i_this->mpPath->m_points;
|
||||
for (int i = 0; i < i_this->mpPath->m_num; i++, point++) {
|
||||
vec2.x = point->m_position.x;
|
||||
vec2.y = point->m_position.y + 100.0f;
|
||||
|
|
@ -507,7 +507,7 @@ static void e_ba_return(e_ba_class* i_this) {
|
|||
|
||||
/* 8068039C-806806B4 00179C 0318+00 1/1 0/0 0/0 .text e_ba_path_fly__FP10e_ba_class */
|
||||
static void e_ba_path_fly(e_ba_class* i_this) {
|
||||
dStage_dPnt_c* point;
|
||||
dPnt* point;
|
||||
|
||||
switch (i_this->mMode) {
|
||||
case 0:
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ void daE_PM_c::SearchFarP() {
|
|||
//! @bug best_distance is not initialized
|
||||
f32 best_distance;
|
||||
int best_index;
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mpPath, 0);
|
||||
dPnt* pnt = dPath_GetPnt(mpPath, 0);
|
||||
cXyz point(pnt->m_position.x, pnt->m_position.y, pnt->m_position.z);
|
||||
for (int i = 0; i < mpPath->m_num; i++) {
|
||||
pnt = dPath_GetPnt(mpPath, i);
|
||||
|
|
@ -343,7 +343,7 @@ void daE_PM_c::SearchFarP() {
|
|||
/* 80742C94-80742E1C 000E94 0188+00 3/3 0/0 0/0 .text SearchNearP__8daE_PM_cFv */
|
||||
void daE_PM_c::SearchNearP() {
|
||||
//! @bug Whatever this function is supposed to do is almost certainly not what it actually does.
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mpPath, 0);
|
||||
dPnt* pnt = dPath_GetPnt(mpPath, 0);
|
||||
if (current.pos.absXZ(pnt->m_position) < 1.0e9f) {
|
||||
mPoint = pnt->m_position;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ static BOOL path_check(e_rdy_class* i_this) {
|
|||
cXyz start, end;
|
||||
start = i_this->current.pos;
|
||||
start.y += 10.0f;
|
||||
dStage_dPnt_c* point = i_this->mpPath->m_points;
|
||||
dPnt* point = i_this->mpPath->m_points;
|
||||
for (int i = 0; i < i_this->mpPath->m_num; i++, point++) {
|
||||
if (i < 0xff) {
|
||||
end.x = point->m_position.x;
|
||||
|
|
@ -1258,7 +1258,7 @@ static s8 e_rdy_bow2(e_rdy_class* i_this) {
|
|||
}
|
||||
|
||||
if (i_this->mpPath != NULL) {
|
||||
dStage_dPnt_c* point = i_this->mpPath->m_points;
|
||||
dPnt* point = i_this->mpPath->m_points;
|
||||
i_this->mArrowTarget.x = point->m_position.x;
|
||||
i_this->mArrowTarget.y = point->m_position.y;
|
||||
i_this->mArrowTarget.z = point->m_position.z;
|
||||
|
|
@ -2851,7 +2851,7 @@ static void e_rdy_jyunkai(e_rdy_class* i_this) {
|
|||
case 0: {
|
||||
anm_init(i_this, ANM_WALK, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f);
|
||||
i_this->mMode = 1;
|
||||
dStage_dPnt_c* point = &i_this->mpPath->m_points[i_this->mPathIndex];
|
||||
dPnt* point = &i_this->mpPath->m_points[i_this->mPathIndex];
|
||||
i_this->field_0x5bc = point->m_position;
|
||||
// fallthrough
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ static BOOL path_check(e_s1_class* i_this) {
|
|||
start_pos = a_this->current.pos;
|
||||
start_pos.y += WREG_F(0) + 10.0f;
|
||||
|
||||
dStage_dPnt_c* point = i_this->mpPath->m_points;
|
||||
dPnt* point = i_this->mpPath->m_points;
|
||||
for (int i = 0; i < i_this->mpPath->m_num; i++, point++) {
|
||||
if (i < 255) {
|
||||
end_pos.x = point->m_position.x;
|
||||
|
|
@ -754,7 +754,7 @@ static void e_s1_path(e_s1_class* i_this) {
|
|||
}
|
||||
|
||||
{
|
||||
dStage_dPnt_c* point = &i_this->mpPath->m_points[i_this->mCurrentPathPointNo];
|
||||
dPnt* point = &i_this->mpPath->m_points[i_this->mCurrentPathPointNo];
|
||||
i_this->mPathTargetPos.x = point->m_position.x;
|
||||
i_this->mPathTargetPos.y = point->m_position.y;
|
||||
i_this->mPathTargetPos.z = point->m_position.z;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ static int path_check(e_yk_class* i_this) {
|
|||
cXyz path_point_pos;
|
||||
current_keese_pos = i_this->current.pos;
|
||||
current_keese_pos.y += 100.0f;
|
||||
dStage_dPnt_c* points = i_this->mpPath->m_points;
|
||||
dPnt* points = i_this->mpPath->m_points;
|
||||
|
||||
// Set/update check_index array based on whether or not path points
|
||||
// were crossed
|
||||
|
|
@ -591,7 +591,7 @@ static void e_yk_path_fly(e_yk_class* i_this) {
|
|||
case 2:
|
||||
i_this->mActionPhase = 3;
|
||||
|
||||
dStage_dPnt_c* point = i_this->mpPath->m_points;
|
||||
dPnt* point = i_this->mpPath->m_points;
|
||||
point = &point[i_this->mPathPntIdx];
|
||||
|
||||
i_this->field_0x68c = 0.0f;
|
||||
|
|
|
|||
|
|
@ -2384,7 +2384,7 @@ void daE_YM_c::executeSwitch() {
|
|||
field_0x6e6 = 0x5dc;
|
||||
field_0x6e8 = 0;
|
||||
} else {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mpPath, mCurrentPntNo);
|
||||
dPnt* pnt = dPath_GetPnt(mpPath, mCurrentPntNo);
|
||||
mCurrentPntNo = 0;
|
||||
++mCurrentPntNo;
|
||||
old.pos = pnt->m_position;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ static void dEnvSe_getNearPathPos(cXyz* param_0, cXyz* param_1, dPath* i_path) {
|
|||
f32 var_f31 = FLT_MAX;
|
||||
|
||||
int i;
|
||||
dStage_dPnt_c* point_p = i_path->m_points;
|
||||
dPnt* point_p = i_path->m_points;
|
||||
|
||||
cXyz sp3C[2];
|
||||
cM3dGLin sp14;
|
||||
|
|
|
|||
|
|
@ -291,10 +291,10 @@ static dPath* set_path_info(fopAc_ac_c* i_this) {
|
|||
}
|
||||
|
||||
/* 80857F8C-8085811C 00080C 0190+00 1/1 0/0 0/0 .text near_rail_get__FP13kytag06_classP4cXyz */
|
||||
static dStage_dPnt_c* near_rail_get(kytag06_class* i_this, cXyz* i_pos) {
|
||||
static dPnt* near_rail_get(kytag06_class* i_this, cXyz* i_pos) {
|
||||
f32 nearest_dist = 100000000.0f;
|
||||
dPath* path = i_this->mpPath;
|
||||
dStage_dPnt_c* pnt;
|
||||
dPnt* pnt;
|
||||
|
||||
for (int i = 0; i < path->m_num; i++) {
|
||||
f32 pnt_dist = i_pos->abs(path->m_points[i].m_position);
|
||||
|
|
@ -1012,7 +1012,7 @@ static int daKytag06_Execute(kytag06_class* i_this) {
|
|||
if (i_this->mpPath != NULL) {
|
||||
int target1 = 0;
|
||||
int target2 = 0;
|
||||
dStage_dPnt_c* pnt = near_rail_get(i_this, &camera->lookat.eye);
|
||||
dPnt* pnt = near_rail_get(i_this, &camera->lookat.eye);
|
||||
|
||||
if (pnt != NULL && pnt->mArg0 != 0xFF) {
|
||||
dKy_change_colpat(pnt->mArg0);
|
||||
|
|
|
|||
|
|
@ -1959,7 +1959,7 @@ bool PathTrace_c::setPath(int param_1, int param_2, int param_3, cXyz* param_4,
|
|||
f32 minDist = 1000000000.0f;
|
||||
field_0x20 = 0;
|
||||
for (int i = 0; i < mPath->m_num; i++) {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mPath, i);
|
||||
dPnt* pnt = dPath_GetPnt(mPath, i);
|
||||
f32 dist = param_4->abs2(pnt->m_position);
|
||||
if (dist < minDist) {
|
||||
minDist = dist;
|
||||
|
|
@ -1973,7 +1973,7 @@ bool PathTrace_c::setPath(int param_1, int param_2, int param_3, cXyz* param_4,
|
|||
|
||||
/* 80159C14-80159DC0 154554 01AC+00 1/1 0/0 6/6 .text checkPoint__11PathTrace_cF4cXyzf */
|
||||
bool PathTrace_c::checkPoint(cXyz param_1, f32 param_2) {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mPath, field_0x20);
|
||||
dPnt* pnt = dPath_GetPnt(mPath, field_0x20);
|
||||
f32 dist = param_1.absXZ(pnt->m_position);
|
||||
if (dist < param_2 || dist < 10.0f) {
|
||||
return true;
|
||||
|
|
@ -2001,7 +2001,7 @@ bool PathTrace_c::checkPathEnd(cXyz param_1, f32 param_2) {
|
|||
/* 80159E54-80159ECC 154794 0078+00 0/0 0/0 10/10 .text getTargetPoint__11PathTrace_cFP3Vec */
|
||||
void PathTrace_c::getTargetPoint(Vec* targetPoint) {
|
||||
if (mObstacle == NULL) {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mPath, field_0x20);
|
||||
dPnt* pnt = dPath_GetPnt(mPath, field_0x20);
|
||||
*targetPoint = pnt->m_position;
|
||||
} else {
|
||||
getAvoidPoint(targetPoint);
|
||||
|
|
@ -2039,13 +2039,13 @@ void PathTrace_c::setNextPoint(cXyz& param_1) {
|
|||
|
||||
/* 8015A0D0-8015A264 154A10 0194+00 1/1 0/0 0/0 .text setNextPoint__11PathTrace_cFv */
|
||||
void PathTrace_c::setNextPoint() {
|
||||
dStage_dPnt_c* pnt1 = dPath_GetPnt(mPath, field_0x20);
|
||||
dPnt* pnt1 = dPath_GetPnt(mPath, field_0x20);
|
||||
if (field_0x24 > 0) {
|
||||
field_0x20 = incIndex(field_0x20);
|
||||
} else {
|
||||
field_0x20 = decIndex(field_0x20);
|
||||
}
|
||||
dStage_dPnt_c* pnt2 = dPath_GetPnt(mPath, field_0x20);
|
||||
dPnt* pnt2 = dPath_GetPnt(mPath, field_0x20);
|
||||
cXyz acStack_28(pnt1->m_position);
|
||||
field_0x18 = acStack_28.abs(pnt2->m_position);
|
||||
mNextPoint = 1000000000.0f;
|
||||
|
|
@ -2111,7 +2111,7 @@ void PathTrace_c::checkObstacleSub(fopAc_ac_c* pObstacle) {
|
|||
if (mMyself != pObstacle) {
|
||||
JUT_ASSERT(1816, mPath != 0);
|
||||
cXyz& newObstaclePos = fopAcM_GetPosition(pObstacle);
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mPath, field_0x20);
|
||||
dPnt* pnt = dPath_GetPnt(mPath, field_0x20);
|
||||
f32 local_38;
|
||||
f32 local_3c;
|
||||
f32 local_40;
|
||||
|
|
|
|||
|
|
@ -1330,7 +1330,7 @@ static void npc_ne_pathwalk(npc_ne_class* i_this) {
|
|||
i_this->mPathDir = 1;
|
||||
i_this->mPathPointNo = 1;
|
||||
}
|
||||
dStage_dPnt_c* point = i_this->mpPath->m_points;
|
||||
dPnt* point = i_this->mpPath->m_points;
|
||||
point += i_this->mPathPointNo;
|
||||
i_this->mTargetPos.x = point->m_position.x + cM_rndFX(50.0f);
|
||||
i_this->mTargetPos.y = point->m_position.y;
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ int daNpc_zrA_Path_c::getDstPosChase(u16 i_idx, cXyz i_pos, cXyz& o_pnt) {
|
|||
/* 80B78E08-80B7956C 0009E8 0764+00 1/1 0/0 0/0 .text chkPassDst__16daNpc_zrA_Path_cFUs4cXyz */
|
||||
f32 daNpc_zrA_Path_c::chkPassDst(u16 i_idx, cXyz i_pos) {
|
||||
u16 prev_idx, next_idx;
|
||||
dStage_dPnt_c* points = mpRoomPath->m_points;
|
||||
dPnt* points = mpRoomPath->m_points;
|
||||
u16 idx = mIdx;
|
||||
u8 reversed = mIsReversed;
|
||||
mIdx = i_idx;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ int daObjCBlk_c::Create() {
|
|||
} else {
|
||||
pnt_index = 0;
|
||||
}
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(roomPath, pnt_index);
|
||||
dPnt* pnt = dPath_GetPnt(roomPath, pnt_index);
|
||||
JUT_ASSERT(284, pnt != 0)
|
||||
current.pos = pnt->m_position;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ int daObjDigpl_c::execute() {
|
|||
attention_info.position.y = current.pos.y;
|
||||
cXyz point_pos;
|
||||
|
||||
dStage_dPnt_c* point_p = mpDigPoints->m_points;
|
||||
dPnt* point_p = mpDigPoints->m_points;
|
||||
f32 dist_to_current_pnt = FLT_MAX;
|
||||
|
||||
for (int i = 0; i < mpDigPoints->m_num; i++, point_p++) {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ void daObjIceBlk_c::loadCurrentPos() {
|
|||
if (mpPath != NULL) {
|
||||
u16 point_no = getPointNo();
|
||||
if (point_no != 0) {
|
||||
dStage_dPnt_c* point = &mpPath->m_points[point_no - 1];
|
||||
dPnt* point = &mpPath->m_points[point_no - 1];
|
||||
home.pos = point->m_position;
|
||||
old.pos = home.pos;
|
||||
current.pos = home.pos;
|
||||
|
|
@ -148,7 +148,7 @@ int daObjIceBlk_c::saveCurrentPos() {
|
|||
return current_pos;
|
||||
}
|
||||
|
||||
dStage_dPnt_c* point = mpPath->m_points;
|
||||
dPnt* point = mpPath->m_points;
|
||||
f32 nearest_dist = 1000000.0f;
|
||||
int nearest_point_no = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ void dalv4CandleDemoTag_c::init_modeEnemyCreate() {
|
|||
dPath* path_p = dPath_GetRoomPath(mPathID, fopAcM_GetRoomNo(this));
|
||||
|
||||
for (int i = 0; i < path_p->m_num; i++) {
|
||||
dStage_dPnt_c* pnt = &path_p->m_points[i];
|
||||
dPnt* pnt = &path_p->m_points[i];
|
||||
|
||||
cXyz pos;
|
||||
pos.x = pnt->m_position.x;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ int daOptiLift_c::create() {
|
|||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
dStage_dPnt_c* pointp = pathp->m_points;
|
||||
dPnt* pointp = pathp->m_points;
|
||||
current.pos.x = pointp->m_position.x;
|
||||
current.pos.y = pointp->m_position.y;
|
||||
current.pos.z = pointp->m_position.z;
|
||||
|
|
@ -416,7 +416,7 @@ void daOptiLift_c::modeInitSet2() {
|
|||
/* 80C8B4D8-80C8B53C 0012B8 0064+00 2/2 0/0 0/0 .text liftReset__12daOptiLift_cFv */
|
||||
void daOptiLift_c::liftReset() {
|
||||
dPath* pathp = dPath_GetRoomPath(mPathID, fopAcM_GetRoomNo(this));
|
||||
dStage_dPnt_c* pointp = pathp->m_points;
|
||||
dPnt* pointp = pathp->m_points;
|
||||
|
||||
current.pos.x = pointp->m_position.x;
|
||||
current.pos.y = pointp->m_position.y;
|
||||
|
|
@ -445,7 +445,7 @@ void daOptiLift_c::setNextPoint() {
|
|||
mPathDirection = 1;
|
||||
next_point = 1;
|
||||
} else {
|
||||
dStage_dPnt_c* pointp = &pathp->m_points[mCurrentPoint];
|
||||
dPnt* pointp = &pathp->m_points[mCurrentPoint];
|
||||
if (pointp->mArg0 == 0) {
|
||||
next_point = mCurrentPoint;
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ void daOptiLift_c::setNextPoint() {
|
|||
if (next_point != -1) {
|
||||
mPrevTargetPos = mTargetPos;
|
||||
|
||||
dStage_dPnt_c* pointp = &pathp->m_points[next_point];
|
||||
dPnt* pointp = &pathp->m_points[next_point];
|
||||
mTargetPos.x = pointp->m_position.x;
|
||||
mTargetPos.y = pointp->m_position.y;
|
||||
mTargetPos.z = pointp->m_position.z;
|
||||
|
|
|
|||
|
|
@ -231,14 +231,14 @@ void daMagLift_c::setNextPoint() {
|
|||
field_0x5af = 0x1;
|
||||
sVar1 = 1;
|
||||
} else {
|
||||
dStage_dPnt_c* pnt = &path->m_points[mPoint];
|
||||
dPnt* pnt = &path->m_points[mPoint];
|
||||
if (pnt->mArg0 == 0) {
|
||||
sVar1 = mPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
field_0x5c0 = field_0x5b4;
|
||||
dStage_dPnt_c* pnt = &path->m_points[sVar1];
|
||||
dPnt* pnt = &path->m_points[sVar1];
|
||||
field_0x5b4 = pnt->m_position;
|
||||
mPoint = sVar1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ void daObjMovebox::Act_c::path_init() {
|
|||
}
|
||||
|
||||
mpPath = dPath_GetRoomPath(path_id, fopAcM_GetHomeRoomNo(this));
|
||||
dStage_dPnt_c* point = dPath_GetPnt(mpPath, pnt_no);
|
||||
dPnt* point = dPath_GetPnt(mpPath, pnt_no);
|
||||
home.pos.set(point->m_position);
|
||||
current.pos.set(point->m_position);
|
||||
}
|
||||
|
|
@ -504,7 +504,7 @@ void daObjMovebox::Act_c::path_save() {
|
|||
|
||||
int var_r29 = 0;
|
||||
for (; var_r29 < var_r27; var_r29++) {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mpPath, var_r29);
|
||||
dPnt* pnt = dPath_GetPnt(mpPath, var_r29);
|
||||
cXyz sp38;
|
||||
sp38.set(pnt->m_position);
|
||||
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ static int daObj_Tp_Create(fopAc_ac_c* i_this) {
|
|||
if (path == NULL) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
dStage_dPnt_c* pPoint = path->m_points;
|
||||
dPnt* pPoint = path->m_points;
|
||||
cXyz cStack_28;
|
||||
csXyz cStack_30(0, 0, 0);
|
||||
for (int i = 0; i < path->m_num; i++, pPoint++) {
|
||||
|
|
|
|||
|
|
@ -524,8 +524,8 @@ void daPasserMng_c::create_init() {
|
|||
npcId = getDetailLevel() == 0 ? PROC_NPC_PASSER : PROC_NPC_PASSER2;
|
||||
mPath = dPath_GetRoomPath(getPathID(), fopAcM_GetHomeRoomNo(this));
|
||||
JUT_ASSERT(542, mPath != 0);
|
||||
dStage_dPnt_c* pnt0 = dPath_GetPnt(mPath, 0);
|
||||
dStage_dPnt_c* pnt1 = dPath_GetPnt(mPath, 1);
|
||||
dPnt* pnt0 = dPath_GetPnt(mPath, 0);
|
||||
dPnt* pnt1 = dPath_GetPnt(mPath, 1);
|
||||
current.pos.set(pnt0->m_position);
|
||||
current.angle.y = cLib_targetAngleY(pnt0->m_position, pnt1->m_position);
|
||||
childProcIds = new fpc_ProcID[getMaxNum()];
|
||||
|
|
@ -583,8 +583,8 @@ void daPasserMng_c::create_init() {
|
|||
#endif
|
||||
OS_REPORT("\n");
|
||||
for (i = 0; i < max; i++) {
|
||||
dStage_dPnt_c* pnti0 = dPath_GetPnt(mPath, arr[i]);
|
||||
dStage_dPnt_c* pnti1 = dPath_GetPnt(mPath, arr[i] + 1);
|
||||
dPnt* pnti0 = dPath_GetPnt(mPath, arr[i]);
|
||||
dPnt* pnti1 = dPath_GetPnt(mPath, arr[i] + 1);
|
||||
cXyz cStack_28(pnti0->m_position);
|
||||
s16 sVar11 = cLib_targetAngleY(cStack_28, pnti1->m_position);
|
||||
csXyz cStack_30(endTime, sVar11, 0);
|
||||
|
|
|
|||
|
|
@ -520,8 +520,8 @@ int daSpinner_c::checkPathMove() {
|
|||
var_r27--;
|
||||
}
|
||||
|
||||
dStage_dPnt_c* temp_r26 = &mpPathMove->m_points[var_r27];
|
||||
dStage_dPnt_c* temp_r25 = &mpPathMove->m_points[sp10];
|
||||
dPnt* temp_r26 = &mpPathMove->m_points[var_r27];
|
||||
dPnt* temp_r25 = &mpPathMove->m_points[sp10];
|
||||
cXyz sp50(temp_r25->m_position.x - temp_r26->m_position.x,
|
||||
temp_r25->m_position.y - temp_r26->m_position.y,
|
||||
temp_r25->m_position.z - temp_r26->m_position.z);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ int daTagLv7Gate_c::create() {
|
|||
void daTagLv7Gate_c::setPath(u8 i_path_ID) {
|
||||
mRoomPath = dPath_GetRoomPath(i_path_ID, fopAcM_GetRoomNo(this));
|
||||
if (mRoomPath != NULL) {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mRoomPath, 0);
|
||||
dPnt* pnt = dPath_GetPnt(mRoomPath, 0);
|
||||
cXyz pos1 = pnt->m_position;
|
||||
|
||||
pnt = dPath_GetPnt(mRoomPath, 1);
|
||||
|
|
@ -290,7 +290,7 @@ int daTagLv7Gate_c::execute() {
|
|||
}
|
||||
|
||||
bool daTagLv7Gate_c::checkPoint(f32 i_speed) {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
dPnt* pnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
mDistance -= i_speed;
|
||||
if (sqrtf(PSVECSquareDistance((Vec*)&mPos1, (Vec*)&pnt->m_position)) < i_speed ||
|
||||
mDistance < 0.0f) {
|
||||
|
|
@ -308,7 +308,7 @@ bool daTagLv7Gate_c::setNextPoint() {
|
|||
mDistance = 0;
|
||||
bVar1 = true;
|
||||
} else {
|
||||
dStage_dPnt_c* pnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
dPnt* pnt = dPath_GetPnt(mRoomPath, field_0x5a0);
|
||||
|
||||
cXyz pos1(mPos1.x, 0.0f, mPos1.z);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ int daTagGuard_c::create() {
|
|||
void daTagGuard_c::create_init() {
|
||||
mPath = dPath_GetRoomPath(getPathID(), fopAcM_GetHomeRoomNo(this));
|
||||
|
||||
dStage_dPnt_c* pnt1 = dPath_GetPnt(mPath, 0);
|
||||
dStage_dPnt_c* pnt2 = dPath_GetPnt(mPath, 1);
|
||||
dPnt* pnt1 = dPath_GetPnt(mPath, 0);
|
||||
dPnt* pnt2 = dPath_GetPnt(mPath, 1);
|
||||
|
||||
current.pos.x = pnt1->m_position.x;
|
||||
current.pos.y = pnt1->m_position.y;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ static int daTagSppath_Delete(daTagSppath_c* i_this) {
|
|||
int daTagSppath_c::getNearPathPos(cXyz* i_result, dPath* i_path) {
|
||||
daPy_py_c* py = daPy_getPlayerActorClass();
|
||||
cXyz* pyCurPos = &py->current.pos;
|
||||
dStage_dPnt_c* curPnt = i_path->m_points;
|
||||
dPnt* curPnt = i_path->m_points;
|
||||
f32 bestDist = FLT_MAX;
|
||||
|
||||
int bestNo;
|
||||
|
|
@ -121,7 +121,7 @@ int daTagSppath_c::getNearPathPos(cXyz* i_result, dPath* i_path) {
|
|||
if (isValid == 0) {
|
||||
nearestPointOnSeg = curPnt->m_position;
|
||||
if (!dPath_ChkClose(i_path) && ((i == 0 || (i == i_path->m_num - 1)))) {
|
||||
dStage_dPnt_c* adjPnt;
|
||||
dPnt* adjPnt;
|
||||
if (i == 0) {
|
||||
adjPnt = curPnt + 1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ int daTagWljump_c::execute() {
|
|||
field_0x56d--;
|
||||
}
|
||||
|
||||
dStage_dPnt_c* point_p;
|
||||
dPnt* point_p;
|
||||
|
||||
daPy_py_c* player = daPy_getLinkPlayerActorClass();
|
||||
daMidna_c* midna = daPy_py_c::getMidnaActor();
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ void daTbox_c::initPos() {
|
|||
}
|
||||
|
||||
if (dComIfGs_isSwitch(getSwNo(), fopAcM_GetRoomNo(this))) {
|
||||
dStage_dPnt_c* pnt = &path_p->m_points[path_p->m_num - 1];
|
||||
dPnt* pnt = &path_p->m_points[path_p->m_num - 1];
|
||||
current.pos = pnt->m_position;
|
||||
home.pos = pnt->m_position;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ f32 daYkgr_c::getPosRate() {
|
|||
}
|
||||
f32 dVar11 = FLT_MAX;
|
||||
cXyz cStack_5c(dComIfGp_getPlayer(0)->current.pos);
|
||||
dStage_dPnt_c* iVar9 = m_path->m_points;
|
||||
dPnt* iVar9 = m_path->m_points;
|
||||
int uVar2 = m_path->m_num;
|
||||
for (int iVar8 = 0; iVar8 < uVar2; iVar8++, iVar9++) {
|
||||
cXyz cStack_68(iVar9->m_position.x, iVar9->m_position.y, iVar9->m_position.z);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ static void dEnvSe_getNearPathPos(cXyz* param_0, cXyz* param_1, dPath* i_path) {
|
|||
f32 var_f31 = FLT_MAX;
|
||||
|
||||
int i;
|
||||
dStage_dPnt_c* point_p = i_path->m_points;
|
||||
dPnt* point_p = i_path->m_points;
|
||||
|
||||
cXyz sp3C[2];
|
||||
cM3dGLin sp14;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include "d/d_com_inf_game.h"
|
||||
|
||||
/* 800517B0-800517EC 04C0F0 003C+00 0/0 7/7 63/63 .text dPath_GetPnt__FPC5dPathi */
|
||||
dStage_dPnt_c* dPath_GetPnt(dPath const* path, int pnt_index) {
|
||||
dPnt* dPath_GetPnt(dPath const* path, int pnt_index) {
|
||||
if (path == NULL || path->m_points == NULL || pnt_index < 0 || pnt_index >= path->m_num) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -94,10 +94,10 @@ u8 dPath_GetPolyRoomPathVec(cBgS_PolyInfo const& poly, cXyz* p_pathVec, int* par
|
|||
return 0;
|
||||
}
|
||||
|
||||
dStage_dPnt_c* pnt_start = path->m_points;
|
||||
dStage_dPnt_c* pnt_end = &pnt_start[pnt_no];
|
||||
dPnt* pnt_start = path->m_points;
|
||||
dPnt* pnt_end = &pnt_start[pnt_no];
|
||||
|
||||
dStage_dPnt_c* pnt_begin;
|
||||
dPnt* pnt_begin;
|
||||
if (pnt_no == path->m_num - 1) {
|
||||
pnt_begin = pnt_start;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2075,8 +2075,7 @@ static int dStage_pathInfoInit(dStage_dt_c* stageDt, void* i_data, int entryNum,
|
|||
|
||||
for (int i = 0; i < path_c->m_num; i++) {
|
||||
if ((u32)path->m_points < 0x80000000) {
|
||||
// fake match?
|
||||
path->m_points = (dStage_dPnt_c*)((int)path->m_points + *(int*)&stageDt->getPntInf()->m_position);
|
||||
path->m_points = (dPnt*)((u32)path->m_points + stageDt->getPntInf()->m_pnt_offset);
|
||||
}
|
||||
path++;
|
||||
}
|
||||
|
|
@ -2100,7 +2099,7 @@ static int dStage_rpatInfoInit(dStage_dt_c* i_stage, void* i_data, int i_num, vo
|
|||
if ((u32)pPath->m_points >= 0x80000000) {
|
||||
continue;
|
||||
}
|
||||
pPath->m_points = (dStage_dPnt_c*)((u32)*((int*)i_stage->getPnt2Inf()+1) + (u32)pPath->m_points); // TODO clean this up
|
||||
pPath->m_points = (dPnt*)((u32)pPath->m_points + i_stage->getPnt2Inf()->m_pnt_offset);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ void dTres_c::checkTreasureBox(dTres_c::data_s* param_0) {
|
|||
}
|
||||
dMapInfo_n::correctionOriginPos(param_0->mRoomNo, ¶m_0->mPos);
|
||||
} else {
|
||||
dStage_dPnt_c* point;
|
||||
dPnt* point;
|
||||
if (dComIfGs_isSwitch(param_0->mSwBit, param_0->mRoomNo)) {
|
||||
point = &path->m_points[path->m_num - 1];
|
||||
} else {
|
||||
|
|
@ -291,4 +291,4 @@ u8 dTres_c::getTypeToTypeGroupNo(u8 i_type) {
|
|||
}
|
||||
|
||||
return groupNo;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue