mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-06 13:11:05 -04:00
Fix relocation and data value mismatches
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user