summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-03-28 20:44:06 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2025-03-28 20:44:06 -0400
commitdb2c5ef978b967908dec4703fa0b6a7019f55f78 (patch)
treec6934f14fb4b2acc21bff8cb76832adf6ac03325 /src
parentb72d243f9b1ef4d107bb33df3d74cf0ecf488cda (diff)
Cleanp a bunch of stuff
Diffstat (limited to 'src')
-rw-r--r--src/JSystem/JMessage/processor.cpp4
-rw-r--r--src/JSystem/JParticle/JPADraw.cpp6
-rw-r--r--src/SSystem/SComponent/c_m3d.cpp12
-rw-r--r--src/d/actor/d_a_agbsw0.cpp2
-rw-r--r--src/d/actor/d_a_arrow.cpp2
-rw-r--r--src/d/actor/d_a_bk.cpp1
-rw-r--r--src/d/actor/d_a_bomb2.cpp22
-rw-r--r--src/d/actor/d_a_bomb3.inc20
-rw-r--r--src/d/actor/d_a_fganon.cpp204
-rw-r--r--src/d/actor/d_a_lamp.cpp10
-rw-r--r--src/d/actor/d_a_npc_nz.cpp3
-rw-r--r--src/d/actor/d_a_obj_movebox.cpp1
-rw-r--r--src/d/actor/d_a_obj_shmrgrd.cpp1
-rw-r--r--src/d/actor/d_a_player_particle.inc2
-rw-r--r--src/d/actor/d_a_rd.cpp4
-rw-r--r--src/d/actor/d_a_steam_tag.cpp2
-rw-r--r--src/d/actor/d_a_tag_so.cpp2
-rw-r--r--src/d/actor/d_a_tpota.cpp2
-rw-r--r--src/d/d_attention.cpp4
-rw-r--r--src/d/d_map.cpp2
-rw-r--r--src/d/d_s_menu.cpp2
-rw-r--r--src/d/d_stage.cpp2
-rw-r--r--src/m_Do/m_Do_MemCardRWmng.cpp2
-rw-r--r--src/m_Do/m_Do_ext.cpp6
24 files changed, 156 insertions, 162 deletions
diff --git a/src/JSystem/JMessage/processor.cpp b/src/JSystem/JMessage/processor.cpp
index 61b6ac4a..2e54eefe 100644
--- a/src/JSystem/JMessage/processor.cpp
+++ b/src/JSystem/JMessage/processor.cpp
@@ -477,13 +477,13 @@ void TSequenceProcessor::do_systemTagCode_(u16 code, const void* data, u32 size)
/* 8029FA2C-8029FA5C .text process_jump_limited___Q28JMessage18TSequenceProcessorFPQ28JMessage18TSequenceProcessor */
bool TSequenceProcessor::process_jump_limited_(TSequenceProcessor* proc) {
JumpCallBackWork* work = (JumpCallBackWork*) &proc->mStatusData.mCallBackWork;
- process_setMessage_index_(proc->mControl, work->mTarget);
+ return process_setMessage_index_(proc->mControl, work->mTarget);
}
/* 8029FA5C-8029FA88 .text process_jump___Q28JMessage18TSequenceProcessorFPQ28JMessage18TSequenceProcessor */
bool TSequenceProcessor::process_jump_(TSequenceProcessor* proc) {
JumpCallBackWork* work = (JumpCallBackWork*) &proc->mStatusData.mCallBackWork;
- process_setMessage_code_(proc->mControl, work->mTarget);
+ return process_setMessage_code_(proc->mControl, work->mTarget);
}
/* 8029FA88-8029FAB8 .text process_branch_limited___Q28JMessage18TSequenceProcessorFPQ28JMessage18TSequenceProcessorUl */
diff --git a/src/JSystem/JParticle/JPADraw.cpp b/src/JSystem/JParticle/JPADraw.cpp
index a1e2090f..d8dca598 100644
--- a/src/JSystem/JParticle/JPADraw.cpp
+++ b/src/JSystem/JParticle/JPADraw.cpp
@@ -25,7 +25,7 @@ bool JPADraw::initialize(JPABaseEmitter* emtr, JPATextureResource* texRes) {
dc.mpDraw = this;
dc.mpTextureResource = texRes;
dc.pTexIdx = dc.pbe->getEmitterDataBlockInfoPtr()->getTextureDataBase();
- dc.mpActiveParticles = &dc.pbe->mActiveParticles;
+ dc.mpActiveParticles = dc.pbe->getParticleList();
field_0xc2 = 0;
mScaleOut = 1.0f;
@@ -811,7 +811,7 @@ void JPADraw::setChildClipBoard() {
void JPADraw::drawParticle() {
field_0xc2 &= ~0x02;
setParticleClipBoard();
- dc.mpActiveParticles = &dc.pbe->mActiveParticles;
+ dc.mpActiveParticles = dc.pbe->getParticleList();
GXSetPointSize(cb.mGlobalScaleX, GX_TO_ONE);
GXSetLineWidth(cb.mGlobalScaleX, GX_TO_ONE);
GXSetZMode(dc.pbsp->isEnableZCmp(), dc.pbsp->getZCmpFunction(), dc.pbsp->isEnableZCmpUpdate());
@@ -911,7 +911,7 @@ void JPADraw::zDraw() {
void JPADraw::zDrawParticle() {
field_0xc2 &= ~0x02;
setParticleClipBoard();
- dc.mpActiveParticles = &dc.pbe->mActiveParticles;
+ dc.mpActiveParticles = dc.pbe->getParticleList();
GXSetPointSize(cb.mGlobalScaleX, GX_TO_ONE);
GXSetLineWidth(cb.mGlobalScaleX, GX_TO_ONE);
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
diff --git a/src/SSystem/SComponent/c_m3d.cpp b/src/SSystem/SComponent/c_m3d.cpp
index c62e7cc5..0c88e5c0 100644
--- a/src/SSystem/SComponent/c_m3d.cpp
+++ b/src/SSystem/SComponent/c_m3d.cpp
@@ -2239,30 +2239,30 @@ void cM3d_CalcVecAngle(const Vec& vec, s16* a, s16* b) {
/* 80251560-80251634 .text cM3d_CalcVecZAngle__FRC3VecP5csXyz */
void cM3d_CalcVecZAngle(const Vec& param_0, csXyz* param_1) {
- param_1->x = -cM_atan2s(param_0.y, std::sqrtf(param_0.x * param_0.x + param_0.z * param_0.z));;
+ param_1->x = -cM_atan2s(param_0.y, std::sqrtf(param_0.x * param_0.x + param_0.z * param_0.z));
param_1->y = cM_atan2s(param_0.x, param_0.z);
param_1->z = 0;
}
/* 80251634-8025172C .text cM3d_UpMtx_Base__FRC3VecRC3VecPA4_f */
int cM3d_UpMtx_Base(const Vec& param_0, const Vec& param_1, Mtx m) {
- if (cM3d_IsZero(PSVECMag(&param_1))) {
+ if (cM3d_IsZero(VECMag(&param_1))) {
MTXIdentity(m);
return 0;
}
Vec sp3C;
Vec sp48;
- PSVECNormalize(&param_1, &sp48);
- PSVECCrossProduct(&param_0, &sp48, &sp3C);
+ VECNormalize(&param_1, &sp48);
+ VECCrossProduct(&param_0, &sp48, &sp3C);
- if (cM3d_IsZero(PSVECMag(&sp3C))) {
+ if (cM3d_IsZero(VECMag(&sp3C))) {
sp3C.x = 1.0f;
sp3C.y = 0.0f;
sp3C.z = 0.0f;
}
- f32 var_f31 = PSVECDotProduct(&param_0, &sp48);
+ f32 var_f31 = VECDotProduct(&param_0, &sp48);
if (var_f31 > 1.0f) {
var_f31 = 1.0f;
} else if (var_f31 < -1.0f) {
diff --git a/src/d/actor/d_a_agbsw0.cpp b/src/d/actor/d_a_agbsw0.cpp
index ee066409..8015cfca 100644
--- a/src/d/actor/d_a_agbsw0.cpp
+++ b/src/d/actor/d_a_agbsw0.cpp
@@ -2553,7 +2553,7 @@ static BOOL daAgbsw0_Draw(daAgbsw0_c* i_this) {
/* 00004B2C-00004CF8 .text daAgbsw0_Execute__FP10daAgbsw0_c */
static BOOL daAgbsw0_Execute(daAgbsw0_c* i_this) {
- i_this->execute();
+ return i_this->execute();
}
/* 00004CF8-00004D00 .text daAgbsw0_IsDelete__FP10daAgbsw0_c */
diff --git a/src/d/actor/d_a_arrow.cpp b/src/d/actor/d_a_arrow.cpp
index 218adc3c..3865ae66 100644
--- a/src/d/actor/d_a_arrow.cpp
+++ b/src/d/actor/d_a_arrow.cpp
@@ -303,7 +303,7 @@ void daArrow_c::arrowShooting() {
clrAtHitNormal();
setAtHitPosBuff(&end);
- mNearestHitDist = MAXFLOAT;
+ mNearestHitDist = FLOAT_MAX;
}
/* 800D4D98-800D4DC0 .text arrowUseMp__9daArrow_cFv */
diff --git a/src/d/actor/d_a_bk.cpp b/src/d/actor/d_a_bk.cpp
index 1715a7e2..768e9554 100644
--- a/src/d/actor/d_a_bk.cpp
+++ b/src/d/actor/d_a_bk.cpp
@@ -3816,7 +3816,6 @@ static void waki_set(bk_class* i_this) {
cXyz sp2C;
u8 sp38[0x100];
dPnt* pnt;
- int i;
int pnt_idx;
sp2C = camera->mLookat.mCenter - camera->mLookat.mEye;
diff --git a/src/d/actor/d_a_bomb2.cpp b/src/d/actor/d_a_bomb2.cpp
index d5188af4..d9c6bd20 100644
--- a/src/d/actor/d_a_bomb2.cpp
+++ b/src/d/actor/d_a_bomb2.cpp
@@ -239,7 +239,7 @@ namespace daBomb2 {
f32 z = mpPos->z;
emitter->mGlobalTranslation.set(x, y, z);
- JSUPtrLink* link = emitter->mActiveParticles.getFirstLink();
+ JSUPtrLink* link = emitter->getParticleList()->getFirstLink();
while(link != 0) {
JSUPtrLink* next = link->getNext();
@@ -493,21 +493,21 @@ namespace daBomb2 {
void Act_c::posMoveF() {
if (mWindVec.abs2() > 0.01f) {
cM3dGPla* triPla = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd);
- cXyz* r6;
- f32 f3, f4;
+ cXyz* norm;
+ f32 friction, no_grade_cos;
if (triPla) {
- r6 = triPla->GetNP();
- f3 = 0.06f;
- f4 = cM_scos(0xA4F);
+ norm = triPla->GetNP();
+ friction = 0.06f;
+ no_grade_cos = cM_scos(0xA4F);
} else {
- r6 = NULL;
- f3 = 0.0f;
- f4 = 0.0f;
+ norm = NULL;
+ friction = 0.0f;
+ no_grade_cos = 0.0f;
}
daObj::posMoveF_grade(
this, mStts.GetCCMoveP(), &mWindVec,
attr().field_0x30, attr().field_0x34,
- r6, f3, f4, NULL
+ norm, friction, no_grade_cos, NULL
);
} else {
fopAcM_posMoveF(this, mStts.GetCCMoveP());
@@ -650,7 +650,7 @@ namespace daBomb2 {
cXyz sp48 = *mSph.GetTgRVecP();
f32 f31 = sp48.abs2();
if (f31 > f30*f30) {
- sp48 *= f30 / std::sqrtf(f31);;
+ sp48 *= f30 / std::sqrtf(f31);
}
cCcD_ShapeAttr* hitShapeAttr = hitObj->GetShapeAttr();
cXyz hitNormal = cXyz::Zero;
diff --git a/src/d/actor/d_a_bomb3.inc b/src/d/actor/d_a_bomb3.inc
index 310bbfda..c75e26e1 100644
--- a/src/d/actor/d_a_bomb3.inc
+++ b/src/d/actor/d_a_bomb3.inc
@@ -118,7 +118,7 @@ void daBomb_fuseSparksEcallBack::execute(JPABaseEmitter* emitter) {
f32 z = mpPos->z;
emitter->mGlobalTranslation.set(x, y, z);
- JSUPtrLink* link = emitter->mActiveParticles.getFirstLink();
+ JSUPtrLink* link = emitter->getParticleList()->getFirstLink();
while(link != 0) {
JSUPtrLink* next = link->getNext();
@@ -466,22 +466,22 @@ void daBomb_c::posMoveF() {
water_tention();
tri = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd);
- f32 mag = mWindVec.getSquareMag();
- if(mag > 0.01f) {
- f32 temp2;
+ if(mWindVec.abs2() > 0.01f) {
+ f32 no_grade_cos;
cXyz* norm;
+ f32 friction;
if(tri) {
norm = tri->GetNP();
- mag = 0.06f;
- temp2 = cM_scos(0xA4F);
+ friction = 0.06f;
+ no_grade_cos = cM_scos(0xA4F);
}
else {
norm = NULL;
- mag = 0.0f;
- temp2 = 0.0f;
+ friction = 0.0f;
+ no_grade_cos = 0.0f;
}
- daObj::posMoveF_grade(this, mStts.GetCCMoveP(), &mWindVec, 0.002f, 0.0005f, norm, mag, temp2, NULL);
+ daObj::posMoveF_grade(this, mStts.GetCCMoveP(), &mWindVec, 0.002f, 0.0005f, norm, friction, no_grade_cos, NULL);
}
else {
fopAcM_posMoveF(this, mStts.GetCCMoveP());
@@ -1129,7 +1129,7 @@ void daBomb_c::set_wind_vec() {
cXyz sp48 = *mSph.GetTgRVecP();
f32 f31 = sp48.abs2();
if (f31 > 180.0f*180.0f) {
- sp48 *= 180.0f / std::sqrtf(f31);;
+ sp48 *= 180.0f / std::sqrtf(f31);
}
cCcD_ShapeAttr* hitShapeAttr = hitObj->GetShapeAttr();
cXyz hitNormal = cXyz::Zero;
diff --git a/src/d/actor/d_a_fganon.cpp b/src/d/actor/d_a_fganon.cpp
index ce3f97c4..1a2407ea 100644
--- a/src/d/actor/d_a_fganon.cpp
+++ b/src/d/actor/d_a_fganon.cpp
@@ -172,7 +172,7 @@ void pos_move(fganon_class* i_this, unsigned char param_2) {
cMtx_YrotS(*calc_mtx, i_this->current.angle.y);
cMtx_XrotM(*calc_mtx, i_this->current.angle.x);
MtxPosition(&local_44, &i_this->speed);
- PSVECAdd(&i_this->current.pos, &i_this->speed, &i_this->current.pos);
+ i_this->current.pos += i_this->speed;
return;
}
@@ -184,8 +184,7 @@ void fly_se_set(fganon_class* i_this) {
cXyz local_34;
local_34 = i_this->current.pos - i_this->old.pos;
- fVar4 = PSVECSquareMag(&local_34);
- uVar2 = (uint)(std::sqrtf(fVar4) * 3.5f);
+ uVar2 = (uint)(local_34.abs() * 3.5f);
if (uVar2 > 100) {
uVar2 = 100;
}
@@ -224,15 +223,15 @@ void fly(fganon_class* i_this) {
anm_init(i_this, FGANON_BCK_WAIT1, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
mDoMtx_YrotS(*calc_mtx, i_this->m398);
- cXyz posVec;
- posVec.z = l_HIO.m0C;
- posVec.y = l_HIO.m10;
- posVec.x = 0.0f;
+ cXyz offset;
+ offset.z = l_HIO.m0C;
+ offset.y = l_HIO.m10;
+ offset.x = 0.0f;
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
i_this->m38C = player->current.pos + transformedPos;
- posVec = i_this->m38C - i_this->current.pos;
- if (std::sqrtf(PSVECSquareMag(&posVec)) > REG0_F(12) + 300.0f) {
+ offset = i_this->m38C - i_this->current.pos;
+ if (offset.abs() > REG0_F(12) + 300.0f) {
cLib_addCalc2(&i_this->speedF, REG0_F(15) + 30.0f, 1.0f, REG0_F(13) + 2.0f);
} else {
cLib_addCalc0(&i_this->speedF, 1.0f, REG0_F(14) + 1.0f);
@@ -307,7 +306,7 @@ void shot(fganon_class* i_this) {
case 3: {
if (i_this->m408 == 5) {
cXyz local_34 = i_this->m3E0 - i_this->eyePos;
- if (std::sqrtf(PSVECSquareMag(&local_34)) < REG0_F(1) + (i_this->m404 * (REG0_F(0) + 10.0f) + 400.0f)) {
+ if (local_34.abs() < REG0_F(1) + (i_this->m404 * (REG0_F(0) + 10.0f) + 400.0f)) {
if (i_this->m689 == 0) {
if (cM_rndF(1.0f) < 0.5f) {
anm_init(i_this, FGANON_BCK_TENNISLR1, 0.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
@@ -371,9 +370,9 @@ void spinattack(fganon_class* i_this) {
}
case 1: {
mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
- cXyz posVec(0.0f, l_HIO.m2C + 100.0f, l_HIO.m30);
+ cXyz offset(0.0f, l_HIO.m2C + 100.0f, l_HIO.m30);
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
i_this->current.pos = player->current.pos + transformedPos;
linChk.Set(&player->eyePos, &i_this->current.pos, a_this);
if (!dComIfG_Bgsp()->LineCross(&linChk)) {
@@ -461,15 +460,15 @@ void fly2(fganon_class* i_this) {
anm_init(i_this, FGANON_BCK_WAIT1, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
}
mDoMtx_YrotS(*calc_mtx, i_this->m398);
- cXyz posVec;
- posVec.z = l_HIO.m14;
- posVec.y = l_HIO.m18;
- posVec.x = 0.0f;
+ cXyz offset;
+ offset.z = l_HIO.m14;
+ offset.y = l_HIO.m18;
+ offset.x = 0.0f;
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
i_this->m38C = player->current.pos + transformedPos;
- posVec = i_this->m38C - i_this->current.pos;
- if (std::sqrtf(PSVECSquareMag(&posVec)) > REG0_F(12) + 300.0f) {
+ offset = i_this->m38C - i_this->current.pos;
+ if (offset.abs() > REG0_F(12) + 300.0f) {
cLib_addCalc2(&i_this->speedF, REG0_F(15) + 30.0f, 1.0f, REG0_F(13) + 2.0f);
} else {
cLib_addCalc0(&i_this->speedF, 1.0f, REG0_F(14) + 1.0f);
@@ -500,12 +499,12 @@ void fly2(fganon_class* i_this) {
void tama_set(fganon_class* i_this) {
if (i_this->m671 != 0) {
mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
- cXyz posVec;
- posVec.x = 0.0f;
- posVec.y = -i_this->m680;
- posVec.z = i_this->m680;
+ cXyz offset;
+ offset.x = 0.0f;
+ offset.y = -i_this->m680;
+ offset.z = i_this->m680;
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
cXyz tempPos(i_this->current.pos.x + transformedPos.x, transformedPos.y + (400.0f + i_this->current.pos.y + REG8_F(4)), i_this->current.pos.z + transformedPos.z);
i_this->m664 = tempPos;
switch (i_this->m671) {
@@ -710,12 +709,12 @@ void spinattack2(fganon_class* i_this) {
}
case 1: {
mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
- cXyz posVec;
- posVec.x = 0.0f;
- posVec.y = l_HIO.m2C;
- posVec.z = l_HIO.m34;
+ cXyz offset;
+ offset.x = 0.0f;
+ offset.y = l_HIO.m2C;
+ offset.z = l_HIO.m34;
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
i_this->current.pos = player->current.pos + transformedPos;
anm_init(i_this, 10, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f, -1);
i_this->m388 = 2;
@@ -729,8 +728,7 @@ void spinattack2(fganon_class* i_this) {
pos_move(i_this, 1);
cXyz local_e4;
local_e4 = i_this->m38C - i_this->current.pos;
- float fVar11 = std::sqrtf(PSVECSquareMag(&local_e4));
- if (fVar11 < l_HIO.m38) {
+ if (local_e4.abs() < l_HIO.m38) {
anm_init(i_this, 9, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
i_this->m388 = 3;
i_this->speedF = 0.0f;
@@ -846,14 +844,14 @@ BOOL kabe_check(fganon_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
dBgS_LinChk linChk;
- cXyz posVec;
- posVec.x = 0.0f;
- posVec.y = 0.0f;
- posVec.z = l_HIO.m34 + 100.0f;
+ cXyz offset;
+ offset.x = 0.0f;
+ offset.y = 0.0f;
+ offset.z = l_HIO.m34 + 100.0f;
for (int i = 0; i < 8; i++) {
cMtx_YrotS(*calc_mtx, i * 0x2000);
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
cXyz tempPos = player->eyePos + transformedPos;
linChk.Set(&player->eyePos, &tempPos, a_this);
if (dComIfG_Bgsp()->LineCross(&linChk)) {
@@ -974,34 +972,34 @@ void fail(fganon_class* i_this) {
cMtx_YrotS(*calc_mtx, i_this->home.angle.y);
- cXyz posVec;
- posVec.x = 0.0f;
- posVec.y = 0.0f;
- posVec.z = 10000.0f;
+ cXyz offset;
+ offset.x = 0.0f;
+ offset.y = 0.0f;
+ offset.z = 10000.0f;
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
- posVec = i_this->home.pos;
- posVec.y += 100.0f;
+ offset = i_this->home.pos;
+ offset.y += 100.0f;
- PSVECAdd(&transformedPos, &posVec, &transformedPos);
+ transformedPos += offset;
- linChk.Set(&posVec, &transformedPos, a_this);
+ linChk.Set(&offset, &transformedPos, a_this);
cMtx_copy(i_this->mpMorf->getModel()->getAnmMtx(0x18), *calc_mtx);
- posVec.x = 0.0f;
- posVec.y = 0.0f;
- posVec.z = 0.0f;
+ offset.x = 0.0f;
+ offset.y = 0.0f;
+ offset.z = 0.0f;
- MtxPosition(&posVec, &transformedPos);
+ MtxPosition(&offset, &transformedPos);
if (dComIfG_Bgsp()->LineCross(&linChk)) {
- posVec = linChk.GetCross();
+ offset = linChk.GetCross();
}
- i_this->m6A0 = i_this->shape_angle.y - cM_atan2s(transformedPos.x - posVec.x, transformedPos.z - posVec.z) + 0x7058 + REG0_S(8);
+ i_this->m6A0 = i_this->shape_angle.y - cM_atan2s(transformedPos.x - offset.x, transformedPos.z - offset.z) + 0x7058 + REG0_S(8);
i_this->m6A4 = REG0_S(5) + 0x80;
i_this->m6A8 = 100;
break;
@@ -1120,7 +1118,7 @@ void standby(fganon_class* i_this) {
/* 00004DB4-00005128 .text start__FP12fganon_class */
void start(fganon_class* i_this) {
- cXyz posVec;
+ cXyz offset;
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
i_this->m3AE = 3;
@@ -1128,8 +1126,8 @@ void start(fganon_class* i_this) {
i_this->attention_info.flags = 0;
switch(i_this->m388) {
case 0: {
- posVec = player->current.pos - i_this->home.pos;
- float distXZ = std::sqrtf(posVec.x * posVec.x + posVec.z * posVec.z);
+ offset = player->current.pos - i_this->home.pos;
+ float distXZ = std::sqrtf(offset.x * offset.x + offset.z * offset.z);
if (distXZ < i_this->m2BD * 10.0f) {
i_this->mB54 = 1;
i_this->m388 = 1;
@@ -1161,12 +1159,12 @@ void start(fganon_class* i_this) {
if (i_this->m3A4[0] <= (s16)(REG0_S(0) + 0x4B)) {
fopAcM_seStart(i_this, JA_SE_CM_PG_EBALL_MAKING_S, 0);
}
- posVec.x = 0.0f;
- posVec.y = i_this->speedF * 0.5f;
- posVec.z = -i_this->speedF;
+ offset.x = 0.0f;
+ offset.y = i_this->speedF * 0.5f;
+ offset.z = -i_this->speedF;
cMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
- MtxPosition(&posVec, &i_this->speed);
- PSVECAdd(&i_this->current.pos, &i_this->speed, &i_this->current.pos);
+ MtxPosition(&offset, &i_this->speed);
+ i_this->current.pos += i_this->speed;
float fVar1;
if (i_this->m3A4[0] == 0) {
fVar1 = 0.0f;
@@ -1648,12 +1646,12 @@ s32 move(fganon_class* i_this) {
i_this->current.pos.z += ccMove->z;
}
if (i_this->m3B0 > 0.01f) {
- cXyz posVec(0.0f, 0.0f, i_this->m3B0);
+ cXyz offset(0.0f, 0.0f, i_this->m3B0);
cMtx_YrotS(*calc_mtx, i_this->m3B4);
cMtx_XrotM(*calc_mtx, i_this->m3B6);
cXyz transformedPos;
- MtxPosition(&posVec, &transformedPos);
- PSVECAdd(&i_this->current.pos, &transformedPos, &i_this->current.pos);
+ MtxPosition(&offset, &transformedPos);
+ i_this->current.pos += transformedPos;
cLib_addCalc0(&i_this->m3B0, 1.0f, 7.0f);
}
return res;
@@ -1665,8 +1663,8 @@ void demo_camera(fganon_class* i_this) {
camera_class* camera2;
fopAc_ac_c* a_this;
daPy_py_c* player;
+ cXyz offset;
cXyz transformedPos;
- cXyz playerPos;
float yPos;
float zPos;
float yPos2;
@@ -1699,11 +1697,11 @@ void demo_camera(fganon_class* i_this) {
player->changeDemoMode(0x18);
}
case 0x2: {
- playerPos.x = -300306.0f;
- playerPos.y = 715.0f;
- playerPos.z = -303407.0f;
+ transformedPos.x = -300306.0f;
+ transformedPos.y = 715.0f;
+ transformedPos.z = -303407.0f;
- player->setPlayerPosAndAngle(&playerPos, -0x7BCD);
+ player->setPlayerPosAndAngle(&transformedPos, -0x7BCD);
i_this->mB68.x = -300319.0f;
i_this->mB68.y = 812.0f;
@@ -1805,23 +1803,23 @@ void demo_camera(fganon_class* i_this) {
cMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
- transformedPos.x = REG0_F(0) - 150.0f;
- transformedPos.y = REG0_F(1) + 20.0f;
- transformedPos.z = REG0_F(2) + 500.0f;
+ offset.x = REG0_F(0) - 150.0f;
+ offset.y = REG0_F(1) + 20.0f;
+ offset.z = REG0_F(2) + 500.0f;
- MtxPosition(&transformedPos, &playerPos);
+ MtxPosition(&offset, &transformedPos);
- i_this->mB5C = i_this->current.pos + playerPos;
+ i_this->mB5C = i_this->current.pos + transformedPos;
- transformedPos.x = REG0_F(3);
- transformedPos.y = 0.0f;
- transformedPos.z = REG0_F(5) + 280.0f;
+ offset.x = REG0_F(3);
+ offset.y = 0.0f;
+ offset.z = REG0_F(5) + 280.0f;
- MtxPosition(&transformedPos, &playerPos);
- PSVECAdd(&playerPos, &i_this->current.pos, &playerPos);
- playerPos.y = 715.0f;
+ MtxPosition(&offset, &transformedPos);
+ transformedPos += i_this->current.pos;
+ transformedPos.y = 715.0f;
- player->setPlayerPosAndAngle(&playerPos, -0x8000);
+ player->setPlayerPosAndAngle(&transformedPos, -0x8000);
i_this->mB68 = i_this->eyePos;
i_this->mB68.y += REG0_F(6) - 40.0f;
@@ -1843,11 +1841,11 @@ void demo_camera(fganon_class* i_this) {
}
case 0x34: {
yPos = player->current.pos.y;
- playerPos.x = -300202.0f;
- playerPos.y = yPos;
- playerPos.z = -301859.0f;
+ transformedPos.x = -300202.0f;
+ transformedPos.y = yPos;
+ transformedPos.z = -301859.0f;
- player->setPlayerPosAndAngle(&playerPos, 0.0f);
+ player->setPlayerPosAndAngle(&transformedPos, 0.0f);
if (i_this->mB56 == 10) {
i_this->m388++;
@@ -1908,15 +1906,15 @@ void demo_camera(fganon_class* i_this) {
i_this->mB68 = player->current.pos;
i_this->mB68.y += REG8_F(3);
- transformedPos.x = 0.0f;
- transformedPos.y = REG8_F(4) + 1500.0f;
- transformedPos.z = REG8_F(5) + 2000.0f;
+ offset.x = 0.0f;
+ offset.y = REG8_F(4) + 1500.0f;
+ offset.z = REG8_F(5) + 2000.0f;
cMtx_YrotS(*calc_mtx, player->shape_angle.y + i_this->mB76 + REG8_S(5));
- MtxPosition(&transformedPos, &playerPos);
+ MtxPosition(&offset, &transformedPos);
i_this->mB76 += REG8_S(6) + 30;
- i_this->mB5C = player->current.pos + playerPos;
+ i_this->mB5C = player->current.pos + transformedPos;
if (i_this->mB56 != 130) {
break;
@@ -1965,28 +1963,28 @@ void demo_camera(fganon_class* i_this) {
cLib_addCalc2(&i_this->mB68.z, i_this->current.pos.z, 0.1f, 200.0f);
cMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
- transformedPos.x = 0.0f;
- transformedPos.y = REG8_F(0) + -100.0f;
- transformedPos.z = REG8_F(1) + 400.0f;
+ offset.x = 0.0f;
+ offset.y = REG8_F(0) + -100.0f;
+ offset.z = REG8_F(1) + 400.0f;
- MtxPosition(&transformedPos, &playerPos);
+ MtxPosition(&offset, &transformedPos);
- PSVECAdd(&playerPos, &i_this->current.pos, &playerPos);
+ transformedPos += i_this->current.pos;
{
dBgS_LinChk linChk;
- linChk.Set(&i_this->mB68, &playerPos, a_this);
+ linChk.Set(&i_this->mB68, &transformedPos, a_this);
if (dComIfG_Bgsp()->LineCross(&linChk)) {
- playerPos = linChk.GetCross();
- playerPos.y += REG8_F(18) + 20.0f;
+ transformedPos = linChk.GetCross();
+ transformedPos.y += REG8_F(18) + 20.0f;
}
}
- cLib_addCalc2(&i_this->mB5C.x, playerPos.x, 0.1f, i_this->mB80 * 50.0f);
- cLib_addCalc2(&i_this->mB5C.y, playerPos.y, 0.1f, i_this->mB80 * 50.0f);
- cLib_addCalc2(&i_this->mB5C.z, playerPos.z, 0.1f, i_this->mB80 * 50.0f);
+ cLib_addCalc2(&i_this->mB5C.x, transformedPos.x, 0.1f, i_this->mB80 * 50.0f);
+ cLib_addCalc2(&i_this->mB5C.y, transformedPos.y, 0.1f, i_this->mB80 * 50.0f);
+ cLib_addCalc2(&i_this->mB5C.z, transformedPos.z, 0.1f, i_this->mB80 * 50.0f);
cLib_addCalc2(&i_this->mB80, 1.0f, 1.0f, REG8_F(7) + 0.1f);
break;
}
@@ -2137,7 +2135,7 @@ void energy_ball_move(fganon_class* i_this) {
}
if (i_this->m408 >= 3) {
i_this->m3EC = i_this->m3E0;
- PSVECAdd(&i_this->m3E0, &i_this->m3F8, &i_this->m3E0);
+ i_this->m3E0 += i_this->m3F8;
mDoMtx_stack_c::transS(i_this->m3E0.x, i_this->m3E0.y, i_this->m3E0.z);
for(int i = 0; i < 2; i++) {
if (i_this->mEmitters2[i] != NULL) {
@@ -2242,7 +2240,7 @@ void energy_ball_move(fganon_class* i_this) {
#if VERSION == VERSION_USA
mDoAud_seStart(JA_SE_LK_PG_BOMB_STRIKE, &i_this->m3E0, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this)));
#endif
- PSVECAdd(&i_this->m3E0, &i_this->m3F8, &i_this->m3E0);
+ i_this->m3E0 += i_this->m3F8;
i_this->m40A = 5;
}
}
@@ -2622,7 +2620,7 @@ static BOOL useHeapInit(fopAc_ac_c* i_act) {
return FALSE;
pModelData = (J3DModelData *)dComIfG_getObjectRes("Pgsw", PGSW_BDL_BPG_KEN1);
- i_this->mpKenModel = mDoExt_J3DModel__create(pModelData, 0, 0x11020203);;
+ i_this->mpKenModel = mDoExt_J3DModel__create(pModelData, 0, 0x11020203);
if (i_this->mpKenModel == NULL)
return FALSE;
diff --git a/src/d/actor/d_a_lamp.cpp b/src/d/actor/d_a_lamp.cpp
index ef1bded7..043a783c 100644
--- a/src/d/actor/d_a_lamp.cpp
+++ b/src/d/actor/d_a_lamp.cpp
@@ -79,11 +79,11 @@ static BOOL daLamp_Execute(lamp_class* i_this) {
i_this->mModel->setBaseTRMtx(*calc_mtx);
MtxTrans(10.0f, -140.0f, -15.0f, 1);
- cXyz pos;
- pos.z = 0.0f;
- pos.y = 0.0f;
- pos.x = 0.0f;
- MtxPosition(&pos, &i_this->mPos);
+ cXyz offset;
+ offset.z = 0.0f;
+ offset.y = 0.0f;
+ offset.x = 0.0f;
+ MtxPosition(&offset, &i_this->mPos);
if (!i_this->mParticleInit) {
static cXyz fire_scale(0.5f, 0.5f, 0.5f);
diff --git a/src/d/actor/d_a_npc_nz.cpp b/src/d/actor/d_a_npc_nz.cpp
index 2ebc931b..be1bde6b 100644
--- a/src/d/actor/d_a_npc_nz.cpp
+++ b/src/d/actor/d_a_npc_nz.cpp
@@ -176,7 +176,8 @@ BOOL daNpc_Nz_c::_createHeap() {
}
}
- if (field_0x934.init(1, 10, static_cast<ResTIMG*>(dComIfG_getObjectRes(m_arc_name, NZ_BTI_SIPPO)), 0)) {
+ ResTIMG* img = static_cast<ResTIMG*>(dComIfG_getObjectRes(m_arc_name, NZ_BTI_SIPPO));
+ if (field_0x934.init(1, 10, img, FALSE)) {
return TRUE;
} else {
return FALSE;
diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp
index 448ba49d..dcefdf6d 100644
--- a/src/d/actor/d_a_obj_movebox.cpp
+++ b/src/d/actor/d_a_obj_movebox.cpp
@@ -115,7 +115,6 @@ namespace daObjMovebox {
/* 000001F0-000003A4 .text gnd_pos__Q212daObjMovebox5Bgc_cFPCQ212daObjMovebox5Act_cPCQ212daObjMovebox8BgcSrc_cif */
void Bgc_c::gnd_pos(const Act_c* movebox, const BgcSrc_c* bgcSrc, int bgcSrcCount, f32 param_4) {
- f32 tempz;
f32 maxGroundY = C_BG_MIN_HEIGHT;
mDoMtx_stack_c::transS(movebox->current.pos);
diff --git a/src/d/actor/d_a_obj_shmrgrd.cpp b/src/d/actor/d_a_obj_shmrgrd.cpp
index 234ad82d..b8377859 100644
--- a/src/d/actor/d_a_obj_shmrgrd.cpp
+++ b/src/d/actor/d_a_obj_shmrgrd.cpp
@@ -430,7 +430,6 @@ void daObjShmrgrd_c::crush_proc() {
mScaleY = 0.2f;
mCrushState = 2;
mCrushTimer = attr().mCrushDuration;
- return;
} else if (mCrushState == 2) {
if (--mCrushTimer > 0) {
return;
diff --git a/src/d/actor/d_a_player_particle.inc b/src/d/actor/d_a_player_particle.inc
index 23661593..a411e470 100644
--- a/src/d/actor/d_a_player_particle.inc
+++ b/src/d/actor/d_a_player_particle.inc
@@ -93,7 +93,7 @@ void daPy_swimTailEcallBack_c::execute(JPABaseEmitter* emitter) {
emitter->setDirection(right_dir);
}
- for (JSULink<JPABaseParticle>* link = emitter->mActiveParticles.getFirst(); link != NULL;) {
+ for (JSULink<JPABaseParticle>* link = emitter->getParticleList()->getFirst(); link != NULL;) {
JSULink<JPABaseParticle>* nextLink = link->getNext();
JPABaseParticle* particle = link->getObject();
diff --git a/src/d/actor/d_a_rd.cpp b/src/d/actor/d_a_rd.cpp
index 1bed3db3..d0dbaa73 100644
--- a/src/d/actor/d_a_rd.cpp
+++ b/src/d/actor/d_a_rd.cpp
@@ -132,7 +132,7 @@ static BOOL nodeControl_CB(J3DNode* node, int calcTiming) {
}
/* 00000358-00000514 .text _nodeControl__6daRd_cFP7J3DNodeP8J3DModel */
-BOOL daRd_c::_nodeControl(J3DNode* node, J3DModel* model) {
+void daRd_c::_nodeControl(J3DNode* node, J3DModel* model) {
J3DJoint* joint = static_cast<J3DJoint*>(node);
int jntNo = joint->getJntNo();
cMtx_copy(model->getAnmMtx(jntNo), mDoMtx_stack_c::get());
@@ -169,7 +169,7 @@ static BOOL nodeHeadControl_CB(J3DNode* node, int calcTiming) {
}
/* 0000059C-000006A0 .text _nodeHeadControl__6daRd_cFP7J3DNodeP8J3DModel */
-BOOL daRd_c::_nodeHeadControl(J3DNode* node, J3DModel* model) {
+void daRd_c::_nodeHeadControl(J3DNode* node, J3DModel* model) {
J3DJoint* joint = static_cast<J3DJoint*>(node);
int jntNo = joint->getJntNo();
diff --git a/src/d/actor/d_a_steam_tag.cpp b/src/d/actor/d_a_steam_tag.cpp
index 19ddb4b5..7cfc12c2 100644
--- a/src/d/actor/d_a_steam_tag.cpp
+++ b/src/d/actor/d_a_steam_tag.cpp
@@ -63,7 +63,7 @@ const daSteamTag_mData* daSteamTag_c::getData() {
BOOL daSteamTag_c::CreateInit() {
m29B = daSteamTag_prm::getSchBit(this);
mEmitTimer = getData()->emit_time_min + cM_rndF(getData()->emit_time_range);
- mCreateTimer = cM_rndF(getData()->create_time_range);;
+ mCreateTimer = cM_rndF(getData()->create_time_range);
mpEmitter = NULL;
mEmitTimer = 0;
mGStts.Init(0xFF,0xFF,this);
diff --git a/src/d/actor/d_a_tag_so.cpp b/src/d/actor/d_a_tag_so.cpp
index 5119aac0..bbe41ded 100644
--- a/src/d/actor/d_a_tag_so.cpp
+++ b/src/d/actor/d_a_tag_so.cpp
@@ -84,7 +84,7 @@ static BOOL daTag_SoExecute(void* i_this) {
/* 000002EC-00000310 .text daTag_SoDraw__FPv */
static BOOL daTag_SoDraw(void* i_this) {
- return ((daTag_So_c*)i_this)->_draw();;
+ return ((daTag_So_c*)i_this)->_draw();
}
/* 00000310-00000318 .text daTag_SoIsDelete__FPv */
diff --git a/src/d/actor/d_a_tpota.cpp b/src/d/actor/d_a_tpota.cpp
index 4e88474b..37110ff6 100644
--- a/src/d/actor/d_a_tpota.cpp
+++ b/src/d/actor/d_a_tpota.cpp
@@ -11,8 +11,8 @@
#include "d/d_particle.h"
#include "d/d_com_inf_game.h"
-
const u16 l_daTpota_idx_table[2] = {dPa_name::ID_SCENE_82AE, dPa_name::ID_SCENE_82AF};
+
/* 00000078-000001D0 .text _create__9daTpota_cFv */
cPhs_State daTpota_c::_create() {
fopAcM_SetupActor(this, daTpota_c);
diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp
index 3c2b56b2..3534da27 100644
--- a/src/d/d_attention.cpp
+++ b/src/d/d_attention.cpp
@@ -317,14 +317,14 @@ void dAttention_c::initList(u32 flagMask) {
for (i = 0; i < (s32)ARRAY_SIZE(mLockOnList); i++) {
mLockOnList[i].setActor(NULL);
- mLockOnList[i].mWeight = 3.4028235E38f;
+ mLockOnList[i].mWeight = FLOAT_MAX;
}
mLockOnOffs = 0;
mLockOnNum = 0;
for (i = 0; i < (s32)ARRAY_SIZE(mActionList); i++) {
mActionList[i].setActor(NULL);
- mActionList[i].mWeight = 3.4028235E38f;
+ mActionList[i].mWeight = FLOAT_MAX;
}
mActionOffs = 0;
mActionNum = 0;
diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp
index ace909fb..b6dfe124 100644
--- a/src/d/d_map.cpp
+++ b/src/d/d_map.cpp
@@ -38,7 +38,7 @@ void onSaveArriveGridForAgbUseGridPos(int i_gridX, int i_gridY) {
/* 80045660-80045714 .text isSaveArriveGridForAgbUseGridPos__Fii */
BOOL isSaveArriveGridForAgbUseGridPos(int i_gridX, int i_gridY) {
- dComIfGs_isSaveArriveGridForAgb(gridPos2GridNo(i_gridX, i_gridY));
+ return dComIfGs_isSaveArriveGridForAgb(gridPos2GridNo(i_gridX, i_gridY));
}
/* 80045714-80045734 .text IsFloorNo__Fi */
diff --git a/src/d/d_s_menu.cpp b/src/d/d_s_menu.cpp
index 990792cc..ae9f89d3 100644
--- a/src/d/d_s_menu.cpp
+++ b/src/d/d_s_menu.cpp
@@ -308,7 +308,7 @@ myFontClass::~myFontClass() {}
/* 8022F7A8-8022F7CC .text drawChar_scale__11myFontClassFffffib */
f32 myFontClass::drawChar_scale(f32 param_1, f32 param_2, f32 param_3, f32 param_4, int param_5, bool param_6) {
- JUTResFont::drawChar_scale(param_1, param_2, 12.0f, param_4, param_5, param_6);
+ return JUTResFont::drawChar_scale(param_1, param_2, 12.0f, param_4, param_5, param_6);
}
scene_method_class l_dScnMenu_Method = {
diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp
index 45fc7e8f..273a1c85 100644
--- a/src/d/d_stage.cpp
+++ b/src/d/d_stage.cpp
@@ -1300,7 +1300,6 @@ const char* dStage_getName2(s16 i_procName, s8 i_subtype) {
*/
void dStage_actorCreate(stage_actor_data_class* i_actorData, fopAcM_prm_class* i_actorPrm) {
dStage_objectNameInf* nameinf_p = dStage_searchName(i_actorData->mName);
- fopAc_ac_c* actor;
if (nameinf_p == NULL) {
JKRHeap::free(i_actorPrm, NULL);
@@ -1729,7 +1728,6 @@ int dStage_roomReadInit(dStage_dt_c* i_stage, void* i_data, int i_num, void* i_f
for (int i = 0; i < rtbl->num; i++) {
rtbl_entries[i] = (roomRead_data_class*)((u32)i_file + (u32)rtbl_entries[i]);
- roomRead_data_class * pEntry = rtbl_entries[i];
rtbl_entries[i]->mpRooms = (u8*)((u32)i_file + (u32)rtbl_entries[i]->mpRooms);
}
diff --git a/src/m_Do/m_Do_MemCardRWmng.cpp b/src/m_Do/m_Do_MemCardRWmng.cpp
index 761ffe6c..bd807b65 100644
--- a/src/m_Do/m_Do_MemCardRWmng.cpp
+++ b/src/m_Do/m_Do_MemCardRWmng.cpp
@@ -259,7 +259,7 @@ void mDoMemCdRWm_SetCardStat(CARDFileInfo* card) {
CARDSetIconSpeed(&stat, 5, 0);
CARDSetIconSpeed(&stat, 6, 0);
CARDSetIconSpeed(&stat, 7, 0);
- CARDSetStatus(mDoMemCd_getNowSlot(), card->fileNo, &stat);;
+ CARDSetStatus(mDoMemCd_getNowSlot(), card->fileNo, &stat);
}
/* 8001A1EC-8001A2F0 .text mDoMemCdRWm_CheckCardStat__FP12CARDFileInfo */
diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp
index 7aeb9f09..452bbaa9 100644
--- a/src/m_Do/m_Do_ext.cpp
+++ b/src/m_Do/m_Do_ext.cpp
@@ -1763,7 +1763,7 @@ void mDoExt_invJntPacket::draw() {
#include "assets/l_toonMat1DL.h"
/* 800143B8-80014580 .text init__15mDoExt_3Dline_cFUsii */
-int mDoExt_3Dline_c::init(u16 numSegments, int hasSize, int hasTex) {
+BOOL mDoExt_3Dline_c::init(u16 numSegments, BOOL hasSize, BOOL hasTex) {
mpSegments = new cXyz[numSegments];
if (mpSegments == NULL)
return FALSE;
@@ -1811,7 +1811,7 @@ int mDoExt_3Dline_c::init(u16 numSegments, int hasSize, int hasTex) {
}
/* 80014584-80014664 .text init__19mDoExt_3DlineMat0_cFUsUsi */
-int mDoExt_3DlineMat0_c::init(u16 numLines, u16 numSegments, int hasSize) {
+BOOL mDoExt_3DlineMat0_c::init(u16 numLines, u16 numSegments, BOOL hasSize) {
mNumLines = numLines;
mMaxSegments = numSegments;
mpLines = new mDoExt_3Dline_c[numLines];
@@ -2070,7 +2070,7 @@ void mDoExt_3DlineMat0_c::update(u16 segs, GXColor& newColor, dKy_tevstr_c* pTev
}
/* 80015328-800154C4 .text init__19mDoExt_3DlineMat1_cFUsUsP7ResTIMGi */
-int mDoExt_3DlineMat1_c::init(u16 numLines, u16 numSegments, ResTIMG* i_img, int hasSize) {
+BOOL mDoExt_3DlineMat1_c::init(u16 numLines, u16 numSegments, ResTIMG* i_img, BOOL hasSize) {
mNumLines = numLines;
mMaxSegments = numSegments;
mpLines = new mDoExt_3Dline_c[numLines];