mirror of
https://github.com/sal063/AC6_recomp
synced 2026-07-07 22:22:22 -04:00
c2e2fbfbbc
Suspend the FPS unlock while a demo-manager Exec (DD sub_82184460 / EM sub_821856F8) ticks, so the frame-locked IngameCinematics Sequencer plays at native ~30fps instead of double speed. Adds ac6_cutscene_clamp CVar (default on).
37 lines
1012 B
C++
37 lines
1012 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
#include <rex/cvar.h>
|
|
#include <rex/ppc/types.h>
|
|
|
|
REXCVAR_DECLARE(bool, ac6_unlock_fps);
|
|
REXCVAR_DECLARE(bool, ac6_timing_hooks_enabled);
|
|
REXCVAR_DECLARE(bool, ac6_cutscene_clamp);
|
|
|
|
namespace ac6 {
|
|
|
|
struct FrameStats {
|
|
double frame_time_ms{0.0};
|
|
double fps{0.0};
|
|
uint64_t frame_count{0};
|
|
};
|
|
|
|
FrameStats GetFrameStats();
|
|
|
|
// True while an in-engine cutscene (NU::FW::IngameCinematics, driven by
|
|
// CAce6DemoManager::Exec) has ticked within the last decay window. Used by the
|
|
// timing hooks to suspend the 60fps unlock so cutscenes play at native cadence.
|
|
bool IsCinematicActive();
|
|
|
|
} // namespace ac6
|
|
|
|
bool ac6FlipIntervalHook();
|
|
bool ac6PresentIntervalHook(PPCRegister& r10);
|
|
void ac6DeltaDivisorHook(PPCRegister& r29);
|
|
void ac6PresentTimingHook(PPCRegister& r31);
|
|
|
|
// Fires once per frame from the demo-manager Exec while a cutscene is playing.
|
|
// r3 = the demo-manager `this`; unused (presence-of-call is the signal).
|
|
void ac6CinematicTickHook(PPCRegister& r3);
|