API Improvements#189
Conversation
| { | ||
| public: | ||
| xpointer<void> m_pVftable; | ||
| MARATHON_INSERT_PADDING(0x4); |
There was a problem hiding this comment.
These first two may be properties of the base class
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
dc022b5 to
f6c3822
Compare
Co-authored-by: ReimousTH <reimousth@gmail.com> Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
hyperbx
left a comment
There was a problem hiding this comment.
There's a lot of empty classes in here, are these awaiting mappings or are they just here for the sake of it?
It makes me a bit uneasy given some of these mappings are incorrect at a glance, so I don't know if half of this stuff has even been tested.
| } | ||
|
|
||
| template<typename T> | ||
| shared_ptr<T> make_shared(T* pointer,uint32_t vftable) |
There was a problem hiding this comment.
| shared_ptr<T> make_shared(T* pointer,uint32_t vftable) | |
| shared_ptr<T> make_shared(T* pointer, uint32_t vftable) |
| xpointer<const char> m_pName; | ||
| lua_CFunction m_Func; |
There was a problem hiding this comment.
Use official Lua variable names.
| xpointer<const char> m_pName; | |
| lua_CFunction m_Func; | |
| xpointer<const char> name; | |
| lua_CFunction func; |
| //.peb | ||
|
|
| // No name left for type | ||
| class EffectBankData | ||
| { | ||
| public: | ||
| be<uint32_t> m_Field0; // 0x3E - no idea | ||
| stdx::string m_DataName; // player_sonic | ||
| // From .peb (raw converted since they released after) | ||
| xpointer<void> m_Data1; | ||
| xpointer<void> m_Data2; | ||
| xpointer<void> m_Data3; | ||
| stdx::map<stdx::string, be<uint32_t>> m_EffectDataIndices; // barrier_g = 0x23 | ||
| }; |
There was a problem hiding this comment.
| // No name left for type | |
| class EffectBankData | |
| { | |
| public: | |
| be<uint32_t> m_Field0; // 0x3E - no idea | |
| stdx::string m_DataName; // player_sonic | |
| // From .peb (raw converted since they released after) | |
| xpointer<void> m_Data1; | |
| xpointer<void> m_Data2; | |
| xpointer<void> m_Data3; | |
| stdx::map<stdx::string, be<uint32_t>> m_EffectDataIndices; // barrier_g = 0x23 | |
| }; | |
| struct EffectBankData | |
| { | |
| be<uint32_t> Field00; | |
| stdx::string Name; | |
| xpointer<void> pData1; | |
| xpointer<void> pData2; | |
| xpointer<void> pData3; | |
| stdx::map<stdx::string, be<uint32_t>> mEffectDataIndices; | |
| }; |
| MARATHON_ASSERT_OFFSETOF(EffectBankData, m_EffectDataIndices, 0x2C); | ||
| MARATHON_ASSERT_SIZEOF(EffectBankData, 0x38); | ||
|
|
||
| class EffectBank : public SoX::RefCountObject | ||
| { | ||
| public: | ||
| xpointer<ParticleEngine> m_pParticleEngine; | ||
| be<uint32_t> m_FieldC; // Index ? | ||
| xpointer<EffectBankData> m_pEffectBankA; | ||
| }; | ||
|
|
||
| MARATHON_ASSERT_SIZEOF(EffectBank, 0x14); |
There was a problem hiding this comment.
Place assertions below classes.
| MARATHON_ASSERT_OFFSETOF(EffectBankData, m_EffectDataIndices, 0x2C); | |
| MARATHON_ASSERT_SIZEOF(EffectBankData, 0x38); | |
| class EffectBank : public SoX::RefCountObject | |
| { | |
| public: | |
| xpointer<ParticleEngine> m_pParticleEngine; | |
| be<uint32_t> m_FieldC; // Index ? | |
| xpointer<EffectBankData> m_pEffectBankA; | |
| }; | |
| MARATHON_ASSERT_SIZEOF(EffectBank, 0x14); | |
| class EffectBank : public SoX::RefCountObject | |
| { | |
| public: | |
| xpointer<ParticleEngine> m_pParticleEngine; | |
| be<uint32_t> m_Field0C; // Index? | |
| xpointer<EffectBankData> m_pEffectBankA; | |
| }; | |
| MARATHON_ASSERT_OFFSETOF(EffectBankData, mEffectDataIndices, 0x2C); | |
| MARATHON_ASSERT_SIZEOF(EffectBankData, 0x38); | |
| MARATHON_ASSERT_SIZEOF(EffectBank, 0x14); |
| class DocMarathonImp; | ||
|
|
||
| struct SFXMatrixArrayCounted; | ||
| struct SFXMatrixArrayNode; | ||
| struct SFXMatrixArray; | ||
|
|
||
| struct SFXMatrixArrayCounted | ||
| { | ||
| be<uint32_t> m_Capacity; | ||
| }; | ||
|
|
||
| struct SFXMatrixArrayNode | ||
| { | ||
| xpointer<SoX::Math::Matrix4x4> m_pData[4]; | ||
|
|
||
| SFXMatrixArray* GetArray() | ||
| { | ||
| return reinterpret_cast<SFXMatrixArray*>((uint64_t*)((uint64_t)this - 4)); | ||
| } | ||
| }; | ||
|
|
||
| struct SFXMatrixArray : SFXMatrixArrayCounted, SFXMatrixArrayNode | ||
| { | ||
|
|
||
| }; |
There was a problem hiding this comment.
| class DocMarathonImp; | |
| struct SFXMatrixArrayCounted; | |
| struct SFXMatrixArrayNode; | |
| struct SFXMatrixArray; | |
| struct SFXMatrixArrayCounted | |
| { | |
| be<uint32_t> m_Capacity; | |
| }; | |
| struct SFXMatrixArrayNode | |
| { | |
| xpointer<SoX::Math::Matrix4x4> m_pData[4]; | |
| SFXMatrixArray* GetArray() | |
| { | |
| return reinterpret_cast<SFXMatrixArray*>((uint64_t*)((uint64_t)this - 4)); | |
| } | |
| }; | |
| struct SFXMatrixArray : SFXMatrixArrayCounted, SFXMatrixArrayNode | |
| { | |
| }; | |
| struct SFXMatrixNodeArray; | |
| struct SFXMatrixNode | |
| { | |
| xpointer<SoX::Math::Matrix4x4> m_pData[4]; | |
| SFXMatrixArray* GetArray() | |
| { | |
| return reinterpret_cast<SFXMatrixArray*>((uint8_t*)this - 4); | |
| } | |
| }; | |
| struct SFXMatrixNodeArray | |
| { | |
| be<uint32_t> m_Length; | |
| SFXMatrixNode m_First; | |
| }; |
| be<uint32_t> fpFieldC; //some with capture0 | ||
| be<uint32_t> fpField10; //some with capture0, yes again |
There was a problem hiding this comment.
| be<uint32_t> fpFieldC; //some with capture0 | |
| be<uint32_t> fpField10; //some with capture0, yes again | |
| be<uint32_t> fpField0C; | |
| be<uint32_t> fpField10; |
| xpointer<SFXMatrixArrayNode> m_aSFXMatrices1; | ||
| xpointer<SFXMatrixArrayNode> m_aSFXMatrices2; | ||
| stdx::map<stdx::string, boost::shared_ptr<SoX::Engine::RenderProcess>> m_msspRenderProcess; |
There was a problem hiding this comment.
| xpointer<SFXMatrixArrayNode> m_aSFXMatrices1; | |
| xpointer<SFXMatrixArrayNode> m_aSFXMatrices2; | |
| stdx::map<stdx::string, boost::shared_ptr<SoX::Engine::RenderProcess>> m_msspRenderProcess; | |
| xpointer<SFXMatrixNode> m_aSFXMatrices1; | |
| xpointer<SFXMatrixNode> m_aSFXMatrices2; | |
| stdx::map<stdx::string, boost::shared_ptr<SoX::Engine::RenderProcess>> m_mspRenderProcesses; |
| }; | ||
|
|
||
| MARATHON_ASSERT_SIZEOF(SFXAgent, 0x24); | ||
| MARATHON_ASSERT_OFFSETOF(SFXAgent, m_msspRenderProcess, 0x10); |
There was a problem hiding this comment.
| MARATHON_ASSERT_OFFSETOF(SFXAgent, m_msspRenderProcess, 0x10); | |
| MARATHON_ASSERT_OFFSETOF(SFXAgent, m_mspRenderProcess, 0x10); |
| xpointer<DocMarathonImp> m_pDoc; | ||
| xpointer<SFXMatrixArrayNode> m_aSFXMatrices1; | ||
| xpointer<SFXMatrixArrayNode> m_aSFXMatrices2; | ||
| stdx::map<stdx::string, boost::shared_ptr<SoX::Engine::RenderProcess>> m_msspRenderProcess; |
There was a problem hiding this comment.
Missing offset assertions.
hyperbx
left a comment
There was a problem hiding this comment.
There's a lot of empty classes in here, are these awaiting mappings or are they just here for the sake of it?
It makes me a bit uneasy given some of these mappings are incorrect at a glance, so I don't know if half of this stuff has even been tested.
|
Closing as these changes should be merged in with work from other branches, rather than being one large PR. |
Adds a bunch of headers for mostly graphics and graphics adjacent things. Some are more researched than others.