diff --git a/include/functions.h b/include/functions.h index a105a46b9a..3a7ce33825 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1606,7 +1606,7 @@ LightNode* Lights_FindBufSlot(); void Lights_FreeNode(LightNode* light); void LightContext_Init(PlayState* play, LightContext* lightCtx); void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b); -void func_80102544(LightContext* lightCtx, u8 a1, u8 a2, u8 a3, s16 numLights, s16 sp16); +void LightContext_SetFogProperties(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far); Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx); void LightContext_InitList(PlayState* play, LightContext* lightCtx); void LightContext_DestroyList(PlayState* play, LightContext* lightCtx); @@ -2444,8 +2444,8 @@ void func_80165438(UNK_PTR param_1); // void Play_DrawMotionBlur(void); // void Play_InitMotionBlur(void); // void Play_DestroyMotionBlur(void); -void Play_SetMotionBlurAlpha(u32 motionBlurAlpha); -void Play_EnableMotionBlur(u32 motionBlurAlpha); +void Play_SetMotionBlurAlpha(u32 alpha); +void Play_EnableMotionBlur(u32 alpha); void Play_DisableMotionBlur(void); // void func_801656A4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8); // void Play_EnableMotionBlurPriority(void); @@ -2454,7 +2454,7 @@ void Play_DisableMotionBlur(void); // void Play_ChooseDynamicTransition(void); // void Play_SetupTransition(void); // void Play_ClearTransition(void); -Gfx* func_801660B8(PlayState* this, Gfx* gfx); +Gfx* Play_SetFog(PlayState* this, Gfx* gfx); void Play_Destroy(GameState* thisx); // void func_801663C4(void); // void func_80166644(void); diff --git a/include/z64light.h b/include/z64light.h index df7c1b4fac..ba7fe36845 100644 --- a/include/z64light.h +++ b/include/z64light.h @@ -74,11 +74,9 @@ typedef struct LightsBuffer { typedef struct LightContext { /* 0x0 */ LightNode* listHead; /* 0x4 */ Color_RGB8 ambient; - /* 0x7 */ u8 unk7; - /* 0x8 */ u8 unk8; - /* 0x9 */ u8 unk9; - /* 0xA */ s16 unkA; - /* 0xC */ s16 unkC; + /* 0x7 */ Color_RGB8 fogColor; + /* 0xA */ s16 fogNear; + /* 0xC */ s16 fogFar; } LightContext; // size = 0x10 typedef enum LightType { diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 7734c4e1bf..a8ef010916 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2686,7 +2686,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numActors, Actor** actors) { // spAC = phi_s1; Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize); - phi_s1_2 = func_801660B8(play, spAC); + phi_s1_2 = Play_SetFog(play, spAC); for (spB4 = 0; spB4 < numActors; spB4++, actors++) { Actor_Draw(play, *actors); diff --git a/src/code/z_draw.c b/src/code/z_draw.c index 4167b4cea4..a2686be8e3 100644 --- a/src/code/z_draw.c +++ b/src/code/z_draw.c @@ -837,7 +837,7 @@ void GetItem_DrawRemains(PlayState* play, s16 drawId) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].drawResources[0]); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index b7c6af97e3..6c416e3c85 100644 --- a/src/code/z_eff_ss_dead.c +++ b/src/code/z_eff_ss_dead.c @@ -50,7 +50,7 @@ void func_800AE5A0(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gDPPipeSync(POLY_OPA_DISP++); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); CLOSE_DISPS(play->state.gfxCtx); } @@ -105,7 +105,7 @@ void func_800AE8EC(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gDPPipeSync(POLY_XLU_DISP++); - POLY_XLU_DISP = func_801660B8(play, POLY_XLU_DISP); + POLY_XLU_DISP = Play_SetFog(play, POLY_XLU_DISP); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index d6ab737c7b..6534aa6a74 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -819,7 +819,7 @@ void EnItem00_DrawSprite(EnItem00* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); if (this->actor.params == ITEM00_NUTS_10) { texIndex = 6; diff --git a/src/code/z_lights.c b/src/code/z_lights.c index e3e732eb39..62ee0dd688 100644 --- a/src/code/z_lights.c +++ b/src/code/z_lights.c @@ -251,7 +251,7 @@ void Lights_FreeNode(LightNode* light) { void LightContext_Init(PlayState* play, LightContext* lightCtx) { LightContext_InitList(play, lightCtx); LightContext_SetAmbientColor(lightCtx, 80, 80, 80); - func_80102544(lightCtx, 0, 0, 0, 0x3E4, 0x3200); + LightContext_SetFogProperties(lightCtx, 0, 0, 0, 0x3E4, 0x3200); bzero(&sLightsBuffer, sizeof(LightsBuffer)); } @@ -261,12 +261,12 @@ void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) { lightCtx->ambient.b = b; } -void func_80102544(LightContext* lightCtx, u8 a1, u8 a2, u8 a3, s16 numLights, s16 sp16) { - lightCtx->unk7 = a1; - lightCtx->unk8 = a2; - lightCtx->unk9 = a3; - lightCtx->unkA = numLights; - lightCtx->unkC = sp16; +void LightContext_SetFogProperties(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far) { + lightCtx->fogColor.r = r; + lightCtx->fogColor.g = g; + lightCtx->fogColor.b = b; + lightCtx->fogNear = near; + lightCtx->fogFar = far; } /** diff --git a/src/code/z_play.c b/src/code/z_play.c index 2115db4e2a..b38cf825f2 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -387,11 +387,11 @@ void Play_ClearTransition(PlayState* this) { this->transitionCtx.transitionType = -1; } -Gfx* func_801660B8(PlayState* this, Gfx* gfx) { - s32 phi_v1 = this->lightCtx.unkC * (5.0f / 64.0f); +Gfx* Play_SetFog(PlayState* this, Gfx* gfx) { + s32 fogFar = this->lightCtx.fogFar * (5.0f / 64.0f); - return Gfx_SetFogWithSync(gfx, this->lightCtx.unk7, this->lightCtx.unk8, this->lightCtx.unk9, 0, - this->lightCtx.unkA, (phi_v1 <= 1000) ? 1000 : phi_v1); + return Gfx_SetFogWithSync(gfx, this->lightCtx.fogColor.r, this->lightCtx.fogColor.g, this->lightCtx.fogColor.b, 0, + this->lightCtx.fogNear, (fogFar <= 1000) ? 1000 : fogFar); } void Play_Destroy(GameState* thisx) { @@ -1158,7 +1158,8 @@ void Play_Draw(PlayState* this) { if (this->skyboxCtx.skyboxShouldDraw || (this->roomCtx.curRoom.mesh->type0.type == 1)) { func_8012CF0C(gfxCtx, 0, 1, 0, 0, 0); } else { - func_8012CF0C(gfxCtx, 1, 1, this->lightCtx.unk7, this->lightCtx.unk8, this->lightCtx.unk9); + func_8012CF0C(gfxCtx, 1, 1, this->lightCtx.fogColor.r, this->lightCtx.fogColor.g, + this->lightCtx.fogColor.b); } } else { func_8012CF0C(gfxCtx, 0, 0, 0, 0, 0); @@ -1184,11 +1185,11 @@ void Play_Draw(PlayState* this) { ShrinkWindow_Draw(gfxCtx); - POLY_OPA_DISP = func_801660B8(this, POLY_OPA_DISP); - POLY_XLU_DISP = func_801660B8(this, POLY_XLU_DISP); + POLY_OPA_DISP = Play_SetFog(this, POLY_OPA_DISP); + POLY_XLU_DISP = Play_SetFog(this, POLY_XLU_DISP); // fogFar - var_fv0 = this->lightCtx.unkC; + var_fv0 = this->lightCtx.fogFar; if (var_fv0 > 12800.0f) { var_fv0 = 12800.0f; } diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 6f4198fc79..3a5da948a0 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -94,7 +94,7 @@ void func_801229A0(PlayState* play, Player* player) { OPEN_DISPS(play->state.gfxCtx); if ((gSaveContext.jinxTimer != 0) || (player->invincibilityTimer > 0)) { - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); } CLOSE_DISPS(play->state.gfxCtx); diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c index 8ece56e359..a56d25d85b 100644 --- a/src/code/z_rcp.c +++ b/src/code/z_rcp.c @@ -777,19 +777,19 @@ Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) { if (n >= 997) { if (n >= 1000) { - gSPFogFactor(gfx + 1, 0, 0); // gSPFogPosition(gfx++, ?, ?) + gSPFogFactor(&gfx[1], 0, 0); // gSPFogPosition(gfx++, ?, ?) } else { - gSPFogFactor(gfx + 1, 0x7FFF, 0x8100); // gSPFogPosition(gfx++, ?, ?) + gSPFogFactor(&gfx[1], 0x7FFF, 0x8100); // gSPFogPosition(gfx++, ?, ?) } } else { if (n < 0) { - gSPFogFactor(gfx + 1, 0, 255); // gSPFogPosition(gfx++, ?, ?) + gSPFogFactor(&gfx[1], 0, 255); // gSPFogPosition(gfx++, ?, ?) } else { - gSPFogPosition(gfx + 1, n, f); + gSPFogPosition(&gfx[1], n, f); } } - return gfx + 2; + return &gfx[2]; } Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) { diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c index 19d4731747..61c2445bf5 100644 --- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c +++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c @@ -1392,7 +1392,7 @@ void Boss02_Twinmold_Draw(Actor* thisx, PlayState* play2) { } SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, &this->actor); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); spA4 = 0.0f; spA0 = 0.0f; @@ -1427,7 +1427,7 @@ void Boss02_Twinmold_Draw(Actor* thisx, PlayState* play2) { if (sp98 < this->unk_01BC[phi_v0].y) { gSPDisplayList(POLY_OPA_DISP++, D_809DFA9C[i]); } - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); } if (i == 21) { diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c index 6eedc24442..00c147b355 100644 --- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c +++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c @@ -2274,7 +2274,7 @@ void Boss03_Draw(Actor* thisx, PlayState* play) { Matrix_Translate(0.0f, -600.0f, 0.0f, MTXMODE_APPLY); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, Boss03_OverrideLimbDraw, Boss03_PostLimbDraw, &this->actor); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); } this->unk_2BC = 0; diff --git a/src/overlays/actors/ovl_Boss_04/z_boss_04.c b/src/overlays/actors/ovl_Boss_04/z_boss_04.c index bdbd137fff..8eef7f8e2a 100644 --- a/src/overlays/actors/ovl_Boss_04/z_boss_04.c +++ b/src/overlays/actors/ovl_Boss_04/z_boss_04.c @@ -828,7 +828,7 @@ void Boss04_Draw(Actor* thisx, PlayState* play) { SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, Boss04_OverrideLimbDraw, Boss04_PostLimbDraw, &this->actor); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); if (this->actionFunc != func_809EC568) { func_8012C448(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index 90ccb1382f..07184a1f0d 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -1024,9 +1024,9 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->deflectCount = 0; this->maskType = SK_MASK_TYPE_NORMAL; this->animIndex = SK_ANIM_IDLE; - this->fogR = play->lightCtx.unk7; - this->fogG = play->lightCtx.unk8; - this->fogB = play->lightCtx.unk9; + this->fogR = play->lightCtx.fogColor.r; + this->fogG = play->lightCtx.fogColor.g; + this->fogB = play->lightCtx.fogColor.b; if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneLayer == 1)) { this->alpha = 0; @@ -1594,9 +1594,9 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { this->fadeInState++; } - this->fogR = play->lightCtx.unk7 * this->fogScale; - this->fogG = play->lightCtx.unk8 * this->fogScale; - this->fogB = play->lightCtx.unk9 * this->fogScale; + this->fogR = play->lightCtx.fogColor.r * this->fogScale; + this->fogG = play->lightCtx.fogColor.g * this->fogScale; + this->fogB = play->lightCtx.fogColor.b * this->fogScale; } else if (this->fadeInState == SK_FADE_IN_STATE_INCREASE_FOG) { if (this->fogN < 996) { this->fogN += 10; @@ -1894,7 +1894,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, this->fogR, this->fogG, this->fogB, this->fogA, this->fogN, this->fogF); gSPDisplayList(POLY_OPA_DISP++, gSkullKidMajorasMask1DL); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); } else { gSPDisplayList(POLY_OPA_DISP++, gSkullKidMajorasMask1DL); } diff --git a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c index 0b909d61f3..0b6031227f 100644 --- a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c +++ b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c @@ -244,7 +244,7 @@ void func_80AFE4AC(Actor* thisx, PlayState* play) { func_8012C2DC(play->state.gfxCtx); func_8012C28C(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropRecoveryHeartTex)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -266,7 +266,7 @@ void func_80AFE584(Actor* thisx, PlayState* play) { void func_80AFE650(Actor* thisx, PlayState* play) { func_8012C28C(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropBombTex)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c index 1f32b74593..dfe3c3fa2f 100644 --- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c +++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c @@ -784,7 +784,7 @@ void EnFall_LodMoon_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_OPA_DISP++, gLodmoonEyesDL); gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH); gSPDisplayList(POLY_OPA_DISP++, gLodmoonMoonDL); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index c0be813614..7987bac44a 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -1448,7 +1448,7 @@ void func_80964950(PlayState* play, EnFuUnkStruct* ptr, s32 len) { OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); for (i = 0; i < len; i++, ptr++) { diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.c b/src/overlays/actors/ovl_En_Ot/z_en_ot.c index bf93b729fb..ef76189b36 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.c +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.c @@ -1137,7 +1137,7 @@ void func_80B5E1D8(PlayState* play, EnOtUnkStruct* arg1, s32 arg2) { OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); for (i = 0; i < arg2; i++, arg1++) { diff --git a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c index d683cde8ce..15b430c09f 100644 --- a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c +++ b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c @@ -458,7 +458,7 @@ void EnTanron3_Draw(Actor* thisx, PlayState* play) { } SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnTanron3_OverrideLimbDraw, NULL, &this->actor); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_En_Test6/z_en_test6.c b/src/overlays/actors/ovl_En_Test6/z_en_test6.c index 46efe4e1a2..ae433012e3 100644 --- a/src/overlays/actors/ovl_En_Test6/z_en_test6.c +++ b/src/overlays/actors/ovl_En_Test6/z_en_test6.c @@ -211,7 +211,7 @@ void func_80A90D34(EnTest6* this, PlayState* play, EnTest6Struct* ptr) { if (ptr->unk_00 != 0) { Matrix_Translate(ptr->unk_08 * ptr->unk_04, ptr->unk_0C, ptr->unk_10 * ptr->unk_04, MTXMODE_NEW); Matrix_Scale(ptr->unk_04 * 0.02f, ptr->unk_04 * 0.02f, ptr->unk_04 * 0.02f, MTXMODE_APPLY); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A9402C[ptr->unk_00])); diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index f4c970ea80..cbbf638640 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -259,7 +259,7 @@ void EnTg_DrawHearts(PlayState* play, EnTgHeartEffect* effect, s32 numEffects) { OPEN_DISPS(play->state.gfxCtx); - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP); for (i = 0; i < numEffects; i++, effect++) { diff --git a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c index aa36b69472..0da22cb23a 100644 --- a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c +++ b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c @@ -570,7 +570,7 @@ void func_80A5A184(Actor* thisx, PlayState* play2) { } } - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); CLOSE_DISPS(gfxCtx); } diff --git a/src/overlays/actors/ovl_En_Zob/z_en_zob.c b/src/overlays/actors/ovl_En_Zob/z_en_zob.c index 1970e53df2..7d901034d8 100644 --- a/src/overlays/actors/ovl_En_Zob/z_en_zob.c +++ b/src/overlays/actors/ovl_En_Zob/z_en_zob.c @@ -769,7 +769,7 @@ void EnZob_Draw(Actor* thisx, PlayState* play) { func_80BA0F64, func_80BA0FAC, &this->actor); if (this->unk_2F4 & 0x20) { - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); } CLOSE_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Zos/z_en_zos.c b/src/overlays/actors/ovl_En_Zos/z_en_zos.c index 11fcc25953..04e50e1d6d 100644 --- a/src/overlays/actors/ovl_En_Zos/z_en_zos.c +++ b/src/overlays/actors/ovl_En_Zos/z_en_zos.c @@ -761,7 +761,7 @@ void EnZos_Draw(Actor* thisx, PlayState* play) { func_80BBC4E4, func_80BBC500, &this->actor); if (this->unk_2B6 & 0x40) { - POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); } CLOSE_DISPS(play->state.gfxCtx); diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 4908ea296b..68e94619c2 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -1881,7 +1881,7 @@ 0x80102464:("Lights_FreeNode",), 0x801024AC:("LightContext_Init",), 0x80102518:("LightContext_SetAmbientColor",), - 0x80102544:("func_80102544",), + 0x80102544:("LightContext_SetFogProperties",), 0x80102580:("LightContext_NewLights",), 0x801025B8:("LightContext_InitList",), 0x801025C8:("LightContext_DestroyList",), @@ -2985,7 +2985,7 @@ 0x80165E7C:("Play_ChooseDynamicTransition",), 0x80165EC0:("Play_SetupTransition",), 0x80166060:("Play_ClearTransition",), - 0x801660B8:("func_801660B8",), + 0x801660B8:("Play_SetFog",), 0x8016613C:("Play_Destroy",), 0x801663C4:("func_801663C4",), 0x80166644:("func_80166644",), diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index b0dde73d76..e72aa7b149 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -1395,7 +1395,7 @@ asm/non_matchings/code/z_lights/Lights_FindBufSlot.s,Lights_FindBufSlot,0x801023 asm/non_matchings/code/z_lights/Lights_FreeNode.s,Lights_FreeNode,0x80102464,0x12 asm/non_matchings/code/z_lights/LightContext_Init.s,LightContext_Init,0x801024AC,0x1B asm/non_matchings/code/z_lights/LightContext_SetAmbientColor.s,LightContext_SetAmbientColor,0x80102518,0xB -asm/non_matchings/code/z_lights/func_80102544.s,func_80102544,0x80102544,0xF +asm/non_matchings/code/z_lights/LightContext_SetFogProperties.s,LightContext_SetFogProperties,0x80102544,0xF asm/non_matchings/code/z_lights/LightContext_NewLights.s,LightContext_NewLights,0x80102580,0xE asm/non_matchings/code/z_lights/LightContext_InitList.s,LightContext_InitList,0x801025B8,0x4 asm/non_matchings/code/z_lights/LightContext_DestroyList.s,LightContext_DestroyList,0x801025C8,0x17 @@ -2499,7 +2499,7 @@ asm/non_matchings/code/z_play/func_80165E1C.s,func_80165E1C,0x80165E1C,0x18 asm/non_matchings/code/z_play/Play_ChooseDynamicTransition.s,Play_ChooseDynamicTransition,0x80165E7C,0x11 asm/non_matchings/code/z_play/Play_SetupTransition.s,Play_SetupTransition,0x80165EC0,0x68 asm/non_matchings/code/z_play/Play_ClearTransition.s,Play_ClearTransition,0x80166060,0x16 -asm/non_matchings/code/z_play/func_801660B8.s,func_801660B8,0x801660B8,0x21 +asm/non_matchings/code/z_play/Play_SetFog.s,Play_SetFog,0x801660B8,0x21 asm/non_matchings/code/z_play/Play_Destroy.s,Play_Destroy,0x8016613C,0xA2 asm/non_matchings/code/z_play/func_801663C4.s,func_801663C4,0x801663C4,0xA0 asm/non_matchings/code/z_play/func_80166644.s,func_80166644,0x80166644,0x9C