Skip to content

Commit af75753

Browse files
committed
Style
1 parent 62ae340 commit af75753

8 files changed

Lines changed: 38 additions & 25 deletions

File tree

MarathonRecomp/api/Sonicteam/DocMarathonImp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <boost/smart_ptr/shared_ptr.h>
77
#include <api/stdx/vector.h>
88

9-
109
namespace Sonicteam
1110
{
1211
class DocMarathonImp : public SoX::Engine::Doc

MarathonRecomp/api/Sonicteam/GameImp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Sonicteam
3737
template <typename T>
3838
inline T* GetPhysicsWorld();
3939

40-
uint32_t PlayerActorIDToIndex(uint32_t ActorID)
40+
int32_t PlayerActorIDToIndex(int32_t ActorID)
4141
{
4242
for (int i = 0; i < 4; i++)
4343
{

MarathonRecomp/api/Sonicteam/Player/Object.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ namespace Sonicteam::Player
1111
MARATHON_INSERT_PADDING(0x40);
1212
be<uint32_t> m_PlayerIndex;
1313
MARATHON_INSERT_PADDING(0x2C);
14-
uint8_t isPlayer;
15-
uint8_t isPosture;
16-
uint8_t isAI;
14+
bool m_IsPlayer;
15+
bool m_IsPosture;
16+
bool m_IsAmigo; //AI::Amigo
1717
MARATHON_INSERT_PADDING(0x19);
1818
boost::shared_ptr<State::Machine2> m_spStateMachine;
1919
MARATHON_INSERT_PADDING(0x10);

MarathonRecomp/api/Sonicteam/SoX/Input/Manager.h

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,48 @@
55
namespace Sonicteam::SoX::Input
66
{
77
static const uint32_t XENON_GAMEPAD_BACK = 2048;
8-
struct MGamepad
8+
9+
enum KeyState
10+
{
11+
KeyState_DpadUp = 0x40,
12+
KeyState_DpadDown = 0x80,
13+
KeyState_DpadLeft = 0x100,
14+
KeyState_DpadRight = 0x200,
15+
KeyState_Start = 0x400,
16+
KeyState_Select = 0x800,
17+
KeyState_LeftStick = 0x10000,
18+
KeyState_RightStick = 0x20000,
19+
KeyState_LeftBumper = 0x1000,
20+
KeyState_RightBumper = 0x2000,
21+
KeyState_A = 0x1,
22+
KeyState_B = 0x2,
23+
KeyState_X = 0x8,
24+
KeyState_Y = 0x10,
25+
};
26+
27+
struct PadState
928
{
10-
be<uint32_t> wLastButtons;
11-
be<uint32_t> wCLastButtons; // ~wLastButtons
29+
be<uint32_t> LastButtons;
30+
be<uint32_t> InvertedLastButtons; // ~wLastButtons
1231
MARATHON_INSERT_PADDING(8);
1332

14-
//Left Stick
15-
be<float> fX1;
16-
be<float> fY1;
17-
be<short> sThumbLX;
18-
be<short> sThumbLY;
33+
be<float> LeftStickHorizontal;
34+
be<float> LeftStickVertical;
35+
be<short> LeftStickHorizontalS16;
36+
be<short> LeftStickVerticalS16;
1937

20-
//Right Stick
21-
be<float> fX2;
22-
be<float> fY2;
23-
be<short> sThumbRX;
24-
be<short> sThumbRY;
38+
be<float> RightStickHorizontal;
39+
be<float> RightStickVertical;
40+
be<short> RightStickHorizontalS16;
41+
be<short> RightStickVerticalS16;
2542
};
2643

2744
class Manager
2845
{
2946
public:
3047
be<uint32_t> m_ControllerID;
3148
MARATHON_INSERT_PADDING(0xC);
32-
MGamepad m_Gamepad;
49+
PadState m_PadState;
3350
MARATHON_INSERT_PADDING(0x28);
3451
};
3552
}

MarathonRecomp/api/stdx/string.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <kernel/heap.h>
44
#include <kernel/function.h>
55

6-
76
namespace stdx
87
{
98
class string
@@ -68,7 +67,6 @@ namespace stdx
6867
_bx._buffer[0] = '\0';
6968
}
7069

71-
7270
void cleanup()
7371
{
7472
if (!is_short()) {

MarathonRecomp/api/stdx/vector.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ namespace stdx
1717
{
1818
return *(Type*)((uint64_t)_MyFirst.get() + (index * sizeof(Type)));
1919
}
20+
2021
size_t size()
2122
{
2223
return (_MyLast.ptr.get() - _MyFirst.ptr.get()) / sizeof(Type);
2324
}
2425
};
25-
}
26+
}
27+

MarathonRecomp/patches/player_patches.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ bool MidairSnowboardControl3()
100100
return Config::MidairControlForSnowboards;
101101
}
102102

103-
104103
//Add Missing SetupModuleDebug to table
105104
void DebugPlayerSwitch_0(PPCRegister& r_sstring, PPCRegister& r_index)
106105
{

MarathonRecompLib/config/Marathon.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@ name = "FurtherObjectShadows"
200200
address = 0x8260D7E0
201201
registers = ["r26"]
202202

203-
204-
205203
[[midasm_hook]]
206204
name = "DebugPlayerSwitch_0"
207205
address = 0x82195AD0

0 commit comments

Comments
 (0)