mirror of https://github.com/zeldaret/mm.git
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:
parent
1241a8ca5c
commit
4780abbfd8
|
@ -1371,7 +1371,7 @@ s32 Player_IsFacingActor(Actor* actor, s16 maxAngleDiff, struct PlayState* play)
|
|||
|
||||
PlayerItemAction Player_GetExchangeItemAction(struct PlayState* play);
|
||||
|
||||
void func_800B8D10(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
|
||||
void func_800B8D10(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, s32 arg5, u32 arg6);
|
||||
void func_800B8D50(struct PlayState* play, Actor* actor, f32 arg2, s16 yaw, f32 arg4, u32 arg5);
|
||||
void func_800B8D98(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
|
||||
void func_800B8DD4(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
|
||||
|
|
|
@ -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) {
|
||||
// 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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,10 +2363,10 @@ 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 {
|
||||
switch (camera->animState) {
|
||||
case 0:
|
||||
case 10:
|
||||
case 20:
|
||||
rwData->isZero = 0;
|
||||
rwData->curPitch = 0;
|
||||
rwData->yPosOffset = camera->focalActorFloorHeight;
|
||||
|
@ -2389,6 +2387,10 @@ s32 Camera_Normal3(Camera* camera) {
|
|||
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,7 +2561,10 @@ s32 Camera_Normal0(Camera* camera) {
|
|||
|
||||
sCameraInterfaceFlags = roData->interfaceFlags;
|
||||
|
||||
if (RELOAD_PARAMS(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;
|
||||
|
@ -2593,12 +2598,13 @@ s32 Camera_Normal0(Camera* camera) {
|
|||
}
|
||||
camera->animState = 1;
|
||||
camera->yawUpdateRateInv = 50.0f;
|
||||
} else {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (func_800CB950(camera)) {
|
||||
rwData->unk_24 = focalActorPosRot->pos.y;
|
||||
}
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
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,14 +518,16 @@ 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) &&
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (csId = 0; csId < sSceneCutsceneCount; csId++) {
|
||||
if ((sSceneCutsceneList[csId].customValue >= 100) &&
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -86,9 +86,7 @@ void BgAstrBombwall_InitCollider(ColliderTrisInit* init, Vec3f* pos, Vec3s* rot,
|
|||
|
||||
for (i = 0; i < init->count; i++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
//! FAKE:
|
||||
// https://decomp.me/scratch/JrEnl
|
||||
Matrix_MultVec3f(&(init->elements + i)->dim.vtx[j], &sp54[j]);
|
||||
Matrix_MultVec3f(init->elements[i].dim.vtx + j, &sp54[j]);
|
||||
Math_Vec3f_Sum(&sp54[j], pos, &sp54[j]);
|
||||
}
|
||||
Collider_SetTrisVertices(collider, i, &sp54[0], &sp54[1], &sp54[2]);
|
||||
|
|
|
@ -1684,8 +1684,8 @@ s8 EnInvadepoh_ModelInfo_GetNextFaceAnim(EnInvadepohFaceAnimNext* nextAnims, s32
|
|||
}
|
||||
}
|
||||
|
||||
//! FAKE:
|
||||
return (nextAnims + nextIndex)->index;
|
||||
nextAnim = &nextAnims[nextIndex];
|
||||
return nextAnim->index;
|
||||
}
|
||||
|
||||
void EnInvadepoh_ModelInfo_SetNextFaceAnim(EnInvadepohFaceAnimInfo* faceInfo, EnInvadepohFaceAnimBase* faceAnim) {
|
||||
|
|
|
@ -188,8 +188,10 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) {
|
|||
i = 0;
|
||||
csId = this->picto.actor.csId;
|
||||
while (csId != CS_ID_NONE) {
|
||||
//! FAKE:
|
||||
csId = CutsceneManager_GetAdditionalCsId(this->csIdList[i] = csId);
|
||||
// clang-format off
|
||||
this->csIdList[i] = csId; \
|
||||
csId = CutsceneManager_GetAdditionalCsId(csId);
|
||||
// clang-format on
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
@ -3465,27 +3465,11 @@ void EnKnight_FlyingHeadAttack(EnKnight* this, PlayState* play) {
|
|||
if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_B)) {
|
||||
|
||||
if (1) {} //! FAKE:
|
||||
if (this->timers[0] != 0) {
|
||||
this->timers[0]--;
|
||||
if (1) {}
|
||||
}
|
||||
|
||||
if (this->timers[0] != 0) {
|
||||
this->timers[0]--;
|
||||
}
|
||||
|
||||
if (this->timers[0] != 0) {
|
||||
this->timers[0]--;
|
||||
}
|
||||
|
||||
if (this->timers[0] != 0) {
|
||||
this->timers[0]--;
|
||||
}
|
||||
|
||||
if (this->timers[0] != 0) {
|
||||
this->timers[0]--;
|
||||
}
|
||||
DECR(this->timers[0]);
|
||||
DECR(this->timers[0]);
|
||||
DECR(this->timers[0]);
|
||||
DECR(this->timers[0]);
|
||||
DECR(this->timers[0]);
|
||||
}
|
||||
|
||||
Math_ApproachF(&this->actor.world.pos.x, player->actor.world.pos.x + targetHeight.x, 1.0f,
|
||||
|
@ -4342,7 +4326,7 @@ void EnKnight_UpdateEffects(EnKnight* this, PlayState* play) {
|
|||
|
||||
eff->accel.y = BREG(56) * 0.01f + 1.0f;
|
||||
|
||||
if (eff->active == (u32) true) { //! FAKE:
|
||||
if (eff->active == true) {
|
||||
Math_ApproachF(&eff->scale, (KREG(59) * 0.01f + 1.0f) * eff->scaleTarget, 0.1f,
|
||||
eff->scaleTarget * 0.1f);
|
||||
|
||||
|
|
|
@ -406,10 +406,10 @@ EnKusa2UnkBssSubStruct2* func_80A5C0B8(EnKusa2UnkBssStruct* arg0) {
|
|||
EnKusa2UnkBssSubStruct2* phi_v1 = &arg0->unk_0480[0];
|
||||
|
||||
for (i = 1; i < ARRAY_COUNT(D_80A5F1C0.unk_0480); i++) {
|
||||
if (phi_v1->unk_2C > arg0->unk_0480[i].unk_2C) {
|
||||
phi_v1 = &arg0->unk_0480[i];
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
EnKusa2UnkBssSubStruct2* iter = &arg0->unk_0480[i];
|
||||
|
||||
if (iter->unk_2C < phi_v1->unk_2C) {
|
||||
phi_v1 = iter;
|
||||
|
||||
if (phi_v1->unk_2C <= 0) {
|
||||
break;
|
||||
|
|
|
@ -80,12 +80,12 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) {
|
|||
EnMinifrog* this = (EnMinifrog*)thisx;
|
||||
s32 i;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 15.0f);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 15.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gFrogSkel, &gFrogIdleAnim, this->jointTable, this->morphTable,
|
||||
FROG_LIMB_MAX);
|
||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, thisx, &sCylinderInit);
|
||||
|
||||
if (!sTexturesDesegmented) {
|
||||
for (i = 0; i < ARRAY_COUNT(sEyeTextures); i++) {
|
||||
|
@ -94,20 +94,17 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) {
|
|||
sTexturesDesegmented = true;
|
||||
}
|
||||
|
||||
this->frogIndex = (this->actor.params & 0xF);
|
||||
this->frogIndex = (thisx->params & 0xF);
|
||||
if (this->frogIndex >= 5) {
|
||||
this->frogIndex = FROG_YELLOW;
|
||||
}
|
||||
|
||||
this->actor.speed = 0.0f;
|
||||
thisx->speed = 0.0f;
|
||||
this->actionFunc = EnMinifrog_Idle;
|
||||
this->jumpState = FROG_STATE_GROUND;
|
||||
this->flags = 0;
|
||||
this->timer = 0;
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
if (!EN_FROG_IS_RETURNED(&this->actor)) {
|
||||
if ((this->frogIndex == FROG_YELLOW) || CHECK_WEEKEVENTREG(sIsFrogReturnedFlags[this->frogIndex])) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -116,29 +113,29 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
this->timer = 30;
|
||||
this->actionFunc = EnMinifrog_SpawnGrowAndShrink;
|
||||
this->actor.textId = 0xD81;
|
||||
this->actor.colChkInfo.mass = 30;
|
||||
thisx->textId = 0xD81;
|
||||
thisx->colChkInfo.mass = 30;
|
||||
} else { // Frogs in mountain village
|
||||
if (this->frogIndex == FROG_YELLOW) {
|
||||
this->actor.textId = 0;
|
||||
thisx->textId = 0;
|
||||
this->actionFunc = EnMinifrog_SetupYellowFrogDialog;
|
||||
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_34_01)) {
|
||||
this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
|
||||
thisx->flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
|
||||
}
|
||||
|
||||
this->actor.home.rot.x = this->actor.home.rot.z = 0;
|
||||
thisx->home.rot.x = thisx->home.rot.z = 0;
|
||||
this->frog = NULL;
|
||||
} else {
|
||||
this->frog = EnMinifrog_GetFrog(play);
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
thisx->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
|
||||
// Frog has been returned
|
||||
if (CHECK_WEEKEVENTREG(sIsFrogReturnedFlags[this->frogIndex])) {
|
||||
this->actionFunc = EnMinifrog_SetupNextFrogInit;
|
||||
} else {
|
||||
this->actor.draw = NULL;
|
||||
this->actor.update = EnMinifrog_UpdateMissingFrog;
|
||||
thisx->draw = NULL;
|
||||
thisx->update = EnMinifrog_UpdateMissingFrog;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -539,23 +539,19 @@ void func_8095B6C8(EnOwl* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8095B76C(EnOwl* this, PlayState* play) {
|
||||
s32 pad;
|
||||
Actor* thisx = &this->actor;
|
||||
s16 sp4A;
|
||||
f32 sp44 = Path_OrientAndGetDistSq(&this->actor, this->path, this->unk_3F8, &sp4A);
|
||||
Vec3s* points;
|
||||
f32 sp44 = Path_OrientAndGetDistSq(thisx, this->path, this->unk_3F8, &sp4A);
|
||||
Vec3s* point;
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, sp4A, 6, 0x800, 0x200);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
if (sp44 < SQ(this->actor.speed)) {
|
||||
this->actor.speed = 0.0f;
|
||||
points = Lib_SegmentedToVirtual(this->path->points);
|
||||
points += this->unk_3F8;
|
||||
Math_SmoothStepToS(&thisx->world.rot.y, sp4A, 6, 0x800, 0x200);
|
||||
thisx->shape.rot.y = thisx->world.rot.y;
|
||||
if (sp44 < SQ(thisx->speed)) {
|
||||
thisx->speed = 0.0f;
|
||||
point = &((Vec3s*)Lib_SegmentedToVirtual(this->path->points))[this->unk_3F8];
|
||||
|
||||
//! FAKE:
|
||||
if (1) {
|
||||
this->actor.world.pos.x = points->x;
|
||||
this->actor.world.pos.z = points->z;
|
||||
}
|
||||
thisx->world.pos.x = point->x;
|
||||
thisx->world.pos.z = point->z;
|
||||
|
||||
this->unk_3F8++;
|
||||
if (this->unk_3F8 >= this->path->count) {
|
||||
|
@ -563,21 +559,21 @@ void func_8095B76C(EnOwl* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_OWL, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, 0, 0, 0xF00);
|
||||
this->actor.home.rot.x++;
|
||||
if (this->actor.home.rot.x >= 3) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_OWL, thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, 0,
|
||||
0, 0, 0xF00);
|
||||
thisx->home.rot.x++;
|
||||
if (thisx->home.rot.x >= 3) {
|
||||
func_8095ACEC(this);
|
||||
}
|
||||
func_8095B0C8(this);
|
||||
} else if (sp44 < SQ(21.0f)) {
|
||||
if (this->actor.speed > 1.0f) {
|
||||
this->actor.speed -= 1.0f;
|
||||
if (thisx->speed > 1.0f) {
|
||||
thisx->speed -= 1.0f;
|
||||
} else {
|
||||
this->actor.speed = 1.0f;
|
||||
thisx->speed = 1.0f;
|
||||
}
|
||||
} else if (this->actor.speed < 6.0f) {
|
||||
this->actor.speed += 1.0f;
|
||||
} else if (thisx->speed < 6.0f) {
|
||||
thisx->speed += 1.0f;
|
||||
}
|
||||
|
||||
func_8095B06C(this);
|
||||
|
|
|
@ -263,10 +263,8 @@ void EnPoSisters_MatchPlayerY(EnPoSisters* this, PlayState* play) {
|
|||
// equalize to player height
|
||||
Math_ApproachF(&this->actor.world.pos.y, player->actor.world.pos.y + 5.0f, 0.5f, 3.0f);
|
||||
|
||||
if (this->floatingBobbingTimer == 0) {
|
||||
if ((u32)this->floatingBobbingTimer == 0) {
|
||||
this->floatingBobbingTimer = 32;
|
||||
//! FAKE:
|
||||
if (this->floatingBobbingTimer) {}
|
||||
}
|
||||
|
||||
DECR(this->floatingBobbingTimer);
|
||||
|
|
|
@ -305,9 +305,7 @@ void EnTest6_DrawAmmoDropRupee(EnTest6* this, PlayState* play, SoTCsAmmoDrops* a
|
|||
if (gfxHead != NULL) {
|
||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||
|
||||
//! FAKE: & 0xFFFF
|
||||
gDPSetTileSize(gfx++, 1, hilite->h.x1 & 0xFFFF, hilite->h.y1 & 0xFFFF, (hilite->h.x1 + 60) & 0xFFFF,
|
||||
(hilite->h.y1 + 60) & 0xFFFF);
|
||||
gDPSetHilite1Tile(gfx++, 1, hilite, 0x10, 0x10);
|
||||
gSPEndDisplayList(gfx++);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x07, gfxHead);
|
||||
|
@ -565,9 +563,6 @@ void EnTest6_InvertedSoTCutscene(EnTest6* this, PlayState* play) {
|
|||
}
|
||||
|
||||
for (i = 0; i < SOTCS_INV_NUM_CLOCKS; i++) {
|
||||
//! FAKE:
|
||||
if (player != NULL) {}
|
||||
|
||||
clockYaw += 0x10000 / SOTCS_INV_NUM_CLOCKS;
|
||||
this->invSoTClockPos[i].x = player->actor.world.pos.x + (Math_SinS(clockYaw) * this->clockDist);
|
||||
this->invSoTClockPos[i].y = player->actor.world.pos.y;
|
||||
|
@ -669,6 +664,9 @@ void EnTest6_InvertedSoTCutscene(EnTest6* this, PlayState* play) {
|
|||
|
||||
// Update white screen
|
||||
if (this->screenFillAlpha != 0) {
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
EnTest6_EnableWhiteFillScreen(play, this->screenFillAlpha * 0.05f);
|
||||
subCam->fov += (mainCam->fov - subCam->fov) * 0.05f;
|
||||
this->screenFillAlpha++;
|
||||
|
|
|
@ -646,7 +646,7 @@ void EnTest7_WarpCsWarp(EnTest7* this, PlayState* play) {
|
|||
Vec3f featherPos;
|
||||
|
||||
//! FAKE:
|
||||
if (this) {}
|
||||
if (1) {}
|
||||
|
||||
Math_Vec3f_Copy(&featherPos, &this->actor.world.pos);
|
||||
|
||||
|
|
|
@ -361,9 +361,6 @@ s32 func_80C10E98(PlayState* play) {
|
|||
|
||||
i = sp5C - phi_s0_2;
|
||||
|
||||
//! FAKE:
|
||||
if (i) {}
|
||||
|
||||
sp5C = phi_s0_2 * 50;
|
||||
sp98 -= sp5C;
|
||||
|
||||
|
@ -393,9 +390,7 @@ s32 func_80C10E98(PlayState* play) {
|
|||
func_80C10DE8(dropItem00Ids, spA8, ITEM00_RUPEE_GREEN);
|
||||
if ((spB0 + spAC + phi_s0_2 + spA0 + phi_s2 + spA8) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
} else {
|
||||
Vec3f sp64;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(dropItem00Ids); i++) {
|
||||
|
|
|
@ -262,13 +262,13 @@ void EnTimeTag_Diary_Wait(EnTimeTag* this, PlayState* play) {
|
|||
Message_StartTextbox(play, 0x122B, &this->actor);
|
||||
}
|
||||
TIMETAG_DIARY_TIMER(&this->actor) = 1;
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
} else {
|
||||
// unable to read Zora script
|
||||
Message_StartTextbox(play, 0x122A, &this->actor);
|
||||
|
||||
//! FAKE: https://decomp.me/scratch/AHRNe
|
||||
if (0) {}
|
||||
|
||||
((EnElf*)GET_PLAYER(play)->tatlActor)->unk_264 |= 4;
|
||||
Actor_ChangeFocus(&this->actor, play, GET_PLAYER(play)->tatlActor);
|
||||
TIMETAG_DIARY_TIMER(&this->actor) = 0;
|
||||
|
|
|
@ -1053,10 +1053,9 @@ void EnTrt_ItemGiven(EnTrt* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
default:
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
this->textId = 0x849;
|
||||
break;
|
||||
// note break is missing
|
||||
// break;
|
||||
}
|
||||
Message_ContinueTextbox(play, this->textId);
|
||||
} else {
|
||||
|
|
|
@ -665,10 +665,10 @@ void func_80B32F04(Actor* thisx, PlayState* play) {
|
|||
f32 sp78;
|
||||
f32 sp74;
|
||||
EnZoraegg* this = (EnZoraegg*)thisx;
|
||||
s32 pad[3];
|
||||
Vec3f pos;
|
||||
s16 sp62;
|
||||
s16 sp60;
|
||||
f32 temp_f2;
|
||||
s32 pad;
|
||||
Gfx* gfx;
|
||||
Vec3f sp4C;
|
||||
s32 pad2;
|
||||
|
@ -684,9 +684,11 @@ void func_80B32F04(Actor* thisx, PlayState* play) {
|
|||
sp78 = -(15.0f * Math_SinS(sp60));
|
||||
sp7C = -((15.0f * Math_CosS(sp62)) * Math_CosS(sp60));
|
||||
|
||||
//! FAKE: temp_f2 =
|
||||
Matrix_Translate(this->actor.world.pos.x + sp74, this->actor.world.pos.y + sp78 + 6.0f,
|
||||
temp_f2 = this->actor.world.pos.z + sp7C, MTXMODE_NEW);
|
||||
pos.x = this->actor.world.pos.x + sp74;
|
||||
pos.y = this->actor.world.pos.y + sp78 + 6.0f;
|
||||
pos.z = this->actor.world.pos.z + sp7C;
|
||||
|
||||
Matrix_Translate(pos.x, pos.y, pos.z, MTXMODE_NEW);
|
||||
|
||||
sp7C = Math_SinS(play->gameplayFrames * 0x4000);
|
||||
|
||||
|
|
|
@ -145,22 +145,19 @@ void ObjAqua_Init(Actor* thisx, PlayState* play) {
|
|||
ObjAqua* this = (ObjAqua*)thisx;
|
||||
s32 i;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
this->actor.scale.x = 0.0009f;
|
||||
this->actor.scale.y = 0.0005f;
|
||||
this->actor.scale.z = 0.0009f;
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 60.0f);
|
||||
Collider_SetCylinder(play, &this->collider, thisx, &sCylinderInit);
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 60.0f);
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
this->actor.shape.shadowAlpha = 140;
|
||||
thisx->shape.shadowAlpha = 140;
|
||||
this->alpha = 255;
|
||||
if (ObjAqua_IsUnderwater(this, play)) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
EffectSsBubble_Spawn(play, &this->actor.world.pos, -4.0f, 4.0f, 4.0f, (Rand_ZeroOne() * 0.09f) + 0.03f);
|
||||
EffectSsBubble_Spawn(play, &thisx->world.pos, -4.0f, 4.0f, 4.0f, (Rand_ZeroOne() * 0.09f) + 0.03f);
|
||||
}
|
||||
func_80ACBDCC(this);
|
||||
} else {
|
||||
|
|
|
@ -203,8 +203,8 @@ static Gfx* sEyeSwitchDL[] = { gEyeSwitchGoldDL, gEyeSwitchSilverDL };
|
|||
|
||||
static AnimatedMaterial* sCrystalSwitchAnimatedMat;
|
||||
|
||||
void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntSphInit* init) {
|
||||
s32 pad;
|
||||
void ObjSwitch_InitJntSphCollider(Actor* thisx, PlayState* play, ColliderJntSphInit* init) {
|
||||
ObjSwitch* this = (ObjSwitch*)thisx;
|
||||
|
||||
Collider_InitJntSph(play, &this->colliderJntSph);
|
||||
Collider_SetJntSph(play, &this->colliderJntSph, &this->dyna.actor, init, this->colliderJntSphElements);
|
||||
|
@ -216,8 +216,8 @@ void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntS
|
|||
Collider_UpdateSpheres(0, &this->colliderJntSph);
|
||||
}
|
||||
|
||||
void ObjSwitch_InitTrisCollider(ObjSwitch* this, PlayState* play, ColliderTrisInit* init) {
|
||||
s32 pad;
|
||||
void ObjSwitch_InitTrisCollider(Actor* thisx, PlayState* play, ColliderTrisInit* init) {
|
||||
ObjSwitch* this = (ObjSwitch*)thisx;
|
||||
s32 i;
|
||||
s32 j;
|
||||
Vec3f vtx[3];
|
||||
|
@ -231,9 +231,6 @@ void ObjSwitch_InitTrisCollider(ObjSwitch* this, PlayState* play, ColliderTrisIn
|
|||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->colliderTrisElements); i++) {
|
||||
//! FAKE:
|
||||
if (this) {}
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(vtx); j++) {
|
||||
Matrix_MultVec3f(&init->elements[i].dim.vtx[j], &vtx[j]);
|
||||
}
|
||||
|
@ -375,11 +372,11 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_SetFocus(&this->dyna.actor, sHeights[type]);
|
||||
|
||||
if (type == OBJSWITCH_TYPE_FLOOR_RUSTY) {
|
||||
ObjSwitch_InitTrisCollider(this, play, &sRustyFloorTrisInit);
|
||||
ObjSwitch_InitTrisCollider(&this->dyna.actor, play, &sRustyFloorTrisInit);
|
||||
} else if (type == OBJSWITCH_TYPE_EYE) {
|
||||
ObjSwitch_InitTrisCollider(this, play, &sEyeSwitchTrisInit);
|
||||
ObjSwitch_InitTrisCollider(&this->dyna.actor, play, &sEyeSwitchTrisInit);
|
||||
} else if (type == OBJSWITCH_TYPE_CRYSTAL || type == OBJSWITCH_TYPE_CRYSTAL_TARGETABLE) {
|
||||
ObjSwitch_InitJntSphCollider(this, play, &sJntSphInit);
|
||||
ObjSwitch_InitJntSphCollider(&this->dyna.actor, play, &sJntSphInit);
|
||||
}
|
||||
if (type == OBJSWITCH_TYPE_CRYSTAL_TARGETABLE) {
|
||||
this->dyna.actor.attentionRangeType = ATTENTION_RANGE_4;
|
||||
|
@ -936,10 +933,8 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
this->actionFunc(this, play);
|
||||
if (this->floorSwitchPlayerSnapState != 0) {
|
||||
s32 pad;
|
||||
s32 requiredScopeTemp;
|
||||
|
||||
//! FAKE:
|
||||
dummy:
|
||||
ObjSwitch_FloorSwitchSnapPlayerToSwitchEdge(this, play);
|
||||
if (this->floorSwitchPlayerSnapState == 2) {
|
||||
this->floorSwitchPlayerSnapState = 0;
|
||||
|
|
|
@ -319,9 +319,10 @@ s32 func_80B781DC(ObjUm* this, EnHorse* bandit1, EnHorse* bandit2, PlayState* pl
|
|||
phi_f20 *= -1.0f;
|
||||
}
|
||||
phi_s2 = D_80B7C164[i].unk_10;
|
||||
}
|
||||
|
||||
//! FAKE:
|
||||
;
|
||||
if (1) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -280,7 +280,7 @@ void Player_CsAction_20(PlayState* play, Player* this, CsCmdActorCue* cue);
|
|||
void Player_CsAction_21(PlayState* play, Player* this, CsCmdActorCue* cue);
|
||||
void Player_CsAction_22(PlayState* play, Player* this, CsCmdActorCue* cue);
|
||||
void Player_CsAction_23(PlayState* play, Player* this, CsCmdActorCue* cue);
|
||||
void Player_CsAction_TranslateReverse(PlayState* play, Player* this, CsCmdActorCue* cue);
|
||||
void Player_CsAction_TranslateReverse(PlayState* play, Player* this, CsCmdActorCue* cue2);
|
||||
void Player_CsAction_25(PlayState* play, Player* this, CsCmdActorCue* cue);
|
||||
void Player_CsAction_26(PlayState* play, Player* this, CsCmdActorCue* cue);
|
||||
void Player_CsAction_27(PlayState* play, Player* this, CsCmdActorCue* cue);
|
||||
|
@ -11475,7 +11475,6 @@ void Player_UpdateInterface(PlayState* play, Player* this) {
|
|||
doActionA = DO_ACTION_RETURN;
|
||||
} else if ((this->heldItemAction == PLAYER_IA_FISHING_ROD) && (this->unk_B28 != 0)) {
|
||||
doActionA = (this->unk_B28 == 2) ? DO_ACTION_REEL : DO_ACTION_NONE;
|
||||
doActionA = (this->unk_B28 == 2) ? DO_ACTION_REEL : DO_ACTION_NONE; //! FAKE: duplicated statement
|
||||
} else if (this->stateFlags3 & PLAYER_STATE3_2000) {
|
||||
doActionA = DO_ACTION_DOWN;
|
||||
} else if ((this->doorType != PLAYER_DOORTYPE_NONE) && (this->doorType != PLAYER_DOORTYPE_STAIRCASE) &&
|
||||
|
@ -20651,28 +20650,15 @@ void Player_CsAction_23(PlayState* play, Player* this, CsCmdActorCue* cue) {
|
|||
}
|
||||
}
|
||||
|
||||
void Player_CsAction_TranslateReverse(PlayState* play, Player* this, CsCmdActorCue* cue) {
|
||||
s32 pad;
|
||||
f32 xEnd;
|
||||
f32 yEnd;
|
||||
f32 zEnd;
|
||||
f32 xDiff;
|
||||
f32 yDiff;
|
||||
f32 zDiff;
|
||||
f32 progress;
|
||||
|
||||
xEnd = cue->endPos.x;
|
||||
yEnd = cue->endPos.y;
|
||||
zEnd = cue->endPos.z;
|
||||
|
||||
xDiff = cue->startPos.x - xEnd;
|
||||
yDiff = cue->startPos.y - yEnd;
|
||||
zDiff = cue->startPos.z - zEnd;
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
progress = ((f32)(cue->endFrame - play->csCtx.curFrame)) / ((f32)(cue->endFrame - cue->startFrame));
|
||||
void Player_CsAction_TranslateReverse(PlayState* play, Player* this, CsCmdActorCue* cue2) {
|
||||
CsCmdActorCue* cue = cue2;
|
||||
f32 xEnd = cue->endPos.x;
|
||||
f32 yEnd = cue->endPos.y;
|
||||
f32 zEnd = cue->endPos.z;
|
||||
f32 xDiff = cue->startPos.x - xEnd;
|
||||
f32 yDiff = cue->startPos.y - yEnd;
|
||||
f32 zDiff = cue->startPos.z - zEnd;
|
||||
f32 progress = (f32)(cue->endFrame - play->csCtx.curFrame) / (f32)(cue->endFrame - cue->startFrame);
|
||||
|
||||
this->actor.world.pos.x = (xDiff * progress) + xEnd;
|
||||
this->actor.world.pos.y = (yDiff * progress) + yEnd;
|
||||
|
|
|
@ -16647,7 +16647,7 @@
|
|||
0x80C09C74:("EnKitan_OverrideLimbDraw",),
|
||||
0x80C09C90:("EnKitan_PostLimbDraw",),
|
||||
0x80C09CD0:("EnKitan_Draw",),
|
||||
0x80C09ED0:("func_80C09ED0",),
|
||||
0x80C09ED0:("BgAstrBombwall_InitCollider",),
|
||||
0x80C09FEC:("BgAstrBombwall_Init",),
|
||||
0x80C0A0EC:("BgAstrBombwall_Destroy",),
|
||||
0x80C0A120:("func_80C0A120",),
|
||||
|
|
Loading…
Reference in New Issue