api: fix GameObject layout

This commit is contained in:
Hyper 2024-11-19 01:35:31 +00:00
parent dd066095a9
commit 7afe0f27de
10 changed files with 30 additions and 19 deletions

View file

@ -332,7 +332,7 @@ namespace Hedgehog::Base
inline int CSharedString::compare(const CSharedString& in_rOther) const
{
// TODO: DO NOT PASS BY REFERENCE.
GuestToHostFunction<int>(0x82DFB028, this, &in_rOther);
return GuestToHostFunction<int>(0x82DFB028, this, &in_rOther);
}
inline CSharedString& CSharedString::operator=(const CSharedString& in_rOther)

View file

@ -9,6 +9,6 @@ namespace Hedgehog::Universe
class CMessageActor : public IMessageProcess, public IParallelJob
{
public:
SWA_INSERT_PADDING(0x7C);
SWA_INSERT_PADDING(0x88);
};
}

View file

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "SWA.inl"
#include "Hedgehog/Universe/Thread/hhParallelJob.h"
@ -8,15 +8,18 @@ namespace Hedgehog::Universe
class CUpdateUnit : public Base::CObject, public IParallelJob
{
public:
SWA_INSERT_PADDING(0x04); // vftable ptr
SWA_INSERT_PADDING(0x24);
CUpdateUnit(const swa_null_ctor& nil) : CObject(nil), IParallelJob(nil) {}
CUpdateUnit();
virtual ~CUpdateUnit();
virtual void ExecuteParallelJob(const SUpdateInfo& in_rUpdateInfo) override;
virtual void UpdateParallel(const SUpdateInfo& in_rUpdateInfo) {}
virtual void UpdateSerial(const SUpdateInfo& in_rUpdateInfo) {}
// TODO: implement virtual functions.
// virtual ~CUpdateUnit();
//
// virtual void ExecuteParallelJob(const SUpdateInfo& in_rUpdateInfo) override;
//
// virtual void UpdateParallel(const SUpdateInfo& in_rUpdateInfo) {}
// virtual void UpdateSerial(const SUpdateInfo& in_rUpdateInfo) {}
};
}

View file

@ -8,11 +8,14 @@ namespace Hedgehog::Universe
class IParallelJob
{
public:
SWA_INSERT_PADDING(0x04); // vftable ptr
IParallelJob() {}
IParallelJob(const swa_null_ctor&) {}
virtual ~IParallelJob() = default;
virtual void ExecuteParallelJob(const SUpdateInfo& in_rUpdateInfo) = 0;
// TODO: implement virtual functions.
// virtual ~IParallelJob() = default;
//
// virtual void ExecuteParallelJob(const SUpdateInfo& in_rUpdateInfo) = 0;
};
}

View file

@ -43,5 +43,6 @@
#include "SWA/System/GameMode/Title/TitleStateBase.h"
#include "SWA/System/ApplicationDocument.h"
#include "SWA/System/GameDocument.h"
#include "SWA/System/GameObject.h"
#include "SWA/System/InputState.h"
#include "SWA/System/PadState.h"

View file

@ -15,6 +15,5 @@ namespace SWA
{
public:
Chao::CSD::RCPtr<Chao::CSD::CProject> m_rcProject;
SWA_INSERT_PADDING(0x38);
};
}

View file

@ -1,13 +1,14 @@
#pragma once
#include "SWA.inl"
#include <SWA.inl>
#include <SWA/System/GameObject.h>
namespace SWA
{
class CCamera // : public CGameObject, public Hedgehog::Universe::TStateMachine<CCamera>
class CCamera : public CGameObject // , public Hedgehog::Universe::TStateMachine<CCamera>
{
public:
SWA_INSERT_PADDING(0x184);
SWA_INSERT_PADDING(0xC4);
be<float> m_VertAspectRatio;
SWA_INSERT_PADDING(0x48);
be<float> m_HorzAspectRatio;
@ -15,5 +16,8 @@ namespace SWA
be<float> m_FieldOfView;
be<float> m_VertFieldOfView;
be<float> m_HorzFieldOfView;
SWA_INSERT_PADDING(0x18);
bool m_InvertY;
bool m_InvertX;
};
}

View file

@ -5,7 +5,7 @@
namespace SWA::Player
{
class CEvilSonic
class CEvilSonic // : public CPlayer
{
public:
SWA_INSERT_PADDING(0xC4);

View file

@ -18,10 +18,10 @@ namespace SWA::Player
eGuideType_Y
};
class CEvilHudGuide
class CEvilHudGuide : public CGameObject
{
public:
SWA_INSERT_PADDING(0x14D);
SWA_INSERT_PADDING(0x8D);
bool m_IsShown;
bool m_IsVisible;
be<EGuideType> m_GuideType;

View file

@ -18,9 +18,10 @@ namespace SWA
public:
Hedgehog::Base::TSynchronizedPtr<CGameDocument> m_pGameDocument;
Hedgehog::Base::TSynchronizedPtr<CWorld> m_pWorld;
SWA_INSERT_PADDING(0x78);
SWA_INSERT_PADDING(0x70);
};
SWA_INSERT_PADDING(0x04); // vftable ptr
xpointer<CMember> m_pMember;
};
}