Skip to content

Commit b469def

Browse files
ReimousTHReimousTH
authored andcommitted
Config and Style Fix
1 parent ec49f3f commit b469def

6 files changed

Lines changed: 23 additions & 18 deletions

File tree

MarathonRecomp/api/Marathon.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "CSD/Manager/csdmSubjectBase.h"
1717
#include "CSD/Platform/csdTexList.h"
1818
#include "Sonicteam/Actor.h"
19-
#include "Sonicteam/Fixture.h"
2019
#include "Sonicteam/AlertWindowTask.h"
2120
#include "Sonicteam/AppMarathon.h"
2221
#include "Sonicteam/AudioEngineXenon.h"
@@ -30,6 +29,7 @@
3029
#include "Sonicteam/CsdResource.h"
3130
#include "Sonicteam/DocMarathonImp.h"
3231
#include "Sonicteam/DocMarathonState.h"
32+
#include "Sonicteam/Fixture.h"
3333
#include "Sonicteam/GameImp.h"
3434
#include "Sonicteam/GameMode.h"
3535
#include "Sonicteam/Globals.h"
@@ -50,6 +50,7 @@
5050
#include "Sonicteam/MainMenuTask.h"
5151
#include "Sonicteam/MainMode.h"
5252
#include "Sonicteam/Message/MsgSuckPlayer.h"
53+
#include "Sonicteam/Message/MsgObjJump123GetNextPoint.h"
5354
#include "Sonicteam/MessageWindowTask.h"
5455
#include "Sonicteam/MovieObject.h"
5556
#include "Sonicteam/MovieObjectWmv.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 <Marathon.inl>
4+
#include <Sonicteam/SoX/Math/Vector.h>
5+
#include <Sonicteam/SoX/Message.h>
6+
7+
namespace Sonicteam::Message
8+
{
9+
struct MsgObjJump123GetNextPoint : SoX::Message<0x10007>
10+
{
11+
Sonicteam::SoX::Math::Quaternion m_Rotation;
12+
Sonicteam::SoX::Math::Vector m_Position;
13+
};
14+
}

MarathonRecomp/api/Sonicteam/Player/RootFrame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Sonicteam::Player
1414
public:
1515
SoX::Math::Matrix4x4 m_Field70;
1616
SoX::Math::Matrix4x4 m_FieldB0;
17-
SoX::Math::Vector m_FieldF0;
17+
SoX::Math::Vector m_PositionF0;
1818
SoX::Math::Vector m_Field100;
1919
SoX::Math::Vector m_Impulse;
2020
MARATHON_INSERT_PADDING(0x30);

MarathonRecomp/api/Sonicteam/SoX/MessageReceiver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Sonicteam::SoX
1818

1919
bool OnMessageReceived(IMessage* pMessage)
2020
{
21-
return GuestToHostFunction<uint32_t>(m_pVftable->fpOnMessageReceived, this, pMessage);
21+
return GuestToHostFunction<bool>(m_pVftable->fpOnMessageReceived, this, pMessage);
2222
}
2323
};
2424
}

MarathonRecomp/patches/player_patches.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,11 @@ void RestoreChaosBoostJump(PPCRegister& r10, PPCRegister& r11)
198198
r11.u32 = 2;
199199
}
200200

201-
202201
void RestoreChainJumpFlips1(PPCRegister& r_ObjectPlayer, PPCRegister& r_Message,PPCRegister& r_ObjectContext,PPCRegister& f1, PPCRegister& f2, PPCRegister& f3)
203202
{
203+
if (!Config::RestoreChainJumpFlips)
204+
return;
205+
204206
struct Message0x11047
205207
{
206208
be<uint32_t> m_id;
@@ -220,17 +222,10 @@ void RestoreChainJumpFlips1(PPCRegister& r_ObjectPlayer, PPCRegister& r_Message,
220222
if (pMessage->m_ActorID.get() != -1)
221223
{
222224
auto pFixture = GuestToHostFunction<Sonicteam::Fixture*>(sub_821609D0,App::s_pApp->m_pDoc->GetDocMode<Sonicteam::GameMode>()->m_pGameImp->m_spActorManager.get(), &pMessage->m_ActorID);
223-
struct Message10007:Sonicteam::SoX::Message
224-
{
225-
be<uint32_t> m_id;
226-
Sonicteam::SoX::Math::Quaternion m_Rotation;
227-
Sonicteam::SoX::Math::Vector m_Position;
228-
};
229-
auto sMessage = guest_stack_var<Message10007>();
230-
sMessage->m_id = 0x10007;
225+
auto sMessage = guest_stack_var<Sonicteam::Message::MsgObjJump123GetNextPoint>();
231226
sMessage->m_Rotation = { 0,0,0,1 };
232227
sMessage->m_Position = { 0,0,0,1 };
233-
if (pFixture->OnMessageRecieved(sMessage))
228+
if (pFixture->OnMessageReceived(sMessage))
234229
{
235230
Target = sMessage->m_Position;
236231
}

MarathonRecompLib/config/Marathon.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,6 @@ name = "RestoreChainJumpFlips1"
422422
address = 0x82199654
423423
registers = ["r31","r30","r11","f1", "f2", "f3"]
424424

425-
[[midasm_hook]]
426-
name = "RestoreChainJumpFlips2"
427-
address = 0x82199654
428-
registers = ["r10","r11","r3"]
429-
430425
[[midasm_hook]]
431426
name = "DisablePushState"
432427
address = 0x821A03F0

0 commit comments

Comments
 (0)