Skip to content

Commit cbdbcf3

Browse files
jamessturgesReimousTH
authored andcommitted
Update build instructions for macOS (sonicnext-dev#198)
1 parent 3e2ad7c commit cbdbcf3

116 files changed

Lines changed: 7446 additions & 229 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

MarathonRecomp/api/Marathon.h

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,30 @@
8585
#include "Sonicteam/NoSyncThread.h"
8686
#include "Sonicteam/ObjectVehicle.h"
8787
#include "Sonicteam/ObjectVehicleBike.h"
88+
#include "Sonicteam/PathAnimation/Animation.h"
89+
#include "Sonicteam/PathAnimation/Controller.h"
90+
#include "Sonicteam/PathAnimation/Entity.h"
8891
#include "Sonicteam/PauseAdapter.h"
8992
#include "Sonicteam/PauseTask.h"
93+
#include "Sonicteam/Player/AllListener.h"
94+
#include "Sonicteam/Player/Gravity.h"
95+
#include "Sonicteam/Player/GroundListener.h"
9096
#include "Sonicteam/Player/GroundRayListener.h"
9197
#include "Sonicteam/Player/ICollisionListener.h"
9298
#include "Sonicteam/Player/ICollisionListenerTemplate.h"
9399
#include "Sonicteam/Player/IDynamicLink.h"
94100
#include "Sonicteam/Player/IEventerListener.h"
95101
#include "Sonicteam/Player/IExportExternalFlag.h"
96102
#include "Sonicteam/Player/IExportPostureRequestFlag.h"
103+
#include "Sonicteam/Player/IExportVehicleFlag.h"
97104
#include "Sonicteam/Player/IExportWeaponRequestFlag.h"
98105
#include "Sonicteam/Player/IFlagCommunicator.h"
106+
#include "Sonicteam/Player/IForce.h"
99107
#include "Sonicteam/Player/IGauge.h"
108+
#include "Sonicteam/Player/IImportAnimation.h"
109+
#include "Sonicteam/Player/ILoad.h"
100110
#include "Sonicteam/Player/INotification.h"
111+
#include "Sonicteam/Player/IPath.h"
101112
#include "Sonicteam/Player/IPlugIn.h"
102113
#include "Sonicteam/Player/IPostureControl.h"
103114
#include "Sonicteam/Player/IPosturePlugIn.h"
@@ -113,14 +124,23 @@
113124
#include "Sonicteam/Player/Input/IListener.h"
114125
#include "Sonicteam/Player/Input/ListenerNormal.h"
115126
#include "Sonicteam/Player/Input/TimedAction.h"
127+
#include "Sonicteam/Player/Load.h"
128+
#include "Sonicteam/Player/MovableBody.h"
116129
#include "Sonicteam/Player/Object.h"
130+
#include "Sonicteam/Player/PhysicsBodyList.h"
117131
#include "Sonicteam/Player/PostureControl.h"
132+
#include "Sonicteam/Player/PostureEdge.h"
133+
#include "Sonicteam/Player/PostureVehicle.h"
134+
#include "Sonicteam/Player/RealGroundRayListener.h"
118135
#include "Sonicteam/Player/RootFrame.h"
136+
#include "Sonicteam/Player/RotationGravityAxis.h"
119137
#include "Sonicteam/Player/Score.h"
120138
#include "Sonicteam/Player/SonicGauge.h"
121139
#include "Sonicteam/Player/State/CommonContext.h"
122140
#include "Sonicteam/Player/State/CommonFall.h"
141+
#include "Sonicteam/Player/State/CommonGrind.h"
123142
#include "Sonicteam/Player/State/CommonObject.h"
143+
#include "Sonicteam/Player/State/CommonSpringTemplate.h"
124144
#include "Sonicteam/Player/State/ContextSpeedAndJump.h"
125145
#include "Sonicteam/Player/State/ICommonContext.h"
126146
#include "Sonicteam/Player/State/ICommonContextIF.h"
@@ -130,9 +150,12 @@
130150
#include "Sonicteam/Player/State/Object2.h"
131151
#include "Sonicteam/Player/State/SonicContext.h"
132152
#include "Sonicteam/Player/State/SonicObject.h"
153+
#include "Sonicteam/Player/State/SonicState.h"
133154
#include "Sonicteam/Player/State/TailsContext.h"
134155
#include "Sonicteam/Player/State/TailsFlight.h"
135156
#include "Sonicteam/Player/Unit/ITestCase.h"
157+
#include "Sonicteam/Player/WallListener.h"
158+
#include "Sonicteam/Player/WallRayListener.h"
136159
#include "Sonicteam/Player/Weapon/SonicWeapons.h"
137160
#include "Sonicteam/Player/Zock.h"
138161
#include "Sonicteam/PropFixture.h"
@@ -187,8 +210,10 @@
187210
#include "Sonicteam/SaveDataTask.h"
188211
#include "Sonicteam/SaveDataTaskXENON.h"
189212
#include "Sonicteam/SelectWindowTask.h"
213+
#include "Sonicteam/SoX/AI/State.h"
190214
#include "Sonicteam/SoX/AI/StateMachine.h"
191215
#include "Sonicteam/SoX/ApplicationXenon.h"
216+
#include "Sonicteam/SoX/Array.h"
192217
#include "Sonicteam/SoX/Audio/Cue.h"
193218
#include "Sonicteam/SoX/Audio/IAudioEngine.h"
194219
#include "Sonicteam/SoX/Audio/Player.h"
@@ -205,31 +230,41 @@
205230
#include "Sonicteam/SoX/Graphics/FrameObserver.h"
206231
#include "Sonicteam/SoX/Graphics/Technique.h"
207232
#include "Sonicteam/SoX/Graphics/TechniqueFXL.h"
233+
#include "Sonicteam/SoX/Graphics/Texture.h"
208234
#include "Sonicteam/SoX/Graphics/Transforms.h"
209235
#include "Sonicteam/SoX/Graphics/Vertex.h"
210236
#include "Sonicteam/SoX/Graphics/Xenon/DeviceXenon.h"
211237
#include "Sonicteam/SoX/Graphics/Xenon/TextureXenon.h"
212238
#include "Sonicteam/SoX/IResource.h"
213239
#include "Sonicteam/SoX/IResource2.h"
214240
#include "Sonicteam/SoX/IResourceMgr.h"
241+
#include "Sonicteam/SoX/Input/Listener.h"
215242
#include "Sonicteam/SoX/Input/Manager.h"
216243
#include "Sonicteam/SoX/LinkNode.h"
244+
#include "Sonicteam/SoX/Math/Math.h"
217245
#include "Sonicteam/SoX/Math/Matrix.h"
218246
#include "Sonicteam/SoX/Math/Quaternion.h"
219247
#include "Sonicteam/SoX/Math/Vector.h"
248+
#include "Sonicteam/SoX/Math/__vector.h"
220249
#include "Sonicteam/SoX/Message.h"
221250
#include "Sonicteam/SoX/MessageReceiver.h"
222251
#include "Sonicteam/SoX/Object.h"
252+
#include "Sonicteam/SoX/Physics/Body.h"
223253
#include "Sonicteam/SoX/Physics/Entity.h"
254+
#include "Sonicteam/SoX/Physics/EntityRef.h"
224255
#include "Sonicteam/SoX/Physics/Havok/EntityHavok.h"
225256
#include "Sonicteam/SoX/Physics/Havok/EntityHavokImp.h"
226257
#include "Sonicteam/SoX/Physics/Havok/PhantomHavok.h"
258+
#include "Sonicteam/SoX/Physics/Havok/RayCastHavok.h"
259+
#include "Sonicteam/SoX/Physics/Havok/ShapeCastHavok.h"
227260
#include "Sonicteam/SoX/Physics/Havok/WorldHavok.h"
228261
#include "Sonicteam/SoX/Physics/IntersectEvent.h"
229262
#include "Sonicteam/SoX/Physics/IntersectListener.h"
230263
#include "Sonicteam/SoX/Physics/Phantom.h"
231264
#include "Sonicteam/SoX/Physics/PhantomListener.h"
265+
#include "Sonicteam/SoX/Physics/RayCast.h"
232266
#include "Sonicteam/SoX/Physics/Shape.h"
267+
#include "Sonicteam/SoX/Physics/ShapeCast.h"
233268
#include "Sonicteam/SoX/Physics/ShapeCastEvent.h"
234269
#include "Sonicteam/SoX/Physics/ShapeCastListener.h"
235270
#include "Sonicteam/SoX/Physics/World.h"
@@ -263,22 +298,32 @@
263298
#include "hk330/hkArray.h"
264299
#include "hk330/hkReferencedObject.h"
265300
#include "hk330/hkpBroadPhaseHandle.h"
301+
#include "hk330/hkpBvShape.h"
266302
#include "hk330/hkpCdBody.h"
267303
#include "hk330/hkpCollidable.h"
268304
#include "hk330/hkpCollidableCollidableFilter.h"
269305
#include "hk330/hkpCollisionFilter.h"
270306
#include "hk330/hkpEntity.h"
271307
#include "hk330/hkpLinkedCollidable.h"
308+
#include "hk330/hkpMotion.h"
272309
#include "hk330/hkpPhantom.h"
273310
#include "hk330/hkpProperty.h"
274311
#include "hk330/hkpRayCollidableFilter.h"
275312
#include "hk330/hkpRayShapeCollectionFilter.h"
276313
#include "hk330/hkpRigidBody.h"
277314
#include "hk330/hkpShape.h"
278315
#include "hk330/hkpShapeCollectionFilter.h"
316+
#include "hk330/hkpShapeContainer.h"
317+
#include "hk330/hkpShapeSphere.h"
318+
#include "hk330/hkpSingleShapeContainer.h"
279319
#include "hk330/hkpTypedBroadPhaseHandle.h"
280320
#include "hk330/hkpWorld.h"
281321
#include "hk330/hkpWorldObject.h"
322+
#include "stdx/RTTI.h"
323+
#include "stdx/deque.h"
324+
#include "stdx/list.h"
325+
#include "stdx/map.h"
282326
#include "stdx/string.h"
327+
#include "stdx/type_info.h"
283328
#include "stdx/vector.h"
284329
#include "stdx/wstring.h"

MarathonRecomp/api/Marathon.inl

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

33
#include <cpu/guest_stack_var.h>
4+
#include <cpu/guest_heap_var.h>
45
#include <kernel/function.h>
56

67
constexpr float RAD2DEGf = 57.2958f;
@@ -24,6 +25,9 @@ constexpr double DEG2RAD = 0.01745329238474369;
2425
#define MARATHON_VIRTUAL_FUNCTION(returnType, virtualIndex, ...) \
2526
GuestToHostFunction<returnType>(*(be<uint32_t>*)(g_memory.Translate(*(be<uint32_t>*)(this) + (4 * virtualIndex))), __VA_ARGS__)
2627

28+
#define MARATHON_CALL_VIRTUAL_FUNCTION(base, returnType, func, ...) \
29+
GuestToHostFunction<returnType>((Vftable*)(static_cast<base*>(this)->m_pVftable.get())->*func, ##__VA_ARGS__)
30+
2731
struct marathon_null_ctor {};
2832

2933
inline std::vector<std::string_view> ParseTextVariables(const char* pVariables)
@@ -138,3 +142,13 @@ inline void printU16(const uint16_t* str, bool endianSwap = false)
138142

139143
printf("\n");
140144
}
145+
146+
struct MARATHON_NULL_CTOR {};
147+
148+
struct MARATHON_STD_MAP_CONST_CHAR_COMPARE
149+
{
150+
bool operator()(xpointer<const char> lhs, xpointer<const char> rhs) const
151+
{
152+
return std::strcmp(lhs.get(), rhs.get()) < 0;
153+
}
154+
};

MarathonRecomp/api/Sonicteam/ActorManager.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ namespace Sonicteam
88
class ActorManager
99
{
1010
public:
11-
be<uint32_t> m_aActorIDs[0xFFFF];
12-
xpointer<Actor> m_aActors[0xFFFF];
13-
be<uint32_t> m_LastActorID;
14-
be<uint32_t> m_LastActorIndex;
15-
MARATHON_INSERT_PADDING(4);
16-
};
11+
be<uint32_t> m_ActorID[0xFFFF];
12+
xpointer<Actor> m_Actor[0xFFFF];
13+
be<uint32_t> m_LastActorID;
14+
be<uint32_t> m_LastActorIndex;
1715

18-
MARATHON_ASSERT_OFFSETOF(ActorManager, m_aActorIDs, 0x00);
19-
MARATHON_ASSERT_OFFSETOF(ActorManager, m_aActors, 0x3FFFC);
20-
MARATHON_ASSERT_OFFSETOF(ActorManager, m_LastActorID, 0x7FFF8);
21-
MARATHON_ASSERT_OFFSETOF(ActorManager, m_LastActorIndex, 0x7FFFC);
22-
MARATHON_ASSERT_SIZEOF(ActorManager, 0x80004);
16+
Sonicteam::Actor* FindActor(uint32_t ActorID);
17+
};
2318
}
19+
20+
#include "ActorManager.inl"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#pragma once
2+
3+
namespace Sonicteam
4+
{
5+
inline Actor* ActorManager::FindActor(uint32_t ActorID)
6+
{
7+
unsigned int left = 0;
8+
unsigned int right = this->m_LastActorIndex - 1;
9+
int Index = 0;
10+
11+
while (left <= right) {
12+
unsigned int mid = left + (right - left) / 2;
13+
if (this->m_ActorID[mid] == ActorID) {
14+
Index = mid;
15+
break;
16+
}
17+
if (this->m_ActorID[mid] < ActorID) {
18+
left = mid + 1;
19+
}
20+
else {
21+
right = mid - 1;
22+
}
23+
}
24+
if (!this->m_Actor[Index]) return 0;
25+
return this->m_Actor[Index];
26+
}
27+
}

MarathonRecomp/api/Sonicteam/DocMarathonImp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ namespace Sonicteam
1212
{
1313
public:
1414
MARATHON_INSERT_PADDING(0x40);
15-
stdx::vector<boost::shared_ptr<SoX::Input::Manager>> m_vspInputManager;
15+
stdx::vector<boost::shared_ptr<SoX::Input::Manager>> m_vspInputManagers;
1616
MARATHON_INSERT_PADDING(0x24);
1717
bool m_VFrame;
1818
MARATHON_INSERT_PADDING(0x55B58);
1919
be<uint32_t> m_aPadIDs[4];
2020
MARATHON_INSERT_PADDING(0x2C);
2121
};
2222

23-
MARATHON_ASSERT_OFFSETOF(DocMarathonImp, m_vspInputManager, 0x9C);
23+
MARATHON_ASSERT_OFFSETOF(DocMarathonImp, m_vspInputManagers, 0x9C);
2424
MARATHON_ASSERT_OFFSETOF(DocMarathonImp, m_VFrame, 0xD0);
2525
MARATHON_ASSERT_OFFSETOF(DocMarathonImp, m_aPadIDs, 0x55C2C);
2626
MARATHON_ASSERT_SIZEOF(DocMarathonImp, 0x55C68);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
5+
namespace Sonicteam::PathAnimation
6+
{
7+
class Animation : public SoX::RefCountObject {};
8+
9+
MARATHON_ASSERT_SIZEOF(Animation, 0x8);
10+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/SoX/RefCountObject.h>
5+
#include <Sonicteam/SoX/LinkNode.h>
6+
#include <Sonicteam/SoX/Math/Vector.h>
7+
8+
namespace Sonicteam::PathAnimation
9+
{
10+
class Entity;
11+
12+
class Controller : public SoX::RefCountObject
13+
{
14+
public:
15+
xpointer<Entity> m_pEntity;
16+
SoX::LinkNode<Entity> m_lnEntity;
17+
SoX::Math::Vector m_Position;
18+
SoX::Math::Vector m_Up;
19+
SoX::Math::Vector m_Tangent;
20+
};
21+
22+
MARATHON_ASSERT_SIZEOF(Controller, 0x50);
23+
MARATHON_ASSERT_OFFSETOF(Controller, m_pEntity, 0x8);
24+
MARATHON_ASSERT_OFFSETOF(Controller, m_lnEntity, 0xC);
25+
MARATHON_ASSERT_OFFSETOF(Controller, m_Position, 0x20);
26+
MARATHON_ASSERT_OFFSETOF(Controller, m_Up, 0x30);
27+
MARATHON_ASSERT_OFFSETOF(Controller, m_Tangent, 0x40);
28+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/SoX/RefCountObject.h>
5+
#include <Sonicteam/SoX/RefSharedPointer.h>
6+
#include <Sonicteam/SoX/LinkNode.h>
7+
8+
namespace Sonicteam::PathAnimation
9+
{
10+
class Controller;
11+
class Animation;
12+
13+
class Entity : public SoX::RefCountObject
14+
{
15+
public:
16+
SoX::LinkNode<Controller> m_lnController;
17+
SoX::RefSharedPointer<Animation> m_PathAnimation;
18+
};
19+
20+
MARATHON_ASSERT_SIZEOF(Entity, 0x18);
21+
MARATHON_ASSERT_OFFSETOF(Entity, m_lnController, 0x8);
22+
MARATHON_ASSERT_OFFSETOF(Entity, m_PathAnimation, 0x14);
23+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/Player/ICollisionListenerTemplate.h>
5+
#include <Sonicteam/SoX/Physics/ShapeCastListener.h>
6+
#include <Sonicteam/SoX/Physics/ShapeCastEvent.h>
7+
#include <Sonicteam/SoX/Math/Vector.h>
8+
9+
namespace Sonicteam::Player
10+
{
11+
class AllListener : public ICollisionListenerTemplate<SoX::Physics::ShapeCastListener, SoX::Physics::ShapeCastEvent>
12+
{
13+
public:
14+
SoX::Math::Vector m_Position;
15+
SoX::Math::Vector m_Vector90;
16+
be<float> m_Radius;
17+
uint8_t m_FieldA4; // Flag, Type , Mode ????, 1 or 0
18+
SoX::Math::Vector m_aContactNormals[6]; // m_CurrentSurfaceContacts, all contacts?
19+
be<uint32_t> m_Field110;
20+
};
21+
22+
MARATHON_ASSERT_SIZEOF(AllListener, 0x120);
23+
MARATHON_ASSERT_OFFSETOF(AllListener, m_Position, 0x80);
24+
MARATHON_ASSERT_OFFSETOF(AllListener, m_Vector90, 0x90);
25+
MARATHON_ASSERT_OFFSETOF(AllListener, m_Radius, 0xA0);
26+
MARATHON_ASSERT_OFFSETOF(AllListener, m_FieldA4, 0xA4);
27+
MARATHON_ASSERT_OFFSETOF(AllListener, m_aContactNormals, 0xB0);
28+
MARATHON_ASSERT_OFFSETOF(AllListener, m_Field110, 0x110);
29+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/Player/IForce.h>
5+
#include <Sonicteam/Player/IVariable.h>
6+
#include <Sonicteam/Player/IStepable.h>
7+
#include <Sonicteam/SoX/Math/Vector.h>
8+
9+
namespace Sonicteam::Player
10+
{
11+
class Gravity : public IForce, public IVariable, public IStepable
12+
{
13+
public:
14+
be<float> c_gravity;
15+
be<float> c_pass_fluid;
16+
bool m_Enabled; // ground = false, air = true
17+
be<float> m_DownForce;
18+
SoX::Math::Vector m_DownDirection;
19+
20+
};
21+
22+
MARATHON_ASSERT_SIZEOF(Gravity, 0x60);
23+
MARATHON_ASSERT_OFFSETOF(Gravity, c_gravity, 0x38);
24+
MARATHON_ASSERT_OFFSETOF(Gravity, c_pass_fluid, 0x3C);
25+
MARATHON_ASSERT_OFFSETOF(Gravity, m_Enabled, 0x40);
26+
MARATHON_ASSERT_OFFSETOF(Gravity, m_DownForce, 0x44);
27+
MARATHON_ASSERT_OFFSETOF(Gravity, m_DownDirection, 0x50);
28+
}

0 commit comments

Comments
 (0)