diff options
| author | Sonic Dreamcaster <alejandro.asenjo88@gmail.com> | 2025-02-12 19:04:27 -0300 |
|---|---|---|
| committer | Sonic Dreamcaster <alejandro.asenjo88@gmail.com> | 2025-02-12 19:04:27 -0300 |
| commit | bbdc73c4ec9043bf9c730b58bd1be5d4aca3ac81 (patch) | |
| tree | 86822065def32281fe41bb875ac8c3430860ac85 /src | |
| parent | bacfab2dd2200eea85d78a08dd2a58317da854bc (diff) | |
skip interpolation on reset of the Map Warp Star
Diffstat (limited to 'src')
| -rw-r--r-- | src/overlays/ovl_menu/fox_map.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 243c6278..bc9d592f 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -6447,6 +6447,7 @@ void Map_PathLine_Draw(PathType pathType) { s32 r; s32 g; s32 b; + static f32 prevPosX = 0.0f; if (pathType == PL_WARP_YLW) { r = 240; @@ -6465,8 +6466,13 @@ void Map_PathLine_Draw(PathType pathType) { Matrix_Push(&gGfxMatrix); - // @port: Tag the transform. - FrameInterpolation_RecordOpenChild("Map_PathLine_Draw", 0); + if (ABS(D_menu_801CEEB0.x) - ABS(prevPosX) > 30) { + // @port Skip interpolation + FrameInterpolation_ShouldInterpolateFrame(false); + } else { + // @port: Tag the transform. + FrameInterpolation_RecordOpenChild("Map_PathLine_Draw", 0); + } Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, MTXF_APPLY); @@ -6481,8 +6487,15 @@ void Map_PathLine_Draw(PathType pathType) { Matrix_Pop(&gGfxMatrix); - // @port Pop the transform id. - FrameInterpolation_RecordCloseChild(); + if (ABS(prevPosX) - ABS(D_menu_801CEEB0.x) > 30) { + // @port Skip interpolation + FrameInterpolation_ShouldInterpolateFrame(true); + } else { + // @port Pop the transform id. + FrameInterpolation_RecordCloseChild(); + } + + prevPosX = D_menu_801CEEB0.x; D_menu_801B6B30 -= 45.0f; } @@ -6733,7 +6746,7 @@ void Map_Idle_Update(void) { sMapState = MAP_PATH_CHANGE; D_menu_801CD94C = 0; } else { - loadLevel: + loadLevel: for (i = 0; i < TEAM_ID_MAX; i++) { D_ctx_80177C58[i] = gTeamShields[i]; } |
