Skip to content

Commit 88dfa8c

Browse files
committed
Finish rebase + Cleanup
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
1 parent bbdbf1e commit 88dfa8c

9 files changed

Lines changed: 78 additions & 82 deletions

File tree

MarathonRecomp/api/Sonicteam/Player/GroundRayListener.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
namespace Sonicteam::Player
1212
{
13-
class GroundRayListener:public ICollisionListenerTemplate<Sonicteam::SoX::Physics::IntersectListener, Sonicteam::SoX::Physics::IntersectEvent>
13+
class GroundRayListener:public ICollisionListenerTemplate<SoX::Physics::IntersectListener, SoX::Physics::IntersectEvent>
1414
{
1515
public:
1616
SoX::Math::Vector m_ContactPosition;
1717
SoX::Math::Vector m_ContactNormal;
18-
be<float> m_RayDistance; //not sure
19-
be<uint32_t> m_RayFlag; //not sure
20-
SoX::LinkRef<Sonicteam::SoX::Physics::Entity> m_ContactEntity;
18+
be<float> m_RayDistance; // Not sure
19+
be<uint32_t> m_RayFlag; // Not sure
20+
SoX::LinkRef<SoX::Physics::Entity> m_ContactEntity;
2121
MARATHON_INSERT_PADDING(0xC);
2222
};
2323
}

MarathonRecomp/api/Sonicteam/Player/ICollisionListener.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22

33
#include <Marathon.inl>
4-
#include <Sonicteam/SoX/Math/Quaternion.h>
54

65
namespace Sonicteam::Player
76
{

MarathonRecomp/api/Sonicteam/Player/IPostureControl.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <Sonicteam/Player/IVariable.h>
88
#include <Sonicteam/Player/IPosturePlugIn.h>
99
#include <Sonicteam/Player/Unit/ITestCase.h>
10-
#include <Sonicteam/SoX/RefCountObject.h>
1110
#include <Sonicteam/SoX/RefSharedPointer.h>
1211
#include <Sonicteam/SoX/Math/Vector.h>
1312
#include <Sonicteam/SoX/Engine/Task.h>
@@ -21,7 +20,7 @@ namespace Sonicteam::Player
2120
class IPostureControl : public IVariable, public IDynamicLink, public Unit::ITestCase, public IFlagCommunicator
2221
{
2322
public:
24-
SoX::RefSharedPointer<SoX::RefCountObject> m_spRootFrame;
23+
SoX::RefSharedPointer<> m_spRootFrame;
2524
SoX::Math::Quaternion m_RotationFixed;
2625
SoX::Math::Vector m_PositionFixed;
2726
SoX::RefSharedPointer<SoX::Physics::World> m_spWorld;
@@ -34,7 +33,7 @@ namespace Sonicteam::Player
3433
boost::shared_ptr<IPosturePlugIn> m_spPosturePlugIn;
3534
SoX::Math::Vector m_GravityDirection;
3635
be<float> m_GravityForce;
37-
SoX::Math::Vector m_NormalizedSurface; //ground normal?
36+
SoX::Math::Vector m_NormalizedSurface; // Ground normal?
3837
SoX::Math::Vector m_Position;
3938
SoX::Math::Quaternion m_Rotation;
4039
MARATHON_INSERT_PADDING(0x20);

MarathonRecomp/api/Sonicteam/Player/Object.h

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@
66
#include <Sonicteam/Player/IGauge.h>
77
#include <Sonicteam/Player/IPlugIn.h>
88
#include <Sonicteam/Player/RootFrame.h>
9+
#include <Sonicteam/Player/IPostureControl.h>
910
#include <Sonicteam/SoX/RefSharedPointer.h>
1011
#include <stdx/vector.h>
1112

1213
namespace Sonicteam::Player
1314
{
1415
class Object : public Actor
1516
{
17+
struct ObjectPlayerUpgrade
18+
{
19+
uint32_t global_flag;
20+
uint32_t equip_flag;
21+
};
22+
1623
public:
1724
class CreationParams
1825
{
@@ -27,21 +34,33 @@ namespace Sonicteam::Player
2734
be<uint32_t> m_TargetCameraActorID;
2835
xpointer<MessageReceiver> m_pCameraman; // Here as MessageReceiver
2936
be<uint32_t> m_PlayerIndex;
30-
MARATHON_INSERT_PADDING(0x2C);
37+
be<uint32_t> m_PlayerControllerIndex;
38+
SoX::Math::Quaternion m_SpawnRotation;
39+
SoX::Math::Vector m_SpawnPosition;
40+
be<uint32_t> m_SpawnRing;
41+
SoX::RefSharedPointer<> m_spSpawnSource; // REF_TYPE(RefCountObject)
3142
bool m_IsPlayer;
3243
bool m_IsPosture;
3344
bool m_IsAmigo;
3445
MARATHON_INSERT_PADDING(1);
3546
SoX::RefSharedPointer<RootFrame> m_spRootFrame;
36-
MARATHON_INSERT_PADDING(0x14);
47+
SoX::RefSharedPointer<> m_spPackageBinary;
48+
boost::shared_ptr<void> m_spPlayerModel;
49+
boost::shared_ptr<IPostureControl> m_spPlayerPosture;
3750
boost::shared_ptr<State::Machine2> m_spStateMachine;
38-
MARATHON_INSERT_PADDING(0x10);
51+
boost::shared_ptr<void> m_spPlayerGravity;
52+
boost::shared_ptr<void> m_spPlayerImpulse;
3953
be<uint32_t> m_SetupModuleIndexPrefix;
4054
be<uint32_t> m_SetupModuleIndexPostfix;
4155
boost::shared_ptr<IGauge> m_spGauge;
4256
MARATHON_INSERT_PADDING(8);
4357
stdx::vector<boost::shared_ptr<IPlugIn>> m_vspPlayerPlugins;
44-
MARATHON_INSERT_PADDING(0x1F4);
58+
MARATHON_INSERT_PADDING(0x58);
59+
be<float> m_PlayerDelta;
60+
MARATHON_INSERT_PADDING(0x48);
61+
stdx::vector<ObjectPlayerUpgrade> m_PlayerUpgrade;
62+
stdx::string m_PlayerName;
63+
MARATHON_INSERT_PADDING(0x134);
4564

4665
template <typename T = IGauge>
4766
T* GetGauge()

MarathonRecomp/api/Sonicteam/Player/PostureControl.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ namespace Sonicteam::Player
1414
class PostureControl : public IPostureControl, public IPostureSupportSphere, public IPostureSupportOttoto, public IPostureSupportEdge, public IPostureSupportInput, public IPostureSupportRayTemplate<GroundRayListener>
1515
{
1616
public:
17-
//Gordon Ramsay
17+
// Credit to Gordon Ramsay
1818
enum PostureFlag
1919
{
20-
PostureFlag_Ground = 0x1, // detects Ground
21-
PostureFlag_WallBrushing = 0x8, // detects brushing against a wall
22-
PostureFlag_HeadOnWall = 0x10, // detects head-on wall collision (will always be enabled w/ WallBrushing)
20+
PostureFlag_Ground = 0x1, // Detects Ground
21+
PostureFlag_WallBrushing = 0x8, // Detects brushing against a wall
22+
PostureFlag_HeadOnWall = 0x10, // Detects head-on wall collision (will always be enabled w/ WallBrushing)
2323
PostureFlag_RailGrind = 0x40, // Rail grinding
24-
PostureFlag_BeforeFall = 0x100, // seems like Neutral or Pre-Fall? The moment before transitioning from the Jump to Fall animation
24+
PostureFlag_BeforeFall = 0x100, // Seems like Neutral or Pre-Fall? The moment before transitioning from the Jump to Fall animation
2525
PostureFlag_Fall = 0x200, // FALL
2626
PostureFlag_WaterCollision = 0x800, // Water collision (making you slide down an incline)? BeforeFall is often set with this
2727
PostureFlag_LightDash = 0x4000, // Light Dashing
28-
PostureFlag_QuickRotate = 0x8000, // is moving the control stick in a non-forward direction (usually only active for a frame since the character instantly rotates)
29-
PostureFlag_Tentative = 0x10000, // is Tentative collision
28+
PostureFlag_QuickRotate = 0x8000, // Is moving the control stick in a non-forward direction (usually only active for a frame since the character instantly rotates)
29+
PostureFlag_Tentative = 0x10000, // Is Tentative collision
3030
PostureFlag_WaterSlide = 0x20000, // Water sliding
31-
PostureFlag_Grass = 0x100000, // grass
32-
PostureFlag_DirtClay = 0x200000, // dirt/clay
33-
PostureFlag_Stone = 0x400000, // stone
34-
PostureFlag_Shoreline = 0x1000000 // shoreline? sand? Uncertain
31+
PostureFlag_Grass = 0x100000, // Grass
32+
PostureFlag_DirtClay = 0x200000, // Dirt/clay
33+
PostureFlag_Stone = 0x400000, // Stone
34+
PostureFlag_Shoreline = 0x1000000 // Shoreline? sand? Uncertain
3535
};
3636
// 0x314 ... 0x400
3737
};

MarathonRecomp/api/Sonicteam/Player/State/CommonContext.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#pragma once
2+
23
#include <Marathon.inl>
34
#include <Sonicteam/Player/State/ICommonContext.h>
45
#include <Sonicteam/Player/IExportPostureRequestFlag.h>
@@ -23,7 +24,7 @@ namespace Sonicteam::Player::State
2324
be<uint32_t> m_VehicleFlag;
2425
be<uint32_t> m_AmigoFlag;
2526
MARATHON_INSERT_PADDING(0x50);
26-
boost::shared_ptr<Score> m_pScore; //on merge, rename to spScore also do not forget about player_patches.cpp
27+
boost::shared_ptr<Score> m_spScore;
2728
MARATHON_INSERT_PADDING(0x100);
2829
};
2930
}

MarathonRecomp/api/Sonicteam/Player/State/ICommonContext.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
#pragma once
2+
23
#include <Marathon.inl>
34
#include <Sonicteam/Player/State/ContextSpeedAndJump.h>
45
#include <Sonicteam/Player/State/ICommonContextIF.h>
56
#include <Sonicteam/Player/State/IContext.h>
6-
#include <Sonicteam/SoX/Math/Vector.h>
7-
#include <Sonicteam/SoX/Math/Quaternion.h>
8-
97

108
namespace Sonicteam::Player::State
119
{
@@ -24,5 +22,4 @@ namespace Sonicteam::Player::State
2422
MARATHON_INSERT_PADDING(0x2C);
2523
};
2624
//0x90
27-
2825
}

MarathonRecomp/api/Sonicteam/Player/State/SonicContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Sonicteam::Player::State
1010
class SonicContext : public CommonContext
1111
{
1212
public:
13-
//Sprite
13+
// Sprite
1414
enum GemSprite:uint32_t
1515
{
1616
GemSprite_Green = 1,
@@ -36,7 +36,7 @@ namespace Sonicteam::Player::State
3636
};
3737

3838
be<GemSprite> m_CurrentGemSprite;
39-
boost::shared_ptr<Sonicteam::Player::SonicGauge> m_Gauge;
39+
boost::shared_ptr<SonicGauge> m_Gauge;
4040
uint8_t m_HomingLockOn;
4141
uint8_t m_DisablePlayerMovement;
4242
uint8_t m_AntigravityHitBox;

0 commit comments

Comments
 (0)