mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-02 17:53:02 -04:00
Misc FAKE fixes (#1783)
* CutsceneCamera_UpdateSplines fake match * CutsceneCamera_Init -1 splineIndex * Eye Point comment * func_80B781DC better fake * func_80B32F04 * ObjSwitch_Update * ObjSwitch_InitTrisCollider * ObjAqua_Init * EnTrt_ItemGiven * func_80C10E98 partly * EnTest7_WarpCsWarp this to 1 * EnTest6_InvertedSoTCutscene better fake * EnTest6_DrawAmmoDropRupee * EnPoSisters_MatchPlayerY * func_8095B76C * EnMinifrog_Init * func_80A5C0B8 * EnKnight_UpdateEffects * EnKnight_FlyingHeadAttack * EnKakasi_Init * EnInvadepoh_ModelInfo_GetNextFaceAnim * BgAstrBombwall_InitCollider like func_809CE068 * Player_UpdateInterface * Player_CsAction_TranslateReverse * DynaPoly_AddBgActorToLookup better fake * CutsceneManager_FindEntranceCsId * func_800AE930 better fake * Math3D_CylVsLineSeg better fake * MapDisp_InitBossRoomStorey * Play_Init * EnTimeTag_Diary_Wait better fake * Remove fake label from Player_SwordFromIA * Player_PostLimbDrawGameplay partly * EffectBlure_AddVertex prev temp * Player_PostLimbDrawGameplay attempt 2 * AudioMgr_StopAllSfxExceptSystem * Camera_Normal0 * Camera_Jump2 * Camera_Normal3 * PR review
This commit is contained in:
@@ -5,11 +5,17 @@ const u8 sSfxBankIds[] = {
|
||||
};
|
||||
|
||||
void AudioMgr_StopAllSfxExceptSystem(void) {
|
||||
volatile const u8* bankIdPtr;
|
||||
const u8* bankIdPtr;
|
||||
s32 dbgVar;
|
||||
|
||||
for (bankIdPtr = sSfxBankIds; bankIdPtr < (sSfxBankIds + ARRAY_COUNT(sSfxBankIds)); bankIdPtr++) {
|
||||
if (*bankIdPtr != BANK_SYSTEM) {
|
||||
AudioSfx_StopByBank(*bankIdPtr);
|
||||
// Remnant of debug
|
||||
dbgVar = 0;
|
||||
|
||||
if (dbgVar != 2) {
|
||||
for (bankIdPtr = &sSfxBankIds[0]; bankIdPtr < (sSfxBankIds + ARRAY_COUNT(sSfxBankIds)); bankIdPtr++) {
|
||||
if ((dbgVar != 0) || (*bankIdPtr != BANK_SYSTEM)) {
|
||||
AudioSfx_StopByBank(*bankIdPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ s32 CutsceneCamera_Init(Camera* camera, CutsceneCamera* csCamera) {
|
||||
|
||||
csCamera->nextSplineTimer = csCamera->updateSplineTimer = 0;
|
||||
csCamera->cmdIndex = 0;
|
||||
csCamera->splineIndex = 0xFFFF;
|
||||
csCamera->splineIndex = -1;
|
||||
csCamera->splineNeedsInit = true;
|
||||
csCamera->state = CS_CAM_STATE_UPDATE_ALL;
|
||||
|
||||
@@ -298,7 +298,7 @@ s32 CutsceneCamera_UpdateSplines(u8* script, CutsceneCamera* csCamera) {
|
||||
csCamera->atCmd = (CsCmdCamPoint*)&script[csCamera->cmdIndex];
|
||||
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamPoint));
|
||||
|
||||
// Misc Point
|
||||
// Eye Point
|
||||
csCamera->eyeCmd = (CsCmdCamPoint*)&script[csCamera->cmdIndex];
|
||||
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamPoint));
|
||||
|
||||
@@ -307,12 +307,10 @@ s32 CutsceneCamera_UpdateSplines(u8* script, CutsceneCamera* csCamera) {
|
||||
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamMisc));
|
||||
|
||||
// Other Params
|
||||
csCamera->eyeInterp.curPoint = 0;
|
||||
csCamera->atInterp.curPoint = 0;
|
||||
csCamera->eyeInterp.curPoint = csCamera->atInterp.curPoint = 0;
|
||||
|
||||
csCamera->splineNeedsInit = false;
|
||||
//! FAKE: csCamera->splineIndex++;
|
||||
csCamera->splineIndex = (csCamera->splineIndex & 0xFFFF) + 1;
|
||||
csCamera->splineIndex++;
|
||||
csCamera->state = CS_CAM_STATE_UPDATE_ALL;
|
||||
csCamera->nextSplineTimer = csCamera->updateSplineTimer = 0;
|
||||
csCamera->eyeInterp.type = csCamera->atInterp.type = CS_CAM_INTERP_OFF;
|
||||
|
||||
@@ -1900,12 +1900,12 @@ s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, V
|
||||
fracA = 0.0f;
|
||||
fracB = 0.0f;
|
||||
|
||||
//! FAKE:
|
||||
dummy:;
|
||||
|
||||
zero = 0.0f;
|
||||
intFlags = 0;
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
if (Math3D_PointInCyl(cyl, linePointA) && Math3D_PointInCyl(cyl, linePointB)) {
|
||||
// both points are in the cylinder
|
||||
*intersectA = *linePointA;
|
||||
|
||||
+1
-1
@@ -2323,7 +2323,7 @@ s32 Actor_HasNoRider(PlayState* play, Actor* horse) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_800B8D10(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
|
||||
void func_800B8D10(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, s32 arg5, u32 arg6) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->unk_B74 = arg6;
|
||||
|
||||
@@ -2873,7 +2873,7 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
|
||||
pos.y += actor->shape.yOffset * actor->scale.y;
|
||||
|
||||
//! FAKE:
|
||||
if (pbgdata && pbgdata) {}
|
||||
if (1) {}
|
||||
|
||||
ScaleRotPos_SetValue(&dyna->bgActors[bgId].curTransform, &actor->scale, &actor->shape.rot, &pos);
|
||||
|
||||
|
||||
+92
-107
@@ -2318,11 +2318,11 @@ s32 Camera_Normal2(Camera* camera) {
|
||||
* Riding Epona and Zora
|
||||
*/
|
||||
s32 Camera_Normal3(Camera* camera) {
|
||||
Normal3ReadOnlyData* roData = &camera->paramData.norm3.roData;
|
||||
Normal3ReadWriteData* rwData = &camera->paramData.norm3.rwData;
|
||||
f32 sp8C;
|
||||
Vec3f* eye = &camera->eye;
|
||||
Vec3f* at = &camera->at;
|
||||
f32 sp94;
|
||||
f32 sp90;
|
||||
f32 temp_f2; // multi-use temp
|
||||
f32 temp_f2;
|
||||
f32 sp88;
|
||||
VecGeo sp80;
|
||||
VecGeo sp78;
|
||||
@@ -2332,10 +2332,10 @@ s32 Camera_Normal3(Camera* camera) {
|
||||
s16 sp62;
|
||||
s16 phi_v1_2;
|
||||
Player* player = (Player*)camera->focalActor;
|
||||
Vec3f* eye = &camera->eye;
|
||||
Vec3f* at = &camera->at;
|
||||
Vec3f* eyeNext = &camera->eyeNext;
|
||||
PosRot* focalActorPosRot = &camera->focalActorPosRot;
|
||||
Normal3ReadOnlyData* roData = &camera->paramData.norm3.roData;
|
||||
Normal3ReadWriteData* rwData = &camera->paramData.norm3.rwData;
|
||||
|
||||
temp_f2 = Camera_GetFocalActorHeight(camera);
|
||||
|
||||
@@ -2347,11 +2347,9 @@ s32 Camera_Normal3(Camera* camera) {
|
||||
if (RELOAD_PARAMS(camera)) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
|
||||
temp_f2 = CAM_RODATA_UNSCALE(temp_f2);
|
||||
|
||||
roData->yOffset = GET_NEXT_RO_DATA(values) * temp_f2;
|
||||
roData->distMin = GET_NEXT_RO_DATA(values) * temp_f2;
|
||||
roData->distMax = GET_NEXT_RO_DATA(values) * temp_f2;
|
||||
roData->yOffset = GET_NEXT_RO_DATA(values) * CAM_RODATA_UNSCALE(temp_f2);
|
||||
roData->distMin = GET_NEXT_RO_DATA(values) * CAM_RODATA_UNSCALE(temp_f2);
|
||||
roData->distMax = GET_NEXT_RO_DATA(values) * CAM_RODATA_UNSCALE(temp_f2);
|
||||
roData->pitchTarget = CAM_DEG_TO_BINANG(GET_NEXT_RO_DATA(values));
|
||||
roData->yawUpdateRateInv = GET_NEXT_RO_DATA(values);
|
||||
roData->pitchUpdateRateInv = GET_NEXT_RO_DATA(values);
|
||||
@@ -2365,30 +2363,34 @@ s32 Camera_Normal3(Camera* camera) {
|
||||
sUpdateCameraDirection = true;
|
||||
sCameraInterfaceFlags = roData->interfaceFlags;
|
||||
|
||||
//! FAKE: fake temp
|
||||
phi_v1_2 = camera->animState;
|
||||
if (!((phi_v1_2 == 0) || (phi_v1_2 == 10) || (phi_v1_2 == 20))) {
|
||||
} else {
|
||||
rwData->isZero = 0;
|
||||
rwData->curPitch = 0;
|
||||
rwData->yPosOffset = camera->focalActorFloorHeight;
|
||||
switch (camera->animState) {
|
||||
case 0:
|
||||
case 10:
|
||||
case 20:
|
||||
rwData->isZero = 0;
|
||||
rwData->curPitch = 0;
|
||||
rwData->yPosOffset = camera->focalActorFloorHeight;
|
||||
|
||||
D_801EDC30[camera->camId].yaw = D_801EDC30[camera->camId].pitch = D_801EDC30[camera->camId].unk_64 = 0;
|
||||
D_801EDC30[camera->camId].swingUpdateRate = roData->yawUpdateRateInv;
|
||||
rwData->yawUpdateRate = BINANG_SUB(BINANG_ROT180(camera->focalActorPosRot.rot.y), sp70.yaw) * (1.0f / 6.0f);
|
||||
rwData->distTimer = 0;
|
||||
rwData->is1200 = 1200;
|
||||
D_801EDC30[camera->camId].yaw = D_801EDC30[camera->camId].pitch = D_801EDC30[camera->camId].unk_64 = 0;
|
||||
D_801EDC30[camera->camId].swingUpdateRate = roData->yawUpdateRateInv;
|
||||
rwData->yawUpdateRate = BINANG_SUB(BINANG_ROT180(camera->focalActorPosRot.rot.y), sp70.yaw) * (1.0f / 6.0f);
|
||||
rwData->distTimer = 0;
|
||||
rwData->is1200 = 1200;
|
||||
|
||||
if (roData->interfaceFlags & NORMAL3_FLAG_1) {
|
||||
rwData->yawTimer = 6;
|
||||
Camera_SetStateFlag(camera, CAM_STATE_DISABLE_MODE_CHANGE);
|
||||
} else {
|
||||
rwData->yawTimer = 0;
|
||||
}
|
||||
if (roData->interfaceFlags & NORMAL3_FLAG_1) {
|
||||
rwData->yawTimer = 6;
|
||||
Camera_SetStateFlag(camera, CAM_STATE_DISABLE_MODE_CHANGE);
|
||||
} else {
|
||||
rwData->yawTimer = 0;
|
||||
}
|
||||
|
||||
camera->animState = 1;
|
||||
D_801EDC30[camera->camId].timer = 0;
|
||||
rwData->flag = NORMAL3_RW_FLAG;
|
||||
camera->animState = 1;
|
||||
D_801EDC30[camera->camId].timer = 0;
|
||||
rwData->flag = NORMAL3_RW_FLAG;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (rwData->distTimer != 0) {
|
||||
@@ -2396,23 +2398,23 @@ s32 Camera_Normal3(Camera* camera) {
|
||||
}
|
||||
|
||||
sp90 = ((camera->speedRatio * 3.0f) + 1.0f) * 0.25f * 0.5f;
|
||||
sp8C = temp_f2 = camera->speedRatio * 0.2f;
|
||||
sp94 = temp_f2 = camera->speedRatio * 0.2f;
|
||||
|
||||
if (D_801EDC30[camera->camId].timer != 0) {
|
||||
camera->yawUpdateRateInv = Camera_ScaledStepToCeilF(
|
||||
(D_801EDC30[camera->camId].timer * 2) + roData->yawUpdateRateInv, camera->yawUpdateRateInv, sp90, 0.1f);
|
||||
camera->pitchUpdateRateInv = Camera_ScaledStepToCeilF((D_801EDC30[camera->camId].timer * 2) + 16.0f,
|
||||
camera->pitchUpdateRateInv, sp8C, 0.1f);
|
||||
camera->pitchUpdateRateInv, sp94, 0.1f);
|
||||
D_801EDC30[camera->camId].timer--;
|
||||
} else {
|
||||
camera->yawUpdateRateInv =
|
||||
Camera_ScaledStepToCeilF(roData->yawUpdateRateInv, camera->yawUpdateRateInv, sp90, 0.1f);
|
||||
camera->pitchUpdateRateInv = Camera_ScaledStepToCeilF(16.0f, camera->pitchUpdateRateInv, sp8C, 0.1f);
|
||||
camera->pitchUpdateRateInv = Camera_ScaledStepToCeilF(16.0f, camera->pitchUpdateRateInv, sp94, 0.1f);
|
||||
}
|
||||
|
||||
camera->yOffsetUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->yOffsetUpdateRate, sp90, 0.001f);
|
||||
camera->xzOffsetUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->xzOffsetUpdateRate, sp8C, 0.0001f);
|
||||
camera->fovUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->fovUpdateRate, sp8C, 0.0001f);
|
||||
camera->xzOffsetUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->xzOffsetUpdateRate, sp94, 0.0001f);
|
||||
camera->fovUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->fovUpdateRate, sp94, 0.0001f);
|
||||
|
||||
phi_v1_2 = Camera_GetPitchAdjFromFloorHeightDiffs(camera, BINANG_ROT180(sp70.yaw), rwData->flag & NORMAL3_RW_FLAG);
|
||||
temp_f2 = ((1.0f / roData->pitchUpdateRateInv) * 0.5f) * (1.0f - camera->speedRatio);
|
||||
@@ -2538,9 +2540,9 @@ s32 Camera_Normal0(Camera* camera) {
|
||||
s16 phi_a1;
|
||||
s16 phi_a0;
|
||||
BgCamFuncData* bgCamFuncData;
|
||||
f32 new_var;
|
||||
Normal0ReadOnlyData* roData = &camera->paramData.norm0.roData;
|
||||
Normal0ReadWriteData* rwData = &camera->paramData.norm0.rwData;
|
||||
s32 pad2;
|
||||
|
||||
if (!RELOAD_PARAMS(camera)) {
|
||||
} else {
|
||||
@@ -2559,46 +2561,50 @@ s32 Camera_Normal0(Camera* camera) {
|
||||
|
||||
sCameraInterfaceFlags = roData->interfaceFlags;
|
||||
|
||||
if (RELOAD_PARAMS(camera)) {
|
||||
bgCamFuncData = (BgCamFuncData*)Camera_GetBgCamOrActorCsCamFuncData(camera, camera->bgCamIndex);
|
||||
rwData->unk_00 = Camera_Vec3sToVec3f(&bgCamFuncData->pos);
|
||||
rwData->unk_20 = bgCamFuncData->rot.x;
|
||||
rwData->unk_22 = bgCamFuncData->rot.y;
|
||||
rwData->unk_24 = focalActorPosRot->pos.y;
|
||||
if (bgCamFuncData->fov == -1) {
|
||||
rwData->unk_1C = roData->unk_14;
|
||||
} else {
|
||||
if (bgCamFuncData->fov > 360) {
|
||||
phi_f0 = CAM_RODATA_UNSCALE(bgCamFuncData->fov);
|
||||
} else {
|
||||
phi_f0 = bgCamFuncData->fov;
|
||||
}
|
||||
rwData->unk_1C = phi_f0;
|
||||
}
|
||||
|
||||
if (bgCamFuncData->unk_0E == -1) {
|
||||
rwData->unk_2C = 0;
|
||||
} else {
|
||||
rwData->unk_2C = bgCamFuncData->unk_0E;
|
||||
}
|
||||
|
||||
rwData->unk_18 = 0.0f;
|
||||
rwData->unk_28 = 120.0f;
|
||||
|
||||
if (roData->interfaceFlags & NORMAL0_FLAG_2) {
|
||||
sp88.pitch = rwData->unk_20;
|
||||
sp88.yaw = rwData->unk_22;
|
||||
sp88.r = 100.0f;
|
||||
rwData->unk_0C = OLib_VecGeoToVec3f(&sp88);
|
||||
}
|
||||
camera->animState = 1;
|
||||
camera->yawUpdateRateInv = 50.0f;
|
||||
} else {
|
||||
if (func_800CB950(camera)) {
|
||||
switch (camera->animState) {
|
||||
case 0:
|
||||
case 10:
|
||||
case 20:
|
||||
bgCamFuncData = (BgCamFuncData*)Camera_GetBgCamOrActorCsCamFuncData(camera, camera->bgCamIndex);
|
||||
rwData->unk_00 = Camera_Vec3sToVec3f(&bgCamFuncData->pos);
|
||||
rwData->unk_20 = bgCamFuncData->rot.x;
|
||||
rwData->unk_22 = bgCamFuncData->rot.y;
|
||||
rwData->unk_24 = focalActorPosRot->pos.y;
|
||||
}
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
if (bgCamFuncData->fov == -1) {
|
||||
rwData->unk_1C = roData->unk_14;
|
||||
} else {
|
||||
if (bgCamFuncData->fov > 360) {
|
||||
phi_f0 = CAM_RODATA_UNSCALE(bgCamFuncData->fov);
|
||||
} else {
|
||||
phi_f0 = bgCamFuncData->fov;
|
||||
}
|
||||
rwData->unk_1C = phi_f0;
|
||||
}
|
||||
|
||||
if (bgCamFuncData->unk_0E == -1) {
|
||||
rwData->unk_2C = 0;
|
||||
} else {
|
||||
rwData->unk_2C = bgCamFuncData->unk_0E;
|
||||
}
|
||||
|
||||
rwData->unk_18 = 0.0f;
|
||||
rwData->unk_28 = 120.0f;
|
||||
|
||||
if (roData->interfaceFlags & NORMAL0_FLAG_2) {
|
||||
sp88.pitch = rwData->unk_20;
|
||||
sp88.yaw = rwData->unk_22;
|
||||
sp88.r = 100.0f;
|
||||
rwData->unk_0C = OLib_VecGeoToVec3f(&sp88);
|
||||
}
|
||||
camera->animState = 1;
|
||||
camera->yawUpdateRateInv = 50.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (func_800CB950(camera)) {
|
||||
rwData->unk_24 = focalActorPosRot->pos.y;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
sp80 = OLib_Vec3fDiffToVecGeo(at, eye);
|
||||
@@ -2634,32 +2640,13 @@ s32 Camera_Normal0(Camera* camera) {
|
||||
sp88 = OLib_Vec3fDiffToVecGeo(&rwData->unk_00, at);
|
||||
sp90 = OLib_Vec3fDiffToVecGeo(at, eyeNext);
|
||||
|
||||
if (rwData->unk_2C & 2) {
|
||||
phi_a1 = rwData->unk_22;
|
||||
} else {
|
||||
phi_a1 = roData->unk_1C;
|
||||
}
|
||||
|
||||
temp_v1_2 = sp90.yaw - sp88.yaw;
|
||||
if (((phi_a1 <= 0x4000) && (phi_a1 < ABS(temp_v1_2))) || ((phi_a1 > 0x4000) && (ABS(temp_v1_2) < phi_a1))) {
|
||||
//! FAKE: Needed to swap v0/v1
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
|
||||
//! FAKE: Needed because the *1.0f isn't being multiplied
|
||||
new_var = 1.0f;
|
||||
|
||||
if (temp_v1_2 < 0) {
|
||||
phi_a0 = -phi_a1;
|
||||
} else {
|
||||
phi_a0 = phi_a1;
|
||||
}
|
||||
|
||||
phi_a1 = (rwData->unk_2C & 2) ? rwData->unk_22 : roData->unk_1C;
|
||||
phi_a0 = sp90.yaw - sp88.yaw;
|
||||
if (((phi_a1 <= 0x4000) && (phi_a1 < ABS(phi_a0))) || ((phi_a1 > 0x4000) && (ABS(phi_a0) < phi_a1))) {
|
||||
phi_a0 = (phi_a0 < 0) ? -phi_a1 : phi_a1;
|
||||
phi_a0 += sp88.yaw;
|
||||
sp98.yaw = Camera_ScaledStepToCeilS(phi_a0, sp80.yaw,
|
||||
(1.0f / camera->yawUpdateRateInv) * new_var * camera->speedRatio, 5);
|
||||
sp98.yaw =
|
||||
Camera_ScaledStepToCeilS(phi_a0, sp80.yaw, (1 / camera->yawUpdateRateInv) * 1 * camera->speedRatio, 5);
|
||||
if (rwData->unk_2C & 1) {
|
||||
sp98.pitch = Camera_CalcDefaultPitch(camera, sp78.pitch, rwData->unk_20, 0);
|
||||
} else {
|
||||
@@ -3085,7 +3072,7 @@ s32 Camera_Jump2(Camera* camera) {
|
||||
VecGeo sp9C;
|
||||
s16 temp_t2;
|
||||
s16 yawDiff;
|
||||
s32 pad;
|
||||
f32 tmp;
|
||||
f32 sp90;
|
||||
f32 sp8C;
|
||||
s32 sp88;
|
||||
@@ -3170,11 +3157,9 @@ s32 Camera_Jump2(Camera* camera) {
|
||||
Camera_CalcAtDefault(camera, &spA4, roData->unk_00, 0);
|
||||
spB4 = OLib_Vec3fDiffToVecGeo(at, eye);
|
||||
|
||||
//! FAKE: Unused
|
||||
yNormal = roData->unk_04;
|
||||
|
||||
tmp = roData->unk_04;
|
||||
phi_f2 = roData->unk_08 + (roData->unk_08 * roData->unk_0C);
|
||||
temp_f16 = roData->unk_04 - (roData->unk_04 * roData->unk_0C);
|
||||
temp_f16 = tmp - (roData->unk_04 * roData->unk_0C);
|
||||
|
||||
if (spB4.r > phi_f2) {
|
||||
spB4.r = phi_f2;
|
||||
|
||||
@@ -43,10 +43,11 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
||||
MtxF sp50;
|
||||
Vec3f sp44;
|
||||
Vec3f sp38;
|
||||
EffectBlureElement* prev = elem - 1;
|
||||
|
||||
sp16C.x = ((f32)(elem - 1)->p2.x + (f32)(elem - 1)->p1.x) / 2.0f;
|
||||
sp16C.y = ((f32)(elem - 1)->p2.y + (f32)(elem - 1)->p1.y) / 2.0f;
|
||||
sp16C.z = ((f32)(elem - 1)->p2.z + (f32)(elem - 1)->p1.z) / 2.0f;
|
||||
sp16C.x = ((f32)prev->p2.x + (f32)prev->p1.x) / 2.0f;
|
||||
sp16C.y = ((f32)prev->p2.y + (f32)prev->p1.y) / 2.0f;
|
||||
sp16C.z = ((f32)prev->p2.z + (f32)prev->p1.z) / 2.0f;
|
||||
sp160.x = (p1->x + p2->x) / 2.0f;
|
||||
sp160.y = (p1->y + p2->y) / 2.0f;
|
||||
sp160.z = (p1->z + p2->z) / 2.0f;
|
||||
|
||||
@@ -74,6 +74,10 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
||||
spA8->p2.y = sp78.y;
|
||||
spA8->p2.z = sp78.z;
|
||||
spA8->life = this->elemDuration;
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
spA8->colPoly = NULL;
|
||||
this->numElements++;
|
||||
|
||||
@@ -82,9 +86,6 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
||||
spAC->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_1;
|
||||
}
|
||||
|
||||
//! FAKE:
|
||||
if (spA8) {}
|
||||
|
||||
spA8 = &this->elements[this->numElements];
|
||||
spA8->flags = 0;
|
||||
spA8->p1 = spB0;
|
||||
|
||||
@@ -518,12 +518,14 @@ s16 CutsceneManager_FindEntranceCsId(void) {
|
||||
s32 csId;
|
||||
|
||||
for (csId = 0; csId < sSceneCutsceneCount; csId++) {
|
||||
//! FAKE:
|
||||
if ((sSceneCutsceneList[csId].scriptIndex != CS_SCRIPT_ID_NONE) &&
|
||||
(sSceneCutsceneList[csId].scriptIndex < (play = sCutsceneMgr.play)->csCtx.scriptListCount) &&
|
||||
(sCutsceneMgr.play->curSpawn ==
|
||||
sCutsceneMgr.play->csCtx.scriptList[sSceneCutsceneList[csId].scriptIndex].spawn)) {
|
||||
return csId;
|
||||
if (sSceneCutsceneList[csId].scriptIndex != CS_SCRIPT_ID_NONE) {
|
||||
PlayState* play = sCutsceneMgr.play;
|
||||
|
||||
if ((sSceneCutsceneList[csId].scriptIndex < play->csCtx.scriptListCount) &&
|
||||
(sCutsceneMgr.play->curSpawn ==
|
||||
sCutsceneMgr.play->csCtx.scriptList[sSceneCutsceneList[csId].scriptIndex].spawn)) {
|
||||
return csId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-10
@@ -659,17 +659,14 @@ void MapDisp_InitBossRoomStorey(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < transitionActors->count; i++) {
|
||||
if (MapDisp_IsBossDoor(sTransitionActors[i].params)) {
|
||||
if (ABS_ALT(sTransitionActors[i].id) != ACTOR_EN_HOLL) {
|
||||
for (storey = 0; storey < sMapDisp.numStoreys; storey++) {
|
||||
//! FAKE: needed for matching
|
||||
s32 temp = (sMapDisp.storeyYList[storey] - 5);
|
||||
TransitionActorEntry* entry = &sTransitionActors[i];
|
||||
|
||||
if (((storey == sMapDisp.numStoreys - 1) &&
|
||||
(sTransitionActors[i].pos.y >= (sMapDisp.storeyYList[storey] - 5))) ||
|
||||
((storey != sMapDisp.numStoreys - 1) &&
|
||||
(sTransitionActors[i].pos.y >= (sMapDisp.storeyYList[storey] - 5)) &&
|
||||
(sTransitionActors[i].pos.y < (sMapDisp.storeyYList[storey + 1] - 5)))) {
|
||||
if (MapDisp_IsBossDoor(entry->params)) {
|
||||
if (ABS_ALT(entry->id) != ACTOR_EN_HOLL) {
|
||||
for (storey = 0; storey < sMapDisp.numStoreys; storey++) {
|
||||
if (((storey == sMapDisp.numStoreys - 1) && (entry->pos.y >= (sMapDisp.storeyYList[storey] - 5))) ||
|
||||
((storey != sMapDisp.numStoreys - 1) && (entry->pos.y >= (sMapDisp.storeyYList[storey] - 5)) &&
|
||||
(entry->pos.y < (sMapDisp.storeyYList[storey + 1] - 5)))) {
|
||||
sMapDisp.bossRoomStorey = storey;
|
||||
return;
|
||||
}
|
||||
|
||||
+4
-6
@@ -2076,9 +2076,9 @@ void Play_Init(GameState* thisx) {
|
||||
s32 zAllocSize;
|
||||
Player* player;
|
||||
s32 i;
|
||||
s32 spawn;
|
||||
u8 sceneLayer;
|
||||
s32 scene;
|
||||
u8 sceneLayer;
|
||||
s32 pad2;
|
||||
|
||||
if ((gSaveContext.respawnFlag == -4) || (gSaveContext.respawnFlag == -0x63)) {
|
||||
if (CHECK_EVENTINF(EVENTINF_TRIGGER_DAYTELOP)) {
|
||||
@@ -2105,7 +2105,6 @@ void Play_Init(GameState* thisx) {
|
||||
|
||||
if ((gSaveContext.nextCutsceneIndex == 0xFFEF) || (gSaveContext.nextCutsceneIndex == 0xFFF0)) {
|
||||
scene = ((void)0, gSaveContext.save.entrance) >> 9;
|
||||
spawn = (((void)0, gSaveContext.save.entrance) >> 4) & 0x1F;
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE)) {
|
||||
if (scene == ENTR_SCENE_MOUNTAIN_VILLAGE_WINTER) {
|
||||
@@ -2145,9 +2144,8 @@ void Play_Init(GameState* thisx) {
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF4;
|
||||
}
|
||||
}
|
||||
//! FAKE:
|
||||
gSaveContext.save.entrance =
|
||||
Entrance_Create(((void)0, scene), spawn, ((void)0, gSaveContext.save.entrance) & 0xF);
|
||||
gSaveContext.save.entrance = Entrance_Create(scene, (((void)0, gSaveContext.save.entrance) >> 4) & 0x1F,
|
||||
((void)0, gSaveContext.save.entrance) & 0xF);
|
||||
}
|
||||
|
||||
GameState_Realloc(&this->state, 0);
|
||||
|
||||
+10
-11
@@ -1698,9 +1698,8 @@ PlayerExplosive Player_GetExplosiveHeld(Player* player) {
|
||||
PlayerSword Player_SwordFromIA(Player* player, PlayerItemAction itemAction) {
|
||||
PlayerSword sword = PLAYER_SWORD_KOKIRI;
|
||||
|
||||
//! FAKE:
|
||||
if ((itemAction == PLAYER_IA_LAST_USED) ||
|
||||
((sword = GET_SWORD_FROM_IA(itemAction), (sword > PLAYER_SWORD_NONE)) && (sword < PLAYER_SWORD_MAX))) {
|
||||
(sword = GET_SWORD_FROM_IA(itemAction), ((sword > PLAYER_SWORD_NONE) && (sword < PLAYER_SWORD_MAX)))) {
|
||||
return sword;
|
||||
}
|
||||
|
||||
@@ -3817,29 +3816,28 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
}
|
||||
}
|
||||
} else if (limbIndex == PLAYER_LIMB_HEAD) {
|
||||
//! FAKE:
|
||||
if (((*dList1 != NULL) && ((((void)0, player->currentMask)) != (((void)0, PLAYER_MASK_NONE)))) &&
|
||||
if (((*dList1 != NULL) && ((u32)player->currentMask != PLAYER_MASK_NONE)) &&
|
||||
(((player->transformation == PLAYER_FORM_HUMAN) &&
|
||||
((player->skelAnime.animation != &gPlayerAnim_cl_setmask) || (player->skelAnime.curFrame >= 12.0f))) ||
|
||||
((((player->transformation != PLAYER_FORM_HUMAN) && (player->currentMask >= PLAYER_MASK_FIERCE_DEITY)) &&
|
||||
((player->transformation + PLAYER_MASK_FIERCE_DEITY) != player->currentMask)) &&
|
||||
(player->skelAnime.curFrame >= 10.0f)))) {
|
||||
if (func_80127438(play, player, player->currentMask)) {
|
||||
s32 maskMinusOne = ((void)0, player->currentMask) - 1;
|
||||
s32 maskMinusOne = player->currentMask - 1;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (((void)0, player->currentMask) == PLAYER_MASK_COUPLE) {
|
||||
if (player->currentMask == PLAYER_MASK_COUPLE) {
|
||||
Player_DrawCouplesMask(play, player);
|
||||
} else if (((void)0, player->currentMask) == PLAYER_MASK_CIRCUS_LEADER) {
|
||||
} else if (player->currentMask == PLAYER_MASK_CIRCUS_LEADER) {
|
||||
Player_DrawCircusLeadersMask(play, player);
|
||||
} else if (((void)0, player->currentMask) == PLAYER_MASK_BLAST) {
|
||||
} else if (player->currentMask == PLAYER_MASK_BLAST) {
|
||||
Player_DrawBlastMask(play, player);
|
||||
} else if (((void)0, player->currentMask) == PLAYER_MASK_BUNNY) {
|
||||
} else if (player->currentMask == PLAYER_MASK_BUNNY) {
|
||||
Player_DrawBunnyHood(play);
|
||||
} else if (((void)0, player->currentMask) == PLAYER_MASK_GREAT_FAIRY) {
|
||||
} else if (player->currentMask == PLAYER_MASK_GREAT_FAIRY) {
|
||||
Player_DrawGreatFairysMask(play, player);
|
||||
} else if (((void)0, player->currentMask) >= PLAYER_MASK_FIERCE_DEITY) {
|
||||
} else if (player->currentMask >= PLAYER_MASK_FIERCE_DEITY) {
|
||||
static Vec2f D_801C0E04[PLAYER_FORM_MAX] = {
|
||||
{ 140.0f, -130.0f }, // PLAYER_FORM_FIERCE_DEITY
|
||||
{ 0.0f, -200.0f }, // PLAYER_FORM_GORON
|
||||
@@ -4013,6 +4011,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
} else if ((limbIndex == PLAYER_LIMB_HAT) && (player->stateFlags3 & PLAYER_STATE3_100000)) {
|
||||
Vec3f sp5C;
|
||||
Vec3f sp50;
|
||||
s32 pad;
|
||||
|
||||
Matrix_MultVecX(3000.0f, &sp5C);
|
||||
Matrix_MultVecX(2300.0f, &sp50);
|
||||
|
||||
Reference in New Issue
Block a user