diff options
| author | Eblo <7004497+Eblo@users.noreply.github.com> | 2026-01-20 20:27:47 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-20 20:27:47 -0500 |
| commit | a4360a25cd3dfec3653890f86b812facfa6ddee3 (patch) | |
| tree | 5298f3ff34f80a3798caf7f16755ea4604ffd2b8 /mm/2s2h/BenPort.cpp | |
| parent | d7bd6f9c7df615cd1b41a5b482e2589a6a03cca0 (diff) | |
Texture scrolling interpolation, Take 2 (#1332)
* Scrolling texture interpolation
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
* Interpolate remaining GIs
* Clean up gDPSetTileSizeInterp
---------
Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com>
Diffstat (limited to 'mm/2s2h/BenPort.cpp')
| -rw-r--r-- | mm/2s2h/BenPort.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/2s2h/BenPort.cpp b/mm/2s2h/BenPort.cpp index 1fdec6562..6f0146094 100644 --- a/mm/2s2h/BenPort.cpp +++ b/mm/2s2h/BenPort.cpp @@ -331,6 +331,11 @@ extern "C" uint32_t Ship_GetInterpolationFPS() { return OTRGlobals::Instance->GetInterpolationFPS(); } +// Number of interpolated frames +extern "C" uint32_t Ship_GetInterpolationFrameCount() { + return ceil((float)Ship_GetInterpolationFPS() / 20.0f); +} + struct ExtensionEntry { std::string path; std::string ext; @@ -911,8 +916,12 @@ void RunCommands(Gfx* Commands, const std::vector<std::unordered_map<Mtx*, MtxF> // Process window events for resize, mouse, keyboard events wnd->HandleEvents(); + auto intp = wnd->GetInterpreterWeak().lock().get(); + intp->mInterpolationIndex = 0; + for (const auto& m : mtx_replacements) { wnd->DrawAndRunGraphicsCommands(Commands, m); + intp->mInterpolationIndex++; } } |
