diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 47d4cd16b..158f888f1 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -573,7 +573,9 @@ public: void setModel(J3DModel*) {} void update() {} - void draw(); + void draw() { + /* Nonmatching */ + } void setMaterial(); }; diff --git a/src/JAZelAudio/JAIZelBasic.cpp b/src/JAZelAudio/JAIZelBasic.cpp index 090700749..a85eb070c 100644 --- a/src/JAZelAudio/JAIZelBasic.cpp +++ b/src/JAZelAudio/JAIZelBasic.cpp @@ -1074,7 +1074,7 @@ void JAIZelBasic::changeSeaBgm() { switch (r3) { case 4: - field_0x0094 = 0.0f; + field_0x0094 = 1.0f; bgmStart(checkSeaBgmID(), 0x5A, 1); break; case 1: diff --git a/src/JSystem/JParticle/JPADrawVisitor.cpp b/src/JSystem/JParticle/JPADrawVisitor.cpp index f03c1c2ba..916e598a6 100644 --- a/src/JSystem/JParticle/JPADrawVisitor.cpp +++ b/src/JSystem/JParticle/JPADrawVisitor.cpp @@ -83,7 +83,7 @@ void JPADrawExecGenPrjTexMtx::exec(const JPADrawContext* pDC) { f32 transY = tick * pDC->pbsp->getTexScrollTransY() + pDC->pbsp->getTexStaticTransY(); f32 scaleX = tick * pDC->pbsp->getTexScrollScaleX() + pDC->pbsp->getTexStaticScaleX(); f32 scaleY = tick * pDC->pbsp->getTexScrollScaleY() + pDC->pbsp->getTexStaticScaleY(); - s32 angle = DEG_TO_RAD(tick * pDC->pbsp->getTexScrollRotate()); + s32 angle = 0x8000 * (tick * pDC->pbsp->getTexScrollRotate()); f32 sin = JMASSin(angle); f32 cos = JMASCos(angle); @@ -131,7 +131,7 @@ void JPADrawExecSetTexMtx::exec(const JPADrawContext* pDC) { f32 transY = tick * pDC->pbsp->getTexScrollTransY() + pDC->pbsp->getTexStaticTransY(); f32 scaleX = tick * pDC->pbsp->getTexScrollScaleX() + pDC->pbsp->getTexStaticScaleX(); f32 scaleY = tick * pDC->pbsp->getTexScrollScaleY() + pDC->pbsp->getTexStaticScaleY(); - s32 angle = DEG_TO_RAD(tick * pDC->pbsp->getTexScrollRotate()); + s32 angle = 0x8000 * (tick * pDC->pbsp->getTexScrollRotate()); f32 sin = JMASSin(angle); f32 cos = JMASCos(angle); @@ -248,7 +248,7 @@ void JPADrawExecSetTexMtx::exec(const JPADrawContext* pDC, JPABaseParticle* ptcl f32 transY = tick * pDC->pbsp->getTexScrollTransY() + pDC->pbsp->getTexStaticTransY(); f32 scaleX = tick * pDC->pbsp->getTexScrollScaleX() + pDC->pbsp->getTexStaticScaleX(); f32 scaleY = tick * pDC->pbsp->getTexScrollScaleY() + pDC->pbsp->getTexStaticScaleY(); - s32 angle = DEG_TO_RAD(tick * pDC->pbsp->getTexScrollRotate()); + s32 angle = 0x8000 * (tick * pDC->pbsp->getTexScrollRotate()); f32 sin = JMASSin(angle); f32 cos = JMASCos(angle); @@ -441,7 +441,7 @@ void rotTypeZ(f32 sin, f32 cos, Mtx& out) { /* 80261568-802615C4 .text rotTypeXYZ__FffRA3_A4_f */ void rotTypeXYZ(f32 sin, f32 cos, Mtx& out) { f32 a, b, c; - a = (1.0f - cos) * (1.0f / 3.0f); + a = (1.0f - cos) * 0.333333f; c = a + (0.57735f * sin); b = a - (0.57735f * sin); a = a + cos; diff --git a/src/d/actor/d_a_demo00.cpp b/src/d/actor/d_a_demo00.cpp index dbc9f7129..405651362 100644 --- a/src/d/actor/d_a_demo00.cpp +++ b/src/d/actor/d_a_demo00.cpp @@ -69,8 +69,8 @@ void daDemo00_c::setBaseMtx() { void daDemo00_c::setShadowSize() { J3DModelData* modelData = model.model->getModelData(); - cXyz min(1000000000.0f, 1000000000.0f, 1000000000.0f); - cXyz max(-1000000000.0f, -1000000000.0f, -1000000000.0f); + cXyz min(100000000.0f, 100000000.0f, 100000000.0f); + cXyz max(-100000000.0f, -100000000.0f, -100000000.0f); for (u16 i = 0; i < modelData->getJointNum(); i++) { J3DJoint* joint = modelData->getJointNodePointer(i); diff --git a/src/d/actor/d_a_player_fan.inc b/src/d/actor/d_a_player_fan.inc index 524e84583..3019f9b09 100644 --- a/src/d/actor/d_a_player_fan.inc +++ b/src/d/actor/d_a_player_fan.inc @@ -35,7 +35,7 @@ BOOL daPy_lk_c::fanJointCB(int param_0) { } mDoMtx_stack_c::revConcat(mpEquipItemModel->getAnmMtx(param_0)); mpEquipItemModel->setAnmMtx(1 * param_0, mDoMtx_stack_c::get()); - mDoMtx_stack_c::copy(j3dSys.mCurrentMtx); + mDoMtx_copy(mDoMtx_stack_c::get(), j3dSys.mCurrentMtx); return true; } @@ -62,7 +62,7 @@ BOOL daPy_lk_c::parachuteJointCB(int param_0) { } mDoMtx_stack_c::revConcat(mpEquipItemModel->getAnmMtx(param_0)); mpEquipItemModel->setAnmMtx(1 * param_0, mDoMtx_stack_c::get()); - mDoMtx_stack_c::copy(j3dSys.mCurrentMtx); + mDoMtx_copy(mDoMtx_stack_c::get(), j3dSys.mCurrentMtx); return true; } diff --git a/src/d/actor/d_a_pw.cpp b/src/d/actor/d_a_pw.cpp index e6c738eb8..b941743ec 100644 --- a/src/d/actor/d_a_pw.cpp +++ b/src/d/actor/d_a_pw.cpp @@ -55,11 +55,11 @@ static BOOL daPW_Draw(pw_class*) { void anm_init(pw_class* i_this, int bckFileIdx, f32 morf, u8 loopMode, f32 speed, int soundFileIdx) { i_this->mBckIdx = bckFileIdx; if (soundFileIdx >= 0) { - void* soundAnm = dComIfG_getObjectRes("AM", soundFileIdx); - J3DAnmTransform* bckAnm = (J3DAnmTransform*)dComIfG_getObjectRes("AM", bckFileIdx); + void* soundAnm = dComIfG_getObjectRes("PW", soundFileIdx); + J3DAnmTransform* bckAnm = (J3DAnmTransform*)dComIfG_getObjectRes("PW", bckFileIdx); i_this->mpMorf->setAnm(bckAnm, loopMode, morf, speed, 0.0f, -1.0f, soundAnm); } else { - J3DAnmTransform* bckAnm = (J3DAnmTransform*)dComIfG_getObjectRes("AM", bckFileIdx); + J3DAnmTransform* bckAnm = (J3DAnmTransform*)dComIfG_getObjectRes("PW", bckFileIdx); i_this->mpMorf->setAnm(bckAnm, loopMode, morf, speed, 0.0f, -1.0f, NULL); } } diff --git a/src/d/d_cam_param.cpp b/src/d/d_cam_param.cpp index 4929fa350..72cd83374 100644 --- a/src/d/d_cam_param.cpp +++ b/src/d/d_cam_param.cpp @@ -15,8 +15,7 @@ f32 dCamMath::rationalBezierRatio(f32 x, f32 y) { /* 800AF4F4-800AF544 .text customRBRatio__8dCamMathFff */ f32 dCamMath::customRBRatio(f32 x, f32 y) { - /* Nonmatching */ - if (x > 0.7071068f) { + if (x > 0.70710677f) { if (x < 0.0f) { return -1.0f; } else { @@ -24,7 +23,7 @@ f32 dCamMath::customRBRatio(f32 x, f32 y) { } } - return rationalBezierRatio(x * 1.414214f, y); + return rationalBezierRatio(x * 1.4142135f, y); } /* 800AF544-800AF5A0 .text zoomFovy__8dCamMathFff */ diff --git a/src/d/d_kankyo_rain.cpp b/src/d/d_kankyo_rain.cpp index ca4414e69..82a7e16f1 100644 --- a/src/d/d_kankyo_rain.cpp +++ b/src/d/d_kankyo_rain.cpp @@ -559,7 +559,7 @@ void dKyr_sun_move() { pSunPkt->field_0x3c--; pSunPkt->field_0x3d = false; - if (dKy_getEnvlight().mCurTime > 95.7f && dKy_getEnvlight().mCurTime < 292.5f) { + if (dKy_getEnvlight().mCurTime > 97.5f && dKy_getEnvlight().mCurTime < 292.5f) { f32 borderY = 0.0f; s32 numPointsCulled = 0; @@ -658,9 +658,9 @@ void dKyr_sun_move() { cLib_addCalc(&pSunPkt->mVisibility, 1.0f, 0.5f, 0.2f, 0.01f); } else { if (numPointsVisible < 3) - cLib_addCalc(&pSunPkt->mVisibility, 0.0f, 0.5f, 0.2f, 0.01f); + cLib_addCalc(&pSunPkt->mVisibility, 0.0f, 0.5f, 0.2f, 0.001f); else - cLib_addCalc(&pSunPkt->mVisibility, 1.0f, 0.1f, 0.1f, 0.01f); + cLib_addCalc(&pSunPkt->mVisibility, 1.0f, 0.1f, 0.1f, 0.001f); } if (numPointsVisible >= 2) { @@ -2361,7 +2361,7 @@ void drawCloudShadow(Mtx drawMtx, u8** pImg) { for (s32 i = 0; i < pPkt->mCount; i++) { f32 size = pPkt->mEff[i].mSize; - if (pPkt->mEff[i].mAlpha <= 0.0f) + if (pPkt->mEff[i].mAlpha <= 0.000001f) continue; GXLoadTexObj(&texObj, GX_TEXMAP0); diff --git a/src/d/d_s_open_sub.cpp b/src/d/d_s_open_sub.cpp index bddc85cb2..fc05d3b59 100644 --- a/src/d/d_s_open_sub.cpp +++ b/src/d/d_s_open_sub.cpp @@ -261,7 +261,7 @@ void dScnOpen_proc_c::proc_execute() { mAlpha = 0.0f; mState = 23; case 23: - mPosX -= 0.4748201f; + mPosX -= 0.47482014f; mAlpha += 0.067f; if (mAlpha >= 1.0f) { mAlpha = 1.0f; @@ -277,7 +277,7 @@ void dScnOpen_proc_c::proc_execute() { fopMsgM_setNowAlpha(&pane[4], 1.0f); mState = 25; case 25: - mPosX -= 0.4748201f; + mPosX -= 0.47482014f; if (m_message->field_0x22e8 != 0) mState = 26; fopMsgM_paneTrans(&pane[3], mPosX, 0.0f); @@ -289,7 +289,7 @@ void dScnOpen_proc_c::proc_execute() { mAlpha = 0.0f; mState = 27; case 27: - mPosX -= 0.4748201f; + mPosX -= 0.47482014f; mAlpha += 0.0223f; if (mAlpha >= 1.0f) { mAlpha = 1.0f; diff --git a/src/dolphin/os/__start.c b/src/dolphin/os/__start.c index 3831936a5..f246cd2ce 100644 --- a/src/dolphin/os/__start.c +++ b/src/dolphin/os/__start.c @@ -4,6 +4,7 @@ #include "dolphin/os/__start.h" void DBInit(); +static void __init_registers(void); SECTION_INIT void __check_pad3(void) { if ((*(u16*)0x800030E4 & 0xEEF) == 0xEEF) { diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp index 18e932cdc..b6b1b4291 100644 --- a/src/f_op/f_op_msg_mng.cpp +++ b/src/f_op/f_op_msg_mng.cpp @@ -1667,8 +1667,8 @@ void fopMsgM_arrowAnime(J2DPicture* param_1, s16* param_2) { black.a = 0x0; u8 alpha = 0; - static GXColor color1 = {0xFF, 0x50, 0x50, 0x00}; - static GXColor color2 = {0xFF, 0x96, 0x96, 0x00}; + static const GXColor color1 = {0xFF, 0x50, 0x50, 0x00}; + static const GXColor color2 = {0xFF, 0x96, 0x96, 0x00}; if(*param_2 < 0x16) { float temp = fopMsgM_valueIncrease(0x16, *param_2, 2);