Skip to content

Commit 224f61c

Browse files
author
ReimousTH
committed
Particle HFR
1 parent 832c838 commit 224f61c

4 files changed

Lines changed: 40 additions & 3 deletions

File tree

MarathonRecomp/api/Marathon.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
#include "Sonicteam/StdImageFilters/BurnoutBlurFilter.h"
137137
#include "Sonicteam/StdImageFilters/SingleTechniqueFilter.h"
138138
#include "Sonicteam/System/CreateStatic.h"
139+
#include "Sonicteam/System/Diagnostic/Perfomance.h"
139140
#include "Sonicteam/System/Singleton.h"
140141
#include "Sonicteam/TextBook.h"
141142
#include "Sonicteam/TextBookMgr.h"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#pragma once
2+
3+
#include <Sonicteam/System/Singleton.h>
4+
#include <Sonicteam/System/CreateStatic.h>
5+
6+
namespace Sonicteam::System::Diagnostic
7+
{
8+
9+
class Perfomance:public Singleton<Perfomance,0x82D3B210,CreateStatic<Perfomance,0x82581C88>>
10+
{
11+
public:
12+
be<uint64_t> m_LastFrequency;
13+
};
14+
}

MarathonRecomp/patches/fps_patches.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void PlayerObject_ProcessMsgSuckPlayer_FixDeltaTime(PPCRegister& message, PPCReg
122122
auto pMessage = (MsgSuckPlayerEx*)g_memory.Translate(message.u32);
123123

124124
deltaTime.f64 = pMessage->DeltaTime;
125-
125+
}
126126
//not need anything here
127127
void ParticleHFR_826454C8(PPCRegister& f31)
128128
{
@@ -132,10 +132,20 @@ void ParticleHFR_826454C8(PPCRegister& f31)
132132
void ParticleHFR_82670658(PPCRegister& f1,PPCRegister& stack)
133133
{
134134
auto delta = ((be<double>*)(g_memory.Translate(stack.u32 + 0x1A0 - 0x48 - 8)))->get();
135-
f1.f64 = App::s_deltaTime; //find delta normally, someday
135+
f1.f64 = App::s_deltaTime;
136136
}
137137

138138
void ParticleHFR_8266A418_1(PPCRegister& f31,PPCRegister& stack)
139139
{
140-
f31.f64 = App::s_deltaTime; //find delta normally, someday
140+
f31.f64 = App::s_deltaTime;
141+
}
142+
143+
void ParticleHFR_82673F88(PPCRegister& f13,PPCRegister& stack)
144+
{
145+
f13.f64 = App::s_deltaTime;
146+
}
147+
148+
void ParticleHFR_82674550(PPCRegister& f13,PPCRegister& stack)
149+
{
150+
f13.f64 = App::s_deltaTime;
141151
}

MarathonRecompLib/config/Marathon.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,3 +526,15 @@ name = "ParticleHFR_8266A418_1"
526526
address = 0x8266A57C
527527
registers = ["f31","r1"]
528528
after_instruction = true
529+
530+
[[midasm_hook]]
531+
name = "ParticleHFR_82673F88"
532+
address = 0x8267402C
533+
registers = ["f13","r1"]
534+
after_instruction = true
535+
536+
[[midasm_hook]]
537+
name = "ParticleHFR_82674550"
538+
address = 0x826747FC
539+
registers = ["f13","r1"]
540+
after_instruction = true

0 commit comments

Comments
 (0)