Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mm/2s2h/BenPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ extern "C" uint32_t Ship_GetInterpolationFPS() {
return OTRGlobals::Instance->GetInterpolationFPS();
}

// Numer of interpolated frames
extern "C" uint32_t Ship_GetInterpolationFrameCount() {
return ceil((float)Ship_GetInterpolationFPS() / 20.0f);
}

struct ExtensionEntry {
std::string path;
std::string ext;
Expand Down Expand Up @@ -928,8 +933,11 @@ void RunCommands(Gfx* Commands, const std::vector<std::unordered_map<Mtx*, MtxF>
// Process window events for resize, mouse, keyboard events
wnd->HandleEvents();

gInterpolationIndex = 0;

for (const auto& m : mtx_replacements) {
wnd->DrawAndRunGraphicsCommands(Commands, m);
gInterpolationIndex++;
}
}

Expand Down
1 change: 1 addition & 0 deletions mm/2s2h/BenPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void Controller_UnblockGameInput();
void Overlay_DisplayText(float duration, const char* text);
void Overlay_DisplayText_Seconds(int seconds, const char* text);
uint32_t Ship_GetInterpolationFPS();
uint32_t Ship_GetInterpolationFrameCount();

void Gfx_RegisterBlendedTexture(const char* name, u8* mask, u8* replacement);
void Gfx_UnregisterBlendedTexture(const char* name);
Expand Down
Loading
Loading