Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions MarathonRecomp/api/Marathon.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "CSD/Manager/csdmSubjectBase.h"
#include "CSD/Platform/csdTexList.h"
#include "Sonicteam/Actor.h"
#include "Sonicteam/ActorManager.h"
#include "Sonicteam/AlertWindowTask.h"
#include "Sonicteam/AppMarathon.h"
#include "Sonicteam/AudioEngineXenon.h"
Expand All @@ -36,21 +37,33 @@
#include "Sonicteam/MyGraphicsDevice.h"
#include "Sonicteam/MyPhantom.h"
#include "Sonicteam/MyTexture.h"
#include "Sonicteam/Player/GroundRayListener.h"
#include "Sonicteam/Player/IDynamicLink.h"
#include "Sonicteam/Player/IExportExternalFlag.h"
#include "Sonicteam/Player/IExportPostureRequestFlag.h"
#include "Sonicteam/Player/IExportWeaponRequestFlag.h"
#include "Sonicteam/Player/IFlagCommunicator.h"
#include "Sonicteam/Player/IGauge.h"
#include "Sonicteam/Player/INotification.h"
#include "Sonicteam/Player/IPlugIn.h"
#include "Sonicteam/Player/IPostureControl.h"
#include "Sonicteam/Player/IPosturePlugIn.h"
#include "Sonicteam/Player/IPostureSupportEdge.h"
#include "Sonicteam/Player/IPostureSupportInput.h"
#include "Sonicteam/Player/IPostureSupportOttoto.h"
#include "Sonicteam/Player/IPostureSupportRayTemplate.h"
#include "Sonicteam/Player/IPostureSupportSphere.h"
#include "Sonicteam/Player/IScore.h"
#include "Sonicteam/Player/IStepable.h"
#include "Sonicteam/Player/IVariable.h"
#include "Sonicteam/Player/IZock.h"
#include "Sonicteam/Player/Object.h"
#include "Sonicteam/Player/PostureControl.h"
#include "Sonicteam/Player/RootFrame.h"
#include "Sonicteam/Player/Score.h"
#include "Sonicteam/Player/SonicGauge.h"
#include "Sonicteam/Player/ICollisionListener.h"
#include "Sonicteam/Player/ICollisionListenerTemplate.h"
#include "Sonicteam/Player/State/CommonContext.h"
#include "Sonicteam/Player/State/CommonFall.h"
#include "Sonicteam/Player/State/CommonObject.h"
Expand All @@ -65,10 +78,13 @@
#include "Sonicteam/Player/State/SonicObject.h"
#include "Sonicteam/Player/State/SonicSpinDash.h"
#include "Sonicteam/Player/State/TailsContext.h"
#include "Sonicteam/Player/Unit/ITestCase.h"
#include "Sonicteam/Player/Weapon/SonicWeapons.h"
#include "Sonicteam/Player/Zock.h"
#include "Sonicteam/SaveDataTask.h"
#include "Sonicteam/SaveDataTaskXENON.h"
#include "Sonicteam/SelectWindowTask.h"
#include "Sonicteam/SoX/LinkNode.h"
#include "Sonicteam/SoX/AI/StateMachine.h"
#include "Sonicteam/SoX/Audio/IAudioEngine.h"
#include "Sonicteam/SoX/Component.h"
Expand All @@ -88,7 +104,12 @@
#include "Sonicteam/SoX/Math/Vector.h"
#include "Sonicteam/SoX/MessageReceiver.h"
#include "Sonicteam/SoX/Object.h"
#include "Sonicteam/SoX/LinkNode.h"
#include "Sonicteam/SoX/Physics/Entity.h"
#include "Sonicteam/SoX/Physics/IntersectEvent.h"
#include "Sonicteam/SoX/Physics/IntersectListener.h"
#include "Sonicteam/SoX/Physics/ShapeCastEvent.h"
#include "Sonicteam/SoX/Physics/ShapeCastListener.h"
#include "Sonicteam/SoX/Physics/Havok/EntityHavok.h"
#include "Sonicteam/SoX/Physics/Havok/EntityHavokImp.h"
#include "Sonicteam/SoX/Physics/Havok/PhantomHavok.h"
Expand Down
16 changes: 16 additions & 0 deletions MarathonRecomp/api/Sonicteam/ActorManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include <Marathon.inl>
#include <Sonicteam/Actor.h>

namespace Sonicteam
{
class ActorManager
{
public:
be<uint32_t> m_ActorID[0xFFFF];
xpointer<Actor> m_Actor[0xFFFF];
be<uint32_t> m_LastActorID;
be<uint32_t> m_LastActorIndex;
};
}
2 changes: 1 addition & 1 deletion MarathonRecomp/api/Sonicteam/GameImp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Sonicteam
{
be<uint32_t> ActorID;
be<uint32_t> RingCount;
MARATHON_INSERT_PADDING(4);
be<uint32_t> TownRingCount;
be<uint32_t> LifeCount;
be<uint32_t> ScoreCount;
be<float> AliveTime;
Expand Down
23 changes: 23 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/GroundRayListener.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#pragma once

#include <Marathon.inl>
#include <Sonicteam/Player/ICollisionListenerTemplate.h>
#include <Sonicteam/SoX/Physics/IntersectListener.h>
#include <Sonicteam/SoX/Physics/IntersectEvent.h>
#include <Sonicteam/SoX/Math/Vector.h>
#include <Sonicteam/SoX/Physics/Entity.h>
#include <Sonicteam/SoX/LinkNode.h>

namespace Sonicteam::Player
{
class GroundRayListener:public ICollisionListenerTemplate<Sonicteam::SoX::Physics::IntersectListener, Sonicteam::SoX::Physics::IntersectEvent>
{
public:
SoX::Math::Vector m_ContactPosition;
SoX::Math::Vector m_ContactNormal;
be<float> m_RayDistance; //not sure
be<uint32_t> m_RayFlag; //not sure
SoX::LinkRef<Sonicteam::SoX::Physics::Entity> m_ContactEntity;
MARATHON_INSERT_PADDING(0xC);
};
}
19 changes: 19 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/ICollisionListener.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <Marathon.inl>
#include <Sonicteam/SoX/Math/Quaternion.h>

namespace Sonicteam::Player
{
class ICollisionListener
{
public:
xpointer<void> m_pVftable;
MARATHON_INSERT_PADDING(0xC);
be<uint32_t> m_Flag1;
be<uint32_t> m_Flag2;
be<uint32_t> m_Flag3;
MARATHON_INSERT_PADDING(0x4);
SoX::Math::Vector m_CollisionNormal;
};
}
10 changes: 10 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/ICollisionListenerTemplate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

#include <Marathon.inl>
#include <Sonicteam/Player/ICollisionListener.h>

namespace Sonicteam::Player
{
template <typename Cast, typename Event>
class ICollisionListenerTemplate:ICollisionListener,Cast {};
}
12 changes: 12 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/INotification.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <Marathon.inl>

namespace Sonicteam::Player
{
class INotification
{
public:
xpointer<void> m_pVftable;
};
}
50 changes: 50 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/IPostureControl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#pragma once

#include <Marathon.inl>
#include <Sonicteam/Player/IFlagCommunicator.h>
#include <Sonicteam/Player/State/ICommonContextIF.h>
#include <Sonicteam/Player/IDynamicLink.h>
#include <Sonicteam/Player/IVariable.h>
#include <Sonicteam/Player/IPosturePlugIn.h>
#include <Sonicteam/Player/Unit/ITestCase.h>
#include <Sonicteam/SoX/RefCountObject.h>
#include <Sonicteam/SoX/RefSharedPointer.h>
#include <Sonicteam/SoX/Math/Vector.h>
#include <Sonicteam/SoX/Engine/Task.h>
#include <Sonicteam/SoX/Math/Quaternion.h>
#include <Sonicteam/SoX/Physics/World.h>
#include <boost/smart_ptr/shared_ptr.h>
#include <Sonicteam/ActorManager.h>

namespace Sonicteam::Player
{
class IPostureControl : public IVariable, public IDynamicLink, public Unit::ITestCase, public IFlagCommunicator
{
public:
SoX::RefSharedPointer<SoX::RefCountObject> m_spRootFrame;
SoX::Math::Quaternion m_RotationFixed;
SoX::Math::Vector m_PositionFixed;
SoX::RefSharedPointer<SoX::Physics::World> m_spWorld;
boost::shared_ptr<void> m_spGravity;
boost::shared_ptr<void> m_spInputListener;
boost::shared_ptr<void> m_spAmigoListener;
boost::shared_ptr<State::ICommonContextIF> m_ContextIF;
boost::shared_ptr<ActorManager> m_spActorManager;
xpointer<SoX::Engine::Task> m_pTask;
boost::shared_ptr<IPosturePlugIn> m_spPosturePlugIn;
SoX::Math::Vector m_GravityDirection;
be<float> m_GravityForce;
SoX::Math::Vector m_NormalizedSurface; //ground normal?
SoX::Math::Vector m_Position;
SoX::Math::Quaternion m_Rotation;
MARATHON_INSERT_PADDING(0x20);
be<uint32_t> m_PostureFlag;
be<float> m_ImpulseForward;
be<float> m_ImpulseVertical;
SoX::Math::Vector m_ImpulseUP;
be<uint32_t> m_ContextIFFlag;
be<uint32_t> m_PostureRequestFlag;
be<uint32_t> m_PostureFlag118;
be<uint32_t> m_PostureFlag11C;
};
}
12 changes: 12 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/IPosturePlugIn.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <Marathon.inl>

namespace Sonicteam::Player
{
class IPosturePlugIn
{
public:
xpointer<void> m_pVftable;
};
}
13 changes: 13 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/IPostureSupportEdge.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <Marathon.inl>

namespace Sonicteam::Player
{
class IPostureSupportEdge
{
public:
xpointer<void> m_pVftable;
MARATHON_INSERT_PADDING(0x70 - 4);
};
}
13 changes: 13 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/IPostureSupportInput.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <Marathon.inl>

namespace Sonicteam::Player
{
class IPostureSupportInput
{
public:
xpointer<void> m_pVftable;
MARATHON_INSERT_PADDING(0x30 - 4);
};
}
13 changes: 13 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/IPostureSupportOttoto.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <Marathon.inl>

namespace Sonicteam::Player
{
class IPostureSupportOttoto
{
public:
xpointer<void> m_pVftable;
MARATHON_INSERT_PADDING(0x70 - 4);
};
}
20 changes: 20 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/IPostureSupportRayTemplate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include <Marathon.inl>
#include <Sonicteam/SoX/Physics/World.h>
#include <Sonicteam/SoX/RefCountObject.h>
#include <Sonicteam/SoX/RefSharedPointer.h>
#include <Sonicteam/Player/RootFrame.h>

namespace Sonicteam::Player
{
template <typename TCollisionListener>
class IPostureSupportRayTemplate
{
public:
xpointer<void> m_pVftable;
SoX::RefSharedPointer<SoX::Physics::World> m_spWorld;
boost::shared_ptr<TCollisionListener> m_spCollisionListener;
xpointer<Player::RootFrame> m_pRootFrame;
};
}
13 changes: 13 additions & 0 deletions MarathonRecomp/api/Sonicteam/Player/IPostureSupportSphere.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <Marathon.inl>

namespace Sonicteam::Player
{
class IPostureSupportSphere
{
public:
xpointer<void> m_pVftable;
MARATHON_INSERT_PADDING(0xD0 - 4);
};
}
43 changes: 35 additions & 8 deletions MarathonRecomp/api/Sonicteam/Player/Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,71 @@

#include <Marathon.h>
#include <Sonicteam/Player/State/Machine2.h>
#include <Sonicteam/Player/IPostureControl.h>
#include <boost/smart_ptr/shared_ptr.h>
#include <Sonicteam/Player/IPlugIn.h>
#include <stdx/vector.h>
#include <Sonicteam/SoX/RefCountObject.h>
#include <Sonicteam/SoX/RefSharedPointer.h>
#include <Sonicteam/Player/RootFrame.h>
#include <stdx/vector.h>
#include <Sonicteam/Player/IPlugIn.h>
#include <Sonicteam/SoX/Math/Vector.h>
#include <Sonicteam/SoX/Math/Quaternion.h>

namespace Sonicteam::Player
{
class Object : public Actor
#pragma pack(push, 1)
class __declspec(align(1)) Object : public Actor
{
struct ObjectPlayerUpgrade
{
uint32_t global_flag;
uint32_t equip_flag;
};

public:
stdx::string m_PlayerLua;
stdx::string m_PlayerPackage;
MARATHON_INSERT_PADDING(8);
be<uint32_t> m_CameramanActorID;
xpointer<uint32_t> m_Cameraman;
be<uint32_t> m_PlayerIndex;
MARATHON_INSERT_PADDING(0x2C);
be<uint32_t> m_PlayerControllerIndex;
SoX::Math::Quaternion m_SpawnRotation;
SoX::Math::Vector m_SpawnPosition;
be<uint32_t> m_SpawnRing;
SoX::RefSharedPointer<SoX::RefCountObject> m_spSpawnSource; // REF_TYPE(RefCountObject)
bool m_IsPlayer;
bool m_IsPosture;
bool m_IsAmigo;
MARATHON_INSERT_PADDING(1);
SoX::RefSharedPointer<RootFrame> m_spRootFrame;
MARATHON_INSERT_PADDING(0x14);
SoX::RefSharedPointer<SoX::RefCountObject> m_spPackageBinary;
boost::shared_ptr<void> m_spPlayerModel;
boost::shared_ptr<Player::IPostureControl> m_spPlayerPosture;
boost::shared_ptr<State::Machine2> m_spStateMachine;
MARATHON_INSERT_PADDING(0x10);
boost::shared_ptr<void> m_spPlayerGravity;
boost::shared_ptr<void> m_spPlayerImpulse;
be<uint32_t> m_SetupModuleIndexPrefix;
be<uint32_t> m_SetupModuleIndexPostfix;
boost::shared_ptr<IGauge> m_spGauge;
MARATHON_INSERT_PADDING(8);
stdx::vector<boost::shared_ptr<IPlugIn>> m_vspPlayerPlugins;
MARATHON_INSERT_PADDING(0x1F4);

MARATHON_INSERT_PADDING(0x58);
be<float> m_PlayerDelta;
MARATHON_INSERT_PADDING(0x48);
stdx::vector<ObjectPlayerUpgrade> m_PlayerUpgrade;
stdx::string m_PlayerName;
MARATHON_INSERT_PADDING(0x134);

template <typename T>
inline T* GetGauge();

template <typename T = IPlugIn>
inline T* GetPlugin(const char* pluginName);

};
#pragma pack(pop)
}

#include <Sonicteam/Player/Object.inl>
4 changes: 2 additions & 2 deletions MarathonRecomp/api/Sonicteam/Player/Object.inl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "Object.h"
namespace Sonicteam::Player
{
template <typename T>
Expand All @@ -14,7 +15,6 @@ namespace Sonicteam::Player
if (spPlugin->m_Name == pluginName)
return static_cast<T*>(spPlugin.get());
}

return nullptr;
}
}
}
Loading
Loading