Skip to content

Commit 5515f31

Browse files
committed
Surface/SurfaceXenon
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
1 parent ded4e4a commit 5515f31

7 files changed

Lines changed: 75 additions & 4 deletions

File tree

MarathonRecomp/api/Marathon.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,32 @@
156156
#include "Sonicteam/SoX/Graphics/Frame.h"
157157
#include "Sonicteam/SoX/Graphics/FrameGP.h"
158158
#include "Sonicteam/SoX/Graphics/FrameObserver.h"
159+
#include "Sonicteam/SoX/Graphics/IndexBuffer.h"
159160
#include "Sonicteam/SoX/Graphics/Lights.h"
160161
#include "Sonicteam/SoX/Graphics/PointLight.h"
161162
#include "Sonicteam/SoX/Graphics/RenderStates.h"
163+
#include "Sonicteam/SoX/Graphics/Shader.h"
162164
#include "Sonicteam/SoX/Graphics/ShaderFXL.h"
163165
#include "Sonicteam/SoX/Graphics/ShaderParameter.h"
164166
#include "Sonicteam/SoX/Graphics/ShaderParameterFXL.h"
167+
#include "Sonicteam/SoX/Graphics/ShaderPassFXL.h"
168+
#include "Sonicteam/SoX/Graphics/Surface.h"
165169
#include "Sonicteam/SoX/Graphics/Technique.h"
166170
#include "Sonicteam/SoX/Graphics/TechniqueFXL.h"
167171
#include "Sonicteam/SoX/Graphics/TextureStages.h"
168172
#include "Sonicteam/SoX/Graphics/Transforms.h"
173+
#include "Sonicteam/SoX/Graphics/VertexBuffer.h"
174+
#include "Sonicteam/SoX/Graphics/VertexStream.h"
169175
#include "Sonicteam/SoX/Graphics/Xenon/CommandXenon.h"
170176
#include "Sonicteam/SoX/Graphics/Xenon/DeviceXenon.h"
177+
#include "Sonicteam/SoX/Graphics/Xenon/FrameBufferObjectXenon.h"
178+
#include "Sonicteam/SoX/Graphics/Xenon/IndexBufferXenon.h"
171179
#include "Sonicteam/SoX/Graphics/Xenon/RenderStatesXenon.h"
180+
#include "Sonicteam/SoX/Graphics/Xenon/SurfaceXenon.h"
172181
#include "Sonicteam/SoX/Graphics/Xenon/TextureStagesXenon.h"
173182
#include "Sonicteam/SoX/Graphics/Xenon/TextureXenon.h"
183+
#include "Sonicteam/SoX/Graphics/Xenon/VertexBufferXenon.h"
184+
#include "Sonicteam/SoX/Graphics/Xenon/VertexStreamXenon.h"
174185
#include "Sonicteam/SoX/IResource.h"
175186
#include "Sonicteam/SoX/IResource2.h"
176187
#include "Sonicteam/SoX/IResourceMgr.h"

MarathonRecomp/api/Sonicteam/SoX/Graphics/Device.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#pragma once
22

3+
34
#include <Marathon.inl>
45
#include <Sonicteam/SoX/Graphics/FrameBufferObject.h>
56
#include <Sonicteam/SoX/Graphics/Xenon/FrameBufferObjectXenon.h>
67
#include <Sonicteam/SoX/Graphics/Xenon/RenderStatesXenon.h>
8+
#include <Sonicteam/SoX/Graphics/Xenon/SurfaceXenon.h>
79
#include <Sonicteam/SoX/Graphics/Xenon/TextureStagesXenon.h>
810
#include <Sonicteam/SoX/Math/Matrix.h>
911

@@ -22,8 +24,8 @@ namespace Sonicteam::SoX::Graphics
2224
xpointer<FrameBufferObject> m_pFrameBufferObject;
2325
xpointer<Xenon::FrameBufferObjectXenon> m_pFrameBufferObjectXenon;
2426
MARATHON_INSERT_PADDING(0xC);
25-
xpointer<void> m_pBackBufferSurface;
26-
xpointer<void> m_pDepthStencilSurface;
27+
xpointer<Xenon::SurfaceXenon> m_pBackBufferSurface;
28+
xpointer<Xenon::SurfaceXenon> m_pDepthStencilSurface;
2729
MARATHON_INSERT_PADDING(0x278);
2830
};
2931

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
#pragma once
22

33
#include <Marathon.inl>
4+
#include <Sonicteam/SoX/Graphics/Xenon/SurfaceXenon.h>
45
#include <Sonicteam/SoX/RefCountObject.h>
56

7+
class MyGraphicsDevice;
8+
69
namespace Sonicteam::SoX::Graphics
710
{
811
class FrameBufferObject: public RefCountObject
912
{
10-
13+
public:
14+
xpointer<Xenon::SurfaceXenon> m_pRenderTargetSurface;
15+
MARATHON_INSERT_PADDING(0xC);
16+
xpointer<Xenon::SurfaceXenon> m_pDepthStencilSurface;
17+
MARATHON_INSERT_PADDING(0x1C);
18+
xpointer<MyGraphicsDevice> m_pMyGraphicsDevice;
19+
MARATHON_INSERT_PADDING(0x4);
1120
};
21+
22+
MARATHON_ASSERT_SIZEOF(FrameBufferObject, 0x40);
23+
MARATHON_ASSERT_OFFSETOF(FrameBufferObject, m_pRenderTargetSurface, 0x8);
24+
MARATHON_ASSERT_OFFSETOF(FrameBufferObject, m_pDepthStencilSurface, 0x18);
25+
MARATHON_ASSERT_OFFSETOF(FrameBufferObject, m_pMyGraphicsDevice, 0x38);
1226
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/SoX/IResource.h>
5+
6+
namespace Sonicteam::SoX::Graphics
7+
{
8+
class Surface : public IResource
9+
{
10+
11+
};
12+
}

MarathonRecomp/api/Sonicteam/SoX/Graphics/Xenon/FrameBufferObjectXenon.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ namespace Sonicteam::SoX::Graphics::Xenon
77
{
88
class FrameBufferObjectXenon : public FrameBufferObject
99
{
10+
public:
11+
struct Vftable
12+
{
13+
MARATHON_INSERT_PADDING(0x8);
14+
};
1015

16+
xpointer<Vftable> m_pVftable;
17+
MARATHON_INSERT_PADDING(0x3C);
1118
};
19+
20+
MARATHON_ASSERT_SIZEOF(FrameBufferObjectXenon, 0x80);
1221
}
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/MyTexture.h>
5+
#include <Sonicteam/SoX/Graphics/Surface.h>
6+
7+
namespace Sonicteam::SoX::Graphics::Xenon
8+
{
9+
class SurfaceXenon : public Surface
10+
{
11+
public:
12+
MARATHON_INSERT_PADDING(0x8);
13+
be<uint32_t> m_Width;
14+
be<uint32_t> m_Height;
15+
xpointer<void> m_pD3DDevice;
16+
xpointer<void> m_pD3DSurface;
17+
xpointer<MyTexture> m_pTexture;
18+
MARATHON_INSERT_PADDING(0x10);
19+
};
20+
21+
MARATHON_ASSERT_SIZEOF(SurfaceXenon, 0x88);
22+
MARATHON_ASSERT_OFFSETOF(SurfaceXenon, m_Width, 0x64);
23+
}

MarathonRecomp/api/Sonicteam/SoX/Graphics/Xenon/VertexStreamXenon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ namespace Sonicteam::SoX::Graphics::Xenon
99
{
1010

1111
};
12-
}
12+
}

0 commit comments

Comments
 (0)