diff --git a/include/SSystem/SComponent/c_API_controller_pad.h b/include/SSystem/SComponent/c_API_controller_pad.h index 0babb009d..812ccde38 100644 --- a/include/SSystem/SComponent/c_API_controller_pad.h +++ b/include/SSystem/SComponent/c_API_controller_pad.h @@ -5,18 +5,18 @@ // made up name struct controller_pad_buttons { - bool left : 1; - bool right : 1; - bool down : 1; - bool up : 1; - bool z : 1; - bool r : 1; - bool l : 1; - bool a : 1; - bool b : 1; - bool x : 1; - bool y : 1; - bool start : 1; + /* 0x00 (0x80 >> 7) */ bool left : 1; + /* 0x00 (0x40 >> 6) */ bool right : 1; + /* 0x00 (0x10 >> 5) */ bool down : 1; + /* 0x00 (0x10 >> 4) */ bool up : 1; + /* 0x00 (0x08 >> 3) */ bool z : 1; + /* 0x00 (0x04 >> 2) */ bool r : 1; + /* 0x00 (0x02 >> 1) */ bool l : 1; + /* 0x00 (0x01 >> 0) */ bool a : 1; + /* 0x01 (0x80 >> 7) */ bool b : 1; + /* 0x01 (0x40 >> 6) */ bool x : 1; + /* 0x01 (0x20 >> 5) */ bool y : 1; + /* 0x01 (0x10 >> 4) */ bool start : 1; }; struct interface_of_controller_pad { diff --git a/include/d/actor/d_a_rd.h b/include/d/actor/d_a_rd.h index eda71d26c..87767d339 100644 --- a/include/d/actor/d_a_rd.h +++ b/include/d/actor/d_a_rd.h @@ -120,8 +120,8 @@ public: void modeProcInit(int newMode) { modeProc(PROC_INIT, newMode); } fopAc_ac_c* _searchNearDeadRd(fopAc_ac_c*); - BOOL _nodeControl(J3DNode*, J3DModel*); - BOOL _nodeHeadControl(J3DNode*, J3DModel*); + void _nodeControl(J3DNode*, J3DModel*); + void _nodeHeadControl(J3DNode*, J3DModel*); BOOL _createHeap(); bool createArrowHeap(); bool checkPlayerInAttack(); diff --git a/include/d/d_a_obj.h b/include/d/d_a_obj.h index 4862fa7eb..5aabade96 100644 --- a/include/d/d_a_obj.h +++ b/include/d/d_a_obj.h @@ -14,17 +14,17 @@ namespace daObj { return ((1 << width) - 1) & (param >> shift); } - void make_land_effect(fopAc_ac_c*, dBgS_GndChk*, float); - cXyz& get_wind_spd(fopAc_ac_c*, float); - cXyz& get_path_spd(cBgS_PolyInfo&, float); - void posMoveF_stream(fopAc_ac_c*, const cXyz*, const cXyz*, float, float); - void posMoveF_grade(fopAc_ac_c*, const cXyz*, const cXyz*, float, float, const cXyz*, float, float, const cXyz*); + void make_land_effect(fopAc_ac_c*, dBgS_GndChk*, f32); + cXyz& get_wind_spd(fopAc_ac_c*, f32); + cXyz& get_path_spd(cBgS_PolyInfo&, f32); + void posMoveF_stream(fopAc_ac_c*, const cXyz*, const cXyz*, f32, f32); + void posMoveF_grade(fopAc_ac_c*, const cXyz*, const cXyz*, f32, f32, const cXyz*, f32, f32, const cXyz*); void quat_rotBaseY(Quaternion*, const cXyz&); void quat_rotBaseY2(Quaternion*, const cXyz&); void quat_rotBaseZ(Quaternion*, const cXyz&); void quat_rotVec(Quaternion*, const cXyz&, const cXyz&); void SetCurrentRoomNo(fopAc_ac_c*, dBgS_GndChk*); - void HitSeStart(const cXyz*, int, const dCcD_GObjInf*, unsigned long); + void HitSeStart(const cXyz*, int, const dCcD_GObjInf*, u32); void HitEff_sub_kikuzu(const cXyz*, const cXyz*, const dKy_tevstr_c*); void HitEff_kikuzu(const fopAc_ac_c*, const dCcD_Cyl*); void HitEff_hibana(const cXyz*, const cXyz*); diff --git a/include/d/d_bg_s_chk.h b/include/d/d_bg_s_chk.h index 0203d9efa..e7f7f47a7 100644 --- a/include/d/d_bg_s_chk.h +++ b/include/d/d_bg_s_chk.h @@ -15,4 +15,4 @@ public: STATIC_ASSERT(sizeof(dBgS_Chk) == 0x14); -#endif /* D_BG_D_BG_S_CHK_H */ \ No newline at end of file +#endif /* D_BG_D_BG_S_CHK_H */ diff --git a/include/d/d_particle_name.h b/include/d/d_particle_name.h index c09a534a9..e070d3b17 100644 --- a/include/d/d_particle_name.h +++ b/include/d/d_particle_name.h @@ -209,7 +209,7 @@ namespace dPa_name { }; // Particles that are scene-specific. - // These are not in common.jpc, and must be loaded by a scene's particle bank. + // These are not in common.jpc, and must be loaded by a scene's particle bank. enum { ID_SCENE_8058 = 0x8058, ID_SCENE_8059 = 0x8059, diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 0e5e7aba3..6b39624cc 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -274,7 +274,6 @@ public: }; // PPNT / RPPN -struct dPnt; struct dStage_dPnt_c { /* 0x0 */ int num; /* 0x4 */ u32 m_pnt_offset; diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 1879da383..47d4cd16b 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -582,7 +582,7 @@ public: mDoExt_3Dline_c(); ~mDoExt_3Dline_c(); - int init(u16, int, int); + BOOL init(u16 numSegments, BOOL hasSize, BOOL hasTex); public: /* 0x00 */ cXyz* mpSegments; @@ -593,7 +593,7 @@ public: class mDoExt_3DlineMat0_c : public mDoExt_3DlineMat_c { public: - int init(u16, u16, int); + BOOL init(u16 numLines, u16 numSegments, BOOL hasSize); void setMaterial(); void draw(); void update(u16, f32, GXColor&, u16, dKy_tevstr_c*); @@ -615,7 +615,7 @@ public: class mDoExt_3DlineMat1_c : public mDoExt_3DlineMat_c { public: - int init(u16, u16, ResTIMG*, int); + BOOL init(u16 numLines, u16 numSegments, ResTIMG* i_img, BOOL hasSize); void setMaterial(); void draw(); void update(u16, f32, GXColor&, u16, dKy_tevstr_c*); diff --git a/src/JSystem/JMessage/processor.cpp b/src/JSystem/JMessage/processor.cpp index 61b6ac4a0..2e54eefe2 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 a1e2090f8..d8dca5982 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 c62e7cc5e..0c88e5c06 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(¶m_1))) { + if (cM3d_IsZero(VECMag(¶m_1))) { MTXIdentity(m); return 0; } Vec sp3C; Vec sp48; - PSVECNormalize(¶m_1, &sp48); - PSVECCrossProduct(¶m_0, &sp48, &sp3C); + VECNormalize(¶m_1, &sp48); + VECCrossProduct(¶m_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(¶m_0, &sp48); + f32 var_f31 = VECDotProduct(¶m_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 ee0664097..8015cfca6 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 218adc3cd..3865ae668 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 1715a7e2a..768e95540 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 d5188af4a..d9c6bd20d 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 310bbfdab..c75e26e1e 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 ce3f97c42..1a2407eae 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 ef1bded77..043a783c2 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 2ebc931b7..be1bde6bb 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(dComIfG_getObjectRes(m_arc_name, NZ_BTI_SIPPO)), 0)) { + ResTIMG* img = static_cast(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 448ba49d1..dcefdf6d1 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 234ad82dc..b83778599 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 236615932..a411e470b 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* link = emitter->mActiveParticles.getFirst(); link != NULL;) { + for (JSULink* link = emitter->getParticleList()->getFirst(); link != NULL;) { JSULink* 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 1bed3db31..d0dbaa73f 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(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(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 19ddb4b54..7cfc12c26 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 5119aac0f..bbe41dedc 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 4e88474b1..37110ff68 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 3c2b56b27..3534da27c 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 ace909fb7..b6dfe124e 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 990792ccc..ae9f89d3a 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 45fc7e8fa..273a1c851 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 761ffe6ca..bd807b65d 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 7aeb9f098..452bbaa9d 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];